diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..5a80290 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,3 @@ +{ + "extends": "@bifravst/eslint-config-typescript" +} diff --git a/.github/workflows/test-and-release.yaml b/.github/workflows/test-and-release.yaml new file mode 100644 index 0000000..6e4fb62 --- /dev/null +++ b/.github/workflows/test-and-release.yaml @@ -0,0 +1,29 @@ +name: Test and Release + +on: push + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "12.x" + - name: Keep npm cache around to speed up installs + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} + - run: npm ci --no-audit + - run: npx tsc + - run: npm run build + - name: Semantic release + continue-on-error: true + run: | + npm i --no-save semantic-release + npx semantic-release diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ef5c31f --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules/ +dist/ +build/* +!build/index.js \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..3ad4c84 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +dist/ +package-lock.json diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..ff901ec --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,3 @@ +module.exports = { + ...require('@bifravst/code-style/.prettierrc'), +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..ca4ba37 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1 @@ +See https://github.com/bifravst/bifravst/blob/saga/CODE_OF_CONDUCT.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..21880d9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Nordic Semiconductor ASA | nordicsemi.no +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..89184e8 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Firmware CI feature runner GitHub action for AWS + +[![GitHub Actions](https://github.com/bifravst/firmware-ci-feature-runner-action-aws/workflows/Test%20and%20Release/badge.svg)](https://github.com/bifravst/firmware-ci-feature-runner-action-aws/actions) +[![Known Vulnerabilities](https://snyk.io/test/github/bifravst/firmware-ci-feature-runner-action-aws/badge.svg)](https://snyk.io/test/github/bifravst/firmware-ci-feature-runner-action-aws) +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) +[![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com) +[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://dashboard.mergify.io/badges/bifravst/firmware-ci-feature-runner-action-aws&style=flat)](https://mergify.io) +[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) +[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier/) +[![ESLint: TypeScript](https://img.shields.io/badge/ESLint-TypeScript-blue.svg)](https://github.com/typescript-eslint/typescript-eslint) + +Uses +[`@bifravst/e2e-bdd-test-runner`](https://github.com/bifravst/e2e-bdd-test-runner) +to run features files of a firmware. diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..89af8da --- /dev/null +++ b/action.yml @@ -0,0 +1,36 @@ +name: "Firmware CI feature runner" +description: + "Uses @bifravst/e2e-bdd-test-runner to run features files of a firmware." +inputs: + job id: + description: "The ID of the job" + required: true + app version: + description: + "The version string to use for the app. This is used with the FOTA test." + required: true + aws access key id: + description: "Access Key ID for the Firmware CI Runner" + required: true + aws secret access key: + description: "Secret Access Key for the Firmware CI Runner" + required: true + aws region: + description: "AWS region to use" + required: false + default: us-west-1 + broker hostname: + description: "AWS IoT broker hostname to use" + required: true + stack name: + description: "Stack name of the cloud backend to use" + required: false + default: bifravst + feature dir: + description: "Location of the feature files" + required: false + default: features + +runs: + using: "node12" + main: "build/index.js" diff --git a/build/index.js b/build/index.js new file mode 100644 index 0000000..bb5d227 --- /dev/null +++ b/build/index.js @@ -0,0 +1,282679 @@ +module.exports = +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 51194: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse("{\"name\":\"@aws-sdk/client-cloudformation\",\"description\":\"AWS SDK for JavaScript Cloudformation Client for Node.js, Browser and React Native\",\"version\":\"3.3.0\",\"scripts\":{\"clean\":\"yarn remove-definitions && yarn remove-dist && yarn remove-documentation\",\"build-documentation\":\"yarn remove-documentation && typedoc ./\",\"prepublishOnly\":\"yarn build\",\"pretest\":\"yarn build:cjs\",\"remove-definitions\":\"rimraf ./types\",\"remove-dist\":\"rimraf ./dist\",\"remove-documentation\":\"rimraf ./docs\",\"test\":\"exit 0\",\"build:cjs\":\"tsc -p tsconfig.json\",\"build:es\":\"tsc -p tsconfig.es.json\",\"build\":\"yarn build:cjs && yarn build:es\"},\"main\":\"./dist/cjs/index.js\",\"types\":\"./types/index.d.ts\",\"module\":\"./dist/es/index.js\",\"browser\":{\"./runtimeConfig\":\"./runtimeConfig.browser\"},\"react-native\":{\"./runtimeConfig\":\"./runtimeConfig.native\"},\"sideEffects\":false,\"dependencies\":{\"@aws-crypto/sha256-browser\":\"^1.0.0\",\"@aws-crypto/sha256-js\":\"^1.0.0\",\"@aws-sdk/config-resolver\":\"3.3.0\",\"@aws-sdk/credential-provider-node\":\"3.3.0\",\"@aws-sdk/fetch-http-handler\":\"3.3.0\",\"@aws-sdk/hash-node\":\"3.3.0\",\"@aws-sdk/invalid-dependency\":\"3.3.0\",\"@aws-sdk/middleware-content-length\":\"3.3.0\",\"@aws-sdk/middleware-host-header\":\"3.3.0\",\"@aws-sdk/middleware-logger\":\"3.3.0\",\"@aws-sdk/middleware-retry\":\"3.3.0\",\"@aws-sdk/middleware-serde\":\"3.3.0\",\"@aws-sdk/middleware-signing\":\"3.3.0\",\"@aws-sdk/middleware-stack\":\"3.1.0\",\"@aws-sdk/middleware-user-agent\":\"3.3.0\",\"@aws-sdk/node-config-provider\":\"3.3.0\",\"@aws-sdk/node-http-handler\":\"3.3.0\",\"@aws-sdk/protocol-http\":\"3.3.0\",\"@aws-sdk/smithy-client\":\"3.3.0\",\"@aws-sdk/types\":\"3.1.0\",\"@aws-sdk/url-parser\":\"3.3.0\",\"@aws-sdk/url-parser-native\":\"3.3.0\",\"@aws-sdk/util-base64-browser\":\"3.1.0\",\"@aws-sdk/util-base64-node\":\"3.1.0\",\"@aws-sdk/util-body-length-browser\":\"3.1.0\",\"@aws-sdk/util-body-length-node\":\"3.1.0\",\"@aws-sdk/util-user-agent-browser\":\"3.3.0\",\"@aws-sdk/util-user-agent-node\":\"3.3.0\",\"@aws-sdk/util-utf8-browser\":\"3.1.0\",\"@aws-sdk/util-utf8-node\":\"3.1.0\",\"@aws-sdk/util-waiter\":\"3.3.0\",\"fast-xml-parser\":\"^3.16.0\",\"tslib\":\"^2.0.0\",\"uuid\":\"^3.0.0\"},\"devDependencies\":{\"@aws-sdk/client-documentation-generator\":\"3.1.0\",\"@types/node\":\"^12.7.5\",\"@types/uuid\":\"^3.0.0\",\"jest\":\"^26.1.0\",\"rimraf\":\"^3.0.0\",\"typedoc\":\"^0.19.2\",\"typescript\":\"~4.1.2\"},\"engines\":{\"node\":\">=10.0.0\"},\"author\":{\"name\":\"AWS SDK for JavaScript Team\",\"url\":\"https://aws.amazon.com/javascript/\"},\"license\":\"Apache-2.0\",\"homepage\":\"https://github.com/aws/aws-sdk-js-v3/tree/master/clients/client-cloudformation\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/aws/aws-sdk-js-v3.git\",\"directory\":\"clients/client-cloudformation\"}}"); + +/***/ }), + +/***/ 48166: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse("{\"name\":\"@aws-sdk/client-cognito-identity-provider\",\"description\":\"AWS SDK for JavaScript Cognito Identity Provider Client for Node.js, Browser and React Native\",\"version\":\"3.3.0\",\"scripts\":{\"clean\":\"yarn remove-definitions && yarn remove-dist && yarn remove-documentation\",\"build-documentation\":\"yarn remove-documentation && typedoc ./\",\"prepublishOnly\":\"yarn build\",\"pretest\":\"yarn build:cjs\",\"remove-definitions\":\"rimraf ./types\",\"remove-dist\":\"rimraf ./dist\",\"remove-documentation\":\"rimraf ./docs\",\"test\":\"exit 0\",\"build:cjs\":\"tsc -p tsconfig.json\",\"build:es\":\"tsc -p tsconfig.es.json\",\"build\":\"yarn build:cjs && yarn build:es\"},\"main\":\"./dist/cjs/index.js\",\"types\":\"./types/index.d.ts\",\"module\":\"./dist/es/index.js\",\"browser\":{\"./runtimeConfig\":\"./runtimeConfig.browser\"},\"react-native\":{\"./runtimeConfig\":\"./runtimeConfig.native\"},\"sideEffects\":false,\"dependencies\":{\"@aws-crypto/sha256-browser\":\"^1.0.0\",\"@aws-crypto/sha256-js\":\"^1.0.0\",\"@aws-sdk/config-resolver\":\"3.3.0\",\"@aws-sdk/credential-provider-node\":\"3.3.0\",\"@aws-sdk/fetch-http-handler\":\"3.3.0\",\"@aws-sdk/hash-node\":\"3.3.0\",\"@aws-sdk/invalid-dependency\":\"3.3.0\",\"@aws-sdk/middleware-content-length\":\"3.3.0\",\"@aws-sdk/middleware-host-header\":\"3.3.0\",\"@aws-sdk/middleware-logger\":\"3.3.0\",\"@aws-sdk/middleware-retry\":\"3.3.0\",\"@aws-sdk/middleware-serde\":\"3.3.0\",\"@aws-sdk/middleware-signing\":\"3.3.0\",\"@aws-sdk/middleware-stack\":\"3.1.0\",\"@aws-sdk/middleware-user-agent\":\"3.3.0\",\"@aws-sdk/node-config-provider\":\"3.3.0\",\"@aws-sdk/node-http-handler\":\"3.3.0\",\"@aws-sdk/protocol-http\":\"3.3.0\",\"@aws-sdk/smithy-client\":\"3.3.0\",\"@aws-sdk/types\":\"3.1.0\",\"@aws-sdk/url-parser\":\"3.3.0\",\"@aws-sdk/url-parser-native\":\"3.3.0\",\"@aws-sdk/util-base64-browser\":\"3.1.0\",\"@aws-sdk/util-base64-node\":\"3.1.0\",\"@aws-sdk/util-body-length-browser\":\"3.1.0\",\"@aws-sdk/util-body-length-node\":\"3.1.0\",\"@aws-sdk/util-user-agent-browser\":\"3.3.0\",\"@aws-sdk/util-user-agent-node\":\"3.3.0\",\"@aws-sdk/util-utf8-browser\":\"3.1.0\",\"@aws-sdk/util-utf8-node\":\"3.1.0\",\"tslib\":\"^2.0.0\"},\"devDependencies\":{\"@aws-sdk/client-documentation-generator\":\"3.1.0\",\"@types/node\":\"^12.7.5\",\"jest\":\"^26.1.0\",\"rimraf\":\"^3.0.0\",\"typedoc\":\"^0.19.2\",\"typescript\":\"~4.1.2\"},\"engines\":{\"node\":\">=10.0.0\"},\"author\":{\"name\":\"AWS SDK for JavaScript Team\",\"url\":\"https://aws.amazon.com/javascript/\"},\"license\":\"Apache-2.0\",\"homepage\":\"https://github.com/aws/aws-sdk-js-v3/tree/master/clients/client-cognito-identity-provider\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/aws/aws-sdk-js-v3.git\",\"directory\":\"clients/client-cognito-identity-provider\"}}"); + +/***/ }), + +/***/ 67367: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse("{\"name\":\"@aws-sdk/client-cognito-identity\",\"description\":\"AWS SDK for JavaScript Cognito Identity Client for Node.js, Browser and React Native\",\"version\":\"3.3.0\",\"scripts\":{\"clean\":\"yarn remove-definitions && yarn remove-dist && yarn remove-documentation\",\"build-documentation\":\"yarn remove-documentation && typedoc ./\",\"prepublishOnly\":\"yarn build\",\"pretest\":\"yarn build:cjs\",\"remove-definitions\":\"rimraf ./types\",\"remove-dist\":\"rimraf ./dist\",\"remove-documentation\":\"rimraf ./docs\",\"test:unit\":\"mocha **/cjs/**/*.spec.js\",\"test:e2e\":\"mocha **/cjs/**/*.ispec.js && karma start karma.conf.js\",\"test\":\"yarn test:unit\",\"build:cjs\":\"tsc -p tsconfig.json\",\"build:es\":\"tsc -p tsconfig.es.json\",\"build\":\"yarn build:cjs && yarn build:es\"},\"main\":\"./dist/cjs/index.js\",\"types\":\"./types/index.d.ts\",\"module\":\"./dist/es/index.js\",\"browser\":{\"./runtimeConfig\":\"./runtimeConfig.browser\"},\"react-native\":{\"./runtimeConfig\":\"./runtimeConfig.native\"},\"sideEffects\":false,\"dependencies\":{\"@aws-crypto/sha256-browser\":\"^1.0.0\",\"@aws-crypto/sha256-js\":\"^1.0.0\",\"@aws-sdk/config-resolver\":\"3.3.0\",\"@aws-sdk/credential-provider-node\":\"3.3.0\",\"@aws-sdk/fetch-http-handler\":\"3.3.0\",\"@aws-sdk/hash-node\":\"3.3.0\",\"@aws-sdk/invalid-dependency\":\"3.3.0\",\"@aws-sdk/middleware-content-length\":\"3.3.0\",\"@aws-sdk/middleware-host-header\":\"3.3.0\",\"@aws-sdk/middleware-logger\":\"3.3.0\",\"@aws-sdk/middleware-retry\":\"3.3.0\",\"@aws-sdk/middleware-serde\":\"3.3.0\",\"@aws-sdk/middleware-signing\":\"3.3.0\",\"@aws-sdk/middleware-stack\":\"3.1.0\",\"@aws-sdk/middleware-user-agent\":\"3.3.0\",\"@aws-sdk/node-config-provider\":\"3.3.0\",\"@aws-sdk/node-http-handler\":\"3.3.0\",\"@aws-sdk/protocol-http\":\"3.3.0\",\"@aws-sdk/smithy-client\":\"3.3.0\",\"@aws-sdk/types\":\"3.1.0\",\"@aws-sdk/url-parser\":\"3.3.0\",\"@aws-sdk/url-parser-native\":\"3.3.0\",\"@aws-sdk/util-base64-browser\":\"3.1.0\",\"@aws-sdk/util-base64-node\":\"3.1.0\",\"@aws-sdk/util-body-length-browser\":\"3.1.0\",\"@aws-sdk/util-body-length-node\":\"3.1.0\",\"@aws-sdk/util-user-agent-browser\":\"3.3.0\",\"@aws-sdk/util-user-agent-node\":\"3.3.0\",\"@aws-sdk/util-utf8-browser\":\"3.1.0\",\"@aws-sdk/util-utf8-node\":\"3.1.0\",\"tslib\":\"^2.0.0\"},\"devDependencies\":{\"@aws-sdk/client-documentation-generator\":\"3.1.0\",\"@aws-sdk/client-iam\":\"3.3.0\",\"@types/chai\":\"^4.2.11\",\"@types/mocha\":\"^8.0.4\",\"@types/node\":\"^12.7.5\",\"jest\":\"^26.1.0\",\"rimraf\":\"^3.0.0\",\"typedoc\":\"^0.19.2\",\"typescript\":\"~4.1.2\"},\"engines\":{\"node\":\">=10.0.0\"},\"author\":{\"name\":\"AWS SDK for JavaScript Team\",\"url\":\"https://aws.amazon.com/javascript/\"},\"license\":\"Apache-2.0\",\"homepage\":\"https://github.com/aws/aws-sdk-js-v3/tree/master/clients/client-cognito-identity\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/aws/aws-sdk-js-v3.git\",\"directory\":\"clients/client-cognito-identity\"}}"); + +/***/ }), + +/***/ 57111: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse("{\"name\":\"@aws-sdk/client-iot\",\"description\":\"AWS SDK for JavaScript Iot Client for Node.js, Browser and React Native\",\"version\":\"3.3.0\",\"scripts\":{\"clean\":\"yarn remove-definitions && yarn remove-dist && yarn remove-documentation\",\"build-documentation\":\"yarn remove-documentation && typedoc ./\",\"prepublishOnly\":\"yarn build\",\"pretest\":\"yarn build:cjs\",\"remove-definitions\":\"rimraf ./types\",\"remove-dist\":\"rimraf ./dist\",\"remove-documentation\":\"rimraf ./docs\",\"test\":\"exit 0\",\"build:cjs\":\"tsc -p tsconfig.json\",\"build:es\":\"tsc -p tsconfig.es.json\",\"build\":\"yarn build:cjs && yarn build:es\"},\"main\":\"./dist/cjs/index.js\",\"types\":\"./types/index.d.ts\",\"module\":\"./dist/es/index.js\",\"browser\":{\"./runtimeConfig\":\"./runtimeConfig.browser\"},\"react-native\":{\"./runtimeConfig\":\"./runtimeConfig.native\"},\"sideEffects\":false,\"dependencies\":{\"@aws-crypto/sha256-browser\":\"^1.0.0\",\"@aws-crypto/sha256-js\":\"^1.0.0\",\"@aws-sdk/config-resolver\":\"3.3.0\",\"@aws-sdk/credential-provider-node\":\"3.3.0\",\"@aws-sdk/fetch-http-handler\":\"3.3.0\",\"@aws-sdk/hash-node\":\"3.3.0\",\"@aws-sdk/invalid-dependency\":\"3.3.0\",\"@aws-sdk/middleware-content-length\":\"3.3.0\",\"@aws-sdk/middleware-host-header\":\"3.3.0\",\"@aws-sdk/middleware-logger\":\"3.3.0\",\"@aws-sdk/middleware-retry\":\"3.3.0\",\"@aws-sdk/middleware-serde\":\"3.3.0\",\"@aws-sdk/middleware-signing\":\"3.3.0\",\"@aws-sdk/middleware-stack\":\"3.1.0\",\"@aws-sdk/middleware-user-agent\":\"3.3.0\",\"@aws-sdk/node-config-provider\":\"3.3.0\",\"@aws-sdk/node-http-handler\":\"3.3.0\",\"@aws-sdk/protocol-http\":\"3.3.0\",\"@aws-sdk/smithy-client\":\"3.3.0\",\"@aws-sdk/types\":\"3.1.0\",\"@aws-sdk/url-parser\":\"3.3.0\",\"@aws-sdk/url-parser-native\":\"3.3.0\",\"@aws-sdk/util-base64-browser\":\"3.1.0\",\"@aws-sdk/util-base64-node\":\"3.1.0\",\"@aws-sdk/util-body-length-browser\":\"3.1.0\",\"@aws-sdk/util-body-length-node\":\"3.1.0\",\"@aws-sdk/util-user-agent-browser\":\"3.3.0\",\"@aws-sdk/util-user-agent-node\":\"3.3.0\",\"@aws-sdk/util-utf8-browser\":\"3.1.0\",\"@aws-sdk/util-utf8-node\":\"3.1.0\",\"tslib\":\"^2.0.0\",\"uuid\":\"^3.0.0\"},\"devDependencies\":{\"@aws-sdk/client-documentation-generator\":\"3.1.0\",\"@types/node\":\"^12.7.5\",\"@types/uuid\":\"^3.0.0\",\"jest\":\"^26.1.0\",\"rimraf\":\"^3.0.0\",\"typedoc\":\"^0.19.2\",\"typescript\":\"~4.1.2\"},\"engines\":{\"node\":\">=10.0.0\"},\"author\":{\"name\":\"AWS SDK for JavaScript Team\",\"url\":\"https://aws.amazon.com/javascript/\"},\"license\":\"Apache-2.0\",\"homepage\":\"https://github.com/aws/aws-sdk-js-v3/tree/master/clients/client-iot\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/aws/aws-sdk-js-v3.git\",\"directory\":\"clients/client-iot\"}}"); + +/***/ }), + +/***/ 73021: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse("{\"name\":\"@aws-sdk/client-sqs\",\"description\":\"AWS SDK for JavaScript Sqs Client for Node.js, Browser and React Native\",\"version\":\"3.3.0\",\"scripts\":{\"clean\":\"yarn remove-definitions && yarn remove-dist && yarn remove-documentation\",\"build-documentation\":\"yarn remove-documentation && typedoc ./\",\"prepublishOnly\":\"yarn build\",\"pretest\":\"yarn build:cjs\",\"remove-definitions\":\"rimraf ./types\",\"remove-dist\":\"rimraf ./dist\",\"remove-documentation\":\"rimraf ./docs\",\"test\":\"exit 0\",\"build:cjs\":\"tsc -p tsconfig.json\",\"build:es\":\"tsc -p tsconfig.es.json\",\"build\":\"yarn build:cjs && yarn build:es\"},\"main\":\"./dist/cjs/index.js\",\"types\":\"./types/index.d.ts\",\"module\":\"./dist/es/index.js\",\"browser\":{\"./runtimeConfig\":\"./runtimeConfig.browser\"},\"react-native\":{\"./runtimeConfig\":\"./runtimeConfig.native\"},\"sideEffects\":false,\"dependencies\":{\"@aws-crypto/sha256-browser\":\"^1.0.0\",\"@aws-crypto/sha256-js\":\"^1.0.0\",\"@aws-sdk/config-resolver\":\"3.3.0\",\"@aws-sdk/credential-provider-node\":\"3.3.0\",\"@aws-sdk/fetch-http-handler\":\"3.3.0\",\"@aws-sdk/hash-node\":\"3.3.0\",\"@aws-sdk/invalid-dependency\":\"3.3.0\",\"@aws-sdk/md5-js\":\"3.3.0\",\"@aws-sdk/middleware-content-length\":\"3.3.0\",\"@aws-sdk/middleware-host-header\":\"3.3.0\",\"@aws-sdk/middleware-logger\":\"3.3.0\",\"@aws-sdk/middleware-retry\":\"3.3.0\",\"@aws-sdk/middleware-sdk-sqs\":\"3.3.0\",\"@aws-sdk/middleware-serde\":\"3.3.0\",\"@aws-sdk/middleware-signing\":\"3.3.0\",\"@aws-sdk/middleware-stack\":\"3.1.0\",\"@aws-sdk/middleware-user-agent\":\"3.3.0\",\"@aws-sdk/node-config-provider\":\"3.3.0\",\"@aws-sdk/node-http-handler\":\"3.3.0\",\"@aws-sdk/protocol-http\":\"3.3.0\",\"@aws-sdk/smithy-client\":\"3.3.0\",\"@aws-sdk/types\":\"3.1.0\",\"@aws-sdk/url-parser\":\"3.3.0\",\"@aws-sdk/url-parser-native\":\"3.3.0\",\"@aws-sdk/util-base64-browser\":\"3.1.0\",\"@aws-sdk/util-base64-node\":\"3.1.0\",\"@aws-sdk/util-body-length-browser\":\"3.1.0\",\"@aws-sdk/util-body-length-node\":\"3.1.0\",\"@aws-sdk/util-user-agent-browser\":\"3.3.0\",\"@aws-sdk/util-user-agent-node\":\"3.3.0\",\"@aws-sdk/util-utf8-browser\":\"3.1.0\",\"@aws-sdk/util-utf8-node\":\"3.1.0\",\"fast-xml-parser\":\"^3.16.0\",\"tslib\":\"^2.0.0\"},\"devDependencies\":{\"@aws-sdk/client-documentation-generator\":\"3.1.0\",\"@types/node\":\"^12.7.5\",\"jest\":\"^26.1.0\",\"rimraf\":\"^3.0.0\",\"typedoc\":\"^0.19.2\",\"typescript\":\"~4.1.2\"},\"engines\":{\"node\":\">=10.0.0\"},\"author\":{\"name\":\"AWS SDK for JavaScript Team\",\"url\":\"https://aws.amazon.com/javascript/\"},\"license\":\"Apache-2.0\",\"homepage\":\"https://github.com/aws/aws-sdk-js-v3/tree/master/clients/client-sqs\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/aws/aws-sdk-js-v3.git\",\"directory\":\"clients/client-sqs\"}}"); + +/***/ }), + +/***/ 51508: +/***/ ((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.3.0\",\"scripts\":{\"clean\":\"yarn remove-definitions && yarn remove-dist && yarn remove-documentation\",\"build-documentation\":\"yarn remove-documentation && typedoc ./\",\"prepublishOnly\":\"yarn build\",\"pretest\":\"yarn build:cjs\",\"remove-definitions\":\"rimraf ./types\",\"remove-dist\":\"rimraf ./dist\",\"remove-documentation\":\"rimraf ./docs\",\"test\":\"exit 0\",\"build:cjs\":\"tsc -p tsconfig.json\",\"build:es\":\"tsc -p tsconfig.es.json\",\"build\":\"yarn build:cjs && yarn build:es\"},\"main\":\"./dist/cjs/index.js\",\"types\":\"./types/index.d.ts\",\"module\":\"./dist/es/index.js\",\"browser\":{\"./runtimeConfig\":\"./runtimeConfig.browser\"},\"react-native\":{\"./runtimeConfig\":\"./runtimeConfig.native\"},\"sideEffects\":false,\"dependencies\":{\"@aws-crypto/sha256-browser\":\"^1.0.0\",\"@aws-crypto/sha256-js\":\"^1.0.0\",\"@aws-sdk/config-resolver\":\"3.3.0\",\"@aws-sdk/credential-provider-node\":\"3.3.0\",\"@aws-sdk/fetch-http-handler\":\"3.3.0\",\"@aws-sdk/hash-node\":\"3.3.0\",\"@aws-sdk/invalid-dependency\":\"3.3.0\",\"@aws-sdk/middleware-content-length\":\"3.3.0\",\"@aws-sdk/middleware-host-header\":\"3.3.0\",\"@aws-sdk/middleware-logger\":\"3.3.0\",\"@aws-sdk/middleware-retry\":\"3.3.0\",\"@aws-sdk/middleware-serde\":\"3.3.0\",\"@aws-sdk/middleware-signing\":\"3.3.0\",\"@aws-sdk/middleware-stack\":\"3.1.0\",\"@aws-sdk/middleware-user-agent\":\"3.3.0\",\"@aws-sdk/node-config-provider\":\"3.3.0\",\"@aws-sdk/node-http-handler\":\"3.3.0\",\"@aws-sdk/protocol-http\":\"3.3.0\",\"@aws-sdk/smithy-client\":\"3.3.0\",\"@aws-sdk/types\":\"3.1.0\",\"@aws-sdk/url-parser\":\"3.3.0\",\"@aws-sdk/url-parser-native\":\"3.3.0\",\"@aws-sdk/util-base64-browser\":\"3.1.0\",\"@aws-sdk/util-base64-node\":\"3.1.0\",\"@aws-sdk/util-body-length-browser\":\"3.1.0\",\"@aws-sdk/util-body-length-node\":\"3.1.0\",\"@aws-sdk/util-user-agent-browser\":\"3.3.0\",\"@aws-sdk/util-user-agent-node\":\"3.3.0\",\"@aws-sdk/util-utf8-browser\":\"3.1.0\",\"@aws-sdk/util-utf8-node\":\"3.1.0\",\"fast-xml-parser\":\"^3.16.0\",\"tslib\":\"^2.0.0\"},\"devDependencies\":{\"@aws-sdk/client-documentation-generator\":\"3.1.0\",\"@types/node\":\"^12.7.5\",\"jest\":\"^26.1.0\",\"rimraf\":\"^3.0.0\",\"typedoc\":\"^0.19.2\",\"typescript\":\"~4.1.2\"},\"engines\":{\"node\":\">=10.0.0\"},\"author\":{\"name\":\"AWS SDK for JavaScript Team\",\"url\":\"https://aws.amazon.com/javascript/\"},\"license\":\"Apache-2.0\",\"homepage\":\"https://github.com/aws/aws-sdk-js-v3/tree/master/clients/client-sts\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/aws/aws-sdk-js-v3.git\",\"directory\":\"clients/client-sts\"}}"); + +/***/ }), + +/***/ 87351: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const os = __importStar(__nccwpck_require__(12087)); +const utils_1 = __nccwpck_require__(5278); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), + +/***/ 42186: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__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()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const command_1 = __nccwpck_require__(87351); +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)); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + const delimiter = '_GitHubActionsFileCommandDelimeter_'; + const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; + file_command_1.issueCommand('ENV', commandValue); + } + else { + command_1.issueCommand('set-env', { name }, convertedVal); + } +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. The value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + command_1.issueCommand('set-output', { name }, value); +} +exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + */ +function error(message) { + command_1.issue('error', message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds an warning issue + * @param message warning issue message. Errors will be converted to string via toString() + */ +function warning(message) { + command_1.issue('warning', message instanceof Error ? message.toString() : message); +} +exports.warning = warning; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + command_1.issueCommand('save-state', { name }, value); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 717: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// For internal use, subject to change. +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +// 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 utils_1 = __nccwpck_require__(5278); +function issueCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueCommand = issueCommand; +//# sourceMappingURL=file-command.js.map + +/***/ }), + +/***/ 5278: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 44074: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CloudFormation = void 0; +const CloudFormationClient_1 = __nccwpck_require__(25838); +const CancelUpdateStackCommand_1 = __nccwpck_require__(78006); +const ContinueUpdateRollbackCommand_1 = __nccwpck_require__(31828); +const CreateChangeSetCommand_1 = __nccwpck_require__(87501); +const CreateStackCommand_1 = __nccwpck_require__(42935); +const CreateStackInstancesCommand_1 = __nccwpck_require__(53977); +const CreateStackSetCommand_1 = __nccwpck_require__(94602); +const DeleteChangeSetCommand_1 = __nccwpck_require__(8147); +const DeleteStackCommand_1 = __nccwpck_require__(93619); +const DeleteStackInstancesCommand_1 = __nccwpck_require__(96629); +const DeleteStackSetCommand_1 = __nccwpck_require__(67548); +const DeregisterTypeCommand_1 = __nccwpck_require__(38218); +const DescribeAccountLimitsCommand_1 = __nccwpck_require__(67719); +const DescribeChangeSetCommand_1 = __nccwpck_require__(433); +const DescribeStackDriftDetectionStatusCommand_1 = __nccwpck_require__(30462); +const DescribeStackEventsCommand_1 = __nccwpck_require__(99902); +const DescribeStackInstanceCommand_1 = __nccwpck_require__(95705); +const DescribeStackResourceCommand_1 = __nccwpck_require__(15305); +const DescribeStackResourceDriftsCommand_1 = __nccwpck_require__(25794); +const DescribeStackResourcesCommand_1 = __nccwpck_require__(28792); +const DescribeStackSetCommand_1 = __nccwpck_require__(18050); +const DescribeStackSetOperationCommand_1 = __nccwpck_require__(12422); +const DescribeStacksCommand_1 = __nccwpck_require__(87840); +const DescribeTypeCommand_1 = __nccwpck_require__(41499); +const DescribeTypeRegistrationCommand_1 = __nccwpck_require__(39500); +const DetectStackDriftCommand_1 = __nccwpck_require__(78948); +const DetectStackResourceDriftCommand_1 = __nccwpck_require__(46403); +const DetectStackSetDriftCommand_1 = __nccwpck_require__(19450); +const EstimateTemplateCostCommand_1 = __nccwpck_require__(11152); +const ExecuteChangeSetCommand_1 = __nccwpck_require__(73188); +const GetStackPolicyCommand_1 = __nccwpck_require__(4482); +const GetTemplateCommand_1 = __nccwpck_require__(99836); +const GetTemplateSummaryCommand_1 = __nccwpck_require__(59396); +const ListChangeSetsCommand_1 = __nccwpck_require__(99706); +const ListExportsCommand_1 = __nccwpck_require__(60351); +const ListImportsCommand_1 = __nccwpck_require__(72171); +const ListStackInstancesCommand_1 = __nccwpck_require__(50991); +const ListStackResourcesCommand_1 = __nccwpck_require__(83057); +const ListStackSetOperationResultsCommand_1 = __nccwpck_require__(71155); +const ListStackSetOperationsCommand_1 = __nccwpck_require__(62539); +const ListStackSetsCommand_1 = __nccwpck_require__(40722); +const ListStacksCommand_1 = __nccwpck_require__(54482); +const ListTypeRegistrationsCommand_1 = __nccwpck_require__(34567); +const ListTypeVersionsCommand_1 = __nccwpck_require__(72174); +const ListTypesCommand_1 = __nccwpck_require__(5511); +const RecordHandlerProgressCommand_1 = __nccwpck_require__(57237); +const RegisterTypeCommand_1 = __nccwpck_require__(19011); +const SetStackPolicyCommand_1 = __nccwpck_require__(91272); +const SetTypeDefaultVersionCommand_1 = __nccwpck_require__(34356); +const SignalResourceCommand_1 = __nccwpck_require__(80854); +const StopStackSetOperationCommand_1 = __nccwpck_require__(44275); +const UpdateStackCommand_1 = __nccwpck_require__(50944); +const UpdateStackInstancesCommand_1 = __nccwpck_require__(54289); +const UpdateStackSetCommand_1 = __nccwpck_require__(69969); +const UpdateTerminationProtectionCommand_1 = __nccwpck_require__(72746); +const ValidateTemplateCommand_1 = __nccwpck_require__(35583); +/** + * AWS CloudFormation + *

AWS CloudFormation allows you to create and manage AWS infrastructure deployments + * predictably and repeatedly. You can use AWS CloudFormation to leverage AWS products, such + * as Amazon Elastic Compute Cloud, Amazon Elastic Block Store, Amazon Simple Notification + * Service, Elastic Load Balancing, and Auto Scaling to build highly-reliable, highly + * scalable, cost-effective applications without creating or configuring the underlying AWS + * infrastructure.

+ *

With AWS CloudFormation, you declare all of your resources and dependencies in a + * template file. The template defines a collection of resources as a single unit called a + * stack. AWS CloudFormation creates and deletes all member resources of the stack together + * and manages all dependencies between the resources for you.

+ *

For more information about AWS CloudFormation, see the AWS CloudFormation Product Page.

+ *

Amazon CloudFormation makes use of other AWS products. If you need additional + * technical information about a specific AWS product, you can find the product's technical + * documentation at docs.aws.amazon.com.

+ */ +class CloudFormation extends CloudFormationClient_1.CloudFormationClient { + cancelUpdateStack(args, optionsOrCb, cb) { + const command = new CancelUpdateStackCommand_1.CancelUpdateStackCommand(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); + } + } + continueUpdateRollback(args, optionsOrCb, cb) { + const command = new ContinueUpdateRollbackCommand_1.ContinueUpdateRollbackCommand(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); + } + } + createChangeSet(args, optionsOrCb, cb) { + const command = new CreateChangeSetCommand_1.CreateChangeSetCommand(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); + } + } + createStack(args, optionsOrCb, cb) { + const command = new CreateStackCommand_1.CreateStackCommand(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); + } + } + createStackInstances(args, optionsOrCb, cb) { + const command = new CreateStackInstancesCommand_1.CreateStackInstancesCommand(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); + } + } + createStackSet(args, optionsOrCb, cb) { + const command = new CreateStackSetCommand_1.CreateStackSetCommand(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); + } + } + deleteChangeSet(args, optionsOrCb, cb) { + const command = new DeleteChangeSetCommand_1.DeleteChangeSetCommand(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); + } + } + deleteStack(args, optionsOrCb, cb) { + const command = new DeleteStackCommand_1.DeleteStackCommand(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); + } + } + deleteStackInstances(args, optionsOrCb, cb) { + const command = new DeleteStackInstancesCommand_1.DeleteStackInstancesCommand(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); + } + } + deleteStackSet(args, optionsOrCb, cb) { + const command = new DeleteStackSetCommand_1.DeleteStackSetCommand(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); + } + } + deregisterType(args, optionsOrCb, cb) { + const command = new DeregisterTypeCommand_1.DeregisterTypeCommand(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); + } + } + describeAccountLimits(args, optionsOrCb, cb) { + const command = new DescribeAccountLimitsCommand_1.DescribeAccountLimitsCommand(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); + } + } + describeChangeSet(args, optionsOrCb, cb) { + const command = new DescribeChangeSetCommand_1.DescribeChangeSetCommand(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); + } + } + describeStackDriftDetectionStatus(args, optionsOrCb, cb) { + const command = new DescribeStackDriftDetectionStatusCommand_1.DescribeStackDriftDetectionStatusCommand(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); + } + } + describeStackEvents(args, optionsOrCb, cb) { + const command = new DescribeStackEventsCommand_1.DescribeStackEventsCommand(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); + } + } + describeStackInstance(args, optionsOrCb, cb) { + const command = new DescribeStackInstanceCommand_1.DescribeStackInstanceCommand(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); + } + } + describeStackResource(args, optionsOrCb, cb) { + const command = new DescribeStackResourceCommand_1.DescribeStackResourceCommand(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); + } + } + describeStackResourceDrifts(args, optionsOrCb, cb) { + const command = new DescribeStackResourceDriftsCommand_1.DescribeStackResourceDriftsCommand(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); + } + } + describeStackResources(args, optionsOrCb, cb) { + const command = new DescribeStackResourcesCommand_1.DescribeStackResourcesCommand(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); + } + } + describeStacks(args, optionsOrCb, cb) { + const command = new DescribeStacksCommand_1.DescribeStacksCommand(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); + } + } + describeStackSet(args, optionsOrCb, cb) { + const command = new DescribeStackSetCommand_1.DescribeStackSetCommand(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); + } + } + describeStackSetOperation(args, optionsOrCb, cb) { + const command = new DescribeStackSetOperationCommand_1.DescribeStackSetOperationCommand(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); + } + } + describeType(args, optionsOrCb, cb) { + const command = new DescribeTypeCommand_1.DescribeTypeCommand(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); + } + } + describeTypeRegistration(args, optionsOrCb, cb) { + const command = new DescribeTypeRegistrationCommand_1.DescribeTypeRegistrationCommand(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); + } + } + detectStackDrift(args, optionsOrCb, cb) { + const command = new DetectStackDriftCommand_1.DetectStackDriftCommand(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); + } + } + detectStackResourceDrift(args, optionsOrCb, cb) { + const command = new DetectStackResourceDriftCommand_1.DetectStackResourceDriftCommand(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); + } + } + detectStackSetDrift(args, optionsOrCb, cb) { + const command = new DetectStackSetDriftCommand_1.DetectStackSetDriftCommand(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); + } + } + estimateTemplateCost(args, optionsOrCb, cb) { + const command = new EstimateTemplateCostCommand_1.EstimateTemplateCostCommand(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); + } + } + executeChangeSet(args, optionsOrCb, cb) { + const command = new ExecuteChangeSetCommand_1.ExecuteChangeSetCommand(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); + } + } + getStackPolicy(args, optionsOrCb, cb) { + const command = new GetStackPolicyCommand_1.GetStackPolicyCommand(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); + } + } + getTemplate(args, optionsOrCb, cb) { + const command = new GetTemplateCommand_1.GetTemplateCommand(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); + } + } + getTemplateSummary(args, optionsOrCb, cb) { + const command = new GetTemplateSummaryCommand_1.GetTemplateSummaryCommand(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); + } + } + listChangeSets(args, optionsOrCb, cb) { + const command = new ListChangeSetsCommand_1.ListChangeSetsCommand(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); + } + } + listExports(args, optionsOrCb, cb) { + const command = new ListExportsCommand_1.ListExportsCommand(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); + } + } + listImports(args, optionsOrCb, cb) { + const command = new ListImportsCommand_1.ListImportsCommand(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); + } + } + listStackInstances(args, optionsOrCb, cb) { + const command = new ListStackInstancesCommand_1.ListStackInstancesCommand(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); + } + } + listStackResources(args, optionsOrCb, cb) { + const command = new ListStackResourcesCommand_1.ListStackResourcesCommand(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); + } + } + listStacks(args, optionsOrCb, cb) { + const command = new ListStacksCommand_1.ListStacksCommand(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); + } + } + listStackSetOperationResults(args, optionsOrCb, cb) { + const command = new ListStackSetOperationResultsCommand_1.ListStackSetOperationResultsCommand(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); + } + } + listStackSetOperations(args, optionsOrCb, cb) { + const command = new ListStackSetOperationsCommand_1.ListStackSetOperationsCommand(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); + } + } + listStackSets(args, optionsOrCb, cb) { + const command = new ListStackSetsCommand_1.ListStackSetsCommand(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); + } + } + listTypeRegistrations(args, optionsOrCb, cb) { + const command = new ListTypeRegistrationsCommand_1.ListTypeRegistrationsCommand(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); + } + } + listTypes(args, optionsOrCb, cb) { + const command = new ListTypesCommand_1.ListTypesCommand(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); + } + } + listTypeVersions(args, optionsOrCb, cb) { + const command = new ListTypeVersionsCommand_1.ListTypeVersionsCommand(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); + } + } + recordHandlerProgress(args, optionsOrCb, cb) { + const command = new RecordHandlerProgressCommand_1.RecordHandlerProgressCommand(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); + } + } + registerType(args, optionsOrCb, cb) { + const command = new RegisterTypeCommand_1.RegisterTypeCommand(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); + } + } + setStackPolicy(args, optionsOrCb, cb) { + const command = new SetStackPolicyCommand_1.SetStackPolicyCommand(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); + } + } + setTypeDefaultVersion(args, optionsOrCb, cb) { + const command = new SetTypeDefaultVersionCommand_1.SetTypeDefaultVersionCommand(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); + } + } + signalResource(args, optionsOrCb, cb) { + const command = new SignalResourceCommand_1.SignalResourceCommand(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); + } + } + stopStackSetOperation(args, optionsOrCb, cb) { + const command = new StopStackSetOperationCommand_1.StopStackSetOperationCommand(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); + } + } + updateStack(args, optionsOrCb, cb) { + const command = new UpdateStackCommand_1.UpdateStackCommand(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); + } + } + updateStackInstances(args, optionsOrCb, cb) { + const command = new UpdateStackInstancesCommand_1.UpdateStackInstancesCommand(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); + } + } + updateStackSet(args, optionsOrCb, cb) { + const command = new UpdateStackSetCommand_1.UpdateStackSetCommand(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); + } + } + updateTerminationProtection(args, optionsOrCb, cb) { + const command = new UpdateTerminationProtectionCommand_1.UpdateTerminationProtectionCommand(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); + } + } + validateTemplate(args, optionsOrCb, cb) { + const command = new ValidateTemplateCommand_1.ValidateTemplateCommand(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.CloudFormation = CloudFormation; +//# sourceMappingURL=CloudFormation.js.map + +/***/ }), + +/***/ 25838: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CloudFormationClient = void 0; +const runtimeConfig_1 = __nccwpck_require__(64170); +const config_resolver_1 = __nccwpck_require__(87229); +const middleware_content_length_1 = __nccwpck_require__(69323); +const middleware_host_header_1 = __nccwpck_require__(58645); +const middleware_logger_1 = __nccwpck_require__(98685); +const middleware_retry_1 = __nccwpck_require__(7000); +const middleware_signing_1 = __nccwpck_require__(82487); +const middleware_user_agent_1 = __nccwpck_require__(55976); +const smithy_client_1 = __nccwpck_require__(84060); +/** + * AWS CloudFormation + *

AWS CloudFormation allows you to create and manage AWS infrastructure deployments + * predictably and repeatedly. You can use AWS CloudFormation to leverage AWS products, such + * as Amazon Elastic Compute Cloud, Amazon Elastic Block Store, Amazon Simple Notification + * Service, Elastic Load Balancing, and Auto Scaling to build highly-reliable, highly + * scalable, cost-effective applications without creating or configuring the underlying AWS + * infrastructure.

+ *

With AWS CloudFormation, you declare all of your resources and dependencies in a + * template file. The template defines a collection of resources as a single unit called a + * stack. AWS CloudFormation creates and deletes all member resources of the stack together + * and manages all dependencies between the resources for you.

+ *

For more information about AWS CloudFormation, see the AWS CloudFormation Product Page.

+ *

Amazon CloudFormation makes use of other AWS products. If you need additional + * technical information about a specific AWS product, you can find the product's technical + * documentation at docs.aws.amazon.com.

+ */ +class CloudFormationClient extends smithy_client_1.Client { + constructor(configuration) { + let _config_0 = { + ...runtimeConfig_1.ClientDefaultValues, + ...configuration, + }; + let _config_1 = config_resolver_1.resolveRegionConfig(_config_0); + let _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1); + let _config_3 = middleware_signing_1.resolveAwsAuthConfig(_config_2); + let _config_4 = middleware_retry_1.resolveRetryConfig(_config_3); + let _config_5 = middleware_host_header_1.resolveHostHeaderConfig(_config_4); + let _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(this.config)); + 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.CloudFormationClient = CloudFormationClient; +//# sourceMappingURL=CloudFormationClient.js.map + +/***/ }), + +/***/ 78006: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CancelUpdateStackCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Cancels an update on the specified stack. If the call completes successfully, the + * stack rolls back the update and reverts to the previous stack configuration.

+ * + *

You can cancel only stacks that are in the UPDATE_IN_PROGRESS state.

+ *
+ */ +class CancelUpdateStackCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "CancelUpdateStackCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CancelUpdateStackInput.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryCancelUpdateStackCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryCancelUpdateStackCommand(output, context); + } +} +exports.CancelUpdateStackCommand = CancelUpdateStackCommand; +//# sourceMappingURL=CancelUpdateStackCommand.js.map + +/***/ }), + +/***/ 31828: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ContinueUpdateRollbackCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

For a specified stack that is in the UPDATE_ROLLBACK_FAILED state, + * continues rolling it back to the UPDATE_ROLLBACK_COMPLETE state. Depending on + * the cause of the failure, you can manually fix the error and continue the rollback. By continuing the rollback, you can + * return your stack to a working state (the UPDATE_ROLLBACK_COMPLETE state), and + * then try to update the stack again.

+ *

A stack goes into the UPDATE_ROLLBACK_FAILED state when AWS + * CloudFormation cannot roll back all changes after a failed stack update. For example, you + * might have a stack that is rolling back to an old database instance that was deleted + * outside of AWS CloudFormation. Because AWS CloudFormation doesn't know the database was + * deleted, it assumes that the database instance still exists and attempts to roll back to + * it, causing the update rollback to fail.

+ */ +class ContinueUpdateRollbackCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ContinueUpdateRollbackCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ContinueUpdateRollbackInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ContinueUpdateRollbackOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryContinueUpdateRollbackCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryContinueUpdateRollbackCommand(output, context); + } +} +exports.ContinueUpdateRollbackCommand = ContinueUpdateRollbackCommand; +//# sourceMappingURL=ContinueUpdateRollbackCommand.js.map + +/***/ }), + +/***/ 87501: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateChangeSetCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a list of changes that will be applied to a stack so that you can review the + * changes before executing them. You can create a change set for a stack that doesn't exist + * or an existing stack. If you create a change set for a stack that doesn't exist, the change + * set shows all of the resources that AWS CloudFormation will create. If you create a change + * set for an existing stack, AWS CloudFormation compares the stack's information with the + * information that you submit in the change set and lists the differences. Use change sets to + * understand which resources AWS CloudFormation will create or change, and how it will change + * resources in an existing stack, before you create or update a stack.

+ *

To create a change set for a stack that doesn't exist, for the + * ChangeSetType parameter, specify CREATE. To create a change + * set for an existing stack, specify UPDATE for the ChangeSetType + * parameter. To create a change set for an import operation, specify IMPORT for + * the ChangeSetType parameter. After the CreateChangeSet call + * successfully completes, AWS CloudFormation starts creating the change set. To check the + * status of the change set or to review it, use the DescribeChangeSet + * action.

+ *

When you are satisfied with the changes the change set will make, execute the change + * set by using the ExecuteChangeSet action. AWS CloudFormation doesn't make + * changes until you execute the change set.

+ *

To create a change set for the entire stack hierachy, set + * IncludeNestedStacks to True.

+ */ +class CreateChangeSetCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "CreateChangeSetCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateChangeSetInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateChangeSetOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryCreateChangeSetCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryCreateChangeSetCommand(output, context); + } +} +exports.CreateChangeSetCommand = CreateChangeSetCommand; +//# sourceMappingURL=CreateChangeSetCommand.js.map + +/***/ }), + +/***/ 42935: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateStackCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a stack as specified in the template. After the call completes successfully, + * the stack creation starts. You can check the status of the stack via the DescribeStacks API.

+ */ +class CreateStackCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "CreateStackCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateStackInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateStackOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryCreateStackCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryCreateStackCommand(output, context); + } +} +exports.CreateStackCommand = CreateStackCommand; +//# sourceMappingURL=CreateStackCommand.js.map + +/***/ }), + +/***/ 53977: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateStackInstancesCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates stack instances for the specified accounts, within the specified Regions. A + * stack instance refers to a stack in a specific account and Region. You must specify at least one value for either Accounts or DeploymentTargets, and you must specify at least one value for Regions.

+ */ +class CreateStackInstancesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "CreateStackInstancesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateStackInstancesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateStackInstancesOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryCreateStackInstancesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryCreateStackInstancesCommand(output, context); + } +} +exports.CreateStackInstancesCommand = CreateStackInstancesCommand; +//# sourceMappingURL=CreateStackInstancesCommand.js.map + +/***/ }), + +/***/ 94602: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateStackSetCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a stack set.

+ */ +class CreateStackSetCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "CreateStackSetCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateStackSetInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateStackSetOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryCreateStackSetCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryCreateStackSetCommand(output, context); + } +} +exports.CreateStackSetCommand = CreateStackSetCommand; +//# sourceMappingURL=CreateStackSetCommand.js.map + +/***/ }), + +/***/ 8147: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteChangeSetCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the specified change set. Deleting change sets ensures that no one executes + * the wrong change set.

+ *

If the call successfully completes, AWS CloudFormation successfully deleted the + * change set.

+ *

If IncludeNestedStacks specifies True during the creation of + * the nested change set, then DeleteChangeSet will delete all change sets that belong to the stacks hierarchy and + * will also delete all change sets for nested stacks with the status of REVIEW_IN_PROGRESS.

+ */ +class DeleteChangeSetCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DeleteChangeSetCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteChangeSetInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteChangeSetOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDeleteChangeSetCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDeleteChangeSetCommand(output, context); + } +} +exports.DeleteChangeSetCommand = DeleteChangeSetCommand; +//# sourceMappingURL=DeleteChangeSetCommand.js.map + +/***/ }), + +/***/ 93619: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteStackCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a specified stack. Once the call completes successfully, stack deletion + * starts. Deleted stacks do not show up in the DescribeStacks API if the + * deletion has been completed successfully.

+ */ +class DeleteStackCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DeleteStackCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteStackInput.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDeleteStackCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDeleteStackCommand(output, context); + } +} +exports.DeleteStackCommand = DeleteStackCommand; +//# sourceMappingURL=DeleteStackCommand.js.map + +/***/ }), + +/***/ 96629: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteStackInstancesCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes stack instances for the specified accounts, in the specified Regions.

+ */ +class DeleteStackInstancesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DeleteStackInstancesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteStackInstancesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteStackInstancesOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDeleteStackInstancesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDeleteStackInstancesCommand(output, context); + } +} +exports.DeleteStackInstancesCommand = DeleteStackInstancesCommand; +//# sourceMappingURL=DeleteStackInstancesCommand.js.map + +/***/ }), + +/***/ 67548: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteStackSetCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a stack set. Before you can delete a stack set, all of its member stack + * instances must be deleted. For more information about how to do this, see DeleteStackInstances.

+ */ +class DeleteStackSetCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DeleteStackSetCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteStackSetInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteStackSetOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDeleteStackSetCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDeleteStackSetCommand(output, context); + } +} +exports.DeleteStackSetCommand = DeleteStackSetCommand; +//# sourceMappingURL=DeleteStackSetCommand.js.map + +/***/ }), + +/***/ 38218: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeregisterTypeCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Removes a type or type version from active use in the CloudFormation registry. If a type or type version is deregistered, it cannot be used in CloudFormation operations.

+ *

To deregister a type, you must individually deregister all registered versions of that type. If a type has only a single registered version, deregistering that version results in the type itself being deregistered.

+ *

You cannot deregister the default version of a type, unless it is the only registered version of that type, in which case the type itself is deregistered as well.

+ */ +class DeregisterTypeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DeregisterTypeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeregisterTypeInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeregisterTypeOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDeregisterTypeCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDeregisterTypeCommand(output, context); + } +} +exports.DeregisterTypeCommand = DeregisterTypeCommand; +//# sourceMappingURL=DeregisterTypeCommand.js.map + +/***/ }), + +/***/ 67719: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeAccountLimitsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Retrieves your account's AWS CloudFormation limits, such as the maximum number of + * stacks that you can create in your account. For more information about account limits, see + * AWS CloudFormation + * Limits in the AWS CloudFormation User Guide.

+ */ +class DescribeAccountLimitsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeAccountLimitsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeAccountLimitsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeAccountLimitsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeAccountLimitsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeAccountLimitsCommand(output, context); + } +} +exports.DescribeAccountLimitsCommand = DescribeAccountLimitsCommand; +//# sourceMappingURL=DescribeAccountLimitsCommand.js.map + +/***/ }), + +/***/ 433: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeChangeSetCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the inputs for the change set and a list of changes that AWS CloudFormation + * will make if you execute the change set. For more information, see Updating Stacks Using Change Sets in the AWS CloudFormation User + * Guide.

+ */ +class DescribeChangeSetCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeChangeSetCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeChangeSetInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeChangeSetOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeChangeSetCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeChangeSetCommand(output, context); + } +} +exports.DescribeChangeSetCommand = DescribeChangeSetCommand; +//# sourceMappingURL=DescribeChangeSetCommand.js.map + +/***/ }), + +/***/ 30462: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeStackDriftDetectionStatusCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns information about a stack drift detection operation. A stack drift detection + * operation detects whether a stack's actual configuration differs, or has + * drifted, from it's expected configuration, as defined in the stack + * template and any values specified as template parameters. A stack is considered to have + * drifted if one or more of its resources have drifted. For more information on stack and + * resource drift, see Detecting + * Unregulated Configuration Changes to Stacks and Resources.

+ *

Use DetectStackDrift to initiate a stack drift detection operation. + * DetectStackDrift returns a StackDriftDetectionId you can use + * to monitor the progress of the operation using + * DescribeStackDriftDetectionStatus. Once the drift detection operation has + * completed, use DescribeStackResourceDrifts to return drift information + * about the stack and its resources.

+ */ +class DescribeStackDriftDetectionStatusCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeStackDriftDetectionStatusCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeStackDriftDetectionStatusInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeStackDriftDetectionStatusOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeStackDriftDetectionStatusCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeStackDriftDetectionStatusCommand(output, context); + } +} +exports.DescribeStackDriftDetectionStatusCommand = DescribeStackDriftDetectionStatusCommand; +//# sourceMappingURL=DescribeStackDriftDetectionStatusCommand.js.map + +/***/ }), + +/***/ 99902: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeStackEventsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns all stack related events for a specified stack in reverse chronological + * order. For more information about a stack's event history, go to Stacks in the AWS CloudFormation User Guide.

+ * + *

You can list events for stacks that have failed to create or have been deleted by + * specifying the unique stack identifier (stack ID).

+ *
+ */ +class DescribeStackEventsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeStackEventsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeStackEventsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeStackEventsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeStackEventsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeStackEventsCommand(output, context); + } +} +exports.DescribeStackEventsCommand = DescribeStackEventsCommand; +//# sourceMappingURL=DescribeStackEventsCommand.js.map + +/***/ }), + +/***/ 95705: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeStackInstanceCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the stack instance that's associated with the specified stack set, AWS + * account, and Region.

+ *

For a list of stack instances that are associated with a specific stack set, use + * ListStackInstances.

+ */ +class DescribeStackInstanceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeStackInstanceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeStackInstanceInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeStackInstanceOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeStackInstanceCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeStackInstanceCommand(output, context); + } +} +exports.DescribeStackInstanceCommand = DescribeStackInstanceCommand; +//# sourceMappingURL=DescribeStackInstanceCommand.js.map + +/***/ }), + +/***/ 15305: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeStackResourceCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a description of the specified resource in the specified stack.

+ *

For deleted stacks, DescribeStackResource returns resource information for up to 90 + * days after the stack has been deleted.

+ */ +class DescribeStackResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeStackResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeStackResourceInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeStackResourceOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeStackResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeStackResourceCommand(output, context); + } +} +exports.DescribeStackResourceCommand = DescribeStackResourceCommand; +//# sourceMappingURL=DescribeStackResourceCommand.js.map + +/***/ }), + +/***/ 25794: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeStackResourceDriftsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns drift information for the resources that have been checked for drift in the + * specified stack. This includes actual and expected configuration values for resources where + * AWS CloudFormation detects configuration drift.

+ *

For a given stack, there will be one StackResourceDrift for each stack + * resource that has been checked for drift. Resources that have not yet been checked for + * drift are not included. Resources that do not currently support drift detection are not + * checked, and so not included. For a list of resources that support drift detection, see + * Resources that Support Drift Detection.

+ *

Use DetectStackResourceDrift to detect drift on individual + * resources, or DetectStackDrift to detect drift on all supported resources + * for a given stack.

+ */ +class DescribeStackResourceDriftsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeStackResourceDriftsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeStackResourceDriftsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeStackResourceDriftsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeStackResourceDriftsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeStackResourceDriftsCommand(output, context); + } +} +exports.DescribeStackResourceDriftsCommand = DescribeStackResourceDriftsCommand; +//# sourceMappingURL=DescribeStackResourceDriftsCommand.js.map + +/***/ }), + +/***/ 28792: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeStackResourcesCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns AWS resource descriptions for running and deleted stacks. If + * StackName is specified, all the associated resources that are part of the + * stack are returned. If PhysicalResourceId is specified, the associated + * resources of the stack that the resource belongs to are returned.

+ * + *

Only the first 100 resources will be returned. If your stack has more resources + * than this, you should use ListStackResources instead.

+ *
+ *

For deleted stacks, DescribeStackResources returns resource information + * for up to 90 days after the stack has been deleted.

+ *

You must specify either StackName or PhysicalResourceId, + * but not both. In addition, you can specify LogicalResourceId to filter the + * returned result. For more information about resources, the LogicalResourceId + * and PhysicalResourceId, go to the AWS CloudFormation User + * Guide.

+ * + *

A ValidationError is returned if you specify both + * StackName and PhysicalResourceId in the same + * request.

+ *
+ */ +class DescribeStackResourcesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeStackResourcesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeStackResourcesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeStackResourcesOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeStackResourcesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeStackResourcesCommand(output, context); + } +} +exports.DescribeStackResourcesCommand = DescribeStackResourcesCommand; +//# sourceMappingURL=DescribeStackResourcesCommand.js.map + +/***/ }), + +/***/ 18050: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeStackSetCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the description of the specified stack set.

+ */ +class DescribeStackSetCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeStackSetCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeStackSetInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeStackSetOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeStackSetCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeStackSetCommand(output, context); + } +} +exports.DescribeStackSetCommand = DescribeStackSetCommand; +//# sourceMappingURL=DescribeStackSetCommand.js.map + +/***/ }), + +/***/ 12422: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeStackSetOperationCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the description of the specified stack set operation.

+ */ +class DescribeStackSetOperationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeStackSetOperationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeStackSetOperationInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeStackSetOperationOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeStackSetOperationCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeStackSetOperationCommand(output, context); + } +} +exports.DescribeStackSetOperationCommand = DescribeStackSetOperationCommand; +//# sourceMappingURL=DescribeStackSetOperationCommand.js.map + +/***/ }), + +/***/ 87840: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeStacksCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the description for the specified stack; if no stack name was specified, then + * it returns the description for all the stacks created.

+ * + *

If the stack does not exist, an AmazonCloudFormationException is + * returned.

+ *
+ */ +class DescribeStacksCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeStacksCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeStacksInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeStacksOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeStacksCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeStacksCommand(output, context); + } +} +exports.DescribeStacksCommand = DescribeStacksCommand; +//# sourceMappingURL=DescribeStacksCommand.js.map + +/***/ }), + +/***/ 41499: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeTypeCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns detailed information about a type that has been registered.

+ *

If you specify a VersionId, DescribeType returns information about that specific type version. Otherwise, it returns information about the default type version.

+ */ +class DescribeTypeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeTypeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeTypeInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeTypeOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeTypeCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeTypeCommand(output, context); + } +} +exports.DescribeTypeCommand = DescribeTypeCommand; +//# sourceMappingURL=DescribeTypeCommand.js.map + +/***/ }), + +/***/ 39500: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeTypeRegistrationCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns information about a type's registration, including its current status and type and version identifiers.

+ *

When you initiate a registration request using + * RegisterType + * , you can then use + * DescribeTypeRegistration + * to monitor the progress of that registration request.

+ *

Once the registration request has completed, use + * DescribeType + * to return detailed informaiton about a type.

+ */ +class DescribeTypeRegistrationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DescribeTypeRegistrationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeTypeRegistrationInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeTypeRegistrationOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDescribeTypeRegistrationCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDescribeTypeRegistrationCommand(output, context); + } +} +exports.DescribeTypeRegistrationCommand = DescribeTypeRegistrationCommand; +//# sourceMappingURL=DescribeTypeRegistrationCommand.js.map + +/***/ }), + +/***/ 78948: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DetectStackDriftCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Detects whether a stack's actual configuration differs, or has + * drifted, from it's expected configuration, as defined in the stack + * template and any values specified as template parameters. For each resource in the stack + * that supports drift detection, AWS CloudFormation compares the actual configuration of the resource with + * its expected template configuration. Only resource properties explicitly defined in the + * stack template are checked for drift. A stack is considered to have drifted if one or more + * of its resources differ from their expected template configurations. For more information, + * see Detecting + * Unregulated Configuration Changes to Stacks and Resources.

+ *

Use DetectStackDrift to detect drift on all supported resources for a + * given stack, or DetectStackResourceDrift to detect drift on individual + * resources.

+ *

For a list of stack resources that currently support drift detection, see Resources that Support Drift Detection.

+ *

+ * DetectStackDrift can take up to several minutes, depending on the number + * of resources contained within the stack. Use DescribeStackDriftDetectionStatus to monitor the progress of a detect stack + * drift operation. Once the drift detection operation has completed, use DescribeStackResourceDrifts to return drift information about the stack and + * its resources.

+ *

When detecting drift on a stack, AWS CloudFormation does not detect drift on any nested stacks + * belonging to that stack. Perform DetectStackDrift directly on the nested stack + * itself.

+ */ +class DetectStackDriftCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DetectStackDriftCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DetectStackDriftInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DetectStackDriftOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDetectStackDriftCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDetectStackDriftCommand(output, context); + } +} +exports.DetectStackDriftCommand = DetectStackDriftCommand; +//# sourceMappingURL=DetectStackDriftCommand.js.map + +/***/ }), + +/***/ 46403: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DetectStackResourceDriftCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns information about whether a resource's actual configuration differs, or has + * drifted, from it's expected configuration, as defined in the stack + * template and any values specified as template parameters. This information includes actual + * and expected property values for resources in which AWS CloudFormation detects drift. Only resource + * properties explicitly defined in the stack template are checked for drift. For more + * information about stack and resource drift, see Detecting + * Unregulated Configuration Changes to Stacks and Resources.

+ *

Use DetectStackResourceDrift to detect drift on individual resources, or + * DetectStackDrift to detect drift on all resources in a given stack + * that support drift detection.

+ *

Resources that do not currently support drift detection cannot be checked. For a list + * of resources that support drift detection, see Resources that Support Drift Detection.

+ */ +class DetectStackResourceDriftCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DetectStackResourceDriftCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DetectStackResourceDriftInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DetectStackResourceDriftOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDetectStackResourceDriftCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDetectStackResourceDriftCommand(output, context); + } +} +exports.DetectStackResourceDriftCommand = DetectStackResourceDriftCommand; +//# sourceMappingURL=DetectStackResourceDriftCommand.js.map + +/***/ }), + +/***/ 19450: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DetectStackSetDriftCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Detect drift on a stack set. When CloudFormation performs drift detection on a stack + * set, it performs drift detection on the stack associated with each stack instance in the + * stack set. For more information, see How CloudFormation + * Performs Drift Detection on a Stack Set.

+ *

+ * DetectStackSetDrift returns the OperationId of the stack set + * drift detection operation. Use this operation id with + * DescribeStackSetOperation + * to monitor the progress of the drift + * detection operation. The drift detection operation may take some time, depending on the + * number of stack instances included in the stack set, as well as the number of resources + * included in each stack.

+ *

Once the operation has completed, use the following actions to return drift + * information:

+ * + *

For more information on performing a drift detection operation on a stack set, see + * Detecting Unmanaged + * Changes in Stack Sets.

+ *

You can only run a single drift detection operation on a given stack set at one time.

+ *

To stop a drift detection stack set operation, use + * StopStackSetOperation + * .

+ */ +class DetectStackSetDriftCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "DetectStackSetDriftCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DetectStackSetDriftInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DetectStackSetDriftOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDetectStackSetDriftCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDetectStackSetDriftCommand(output, context); + } +} +exports.DetectStackSetDriftCommand = DetectStackSetDriftCommand; +//# sourceMappingURL=DetectStackSetDriftCommand.js.map + +/***/ }), + +/***/ 11152: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EstimateTemplateCostCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the estimated monthly cost of a template. The return value is an AWS Simple + * Monthly Calculator URL with a query string that describes the resources required to run the + * template.

+ */ +class EstimateTemplateCostCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "EstimateTemplateCostCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.EstimateTemplateCostInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.EstimateTemplateCostOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryEstimateTemplateCostCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryEstimateTemplateCostCommand(output, context); + } +} +exports.EstimateTemplateCostCommand = EstimateTemplateCostCommand; +//# sourceMappingURL=EstimateTemplateCostCommand.js.map + +/***/ }), + +/***/ 73188: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExecuteChangeSetCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates a stack using the input information that was provided when the specified + * change set was created. After the call successfully completes, AWS CloudFormation starts + * updating the stack. Use the DescribeStacks action to view the status of + * the update.

+ *

When you execute a change set, AWS CloudFormation deletes all other change sets + * associated with the stack because they aren't valid for the updated stack.

+ *

If a stack policy is associated with the stack, AWS CloudFormation enforces the + * policy during the update. You can't specify a temporary stack policy that overrides the + * current policy.

+ *

To create a change set for the entire stack hierachy, IncludeNestedStacks + * must have been set to True.

+ */ +class ExecuteChangeSetCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ExecuteChangeSetCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ExecuteChangeSetInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ExecuteChangeSetOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryExecuteChangeSetCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryExecuteChangeSetCommand(output, context); + } +} +exports.ExecuteChangeSetCommand = ExecuteChangeSetCommand; +//# sourceMappingURL=ExecuteChangeSetCommand.js.map + +/***/ }), + +/***/ 4482: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetStackPolicyCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the stack policy for a specified stack. If a stack doesn't have a policy, a + * null value is returned.

+ */ +class GetStackPolicyCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "GetStackPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetStackPolicyInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetStackPolicyOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryGetStackPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryGetStackPolicyCommand(output, context); + } +} +exports.GetStackPolicyCommand = GetStackPolicyCommand; +//# sourceMappingURL=GetStackPolicyCommand.js.map + +/***/ }), + +/***/ 99836: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetTemplateCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the template body for a specified stack. You can get the template for running + * or deleted stacks.

+ *

For deleted stacks, GetTemplate returns the template for up to 90 days after the + * stack has been deleted.

+ * + *

If the template does not exist, a ValidationError is returned. + *

+ *
+ */ +class GetTemplateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "GetTemplateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetTemplateInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetTemplateOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryGetTemplateCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryGetTemplateCommand(output, context); + } +} +exports.GetTemplateCommand = GetTemplateCommand; +//# sourceMappingURL=GetTemplateCommand.js.map + +/***/ }), + +/***/ 59396: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetTemplateSummaryCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns information about a new or existing template. The + * GetTemplateSummary action is useful for viewing parameter information, such + * as default parameter values and parameter types, before you create or update a stack or + * stack set.

+ *

You can use the GetTemplateSummary action when you submit a template, or + * you can get template information for a stack set, or a running or deleted stack.

+ *

For deleted stacks, GetTemplateSummary returns the template information + * for up to 90 days after the stack has been deleted. If the template does not exist, a + * ValidationError is returned.

+ */ +class GetTemplateSummaryCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "GetTemplateSummaryCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetTemplateSummaryInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetTemplateSummaryOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryGetTemplateSummaryCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryGetTemplateSummaryCommand(output, context); + } +} +exports.GetTemplateSummaryCommand = GetTemplateSummaryCommand; +//# sourceMappingURL=GetTemplateSummaryCommand.js.map + +/***/ }), + +/***/ 99706: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListChangeSetsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the ID and status of each active change set for a stack. For example, AWS + * CloudFormation lists change sets that are in the CREATE_IN_PROGRESS or + * CREATE_PENDING state.

+ */ +class ListChangeSetsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListChangeSetsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListChangeSetsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListChangeSetsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListChangeSetsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListChangeSetsCommand(output, context); + } +} +exports.ListChangeSetsCommand = ListChangeSetsCommand; +//# sourceMappingURL=ListChangeSetsCommand.js.map + +/***/ }), + +/***/ 60351: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListExportsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists all exported output values in the account and Region in which you call this + * action. Use this action to see the exported output values that you can import into other + * stacks. To import values, use the + * Fn::ImportValue + * function.

+ *

For more information, see AWS + * CloudFormation Export Stack Output Values.

+ */ +class ListExportsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListExportsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListExportsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListExportsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListExportsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListExportsCommand(output, context); + } +} +exports.ListExportsCommand = ListExportsCommand; +//# sourceMappingURL=ListExportsCommand.js.map + +/***/ }), + +/***/ 72171: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListImportsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists all stacks that are importing an exported output value. To modify or remove an + * exported output value, first use this action to see which stacks are using it. To see the + * exported output values in your account, see ListExports.

+ *

For more information about importing an exported output value, see the + * Fn::ImportValue + * function.

+ */ +class ListImportsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListImportsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListImportsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListImportsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListImportsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListImportsCommand(output, context); + } +} +exports.ListImportsCommand = ListImportsCommand; +//# sourceMappingURL=ListImportsCommand.js.map + +/***/ }), + +/***/ 50991: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListStackInstancesCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns summary information about stack instances that are associated with the + * specified stack set. You can filter for stack instances that are associated with a specific + * AWS account name or Region, or that have a specific status.

+ */ +class ListStackInstancesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListStackInstancesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListStackInstancesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListStackInstancesOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListStackInstancesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListStackInstancesCommand(output, context); + } +} +exports.ListStackInstancesCommand = ListStackInstancesCommand; +//# sourceMappingURL=ListStackInstancesCommand.js.map + +/***/ }), + +/***/ 83057: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListStackResourcesCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns descriptions of all resources of the specified stack.

+ *

For deleted stacks, ListStackResources returns resource information for up to 90 days + * after the stack has been deleted.

+ */ +class ListStackResourcesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListStackResourcesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListStackResourcesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListStackResourcesOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListStackResourcesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListStackResourcesCommand(output, context); + } +} +exports.ListStackResourcesCommand = ListStackResourcesCommand; +//# sourceMappingURL=ListStackResourcesCommand.js.map + +/***/ }), + +/***/ 71155: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListStackSetOperationResultsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns summary information about the results of a stack set operation.

+ */ +class ListStackSetOperationResultsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListStackSetOperationResultsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListStackSetOperationResultsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListStackSetOperationResultsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListStackSetOperationResultsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListStackSetOperationResultsCommand(output, context); + } +} +exports.ListStackSetOperationResultsCommand = ListStackSetOperationResultsCommand; +//# sourceMappingURL=ListStackSetOperationResultsCommand.js.map + +/***/ }), + +/***/ 62539: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListStackSetOperationsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns summary information about operations performed on a stack set.

+ */ +class ListStackSetOperationsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListStackSetOperationsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListStackSetOperationsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListStackSetOperationsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListStackSetOperationsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListStackSetOperationsCommand(output, context); + } +} +exports.ListStackSetOperationsCommand = ListStackSetOperationsCommand; +//# sourceMappingURL=ListStackSetOperationsCommand.js.map + +/***/ }), + +/***/ 40722: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListStackSetsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns summary information about stack sets that are associated with the + * user.

+ */ +class ListStackSetsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListStackSetsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListStackSetsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListStackSetsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListStackSetsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListStackSetsCommand(output, context); + } +} +exports.ListStackSetsCommand = ListStackSetsCommand; +//# sourceMappingURL=ListStackSetsCommand.js.map + +/***/ }), + +/***/ 54482: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListStacksCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the summary information for stacks whose status matches the specified + * StackStatusFilter. Summary information for stacks that have been deleted is kept for 90 + * days after the stack is deleted. If no StackStatusFilter is specified, summary information + * for all stacks is returned (including existing stacks and stacks that have been + * deleted).

+ */ +class ListStacksCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListStacksCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListStacksInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListStacksOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListStacksCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListStacksCommand(output, context); + } +} +exports.ListStacksCommand = ListStacksCommand; +//# sourceMappingURL=ListStacksCommand.js.map + +/***/ }), + +/***/ 34567: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTypeRegistrationsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a list of registration tokens for the specified type(s).

+ */ +class ListTypeRegistrationsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListTypeRegistrationsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListTypeRegistrationsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListTypeRegistrationsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListTypeRegistrationsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListTypeRegistrationsCommand(output, context); + } +} +exports.ListTypeRegistrationsCommand = ListTypeRegistrationsCommand; +//# sourceMappingURL=ListTypeRegistrationsCommand.js.map + +/***/ }), + +/***/ 72174: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTypeVersionsCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns summary information about the versions of a type.

+ */ +class ListTypeVersionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListTypeVersionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListTypeVersionsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListTypeVersionsOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListTypeVersionsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListTypeVersionsCommand(output, context); + } +} +exports.ListTypeVersionsCommand = ListTypeVersionsCommand; +//# sourceMappingURL=ListTypeVersionsCommand.js.map + +/***/ }), + +/***/ 5511: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTypesCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns summary information about types that have been registered with CloudFormation.

+ */ +class ListTypesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ListTypesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListTypesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListTypesOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListTypesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListTypesCommand(output, context); + } +} +exports.ListTypesCommand = ListTypesCommand; +//# sourceMappingURL=ListTypesCommand.js.map + +/***/ }), + +/***/ 57237: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RecordHandlerProgressCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Reports progress of a resource handler to CloudFormation.

+ *

Reserved for use by the CloudFormation CLI. Do not use this API in your code.

+ */ +class RecordHandlerProgressCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "RecordHandlerProgressCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.RecordHandlerProgressInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.RecordHandlerProgressOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryRecordHandlerProgressCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryRecordHandlerProgressCommand(output, context); + } +} +exports.RecordHandlerProgressCommand = RecordHandlerProgressCommand; +//# sourceMappingURL=RecordHandlerProgressCommand.js.map + +/***/ }), + +/***/ 19011: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RegisterTypeCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Registers a type with the CloudFormation service. Registering a type makes it available for use in CloudFormation templates in your AWS account, and includes:

+ * + *

For more information on how to develop types and ready them for registeration, see Creating Resource Providers in the CloudFormation CLI User Guide.

+ *

You can have a maximum of 50 resource type versions registered at a time. This maximum is per account and per region. Use DeregisterType to deregister specific resource type versions if necessary.

+ *

Once you have initiated a registration request using + * RegisterType + * , you can use + * DescribeTypeRegistration + * to monitor the progress of the registration request.

+ */ +class RegisterTypeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "RegisterTypeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.RegisterTypeInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.RegisterTypeOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryRegisterTypeCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryRegisterTypeCommand(output, context); + } +} +exports.RegisterTypeCommand = RegisterTypeCommand; +//# sourceMappingURL=RegisterTypeCommand.js.map + +/***/ }), + +/***/ 91272: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetStackPolicyCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets a stack policy for a specified stack.

+ */ +class SetStackPolicyCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "SetStackPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetStackPolicyInput.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_querySetStackPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_querySetStackPolicyCommand(output, context); + } +} +exports.SetStackPolicyCommand = SetStackPolicyCommand; +//# sourceMappingURL=SetStackPolicyCommand.js.map + +/***/ }), + +/***/ 34356: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetTypeDefaultVersionCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Specify the default version of a type. The default version of a type will be used in CloudFormation operations.

+ */ +class SetTypeDefaultVersionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "SetTypeDefaultVersionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetTypeDefaultVersionInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SetTypeDefaultVersionOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_querySetTypeDefaultVersionCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_querySetTypeDefaultVersionCommand(output, context); + } +} +exports.SetTypeDefaultVersionCommand = SetTypeDefaultVersionCommand; +//# sourceMappingURL=SetTypeDefaultVersionCommand.js.map + +/***/ }), + +/***/ 80854: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SignalResourceCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sends a signal to the specified resource with a success or failure status. You can + * use the SignalResource API in conjunction with a creation policy or update policy. AWS + * CloudFormation doesn't proceed with a stack creation or update until resources receive the + * required number of signals or the timeout period is exceeded. The SignalResource API is + * useful in cases where you want to send signals from anywhere other than an Amazon EC2 + * instance.

+ */ +class SignalResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "SignalResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SignalResourceInput.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_querySignalResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_querySignalResourceCommand(output, context); + } +} +exports.SignalResourceCommand = SignalResourceCommand; +//# sourceMappingURL=SignalResourceCommand.js.map + +/***/ }), + +/***/ 44275: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StopStackSetOperationCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Stops an in-progress operation on a stack set and its associated stack instances.

+ */ +class StopStackSetOperationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "StopStackSetOperationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.StopStackSetOperationInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.StopStackSetOperationOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryStopStackSetOperationCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryStopStackSetOperationCommand(output, context); + } +} +exports.StopStackSetOperationCommand = StopStackSetOperationCommand; +//# sourceMappingURL=StopStackSetOperationCommand.js.map + +/***/ }), + +/***/ 50944: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateStackCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates a stack as specified in the template. After the call completes successfully, + * the stack update starts. You can check the status of the stack via the DescribeStacks action.

+ *

To get a copy of the template for an existing stack, you can use the GetTemplate action.

+ *

For more information about creating an update template, updating a stack, and + * monitoring the progress of the update, see Updating a + * Stack.

+ */ +class UpdateStackCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "UpdateStackCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UpdateStackInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.UpdateStackOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryUpdateStackCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryUpdateStackCommand(output, context); + } +} +exports.UpdateStackCommand = UpdateStackCommand; +//# sourceMappingURL=UpdateStackCommand.js.map + +/***/ }), + +/***/ 54289: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateStackInstancesCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the parameter values for stack instances for the specified accounts, within + * the specified Regions. A stack instance refers to a stack in a specific account and Region.

+ *

You can only update stack instances in Regions and accounts where they already exist; + * to create additional stack instances, use CreateStackInstances.

+ *

During stack set updates, any parameters overridden for a stack instance are not + * updated, but retain their overridden value.

+ *

You can only update the parameter values that are specified in + * the stack set; to add or delete a parameter itself, use UpdateStackSet to update the stack set template. If you add a parameter to a + * template, before you can override the parameter value specified in the stack set you must + * first use UpdateStackSet to update all stack instances with the updated template and + * parameter value specified in the stack set. Once a stack instance has been updated with the + * new parameter, you can then override the parameter value using + * UpdateStackInstances.

+ */ +class UpdateStackInstancesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "UpdateStackInstancesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UpdateStackInstancesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.UpdateStackInstancesOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryUpdateStackInstancesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryUpdateStackInstancesCommand(output, context); + } +} +exports.UpdateStackInstancesCommand = UpdateStackInstancesCommand; +//# sourceMappingURL=UpdateStackInstancesCommand.js.map + +/***/ }), + +/***/ 69969: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateStackSetCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the stack set, and associated stack instances in the specified accounts and + * Regions.

+ *

Even if the stack set operation created by updating the stack set fails (completely + * or partially, below or above a specified failure tolerance), the stack set is updated with + * your changes. Subsequent CreateStackInstances calls on the specified + * stack set use the updated stack set.

+ */ +class UpdateStackSetCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "UpdateStackSetCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UpdateStackSetInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.UpdateStackSetOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryUpdateStackSetCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryUpdateStackSetCommand(output, context); + } +} +exports.UpdateStackSetCommand = UpdateStackSetCommand; +//# sourceMappingURL=UpdateStackSetCommand.js.map + +/***/ }), + +/***/ 72746: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateTerminationProtectionCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates termination protection for the specified stack. If a user attempts to delete + * a stack with termination protection enabled, the operation fails and the stack remains + * unchanged. For more information, see Protecting a + * Stack From Being Deleted in the AWS CloudFormation User Guide.

+ *

For nested + * stacks, termination protection is set on the root stack and cannot be changed + * directly on the nested stack.

+ */ +class UpdateTerminationProtectionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "UpdateTerminationProtectionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UpdateTerminationProtectionInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.UpdateTerminationProtectionOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryUpdateTerminationProtectionCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryUpdateTerminationProtectionCommand(output, context); + } +} +exports.UpdateTerminationProtectionCommand = UpdateTerminationProtectionCommand; +//# sourceMappingURL=UpdateTerminationProtectionCommand.js.map + +/***/ }), + +/***/ 35583: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ValidateTemplateCommand = void 0; +const models_0_1 = __nccwpck_require__(50499); +const Aws_query_1 = __nccwpck_require__(46408); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Validates a specified template. AWS CloudFormation first checks if the template is + * valid JSON. If it isn't, AWS CloudFormation checks if the template is valid YAML. If both + * these checks fail, AWS CloudFormation returns a template validation error.

+ */ +class ValidateTemplateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CloudFormationClient"; + const commandName = "ValidateTemplateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ValidateTemplateInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ValidateTemplateOutput.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryValidateTemplateCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryValidateTemplateCommand(output, context); + } +} +exports.ValidateTemplateCommand = ValidateTemplateCommand; +//# sourceMappingURL=ValidateTemplateCommand.js.map + +/***/ }), + +/***/ 8628: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRegionInfoProvider = void 0; +// Partition default templates +const AWS_TEMPLATE = "cloudformation.{region}.amazonaws.com"; +const AWS_CN_TEMPLATE = "cloudformation.{region}.amazonaws.com.cn"; +const AWS_ISO_TEMPLATE = "cloudformation.{region}.c2s.ic.gov"; +const AWS_ISO_B_TEMPLATE = "cloudformation.{region}.sc2s.sgov.gov"; +const AWS_US_GOV_TEMPLATE = "cloudformation.{region}.amazonaws.com"; +// Partition regions +const AWS_REGIONS = new Set([ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "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", +]); +const AWS_CN_REGIONS = new Set(["cn-north-1", "cn-northwest-1"]); +const AWS_ISO_REGIONS = new Set(["us-iso-east-1"]); +const AWS_ISO_B_REGIONS = new Set(["us-isob-east-1"]); +const AWS_US_GOV_REGIONS = new Set(["us-gov-east-1", "us-gov-west-1"]); +const defaultRegionInfoProvider = (region, options) => { + let regionInfo = undefined; + switch (region) { + // First, try to match exact region names. + case "af-south-1": + regionInfo = { + hostname: "cloudformation.af-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-east-1": + regionInfo = { + hostname: "cloudformation.ap-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-northeast-1": + regionInfo = { + hostname: "cloudformation.ap-northeast-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-northeast-2": + regionInfo = { + hostname: "cloudformation.ap-northeast-2.amazonaws.com", + partition: "aws", + }; + break; + case "ap-south-1": + regionInfo = { + hostname: "cloudformation.ap-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-southeast-1": + regionInfo = { + hostname: "cloudformation.ap-southeast-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-southeast-2": + regionInfo = { + hostname: "cloudformation.ap-southeast-2.amazonaws.com", + partition: "aws", + }; + break; + case "ca-central-1": + regionInfo = { + hostname: "cloudformation.ca-central-1.amazonaws.com", + partition: "aws", + }; + break; + case "cn-north-1": + regionInfo = { + hostname: "cloudformation.cn-north-1.amazonaws.com.cn", + partition: "aws-cn", + }; + break; + case "cn-northwest-1": + regionInfo = { + hostname: "cloudformation.cn-northwest-1.amazonaws.com.cn", + partition: "aws-cn", + }; + break; + case "eu-central-1": + regionInfo = { + hostname: "cloudformation.eu-central-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-north-1": + regionInfo = { + hostname: "cloudformation.eu-north-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-south-1": + regionInfo = { + hostname: "cloudformation.eu-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-1": + regionInfo = { + hostname: "cloudformation.eu-west-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-2": + regionInfo = { + hostname: "cloudformation.eu-west-2.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-3": + regionInfo = { + hostname: "cloudformation.eu-west-3.amazonaws.com", + partition: "aws", + }; + break; + case "me-south-1": + regionInfo = { + hostname: "cloudformation.me-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "sa-east-1": + regionInfo = { + hostname: "cloudformation.sa-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-1": + regionInfo = { + hostname: "cloudformation.us-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-1-fips": + regionInfo = { + hostname: "cloudformation-fips.us-east-1.amazonaws.com", + partition: "aws", + signingRegion: "us-east-1", + }; + break; + case "us-east-2": + regionInfo = { + hostname: "cloudformation.us-east-2.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-2-fips": + regionInfo = { + hostname: "cloudformation-fips.us-east-2.amazonaws.com", + partition: "aws", + signingRegion: "us-east-2", + }; + break; + case "us-gov-east-1": + regionInfo = { + hostname: "cloudformation.us-gov-east-1.amazonaws.com", + partition: "aws-us-gov", + signingRegion: "us-gov-east-1", + }; + break; + case "us-gov-west-1": + regionInfo = { + hostname: "cloudformation.us-gov-west-1.amazonaws.com", + partition: "aws-us-gov", + signingRegion: "us-gov-west-1", + }; + break; + case "us-iso-east-1": + regionInfo = { + hostname: "cloudformation.us-iso-east-1.c2s.ic.gov", + partition: "aws-iso", + }; + break; + case "us-isob-east-1": + regionInfo = { + hostname: "cloudformation.us-isob-east-1.sc2s.sgov.gov", + partition: "aws-iso-b", + }; + break; + case "us-west-1": + regionInfo = { + hostname: "cloudformation.us-west-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-west-1-fips": + regionInfo = { + hostname: "cloudformation-fips.us-west-1.amazonaws.com", + partition: "aws", + signingRegion: "us-west-1", + }; + break; + case "us-west-2": + regionInfo = { + hostname: "cloudformation.us-west-2.amazonaws.com", + partition: "aws", + }; + break; + case "us-west-2-fips": + regionInfo = { + hostname: "cloudformation-fips.us-west-2.amazonaws.com", + partition: "aws", + signingRegion: "us-west-2", + }; + break; + // Next, try to match partition endpoints. + default: + if (AWS_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + }; + } + if (AWS_CN_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_CN_TEMPLATE.replace("{region}", region), + partition: "aws-cn", + }; + } + if (AWS_ISO_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_TEMPLATE.replace("{region}", region), + partition: "aws-iso", + }; + } + if (AWS_ISO_B_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_B_TEMPLATE.replace("{region}", region), + partition: "aws-iso-b", + }; + } + if (AWS_US_GOV_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_US_GOV_TEMPLATE.replace("{region}", region), + partition: "aws-us-gov", + }; + } + // Finally, assume it's an AWS partition endpoint. + if (regionInfo === undefined) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + }; + } + } + return Promise.resolve({ signingService: "cloudformation", ...regionInfo }); +}; +exports.defaultRegionInfoProvider = defaultRegionInfoProvider; +//# sourceMappingURL=endpoints.js.map + +/***/ }), + +/***/ 22932: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(91663); +tslib_1.__exportStar(__nccwpck_require__(25838), exports); +tslib_1.__exportStar(__nccwpck_require__(44074), exports); +tslib_1.__exportStar(__nccwpck_require__(78006), exports); +tslib_1.__exportStar(__nccwpck_require__(31828), exports); +tslib_1.__exportStar(__nccwpck_require__(87501), exports); +tslib_1.__exportStar(__nccwpck_require__(42935), exports); +tslib_1.__exportStar(__nccwpck_require__(53977), exports); +tslib_1.__exportStar(__nccwpck_require__(94602), exports); +tslib_1.__exportStar(__nccwpck_require__(8147), exports); +tslib_1.__exportStar(__nccwpck_require__(93619), exports); +tslib_1.__exportStar(__nccwpck_require__(96629), exports); +tslib_1.__exportStar(__nccwpck_require__(67548), exports); +tslib_1.__exportStar(__nccwpck_require__(38218), exports); +tslib_1.__exportStar(__nccwpck_require__(67719), exports); +tslib_1.__exportStar(__nccwpck_require__(93821), exports); +tslib_1.__exportStar(__nccwpck_require__(433), exports); +tslib_1.__exportStar(__nccwpck_require__(30462), exports); +tslib_1.__exportStar(__nccwpck_require__(99902), exports); +tslib_1.__exportStar(__nccwpck_require__(77993), exports); +tslib_1.__exportStar(__nccwpck_require__(95705), exports); +tslib_1.__exportStar(__nccwpck_require__(15305), exports); +tslib_1.__exportStar(__nccwpck_require__(25794), exports); +tslib_1.__exportStar(__nccwpck_require__(5335), exports); +tslib_1.__exportStar(__nccwpck_require__(28792), exports); +tslib_1.__exportStar(__nccwpck_require__(87840), exports); +tslib_1.__exportStar(__nccwpck_require__(66474), exports); +tslib_1.__exportStar(__nccwpck_require__(18050), exports); +tslib_1.__exportStar(__nccwpck_require__(12422), exports); +tslib_1.__exportStar(__nccwpck_require__(41499), exports); +tslib_1.__exportStar(__nccwpck_require__(39500), exports); +tslib_1.__exportStar(__nccwpck_require__(68435), exports); +tslib_1.__exportStar(__nccwpck_require__(78948), exports); +tslib_1.__exportStar(__nccwpck_require__(46403), exports); +tslib_1.__exportStar(__nccwpck_require__(19450), exports); +tslib_1.__exportStar(__nccwpck_require__(11152), exports); +tslib_1.__exportStar(__nccwpck_require__(73188), exports); +tslib_1.__exportStar(__nccwpck_require__(4482), exports); +tslib_1.__exportStar(__nccwpck_require__(99836), exports); +tslib_1.__exportStar(__nccwpck_require__(59396), exports); +tslib_1.__exportStar(__nccwpck_require__(99706), exports); +tslib_1.__exportStar(__nccwpck_require__(7377), exports); +tslib_1.__exportStar(__nccwpck_require__(60351), exports); +tslib_1.__exportStar(__nccwpck_require__(9252), exports); +tslib_1.__exportStar(__nccwpck_require__(72171), exports); +tslib_1.__exportStar(__nccwpck_require__(64976), exports); +tslib_1.__exportStar(__nccwpck_require__(50991), exports); +tslib_1.__exportStar(__nccwpck_require__(99936), exports); +tslib_1.__exportStar(__nccwpck_require__(83057), exports); +tslib_1.__exportStar(__nccwpck_require__(55268), exports); +tslib_1.__exportStar(__nccwpck_require__(54482), exports); +tslib_1.__exportStar(__nccwpck_require__(3533), exports); +tslib_1.__exportStar(__nccwpck_require__(71155), exports); +tslib_1.__exportStar(__nccwpck_require__(67014), exports); +tslib_1.__exportStar(__nccwpck_require__(62539), exports); +tslib_1.__exportStar(__nccwpck_require__(73469), exports); +tslib_1.__exportStar(__nccwpck_require__(40722), exports); +tslib_1.__exportStar(__nccwpck_require__(14034), exports); +tslib_1.__exportStar(__nccwpck_require__(34567), exports); +tslib_1.__exportStar(__nccwpck_require__(43356), exports); +tslib_1.__exportStar(__nccwpck_require__(5511), exports); +tslib_1.__exportStar(__nccwpck_require__(16689), exports); +tslib_1.__exportStar(__nccwpck_require__(72174), exports); +tslib_1.__exportStar(__nccwpck_require__(89809), exports); +tslib_1.__exportStar(__nccwpck_require__(57237), exports); +tslib_1.__exportStar(__nccwpck_require__(19011), exports); +tslib_1.__exportStar(__nccwpck_require__(91272), exports); +tslib_1.__exportStar(__nccwpck_require__(34356), exports); +tslib_1.__exportStar(__nccwpck_require__(80854), exports); +tslib_1.__exportStar(__nccwpck_require__(44275), exports); +tslib_1.__exportStar(__nccwpck_require__(50944), exports); +tslib_1.__exportStar(__nccwpck_require__(54289), exports); +tslib_1.__exportStar(__nccwpck_require__(69969), exports); +tslib_1.__exportStar(__nccwpck_require__(72746), exports); +tslib_1.__exportStar(__nccwpck_require__(35583), exports); +tslib_1.__exportStar(__nccwpck_require__(59638), exports); +tslib_1.__exportStar(__nccwpck_require__(51189), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 51189: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(91663); +tslib_1.__exportStar(__nccwpck_require__(50499), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 50499: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateStackSetInput = exports.CreatedButModifiedException = exports.StaleRequestException = exports.StackSetNotFoundException = exports.OperationInProgressException = exports.OperationIdAlreadyExistsException = exports.InvalidOperationException = exports.CreateStackInstancesOutput = exports.CreateStackInstancesInput = exports.StackSetOperationPreferences = exports.DeploymentTargets = exports.CreateStackOutput = exports.CreateStackInput = exports.OnFailure = exports.LimitExceededException = exports.InsufficientCapabilitiesException = exports.CreateChangeSetOutput = exports.CreateChangeSetInput = exports.Tag = exports.RollbackConfiguration = exports.RollbackTrigger = exports.ResourceToImport = exports.Parameter = exports.ContinueUpdateRollbackOutput = exports.ContinueUpdateRollbackInput = exports.ChangeSetType = exports.ChangeSetSummary = exports.ExecutionStatus = exports.ChangeSetStatus = exports.ChangeSetNotFoundException = exports.Change = exports.ChangeType = exports.ResourceChange = exports.Replacement = exports.ModuleInfo = exports.ResourceChangeDetail = exports.ResourceTargetDefinition = exports.RequiresRecreation = exports.ResourceAttribute = exports.EvaluationType = exports.ChangeSource = exports.ChangeAction = exports.CFNRegistryException = exports.Capability = exports.TokenAlreadyExistsException = exports.CancelUpdateStackInput = exports.AutoDeployment = exports.AlreadyExistsException = exports.AccountLimit = exports.AccountGateResult = void 0; +exports.Stack = exports.StackStatus = exports.Output = exports.StackDriftInformation = exports.DescribeStacksInput = exports.DescribeStackResourcesOutput = exports.StackResource = exports.DescribeStackResourcesInput = exports.DescribeStackResourceDriftsOutput = exports.StackResourceDrift = exports.PropertyDifference = exports.DifferenceType = exports.PhysicalResourceIdContextKeyValuePair = exports.DescribeStackResourceDriftsInput = exports.DescribeStackResourceOutput = exports.StackResourceDetail = exports.StackResourceDriftInformation = exports.StackResourceDriftStatus = exports.DescribeStackResourceInput = exports.StackInstanceNotFoundException = exports.DescribeStackInstanceOutput = exports.StackInstance = exports.StackInstanceComprehensiveStatus = exports.DescribeStackInstanceInput = exports.DescribeStackEventsOutput = exports.StackEvent = exports.ResourceStatus = exports.DescribeStackEventsInput = exports.DescribeStackDriftDetectionStatusOutput = exports.StackDriftStatus = exports.StackDriftDetectionStatus = exports.DescribeStackDriftDetectionStatusInput = exports.DescribeChangeSetOutput = exports.DescribeChangeSetInput = exports.DescribeAccountLimitsOutput = exports.DescribeAccountLimitsInput = exports.TypeNotFoundException = exports.DeregisterTypeOutput = exports.DeregisterTypeInput = exports.StackSetNotEmptyException = exports.DeleteStackSetOutput = exports.DeleteStackSetInput = exports.DeleteStackInstancesOutput = exports.DeleteStackInstancesInput = exports.DeleteStackInput = exports.InvalidChangeSetStatusException = exports.DeleteChangeSetOutput = exports.DeleteChangeSetInput = exports.NameAlreadyExistsException = exports.CreateStackSetOutput = void 0; +exports.StackResourceSummary = exports.StackResourceDriftInformationSummary = exports.ListStackResourcesInput = exports.ListStackInstancesOutput = exports.StackInstanceSummary = exports.ListStackInstancesInput = exports.StackInstanceFilter = exports.ListImportsOutput = exports.ListImportsInput = exports.ListExportsOutput = exports.Export = exports.ListExportsInput = exports.ListChangeSetsOutput = exports.ListChangeSetsInput = exports.GetTemplateSummaryOutput = exports.ResourceIdentifierSummary = exports.ParameterDeclaration = exports.ParameterConstraints = exports.GetTemplateSummaryInput = exports.GetTemplateOutput = exports.GetTemplateInput = exports.TemplateStage = exports.GetStackPolicyOutput = exports.GetStackPolicyInput = exports.ExecuteChangeSetOutput = exports.ExecuteChangeSetInput = exports.EstimateTemplateCostOutput = exports.EstimateTemplateCostInput = exports.DetectStackSetDriftOutput = exports.DetectStackSetDriftInput = exports.DetectStackResourceDriftOutput = exports.DetectStackResourceDriftInput = exports.DetectStackDriftOutput = exports.DetectStackDriftInput = exports.DescribeTypeRegistrationOutput = exports.DescribeTypeRegistrationInput = exports.DescribeTypeOutput = exports.LoggingConfig = exports.DescribeTypeInput = exports.OperationNotFoundException = exports.DescribeStackSetOperationOutput = exports.StackSetOperation = exports.DescribeStackSetOperationInput = exports.DescribeStackSetOutput = exports.StackSet = exports.StackSetDriftDetectionDetails = exports.StackSetDriftStatus = exports.StackSetDriftDetectionStatus = exports.DescribeStackSetInput = exports.DescribeStacksOutput = void 0; +exports.ValidateTemplateOutput = exports.TemplateParameter = exports.ValidateTemplateInput = exports.UpdateTerminationProtectionOutput = exports.UpdateTerminationProtectionInput = exports.UpdateStackSetOutput = exports.UpdateStackSetInput = exports.UpdateStackInstancesOutput = exports.UpdateStackInstancesInput = exports.UpdateStackOutput = exports.UpdateStackInput = exports.StopStackSetOperationOutput = exports.StopStackSetOperationInput = exports.SignalResourceInput = exports.ResourceSignalStatus = exports.SetTypeDefaultVersionOutput = exports.SetTypeDefaultVersionInput = exports.SetStackPolicyInput = exports.RegisterTypeOutput = exports.RegisterTypeInput = exports.RecordHandlerProgressOutput = exports.RecordHandlerProgressInput = exports.HandlerErrorCode = exports.OperationStatus = exports.OperationStatusCheckFailedException = exports.InvalidStateTransitionException = exports.ListTypeVersionsOutput = exports.TypeVersionSummary = exports.ListTypeVersionsInput = exports.ListTypesOutput = exports.TypeSummary = exports.ListTypesInput = exports.ListTypeRegistrationsOutput = exports.ListTypeRegistrationsInput = exports.ListStackSetsOutput = exports.StackSetSummary = exports.ListStackSetsInput = exports.ListStackSetOperationsOutput = exports.StackSetOperationSummary = exports.ListStackSetOperationsInput = exports.ListStackSetOperationResultsOutput = exports.StackSetOperationResultSummary = exports.ListStackSetOperationResultsInput = exports.ListStacksOutput = exports.StackSummary = exports.StackDriftInformationSummary = exports.ListStacksInput = exports.ListStackResourcesOutput = void 0; +var AccountGateResult; +(function (AccountGateResult) { + AccountGateResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AccountGateResult = exports.AccountGateResult || (exports.AccountGateResult = {})); +var AccountLimit; +(function (AccountLimit) { + AccountLimit.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AccountLimit = exports.AccountLimit || (exports.AccountLimit = {})); +var AlreadyExistsException; +(function (AlreadyExistsException) { + AlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AlreadyExistsException = exports.AlreadyExistsException || (exports.AlreadyExistsException = {})); +var AutoDeployment; +(function (AutoDeployment) { + AutoDeployment.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AutoDeployment = exports.AutoDeployment || (exports.AutoDeployment = {})); +var CancelUpdateStackInput; +(function (CancelUpdateStackInput) { + CancelUpdateStackInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CancelUpdateStackInput = exports.CancelUpdateStackInput || (exports.CancelUpdateStackInput = {})); +var TokenAlreadyExistsException; +(function (TokenAlreadyExistsException) { + TokenAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TokenAlreadyExistsException = exports.TokenAlreadyExistsException || (exports.TokenAlreadyExistsException = {})); +var Capability; +(function (Capability) { + Capability["CAPABILITY_AUTO_EXPAND"] = "CAPABILITY_AUTO_EXPAND"; + Capability["CAPABILITY_IAM"] = "CAPABILITY_IAM"; + Capability["CAPABILITY_NAMED_IAM"] = "CAPABILITY_NAMED_IAM"; +})(Capability = exports.Capability || (exports.Capability = {})); +var CFNRegistryException; +(function (CFNRegistryException) { + CFNRegistryException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CFNRegistryException = exports.CFNRegistryException || (exports.CFNRegistryException = {})); +var ChangeAction; +(function (ChangeAction) { + ChangeAction["Add"] = "Add"; + ChangeAction["Dynamic"] = "Dynamic"; + ChangeAction["Import"] = "Import"; + ChangeAction["Modify"] = "Modify"; + ChangeAction["Remove"] = "Remove"; +})(ChangeAction = exports.ChangeAction || (exports.ChangeAction = {})); +var ChangeSource; +(function (ChangeSource) { + ChangeSource["Automatic"] = "Automatic"; + ChangeSource["DirectModification"] = "DirectModification"; + ChangeSource["ParameterReference"] = "ParameterReference"; + ChangeSource["ResourceAttribute"] = "ResourceAttribute"; + ChangeSource["ResourceReference"] = "ResourceReference"; +})(ChangeSource = exports.ChangeSource || (exports.ChangeSource = {})); +var EvaluationType; +(function (EvaluationType) { + EvaluationType["Dynamic"] = "Dynamic"; + EvaluationType["Static"] = "Static"; +})(EvaluationType = exports.EvaluationType || (exports.EvaluationType = {})); +var ResourceAttribute; +(function (ResourceAttribute) { + ResourceAttribute["CreationPolicy"] = "CreationPolicy"; + ResourceAttribute["DeletionPolicy"] = "DeletionPolicy"; + ResourceAttribute["Metadata"] = "Metadata"; + ResourceAttribute["Properties"] = "Properties"; + ResourceAttribute["Tags"] = "Tags"; + ResourceAttribute["UpdatePolicy"] = "UpdatePolicy"; +})(ResourceAttribute = exports.ResourceAttribute || (exports.ResourceAttribute = {})); +var RequiresRecreation; +(function (RequiresRecreation) { + RequiresRecreation["Always"] = "Always"; + RequiresRecreation["Conditionally"] = "Conditionally"; + RequiresRecreation["Never"] = "Never"; +})(RequiresRecreation = exports.RequiresRecreation || (exports.RequiresRecreation = {})); +var ResourceTargetDefinition; +(function (ResourceTargetDefinition) { + ResourceTargetDefinition.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceTargetDefinition = exports.ResourceTargetDefinition || (exports.ResourceTargetDefinition = {})); +var ResourceChangeDetail; +(function (ResourceChangeDetail) { + ResourceChangeDetail.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceChangeDetail = exports.ResourceChangeDetail || (exports.ResourceChangeDetail = {})); +var ModuleInfo; +(function (ModuleInfo) { + ModuleInfo.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ModuleInfo = exports.ModuleInfo || (exports.ModuleInfo = {})); +var Replacement; +(function (Replacement) { + Replacement["Conditional"] = "Conditional"; + Replacement["False"] = "False"; + Replacement["True"] = "True"; +})(Replacement = exports.Replacement || (exports.Replacement = {})); +var ResourceChange; +(function (ResourceChange) { + ResourceChange.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceChange = exports.ResourceChange || (exports.ResourceChange = {})); +var ChangeType; +(function (ChangeType) { + ChangeType["Resource"] = "Resource"; +})(ChangeType = exports.ChangeType || (exports.ChangeType = {})); +var Change; +(function (Change) { + Change.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Change = exports.Change || (exports.Change = {})); +var ChangeSetNotFoundException; +(function (ChangeSetNotFoundException) { + ChangeSetNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ChangeSetNotFoundException = exports.ChangeSetNotFoundException || (exports.ChangeSetNotFoundException = {})); +var ChangeSetStatus; +(function (ChangeSetStatus) { + ChangeSetStatus["CREATE_COMPLETE"] = "CREATE_COMPLETE"; + ChangeSetStatus["CREATE_IN_PROGRESS"] = "CREATE_IN_PROGRESS"; + ChangeSetStatus["CREATE_PENDING"] = "CREATE_PENDING"; + ChangeSetStatus["DELETE_COMPLETE"] = "DELETE_COMPLETE"; + ChangeSetStatus["DELETE_FAILED"] = "DELETE_FAILED"; + ChangeSetStatus["DELETE_IN_PROGRESS"] = "DELETE_IN_PROGRESS"; + ChangeSetStatus["DELETE_PENDING"] = "DELETE_PENDING"; + ChangeSetStatus["FAILED"] = "FAILED"; +})(ChangeSetStatus = exports.ChangeSetStatus || (exports.ChangeSetStatus = {})); +var ExecutionStatus; +(function (ExecutionStatus) { + ExecutionStatus["AVAILABLE"] = "AVAILABLE"; + ExecutionStatus["EXECUTE_COMPLETE"] = "EXECUTE_COMPLETE"; + ExecutionStatus["EXECUTE_FAILED"] = "EXECUTE_FAILED"; + ExecutionStatus["EXECUTE_IN_PROGRESS"] = "EXECUTE_IN_PROGRESS"; + ExecutionStatus["OBSOLETE"] = "OBSOLETE"; + ExecutionStatus["UNAVAILABLE"] = "UNAVAILABLE"; +})(ExecutionStatus = exports.ExecutionStatus || (exports.ExecutionStatus = {})); +var ChangeSetSummary; +(function (ChangeSetSummary) { + ChangeSetSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ChangeSetSummary = exports.ChangeSetSummary || (exports.ChangeSetSummary = {})); +var ChangeSetType; +(function (ChangeSetType) { + ChangeSetType["CREATE"] = "CREATE"; + ChangeSetType["IMPORT"] = "IMPORT"; + ChangeSetType["UPDATE"] = "UPDATE"; +})(ChangeSetType = exports.ChangeSetType || (exports.ChangeSetType = {})); +var ContinueUpdateRollbackInput; +(function (ContinueUpdateRollbackInput) { + ContinueUpdateRollbackInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ContinueUpdateRollbackInput = exports.ContinueUpdateRollbackInput || (exports.ContinueUpdateRollbackInput = {})); +var ContinueUpdateRollbackOutput; +(function (ContinueUpdateRollbackOutput) { + ContinueUpdateRollbackOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ContinueUpdateRollbackOutput = exports.ContinueUpdateRollbackOutput || (exports.ContinueUpdateRollbackOutput = {})); +var Parameter; +(function (Parameter) { + Parameter.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Parameter = exports.Parameter || (exports.Parameter = {})); +var ResourceToImport; +(function (ResourceToImport) { + ResourceToImport.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceToImport = exports.ResourceToImport || (exports.ResourceToImport = {})); +var RollbackTrigger; +(function (RollbackTrigger) { + RollbackTrigger.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RollbackTrigger = exports.RollbackTrigger || (exports.RollbackTrigger = {})); +var RollbackConfiguration; +(function (RollbackConfiguration) { + RollbackConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RollbackConfiguration = exports.RollbackConfiguration || (exports.RollbackConfiguration = {})); +var Tag; +(function (Tag) { + Tag.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Tag = exports.Tag || (exports.Tag = {})); +var CreateChangeSetInput; +(function (CreateChangeSetInput) { + CreateChangeSetInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateChangeSetInput = exports.CreateChangeSetInput || (exports.CreateChangeSetInput = {})); +var CreateChangeSetOutput; +(function (CreateChangeSetOutput) { + CreateChangeSetOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateChangeSetOutput = exports.CreateChangeSetOutput || (exports.CreateChangeSetOutput = {})); +var InsufficientCapabilitiesException; +(function (InsufficientCapabilitiesException) { + InsufficientCapabilitiesException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InsufficientCapabilitiesException = exports.InsufficientCapabilitiesException || (exports.InsufficientCapabilitiesException = {})); +var LimitExceededException; +(function (LimitExceededException) { + LimitExceededException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {})); +var OnFailure; +(function (OnFailure) { + OnFailure["DELETE"] = "DELETE"; + OnFailure["DO_NOTHING"] = "DO_NOTHING"; + OnFailure["ROLLBACK"] = "ROLLBACK"; +})(OnFailure = exports.OnFailure || (exports.OnFailure = {})); +var CreateStackInput; +(function (CreateStackInput) { + CreateStackInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateStackInput = exports.CreateStackInput || (exports.CreateStackInput = {})); +var CreateStackOutput; +(function (CreateStackOutput) { + CreateStackOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateStackOutput = exports.CreateStackOutput || (exports.CreateStackOutput = {})); +var DeploymentTargets; +(function (DeploymentTargets) { + DeploymentTargets.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeploymentTargets = exports.DeploymentTargets || (exports.DeploymentTargets = {})); +var StackSetOperationPreferences; +(function (StackSetOperationPreferences) { + StackSetOperationPreferences.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackSetOperationPreferences = exports.StackSetOperationPreferences || (exports.StackSetOperationPreferences = {})); +var CreateStackInstancesInput; +(function (CreateStackInstancesInput) { + CreateStackInstancesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateStackInstancesInput = exports.CreateStackInstancesInput || (exports.CreateStackInstancesInput = {})); +var CreateStackInstancesOutput; +(function (CreateStackInstancesOutput) { + CreateStackInstancesOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateStackInstancesOutput = exports.CreateStackInstancesOutput || (exports.CreateStackInstancesOutput = {})); +var InvalidOperationException; +(function (InvalidOperationException) { + InvalidOperationException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidOperationException = exports.InvalidOperationException || (exports.InvalidOperationException = {})); +var OperationIdAlreadyExistsException; +(function (OperationIdAlreadyExistsException) { + OperationIdAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(OperationIdAlreadyExistsException = exports.OperationIdAlreadyExistsException || (exports.OperationIdAlreadyExistsException = {})); +var OperationInProgressException; +(function (OperationInProgressException) { + OperationInProgressException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(OperationInProgressException = exports.OperationInProgressException || (exports.OperationInProgressException = {})); +var StackSetNotFoundException; +(function (StackSetNotFoundException) { + StackSetNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackSetNotFoundException = exports.StackSetNotFoundException || (exports.StackSetNotFoundException = {})); +var StaleRequestException; +(function (StaleRequestException) { + StaleRequestException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StaleRequestException = exports.StaleRequestException || (exports.StaleRequestException = {})); +var CreatedButModifiedException; +(function (CreatedButModifiedException) { + CreatedButModifiedException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreatedButModifiedException = exports.CreatedButModifiedException || (exports.CreatedButModifiedException = {})); +var CreateStackSetInput; +(function (CreateStackSetInput) { + CreateStackSetInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateStackSetInput = exports.CreateStackSetInput || (exports.CreateStackSetInput = {})); +var CreateStackSetOutput; +(function (CreateStackSetOutput) { + CreateStackSetOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateStackSetOutput = exports.CreateStackSetOutput || (exports.CreateStackSetOutput = {})); +var NameAlreadyExistsException; +(function (NameAlreadyExistsException) { + NameAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(NameAlreadyExistsException = exports.NameAlreadyExistsException || (exports.NameAlreadyExistsException = {})); +var DeleteChangeSetInput; +(function (DeleteChangeSetInput) { + DeleteChangeSetInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteChangeSetInput = exports.DeleteChangeSetInput || (exports.DeleteChangeSetInput = {})); +var DeleteChangeSetOutput; +(function (DeleteChangeSetOutput) { + DeleteChangeSetOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteChangeSetOutput = exports.DeleteChangeSetOutput || (exports.DeleteChangeSetOutput = {})); +var InvalidChangeSetStatusException; +(function (InvalidChangeSetStatusException) { + InvalidChangeSetStatusException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidChangeSetStatusException = exports.InvalidChangeSetStatusException || (exports.InvalidChangeSetStatusException = {})); +var DeleteStackInput; +(function (DeleteStackInput) { + DeleteStackInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteStackInput = exports.DeleteStackInput || (exports.DeleteStackInput = {})); +var DeleteStackInstancesInput; +(function (DeleteStackInstancesInput) { + DeleteStackInstancesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteStackInstancesInput = exports.DeleteStackInstancesInput || (exports.DeleteStackInstancesInput = {})); +var DeleteStackInstancesOutput; +(function (DeleteStackInstancesOutput) { + DeleteStackInstancesOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteStackInstancesOutput = exports.DeleteStackInstancesOutput || (exports.DeleteStackInstancesOutput = {})); +var DeleteStackSetInput; +(function (DeleteStackSetInput) { + DeleteStackSetInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteStackSetInput = exports.DeleteStackSetInput || (exports.DeleteStackSetInput = {})); +var DeleteStackSetOutput; +(function (DeleteStackSetOutput) { + DeleteStackSetOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteStackSetOutput = exports.DeleteStackSetOutput || (exports.DeleteStackSetOutput = {})); +var StackSetNotEmptyException; +(function (StackSetNotEmptyException) { + StackSetNotEmptyException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackSetNotEmptyException = exports.StackSetNotEmptyException || (exports.StackSetNotEmptyException = {})); +var DeregisterTypeInput; +(function (DeregisterTypeInput) { + DeregisterTypeInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeregisterTypeInput = exports.DeregisterTypeInput || (exports.DeregisterTypeInput = {})); +var DeregisterTypeOutput; +(function (DeregisterTypeOutput) { + DeregisterTypeOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeregisterTypeOutput = exports.DeregisterTypeOutput || (exports.DeregisterTypeOutput = {})); +var TypeNotFoundException; +(function (TypeNotFoundException) { + TypeNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TypeNotFoundException = exports.TypeNotFoundException || (exports.TypeNotFoundException = {})); +var DescribeAccountLimitsInput; +(function (DescribeAccountLimitsInput) { + DescribeAccountLimitsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAccountLimitsInput = exports.DescribeAccountLimitsInput || (exports.DescribeAccountLimitsInput = {})); +var DescribeAccountLimitsOutput; +(function (DescribeAccountLimitsOutput) { + DescribeAccountLimitsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAccountLimitsOutput = exports.DescribeAccountLimitsOutput || (exports.DescribeAccountLimitsOutput = {})); +var DescribeChangeSetInput; +(function (DescribeChangeSetInput) { + DescribeChangeSetInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeChangeSetInput = exports.DescribeChangeSetInput || (exports.DescribeChangeSetInput = {})); +var DescribeChangeSetOutput; +(function (DescribeChangeSetOutput) { + DescribeChangeSetOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeChangeSetOutput = exports.DescribeChangeSetOutput || (exports.DescribeChangeSetOutput = {})); +var DescribeStackDriftDetectionStatusInput; +(function (DescribeStackDriftDetectionStatusInput) { + DescribeStackDriftDetectionStatusInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackDriftDetectionStatusInput = exports.DescribeStackDriftDetectionStatusInput || (exports.DescribeStackDriftDetectionStatusInput = {})); +var StackDriftDetectionStatus; +(function (StackDriftDetectionStatus) { + StackDriftDetectionStatus["DETECTION_COMPLETE"] = "DETECTION_COMPLETE"; + StackDriftDetectionStatus["DETECTION_FAILED"] = "DETECTION_FAILED"; + StackDriftDetectionStatus["DETECTION_IN_PROGRESS"] = "DETECTION_IN_PROGRESS"; +})(StackDriftDetectionStatus = exports.StackDriftDetectionStatus || (exports.StackDriftDetectionStatus = {})); +var StackDriftStatus; +(function (StackDriftStatus) { + StackDriftStatus["DRIFTED"] = "DRIFTED"; + StackDriftStatus["IN_SYNC"] = "IN_SYNC"; + StackDriftStatus["NOT_CHECKED"] = "NOT_CHECKED"; + StackDriftStatus["UNKNOWN"] = "UNKNOWN"; +})(StackDriftStatus = exports.StackDriftStatus || (exports.StackDriftStatus = {})); +var DescribeStackDriftDetectionStatusOutput; +(function (DescribeStackDriftDetectionStatusOutput) { + DescribeStackDriftDetectionStatusOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackDriftDetectionStatusOutput = exports.DescribeStackDriftDetectionStatusOutput || (exports.DescribeStackDriftDetectionStatusOutput = {})); +var DescribeStackEventsInput; +(function (DescribeStackEventsInput) { + DescribeStackEventsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackEventsInput = exports.DescribeStackEventsInput || (exports.DescribeStackEventsInput = {})); +var ResourceStatus; +(function (ResourceStatus) { + ResourceStatus["CREATE_COMPLETE"] = "CREATE_COMPLETE"; + ResourceStatus["CREATE_FAILED"] = "CREATE_FAILED"; + ResourceStatus["CREATE_IN_PROGRESS"] = "CREATE_IN_PROGRESS"; + ResourceStatus["DELETE_COMPLETE"] = "DELETE_COMPLETE"; + ResourceStatus["DELETE_FAILED"] = "DELETE_FAILED"; + ResourceStatus["DELETE_IN_PROGRESS"] = "DELETE_IN_PROGRESS"; + ResourceStatus["DELETE_SKIPPED"] = "DELETE_SKIPPED"; + ResourceStatus["IMPORT_COMPLETE"] = "IMPORT_COMPLETE"; + ResourceStatus["IMPORT_FAILED"] = "IMPORT_FAILED"; + ResourceStatus["IMPORT_IN_PROGRESS"] = "IMPORT_IN_PROGRESS"; + ResourceStatus["IMPORT_ROLLBACK_COMPLETE"] = "IMPORT_ROLLBACK_COMPLETE"; + ResourceStatus["IMPORT_ROLLBACK_FAILED"] = "IMPORT_ROLLBACK_FAILED"; + ResourceStatus["IMPORT_ROLLBACK_IN_PROGRESS"] = "IMPORT_ROLLBACK_IN_PROGRESS"; + ResourceStatus["UPDATE_COMPLETE"] = "UPDATE_COMPLETE"; + ResourceStatus["UPDATE_FAILED"] = "UPDATE_FAILED"; + ResourceStatus["UPDATE_IN_PROGRESS"] = "UPDATE_IN_PROGRESS"; +})(ResourceStatus = exports.ResourceStatus || (exports.ResourceStatus = {})); +var StackEvent; +(function (StackEvent) { + StackEvent.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackEvent = exports.StackEvent || (exports.StackEvent = {})); +var DescribeStackEventsOutput; +(function (DescribeStackEventsOutput) { + DescribeStackEventsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackEventsOutput = exports.DescribeStackEventsOutput || (exports.DescribeStackEventsOutput = {})); +var DescribeStackInstanceInput; +(function (DescribeStackInstanceInput) { + DescribeStackInstanceInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackInstanceInput = exports.DescribeStackInstanceInput || (exports.DescribeStackInstanceInput = {})); +var StackInstanceComprehensiveStatus; +(function (StackInstanceComprehensiveStatus) { + StackInstanceComprehensiveStatus.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackInstanceComprehensiveStatus = exports.StackInstanceComprehensiveStatus || (exports.StackInstanceComprehensiveStatus = {})); +var StackInstance; +(function (StackInstance) { + StackInstance.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackInstance = exports.StackInstance || (exports.StackInstance = {})); +var DescribeStackInstanceOutput; +(function (DescribeStackInstanceOutput) { + DescribeStackInstanceOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackInstanceOutput = exports.DescribeStackInstanceOutput || (exports.DescribeStackInstanceOutput = {})); +var StackInstanceNotFoundException; +(function (StackInstanceNotFoundException) { + StackInstanceNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackInstanceNotFoundException = exports.StackInstanceNotFoundException || (exports.StackInstanceNotFoundException = {})); +var DescribeStackResourceInput; +(function (DescribeStackResourceInput) { + DescribeStackResourceInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackResourceInput = exports.DescribeStackResourceInput || (exports.DescribeStackResourceInput = {})); +var StackResourceDriftStatus; +(function (StackResourceDriftStatus) { + StackResourceDriftStatus["DELETED"] = "DELETED"; + StackResourceDriftStatus["IN_SYNC"] = "IN_SYNC"; + StackResourceDriftStatus["MODIFIED"] = "MODIFIED"; + StackResourceDriftStatus["NOT_CHECKED"] = "NOT_CHECKED"; +})(StackResourceDriftStatus = exports.StackResourceDriftStatus || (exports.StackResourceDriftStatus = {})); +var StackResourceDriftInformation; +(function (StackResourceDriftInformation) { + StackResourceDriftInformation.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackResourceDriftInformation = exports.StackResourceDriftInformation || (exports.StackResourceDriftInformation = {})); +var StackResourceDetail; +(function (StackResourceDetail) { + StackResourceDetail.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackResourceDetail = exports.StackResourceDetail || (exports.StackResourceDetail = {})); +var DescribeStackResourceOutput; +(function (DescribeStackResourceOutput) { + DescribeStackResourceOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackResourceOutput = exports.DescribeStackResourceOutput || (exports.DescribeStackResourceOutput = {})); +var DescribeStackResourceDriftsInput; +(function (DescribeStackResourceDriftsInput) { + DescribeStackResourceDriftsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackResourceDriftsInput = exports.DescribeStackResourceDriftsInput || (exports.DescribeStackResourceDriftsInput = {})); +var PhysicalResourceIdContextKeyValuePair; +(function (PhysicalResourceIdContextKeyValuePair) { + PhysicalResourceIdContextKeyValuePair.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PhysicalResourceIdContextKeyValuePair = exports.PhysicalResourceIdContextKeyValuePair || (exports.PhysicalResourceIdContextKeyValuePair = {})); +var DifferenceType; +(function (DifferenceType) { + DifferenceType["ADD"] = "ADD"; + DifferenceType["NOT_EQUAL"] = "NOT_EQUAL"; + DifferenceType["REMOVE"] = "REMOVE"; +})(DifferenceType = exports.DifferenceType || (exports.DifferenceType = {})); +var PropertyDifference; +(function (PropertyDifference) { + PropertyDifference.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PropertyDifference = exports.PropertyDifference || (exports.PropertyDifference = {})); +var StackResourceDrift; +(function (StackResourceDrift) { + StackResourceDrift.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackResourceDrift = exports.StackResourceDrift || (exports.StackResourceDrift = {})); +var DescribeStackResourceDriftsOutput; +(function (DescribeStackResourceDriftsOutput) { + DescribeStackResourceDriftsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackResourceDriftsOutput = exports.DescribeStackResourceDriftsOutput || (exports.DescribeStackResourceDriftsOutput = {})); +var DescribeStackResourcesInput; +(function (DescribeStackResourcesInput) { + DescribeStackResourcesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackResourcesInput = exports.DescribeStackResourcesInput || (exports.DescribeStackResourcesInput = {})); +var StackResource; +(function (StackResource) { + StackResource.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackResource = exports.StackResource || (exports.StackResource = {})); +var DescribeStackResourcesOutput; +(function (DescribeStackResourcesOutput) { + DescribeStackResourcesOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackResourcesOutput = exports.DescribeStackResourcesOutput || (exports.DescribeStackResourcesOutput = {})); +var DescribeStacksInput; +(function (DescribeStacksInput) { + DescribeStacksInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStacksInput = exports.DescribeStacksInput || (exports.DescribeStacksInput = {})); +var StackDriftInformation; +(function (StackDriftInformation) { + StackDriftInformation.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackDriftInformation = exports.StackDriftInformation || (exports.StackDriftInformation = {})); +var Output; +(function (Output) { + Output.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Output = exports.Output || (exports.Output = {})); +var StackStatus; +(function (StackStatus) { + StackStatus["CREATE_COMPLETE"] = "CREATE_COMPLETE"; + StackStatus["CREATE_FAILED"] = "CREATE_FAILED"; + StackStatus["CREATE_IN_PROGRESS"] = "CREATE_IN_PROGRESS"; + StackStatus["DELETE_COMPLETE"] = "DELETE_COMPLETE"; + StackStatus["DELETE_FAILED"] = "DELETE_FAILED"; + StackStatus["DELETE_IN_PROGRESS"] = "DELETE_IN_PROGRESS"; + StackStatus["IMPORT_COMPLETE"] = "IMPORT_COMPLETE"; + StackStatus["IMPORT_IN_PROGRESS"] = "IMPORT_IN_PROGRESS"; + StackStatus["IMPORT_ROLLBACK_COMPLETE"] = "IMPORT_ROLLBACK_COMPLETE"; + StackStatus["IMPORT_ROLLBACK_FAILED"] = "IMPORT_ROLLBACK_FAILED"; + StackStatus["IMPORT_ROLLBACK_IN_PROGRESS"] = "IMPORT_ROLLBACK_IN_PROGRESS"; + StackStatus["REVIEW_IN_PROGRESS"] = "REVIEW_IN_PROGRESS"; + StackStatus["ROLLBACK_COMPLETE"] = "ROLLBACK_COMPLETE"; + StackStatus["ROLLBACK_FAILED"] = "ROLLBACK_FAILED"; + StackStatus["ROLLBACK_IN_PROGRESS"] = "ROLLBACK_IN_PROGRESS"; + StackStatus["UPDATE_COMPLETE"] = "UPDATE_COMPLETE"; + StackStatus["UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"] = "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"; + StackStatus["UPDATE_IN_PROGRESS"] = "UPDATE_IN_PROGRESS"; + StackStatus["UPDATE_ROLLBACK_COMPLETE"] = "UPDATE_ROLLBACK_COMPLETE"; + StackStatus["UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS"] = "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS"; + StackStatus["UPDATE_ROLLBACK_FAILED"] = "UPDATE_ROLLBACK_FAILED"; + StackStatus["UPDATE_ROLLBACK_IN_PROGRESS"] = "UPDATE_ROLLBACK_IN_PROGRESS"; +})(StackStatus = exports.StackStatus || (exports.StackStatus = {})); +var Stack; +(function (Stack) { + Stack.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Stack = exports.Stack || (exports.Stack = {})); +var DescribeStacksOutput; +(function (DescribeStacksOutput) { + DescribeStacksOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStacksOutput = exports.DescribeStacksOutput || (exports.DescribeStacksOutput = {})); +var DescribeStackSetInput; +(function (DescribeStackSetInput) { + DescribeStackSetInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackSetInput = exports.DescribeStackSetInput || (exports.DescribeStackSetInput = {})); +var StackSetDriftDetectionStatus; +(function (StackSetDriftDetectionStatus) { + StackSetDriftDetectionStatus["COMPLETED"] = "COMPLETED"; + StackSetDriftDetectionStatus["FAILED"] = "FAILED"; + StackSetDriftDetectionStatus["IN_PROGRESS"] = "IN_PROGRESS"; + StackSetDriftDetectionStatus["PARTIAL_SUCCESS"] = "PARTIAL_SUCCESS"; + StackSetDriftDetectionStatus["STOPPED"] = "STOPPED"; +})(StackSetDriftDetectionStatus = exports.StackSetDriftDetectionStatus || (exports.StackSetDriftDetectionStatus = {})); +var StackSetDriftStatus; +(function (StackSetDriftStatus) { + StackSetDriftStatus["DRIFTED"] = "DRIFTED"; + StackSetDriftStatus["IN_SYNC"] = "IN_SYNC"; + StackSetDriftStatus["NOT_CHECKED"] = "NOT_CHECKED"; +})(StackSetDriftStatus = exports.StackSetDriftStatus || (exports.StackSetDriftStatus = {})); +var StackSetDriftDetectionDetails; +(function (StackSetDriftDetectionDetails) { + StackSetDriftDetectionDetails.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackSetDriftDetectionDetails = exports.StackSetDriftDetectionDetails || (exports.StackSetDriftDetectionDetails = {})); +var StackSet; +(function (StackSet) { + StackSet.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackSet = exports.StackSet || (exports.StackSet = {})); +var DescribeStackSetOutput; +(function (DescribeStackSetOutput) { + DescribeStackSetOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackSetOutput = exports.DescribeStackSetOutput || (exports.DescribeStackSetOutput = {})); +var DescribeStackSetOperationInput; +(function (DescribeStackSetOperationInput) { + DescribeStackSetOperationInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackSetOperationInput = exports.DescribeStackSetOperationInput || (exports.DescribeStackSetOperationInput = {})); +var StackSetOperation; +(function (StackSetOperation) { + StackSetOperation.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackSetOperation = exports.StackSetOperation || (exports.StackSetOperation = {})); +var DescribeStackSetOperationOutput; +(function (DescribeStackSetOperationOutput) { + DescribeStackSetOperationOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStackSetOperationOutput = exports.DescribeStackSetOperationOutput || (exports.DescribeStackSetOperationOutput = {})); +var OperationNotFoundException; +(function (OperationNotFoundException) { + OperationNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(OperationNotFoundException = exports.OperationNotFoundException || (exports.OperationNotFoundException = {})); +var DescribeTypeInput; +(function (DescribeTypeInput) { + DescribeTypeInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeTypeInput = exports.DescribeTypeInput || (exports.DescribeTypeInput = {})); +var LoggingConfig; +(function (LoggingConfig) { + LoggingConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LoggingConfig = exports.LoggingConfig || (exports.LoggingConfig = {})); +var DescribeTypeOutput; +(function (DescribeTypeOutput) { + DescribeTypeOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeTypeOutput = exports.DescribeTypeOutput || (exports.DescribeTypeOutput = {})); +var DescribeTypeRegistrationInput; +(function (DescribeTypeRegistrationInput) { + DescribeTypeRegistrationInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeTypeRegistrationInput = exports.DescribeTypeRegistrationInput || (exports.DescribeTypeRegistrationInput = {})); +var DescribeTypeRegistrationOutput; +(function (DescribeTypeRegistrationOutput) { + DescribeTypeRegistrationOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeTypeRegistrationOutput = exports.DescribeTypeRegistrationOutput || (exports.DescribeTypeRegistrationOutput = {})); +var DetectStackDriftInput; +(function (DetectStackDriftInput) { + DetectStackDriftInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetectStackDriftInput = exports.DetectStackDriftInput || (exports.DetectStackDriftInput = {})); +var DetectStackDriftOutput; +(function (DetectStackDriftOutput) { + DetectStackDriftOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetectStackDriftOutput = exports.DetectStackDriftOutput || (exports.DetectStackDriftOutput = {})); +var DetectStackResourceDriftInput; +(function (DetectStackResourceDriftInput) { + DetectStackResourceDriftInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetectStackResourceDriftInput = exports.DetectStackResourceDriftInput || (exports.DetectStackResourceDriftInput = {})); +var DetectStackResourceDriftOutput; +(function (DetectStackResourceDriftOutput) { + DetectStackResourceDriftOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetectStackResourceDriftOutput = exports.DetectStackResourceDriftOutput || (exports.DetectStackResourceDriftOutput = {})); +var DetectStackSetDriftInput; +(function (DetectStackSetDriftInput) { + DetectStackSetDriftInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetectStackSetDriftInput = exports.DetectStackSetDriftInput || (exports.DetectStackSetDriftInput = {})); +var DetectStackSetDriftOutput; +(function (DetectStackSetDriftOutput) { + DetectStackSetDriftOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetectStackSetDriftOutput = exports.DetectStackSetDriftOutput || (exports.DetectStackSetDriftOutput = {})); +var EstimateTemplateCostInput; +(function (EstimateTemplateCostInput) { + EstimateTemplateCostInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EstimateTemplateCostInput = exports.EstimateTemplateCostInput || (exports.EstimateTemplateCostInput = {})); +var EstimateTemplateCostOutput; +(function (EstimateTemplateCostOutput) { + EstimateTemplateCostOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EstimateTemplateCostOutput = exports.EstimateTemplateCostOutput || (exports.EstimateTemplateCostOutput = {})); +var ExecuteChangeSetInput; +(function (ExecuteChangeSetInput) { + ExecuteChangeSetInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ExecuteChangeSetInput = exports.ExecuteChangeSetInput || (exports.ExecuteChangeSetInput = {})); +var ExecuteChangeSetOutput; +(function (ExecuteChangeSetOutput) { + ExecuteChangeSetOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ExecuteChangeSetOutput = exports.ExecuteChangeSetOutput || (exports.ExecuteChangeSetOutput = {})); +var GetStackPolicyInput; +(function (GetStackPolicyInput) { + GetStackPolicyInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetStackPolicyInput = exports.GetStackPolicyInput || (exports.GetStackPolicyInput = {})); +var GetStackPolicyOutput; +(function (GetStackPolicyOutput) { + GetStackPolicyOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetStackPolicyOutput = exports.GetStackPolicyOutput || (exports.GetStackPolicyOutput = {})); +var TemplateStage; +(function (TemplateStage) { + TemplateStage["Original"] = "Original"; + TemplateStage["Processed"] = "Processed"; +})(TemplateStage = exports.TemplateStage || (exports.TemplateStage = {})); +var GetTemplateInput; +(function (GetTemplateInput) { + GetTemplateInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetTemplateInput = exports.GetTemplateInput || (exports.GetTemplateInput = {})); +var GetTemplateOutput; +(function (GetTemplateOutput) { + GetTemplateOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetTemplateOutput = exports.GetTemplateOutput || (exports.GetTemplateOutput = {})); +var GetTemplateSummaryInput; +(function (GetTemplateSummaryInput) { + GetTemplateSummaryInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetTemplateSummaryInput = exports.GetTemplateSummaryInput || (exports.GetTemplateSummaryInput = {})); +var ParameterConstraints; +(function (ParameterConstraints) { + ParameterConstraints.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ParameterConstraints = exports.ParameterConstraints || (exports.ParameterConstraints = {})); +var ParameterDeclaration; +(function (ParameterDeclaration) { + ParameterDeclaration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ParameterDeclaration = exports.ParameterDeclaration || (exports.ParameterDeclaration = {})); +var ResourceIdentifierSummary; +(function (ResourceIdentifierSummary) { + ResourceIdentifierSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceIdentifierSummary = exports.ResourceIdentifierSummary || (exports.ResourceIdentifierSummary = {})); +var GetTemplateSummaryOutput; +(function (GetTemplateSummaryOutput) { + GetTemplateSummaryOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetTemplateSummaryOutput = exports.GetTemplateSummaryOutput || (exports.GetTemplateSummaryOutput = {})); +var ListChangeSetsInput; +(function (ListChangeSetsInput) { + ListChangeSetsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListChangeSetsInput = exports.ListChangeSetsInput || (exports.ListChangeSetsInput = {})); +var ListChangeSetsOutput; +(function (ListChangeSetsOutput) { + ListChangeSetsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListChangeSetsOutput = exports.ListChangeSetsOutput || (exports.ListChangeSetsOutput = {})); +var ListExportsInput; +(function (ListExportsInput) { + ListExportsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListExportsInput = exports.ListExportsInput || (exports.ListExportsInput = {})); +var Export; +(function (Export) { + Export.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Export = exports.Export || (exports.Export = {})); +var ListExportsOutput; +(function (ListExportsOutput) { + ListExportsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListExportsOutput = exports.ListExportsOutput || (exports.ListExportsOutput = {})); +var ListImportsInput; +(function (ListImportsInput) { + ListImportsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListImportsInput = exports.ListImportsInput || (exports.ListImportsInput = {})); +var ListImportsOutput; +(function (ListImportsOutput) { + ListImportsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListImportsOutput = exports.ListImportsOutput || (exports.ListImportsOutput = {})); +var StackInstanceFilter; +(function (StackInstanceFilter) { + StackInstanceFilter.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackInstanceFilter = exports.StackInstanceFilter || (exports.StackInstanceFilter = {})); +var ListStackInstancesInput; +(function (ListStackInstancesInput) { + ListStackInstancesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStackInstancesInput = exports.ListStackInstancesInput || (exports.ListStackInstancesInput = {})); +var StackInstanceSummary; +(function (StackInstanceSummary) { + StackInstanceSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackInstanceSummary = exports.StackInstanceSummary || (exports.StackInstanceSummary = {})); +var ListStackInstancesOutput; +(function (ListStackInstancesOutput) { + ListStackInstancesOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStackInstancesOutput = exports.ListStackInstancesOutput || (exports.ListStackInstancesOutput = {})); +var ListStackResourcesInput; +(function (ListStackResourcesInput) { + ListStackResourcesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStackResourcesInput = exports.ListStackResourcesInput || (exports.ListStackResourcesInput = {})); +var StackResourceDriftInformationSummary; +(function (StackResourceDriftInformationSummary) { + StackResourceDriftInformationSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackResourceDriftInformationSummary = exports.StackResourceDriftInformationSummary || (exports.StackResourceDriftInformationSummary = {})); +var StackResourceSummary; +(function (StackResourceSummary) { + StackResourceSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackResourceSummary = exports.StackResourceSummary || (exports.StackResourceSummary = {})); +var ListStackResourcesOutput; +(function (ListStackResourcesOutput) { + ListStackResourcesOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStackResourcesOutput = exports.ListStackResourcesOutput || (exports.ListStackResourcesOutput = {})); +var ListStacksInput; +(function (ListStacksInput) { + ListStacksInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStacksInput = exports.ListStacksInput || (exports.ListStacksInput = {})); +var StackDriftInformationSummary; +(function (StackDriftInformationSummary) { + StackDriftInformationSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackDriftInformationSummary = exports.StackDriftInformationSummary || (exports.StackDriftInformationSummary = {})); +var StackSummary; +(function (StackSummary) { + StackSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackSummary = exports.StackSummary || (exports.StackSummary = {})); +var ListStacksOutput; +(function (ListStacksOutput) { + ListStacksOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStacksOutput = exports.ListStacksOutput || (exports.ListStacksOutput = {})); +var ListStackSetOperationResultsInput; +(function (ListStackSetOperationResultsInput) { + ListStackSetOperationResultsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStackSetOperationResultsInput = exports.ListStackSetOperationResultsInput || (exports.ListStackSetOperationResultsInput = {})); +var StackSetOperationResultSummary; +(function (StackSetOperationResultSummary) { + StackSetOperationResultSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackSetOperationResultSummary = exports.StackSetOperationResultSummary || (exports.StackSetOperationResultSummary = {})); +var ListStackSetOperationResultsOutput; +(function (ListStackSetOperationResultsOutput) { + ListStackSetOperationResultsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStackSetOperationResultsOutput = exports.ListStackSetOperationResultsOutput || (exports.ListStackSetOperationResultsOutput = {})); +var ListStackSetOperationsInput; +(function (ListStackSetOperationsInput) { + ListStackSetOperationsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStackSetOperationsInput = exports.ListStackSetOperationsInput || (exports.ListStackSetOperationsInput = {})); +var StackSetOperationSummary; +(function (StackSetOperationSummary) { + StackSetOperationSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackSetOperationSummary = exports.StackSetOperationSummary || (exports.StackSetOperationSummary = {})); +var ListStackSetOperationsOutput; +(function (ListStackSetOperationsOutput) { + ListStackSetOperationsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStackSetOperationsOutput = exports.ListStackSetOperationsOutput || (exports.ListStackSetOperationsOutput = {})); +var ListStackSetsInput; +(function (ListStackSetsInput) { + ListStackSetsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStackSetsInput = exports.ListStackSetsInput || (exports.ListStackSetsInput = {})); +var StackSetSummary; +(function (StackSetSummary) { + StackSetSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StackSetSummary = exports.StackSetSummary || (exports.StackSetSummary = {})); +var ListStackSetsOutput; +(function (ListStackSetsOutput) { + ListStackSetsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStackSetsOutput = exports.ListStackSetsOutput || (exports.ListStackSetsOutput = {})); +var ListTypeRegistrationsInput; +(function (ListTypeRegistrationsInput) { + ListTypeRegistrationsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTypeRegistrationsInput = exports.ListTypeRegistrationsInput || (exports.ListTypeRegistrationsInput = {})); +var ListTypeRegistrationsOutput; +(function (ListTypeRegistrationsOutput) { + ListTypeRegistrationsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTypeRegistrationsOutput = exports.ListTypeRegistrationsOutput || (exports.ListTypeRegistrationsOutput = {})); +var ListTypesInput; +(function (ListTypesInput) { + ListTypesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTypesInput = exports.ListTypesInput || (exports.ListTypesInput = {})); +var TypeSummary; +(function (TypeSummary) { + TypeSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TypeSummary = exports.TypeSummary || (exports.TypeSummary = {})); +var ListTypesOutput; +(function (ListTypesOutput) { + ListTypesOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTypesOutput = exports.ListTypesOutput || (exports.ListTypesOutput = {})); +var ListTypeVersionsInput; +(function (ListTypeVersionsInput) { + ListTypeVersionsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTypeVersionsInput = exports.ListTypeVersionsInput || (exports.ListTypeVersionsInput = {})); +var TypeVersionSummary; +(function (TypeVersionSummary) { + TypeVersionSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TypeVersionSummary = exports.TypeVersionSummary || (exports.TypeVersionSummary = {})); +var ListTypeVersionsOutput; +(function (ListTypeVersionsOutput) { + ListTypeVersionsOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTypeVersionsOutput = exports.ListTypeVersionsOutput || (exports.ListTypeVersionsOutput = {})); +var InvalidStateTransitionException; +(function (InvalidStateTransitionException) { + InvalidStateTransitionException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidStateTransitionException = exports.InvalidStateTransitionException || (exports.InvalidStateTransitionException = {})); +var OperationStatusCheckFailedException; +(function (OperationStatusCheckFailedException) { + OperationStatusCheckFailedException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(OperationStatusCheckFailedException = exports.OperationStatusCheckFailedException || (exports.OperationStatusCheckFailedException = {})); +var OperationStatus; +(function (OperationStatus) { + OperationStatus["FAILED"] = "FAILED"; + OperationStatus["IN_PROGRESS"] = "IN_PROGRESS"; + OperationStatus["PENDING"] = "PENDING"; + OperationStatus["SUCCESS"] = "SUCCESS"; +})(OperationStatus = exports.OperationStatus || (exports.OperationStatus = {})); +var HandlerErrorCode; +(function (HandlerErrorCode) { + HandlerErrorCode["AccessDenied"] = "AccessDenied"; + HandlerErrorCode["AlreadyExists"] = "AlreadyExists"; + HandlerErrorCode["GeneralServiceException"] = "GeneralServiceException"; + HandlerErrorCode["InternalFailure"] = "InternalFailure"; + HandlerErrorCode["InvalidCredentials"] = "InvalidCredentials"; + HandlerErrorCode["InvalidRequest"] = "InvalidRequest"; + HandlerErrorCode["NetworkFailure"] = "NetworkFailure"; + HandlerErrorCode["NotFound"] = "NotFound"; + HandlerErrorCode["NotUpdatable"] = "NotUpdatable"; + HandlerErrorCode["ResourceConflict"] = "ResourceConflict"; + HandlerErrorCode["ServiceInternalError"] = "ServiceInternalError"; + HandlerErrorCode["ServiceLimitExceeded"] = "ServiceLimitExceeded"; + HandlerErrorCode["ServiceTimeout"] = "NotStabilized"; + HandlerErrorCode["Throttling"] = "Throttling"; +})(HandlerErrorCode = exports.HandlerErrorCode || (exports.HandlerErrorCode = {})); +var RecordHandlerProgressInput; +(function (RecordHandlerProgressInput) { + RecordHandlerProgressInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RecordHandlerProgressInput = exports.RecordHandlerProgressInput || (exports.RecordHandlerProgressInput = {})); +var RecordHandlerProgressOutput; +(function (RecordHandlerProgressOutput) { + RecordHandlerProgressOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RecordHandlerProgressOutput = exports.RecordHandlerProgressOutput || (exports.RecordHandlerProgressOutput = {})); +var RegisterTypeInput; +(function (RegisterTypeInput) { + RegisterTypeInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegisterTypeInput = exports.RegisterTypeInput || (exports.RegisterTypeInput = {})); +var RegisterTypeOutput; +(function (RegisterTypeOutput) { + RegisterTypeOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegisterTypeOutput = exports.RegisterTypeOutput || (exports.RegisterTypeOutput = {})); +var SetStackPolicyInput; +(function (SetStackPolicyInput) { + SetStackPolicyInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetStackPolicyInput = exports.SetStackPolicyInput || (exports.SetStackPolicyInput = {})); +var SetTypeDefaultVersionInput; +(function (SetTypeDefaultVersionInput) { + SetTypeDefaultVersionInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetTypeDefaultVersionInput = exports.SetTypeDefaultVersionInput || (exports.SetTypeDefaultVersionInput = {})); +var SetTypeDefaultVersionOutput; +(function (SetTypeDefaultVersionOutput) { + SetTypeDefaultVersionOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetTypeDefaultVersionOutput = exports.SetTypeDefaultVersionOutput || (exports.SetTypeDefaultVersionOutput = {})); +var ResourceSignalStatus; +(function (ResourceSignalStatus) { + ResourceSignalStatus["FAILURE"] = "FAILURE"; + ResourceSignalStatus["SUCCESS"] = "SUCCESS"; +})(ResourceSignalStatus = exports.ResourceSignalStatus || (exports.ResourceSignalStatus = {})); +var SignalResourceInput; +(function (SignalResourceInput) { + SignalResourceInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SignalResourceInput = exports.SignalResourceInput || (exports.SignalResourceInput = {})); +var StopStackSetOperationInput; +(function (StopStackSetOperationInput) { + StopStackSetOperationInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StopStackSetOperationInput = exports.StopStackSetOperationInput || (exports.StopStackSetOperationInput = {})); +var StopStackSetOperationOutput; +(function (StopStackSetOperationOutput) { + StopStackSetOperationOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StopStackSetOperationOutput = exports.StopStackSetOperationOutput || (exports.StopStackSetOperationOutput = {})); +var UpdateStackInput; +(function (UpdateStackInput) { + UpdateStackInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateStackInput = exports.UpdateStackInput || (exports.UpdateStackInput = {})); +var UpdateStackOutput; +(function (UpdateStackOutput) { + UpdateStackOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateStackOutput = exports.UpdateStackOutput || (exports.UpdateStackOutput = {})); +var UpdateStackInstancesInput; +(function (UpdateStackInstancesInput) { + UpdateStackInstancesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateStackInstancesInput = exports.UpdateStackInstancesInput || (exports.UpdateStackInstancesInput = {})); +var UpdateStackInstancesOutput; +(function (UpdateStackInstancesOutput) { + UpdateStackInstancesOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateStackInstancesOutput = exports.UpdateStackInstancesOutput || (exports.UpdateStackInstancesOutput = {})); +var UpdateStackSetInput; +(function (UpdateStackSetInput) { + UpdateStackSetInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateStackSetInput = exports.UpdateStackSetInput || (exports.UpdateStackSetInput = {})); +var UpdateStackSetOutput; +(function (UpdateStackSetOutput) { + UpdateStackSetOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateStackSetOutput = exports.UpdateStackSetOutput || (exports.UpdateStackSetOutput = {})); +var UpdateTerminationProtectionInput; +(function (UpdateTerminationProtectionInput) { + UpdateTerminationProtectionInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateTerminationProtectionInput = exports.UpdateTerminationProtectionInput || (exports.UpdateTerminationProtectionInput = {})); +var UpdateTerminationProtectionOutput; +(function (UpdateTerminationProtectionOutput) { + UpdateTerminationProtectionOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateTerminationProtectionOutput = exports.UpdateTerminationProtectionOutput || (exports.UpdateTerminationProtectionOutput = {})); +var ValidateTemplateInput; +(function (ValidateTemplateInput) { + ValidateTemplateInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ValidateTemplateInput = exports.ValidateTemplateInput || (exports.ValidateTemplateInput = {})); +var TemplateParameter; +(function (TemplateParameter) { + TemplateParameter.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TemplateParameter = exports.TemplateParameter || (exports.TemplateParameter = {})); +var ValidateTemplateOutput; +(function (ValidateTemplateOutput) { + ValidateTemplateOutput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ValidateTemplateOutput = exports.ValidateTemplateOutput || (exports.ValidateTemplateOutput = {})); +//# sourceMappingURL=models_0.js.map + +/***/ }), + +/***/ 93821: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeAccountLimits = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const DescribeAccountLimitsCommand_1 = __nccwpck_require__(67719); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new DescribeAccountLimitsCommand_1.DescribeAccountLimitsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.describeAccountLimits(input, ...args); +}; +async function* paginateDescribeAccountLimits(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateDescribeAccountLimits = paginateDescribeAccountLimits; +//# sourceMappingURL=DescribeAccountLimitsPaginator.js.map + +/***/ }), + +/***/ 77993: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeStackEvents = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const DescribeStackEventsCommand_1 = __nccwpck_require__(99902); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new DescribeStackEventsCommand_1.DescribeStackEventsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.describeStackEvents(input, ...args); +}; +async function* paginateDescribeStackEvents(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateDescribeStackEvents = paginateDescribeStackEvents; +//# sourceMappingURL=DescribeStackEventsPaginator.js.map + +/***/ }), + +/***/ 5335: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeStackResourceDrifts = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const DescribeStackResourceDriftsCommand_1 = __nccwpck_require__(25794); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new DescribeStackResourceDriftsCommand_1.DescribeStackResourceDriftsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.describeStackResourceDrifts(input, ...args); +}; +async function* paginateDescribeStackResourceDrifts(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateDescribeStackResourceDrifts = paginateDescribeStackResourceDrifts; +//# sourceMappingURL=DescribeStackResourceDriftsPaginator.js.map + +/***/ }), + +/***/ 66474: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeStacks = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const DescribeStacksCommand_1 = __nccwpck_require__(87840); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new DescribeStacksCommand_1.DescribeStacksCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.describeStacks(input, ...args); +}; +async function* paginateDescribeStacks(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateDescribeStacks = paginateDescribeStacks; +//# sourceMappingURL=DescribeStacksPaginator.js.map + +/***/ }), + +/***/ 59638: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=Interfaces.js.map + +/***/ }), + +/***/ 7377: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListChangeSets = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListChangeSetsCommand_1 = __nccwpck_require__(99706); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListChangeSetsCommand_1.ListChangeSetsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listChangeSets(input, ...args); +}; +async function* paginateListChangeSets(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListChangeSets = paginateListChangeSets; +//# sourceMappingURL=ListChangeSetsPaginator.js.map + +/***/ }), + +/***/ 9252: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListExports = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListExportsCommand_1 = __nccwpck_require__(60351); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListExportsCommand_1.ListExportsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listExports(input, ...args); +}; +async function* paginateListExports(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListExports = paginateListExports; +//# sourceMappingURL=ListExportsPaginator.js.map + +/***/ }), + +/***/ 64976: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListImports = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListImportsCommand_1 = __nccwpck_require__(72171); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListImportsCommand_1.ListImportsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listImports(input, ...args); +}; +async function* paginateListImports(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListImports = paginateListImports; +//# sourceMappingURL=ListImportsPaginator.js.map + +/***/ }), + +/***/ 99936: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListStackInstances = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListStackInstancesCommand_1 = __nccwpck_require__(50991); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListStackInstancesCommand_1.ListStackInstancesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listStackInstances(input, ...args); +}; +async function* paginateListStackInstances(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListStackInstances = paginateListStackInstances; +//# sourceMappingURL=ListStackInstancesPaginator.js.map + +/***/ }), + +/***/ 55268: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListStackResources = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListStackResourcesCommand_1 = __nccwpck_require__(83057); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListStackResourcesCommand_1.ListStackResourcesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listStackResources(input, ...args); +}; +async function* paginateListStackResources(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListStackResources = paginateListStackResources; +//# sourceMappingURL=ListStackResourcesPaginator.js.map + +/***/ }), + +/***/ 67014: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListStackSetOperationResults = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListStackSetOperationResultsCommand_1 = __nccwpck_require__(71155); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListStackSetOperationResultsCommand_1.ListStackSetOperationResultsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listStackSetOperationResults(input, ...args); +}; +async function* paginateListStackSetOperationResults(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListStackSetOperationResults = paginateListStackSetOperationResults; +//# sourceMappingURL=ListStackSetOperationResultsPaginator.js.map + +/***/ }), + +/***/ 73469: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListStackSetOperations = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListStackSetOperationsCommand_1 = __nccwpck_require__(62539); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListStackSetOperationsCommand_1.ListStackSetOperationsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listStackSetOperations(input, ...args); +}; +async function* paginateListStackSetOperations(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListStackSetOperations = paginateListStackSetOperations; +//# sourceMappingURL=ListStackSetOperationsPaginator.js.map + +/***/ }), + +/***/ 14034: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListStackSets = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListStackSetsCommand_1 = __nccwpck_require__(40722); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListStackSetsCommand_1.ListStackSetsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listStackSets(input, ...args); +}; +async function* paginateListStackSets(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListStackSets = paginateListStackSets; +//# sourceMappingURL=ListStackSetsPaginator.js.map + +/***/ }), + +/***/ 3533: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListStacks = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListStacksCommand_1 = __nccwpck_require__(54482); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListStacksCommand_1.ListStacksCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listStacks(input, ...args); +}; +async function* paginateListStacks(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListStacks = paginateListStacks; +//# sourceMappingURL=ListStacksPaginator.js.map + +/***/ }), + +/***/ 43356: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListTypeRegistrations = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListTypeRegistrationsCommand_1 = __nccwpck_require__(34567); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListTypeRegistrationsCommand_1.ListTypeRegistrationsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listTypeRegistrations(input, ...args); +}; +async function* paginateListTypeRegistrations(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListTypeRegistrations = paginateListTypeRegistrations; +//# sourceMappingURL=ListTypeRegistrationsPaginator.js.map + +/***/ }), + +/***/ 89809: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListTypeVersions = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListTypeVersionsCommand_1 = __nccwpck_require__(72174); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListTypeVersionsCommand_1.ListTypeVersionsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listTypeVersions(input, ...args); +}; +async function* paginateListTypeVersions(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListTypeVersions = paginateListTypeVersions; +//# sourceMappingURL=ListTypeVersionsPaginator.js.map + +/***/ }), + +/***/ 16689: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListTypes = void 0; +const CloudFormation_1 = __nccwpck_require__(44074); +const CloudFormationClient_1 = __nccwpck_require__(25838); +const ListTypesCommand_1 = __nccwpck_require__(5511); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListTypesCommand_1.ListTypesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listTypes(input, ...args); +}; +async function* paginateListTypes(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CloudFormation_1.CloudFormation) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CloudFormationClient_1.CloudFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CloudFormation | CloudFormationClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListTypes = paginateListTypes; +//# sourceMappingURL=ListTypesPaginator.js.map + +/***/ }), + +/***/ 46408: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.serializeAws_queryStopStackSetOperationCommand = exports.serializeAws_querySignalResourceCommand = exports.serializeAws_querySetTypeDefaultVersionCommand = exports.serializeAws_querySetStackPolicyCommand = exports.serializeAws_queryRegisterTypeCommand = exports.serializeAws_queryRecordHandlerProgressCommand = exports.serializeAws_queryListTypeVersionsCommand = exports.serializeAws_queryListTypesCommand = exports.serializeAws_queryListTypeRegistrationsCommand = exports.serializeAws_queryListStackSetsCommand = exports.serializeAws_queryListStackSetOperationsCommand = exports.serializeAws_queryListStackSetOperationResultsCommand = exports.serializeAws_queryListStacksCommand = exports.serializeAws_queryListStackResourcesCommand = exports.serializeAws_queryListStackInstancesCommand = exports.serializeAws_queryListImportsCommand = exports.serializeAws_queryListExportsCommand = exports.serializeAws_queryListChangeSetsCommand = exports.serializeAws_queryGetTemplateSummaryCommand = exports.serializeAws_queryGetTemplateCommand = exports.serializeAws_queryGetStackPolicyCommand = exports.serializeAws_queryExecuteChangeSetCommand = exports.serializeAws_queryEstimateTemplateCostCommand = exports.serializeAws_queryDetectStackSetDriftCommand = exports.serializeAws_queryDetectStackResourceDriftCommand = exports.serializeAws_queryDetectStackDriftCommand = exports.serializeAws_queryDescribeTypeRegistrationCommand = exports.serializeAws_queryDescribeTypeCommand = exports.serializeAws_queryDescribeStackSetOperationCommand = exports.serializeAws_queryDescribeStackSetCommand = exports.serializeAws_queryDescribeStacksCommand = exports.serializeAws_queryDescribeStackResourcesCommand = exports.serializeAws_queryDescribeStackResourceDriftsCommand = exports.serializeAws_queryDescribeStackResourceCommand = exports.serializeAws_queryDescribeStackInstanceCommand = exports.serializeAws_queryDescribeStackEventsCommand = exports.serializeAws_queryDescribeStackDriftDetectionStatusCommand = exports.serializeAws_queryDescribeChangeSetCommand = exports.serializeAws_queryDescribeAccountLimitsCommand = exports.serializeAws_queryDeregisterTypeCommand = exports.serializeAws_queryDeleteStackSetCommand = exports.serializeAws_queryDeleteStackInstancesCommand = exports.serializeAws_queryDeleteStackCommand = exports.serializeAws_queryDeleteChangeSetCommand = exports.serializeAws_queryCreateStackSetCommand = exports.serializeAws_queryCreateStackInstancesCommand = exports.serializeAws_queryCreateStackCommand = exports.serializeAws_queryCreateChangeSetCommand = exports.serializeAws_queryContinueUpdateRollbackCommand = exports.serializeAws_queryCancelUpdateStackCommand = void 0; +exports.deserializeAws_queryRecordHandlerProgressCommand = exports.deserializeAws_queryListTypeVersionsCommand = exports.deserializeAws_queryListTypesCommand = exports.deserializeAws_queryListTypeRegistrationsCommand = exports.deserializeAws_queryListStackSetsCommand = exports.deserializeAws_queryListStackSetOperationsCommand = exports.deserializeAws_queryListStackSetOperationResultsCommand = exports.deserializeAws_queryListStacksCommand = exports.deserializeAws_queryListStackResourcesCommand = exports.deserializeAws_queryListStackInstancesCommand = exports.deserializeAws_queryListImportsCommand = exports.deserializeAws_queryListExportsCommand = exports.deserializeAws_queryListChangeSetsCommand = exports.deserializeAws_queryGetTemplateSummaryCommand = exports.deserializeAws_queryGetTemplateCommand = exports.deserializeAws_queryGetStackPolicyCommand = exports.deserializeAws_queryExecuteChangeSetCommand = exports.deserializeAws_queryEstimateTemplateCostCommand = exports.deserializeAws_queryDetectStackSetDriftCommand = exports.deserializeAws_queryDetectStackResourceDriftCommand = exports.deserializeAws_queryDetectStackDriftCommand = exports.deserializeAws_queryDescribeTypeRegistrationCommand = exports.deserializeAws_queryDescribeTypeCommand = exports.deserializeAws_queryDescribeStackSetOperationCommand = exports.deserializeAws_queryDescribeStackSetCommand = exports.deserializeAws_queryDescribeStacksCommand = exports.deserializeAws_queryDescribeStackResourcesCommand = exports.deserializeAws_queryDescribeStackResourceDriftsCommand = exports.deserializeAws_queryDescribeStackResourceCommand = exports.deserializeAws_queryDescribeStackInstanceCommand = exports.deserializeAws_queryDescribeStackEventsCommand = exports.deserializeAws_queryDescribeStackDriftDetectionStatusCommand = exports.deserializeAws_queryDescribeChangeSetCommand = exports.deserializeAws_queryDescribeAccountLimitsCommand = exports.deserializeAws_queryDeregisterTypeCommand = exports.deserializeAws_queryDeleteStackSetCommand = exports.deserializeAws_queryDeleteStackInstancesCommand = exports.deserializeAws_queryDeleteStackCommand = exports.deserializeAws_queryDeleteChangeSetCommand = exports.deserializeAws_queryCreateStackSetCommand = exports.deserializeAws_queryCreateStackInstancesCommand = exports.deserializeAws_queryCreateStackCommand = exports.deserializeAws_queryCreateChangeSetCommand = exports.deserializeAws_queryContinueUpdateRollbackCommand = exports.deserializeAws_queryCancelUpdateStackCommand = exports.serializeAws_queryValidateTemplateCommand = exports.serializeAws_queryUpdateTerminationProtectionCommand = exports.serializeAws_queryUpdateStackSetCommand = exports.serializeAws_queryUpdateStackInstancesCommand = exports.serializeAws_queryUpdateStackCommand = void 0; +exports.deserializeAws_queryValidateTemplateCommand = exports.deserializeAws_queryUpdateTerminationProtectionCommand = exports.deserializeAws_queryUpdateStackSetCommand = exports.deserializeAws_queryUpdateStackInstancesCommand = exports.deserializeAws_queryUpdateStackCommand = exports.deserializeAws_queryStopStackSetOperationCommand = exports.deserializeAws_querySignalResourceCommand = exports.deserializeAws_querySetTypeDefaultVersionCommand = exports.deserializeAws_querySetStackPolicyCommand = exports.deserializeAws_queryRegisterTypeCommand = void 0; +const protocol_http_1 = __nccwpck_require__(67498); +const smithy_client_1 = __nccwpck_require__(84060); +const fast_xml_parser_1 = __nccwpck_require__(27448); +const uuid_1 = __nccwpck_require__(2155); +const serializeAws_queryCancelUpdateStackCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryCancelUpdateStackInput(input, context), + Action: "CancelUpdateStack", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryCancelUpdateStackCommand = serializeAws_queryCancelUpdateStackCommand; +const serializeAws_queryContinueUpdateRollbackCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryContinueUpdateRollbackInput(input, context), + Action: "ContinueUpdateRollback", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryContinueUpdateRollbackCommand = serializeAws_queryContinueUpdateRollbackCommand; +const serializeAws_queryCreateChangeSetCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryCreateChangeSetInput(input, context), + Action: "CreateChangeSet", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryCreateChangeSetCommand = serializeAws_queryCreateChangeSetCommand; +const serializeAws_queryCreateStackCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryCreateStackInput(input, context), + Action: "CreateStack", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryCreateStackCommand = serializeAws_queryCreateStackCommand; +const serializeAws_queryCreateStackInstancesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryCreateStackInstancesInput(input, context), + Action: "CreateStackInstances", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryCreateStackInstancesCommand = serializeAws_queryCreateStackInstancesCommand; +const serializeAws_queryCreateStackSetCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryCreateStackSetInput(input, context), + Action: "CreateStackSet", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryCreateStackSetCommand = serializeAws_queryCreateStackSetCommand; +const serializeAws_queryDeleteChangeSetCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDeleteChangeSetInput(input, context), + Action: "DeleteChangeSet", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDeleteChangeSetCommand = serializeAws_queryDeleteChangeSetCommand; +const serializeAws_queryDeleteStackCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDeleteStackInput(input, context), + Action: "DeleteStack", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDeleteStackCommand = serializeAws_queryDeleteStackCommand; +const serializeAws_queryDeleteStackInstancesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDeleteStackInstancesInput(input, context), + Action: "DeleteStackInstances", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDeleteStackInstancesCommand = serializeAws_queryDeleteStackInstancesCommand; +const serializeAws_queryDeleteStackSetCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDeleteStackSetInput(input, context), + Action: "DeleteStackSet", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDeleteStackSetCommand = serializeAws_queryDeleteStackSetCommand; +const serializeAws_queryDeregisterTypeCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDeregisterTypeInput(input, context), + Action: "DeregisterType", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDeregisterTypeCommand = serializeAws_queryDeregisterTypeCommand; +const serializeAws_queryDescribeAccountLimitsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeAccountLimitsInput(input, context), + Action: "DescribeAccountLimits", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeAccountLimitsCommand = serializeAws_queryDescribeAccountLimitsCommand; +const serializeAws_queryDescribeChangeSetCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeChangeSetInput(input, context), + Action: "DescribeChangeSet", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeChangeSetCommand = serializeAws_queryDescribeChangeSetCommand; +const serializeAws_queryDescribeStackDriftDetectionStatusCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeStackDriftDetectionStatusInput(input, context), + Action: "DescribeStackDriftDetectionStatus", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeStackDriftDetectionStatusCommand = serializeAws_queryDescribeStackDriftDetectionStatusCommand; +const serializeAws_queryDescribeStackEventsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeStackEventsInput(input, context), + Action: "DescribeStackEvents", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeStackEventsCommand = serializeAws_queryDescribeStackEventsCommand; +const serializeAws_queryDescribeStackInstanceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeStackInstanceInput(input, context), + Action: "DescribeStackInstance", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeStackInstanceCommand = serializeAws_queryDescribeStackInstanceCommand; +const serializeAws_queryDescribeStackResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeStackResourceInput(input, context), + Action: "DescribeStackResource", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeStackResourceCommand = serializeAws_queryDescribeStackResourceCommand; +const serializeAws_queryDescribeStackResourceDriftsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeStackResourceDriftsInput(input, context), + Action: "DescribeStackResourceDrifts", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeStackResourceDriftsCommand = serializeAws_queryDescribeStackResourceDriftsCommand; +const serializeAws_queryDescribeStackResourcesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeStackResourcesInput(input, context), + Action: "DescribeStackResources", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeStackResourcesCommand = serializeAws_queryDescribeStackResourcesCommand; +const serializeAws_queryDescribeStacksCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeStacksInput(input, context), + Action: "DescribeStacks", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeStacksCommand = serializeAws_queryDescribeStacksCommand; +const serializeAws_queryDescribeStackSetCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeStackSetInput(input, context), + Action: "DescribeStackSet", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeStackSetCommand = serializeAws_queryDescribeStackSetCommand; +const serializeAws_queryDescribeStackSetOperationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeStackSetOperationInput(input, context), + Action: "DescribeStackSetOperation", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeStackSetOperationCommand = serializeAws_queryDescribeStackSetOperationCommand; +const serializeAws_queryDescribeTypeCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeTypeInput(input, context), + Action: "DescribeType", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeTypeCommand = serializeAws_queryDescribeTypeCommand; +const serializeAws_queryDescribeTypeRegistrationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDescribeTypeRegistrationInput(input, context), + Action: "DescribeTypeRegistration", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDescribeTypeRegistrationCommand = serializeAws_queryDescribeTypeRegistrationCommand; +const serializeAws_queryDetectStackDriftCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDetectStackDriftInput(input, context), + Action: "DetectStackDrift", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDetectStackDriftCommand = serializeAws_queryDetectStackDriftCommand; +const serializeAws_queryDetectStackResourceDriftCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDetectStackResourceDriftInput(input, context), + Action: "DetectStackResourceDrift", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDetectStackResourceDriftCommand = serializeAws_queryDetectStackResourceDriftCommand; +const serializeAws_queryDetectStackSetDriftCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDetectStackSetDriftInput(input, context), + Action: "DetectStackSetDrift", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDetectStackSetDriftCommand = serializeAws_queryDetectStackSetDriftCommand; +const serializeAws_queryEstimateTemplateCostCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryEstimateTemplateCostInput(input, context), + Action: "EstimateTemplateCost", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryEstimateTemplateCostCommand = serializeAws_queryEstimateTemplateCostCommand; +const serializeAws_queryExecuteChangeSetCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryExecuteChangeSetInput(input, context), + Action: "ExecuteChangeSet", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryExecuteChangeSetCommand = serializeAws_queryExecuteChangeSetCommand; +const serializeAws_queryGetStackPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryGetStackPolicyInput(input, context), + Action: "GetStackPolicy", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryGetStackPolicyCommand = serializeAws_queryGetStackPolicyCommand; +const serializeAws_queryGetTemplateCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryGetTemplateInput(input, context), + Action: "GetTemplate", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryGetTemplateCommand = serializeAws_queryGetTemplateCommand; +const serializeAws_queryGetTemplateSummaryCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryGetTemplateSummaryInput(input, context), + Action: "GetTemplateSummary", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryGetTemplateSummaryCommand = serializeAws_queryGetTemplateSummaryCommand; +const serializeAws_queryListChangeSetsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListChangeSetsInput(input, context), + Action: "ListChangeSets", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListChangeSetsCommand = serializeAws_queryListChangeSetsCommand; +const serializeAws_queryListExportsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListExportsInput(input, context), + Action: "ListExports", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListExportsCommand = serializeAws_queryListExportsCommand; +const serializeAws_queryListImportsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListImportsInput(input, context), + Action: "ListImports", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListImportsCommand = serializeAws_queryListImportsCommand; +const serializeAws_queryListStackInstancesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListStackInstancesInput(input, context), + Action: "ListStackInstances", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListStackInstancesCommand = serializeAws_queryListStackInstancesCommand; +const serializeAws_queryListStackResourcesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListStackResourcesInput(input, context), + Action: "ListStackResources", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListStackResourcesCommand = serializeAws_queryListStackResourcesCommand; +const serializeAws_queryListStacksCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListStacksInput(input, context), + Action: "ListStacks", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListStacksCommand = serializeAws_queryListStacksCommand; +const serializeAws_queryListStackSetOperationResultsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListStackSetOperationResultsInput(input, context), + Action: "ListStackSetOperationResults", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListStackSetOperationResultsCommand = serializeAws_queryListStackSetOperationResultsCommand; +const serializeAws_queryListStackSetOperationsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListStackSetOperationsInput(input, context), + Action: "ListStackSetOperations", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListStackSetOperationsCommand = serializeAws_queryListStackSetOperationsCommand; +const serializeAws_queryListStackSetsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListStackSetsInput(input, context), + Action: "ListStackSets", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListStackSetsCommand = serializeAws_queryListStackSetsCommand; +const serializeAws_queryListTypeRegistrationsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListTypeRegistrationsInput(input, context), + Action: "ListTypeRegistrations", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListTypeRegistrationsCommand = serializeAws_queryListTypeRegistrationsCommand; +const serializeAws_queryListTypesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListTypesInput(input, context), + Action: "ListTypes", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListTypesCommand = serializeAws_queryListTypesCommand; +const serializeAws_queryListTypeVersionsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListTypeVersionsInput(input, context), + Action: "ListTypeVersions", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListTypeVersionsCommand = serializeAws_queryListTypeVersionsCommand; +const serializeAws_queryRecordHandlerProgressCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryRecordHandlerProgressInput(input, context), + Action: "RecordHandlerProgress", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryRecordHandlerProgressCommand = serializeAws_queryRecordHandlerProgressCommand; +const serializeAws_queryRegisterTypeCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryRegisterTypeInput(input, context), + Action: "RegisterType", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryRegisterTypeCommand = serializeAws_queryRegisterTypeCommand; +const serializeAws_querySetStackPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_querySetStackPolicyInput(input, context), + Action: "SetStackPolicy", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_querySetStackPolicyCommand = serializeAws_querySetStackPolicyCommand; +const serializeAws_querySetTypeDefaultVersionCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_querySetTypeDefaultVersionInput(input, context), + Action: "SetTypeDefaultVersion", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_querySetTypeDefaultVersionCommand = serializeAws_querySetTypeDefaultVersionCommand; +const serializeAws_querySignalResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_querySignalResourceInput(input, context), + Action: "SignalResource", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_querySignalResourceCommand = serializeAws_querySignalResourceCommand; +const serializeAws_queryStopStackSetOperationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryStopStackSetOperationInput(input, context), + Action: "StopStackSetOperation", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryStopStackSetOperationCommand = serializeAws_queryStopStackSetOperationCommand; +const serializeAws_queryUpdateStackCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryUpdateStackInput(input, context), + Action: "UpdateStack", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryUpdateStackCommand = serializeAws_queryUpdateStackCommand; +const serializeAws_queryUpdateStackInstancesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryUpdateStackInstancesInput(input, context), + Action: "UpdateStackInstances", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryUpdateStackInstancesCommand = serializeAws_queryUpdateStackInstancesCommand; +const serializeAws_queryUpdateStackSetCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryUpdateStackSetInput(input, context), + Action: "UpdateStackSet", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryUpdateStackSetCommand = serializeAws_queryUpdateStackSetCommand; +const serializeAws_queryUpdateTerminationProtectionCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryUpdateTerminationProtectionInput(input, context), + Action: "UpdateTerminationProtection", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryUpdateTerminationProtectionCommand = serializeAws_queryUpdateTerminationProtectionCommand; +const serializeAws_queryValidateTemplateCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryValidateTemplateInput(input, context), + Action: "ValidateTemplate", + Version: "2010-05-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryValidateTemplateCommand = serializeAws_queryValidateTemplateCommand; +const deserializeAws_queryCancelUpdateStackCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryCancelUpdateStackCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryCancelUpdateStackCommand = deserializeAws_queryCancelUpdateStackCommand; +const deserializeAws_queryCancelUpdateStackCommandError = 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 "TokenAlreadyExistsException": + case "com.amazonaws.cloudformation#TokenAlreadyExistsException": + response = { + ...(await deserializeAws_queryTokenAlreadyExistsExceptionResponse(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_queryContinueUpdateRollbackCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryContinueUpdateRollbackCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryContinueUpdateRollbackOutput(data.ContinueUpdateRollbackResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryContinueUpdateRollbackCommand = deserializeAws_queryContinueUpdateRollbackCommand; +const deserializeAws_queryContinueUpdateRollbackCommandError = 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 "TokenAlreadyExistsException": + case "com.amazonaws.cloudformation#TokenAlreadyExistsException": + response = { + ...(await deserializeAws_queryTokenAlreadyExistsExceptionResponse(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_queryCreateChangeSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryCreateChangeSetCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryCreateChangeSetOutput(data.CreateChangeSetResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryCreateChangeSetCommand = deserializeAws_queryCreateChangeSetCommand; +const deserializeAws_queryCreateChangeSetCommandError = 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 "AlreadyExistsException": + case "com.amazonaws.cloudformation#AlreadyExistsException": + response = { + ...(await deserializeAws_queryAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InsufficientCapabilitiesException": + case "com.amazonaws.cloudformation#InsufficientCapabilitiesException": + response = { + ...(await deserializeAws_queryInsufficientCapabilitiesExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cloudformation#LimitExceededException": + response = { + ...(await deserializeAws_queryLimitExceededExceptionResponse(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_queryCreateStackCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryCreateStackCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryCreateStackOutput(data.CreateStackResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryCreateStackCommand = deserializeAws_queryCreateStackCommand; +const deserializeAws_queryCreateStackCommandError = 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 "AlreadyExistsException": + case "com.amazonaws.cloudformation#AlreadyExistsException": + response = { + ...(await deserializeAws_queryAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InsufficientCapabilitiesException": + case "com.amazonaws.cloudformation#InsufficientCapabilitiesException": + response = { + ...(await deserializeAws_queryInsufficientCapabilitiesExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cloudformation#LimitExceededException": + response = { + ...(await deserializeAws_queryLimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TokenAlreadyExistsException": + case "com.amazonaws.cloudformation#TokenAlreadyExistsException": + response = { + ...(await deserializeAws_queryTokenAlreadyExistsExceptionResponse(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_queryCreateStackInstancesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryCreateStackInstancesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryCreateStackInstancesOutput(data.CreateStackInstancesResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryCreateStackInstancesCommand = deserializeAws_queryCreateStackInstancesCommand; +const deserializeAws_queryCreateStackInstancesCommandError = 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 "InvalidOperationException": + case "com.amazonaws.cloudformation#InvalidOperationException": + response = { + ...(await deserializeAws_queryInvalidOperationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cloudformation#LimitExceededException": + response = { + ...(await deserializeAws_queryLimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationIdAlreadyExistsException": + case "com.amazonaws.cloudformation#OperationIdAlreadyExistsException": + response = { + ...(await deserializeAws_queryOperationIdAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationInProgressException": + case "com.amazonaws.cloudformation#OperationInProgressException": + response = { + ...(await deserializeAws_queryOperationInProgressExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StaleRequestException": + case "com.amazonaws.cloudformation#StaleRequestException": + response = { + ...(await deserializeAws_queryStaleRequestExceptionResponse(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_queryCreateStackSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryCreateStackSetCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryCreateStackSetOutput(data.CreateStackSetResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryCreateStackSetCommand = deserializeAws_queryCreateStackSetCommand; +const deserializeAws_queryCreateStackSetCommandError = 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 "CreatedButModifiedException": + case "com.amazonaws.cloudformation#CreatedButModifiedException": + response = { + ...(await deserializeAws_queryCreatedButModifiedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cloudformation#LimitExceededException": + response = { + ...(await deserializeAws_queryLimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NameAlreadyExistsException": + case "com.amazonaws.cloudformation#NameAlreadyExistsException": + response = { + ...(await deserializeAws_queryNameAlreadyExistsExceptionResponse(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_queryDeleteChangeSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDeleteChangeSetCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDeleteChangeSetOutput(data.DeleteChangeSetResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDeleteChangeSetCommand = deserializeAws_queryDeleteChangeSetCommand; +const deserializeAws_queryDeleteChangeSetCommandError = 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 "InvalidChangeSetStatusException": + case "com.amazonaws.cloudformation#InvalidChangeSetStatusException": + response = { + ...(await deserializeAws_queryInvalidChangeSetStatusExceptionResponse(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_queryDeleteStackCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDeleteStackCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDeleteStackCommand = deserializeAws_queryDeleteStackCommand; +const deserializeAws_queryDeleteStackCommandError = 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 "TokenAlreadyExistsException": + case "com.amazonaws.cloudformation#TokenAlreadyExistsException": + response = { + ...(await deserializeAws_queryTokenAlreadyExistsExceptionResponse(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_queryDeleteStackInstancesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDeleteStackInstancesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDeleteStackInstancesOutput(data.DeleteStackInstancesResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDeleteStackInstancesCommand = deserializeAws_queryDeleteStackInstancesCommand; +const deserializeAws_queryDeleteStackInstancesCommandError = 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 "InvalidOperationException": + case "com.amazonaws.cloudformation#InvalidOperationException": + response = { + ...(await deserializeAws_queryInvalidOperationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationIdAlreadyExistsException": + case "com.amazonaws.cloudformation#OperationIdAlreadyExistsException": + response = { + ...(await deserializeAws_queryOperationIdAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationInProgressException": + case "com.amazonaws.cloudformation#OperationInProgressException": + response = { + ...(await deserializeAws_queryOperationInProgressExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StaleRequestException": + case "com.amazonaws.cloudformation#StaleRequestException": + response = { + ...(await deserializeAws_queryStaleRequestExceptionResponse(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_queryDeleteStackSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDeleteStackSetCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDeleteStackSetOutput(data.DeleteStackSetResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDeleteStackSetCommand = deserializeAws_queryDeleteStackSetCommand; +const deserializeAws_queryDeleteStackSetCommandError = 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 "OperationInProgressException": + case "com.amazonaws.cloudformation#OperationInProgressException": + response = { + ...(await deserializeAws_queryOperationInProgressExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackSetNotEmptyException": + case "com.amazonaws.cloudformation#StackSetNotEmptyException": + response = { + ...(await deserializeAws_queryStackSetNotEmptyExceptionResponse(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_queryDeregisterTypeCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDeregisterTypeCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDeregisterTypeOutput(data.DeregisterTypeResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDeregisterTypeCommand = deserializeAws_queryDeregisterTypeCommand; +const deserializeAws_queryDeregisterTypeCommandError = 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 "CFNRegistryException": + case "com.amazonaws.cloudformation#CFNRegistryException": + response = { + ...(await deserializeAws_queryCFNRegistryExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TypeNotFoundException": + case "com.amazonaws.cloudformation#TypeNotFoundException": + response = { + ...(await deserializeAws_queryTypeNotFoundExceptionResponse(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_queryDescribeAccountLimitsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeAccountLimitsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeAccountLimitsOutput(data.DescribeAccountLimitsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeAccountLimitsCommand = deserializeAws_queryDescribeAccountLimitsCommand; +const deserializeAws_queryDescribeAccountLimitsCommandError = 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_queryDescribeChangeSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeChangeSetCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeChangeSetOutput(data.DescribeChangeSetResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeChangeSetCommand = deserializeAws_queryDescribeChangeSetCommand; +const deserializeAws_queryDescribeChangeSetCommandError = 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 "ChangeSetNotFoundException": + case "com.amazonaws.cloudformation#ChangeSetNotFoundException": + response = { + ...(await deserializeAws_queryChangeSetNotFoundExceptionResponse(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_queryDescribeStackDriftDetectionStatusCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeStackDriftDetectionStatusCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeStackDriftDetectionStatusOutput(data.DescribeStackDriftDetectionStatusResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeStackDriftDetectionStatusCommand = deserializeAws_queryDescribeStackDriftDetectionStatusCommand; +const deserializeAws_queryDescribeStackDriftDetectionStatusCommandError = 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_queryDescribeStackEventsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeStackEventsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeStackEventsOutput(data.DescribeStackEventsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeStackEventsCommand = deserializeAws_queryDescribeStackEventsCommand; +const deserializeAws_queryDescribeStackEventsCommandError = 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_queryDescribeStackInstanceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeStackInstanceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeStackInstanceOutput(data.DescribeStackInstanceResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeStackInstanceCommand = deserializeAws_queryDescribeStackInstanceCommand; +const deserializeAws_queryDescribeStackInstanceCommandError = 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 "StackInstanceNotFoundException": + case "com.amazonaws.cloudformation#StackInstanceNotFoundException": + response = { + ...(await deserializeAws_queryStackInstanceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(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_queryDescribeStackResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeStackResourceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeStackResourceOutput(data.DescribeStackResourceResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeStackResourceCommand = deserializeAws_queryDescribeStackResourceCommand; +const deserializeAws_queryDescribeStackResourceCommandError = 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_queryDescribeStackResourceDriftsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeStackResourceDriftsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeStackResourceDriftsOutput(data.DescribeStackResourceDriftsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeStackResourceDriftsCommand = deserializeAws_queryDescribeStackResourceDriftsCommand; +const deserializeAws_queryDescribeStackResourceDriftsCommandError = 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_queryDescribeStackResourcesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeStackResourcesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeStackResourcesOutput(data.DescribeStackResourcesResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeStackResourcesCommand = deserializeAws_queryDescribeStackResourcesCommand; +const deserializeAws_queryDescribeStackResourcesCommandError = 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_queryDescribeStacksCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeStacksCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeStacksOutput(data.DescribeStacksResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeStacksCommand = deserializeAws_queryDescribeStacksCommand; +const deserializeAws_queryDescribeStacksCommandError = 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_queryDescribeStackSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeStackSetCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeStackSetOutput(data.DescribeStackSetResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeStackSetCommand = deserializeAws_queryDescribeStackSetCommand; +const deserializeAws_queryDescribeStackSetCommandError = 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 "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(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_queryDescribeStackSetOperationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeStackSetOperationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeStackSetOperationOutput(data.DescribeStackSetOperationResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeStackSetOperationCommand = deserializeAws_queryDescribeStackSetOperationCommand; +const deserializeAws_queryDescribeStackSetOperationCommandError = 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 "OperationNotFoundException": + case "com.amazonaws.cloudformation#OperationNotFoundException": + response = { + ...(await deserializeAws_queryOperationNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(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_queryDescribeTypeCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeTypeCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeTypeOutput(data.DescribeTypeResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeTypeCommand = deserializeAws_queryDescribeTypeCommand; +const deserializeAws_queryDescribeTypeCommandError = 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 "CFNRegistryException": + case "com.amazonaws.cloudformation#CFNRegistryException": + response = { + ...(await deserializeAws_queryCFNRegistryExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TypeNotFoundException": + case "com.amazonaws.cloudformation#TypeNotFoundException": + response = { + ...(await deserializeAws_queryTypeNotFoundExceptionResponse(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_queryDescribeTypeRegistrationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDescribeTypeRegistrationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDescribeTypeRegistrationOutput(data.DescribeTypeRegistrationResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDescribeTypeRegistrationCommand = deserializeAws_queryDescribeTypeRegistrationCommand; +const deserializeAws_queryDescribeTypeRegistrationCommandError = 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 "CFNRegistryException": + case "com.amazonaws.cloudformation#CFNRegistryException": + response = { + ...(await deserializeAws_queryCFNRegistryExceptionResponse(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_queryDetectStackDriftCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDetectStackDriftCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDetectStackDriftOutput(data.DetectStackDriftResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDetectStackDriftCommand = deserializeAws_queryDetectStackDriftCommand; +const deserializeAws_queryDetectStackDriftCommandError = 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_queryDetectStackResourceDriftCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDetectStackResourceDriftCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDetectStackResourceDriftOutput(data.DetectStackResourceDriftResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDetectStackResourceDriftCommand = deserializeAws_queryDetectStackResourceDriftCommand; +const deserializeAws_queryDetectStackResourceDriftCommandError = 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_queryDetectStackSetDriftCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDetectStackSetDriftCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDetectStackSetDriftOutput(data.DetectStackSetDriftResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDetectStackSetDriftCommand = deserializeAws_queryDetectStackSetDriftCommand; +const deserializeAws_queryDetectStackSetDriftCommandError = 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 "InvalidOperationException": + case "com.amazonaws.cloudformation#InvalidOperationException": + response = { + ...(await deserializeAws_queryInvalidOperationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationInProgressException": + case "com.amazonaws.cloudformation#OperationInProgressException": + response = { + ...(await deserializeAws_queryOperationInProgressExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(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_queryEstimateTemplateCostCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryEstimateTemplateCostCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryEstimateTemplateCostOutput(data.EstimateTemplateCostResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryEstimateTemplateCostCommand = deserializeAws_queryEstimateTemplateCostCommand; +const deserializeAws_queryEstimateTemplateCostCommandError = 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_queryExecuteChangeSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryExecuteChangeSetCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryExecuteChangeSetOutput(data.ExecuteChangeSetResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryExecuteChangeSetCommand = deserializeAws_queryExecuteChangeSetCommand; +const deserializeAws_queryExecuteChangeSetCommandError = 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 "ChangeSetNotFoundException": + case "com.amazonaws.cloudformation#ChangeSetNotFoundException": + response = { + ...(await deserializeAws_queryChangeSetNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InsufficientCapabilitiesException": + case "com.amazonaws.cloudformation#InsufficientCapabilitiesException": + response = { + ...(await deserializeAws_queryInsufficientCapabilitiesExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidChangeSetStatusException": + case "com.amazonaws.cloudformation#InvalidChangeSetStatusException": + response = { + ...(await deserializeAws_queryInvalidChangeSetStatusExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TokenAlreadyExistsException": + case "com.amazonaws.cloudformation#TokenAlreadyExistsException": + response = { + ...(await deserializeAws_queryTokenAlreadyExistsExceptionResponse(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_queryGetStackPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryGetStackPolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryGetStackPolicyOutput(data.GetStackPolicyResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryGetStackPolicyCommand = deserializeAws_queryGetStackPolicyCommand; +const deserializeAws_queryGetStackPolicyCommandError = 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_queryGetTemplateCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryGetTemplateCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryGetTemplateOutput(data.GetTemplateResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryGetTemplateCommand = deserializeAws_queryGetTemplateCommand; +const deserializeAws_queryGetTemplateCommandError = 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 "ChangeSetNotFoundException": + case "com.amazonaws.cloudformation#ChangeSetNotFoundException": + response = { + ...(await deserializeAws_queryChangeSetNotFoundExceptionResponse(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_queryGetTemplateSummaryCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryGetTemplateSummaryCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryGetTemplateSummaryOutput(data.GetTemplateSummaryResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryGetTemplateSummaryCommand = deserializeAws_queryGetTemplateSummaryCommand; +const deserializeAws_queryGetTemplateSummaryCommandError = 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 "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(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_queryListChangeSetsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListChangeSetsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListChangeSetsOutput(data.ListChangeSetsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListChangeSetsCommand = deserializeAws_queryListChangeSetsCommand; +const deserializeAws_queryListChangeSetsCommandError = 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_queryListExportsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListExportsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListExportsOutput(data.ListExportsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListExportsCommand = deserializeAws_queryListExportsCommand; +const deserializeAws_queryListExportsCommandError = 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_queryListImportsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListImportsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListImportsOutput(data.ListImportsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListImportsCommand = deserializeAws_queryListImportsCommand; +const deserializeAws_queryListImportsCommandError = 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_queryListStackInstancesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListStackInstancesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListStackInstancesOutput(data.ListStackInstancesResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListStackInstancesCommand = deserializeAws_queryListStackInstancesCommand; +const deserializeAws_queryListStackInstancesCommandError = 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 "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(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_queryListStackResourcesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListStackResourcesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListStackResourcesOutput(data.ListStackResourcesResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListStackResourcesCommand = deserializeAws_queryListStackResourcesCommand; +const deserializeAws_queryListStackResourcesCommandError = 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_queryListStacksCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListStacksCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListStacksOutput(data.ListStacksResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListStacksCommand = deserializeAws_queryListStacksCommand; +const deserializeAws_queryListStacksCommandError = 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_queryListStackSetOperationResultsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListStackSetOperationResultsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListStackSetOperationResultsOutput(data.ListStackSetOperationResultsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListStackSetOperationResultsCommand = deserializeAws_queryListStackSetOperationResultsCommand; +const deserializeAws_queryListStackSetOperationResultsCommandError = 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 "OperationNotFoundException": + case "com.amazonaws.cloudformation#OperationNotFoundException": + response = { + ...(await deserializeAws_queryOperationNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(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_queryListStackSetOperationsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListStackSetOperationsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListStackSetOperationsOutput(data.ListStackSetOperationsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListStackSetOperationsCommand = deserializeAws_queryListStackSetOperationsCommand; +const deserializeAws_queryListStackSetOperationsCommandError = 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 "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(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_queryListStackSetsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListStackSetsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListStackSetsOutput(data.ListStackSetsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListStackSetsCommand = deserializeAws_queryListStackSetsCommand; +const deserializeAws_queryListStackSetsCommandError = 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_queryListTypeRegistrationsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListTypeRegistrationsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListTypeRegistrationsOutput(data.ListTypeRegistrationsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListTypeRegistrationsCommand = deserializeAws_queryListTypeRegistrationsCommand; +const deserializeAws_queryListTypeRegistrationsCommandError = 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 "CFNRegistryException": + case "com.amazonaws.cloudformation#CFNRegistryException": + response = { + ...(await deserializeAws_queryCFNRegistryExceptionResponse(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_queryListTypesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListTypesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListTypesOutput(data.ListTypesResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListTypesCommand = deserializeAws_queryListTypesCommand; +const deserializeAws_queryListTypesCommandError = 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 "CFNRegistryException": + case "com.amazonaws.cloudformation#CFNRegistryException": + response = { + ...(await deserializeAws_queryCFNRegistryExceptionResponse(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_queryListTypeVersionsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListTypeVersionsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListTypeVersionsOutput(data.ListTypeVersionsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListTypeVersionsCommand = deserializeAws_queryListTypeVersionsCommand; +const deserializeAws_queryListTypeVersionsCommandError = 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 "CFNRegistryException": + case "com.amazonaws.cloudformation#CFNRegistryException": + response = { + ...(await deserializeAws_queryCFNRegistryExceptionResponse(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_queryRecordHandlerProgressCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryRecordHandlerProgressCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryRecordHandlerProgressOutput(data.RecordHandlerProgressResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryRecordHandlerProgressCommand = deserializeAws_queryRecordHandlerProgressCommand; +const deserializeAws_queryRecordHandlerProgressCommandError = 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 "InvalidStateTransitionException": + case "com.amazonaws.cloudformation#InvalidStateTransitionException": + response = { + ...(await deserializeAws_queryInvalidStateTransitionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationStatusCheckFailedException": + case "com.amazonaws.cloudformation#OperationStatusCheckFailedException": + response = { + ...(await deserializeAws_queryOperationStatusCheckFailedExceptionResponse(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_queryRegisterTypeCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryRegisterTypeCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryRegisterTypeOutput(data.RegisterTypeResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryRegisterTypeCommand = deserializeAws_queryRegisterTypeCommand; +const deserializeAws_queryRegisterTypeCommandError = 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 "CFNRegistryException": + case "com.amazonaws.cloudformation#CFNRegistryException": + response = { + ...(await deserializeAws_queryCFNRegistryExceptionResponse(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_querySetStackPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_querySetStackPolicyCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_querySetStackPolicyCommand = deserializeAws_querySetStackPolicyCommand; +const deserializeAws_querySetStackPolicyCommandError = 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_querySetTypeDefaultVersionCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_querySetTypeDefaultVersionCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_querySetTypeDefaultVersionOutput(data.SetTypeDefaultVersionResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_querySetTypeDefaultVersionCommand = deserializeAws_querySetTypeDefaultVersionCommand; +const deserializeAws_querySetTypeDefaultVersionCommandError = 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 "CFNRegistryException": + case "com.amazonaws.cloudformation#CFNRegistryException": + response = { + ...(await deserializeAws_queryCFNRegistryExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TypeNotFoundException": + case "com.amazonaws.cloudformation#TypeNotFoundException": + response = { + ...(await deserializeAws_queryTypeNotFoundExceptionResponse(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_querySignalResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_querySignalResourceCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_querySignalResourceCommand = deserializeAws_querySignalResourceCommand; +const deserializeAws_querySignalResourceCommandError = 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_queryStopStackSetOperationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryStopStackSetOperationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryStopStackSetOperationOutput(data.StopStackSetOperationResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryStopStackSetOperationCommand = deserializeAws_queryStopStackSetOperationCommand; +const deserializeAws_queryStopStackSetOperationCommandError = 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 "InvalidOperationException": + case "com.amazonaws.cloudformation#InvalidOperationException": + response = { + ...(await deserializeAws_queryInvalidOperationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationNotFoundException": + case "com.amazonaws.cloudformation#OperationNotFoundException": + response = { + ...(await deserializeAws_queryOperationNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(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_queryUpdateStackCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryUpdateStackCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryUpdateStackOutput(data.UpdateStackResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryUpdateStackCommand = deserializeAws_queryUpdateStackCommand; +const deserializeAws_queryUpdateStackCommandError = 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 "InsufficientCapabilitiesException": + case "com.amazonaws.cloudformation#InsufficientCapabilitiesException": + response = { + ...(await deserializeAws_queryInsufficientCapabilitiesExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TokenAlreadyExistsException": + case "com.amazonaws.cloudformation#TokenAlreadyExistsException": + response = { + ...(await deserializeAws_queryTokenAlreadyExistsExceptionResponse(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_queryUpdateStackInstancesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryUpdateStackInstancesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryUpdateStackInstancesOutput(data.UpdateStackInstancesResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryUpdateStackInstancesCommand = deserializeAws_queryUpdateStackInstancesCommand; +const deserializeAws_queryUpdateStackInstancesCommandError = 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 "InvalidOperationException": + case "com.amazonaws.cloudformation#InvalidOperationException": + response = { + ...(await deserializeAws_queryInvalidOperationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationIdAlreadyExistsException": + case "com.amazonaws.cloudformation#OperationIdAlreadyExistsException": + response = { + ...(await deserializeAws_queryOperationIdAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationInProgressException": + case "com.amazonaws.cloudformation#OperationInProgressException": + response = { + ...(await deserializeAws_queryOperationInProgressExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackInstanceNotFoundException": + case "com.amazonaws.cloudformation#StackInstanceNotFoundException": + response = { + ...(await deserializeAws_queryStackInstanceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StaleRequestException": + case "com.amazonaws.cloudformation#StaleRequestException": + response = { + ...(await deserializeAws_queryStaleRequestExceptionResponse(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_queryUpdateStackSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryUpdateStackSetCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryUpdateStackSetOutput(data.UpdateStackSetResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryUpdateStackSetCommand = deserializeAws_queryUpdateStackSetCommand; +const deserializeAws_queryUpdateStackSetCommandError = 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 "InvalidOperationException": + case "com.amazonaws.cloudformation#InvalidOperationException": + response = { + ...(await deserializeAws_queryInvalidOperationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationIdAlreadyExistsException": + case "com.amazonaws.cloudformation#OperationIdAlreadyExistsException": + response = { + ...(await deserializeAws_queryOperationIdAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "OperationInProgressException": + case "com.amazonaws.cloudformation#OperationInProgressException": + response = { + ...(await deserializeAws_queryOperationInProgressExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackInstanceNotFoundException": + case "com.amazonaws.cloudformation#StackInstanceNotFoundException": + response = { + ...(await deserializeAws_queryStackInstanceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StackSetNotFoundException": + case "com.amazonaws.cloudformation#StackSetNotFoundException": + response = { + ...(await deserializeAws_queryStackSetNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "StaleRequestException": + case "com.amazonaws.cloudformation#StaleRequestException": + response = { + ...(await deserializeAws_queryStaleRequestExceptionResponse(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_queryUpdateTerminationProtectionCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryUpdateTerminationProtectionCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryUpdateTerminationProtectionOutput(data.UpdateTerminationProtectionResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryUpdateTerminationProtectionCommand = deserializeAws_queryUpdateTerminationProtectionCommand; +const deserializeAws_queryUpdateTerminationProtectionCommandError = 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_queryValidateTemplateCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryValidateTemplateCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryValidateTemplateOutput(data.ValidateTemplateResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryValidateTemplateCommand = deserializeAws_queryValidateTemplateCommand; +const deserializeAws_queryValidateTemplateCommandError = 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_queryAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryAlreadyExistsException(body.Error, context); + const contents = { + name: "AlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryCFNRegistryExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryCFNRegistryException(body.Error, context); + const contents = { + name: "CFNRegistryException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryChangeSetNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryChangeSetNotFoundException(body.Error, context); + const contents = { + name: "ChangeSetNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryCreatedButModifiedExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryCreatedButModifiedException(body.Error, context); + const contents = { + name: "CreatedButModifiedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryInsufficientCapabilitiesExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryInsufficientCapabilitiesException(body.Error, context); + const contents = { + name: "InsufficientCapabilitiesException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryInvalidChangeSetStatusExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryInvalidChangeSetStatusException(body.Error, context); + const contents = { + name: "InvalidChangeSetStatusException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryInvalidOperationExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryInvalidOperationException(body.Error, context); + const contents = { + name: "InvalidOperationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryInvalidStateTransitionExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryInvalidStateTransitionException(body.Error, context); + const contents = { + name: "InvalidStateTransitionException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryLimitExceededExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryLimitExceededException(body.Error, context); + const contents = { + name: "LimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryNameAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryNameAlreadyExistsException(body.Error, context); + const contents = { + name: "NameAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryOperationIdAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryOperationIdAlreadyExistsException(body.Error, context); + const contents = { + name: "OperationIdAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryOperationInProgressExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryOperationInProgressException(body.Error, context); + const contents = { + name: "OperationInProgressException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryOperationNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryOperationNotFoundException(body.Error, context); + const contents = { + name: "OperationNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryOperationStatusCheckFailedExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryOperationStatusCheckFailedException(body.Error, context); + const contents = { + name: "OperationStatusCheckFailedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryStackInstanceNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryStackInstanceNotFoundException(body.Error, context); + const contents = { + name: "StackInstanceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryStackSetNotEmptyExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryStackSetNotEmptyException(body.Error, context); + const contents = { + name: "StackSetNotEmptyException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryStackSetNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryStackSetNotFoundException(body.Error, context); + const contents = { + name: "StackSetNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryStaleRequestExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryStaleRequestException(body.Error, context); + const contents = { + name: "StaleRequestException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryTokenAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryTokenAlreadyExistsException(body.Error, context); + const contents = { + name: "TokenAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryTypeNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryTypeNotFoundException(body.Error, context); + const contents = { + name: "TypeNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const serializeAws_queryAccountList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryAutoDeployment = (input, context) => { + const entries = {}; + if (input.Enabled !== undefined && input.Enabled !== null) { + entries["Enabled"] = input.Enabled; + } + if (input.RetainStacksOnAccountRemoval !== undefined && input.RetainStacksOnAccountRemoval !== null) { + entries["RetainStacksOnAccountRemoval"] = input.RetainStacksOnAccountRemoval; + } + return entries; +}; +const serializeAws_queryCancelUpdateStackInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.ClientRequestToken !== undefined && input.ClientRequestToken !== null) { + entries["ClientRequestToken"] = input.ClientRequestToken; + } + return entries; +}; +const serializeAws_queryCapabilities = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryContinueUpdateRollbackInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.RoleARN !== undefined && input.RoleARN !== null) { + entries["RoleARN"] = input.RoleARN; + } + if (input.ResourcesToSkip !== undefined && input.ResourcesToSkip !== null) { + const memberEntries = serializeAws_queryResourcesToSkip(input.ResourcesToSkip, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ResourcesToSkip.${key}`; + entries[loc] = value; + }); + } + if (input.ClientRequestToken !== undefined && input.ClientRequestToken !== null) { + entries["ClientRequestToken"] = input.ClientRequestToken; + } + return entries; +}; +const serializeAws_queryCreateChangeSetInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.TemplateBody !== undefined && input.TemplateBody !== null) { + entries["TemplateBody"] = input.TemplateBody; + } + if (input.TemplateURL !== undefined && input.TemplateURL !== null) { + entries["TemplateURL"] = input.TemplateURL; + } + if (input.UsePreviousTemplate !== undefined && input.UsePreviousTemplate !== null) { + entries["UsePreviousTemplate"] = input.UsePreviousTemplate; + } + if (input.Parameters !== undefined && input.Parameters !== null) { + const memberEntries = serializeAws_queryParameters(input.Parameters, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Parameters.${key}`; + entries[loc] = value; + }); + } + if (input.Capabilities !== undefined && input.Capabilities !== null) { + const memberEntries = serializeAws_queryCapabilities(input.Capabilities, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Capabilities.${key}`; + entries[loc] = value; + }); + } + if (input.ResourceTypes !== undefined && input.ResourceTypes !== null) { + const memberEntries = serializeAws_queryResourceTypes(input.ResourceTypes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ResourceTypes.${key}`; + entries[loc] = value; + }); + } + if (input.RoleARN !== undefined && input.RoleARN !== null) { + entries["RoleARN"] = input.RoleARN; + } + if (input.RollbackConfiguration !== undefined && input.RollbackConfiguration !== null) { + const memberEntries = serializeAws_queryRollbackConfiguration(input.RollbackConfiguration, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `RollbackConfiguration.${key}`; + entries[loc] = value; + }); + } + if (input.NotificationARNs !== undefined && input.NotificationARNs !== null) { + const memberEntries = serializeAws_queryNotificationARNs(input.NotificationARNs, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `NotificationARNs.${key}`; + entries[loc] = value; + }); + } + if (input.Tags !== undefined && input.Tags !== null) { + const memberEntries = serializeAws_queryTags(input.Tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input.ChangeSetName !== undefined && input.ChangeSetName !== null) { + entries["ChangeSetName"] = input.ChangeSetName; + } + if (input.ClientToken !== undefined && input.ClientToken !== null) { + entries["ClientToken"] = input.ClientToken; + } + if (input.Description !== undefined && input.Description !== null) { + entries["Description"] = input.Description; + } + if (input.ChangeSetType !== undefined && input.ChangeSetType !== null) { + entries["ChangeSetType"] = input.ChangeSetType; + } + if (input.ResourcesToImport !== undefined && input.ResourcesToImport !== null) { + const memberEntries = serializeAws_queryResourcesToImport(input.ResourcesToImport, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ResourcesToImport.${key}`; + entries[loc] = value; + }); + } + if (input.IncludeNestedStacks !== undefined && input.IncludeNestedStacks !== null) { + entries["IncludeNestedStacks"] = input.IncludeNestedStacks; + } + return entries; +}; +const serializeAws_queryCreateStackInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.TemplateBody !== undefined && input.TemplateBody !== null) { + entries["TemplateBody"] = input.TemplateBody; + } + if (input.TemplateURL !== undefined && input.TemplateURL !== null) { + entries["TemplateURL"] = input.TemplateURL; + } + if (input.Parameters !== undefined && input.Parameters !== null) { + const memberEntries = serializeAws_queryParameters(input.Parameters, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Parameters.${key}`; + entries[loc] = value; + }); + } + if (input.DisableRollback !== undefined && input.DisableRollback !== null) { + entries["DisableRollback"] = input.DisableRollback; + } + if (input.RollbackConfiguration !== undefined && input.RollbackConfiguration !== null) { + const memberEntries = serializeAws_queryRollbackConfiguration(input.RollbackConfiguration, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `RollbackConfiguration.${key}`; + entries[loc] = value; + }); + } + if (input.TimeoutInMinutes !== undefined && input.TimeoutInMinutes !== null) { + entries["TimeoutInMinutes"] = input.TimeoutInMinutes; + } + if (input.NotificationARNs !== undefined && input.NotificationARNs !== null) { + const memberEntries = serializeAws_queryNotificationARNs(input.NotificationARNs, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `NotificationARNs.${key}`; + entries[loc] = value; + }); + } + if (input.Capabilities !== undefined && input.Capabilities !== null) { + const memberEntries = serializeAws_queryCapabilities(input.Capabilities, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Capabilities.${key}`; + entries[loc] = value; + }); + } + if (input.ResourceTypes !== undefined && input.ResourceTypes !== null) { + const memberEntries = serializeAws_queryResourceTypes(input.ResourceTypes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ResourceTypes.${key}`; + entries[loc] = value; + }); + } + if (input.RoleARN !== undefined && input.RoleARN !== null) { + entries["RoleARN"] = input.RoleARN; + } + if (input.OnFailure !== undefined && input.OnFailure !== null) { + entries["OnFailure"] = input.OnFailure; + } + if (input.StackPolicyBody !== undefined && input.StackPolicyBody !== null) { + entries["StackPolicyBody"] = input.StackPolicyBody; + } + if (input.StackPolicyURL !== undefined && input.StackPolicyURL !== null) { + entries["StackPolicyURL"] = input.StackPolicyURL; + } + if (input.Tags !== undefined && input.Tags !== null) { + const memberEntries = serializeAws_queryTags(input.Tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input.ClientRequestToken !== undefined && input.ClientRequestToken !== null) { + entries["ClientRequestToken"] = input.ClientRequestToken; + } + if (input.EnableTerminationProtection !== undefined && input.EnableTerminationProtection !== null) { + entries["EnableTerminationProtection"] = input.EnableTerminationProtection; + } + return entries; +}; +const serializeAws_queryCreateStackInstancesInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.Accounts !== undefined && input.Accounts !== null) { + const memberEntries = serializeAws_queryAccountList(input.Accounts, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Accounts.${key}`; + entries[loc] = value; + }); + } + if (input.DeploymentTargets !== undefined && input.DeploymentTargets !== null) { + const memberEntries = serializeAws_queryDeploymentTargets(input.DeploymentTargets, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `DeploymentTargets.${key}`; + entries[loc] = value; + }); + } + if (input.Regions !== undefined && input.Regions !== null) { + const memberEntries = serializeAws_queryRegionList(input.Regions, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Regions.${key}`; + entries[loc] = value; + }); + } + if (input.ParameterOverrides !== undefined && input.ParameterOverrides !== null) { + const memberEntries = serializeAws_queryParameters(input.ParameterOverrides, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ParameterOverrides.${key}`; + entries[loc] = value; + }); + } + if (input.OperationPreferences !== undefined && input.OperationPreferences !== null) { + const memberEntries = serializeAws_queryStackSetOperationPreferences(input.OperationPreferences, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `OperationPreferences.${key}`; + entries[loc] = value; + }); + } + if (input.OperationId === undefined) { + input.OperationId = uuid_1.v4(); + } + if (input.OperationId !== undefined && input.OperationId !== null) { + entries["OperationId"] = input.OperationId; + } + return entries; +}; +const serializeAws_queryCreateStackSetInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.Description !== undefined && input.Description !== null) { + entries["Description"] = input.Description; + } + if (input.TemplateBody !== undefined && input.TemplateBody !== null) { + entries["TemplateBody"] = input.TemplateBody; + } + if (input.TemplateURL !== undefined && input.TemplateURL !== null) { + entries["TemplateURL"] = input.TemplateURL; + } + if (input.Parameters !== undefined && input.Parameters !== null) { + const memberEntries = serializeAws_queryParameters(input.Parameters, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Parameters.${key}`; + entries[loc] = value; + }); + } + if (input.Capabilities !== undefined && input.Capabilities !== null) { + const memberEntries = serializeAws_queryCapabilities(input.Capabilities, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Capabilities.${key}`; + entries[loc] = value; + }); + } + if (input.Tags !== undefined && input.Tags !== null) { + const memberEntries = serializeAws_queryTags(input.Tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input.AdministrationRoleARN !== undefined && input.AdministrationRoleARN !== null) { + entries["AdministrationRoleARN"] = input.AdministrationRoleARN; + } + if (input.ExecutionRoleName !== undefined && input.ExecutionRoleName !== null) { + entries["ExecutionRoleName"] = input.ExecutionRoleName; + } + if (input.PermissionModel !== undefined && input.PermissionModel !== null) { + entries["PermissionModel"] = input.PermissionModel; + } + if (input.AutoDeployment !== undefined && input.AutoDeployment !== null) { + const memberEntries = serializeAws_queryAutoDeployment(input.AutoDeployment, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `AutoDeployment.${key}`; + entries[loc] = value; + }); + } + if (input.ClientRequestToken === undefined) { + input.ClientRequestToken = uuid_1.v4(); + } + if (input.ClientRequestToken !== undefined && input.ClientRequestToken !== null) { + entries["ClientRequestToken"] = input.ClientRequestToken; + } + return entries; +}; +const serializeAws_queryDeleteChangeSetInput = (input, context) => { + const entries = {}; + if (input.ChangeSetName !== undefined && input.ChangeSetName !== null) { + entries["ChangeSetName"] = input.ChangeSetName; + } + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + return entries; +}; +const serializeAws_queryDeleteStackInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.RetainResources !== undefined && input.RetainResources !== null) { + const memberEntries = serializeAws_queryRetainResources(input.RetainResources, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `RetainResources.${key}`; + entries[loc] = value; + }); + } + if (input.RoleARN !== undefined && input.RoleARN !== null) { + entries["RoleARN"] = input.RoleARN; + } + if (input.ClientRequestToken !== undefined && input.ClientRequestToken !== null) { + entries["ClientRequestToken"] = input.ClientRequestToken; + } + return entries; +}; +const serializeAws_queryDeleteStackInstancesInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.Accounts !== undefined && input.Accounts !== null) { + const memberEntries = serializeAws_queryAccountList(input.Accounts, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Accounts.${key}`; + entries[loc] = value; + }); + } + if (input.DeploymentTargets !== undefined && input.DeploymentTargets !== null) { + const memberEntries = serializeAws_queryDeploymentTargets(input.DeploymentTargets, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `DeploymentTargets.${key}`; + entries[loc] = value; + }); + } + if (input.Regions !== undefined && input.Regions !== null) { + const memberEntries = serializeAws_queryRegionList(input.Regions, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Regions.${key}`; + entries[loc] = value; + }); + } + if (input.OperationPreferences !== undefined && input.OperationPreferences !== null) { + const memberEntries = serializeAws_queryStackSetOperationPreferences(input.OperationPreferences, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `OperationPreferences.${key}`; + entries[loc] = value; + }); + } + if (input.RetainStacks !== undefined && input.RetainStacks !== null) { + entries["RetainStacks"] = input.RetainStacks; + } + if (input.OperationId === undefined) { + input.OperationId = uuid_1.v4(); + } + if (input.OperationId !== undefined && input.OperationId !== null) { + entries["OperationId"] = input.OperationId; + } + return entries; +}; +const serializeAws_queryDeleteStackSetInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + return entries; +}; +const serializeAws_queryDeploymentTargets = (input, context) => { + const entries = {}; + if (input.Accounts !== undefined && input.Accounts !== null) { + const memberEntries = serializeAws_queryAccountList(input.Accounts, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Accounts.${key}`; + entries[loc] = value; + }); + } + if (input.OrganizationalUnitIds !== undefined && input.OrganizationalUnitIds !== null) { + const memberEntries = serializeAws_queryOrganizationalUnitIdList(input.OrganizationalUnitIds, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `OrganizationalUnitIds.${key}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryDeregisterTypeInput = (input, context) => { + const entries = {}; + if (input.Arn !== undefined && input.Arn !== null) { + entries["Arn"] = input.Arn; + } + if (input.Type !== undefined && input.Type !== null) { + entries["Type"] = input.Type; + } + if (input.TypeName !== undefined && input.TypeName !== null) { + entries["TypeName"] = input.TypeName; + } + if (input.VersionId !== undefined && input.VersionId !== null) { + entries["VersionId"] = input.VersionId; + } + return entries; +}; +const serializeAws_queryDescribeAccountLimitsInput = (input, context) => { + const entries = {}; + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + return entries; +}; +const serializeAws_queryDescribeChangeSetInput = (input, context) => { + const entries = {}; + if (input.ChangeSetName !== undefined && input.ChangeSetName !== null) { + entries["ChangeSetName"] = input.ChangeSetName; + } + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + return entries; +}; +const serializeAws_queryDescribeStackDriftDetectionStatusInput = (input, context) => { + const entries = {}; + if (input.StackDriftDetectionId !== undefined && input.StackDriftDetectionId !== null) { + entries["StackDriftDetectionId"] = input.StackDriftDetectionId; + } + return entries; +}; +const serializeAws_queryDescribeStackEventsInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + return entries; +}; +const serializeAws_queryDescribeStackInstanceInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.StackInstanceAccount !== undefined && input.StackInstanceAccount !== null) { + entries["StackInstanceAccount"] = input.StackInstanceAccount; + } + if (input.StackInstanceRegion !== undefined && input.StackInstanceRegion !== null) { + entries["StackInstanceRegion"] = input.StackInstanceRegion; + } + return entries; +}; +const serializeAws_queryDescribeStackResourceDriftsInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.StackResourceDriftStatusFilters !== undefined && input.StackResourceDriftStatusFilters !== null) { + const memberEntries = serializeAws_queryStackResourceDriftStatusFilters(input.StackResourceDriftStatusFilters, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `StackResourceDriftStatusFilters.${key}`; + entries[loc] = value; + }); + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + if (input.MaxResults !== undefined && input.MaxResults !== null) { + entries["MaxResults"] = input.MaxResults; + } + return entries; +}; +const serializeAws_queryDescribeStackResourceInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.LogicalResourceId !== undefined && input.LogicalResourceId !== null) { + entries["LogicalResourceId"] = input.LogicalResourceId; + } + return entries; +}; +const serializeAws_queryDescribeStackResourcesInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.LogicalResourceId !== undefined && input.LogicalResourceId !== null) { + entries["LogicalResourceId"] = input.LogicalResourceId; + } + if (input.PhysicalResourceId !== undefined && input.PhysicalResourceId !== null) { + entries["PhysicalResourceId"] = input.PhysicalResourceId; + } + return entries; +}; +const serializeAws_queryDescribeStackSetInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + return entries; +}; +const serializeAws_queryDescribeStackSetOperationInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.OperationId !== undefined && input.OperationId !== null) { + entries["OperationId"] = input.OperationId; + } + return entries; +}; +const serializeAws_queryDescribeStacksInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + return entries; +}; +const serializeAws_queryDescribeTypeInput = (input, context) => { + const entries = {}; + if (input.Type !== undefined && input.Type !== null) { + entries["Type"] = input.Type; + } + if (input.TypeName !== undefined && input.TypeName !== null) { + entries["TypeName"] = input.TypeName; + } + if (input.Arn !== undefined && input.Arn !== null) { + entries["Arn"] = input.Arn; + } + if (input.VersionId !== undefined && input.VersionId !== null) { + entries["VersionId"] = input.VersionId; + } + return entries; +}; +const serializeAws_queryDescribeTypeRegistrationInput = (input, context) => { + const entries = {}; + if (input.RegistrationToken !== undefined && input.RegistrationToken !== null) { + entries["RegistrationToken"] = input.RegistrationToken; + } + return entries; +}; +const serializeAws_queryDetectStackDriftInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.LogicalResourceIds !== undefined && input.LogicalResourceIds !== null) { + const memberEntries = serializeAws_queryLogicalResourceIds(input.LogicalResourceIds, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `LogicalResourceIds.${key}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryDetectStackResourceDriftInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.LogicalResourceId !== undefined && input.LogicalResourceId !== null) { + entries["LogicalResourceId"] = input.LogicalResourceId; + } + return entries; +}; +const serializeAws_queryDetectStackSetDriftInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.OperationPreferences !== undefined && input.OperationPreferences !== null) { + const memberEntries = serializeAws_queryStackSetOperationPreferences(input.OperationPreferences, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `OperationPreferences.${key}`; + entries[loc] = value; + }); + } + if (input.OperationId === undefined) { + input.OperationId = uuid_1.v4(); + } + if (input.OperationId !== undefined && input.OperationId !== null) { + entries["OperationId"] = input.OperationId; + } + return entries; +}; +const serializeAws_queryEstimateTemplateCostInput = (input, context) => { + const entries = {}; + if (input.TemplateBody !== undefined && input.TemplateBody !== null) { + entries["TemplateBody"] = input.TemplateBody; + } + if (input.TemplateURL !== undefined && input.TemplateURL !== null) { + entries["TemplateURL"] = input.TemplateURL; + } + if (input.Parameters !== undefined && input.Parameters !== null) { + const memberEntries = serializeAws_queryParameters(input.Parameters, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Parameters.${key}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryExecuteChangeSetInput = (input, context) => { + const entries = {}; + if (input.ChangeSetName !== undefined && input.ChangeSetName !== null) { + entries["ChangeSetName"] = input.ChangeSetName; + } + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.ClientRequestToken !== undefined && input.ClientRequestToken !== null) { + entries["ClientRequestToken"] = input.ClientRequestToken; + } + return entries; +}; +const serializeAws_queryGetStackPolicyInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + return entries; +}; +const serializeAws_queryGetTemplateInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.ChangeSetName !== undefined && input.ChangeSetName !== null) { + entries["ChangeSetName"] = input.ChangeSetName; + } + if (input.TemplateStage !== undefined && input.TemplateStage !== null) { + entries["TemplateStage"] = input.TemplateStage; + } + return entries; +}; +const serializeAws_queryGetTemplateSummaryInput = (input, context) => { + const entries = {}; + if (input.TemplateBody !== undefined && input.TemplateBody !== null) { + entries["TemplateBody"] = input.TemplateBody; + } + if (input.TemplateURL !== undefined && input.TemplateURL !== null) { + entries["TemplateURL"] = input.TemplateURL; + } + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + return entries; +}; +const serializeAws_queryListChangeSetsInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + return entries; +}; +const serializeAws_queryListExportsInput = (input, context) => { + const entries = {}; + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + return entries; +}; +const serializeAws_queryListImportsInput = (input, context) => { + const entries = {}; + if (input.ExportName !== undefined && input.ExportName !== null) { + entries["ExportName"] = input.ExportName; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + return entries; +}; +const serializeAws_queryListStackInstancesInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + if (input.MaxResults !== undefined && input.MaxResults !== null) { + entries["MaxResults"] = input.MaxResults; + } + if (input.Filters !== undefined && input.Filters !== null) { + const memberEntries = serializeAws_queryStackInstanceFilters(input.Filters, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Filters.${key}`; + entries[loc] = value; + }); + } + if (input.StackInstanceAccount !== undefined && input.StackInstanceAccount !== null) { + entries["StackInstanceAccount"] = input.StackInstanceAccount; + } + if (input.StackInstanceRegion !== undefined && input.StackInstanceRegion !== null) { + entries["StackInstanceRegion"] = input.StackInstanceRegion; + } + return entries; +}; +const serializeAws_queryListStackResourcesInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + return entries; +}; +const serializeAws_queryListStackSetOperationResultsInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.OperationId !== undefined && input.OperationId !== null) { + entries["OperationId"] = input.OperationId; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + if (input.MaxResults !== undefined && input.MaxResults !== null) { + entries["MaxResults"] = input.MaxResults; + } + return entries; +}; +const serializeAws_queryListStackSetOperationsInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + if (input.MaxResults !== undefined && input.MaxResults !== null) { + entries["MaxResults"] = input.MaxResults; + } + return entries; +}; +const serializeAws_queryListStackSetsInput = (input, context) => { + const entries = {}; + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + if (input.MaxResults !== undefined && input.MaxResults !== null) { + entries["MaxResults"] = input.MaxResults; + } + if (input.Status !== undefined && input.Status !== null) { + entries["Status"] = input.Status; + } + return entries; +}; +const serializeAws_queryListStacksInput = (input, context) => { + const entries = {}; + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + if (input.StackStatusFilter !== undefined && input.StackStatusFilter !== null) { + const memberEntries = serializeAws_queryStackStatusFilter(input.StackStatusFilter, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `StackStatusFilter.${key}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryListTypeRegistrationsInput = (input, context) => { + const entries = {}; + if (input.Type !== undefined && input.Type !== null) { + entries["Type"] = input.Type; + } + if (input.TypeName !== undefined && input.TypeName !== null) { + entries["TypeName"] = input.TypeName; + } + if (input.TypeArn !== undefined && input.TypeArn !== null) { + entries["TypeArn"] = input.TypeArn; + } + if (input.RegistrationStatusFilter !== undefined && input.RegistrationStatusFilter !== null) { + entries["RegistrationStatusFilter"] = input.RegistrationStatusFilter; + } + if (input.MaxResults !== undefined && input.MaxResults !== null) { + entries["MaxResults"] = input.MaxResults; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + return entries; +}; +const serializeAws_queryListTypesInput = (input, context) => { + const entries = {}; + if (input.Visibility !== undefined && input.Visibility !== null) { + entries["Visibility"] = input.Visibility; + } + if (input.ProvisioningType !== undefined && input.ProvisioningType !== null) { + entries["ProvisioningType"] = input.ProvisioningType; + } + if (input.DeprecatedStatus !== undefined && input.DeprecatedStatus !== null) { + entries["DeprecatedStatus"] = input.DeprecatedStatus; + } + if (input.Type !== undefined && input.Type !== null) { + entries["Type"] = input.Type; + } + if (input.MaxResults !== undefined && input.MaxResults !== null) { + entries["MaxResults"] = input.MaxResults; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + return entries; +}; +const serializeAws_queryListTypeVersionsInput = (input, context) => { + const entries = {}; + if (input.Type !== undefined && input.Type !== null) { + entries["Type"] = input.Type; + } + if (input.TypeName !== undefined && input.TypeName !== null) { + entries["TypeName"] = input.TypeName; + } + if (input.Arn !== undefined && input.Arn !== null) { + entries["Arn"] = input.Arn; + } + if (input.MaxResults !== undefined && input.MaxResults !== null) { + entries["MaxResults"] = input.MaxResults; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + if (input.DeprecatedStatus !== undefined && input.DeprecatedStatus !== null) { + entries["DeprecatedStatus"] = input.DeprecatedStatus; + } + return entries; +}; +const serializeAws_queryLoggingConfig = (input, context) => { + const entries = {}; + if (input.LogRoleArn !== undefined && input.LogRoleArn !== null) { + entries["LogRoleArn"] = input.LogRoleArn; + } + if (input.LogGroupName !== undefined && input.LogGroupName !== null) { + entries["LogGroupName"] = input.LogGroupName; + } + return entries; +}; +const serializeAws_queryLogicalResourceIds = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryNotificationARNs = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryOrganizationalUnitIdList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryParameter = (input, context) => { + const entries = {}; + if (input.ParameterKey !== undefined && input.ParameterKey !== null) { + entries["ParameterKey"] = input.ParameterKey; + } + if (input.ParameterValue !== undefined && input.ParameterValue !== null) { + entries["ParameterValue"] = input.ParameterValue; + } + if (input.UsePreviousValue !== undefined && input.UsePreviousValue !== null) { + entries["UsePreviousValue"] = input.UsePreviousValue; + } + if (input.ResolvedValue !== undefined && input.ResolvedValue !== null) { + entries["ResolvedValue"] = input.ResolvedValue; + } + return entries; +}; +const serializeAws_queryParameters = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + const memberEntries = serializeAws_queryParameter(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const serializeAws_queryRecordHandlerProgressInput = (input, context) => { + const entries = {}; + if (input.BearerToken !== undefined && input.BearerToken !== null) { + entries["BearerToken"] = input.BearerToken; + } + if (input.OperationStatus !== undefined && input.OperationStatus !== null) { + entries["OperationStatus"] = input.OperationStatus; + } + if (input.CurrentOperationStatus !== undefined && input.CurrentOperationStatus !== null) { + entries["CurrentOperationStatus"] = input.CurrentOperationStatus; + } + if (input.StatusMessage !== undefined && input.StatusMessage !== null) { + entries["StatusMessage"] = input.StatusMessage; + } + if (input.ErrorCode !== undefined && input.ErrorCode !== null) { + entries["ErrorCode"] = input.ErrorCode; + } + if (input.ResourceModel !== undefined && input.ResourceModel !== null) { + entries["ResourceModel"] = input.ResourceModel; + } + if (input.ClientRequestToken !== undefined && input.ClientRequestToken !== null) { + entries["ClientRequestToken"] = input.ClientRequestToken; + } + return entries; +}; +const serializeAws_queryRegionList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryRegisterTypeInput = (input, context) => { + const entries = {}; + if (input.Type !== undefined && input.Type !== null) { + entries["Type"] = input.Type; + } + if (input.TypeName !== undefined && input.TypeName !== null) { + entries["TypeName"] = input.TypeName; + } + if (input.SchemaHandlerPackage !== undefined && input.SchemaHandlerPackage !== null) { + entries["SchemaHandlerPackage"] = input.SchemaHandlerPackage; + } + if (input.LoggingConfig !== undefined && input.LoggingConfig !== null) { + const memberEntries = serializeAws_queryLoggingConfig(input.LoggingConfig, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `LoggingConfig.${key}`; + entries[loc] = value; + }); + } + if (input.ExecutionRoleArn !== undefined && input.ExecutionRoleArn !== null) { + entries["ExecutionRoleArn"] = input.ExecutionRoleArn; + } + if (input.ClientRequestToken !== undefined && input.ClientRequestToken !== null) { + entries["ClientRequestToken"] = input.ClientRequestToken; + } + return entries; +}; +const serializeAws_queryResourceIdentifierProperties = (input, context) => { + const entries = {}; + let counter = 1; + Object.keys(input) + .filter((key) => input[key] != null) + .forEach((key) => { + entries[`entry.${counter}.key`] = key; + entries[`entry.${counter}.value`] = input[key]; + counter++; + }); + return entries; +}; +const serializeAws_queryResourcesToImport = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + const memberEntries = serializeAws_queryResourceToImport(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const serializeAws_queryResourcesToSkip = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryResourceToImport = (input, context) => { + const entries = {}; + if (input.ResourceType !== undefined && input.ResourceType !== null) { + entries["ResourceType"] = input.ResourceType; + } + if (input.LogicalResourceId !== undefined && input.LogicalResourceId !== null) { + entries["LogicalResourceId"] = input.LogicalResourceId; + } + if (input.ResourceIdentifier !== undefined && input.ResourceIdentifier !== null) { + const memberEntries = serializeAws_queryResourceIdentifierProperties(input.ResourceIdentifier, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ResourceIdentifier.${key}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryResourceTypes = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryRetainResources = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryRollbackConfiguration = (input, context) => { + const entries = {}; + if (input.RollbackTriggers !== undefined && input.RollbackTriggers !== null) { + const memberEntries = serializeAws_queryRollbackTriggers(input.RollbackTriggers, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `RollbackTriggers.${key}`; + entries[loc] = value; + }); + } + if (input.MonitoringTimeInMinutes !== undefined && input.MonitoringTimeInMinutes !== null) { + entries["MonitoringTimeInMinutes"] = input.MonitoringTimeInMinutes; + } + return entries; +}; +const serializeAws_queryRollbackTrigger = (input, context) => { + const entries = {}; + if (input.Arn !== undefined && input.Arn !== null) { + entries["Arn"] = input.Arn; + } + if (input.Type !== undefined && input.Type !== null) { + entries["Type"] = input.Type; + } + return entries; +}; +const serializeAws_queryRollbackTriggers = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + const memberEntries = serializeAws_queryRollbackTrigger(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const serializeAws_querySetStackPolicyInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.StackPolicyBody !== undefined && input.StackPolicyBody !== null) { + entries["StackPolicyBody"] = input.StackPolicyBody; + } + if (input.StackPolicyURL !== undefined && input.StackPolicyURL !== null) { + entries["StackPolicyURL"] = input.StackPolicyURL; + } + return entries; +}; +const serializeAws_querySetTypeDefaultVersionInput = (input, context) => { + const entries = {}; + if (input.Arn !== undefined && input.Arn !== null) { + entries["Arn"] = input.Arn; + } + if (input.Type !== undefined && input.Type !== null) { + entries["Type"] = input.Type; + } + if (input.TypeName !== undefined && input.TypeName !== null) { + entries["TypeName"] = input.TypeName; + } + if (input.VersionId !== undefined && input.VersionId !== null) { + entries["VersionId"] = input.VersionId; + } + return entries; +}; +const serializeAws_querySignalResourceInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.LogicalResourceId !== undefined && input.LogicalResourceId !== null) { + entries["LogicalResourceId"] = input.LogicalResourceId; + } + if (input.UniqueId !== undefined && input.UniqueId !== null) { + entries["UniqueId"] = input.UniqueId; + } + if (input.Status !== undefined && input.Status !== null) { + entries["Status"] = input.Status; + } + return entries; +}; +const serializeAws_queryStackInstanceFilter = (input, context) => { + const entries = {}; + if (input.Name !== undefined && input.Name !== null) { + entries["Name"] = input.Name; + } + if (input.Values !== undefined && input.Values !== null) { + entries["Values"] = input.Values; + } + return entries; +}; +const serializeAws_queryStackInstanceFilters = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + const memberEntries = serializeAws_queryStackInstanceFilter(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const serializeAws_queryStackResourceDriftStatusFilters = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryStackSetOperationPreferences = (input, context) => { + const entries = {}; + if (input.RegionOrder !== undefined && input.RegionOrder !== null) { + const memberEntries = serializeAws_queryRegionList(input.RegionOrder, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `RegionOrder.${key}`; + entries[loc] = value; + }); + } + if (input.FailureToleranceCount !== undefined && input.FailureToleranceCount !== null) { + entries["FailureToleranceCount"] = input.FailureToleranceCount; + } + if (input.FailureTolerancePercentage !== undefined && input.FailureTolerancePercentage !== null) { + entries["FailureTolerancePercentage"] = input.FailureTolerancePercentage; + } + if (input.MaxConcurrentCount !== undefined && input.MaxConcurrentCount !== null) { + entries["MaxConcurrentCount"] = input.MaxConcurrentCount; + } + if (input.MaxConcurrentPercentage !== undefined && input.MaxConcurrentPercentage !== null) { + entries["MaxConcurrentPercentage"] = input.MaxConcurrentPercentage; + } + return entries; +}; +const serializeAws_queryStackStatusFilter = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryStopStackSetOperationInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.OperationId !== undefined && input.OperationId !== null) { + entries["OperationId"] = input.OperationId; + } + 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_queryTags = (input, context) => { + const entries = {}; + let counter = 1; + for (let 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 serializeAws_queryUpdateStackInput = (input, context) => { + const entries = {}; + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + if (input.TemplateBody !== undefined && input.TemplateBody !== null) { + entries["TemplateBody"] = input.TemplateBody; + } + if (input.TemplateURL !== undefined && input.TemplateURL !== null) { + entries["TemplateURL"] = input.TemplateURL; + } + if (input.UsePreviousTemplate !== undefined && input.UsePreviousTemplate !== null) { + entries["UsePreviousTemplate"] = input.UsePreviousTemplate; + } + if (input.StackPolicyDuringUpdateBody !== undefined && input.StackPolicyDuringUpdateBody !== null) { + entries["StackPolicyDuringUpdateBody"] = input.StackPolicyDuringUpdateBody; + } + if (input.StackPolicyDuringUpdateURL !== undefined && input.StackPolicyDuringUpdateURL !== null) { + entries["StackPolicyDuringUpdateURL"] = input.StackPolicyDuringUpdateURL; + } + if (input.Parameters !== undefined && input.Parameters !== null) { + const memberEntries = serializeAws_queryParameters(input.Parameters, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Parameters.${key}`; + entries[loc] = value; + }); + } + if (input.Capabilities !== undefined && input.Capabilities !== null) { + const memberEntries = serializeAws_queryCapabilities(input.Capabilities, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Capabilities.${key}`; + entries[loc] = value; + }); + } + if (input.ResourceTypes !== undefined && input.ResourceTypes !== null) { + const memberEntries = serializeAws_queryResourceTypes(input.ResourceTypes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ResourceTypes.${key}`; + entries[loc] = value; + }); + } + if (input.RoleARN !== undefined && input.RoleARN !== null) { + entries["RoleARN"] = input.RoleARN; + } + if (input.RollbackConfiguration !== undefined && input.RollbackConfiguration !== null) { + const memberEntries = serializeAws_queryRollbackConfiguration(input.RollbackConfiguration, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `RollbackConfiguration.${key}`; + entries[loc] = value; + }); + } + if (input.StackPolicyBody !== undefined && input.StackPolicyBody !== null) { + entries["StackPolicyBody"] = input.StackPolicyBody; + } + if (input.StackPolicyURL !== undefined && input.StackPolicyURL !== null) { + entries["StackPolicyURL"] = input.StackPolicyURL; + } + if (input.NotificationARNs !== undefined && input.NotificationARNs !== null) { + const memberEntries = serializeAws_queryNotificationARNs(input.NotificationARNs, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `NotificationARNs.${key}`; + entries[loc] = value; + }); + } + if (input.Tags !== undefined && input.Tags !== null) { + const memberEntries = serializeAws_queryTags(input.Tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input.ClientRequestToken !== undefined && input.ClientRequestToken !== null) { + entries["ClientRequestToken"] = input.ClientRequestToken; + } + return entries; +}; +const serializeAws_queryUpdateStackInstancesInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.Accounts !== undefined && input.Accounts !== null) { + const memberEntries = serializeAws_queryAccountList(input.Accounts, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Accounts.${key}`; + entries[loc] = value; + }); + } + if (input.DeploymentTargets !== undefined && input.DeploymentTargets !== null) { + const memberEntries = serializeAws_queryDeploymentTargets(input.DeploymentTargets, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `DeploymentTargets.${key}`; + entries[loc] = value; + }); + } + if (input.Regions !== undefined && input.Regions !== null) { + const memberEntries = serializeAws_queryRegionList(input.Regions, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Regions.${key}`; + entries[loc] = value; + }); + } + if (input.ParameterOverrides !== undefined && input.ParameterOverrides !== null) { + const memberEntries = serializeAws_queryParameters(input.ParameterOverrides, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ParameterOverrides.${key}`; + entries[loc] = value; + }); + } + if (input.OperationPreferences !== undefined && input.OperationPreferences !== null) { + const memberEntries = serializeAws_queryStackSetOperationPreferences(input.OperationPreferences, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `OperationPreferences.${key}`; + entries[loc] = value; + }); + } + if (input.OperationId === undefined) { + input.OperationId = uuid_1.v4(); + } + if (input.OperationId !== undefined && input.OperationId !== null) { + entries["OperationId"] = input.OperationId; + } + return entries; +}; +const serializeAws_queryUpdateStackSetInput = (input, context) => { + const entries = {}; + if (input.StackSetName !== undefined && input.StackSetName !== null) { + entries["StackSetName"] = input.StackSetName; + } + if (input.Description !== undefined && input.Description !== null) { + entries["Description"] = input.Description; + } + if (input.TemplateBody !== undefined && input.TemplateBody !== null) { + entries["TemplateBody"] = input.TemplateBody; + } + if (input.TemplateURL !== undefined && input.TemplateURL !== null) { + entries["TemplateURL"] = input.TemplateURL; + } + if (input.UsePreviousTemplate !== undefined && input.UsePreviousTemplate !== null) { + entries["UsePreviousTemplate"] = input.UsePreviousTemplate; + } + if (input.Parameters !== undefined && input.Parameters !== null) { + const memberEntries = serializeAws_queryParameters(input.Parameters, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Parameters.${key}`; + entries[loc] = value; + }); + } + if (input.Capabilities !== undefined && input.Capabilities !== null) { + const memberEntries = serializeAws_queryCapabilities(input.Capabilities, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Capabilities.${key}`; + entries[loc] = value; + }); + } + if (input.Tags !== undefined && input.Tags !== null) { + const memberEntries = serializeAws_queryTags(input.Tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input.OperationPreferences !== undefined && input.OperationPreferences !== null) { + const memberEntries = serializeAws_queryStackSetOperationPreferences(input.OperationPreferences, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `OperationPreferences.${key}`; + entries[loc] = value; + }); + } + if (input.AdministrationRoleARN !== undefined && input.AdministrationRoleARN !== null) { + entries["AdministrationRoleARN"] = input.AdministrationRoleARN; + } + if (input.ExecutionRoleName !== undefined && input.ExecutionRoleName !== null) { + entries["ExecutionRoleName"] = input.ExecutionRoleName; + } + if (input.DeploymentTargets !== undefined && input.DeploymentTargets !== null) { + const memberEntries = serializeAws_queryDeploymentTargets(input.DeploymentTargets, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `DeploymentTargets.${key}`; + entries[loc] = value; + }); + } + if (input.PermissionModel !== undefined && input.PermissionModel !== null) { + entries["PermissionModel"] = input.PermissionModel; + } + if (input.AutoDeployment !== undefined && input.AutoDeployment !== null) { + const memberEntries = serializeAws_queryAutoDeployment(input.AutoDeployment, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `AutoDeployment.${key}`; + entries[loc] = value; + }); + } + if (input.OperationId === undefined) { + input.OperationId = uuid_1.v4(); + } + if (input.OperationId !== undefined && input.OperationId !== null) { + entries["OperationId"] = input.OperationId; + } + if (input.Accounts !== undefined && input.Accounts !== null) { + const memberEntries = serializeAws_queryAccountList(input.Accounts, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Accounts.${key}`; + entries[loc] = value; + }); + } + if (input.Regions !== undefined && input.Regions !== null) { + const memberEntries = serializeAws_queryRegionList(input.Regions, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Regions.${key}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryUpdateTerminationProtectionInput = (input, context) => { + const entries = {}; + if (input.EnableTerminationProtection !== undefined && input.EnableTerminationProtection !== null) { + entries["EnableTerminationProtection"] = input.EnableTerminationProtection; + } + if (input.StackName !== undefined && input.StackName !== null) { + entries["StackName"] = input.StackName; + } + return entries; +}; +const serializeAws_queryValidateTemplateInput = (input, context) => { + const entries = {}; + if (input.TemplateBody !== undefined && input.TemplateBody !== null) { + entries["TemplateBody"] = input.TemplateBody; + } + if (input.TemplateURL !== undefined && input.TemplateURL !== null) { + entries["TemplateURL"] = input.TemplateURL; + } + return entries; +}; +const deserializeAws_queryAccountGateResult = (output, context) => { + let contents = { + Status: undefined, + StatusReason: undefined, + }; + if (output["Status"] !== undefined) { + contents.Status = output["Status"]; + } + if (output["StatusReason"] !== undefined) { + contents.StatusReason = output["StatusReason"]; + } + return contents; +}; +const deserializeAws_queryAccountLimit = (output, context) => { + let contents = { + Name: undefined, + Value: undefined, + }; + if (output["Name"] !== undefined) { + contents.Name = output["Name"]; + } + if (output["Value"] !== undefined) { + contents.Value = parseInt(output["Value"]); + } + return contents; +}; +const deserializeAws_queryAccountLimitList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryAccountLimit(entry, context); + }); +}; +const deserializeAws_queryAccountList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryAllowedValues = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryAlreadyExistsException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryAutoDeployment = (output, context) => { + let contents = { + Enabled: undefined, + RetainStacksOnAccountRemoval: undefined, + }; + if (output["Enabled"] !== undefined) { + contents.Enabled = output["Enabled"] == "true"; + } + if (output["RetainStacksOnAccountRemoval"] !== undefined) { + contents.RetainStacksOnAccountRemoval = output["RetainStacksOnAccountRemoval"] == "true"; + } + return contents; +}; +const deserializeAws_queryCapabilities = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryCFNRegistryException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryChange = (output, context) => { + let contents = { + Type: undefined, + ResourceChange: undefined, + }; + if (output["Type"] !== undefined) { + contents.Type = output["Type"]; + } + if (output["ResourceChange"] !== undefined) { + contents.ResourceChange = deserializeAws_queryResourceChange(output["ResourceChange"], context); + } + return contents; +}; +const deserializeAws_queryChanges = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryChange(entry, context); + }); +}; +const deserializeAws_queryChangeSetNotFoundException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryChangeSetSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryChangeSetSummary(entry, context); + }); +}; +const deserializeAws_queryChangeSetSummary = (output, context) => { + let contents = { + StackId: undefined, + StackName: undefined, + ChangeSetId: undefined, + ChangeSetName: undefined, + ExecutionStatus: undefined, + Status: undefined, + StatusReason: undefined, + CreationTime: undefined, + Description: undefined, + IncludeNestedStacks: undefined, + ParentChangeSetId: undefined, + RootChangeSetId: undefined, + }; + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output["StackName"] !== undefined) { + contents.StackName = output["StackName"]; + } + if (output["ChangeSetId"] !== undefined) { + contents.ChangeSetId = output["ChangeSetId"]; + } + if (output["ChangeSetName"] !== undefined) { + contents.ChangeSetName = output["ChangeSetName"]; + } + if (output["ExecutionStatus"] !== undefined) { + contents.ExecutionStatus = output["ExecutionStatus"]; + } + if (output["Status"] !== undefined) { + contents.Status = output["Status"]; + } + if (output["StatusReason"] !== undefined) { + contents.StatusReason = output["StatusReason"]; + } + if (output["CreationTime"] !== undefined) { + contents.CreationTime = new Date(output["CreationTime"]); + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output["IncludeNestedStacks"] !== undefined) { + contents.IncludeNestedStacks = output["IncludeNestedStacks"] == "true"; + } + if (output["ParentChangeSetId"] !== undefined) { + contents.ParentChangeSetId = output["ParentChangeSetId"]; + } + if (output["RootChangeSetId"] !== undefined) { + contents.RootChangeSetId = output["RootChangeSetId"]; + } + return contents; +}; +const deserializeAws_queryContinueUpdateRollbackOutput = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryCreateChangeSetOutput = (output, context) => { + let contents = { + Id: undefined, + StackId: undefined, + }; + if (output["Id"] !== undefined) { + contents.Id = output["Id"]; + } + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + return contents; +}; +const deserializeAws_queryCreatedButModifiedException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryCreateStackInstancesOutput = (output, context) => { + let contents = { + OperationId: undefined, + }; + if (output["OperationId"] !== undefined) { + contents.OperationId = output["OperationId"]; + } + return contents; +}; +const deserializeAws_queryCreateStackOutput = (output, context) => { + let contents = { + StackId: undefined, + }; + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + return contents; +}; +const deserializeAws_queryCreateStackSetOutput = (output, context) => { + let contents = { + StackSetId: undefined, + }; + if (output["StackSetId"] !== undefined) { + contents.StackSetId = output["StackSetId"]; + } + return contents; +}; +const deserializeAws_queryDeleteChangeSetOutput = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryDeleteStackInstancesOutput = (output, context) => { + let contents = { + OperationId: undefined, + }; + if (output["OperationId"] !== undefined) { + contents.OperationId = output["OperationId"]; + } + return contents; +}; +const deserializeAws_queryDeleteStackSetOutput = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryDeploymentTargets = (output, context) => { + let contents = { + Accounts: undefined, + OrganizationalUnitIds: undefined, + }; + if (output.Accounts === "") { + contents.Accounts = []; + } + if (output["Accounts"] !== undefined && output["Accounts"]["member"] !== undefined) { + contents.Accounts = deserializeAws_queryAccountList(smithy_client_1.getArrayIfSingleItem(output["Accounts"]["member"]), context); + } + if (output.OrganizationalUnitIds === "") { + contents.OrganizationalUnitIds = []; + } + if (output["OrganizationalUnitIds"] !== undefined && output["OrganizationalUnitIds"]["member"] !== undefined) { + contents.OrganizationalUnitIds = deserializeAws_queryOrganizationalUnitIdList(smithy_client_1.getArrayIfSingleItem(output["OrganizationalUnitIds"]["member"]), context); + } + return contents; +}; +const deserializeAws_queryDeregisterTypeOutput = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryDescribeAccountLimitsOutput = (output, context) => { + let contents = { + AccountLimits: undefined, + NextToken: undefined, + }; + if (output.AccountLimits === "") { + contents.AccountLimits = []; + } + if (output["AccountLimits"] !== undefined && output["AccountLimits"]["member"] !== undefined) { + contents.AccountLimits = deserializeAws_queryAccountLimitList(smithy_client_1.getArrayIfSingleItem(output["AccountLimits"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryDescribeChangeSetOutput = (output, context) => { + let contents = { + ChangeSetName: undefined, + ChangeSetId: undefined, + StackId: undefined, + StackName: undefined, + Description: undefined, + Parameters: undefined, + CreationTime: undefined, + ExecutionStatus: undefined, + Status: undefined, + StatusReason: undefined, + NotificationARNs: undefined, + RollbackConfiguration: undefined, + Capabilities: undefined, + Tags: undefined, + Changes: undefined, + NextToken: undefined, + IncludeNestedStacks: undefined, + ParentChangeSetId: undefined, + RootChangeSetId: undefined, + }; + if (output["ChangeSetName"] !== undefined) { + contents.ChangeSetName = output["ChangeSetName"]; + } + if (output["ChangeSetId"] !== undefined) { + contents.ChangeSetId = output["ChangeSetId"]; + } + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output["StackName"] !== undefined) { + contents.StackName = output["StackName"]; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output.Parameters === "") { + contents.Parameters = []; + } + if (output["Parameters"] !== undefined && output["Parameters"]["member"] !== undefined) { + contents.Parameters = deserializeAws_queryParameters(smithy_client_1.getArrayIfSingleItem(output["Parameters"]["member"]), context); + } + if (output["CreationTime"] !== undefined) { + contents.CreationTime = new Date(output["CreationTime"]); + } + if (output["ExecutionStatus"] !== undefined) { + contents.ExecutionStatus = output["ExecutionStatus"]; + } + if (output["Status"] !== undefined) { + contents.Status = output["Status"]; + } + if (output["StatusReason"] !== undefined) { + contents.StatusReason = output["StatusReason"]; + } + if (output.NotificationARNs === "") { + contents.NotificationARNs = []; + } + if (output["NotificationARNs"] !== undefined && output["NotificationARNs"]["member"] !== undefined) { + contents.NotificationARNs = deserializeAws_queryNotificationARNs(smithy_client_1.getArrayIfSingleItem(output["NotificationARNs"]["member"]), context); + } + if (output["RollbackConfiguration"] !== undefined) { + contents.RollbackConfiguration = deserializeAws_queryRollbackConfiguration(output["RollbackConfiguration"], context); + } + if (output.Capabilities === "") { + contents.Capabilities = []; + } + if (output["Capabilities"] !== undefined && output["Capabilities"]["member"] !== undefined) { + contents.Capabilities = deserializeAws_queryCapabilities(smithy_client_1.getArrayIfSingleItem(output["Capabilities"]["member"]), context); + } + if (output.Tags === "") { + contents.Tags = []; + } + if (output["Tags"] !== undefined && output["Tags"]["member"] !== undefined) { + contents.Tags = deserializeAws_queryTags(smithy_client_1.getArrayIfSingleItem(output["Tags"]["member"]), context); + } + if (output.Changes === "") { + contents.Changes = []; + } + if (output["Changes"] !== undefined && output["Changes"]["member"] !== undefined) { + contents.Changes = deserializeAws_queryChanges(smithy_client_1.getArrayIfSingleItem(output["Changes"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + if (output["IncludeNestedStacks"] !== undefined) { + contents.IncludeNestedStacks = output["IncludeNestedStacks"] == "true"; + } + if (output["ParentChangeSetId"] !== undefined) { + contents.ParentChangeSetId = output["ParentChangeSetId"]; + } + if (output["RootChangeSetId"] !== undefined) { + contents.RootChangeSetId = output["RootChangeSetId"]; + } + return contents; +}; +const deserializeAws_queryDescribeStackDriftDetectionStatusOutput = (output, context) => { + let contents = { + StackId: undefined, + StackDriftDetectionId: undefined, + StackDriftStatus: undefined, + DetectionStatus: undefined, + DetectionStatusReason: undefined, + DriftedStackResourceCount: undefined, + Timestamp: undefined, + }; + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output["StackDriftDetectionId"] !== undefined) { + contents.StackDriftDetectionId = output["StackDriftDetectionId"]; + } + if (output["StackDriftStatus"] !== undefined) { + contents.StackDriftStatus = output["StackDriftStatus"]; + } + if (output["DetectionStatus"] !== undefined) { + contents.DetectionStatus = output["DetectionStatus"]; + } + if (output["DetectionStatusReason"] !== undefined) { + contents.DetectionStatusReason = output["DetectionStatusReason"]; + } + if (output["DriftedStackResourceCount"] !== undefined) { + contents.DriftedStackResourceCount = parseInt(output["DriftedStackResourceCount"]); + } + if (output["Timestamp"] !== undefined) { + contents.Timestamp = new Date(output["Timestamp"]); + } + return contents; +}; +const deserializeAws_queryDescribeStackEventsOutput = (output, context) => { + let contents = { + StackEvents: undefined, + NextToken: undefined, + }; + if (output.StackEvents === "") { + contents.StackEvents = []; + } + if (output["StackEvents"] !== undefined && output["StackEvents"]["member"] !== undefined) { + contents.StackEvents = deserializeAws_queryStackEvents(smithy_client_1.getArrayIfSingleItem(output["StackEvents"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryDescribeStackInstanceOutput = (output, context) => { + let contents = { + StackInstance: undefined, + }; + if (output["StackInstance"] !== undefined) { + contents.StackInstance = deserializeAws_queryStackInstance(output["StackInstance"], context); + } + return contents; +}; +const deserializeAws_queryDescribeStackResourceDriftsOutput = (output, context) => { + let contents = { + StackResourceDrifts: undefined, + NextToken: undefined, + }; + if (output.StackResourceDrifts === "") { + contents.StackResourceDrifts = []; + } + if (output["StackResourceDrifts"] !== undefined && output["StackResourceDrifts"]["member"] !== undefined) { + contents.StackResourceDrifts = deserializeAws_queryStackResourceDrifts(smithy_client_1.getArrayIfSingleItem(output["StackResourceDrifts"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryDescribeStackResourceOutput = (output, context) => { + let contents = { + StackResourceDetail: undefined, + }; + if (output["StackResourceDetail"] !== undefined) { + contents.StackResourceDetail = deserializeAws_queryStackResourceDetail(output["StackResourceDetail"], context); + } + return contents; +}; +const deserializeAws_queryDescribeStackResourcesOutput = (output, context) => { + let contents = { + StackResources: undefined, + }; + if (output.StackResources === "") { + contents.StackResources = []; + } + if (output["StackResources"] !== undefined && output["StackResources"]["member"] !== undefined) { + contents.StackResources = deserializeAws_queryStackResources(smithy_client_1.getArrayIfSingleItem(output["StackResources"]["member"]), context); + } + return contents; +}; +const deserializeAws_queryDescribeStackSetOperationOutput = (output, context) => { + let contents = { + StackSetOperation: undefined, + }; + if (output["StackSetOperation"] !== undefined) { + contents.StackSetOperation = deserializeAws_queryStackSetOperation(output["StackSetOperation"], context); + } + return contents; +}; +const deserializeAws_queryDescribeStackSetOutput = (output, context) => { + let contents = { + StackSet: undefined, + }; + if (output["StackSet"] !== undefined) { + contents.StackSet = deserializeAws_queryStackSet(output["StackSet"], context); + } + return contents; +}; +const deserializeAws_queryDescribeStacksOutput = (output, context) => { + let contents = { + Stacks: undefined, + NextToken: undefined, + }; + if (output.Stacks === "") { + contents.Stacks = []; + } + if (output["Stacks"] !== undefined && output["Stacks"]["member"] !== undefined) { + contents.Stacks = deserializeAws_queryStacks(smithy_client_1.getArrayIfSingleItem(output["Stacks"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryDescribeTypeOutput = (output, context) => { + let contents = { + Arn: undefined, + Type: undefined, + TypeName: undefined, + DefaultVersionId: undefined, + IsDefaultVersion: undefined, + Description: undefined, + Schema: undefined, + ProvisioningType: undefined, + DeprecatedStatus: undefined, + LoggingConfig: undefined, + ExecutionRoleArn: undefined, + Visibility: undefined, + SourceUrl: undefined, + DocumentationUrl: undefined, + LastUpdated: undefined, + TimeCreated: undefined, + }; + if (output["Arn"] !== undefined) { + contents.Arn = output["Arn"]; + } + if (output["Type"] !== undefined) { + contents.Type = output["Type"]; + } + if (output["TypeName"] !== undefined) { + contents.TypeName = output["TypeName"]; + } + if (output["DefaultVersionId"] !== undefined) { + contents.DefaultVersionId = output["DefaultVersionId"]; + } + if (output["IsDefaultVersion"] !== undefined) { + contents.IsDefaultVersion = output["IsDefaultVersion"] == "true"; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output["Schema"] !== undefined) { + contents.Schema = output["Schema"]; + } + if (output["ProvisioningType"] !== undefined) { + contents.ProvisioningType = output["ProvisioningType"]; + } + if (output["DeprecatedStatus"] !== undefined) { + contents.DeprecatedStatus = output["DeprecatedStatus"]; + } + if (output["LoggingConfig"] !== undefined) { + contents.LoggingConfig = deserializeAws_queryLoggingConfig(output["LoggingConfig"], context); + } + if (output["ExecutionRoleArn"] !== undefined) { + contents.ExecutionRoleArn = output["ExecutionRoleArn"]; + } + if (output["Visibility"] !== undefined) { + contents.Visibility = output["Visibility"]; + } + if (output["SourceUrl"] !== undefined) { + contents.SourceUrl = output["SourceUrl"]; + } + if (output["DocumentationUrl"] !== undefined) { + contents.DocumentationUrl = output["DocumentationUrl"]; + } + if (output["LastUpdated"] !== undefined) { + contents.LastUpdated = new Date(output["LastUpdated"]); + } + if (output["TimeCreated"] !== undefined) { + contents.TimeCreated = new Date(output["TimeCreated"]); + } + return contents; +}; +const deserializeAws_queryDescribeTypeRegistrationOutput = (output, context) => { + let contents = { + ProgressStatus: undefined, + Description: undefined, + TypeArn: undefined, + TypeVersionArn: undefined, + }; + if (output["ProgressStatus"] !== undefined) { + contents.ProgressStatus = output["ProgressStatus"]; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output["TypeArn"] !== undefined) { + contents.TypeArn = output["TypeArn"]; + } + if (output["TypeVersionArn"] !== undefined) { + contents.TypeVersionArn = output["TypeVersionArn"]; + } + return contents; +}; +const deserializeAws_queryDetectStackDriftOutput = (output, context) => { + let contents = { + StackDriftDetectionId: undefined, + }; + if (output["StackDriftDetectionId"] !== undefined) { + contents.StackDriftDetectionId = output["StackDriftDetectionId"]; + } + return contents; +}; +const deserializeAws_queryDetectStackResourceDriftOutput = (output, context) => { + let contents = { + StackResourceDrift: undefined, + }; + if (output["StackResourceDrift"] !== undefined) { + contents.StackResourceDrift = deserializeAws_queryStackResourceDrift(output["StackResourceDrift"], context); + } + return contents; +}; +const deserializeAws_queryDetectStackSetDriftOutput = (output, context) => { + let contents = { + OperationId: undefined, + }; + if (output["OperationId"] !== undefined) { + contents.OperationId = output["OperationId"]; + } + return contents; +}; +const deserializeAws_queryEstimateTemplateCostOutput = (output, context) => { + let contents = { + Url: undefined, + }; + if (output["Url"] !== undefined) { + contents.Url = output["Url"]; + } + return contents; +}; +const deserializeAws_queryExecuteChangeSetOutput = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryExport = (output, context) => { + let contents = { + ExportingStackId: undefined, + Name: undefined, + Value: undefined, + }; + if (output["ExportingStackId"] !== undefined) { + contents.ExportingStackId = output["ExportingStackId"]; + } + if (output["Name"] !== undefined) { + contents.Name = output["Name"]; + } + if (output["Value"] !== undefined) { + contents.Value = output["Value"]; + } + return contents; +}; +const deserializeAws_queryExports = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryExport(entry, context); + }); +}; +const deserializeAws_queryGetStackPolicyOutput = (output, context) => { + let contents = { + StackPolicyBody: undefined, + }; + if (output["StackPolicyBody"] !== undefined) { + contents.StackPolicyBody = output["StackPolicyBody"]; + } + return contents; +}; +const deserializeAws_queryGetTemplateOutput = (output, context) => { + let contents = { + TemplateBody: undefined, + StagesAvailable: undefined, + }; + if (output["TemplateBody"] !== undefined) { + contents.TemplateBody = output["TemplateBody"]; + } + if (output.StagesAvailable === "") { + contents.StagesAvailable = []; + } + if (output["StagesAvailable"] !== undefined && output["StagesAvailable"]["member"] !== undefined) { + contents.StagesAvailable = deserializeAws_queryStageList(smithy_client_1.getArrayIfSingleItem(output["StagesAvailable"]["member"]), context); + } + return contents; +}; +const deserializeAws_queryGetTemplateSummaryOutput = (output, context) => { + let contents = { + Parameters: undefined, + Description: undefined, + Capabilities: undefined, + CapabilitiesReason: undefined, + ResourceTypes: undefined, + Version: undefined, + Metadata: undefined, + DeclaredTransforms: undefined, + ResourceIdentifierSummaries: undefined, + }; + if (output.Parameters === "") { + contents.Parameters = []; + } + if (output["Parameters"] !== undefined && output["Parameters"]["member"] !== undefined) { + contents.Parameters = deserializeAws_queryParameterDeclarations(smithy_client_1.getArrayIfSingleItem(output["Parameters"]["member"]), context); + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output.Capabilities === "") { + contents.Capabilities = []; + } + if (output["Capabilities"] !== undefined && output["Capabilities"]["member"] !== undefined) { + contents.Capabilities = deserializeAws_queryCapabilities(smithy_client_1.getArrayIfSingleItem(output["Capabilities"]["member"]), context); + } + if (output["CapabilitiesReason"] !== undefined) { + contents.CapabilitiesReason = output["CapabilitiesReason"]; + } + if (output.ResourceTypes === "") { + contents.ResourceTypes = []; + } + if (output["ResourceTypes"] !== undefined && output["ResourceTypes"]["member"] !== undefined) { + contents.ResourceTypes = deserializeAws_queryResourceTypes(smithy_client_1.getArrayIfSingleItem(output["ResourceTypes"]["member"]), context); + } + if (output["Version"] !== undefined) { + contents.Version = output["Version"]; + } + if (output["Metadata"] !== undefined) { + contents.Metadata = output["Metadata"]; + } + if (output.DeclaredTransforms === "") { + contents.DeclaredTransforms = []; + } + if (output["DeclaredTransforms"] !== undefined && output["DeclaredTransforms"]["member"] !== undefined) { + contents.DeclaredTransforms = deserializeAws_queryTransformsList(smithy_client_1.getArrayIfSingleItem(output["DeclaredTransforms"]["member"]), context); + } + if (output.ResourceIdentifierSummaries === "") { + contents.ResourceIdentifierSummaries = []; + } + if (output["ResourceIdentifierSummaries"] !== undefined && + output["ResourceIdentifierSummaries"]["member"] !== undefined) { + contents.ResourceIdentifierSummaries = deserializeAws_queryResourceIdentifierSummaries(smithy_client_1.getArrayIfSingleItem(output["ResourceIdentifierSummaries"]["member"]), context); + } + return contents; +}; +const deserializeAws_queryImports = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryInsufficientCapabilitiesException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryInvalidChangeSetStatusException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryInvalidOperationException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryInvalidStateTransitionException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryLimitExceededException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryListChangeSetsOutput = (output, context) => { + let contents = { + Summaries: undefined, + NextToken: undefined, + }; + if (output.Summaries === "") { + contents.Summaries = []; + } + if (output["Summaries"] !== undefined && output["Summaries"]["member"] !== undefined) { + contents.Summaries = deserializeAws_queryChangeSetSummaries(smithy_client_1.getArrayIfSingleItem(output["Summaries"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListExportsOutput = (output, context) => { + let contents = { + Exports: undefined, + NextToken: undefined, + }; + if (output.Exports === "") { + contents.Exports = []; + } + if (output["Exports"] !== undefined && output["Exports"]["member"] !== undefined) { + contents.Exports = deserializeAws_queryExports(smithy_client_1.getArrayIfSingleItem(output["Exports"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListImportsOutput = (output, context) => { + let contents = { + Imports: undefined, + NextToken: undefined, + }; + if (output.Imports === "") { + contents.Imports = []; + } + if (output["Imports"] !== undefined && output["Imports"]["member"] !== undefined) { + contents.Imports = deserializeAws_queryImports(smithy_client_1.getArrayIfSingleItem(output["Imports"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListStackInstancesOutput = (output, context) => { + let contents = { + Summaries: undefined, + NextToken: undefined, + }; + if (output.Summaries === "") { + contents.Summaries = []; + } + if (output["Summaries"] !== undefined && output["Summaries"]["member"] !== undefined) { + contents.Summaries = deserializeAws_queryStackInstanceSummaries(smithy_client_1.getArrayIfSingleItem(output["Summaries"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListStackResourcesOutput = (output, context) => { + let contents = { + StackResourceSummaries: undefined, + NextToken: undefined, + }; + if (output.StackResourceSummaries === "") { + contents.StackResourceSummaries = []; + } + if (output["StackResourceSummaries"] !== undefined && output["StackResourceSummaries"]["member"] !== undefined) { + contents.StackResourceSummaries = deserializeAws_queryStackResourceSummaries(smithy_client_1.getArrayIfSingleItem(output["StackResourceSummaries"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListStackSetOperationResultsOutput = (output, context) => { + let contents = { + Summaries: undefined, + NextToken: undefined, + }; + if (output.Summaries === "") { + contents.Summaries = []; + } + if (output["Summaries"] !== undefined && output["Summaries"]["member"] !== undefined) { + contents.Summaries = deserializeAws_queryStackSetOperationResultSummaries(smithy_client_1.getArrayIfSingleItem(output["Summaries"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListStackSetOperationsOutput = (output, context) => { + let contents = { + Summaries: undefined, + NextToken: undefined, + }; + if (output.Summaries === "") { + contents.Summaries = []; + } + if (output["Summaries"] !== undefined && output["Summaries"]["member"] !== undefined) { + contents.Summaries = deserializeAws_queryStackSetOperationSummaries(smithy_client_1.getArrayIfSingleItem(output["Summaries"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListStackSetsOutput = (output, context) => { + let contents = { + Summaries: undefined, + NextToken: undefined, + }; + if (output.Summaries === "") { + contents.Summaries = []; + } + if (output["Summaries"] !== undefined && output["Summaries"]["member"] !== undefined) { + contents.Summaries = deserializeAws_queryStackSetSummaries(smithy_client_1.getArrayIfSingleItem(output["Summaries"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListStacksOutput = (output, context) => { + let contents = { + StackSummaries: undefined, + NextToken: undefined, + }; + if (output.StackSummaries === "") { + contents.StackSummaries = []; + } + if (output["StackSummaries"] !== undefined && output["StackSummaries"]["member"] !== undefined) { + contents.StackSummaries = deserializeAws_queryStackSummaries(smithy_client_1.getArrayIfSingleItem(output["StackSummaries"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListTypeRegistrationsOutput = (output, context) => { + let contents = { + RegistrationTokenList: undefined, + NextToken: undefined, + }; + if (output.RegistrationTokenList === "") { + contents.RegistrationTokenList = []; + } + if (output["RegistrationTokenList"] !== undefined && output["RegistrationTokenList"]["member"] !== undefined) { + contents.RegistrationTokenList = deserializeAws_queryRegistrationTokenList(smithy_client_1.getArrayIfSingleItem(output["RegistrationTokenList"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListTypesOutput = (output, context) => { + let contents = { + TypeSummaries: undefined, + NextToken: undefined, + }; + if (output.TypeSummaries === "") { + contents.TypeSummaries = []; + } + if (output["TypeSummaries"] !== undefined && output["TypeSummaries"]["member"] !== undefined) { + contents.TypeSummaries = deserializeAws_queryTypeSummaries(smithy_client_1.getArrayIfSingleItem(output["TypeSummaries"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListTypeVersionsOutput = (output, context) => { + let contents = { + TypeVersionSummaries: undefined, + NextToken: undefined, + }; + if (output.TypeVersionSummaries === "") { + contents.TypeVersionSummaries = []; + } + if (output["TypeVersionSummaries"] !== undefined && output["TypeVersionSummaries"]["member"] !== undefined) { + contents.TypeVersionSummaries = deserializeAws_queryTypeVersionSummaries(smithy_client_1.getArrayIfSingleItem(output["TypeVersionSummaries"]["member"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryLoggingConfig = (output, context) => { + let contents = { + LogRoleArn: undefined, + LogGroupName: undefined, + }; + if (output["LogRoleArn"] !== undefined) { + contents.LogRoleArn = output["LogRoleArn"]; + } + if (output["LogGroupName"] !== undefined) { + contents.LogGroupName = output["LogGroupName"]; + } + return contents; +}; +const deserializeAws_queryLogicalResourceIds = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryModuleInfo = (output, context) => { + let contents = { + TypeHierarchy: undefined, + LogicalIdHierarchy: undefined, + }; + if (output["TypeHierarchy"] !== undefined) { + contents.TypeHierarchy = output["TypeHierarchy"]; + } + if (output["LogicalIdHierarchy"] !== undefined) { + contents.LogicalIdHierarchy = output["LogicalIdHierarchy"]; + } + return contents; +}; +const deserializeAws_queryNameAlreadyExistsException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryNotificationARNs = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryOperationIdAlreadyExistsException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryOperationInProgressException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryOperationNotFoundException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryOperationStatusCheckFailedException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryOrganizationalUnitIdList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryOutput = (output, context) => { + let contents = { + OutputKey: undefined, + OutputValue: undefined, + Description: undefined, + ExportName: undefined, + }; + if (output["OutputKey"] !== undefined) { + contents.OutputKey = output["OutputKey"]; + } + if (output["OutputValue"] !== undefined) { + contents.OutputValue = output["OutputValue"]; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output["ExportName"] !== undefined) { + contents.ExportName = output["ExportName"]; + } + return contents; +}; +const deserializeAws_queryOutputs = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryOutput(entry, context); + }); +}; +const deserializeAws_queryParameter = (output, context) => { + let contents = { + ParameterKey: undefined, + ParameterValue: undefined, + UsePreviousValue: undefined, + ResolvedValue: undefined, + }; + if (output["ParameterKey"] !== undefined) { + contents.ParameterKey = output["ParameterKey"]; + } + if (output["ParameterValue"] !== undefined) { + contents.ParameterValue = output["ParameterValue"]; + } + if (output["UsePreviousValue"] !== undefined) { + contents.UsePreviousValue = output["UsePreviousValue"] == "true"; + } + if (output["ResolvedValue"] !== undefined) { + contents.ResolvedValue = output["ResolvedValue"]; + } + return contents; +}; +const deserializeAws_queryParameterConstraints = (output, context) => { + let contents = { + AllowedValues: undefined, + }; + if (output.AllowedValues === "") { + contents.AllowedValues = []; + } + if (output["AllowedValues"] !== undefined && output["AllowedValues"]["member"] !== undefined) { + contents.AllowedValues = deserializeAws_queryAllowedValues(smithy_client_1.getArrayIfSingleItem(output["AllowedValues"]["member"]), context); + } + return contents; +}; +const deserializeAws_queryParameterDeclaration = (output, context) => { + let contents = { + ParameterKey: undefined, + DefaultValue: undefined, + ParameterType: undefined, + NoEcho: undefined, + Description: undefined, + ParameterConstraints: undefined, + }; + if (output["ParameterKey"] !== undefined) { + contents.ParameterKey = output["ParameterKey"]; + } + if (output["DefaultValue"] !== undefined) { + contents.DefaultValue = output["DefaultValue"]; + } + if (output["ParameterType"] !== undefined) { + contents.ParameterType = output["ParameterType"]; + } + if (output["NoEcho"] !== undefined) { + contents.NoEcho = output["NoEcho"] == "true"; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output["ParameterConstraints"] !== undefined) { + contents.ParameterConstraints = deserializeAws_queryParameterConstraints(output["ParameterConstraints"], context); + } + return contents; +}; +const deserializeAws_queryParameterDeclarations = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryParameterDeclaration(entry, context); + }); +}; +const deserializeAws_queryParameters = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryParameter(entry, context); + }); +}; +const deserializeAws_queryPhysicalResourceIdContext = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryPhysicalResourceIdContextKeyValuePair(entry, context); + }); +}; +const deserializeAws_queryPhysicalResourceIdContextKeyValuePair = (output, context) => { + let contents = { + Key: undefined, + Value: undefined, + }; + if (output["Key"] !== undefined) { + contents.Key = output["Key"]; + } + if (output["Value"] !== undefined) { + contents.Value = output["Value"]; + } + return contents; +}; +const deserializeAws_queryPropertyDifference = (output, context) => { + let contents = { + PropertyPath: undefined, + ExpectedValue: undefined, + ActualValue: undefined, + DifferenceType: undefined, + }; + if (output["PropertyPath"] !== undefined) { + contents.PropertyPath = output["PropertyPath"]; + } + if (output["ExpectedValue"] !== undefined) { + contents.ExpectedValue = output["ExpectedValue"]; + } + if (output["ActualValue"] !== undefined) { + contents.ActualValue = output["ActualValue"]; + } + if (output["DifferenceType"] !== undefined) { + contents.DifferenceType = output["DifferenceType"]; + } + return contents; +}; +const deserializeAws_queryPropertyDifferences = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryPropertyDifference(entry, context); + }); +}; +const deserializeAws_queryRecordHandlerProgressOutput = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryRegionList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryRegisterTypeOutput = (output, context) => { + let contents = { + RegistrationToken: undefined, + }; + if (output["RegistrationToken"] !== undefined) { + contents.RegistrationToken = output["RegistrationToken"]; + } + return contents; +}; +const deserializeAws_queryRegistrationTokenList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryResourceChange = (output, context) => { + let contents = { + Action: undefined, + LogicalResourceId: undefined, + PhysicalResourceId: undefined, + ResourceType: undefined, + Replacement: undefined, + Scope: undefined, + Details: undefined, + ChangeSetId: undefined, + ModuleInfo: undefined, + }; + if (output["Action"] !== undefined) { + contents.Action = output["Action"]; + } + if (output["LogicalResourceId"] !== undefined) { + contents.LogicalResourceId = output["LogicalResourceId"]; + } + if (output["PhysicalResourceId"] !== undefined) { + contents.PhysicalResourceId = output["PhysicalResourceId"]; + } + if (output["ResourceType"] !== undefined) { + contents.ResourceType = output["ResourceType"]; + } + if (output["Replacement"] !== undefined) { + contents.Replacement = output["Replacement"]; + } + if (output.Scope === "") { + contents.Scope = []; + } + if (output["Scope"] !== undefined && output["Scope"]["member"] !== undefined) { + contents.Scope = deserializeAws_queryScope(smithy_client_1.getArrayIfSingleItem(output["Scope"]["member"]), context); + } + if (output.Details === "") { + contents.Details = []; + } + if (output["Details"] !== undefined && output["Details"]["member"] !== undefined) { + contents.Details = deserializeAws_queryResourceChangeDetails(smithy_client_1.getArrayIfSingleItem(output["Details"]["member"]), context); + } + if (output["ChangeSetId"] !== undefined) { + contents.ChangeSetId = output["ChangeSetId"]; + } + if (output["ModuleInfo"] !== undefined) { + contents.ModuleInfo = deserializeAws_queryModuleInfo(output["ModuleInfo"], context); + } + return contents; +}; +const deserializeAws_queryResourceChangeDetail = (output, context) => { + let contents = { + Target: undefined, + Evaluation: undefined, + ChangeSource: undefined, + CausingEntity: undefined, + }; + if (output["Target"] !== undefined) { + contents.Target = deserializeAws_queryResourceTargetDefinition(output["Target"], context); + } + if (output["Evaluation"] !== undefined) { + contents.Evaluation = output["Evaluation"]; + } + if (output["ChangeSource"] !== undefined) { + contents.ChangeSource = output["ChangeSource"]; + } + if (output["CausingEntity"] !== undefined) { + contents.CausingEntity = output["CausingEntity"]; + } + return contents; +}; +const deserializeAws_queryResourceChangeDetails = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryResourceChangeDetail(entry, context); + }); +}; +const deserializeAws_queryResourceIdentifiers = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryResourceIdentifierSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryResourceIdentifierSummary(entry, context); + }); +}; +const deserializeAws_queryResourceIdentifierSummary = (output, context) => { + let contents = { + ResourceType: undefined, + LogicalResourceIds: undefined, + ResourceIdentifiers: undefined, + }; + if (output["ResourceType"] !== undefined) { + contents.ResourceType = output["ResourceType"]; + } + if (output.LogicalResourceIds === "") { + contents.LogicalResourceIds = []; + } + if (output["LogicalResourceIds"] !== undefined && output["LogicalResourceIds"]["member"] !== undefined) { + contents.LogicalResourceIds = deserializeAws_queryLogicalResourceIds(smithy_client_1.getArrayIfSingleItem(output["LogicalResourceIds"]["member"]), context); + } + if (output.ResourceIdentifiers === "") { + contents.ResourceIdentifiers = []; + } + if (output["ResourceIdentifiers"] !== undefined && output["ResourceIdentifiers"]["member"] !== undefined) { + contents.ResourceIdentifiers = deserializeAws_queryResourceIdentifiers(smithy_client_1.getArrayIfSingleItem(output["ResourceIdentifiers"]["member"]), context); + } + return contents; +}; +const deserializeAws_queryResourceTargetDefinition = (output, context) => { + let contents = { + Attribute: undefined, + Name: undefined, + RequiresRecreation: undefined, + }; + if (output["Attribute"] !== undefined) { + contents.Attribute = output["Attribute"]; + } + if (output["Name"] !== undefined) { + contents.Name = output["Name"]; + } + if (output["RequiresRecreation"] !== undefined) { + contents.RequiresRecreation = output["RequiresRecreation"]; + } + return contents; +}; +const deserializeAws_queryResourceTypes = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryRollbackConfiguration = (output, context) => { + let contents = { + RollbackTriggers: undefined, + MonitoringTimeInMinutes: undefined, + }; + if (output.RollbackTriggers === "") { + contents.RollbackTriggers = []; + } + if (output["RollbackTriggers"] !== undefined && output["RollbackTriggers"]["member"] !== undefined) { + contents.RollbackTriggers = deserializeAws_queryRollbackTriggers(smithy_client_1.getArrayIfSingleItem(output["RollbackTriggers"]["member"]), context); + } + if (output["MonitoringTimeInMinutes"] !== undefined) { + contents.MonitoringTimeInMinutes = parseInt(output["MonitoringTimeInMinutes"]); + } + return contents; +}; +const deserializeAws_queryRollbackTrigger = (output, context) => { + let contents = { + Arn: undefined, + Type: undefined, + }; + if (output["Arn"] !== undefined) { + contents.Arn = output["Arn"]; + } + if (output["Type"] !== undefined) { + contents.Type = output["Type"]; + } + return contents; +}; +const deserializeAws_queryRollbackTriggers = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryRollbackTrigger(entry, context); + }); +}; +const deserializeAws_queryScope = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_querySetTypeDefaultVersionOutput = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryStack = (output, context) => { + let contents = { + StackId: undefined, + StackName: undefined, + ChangeSetId: undefined, + Description: undefined, + Parameters: undefined, + CreationTime: undefined, + DeletionTime: undefined, + LastUpdatedTime: undefined, + RollbackConfiguration: undefined, + StackStatus: undefined, + StackStatusReason: undefined, + DisableRollback: undefined, + NotificationARNs: undefined, + TimeoutInMinutes: undefined, + Capabilities: undefined, + Outputs: undefined, + RoleARN: undefined, + Tags: undefined, + EnableTerminationProtection: undefined, + ParentId: undefined, + RootId: undefined, + DriftInformation: undefined, + }; + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output["StackName"] !== undefined) { + contents.StackName = output["StackName"]; + } + if (output["ChangeSetId"] !== undefined) { + contents.ChangeSetId = output["ChangeSetId"]; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output.Parameters === "") { + contents.Parameters = []; + } + if (output["Parameters"] !== undefined && output["Parameters"]["member"] !== undefined) { + contents.Parameters = deserializeAws_queryParameters(smithy_client_1.getArrayIfSingleItem(output["Parameters"]["member"]), context); + } + if (output["CreationTime"] !== undefined) { + contents.CreationTime = new Date(output["CreationTime"]); + } + if (output["DeletionTime"] !== undefined) { + contents.DeletionTime = new Date(output["DeletionTime"]); + } + if (output["LastUpdatedTime"] !== undefined) { + contents.LastUpdatedTime = new Date(output["LastUpdatedTime"]); + } + if (output["RollbackConfiguration"] !== undefined) { + contents.RollbackConfiguration = deserializeAws_queryRollbackConfiguration(output["RollbackConfiguration"], context); + } + if (output["StackStatus"] !== undefined) { + contents.StackStatus = output["StackStatus"]; + } + if (output["StackStatusReason"] !== undefined) { + contents.StackStatusReason = output["StackStatusReason"]; + } + if (output["DisableRollback"] !== undefined) { + contents.DisableRollback = output["DisableRollback"] == "true"; + } + if (output.NotificationARNs === "") { + contents.NotificationARNs = []; + } + if (output["NotificationARNs"] !== undefined && output["NotificationARNs"]["member"] !== undefined) { + contents.NotificationARNs = deserializeAws_queryNotificationARNs(smithy_client_1.getArrayIfSingleItem(output["NotificationARNs"]["member"]), context); + } + if (output["TimeoutInMinutes"] !== undefined) { + contents.TimeoutInMinutes = parseInt(output["TimeoutInMinutes"]); + } + if (output.Capabilities === "") { + contents.Capabilities = []; + } + if (output["Capabilities"] !== undefined && output["Capabilities"]["member"] !== undefined) { + contents.Capabilities = deserializeAws_queryCapabilities(smithy_client_1.getArrayIfSingleItem(output["Capabilities"]["member"]), context); + } + if (output.Outputs === "") { + contents.Outputs = []; + } + if (output["Outputs"] !== undefined && output["Outputs"]["member"] !== undefined) { + contents.Outputs = deserializeAws_queryOutputs(smithy_client_1.getArrayIfSingleItem(output["Outputs"]["member"]), context); + } + if (output["RoleARN"] !== undefined) { + contents.RoleARN = output["RoleARN"]; + } + if (output.Tags === "") { + contents.Tags = []; + } + if (output["Tags"] !== undefined && output["Tags"]["member"] !== undefined) { + contents.Tags = deserializeAws_queryTags(smithy_client_1.getArrayIfSingleItem(output["Tags"]["member"]), context); + } + if (output["EnableTerminationProtection"] !== undefined) { + contents.EnableTerminationProtection = output["EnableTerminationProtection"] == "true"; + } + if (output["ParentId"] !== undefined) { + contents.ParentId = output["ParentId"]; + } + if (output["RootId"] !== undefined) { + contents.RootId = output["RootId"]; + } + if (output["DriftInformation"] !== undefined) { + contents.DriftInformation = deserializeAws_queryStackDriftInformation(output["DriftInformation"], context); + } + return contents; +}; +const deserializeAws_queryStackDriftInformation = (output, context) => { + let contents = { + StackDriftStatus: undefined, + LastCheckTimestamp: undefined, + }; + if (output["StackDriftStatus"] !== undefined) { + contents.StackDriftStatus = output["StackDriftStatus"]; + } + if (output["LastCheckTimestamp"] !== undefined) { + contents.LastCheckTimestamp = new Date(output["LastCheckTimestamp"]); + } + return contents; +}; +const deserializeAws_queryStackDriftInformationSummary = (output, context) => { + let contents = { + StackDriftStatus: undefined, + LastCheckTimestamp: undefined, + }; + if (output["StackDriftStatus"] !== undefined) { + contents.StackDriftStatus = output["StackDriftStatus"]; + } + if (output["LastCheckTimestamp"] !== undefined) { + contents.LastCheckTimestamp = new Date(output["LastCheckTimestamp"]); + } + return contents; +}; +const deserializeAws_queryStackEvent = (output, context) => { + let contents = { + StackId: undefined, + EventId: undefined, + StackName: undefined, + LogicalResourceId: undefined, + PhysicalResourceId: undefined, + ResourceType: undefined, + Timestamp: undefined, + ResourceStatus: undefined, + ResourceStatusReason: undefined, + ResourceProperties: undefined, + ClientRequestToken: undefined, + }; + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output["EventId"] !== undefined) { + contents.EventId = output["EventId"]; + } + if (output["StackName"] !== undefined) { + contents.StackName = output["StackName"]; + } + if (output["LogicalResourceId"] !== undefined) { + contents.LogicalResourceId = output["LogicalResourceId"]; + } + if (output["PhysicalResourceId"] !== undefined) { + contents.PhysicalResourceId = output["PhysicalResourceId"]; + } + if (output["ResourceType"] !== undefined) { + contents.ResourceType = output["ResourceType"]; + } + if (output["Timestamp"] !== undefined) { + contents.Timestamp = new Date(output["Timestamp"]); + } + if (output["ResourceStatus"] !== undefined) { + contents.ResourceStatus = output["ResourceStatus"]; + } + if (output["ResourceStatusReason"] !== undefined) { + contents.ResourceStatusReason = output["ResourceStatusReason"]; + } + if (output["ResourceProperties"] !== undefined) { + contents.ResourceProperties = output["ResourceProperties"]; + } + if (output["ClientRequestToken"] !== undefined) { + contents.ClientRequestToken = output["ClientRequestToken"]; + } + return contents; +}; +const deserializeAws_queryStackEvents = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryStackEvent(entry, context); + }); +}; +const deserializeAws_queryStackInstance = (output, context) => { + let contents = { + StackSetId: undefined, + Region: undefined, + Account: undefined, + StackId: undefined, + ParameterOverrides: undefined, + Status: undefined, + StackInstanceStatus: undefined, + StatusReason: undefined, + OrganizationalUnitId: undefined, + DriftStatus: undefined, + LastDriftCheckTimestamp: undefined, + }; + if (output["StackSetId"] !== undefined) { + contents.StackSetId = output["StackSetId"]; + } + if (output["Region"] !== undefined) { + contents.Region = output["Region"]; + } + if (output["Account"] !== undefined) { + contents.Account = output["Account"]; + } + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output.ParameterOverrides === "") { + contents.ParameterOverrides = []; + } + if (output["ParameterOverrides"] !== undefined && output["ParameterOverrides"]["member"] !== undefined) { + contents.ParameterOverrides = deserializeAws_queryParameters(smithy_client_1.getArrayIfSingleItem(output["ParameterOverrides"]["member"]), context); + } + if (output["Status"] !== undefined) { + contents.Status = output["Status"]; + } + if (output["StackInstanceStatus"] !== undefined) { + contents.StackInstanceStatus = deserializeAws_queryStackInstanceComprehensiveStatus(output["StackInstanceStatus"], context); + } + if (output["StatusReason"] !== undefined) { + contents.StatusReason = output["StatusReason"]; + } + if (output["OrganizationalUnitId"] !== undefined) { + contents.OrganizationalUnitId = output["OrganizationalUnitId"]; + } + if (output["DriftStatus"] !== undefined) { + contents.DriftStatus = output["DriftStatus"]; + } + if (output["LastDriftCheckTimestamp"] !== undefined) { + contents.LastDriftCheckTimestamp = new Date(output["LastDriftCheckTimestamp"]); + } + return contents; +}; +const deserializeAws_queryStackInstanceComprehensiveStatus = (output, context) => { + let contents = { + DetailedStatus: undefined, + }; + if (output["DetailedStatus"] !== undefined) { + contents.DetailedStatus = output["DetailedStatus"]; + } + return contents; +}; +const deserializeAws_queryStackInstanceNotFoundException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryStackInstanceSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryStackInstanceSummary(entry, context); + }); +}; +const deserializeAws_queryStackInstanceSummary = (output, context) => { + let contents = { + StackSetId: undefined, + Region: undefined, + Account: undefined, + StackId: undefined, + Status: undefined, + StatusReason: undefined, + StackInstanceStatus: undefined, + OrganizationalUnitId: undefined, + DriftStatus: undefined, + LastDriftCheckTimestamp: undefined, + }; + if (output["StackSetId"] !== undefined) { + contents.StackSetId = output["StackSetId"]; + } + if (output["Region"] !== undefined) { + contents.Region = output["Region"]; + } + if (output["Account"] !== undefined) { + contents.Account = output["Account"]; + } + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output["Status"] !== undefined) { + contents.Status = output["Status"]; + } + if (output["StatusReason"] !== undefined) { + contents.StatusReason = output["StatusReason"]; + } + if (output["StackInstanceStatus"] !== undefined) { + contents.StackInstanceStatus = deserializeAws_queryStackInstanceComprehensiveStatus(output["StackInstanceStatus"], context); + } + if (output["OrganizationalUnitId"] !== undefined) { + contents.OrganizationalUnitId = output["OrganizationalUnitId"]; + } + if (output["DriftStatus"] !== undefined) { + contents.DriftStatus = output["DriftStatus"]; + } + if (output["LastDriftCheckTimestamp"] !== undefined) { + contents.LastDriftCheckTimestamp = new Date(output["LastDriftCheckTimestamp"]); + } + return contents; +}; +const deserializeAws_queryStackResource = (output, context) => { + let contents = { + StackName: undefined, + StackId: undefined, + LogicalResourceId: undefined, + PhysicalResourceId: undefined, + ResourceType: undefined, + Timestamp: undefined, + ResourceStatus: undefined, + ResourceStatusReason: undefined, + Description: undefined, + DriftInformation: undefined, + ModuleInfo: undefined, + }; + if (output["StackName"] !== undefined) { + contents.StackName = output["StackName"]; + } + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output["LogicalResourceId"] !== undefined) { + contents.LogicalResourceId = output["LogicalResourceId"]; + } + if (output["PhysicalResourceId"] !== undefined) { + contents.PhysicalResourceId = output["PhysicalResourceId"]; + } + if (output["ResourceType"] !== undefined) { + contents.ResourceType = output["ResourceType"]; + } + if (output["Timestamp"] !== undefined) { + contents.Timestamp = new Date(output["Timestamp"]); + } + if (output["ResourceStatus"] !== undefined) { + contents.ResourceStatus = output["ResourceStatus"]; + } + if (output["ResourceStatusReason"] !== undefined) { + contents.ResourceStatusReason = output["ResourceStatusReason"]; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output["DriftInformation"] !== undefined) { + contents.DriftInformation = deserializeAws_queryStackResourceDriftInformation(output["DriftInformation"], context); + } + if (output["ModuleInfo"] !== undefined) { + contents.ModuleInfo = deserializeAws_queryModuleInfo(output["ModuleInfo"], context); + } + return contents; +}; +const deserializeAws_queryStackResourceDetail = (output, context) => { + let contents = { + StackName: undefined, + StackId: undefined, + LogicalResourceId: undefined, + PhysicalResourceId: undefined, + ResourceType: undefined, + LastUpdatedTimestamp: undefined, + ResourceStatus: undefined, + ResourceStatusReason: undefined, + Description: undefined, + Metadata: undefined, + DriftInformation: undefined, + ModuleInfo: undefined, + }; + if (output["StackName"] !== undefined) { + contents.StackName = output["StackName"]; + } + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output["LogicalResourceId"] !== undefined) { + contents.LogicalResourceId = output["LogicalResourceId"]; + } + if (output["PhysicalResourceId"] !== undefined) { + contents.PhysicalResourceId = output["PhysicalResourceId"]; + } + if (output["ResourceType"] !== undefined) { + contents.ResourceType = output["ResourceType"]; + } + if (output["LastUpdatedTimestamp"] !== undefined) { + contents.LastUpdatedTimestamp = new Date(output["LastUpdatedTimestamp"]); + } + if (output["ResourceStatus"] !== undefined) { + contents.ResourceStatus = output["ResourceStatus"]; + } + if (output["ResourceStatusReason"] !== undefined) { + contents.ResourceStatusReason = output["ResourceStatusReason"]; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output["Metadata"] !== undefined) { + contents.Metadata = output["Metadata"]; + } + if (output["DriftInformation"] !== undefined) { + contents.DriftInformation = deserializeAws_queryStackResourceDriftInformation(output["DriftInformation"], context); + } + if (output["ModuleInfo"] !== undefined) { + contents.ModuleInfo = deserializeAws_queryModuleInfo(output["ModuleInfo"], context); + } + return contents; +}; +const deserializeAws_queryStackResourceDrift = (output, context) => { + let contents = { + StackId: undefined, + LogicalResourceId: undefined, + PhysicalResourceId: undefined, + PhysicalResourceIdContext: undefined, + ResourceType: undefined, + ExpectedProperties: undefined, + ActualProperties: undefined, + PropertyDifferences: undefined, + StackResourceDriftStatus: undefined, + Timestamp: undefined, + ModuleInfo: undefined, + }; + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output["LogicalResourceId"] !== undefined) { + contents.LogicalResourceId = output["LogicalResourceId"]; + } + if (output["PhysicalResourceId"] !== undefined) { + contents.PhysicalResourceId = output["PhysicalResourceId"]; + } + if (output.PhysicalResourceIdContext === "") { + contents.PhysicalResourceIdContext = []; + } + if (output["PhysicalResourceIdContext"] !== undefined && + output["PhysicalResourceIdContext"]["member"] !== undefined) { + contents.PhysicalResourceIdContext = deserializeAws_queryPhysicalResourceIdContext(smithy_client_1.getArrayIfSingleItem(output["PhysicalResourceIdContext"]["member"]), context); + } + if (output["ResourceType"] !== undefined) { + contents.ResourceType = output["ResourceType"]; + } + if (output["ExpectedProperties"] !== undefined) { + contents.ExpectedProperties = output["ExpectedProperties"]; + } + if (output["ActualProperties"] !== undefined) { + contents.ActualProperties = output["ActualProperties"]; + } + if (output.PropertyDifferences === "") { + contents.PropertyDifferences = []; + } + if (output["PropertyDifferences"] !== undefined && output["PropertyDifferences"]["member"] !== undefined) { + contents.PropertyDifferences = deserializeAws_queryPropertyDifferences(smithy_client_1.getArrayIfSingleItem(output["PropertyDifferences"]["member"]), context); + } + if (output["StackResourceDriftStatus"] !== undefined) { + contents.StackResourceDriftStatus = output["StackResourceDriftStatus"]; + } + if (output["Timestamp"] !== undefined) { + contents.Timestamp = new Date(output["Timestamp"]); + } + if (output["ModuleInfo"] !== undefined) { + contents.ModuleInfo = deserializeAws_queryModuleInfo(output["ModuleInfo"], context); + } + return contents; +}; +const deserializeAws_queryStackResourceDriftInformation = (output, context) => { + let contents = { + StackResourceDriftStatus: undefined, + LastCheckTimestamp: undefined, + }; + if (output["StackResourceDriftStatus"] !== undefined) { + contents.StackResourceDriftStatus = output["StackResourceDriftStatus"]; + } + if (output["LastCheckTimestamp"] !== undefined) { + contents.LastCheckTimestamp = new Date(output["LastCheckTimestamp"]); + } + return contents; +}; +const deserializeAws_queryStackResourceDriftInformationSummary = (output, context) => { + let contents = { + StackResourceDriftStatus: undefined, + LastCheckTimestamp: undefined, + }; + if (output["StackResourceDriftStatus"] !== undefined) { + contents.StackResourceDriftStatus = output["StackResourceDriftStatus"]; + } + if (output["LastCheckTimestamp"] !== undefined) { + contents.LastCheckTimestamp = new Date(output["LastCheckTimestamp"]); + } + return contents; +}; +const deserializeAws_queryStackResourceDrifts = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryStackResourceDrift(entry, context); + }); +}; +const deserializeAws_queryStackResources = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryStackResource(entry, context); + }); +}; +const deserializeAws_queryStackResourceSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryStackResourceSummary(entry, context); + }); +}; +const deserializeAws_queryStackResourceSummary = (output, context) => { + let contents = { + LogicalResourceId: undefined, + PhysicalResourceId: undefined, + ResourceType: undefined, + LastUpdatedTimestamp: undefined, + ResourceStatus: undefined, + ResourceStatusReason: undefined, + DriftInformation: undefined, + ModuleInfo: undefined, + }; + if (output["LogicalResourceId"] !== undefined) { + contents.LogicalResourceId = output["LogicalResourceId"]; + } + if (output["PhysicalResourceId"] !== undefined) { + contents.PhysicalResourceId = output["PhysicalResourceId"]; + } + if (output["ResourceType"] !== undefined) { + contents.ResourceType = output["ResourceType"]; + } + if (output["LastUpdatedTimestamp"] !== undefined) { + contents.LastUpdatedTimestamp = new Date(output["LastUpdatedTimestamp"]); + } + if (output["ResourceStatus"] !== undefined) { + contents.ResourceStatus = output["ResourceStatus"]; + } + if (output["ResourceStatusReason"] !== undefined) { + contents.ResourceStatusReason = output["ResourceStatusReason"]; + } + if (output["DriftInformation"] !== undefined) { + contents.DriftInformation = deserializeAws_queryStackResourceDriftInformationSummary(output["DriftInformation"], context); + } + if (output["ModuleInfo"] !== undefined) { + contents.ModuleInfo = deserializeAws_queryModuleInfo(output["ModuleInfo"], context); + } + return contents; +}; +const deserializeAws_queryStacks = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryStack(entry, context); + }); +}; +const deserializeAws_queryStackSet = (output, context) => { + let contents = { + StackSetName: undefined, + StackSetId: undefined, + Description: undefined, + Status: undefined, + TemplateBody: undefined, + Parameters: undefined, + Capabilities: undefined, + Tags: undefined, + StackSetARN: undefined, + AdministrationRoleARN: undefined, + ExecutionRoleName: undefined, + StackSetDriftDetectionDetails: undefined, + AutoDeployment: undefined, + PermissionModel: undefined, + OrganizationalUnitIds: undefined, + }; + if (output["StackSetName"] !== undefined) { + contents.StackSetName = output["StackSetName"]; + } + if (output["StackSetId"] !== undefined) { + contents.StackSetId = output["StackSetId"]; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output["Status"] !== undefined) { + contents.Status = output["Status"]; + } + if (output["TemplateBody"] !== undefined) { + contents.TemplateBody = output["TemplateBody"]; + } + if (output.Parameters === "") { + contents.Parameters = []; + } + if (output["Parameters"] !== undefined && output["Parameters"]["member"] !== undefined) { + contents.Parameters = deserializeAws_queryParameters(smithy_client_1.getArrayIfSingleItem(output["Parameters"]["member"]), context); + } + if (output.Capabilities === "") { + contents.Capabilities = []; + } + if (output["Capabilities"] !== undefined && output["Capabilities"]["member"] !== undefined) { + contents.Capabilities = deserializeAws_queryCapabilities(smithy_client_1.getArrayIfSingleItem(output["Capabilities"]["member"]), context); + } + if (output.Tags === "") { + contents.Tags = []; + } + if (output["Tags"] !== undefined && output["Tags"]["member"] !== undefined) { + contents.Tags = deserializeAws_queryTags(smithy_client_1.getArrayIfSingleItem(output["Tags"]["member"]), context); + } + if (output["StackSetARN"] !== undefined) { + contents.StackSetARN = output["StackSetARN"]; + } + if (output["AdministrationRoleARN"] !== undefined) { + contents.AdministrationRoleARN = output["AdministrationRoleARN"]; + } + if (output["ExecutionRoleName"] !== undefined) { + contents.ExecutionRoleName = output["ExecutionRoleName"]; + } + if (output["StackSetDriftDetectionDetails"] !== undefined) { + contents.StackSetDriftDetectionDetails = deserializeAws_queryStackSetDriftDetectionDetails(output["StackSetDriftDetectionDetails"], context); + } + if (output["AutoDeployment"] !== undefined) { + contents.AutoDeployment = deserializeAws_queryAutoDeployment(output["AutoDeployment"], context); + } + if (output["PermissionModel"] !== undefined) { + contents.PermissionModel = output["PermissionModel"]; + } + if (output.OrganizationalUnitIds === "") { + contents.OrganizationalUnitIds = []; + } + if (output["OrganizationalUnitIds"] !== undefined && output["OrganizationalUnitIds"]["member"] !== undefined) { + contents.OrganizationalUnitIds = deserializeAws_queryOrganizationalUnitIdList(smithy_client_1.getArrayIfSingleItem(output["OrganizationalUnitIds"]["member"]), context); + } + return contents; +}; +const deserializeAws_queryStackSetDriftDetectionDetails = (output, context) => { + let contents = { + DriftStatus: undefined, + DriftDetectionStatus: undefined, + LastDriftCheckTimestamp: undefined, + TotalStackInstancesCount: undefined, + DriftedStackInstancesCount: undefined, + InSyncStackInstancesCount: undefined, + InProgressStackInstancesCount: undefined, + FailedStackInstancesCount: undefined, + }; + if (output["DriftStatus"] !== undefined) { + contents.DriftStatus = output["DriftStatus"]; + } + if (output["DriftDetectionStatus"] !== undefined) { + contents.DriftDetectionStatus = output["DriftDetectionStatus"]; + } + if (output["LastDriftCheckTimestamp"] !== undefined) { + contents.LastDriftCheckTimestamp = new Date(output["LastDriftCheckTimestamp"]); + } + if (output["TotalStackInstancesCount"] !== undefined) { + contents.TotalStackInstancesCount = parseInt(output["TotalStackInstancesCount"]); + } + if (output["DriftedStackInstancesCount"] !== undefined) { + contents.DriftedStackInstancesCount = parseInt(output["DriftedStackInstancesCount"]); + } + if (output["InSyncStackInstancesCount"] !== undefined) { + contents.InSyncStackInstancesCount = parseInt(output["InSyncStackInstancesCount"]); + } + if (output["InProgressStackInstancesCount"] !== undefined) { + contents.InProgressStackInstancesCount = parseInt(output["InProgressStackInstancesCount"]); + } + if (output["FailedStackInstancesCount"] !== undefined) { + contents.FailedStackInstancesCount = parseInt(output["FailedStackInstancesCount"]); + } + return contents; +}; +const deserializeAws_queryStackSetNotEmptyException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryStackSetNotFoundException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryStackSetOperation = (output, context) => { + let contents = { + OperationId: undefined, + StackSetId: undefined, + Action: undefined, + Status: undefined, + OperationPreferences: undefined, + RetainStacks: undefined, + AdministrationRoleARN: undefined, + ExecutionRoleName: undefined, + CreationTimestamp: undefined, + EndTimestamp: undefined, + DeploymentTargets: undefined, + StackSetDriftDetectionDetails: undefined, + }; + if (output["OperationId"] !== undefined) { + contents.OperationId = output["OperationId"]; + } + if (output["StackSetId"] !== undefined) { + contents.StackSetId = output["StackSetId"]; + } + if (output["Action"] !== undefined) { + contents.Action = output["Action"]; + } + if (output["Status"] !== undefined) { + contents.Status = output["Status"]; + } + if (output["OperationPreferences"] !== undefined) { + contents.OperationPreferences = deserializeAws_queryStackSetOperationPreferences(output["OperationPreferences"], context); + } + if (output["RetainStacks"] !== undefined) { + contents.RetainStacks = output["RetainStacks"] == "true"; + } + if (output["AdministrationRoleARN"] !== undefined) { + contents.AdministrationRoleARN = output["AdministrationRoleARN"]; + } + if (output["ExecutionRoleName"] !== undefined) { + contents.ExecutionRoleName = output["ExecutionRoleName"]; + } + if (output["CreationTimestamp"] !== undefined) { + contents.CreationTimestamp = new Date(output["CreationTimestamp"]); + } + if (output["EndTimestamp"] !== undefined) { + contents.EndTimestamp = new Date(output["EndTimestamp"]); + } + if (output["DeploymentTargets"] !== undefined) { + contents.DeploymentTargets = deserializeAws_queryDeploymentTargets(output["DeploymentTargets"], context); + } + if (output["StackSetDriftDetectionDetails"] !== undefined) { + contents.StackSetDriftDetectionDetails = deserializeAws_queryStackSetDriftDetectionDetails(output["StackSetDriftDetectionDetails"], context); + } + return contents; +}; +const deserializeAws_queryStackSetOperationPreferences = (output, context) => { + let contents = { + RegionOrder: undefined, + FailureToleranceCount: undefined, + FailureTolerancePercentage: undefined, + MaxConcurrentCount: undefined, + MaxConcurrentPercentage: undefined, + }; + if (output.RegionOrder === "") { + contents.RegionOrder = []; + } + if (output["RegionOrder"] !== undefined && output["RegionOrder"]["member"] !== undefined) { + contents.RegionOrder = deserializeAws_queryRegionList(smithy_client_1.getArrayIfSingleItem(output["RegionOrder"]["member"]), context); + } + if (output["FailureToleranceCount"] !== undefined) { + contents.FailureToleranceCount = parseInt(output["FailureToleranceCount"]); + } + if (output["FailureTolerancePercentage"] !== undefined) { + contents.FailureTolerancePercentage = parseInt(output["FailureTolerancePercentage"]); + } + if (output["MaxConcurrentCount"] !== undefined) { + contents.MaxConcurrentCount = parseInt(output["MaxConcurrentCount"]); + } + if (output["MaxConcurrentPercentage"] !== undefined) { + contents.MaxConcurrentPercentage = parseInt(output["MaxConcurrentPercentage"]); + } + return contents; +}; +const deserializeAws_queryStackSetOperationResultSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryStackSetOperationResultSummary(entry, context); + }); +}; +const deserializeAws_queryStackSetOperationResultSummary = (output, context) => { + let contents = { + Account: undefined, + Region: undefined, + Status: undefined, + StatusReason: undefined, + AccountGateResult: undefined, + OrganizationalUnitId: undefined, + }; + if (output["Account"] !== undefined) { + contents.Account = output["Account"]; + } + if (output["Region"] !== undefined) { + contents.Region = output["Region"]; + } + if (output["Status"] !== undefined) { + contents.Status = output["Status"]; + } + if (output["StatusReason"] !== undefined) { + contents.StatusReason = output["StatusReason"]; + } + if (output["AccountGateResult"] !== undefined) { + contents.AccountGateResult = deserializeAws_queryAccountGateResult(output["AccountGateResult"], context); + } + if (output["OrganizationalUnitId"] !== undefined) { + contents.OrganizationalUnitId = output["OrganizationalUnitId"]; + } + return contents; +}; +const deserializeAws_queryStackSetOperationSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryStackSetOperationSummary(entry, context); + }); +}; +const deserializeAws_queryStackSetOperationSummary = (output, context) => { + let contents = { + OperationId: undefined, + Action: undefined, + Status: undefined, + CreationTimestamp: undefined, + EndTimestamp: undefined, + }; + if (output["OperationId"] !== undefined) { + contents.OperationId = output["OperationId"]; + } + if (output["Action"] !== undefined) { + contents.Action = output["Action"]; + } + if (output["Status"] !== undefined) { + contents.Status = output["Status"]; + } + if (output["CreationTimestamp"] !== undefined) { + contents.CreationTimestamp = new Date(output["CreationTimestamp"]); + } + if (output["EndTimestamp"] !== undefined) { + contents.EndTimestamp = new Date(output["EndTimestamp"]); + } + return contents; +}; +const deserializeAws_queryStackSetSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryStackSetSummary(entry, context); + }); +}; +const deserializeAws_queryStackSetSummary = (output, context) => { + let contents = { + StackSetName: undefined, + StackSetId: undefined, + Description: undefined, + Status: undefined, + AutoDeployment: undefined, + PermissionModel: undefined, + DriftStatus: undefined, + LastDriftCheckTimestamp: undefined, + }; + if (output["StackSetName"] !== undefined) { + contents.StackSetName = output["StackSetName"]; + } + if (output["StackSetId"] !== undefined) { + contents.StackSetId = output["StackSetId"]; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output["Status"] !== undefined) { + contents.Status = output["Status"]; + } + if (output["AutoDeployment"] !== undefined) { + contents.AutoDeployment = deserializeAws_queryAutoDeployment(output["AutoDeployment"], context); + } + if (output["PermissionModel"] !== undefined) { + contents.PermissionModel = output["PermissionModel"]; + } + if (output["DriftStatus"] !== undefined) { + contents.DriftStatus = output["DriftStatus"]; + } + if (output["LastDriftCheckTimestamp"] !== undefined) { + contents.LastDriftCheckTimestamp = new Date(output["LastDriftCheckTimestamp"]); + } + return contents; +}; +const deserializeAws_queryStackSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryStackSummary(entry, context); + }); +}; +const deserializeAws_queryStackSummary = (output, context) => { + let contents = { + StackId: undefined, + StackName: undefined, + TemplateDescription: undefined, + CreationTime: undefined, + LastUpdatedTime: undefined, + DeletionTime: undefined, + StackStatus: undefined, + StackStatusReason: undefined, + ParentId: undefined, + RootId: undefined, + DriftInformation: undefined, + }; + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + if (output["StackName"] !== undefined) { + contents.StackName = output["StackName"]; + } + if (output["TemplateDescription"] !== undefined) { + contents.TemplateDescription = output["TemplateDescription"]; + } + if (output["CreationTime"] !== undefined) { + contents.CreationTime = new Date(output["CreationTime"]); + } + if (output["LastUpdatedTime"] !== undefined) { + contents.LastUpdatedTime = new Date(output["LastUpdatedTime"]); + } + if (output["DeletionTime"] !== undefined) { + contents.DeletionTime = new Date(output["DeletionTime"]); + } + if (output["StackStatus"] !== undefined) { + contents.StackStatus = output["StackStatus"]; + } + if (output["StackStatusReason"] !== undefined) { + contents.StackStatusReason = output["StackStatusReason"]; + } + if (output["ParentId"] !== undefined) { + contents.ParentId = output["ParentId"]; + } + if (output["RootId"] !== undefined) { + contents.RootId = output["RootId"]; + } + if (output["DriftInformation"] !== undefined) { + contents.DriftInformation = deserializeAws_queryStackDriftInformationSummary(output["DriftInformation"], context); + } + return contents; +}; +const deserializeAws_queryStageList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryStaleRequestException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryStopStackSetOperationOutput = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryTag = (output, context) => { + let contents = { + Key: undefined, + Value: undefined, + }; + if (output["Key"] !== undefined) { + contents.Key = output["Key"]; + } + if (output["Value"] !== undefined) { + contents.Value = output["Value"]; + } + return contents; +}; +const deserializeAws_queryTags = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryTag(entry, context); + }); +}; +const deserializeAws_queryTemplateParameter = (output, context) => { + let contents = { + ParameterKey: undefined, + DefaultValue: undefined, + NoEcho: undefined, + Description: undefined, + }; + if (output["ParameterKey"] !== undefined) { + contents.ParameterKey = output["ParameterKey"]; + } + if (output["DefaultValue"] !== undefined) { + contents.DefaultValue = output["DefaultValue"]; + } + if (output["NoEcho"] !== undefined) { + contents.NoEcho = output["NoEcho"] == "true"; + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + return contents; +}; +const deserializeAws_queryTemplateParameters = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryTemplateParameter(entry, context); + }); +}; +const deserializeAws_queryTokenAlreadyExistsException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryTransformsList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryTypeNotFoundException = (output, context) => { + let contents = { + Message: undefined, + }; + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryTypeSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryTypeSummary(entry, context); + }); +}; +const deserializeAws_queryTypeSummary = (output, context) => { + let contents = { + Type: undefined, + TypeName: undefined, + DefaultVersionId: undefined, + TypeArn: undefined, + LastUpdated: undefined, + Description: undefined, + }; + if (output["Type"] !== undefined) { + contents.Type = output["Type"]; + } + if (output["TypeName"] !== undefined) { + contents.TypeName = output["TypeName"]; + } + if (output["DefaultVersionId"] !== undefined) { + contents.DefaultVersionId = output["DefaultVersionId"]; + } + if (output["TypeArn"] !== undefined) { + contents.TypeArn = output["TypeArn"]; + } + if (output["LastUpdated"] !== undefined) { + contents.LastUpdated = new Date(output["LastUpdated"]); + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + return contents; +}; +const deserializeAws_queryTypeVersionSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryTypeVersionSummary(entry, context); + }); +}; +const deserializeAws_queryTypeVersionSummary = (output, context) => { + let contents = { + Type: undefined, + TypeName: undefined, + VersionId: undefined, + IsDefaultVersion: undefined, + Arn: undefined, + TimeCreated: undefined, + Description: undefined, + }; + if (output["Type"] !== undefined) { + contents.Type = output["Type"]; + } + if (output["TypeName"] !== undefined) { + contents.TypeName = output["TypeName"]; + } + if (output["VersionId"] !== undefined) { + contents.VersionId = output["VersionId"]; + } + if (output["IsDefaultVersion"] !== undefined) { + contents.IsDefaultVersion = output["IsDefaultVersion"] == "true"; + } + if (output["Arn"] !== undefined) { + contents.Arn = output["Arn"]; + } + if (output["TimeCreated"] !== undefined) { + contents.TimeCreated = new Date(output["TimeCreated"]); + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + return contents; +}; +const deserializeAws_queryUpdateStackInstancesOutput = (output, context) => { + let contents = { + OperationId: undefined, + }; + if (output["OperationId"] !== undefined) { + contents.OperationId = output["OperationId"]; + } + return contents; +}; +const deserializeAws_queryUpdateStackOutput = (output, context) => { + let contents = { + StackId: undefined, + }; + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + return contents; +}; +const deserializeAws_queryUpdateStackSetOutput = (output, context) => { + let contents = { + OperationId: undefined, + }; + if (output["OperationId"] !== undefined) { + contents.OperationId = output["OperationId"]; + } + return contents; +}; +const deserializeAws_queryUpdateTerminationProtectionOutput = (output, context) => { + let contents = { + StackId: undefined, + }; + if (output["StackId"] !== undefined) { + contents.StackId = output["StackId"]; + } + return contents; +}; +const deserializeAws_queryValidateTemplateOutput = (output, context) => { + let contents = { + Parameters: undefined, + Description: undefined, + Capabilities: undefined, + CapabilitiesReason: undefined, + DeclaredTransforms: undefined, + }; + if (output.Parameters === "") { + contents.Parameters = []; + } + if (output["Parameters"] !== undefined && output["Parameters"]["member"] !== undefined) { + contents.Parameters = deserializeAws_queryTemplateParameters(smithy_client_1.getArrayIfSingleItem(output["Parameters"]["member"]), context); + } + if (output["Description"] !== undefined) { + contents.Description = output["Description"]; + } + if (output.Capabilities === "") { + contents.Capabilities = []; + } + if (output["Capabilities"] !== undefined && output["Capabilities"]["member"] !== undefined) { + contents.Capabilities = deserializeAws_queryCapabilities(smithy_client_1.getArrayIfSingleItem(output["Capabilities"]["member"]), context); + } + if (output["CapabilitiesReason"] !== undefined) { + contents.CapabilitiesReason = output["CapabilitiesReason"]; + } + if (output.DeclaredTransforms === "") { + contents.DeclaredTransforms = []; + } + if (output["DeclaredTransforms"] !== undefined && output["DeclaredTransforms"]["member"] !== undefined) { + contents.DeclaredTransforms = deserializeAws_queryTransformsList(smithy_client_1.getArrayIfSingleItem(output["DeclaredTransforms"]["member"]), context); + } + 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"], + }); +}; +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; +// Encode Uint8Array data into string with utf-8. +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 } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new protocol_http_1.HttpRequest(contents); +}; +const decodeEscapedXML = (str) => str + .replace(/&/g, "&") + .replace(/'/g, "'") + .replace(/"/g, '"') + .replace(/>/g, ">") + .replace(/</g, "<"); +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, + tagValueProcessor: (val, tagName) => decodeEscapedXML(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 ""; +}; +//# sourceMappingURL=Aws_query.js.map + +/***/ }), + +/***/ 64170: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientDefaultValues = void 0; +const tslib_1 = __nccwpck_require__(91663); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(51194)); +const config_resolver_1 = __nccwpck_require__(87229); +const credential_provider_node_1 = __nccwpck_require__(98030); +const hash_node_1 = __nccwpck_require__(90791); +const middleware_retry_1 = __nccwpck_require__(7000); +const node_config_provider_1 = __nccwpck_require__(71124); +const node_http_handler_1 = __nccwpck_require__(15168); +const util_base64_node_1 = __nccwpck_require__(2091); +const util_body_length_node_1 = __nccwpck_require__(40286); +const util_user_agent_node_1 = __nccwpck_require__(64717); +const util_utf8_node_1 = __nccwpck_require__(85227); +const runtimeConfig_shared_1 = __nccwpck_require__(49222); +/** + * @internal + */ +exports.ClientDefaultValues = { + ...runtimeConfig_shared_1.ClientSharedValues, + runtime: "node", + base64Decoder: util_base64_node_1.fromBase64, + base64Encoder: util_base64_node_1.toBase64, + bodyLengthChecker: util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: util_user_agent_node_1.defaultUserAgent({ + serviceId: runtimeConfig_shared_1.ClientSharedValues.serviceId, + clientVersion: package_json_1.default.version, + }), + maxAttempts: node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: new node_http_handler_1.NodeHttpHandler(), + sha256: hash_node_1.Hash.bind(null, "sha256"), + streamCollector: node_http_handler_1.streamCollector, + utf8Decoder: util_utf8_node_1.fromUtf8, + utf8Encoder: util_utf8_node_1.toUtf8, +}; +//# sourceMappingURL=runtimeConfig.js.map + +/***/ }), + +/***/ 49222: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientSharedValues = void 0; +const endpoints_1 = __nccwpck_require__(8628); +const url_parser_1 = __nccwpck_require__(99427); +/** + * @internal + */ +exports.ClientSharedValues = { + apiVersion: "2010-05-15", + disableHostPrefix: false, + logger: {}, + regionInfoProvider: endpoints_1.defaultRegionInfoProvider, + serviceId: "CloudFormation", + urlParser: url_parser_1.parseUrl, +}; +//# sourceMappingURL=runtimeConfig.shared.js.map + +/***/ }), + +/***/ 68435: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.waitForTypeRegistrationComplete = void 0; +const DescribeTypeRegistrationCommand_1 = __nccwpck_require__(39500); +const util_waiter_1 = __nccwpck_require__(6243); +const checkState = async (client, input) => { + try { + let result = await client.send(new DescribeTypeRegistrationCommand_1.DescribeTypeRegistrationCommand(input)); + try { + let returnComparator = () => { + return result.ProgressStatus; + }; + if (returnComparator() === "COMPLETE") { + return { state: util_waiter_1.WaiterState.SUCCESS }; + } + } + catch (e) { } + try { + let returnComparator = () => { + return result.ProgressStatus; + }; + if (returnComparator() === "FAILED") { + return { state: util_waiter_1.WaiterState.FAILURE }; + } + } + catch (e) { } + } + catch (exception) { } + return { state: util_waiter_1.WaiterState.RETRY }; +}; +/** + * Wait until type registration is COMPLETE. + * @param params : Waiter configuration options. + * @param input : the input to DescribeTypeRegistrationCommand for polling. + */ +const waitForTypeRegistrationComplete = async (params, input) => { + const serviceDefaults = { minDelay: 30, maxDelay: 120 }; + return util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +exports.waitForTypeRegistrationComplete = waitForTypeRegistrationComplete; +//# sourceMappingURL=waitForTypeRegistrationComplete.js.map + +/***/ }), + +/***/ 91663: +/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +__nccwpck_require__.r(__webpack_exports__); +/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { +/* harmony export */ "__extends": () => /* binding */ __extends, +/* harmony export */ "__assign": () => /* binding */ __assign, +/* harmony export */ "__rest": () => /* binding */ __rest, +/* harmony export */ "__decorate": () => /* binding */ __decorate, +/* harmony export */ "__param": () => /* binding */ __param, +/* harmony export */ "__metadata": () => /* binding */ __metadata, +/* harmony export */ "__awaiter": () => /* binding */ __awaiter, +/* harmony export */ "__generator": () => /* binding */ __generator, +/* harmony export */ "__createBinding": () => /* binding */ __createBinding, +/* harmony export */ "__exportStar": () => /* binding */ __exportStar, +/* harmony export */ "__values": () => /* binding */ __values, +/* harmony export */ "__read": () => /* binding */ __read, +/* harmony export */ "__spread": () => /* binding */ __spread, +/* harmony export */ "__spreadArrays": () => /* binding */ __spreadArrays, +/* harmony export */ "__spreadArray": () => /* binding */ __spreadArray, +/* harmony export */ "__await": () => /* binding */ __await, +/* harmony export */ "__asyncGenerator": () => /* binding */ __asyncGenerator, +/* harmony export */ "__asyncDelegator": () => /* binding */ __asyncDelegator, +/* harmony export */ "__asyncValues": () => /* binding */ __asyncValues, +/* harmony export */ "__makeTemplateObject": () => /* binding */ __makeTemplateObject, +/* harmony export */ "__importStar": () => /* binding */ __importStar, +/* harmony export */ "__importDefault": () => /* binding */ __importDefault, +/* harmony export */ "__classPrivateFieldGet": () => /* binding */ __classPrivateFieldGet, +/* harmony export */ "__classPrivateFieldSet": () => /* binding */ __classPrivateFieldSet +/* harmony export */ }); +/*! ***************************************************************************** +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 Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + 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 }; + } +} + +var __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]; +}); + +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function __spreadArray(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, 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]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function __importStar(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; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} + + +/***/ }), + +/***/ 63436: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CognitoIdentityProvider = void 0; +const CognitoIdentityProviderClient_1 = __nccwpck_require__(32756); +const AddCustomAttributesCommand_1 = __nccwpck_require__(2336); +const AdminAddUserToGroupCommand_1 = __nccwpck_require__(63030); +const AdminConfirmSignUpCommand_1 = __nccwpck_require__(8330); +const AdminCreateUserCommand_1 = __nccwpck_require__(18188); +const AdminDeleteUserAttributesCommand_1 = __nccwpck_require__(49653); +const AdminDeleteUserCommand_1 = __nccwpck_require__(27623); +const AdminDisableProviderForUserCommand_1 = __nccwpck_require__(24718); +const AdminDisableUserCommand_1 = __nccwpck_require__(31989); +const AdminEnableUserCommand_1 = __nccwpck_require__(78365); +const AdminForgetDeviceCommand_1 = __nccwpck_require__(35436); +const AdminGetDeviceCommand_1 = __nccwpck_require__(7451); +const AdminGetUserCommand_1 = __nccwpck_require__(75054); +const AdminInitiateAuthCommand_1 = __nccwpck_require__(51153); +const AdminLinkProviderForUserCommand_1 = __nccwpck_require__(31763); +const AdminListDevicesCommand_1 = __nccwpck_require__(18926); +const AdminListGroupsForUserCommand_1 = __nccwpck_require__(4199); +const AdminListUserAuthEventsCommand_1 = __nccwpck_require__(76132); +const AdminRemoveUserFromGroupCommand_1 = __nccwpck_require__(9640); +const AdminResetUserPasswordCommand_1 = __nccwpck_require__(12557); +const AdminRespondToAuthChallengeCommand_1 = __nccwpck_require__(21828); +const AdminSetUserMFAPreferenceCommand_1 = __nccwpck_require__(13421); +const AdminSetUserPasswordCommand_1 = __nccwpck_require__(75616); +const AdminSetUserSettingsCommand_1 = __nccwpck_require__(36217); +const AdminUpdateAuthEventFeedbackCommand_1 = __nccwpck_require__(57675); +const AdminUpdateDeviceStatusCommand_1 = __nccwpck_require__(18824); +const AdminUpdateUserAttributesCommand_1 = __nccwpck_require__(1541); +const AdminUserGlobalSignOutCommand_1 = __nccwpck_require__(11240); +const AssociateSoftwareTokenCommand_1 = __nccwpck_require__(52819); +const ChangePasswordCommand_1 = __nccwpck_require__(65801); +const ConfirmDeviceCommand_1 = __nccwpck_require__(79275); +const ConfirmForgotPasswordCommand_1 = __nccwpck_require__(35665); +const ConfirmSignUpCommand_1 = __nccwpck_require__(18104); +const CreateGroupCommand_1 = __nccwpck_require__(81662); +const CreateIdentityProviderCommand_1 = __nccwpck_require__(81266); +const CreateResourceServerCommand_1 = __nccwpck_require__(54935); +const CreateUserImportJobCommand_1 = __nccwpck_require__(77974); +const CreateUserPoolClientCommand_1 = __nccwpck_require__(17824); +const CreateUserPoolCommand_1 = __nccwpck_require__(74938); +const CreateUserPoolDomainCommand_1 = __nccwpck_require__(58015); +const DeleteGroupCommand_1 = __nccwpck_require__(73307); +const DeleteIdentityProviderCommand_1 = __nccwpck_require__(7493); +const DeleteResourceServerCommand_1 = __nccwpck_require__(6049); +const DeleteUserAttributesCommand_1 = __nccwpck_require__(99475); +const DeleteUserCommand_1 = __nccwpck_require__(28421); +const DeleteUserPoolClientCommand_1 = __nccwpck_require__(3402); +const DeleteUserPoolCommand_1 = __nccwpck_require__(92314); +const DeleteUserPoolDomainCommand_1 = __nccwpck_require__(79680); +const DescribeIdentityProviderCommand_1 = __nccwpck_require__(96582); +const DescribeResourceServerCommand_1 = __nccwpck_require__(13045); +const DescribeRiskConfigurationCommand_1 = __nccwpck_require__(51063); +const DescribeUserImportJobCommand_1 = __nccwpck_require__(10902); +const DescribeUserPoolClientCommand_1 = __nccwpck_require__(25424); +const DescribeUserPoolCommand_1 = __nccwpck_require__(67125); +const DescribeUserPoolDomainCommand_1 = __nccwpck_require__(9253); +const ForgetDeviceCommand_1 = __nccwpck_require__(39305); +const ForgotPasswordCommand_1 = __nccwpck_require__(15806); +const GetCSVHeaderCommand_1 = __nccwpck_require__(59575); +const GetDeviceCommand_1 = __nccwpck_require__(95242); +const GetGroupCommand_1 = __nccwpck_require__(89462); +const GetIdentityProviderByIdentifierCommand_1 = __nccwpck_require__(29528); +const GetSigningCertificateCommand_1 = __nccwpck_require__(7884); +const GetUICustomizationCommand_1 = __nccwpck_require__(47556); +const GetUserAttributeVerificationCodeCommand_1 = __nccwpck_require__(1966); +const GetUserCommand_1 = __nccwpck_require__(33079); +const GetUserPoolMfaConfigCommand_1 = __nccwpck_require__(59598); +const GlobalSignOutCommand_1 = __nccwpck_require__(783); +const InitiateAuthCommand_1 = __nccwpck_require__(25210); +const ListDevicesCommand_1 = __nccwpck_require__(41445); +const ListGroupsCommand_1 = __nccwpck_require__(39386); +const ListIdentityProvidersCommand_1 = __nccwpck_require__(73419); +const ListResourceServersCommand_1 = __nccwpck_require__(93783); +const ListTagsForResourceCommand_1 = __nccwpck_require__(22658); +const ListUserImportJobsCommand_1 = __nccwpck_require__(86421); +const ListUserPoolClientsCommand_1 = __nccwpck_require__(87753); +const ListUserPoolsCommand_1 = __nccwpck_require__(51756); +const ListUsersCommand_1 = __nccwpck_require__(16854); +const ListUsersInGroupCommand_1 = __nccwpck_require__(51577); +const ResendConfirmationCodeCommand_1 = __nccwpck_require__(30730); +const RespondToAuthChallengeCommand_1 = __nccwpck_require__(36946); +const SetRiskConfigurationCommand_1 = __nccwpck_require__(54210); +const SetUICustomizationCommand_1 = __nccwpck_require__(41002); +const SetUserMFAPreferenceCommand_1 = __nccwpck_require__(59037); +const SetUserPoolMfaConfigCommand_1 = __nccwpck_require__(39776); +const SetUserSettingsCommand_1 = __nccwpck_require__(44103); +const SignUpCommand_1 = __nccwpck_require__(61298); +const StartUserImportJobCommand_1 = __nccwpck_require__(8066); +const StopUserImportJobCommand_1 = __nccwpck_require__(47546); +const TagResourceCommand_1 = __nccwpck_require__(13116); +const UntagResourceCommand_1 = __nccwpck_require__(93194); +const UpdateAuthEventFeedbackCommand_1 = __nccwpck_require__(45344); +const UpdateDeviceStatusCommand_1 = __nccwpck_require__(34181); +const UpdateGroupCommand_1 = __nccwpck_require__(17637); +const UpdateIdentityProviderCommand_1 = __nccwpck_require__(79222); +const UpdateResourceServerCommand_1 = __nccwpck_require__(42116); +const UpdateUserAttributesCommand_1 = __nccwpck_require__(77311); +const UpdateUserPoolClientCommand_1 = __nccwpck_require__(94287); +const UpdateUserPoolCommand_1 = __nccwpck_require__(70670); +const UpdateUserPoolDomainCommand_1 = __nccwpck_require__(16919); +const VerifySoftwareTokenCommand_1 = __nccwpck_require__(25918); +const VerifyUserAttributeCommand_1 = __nccwpck_require__(11850); +/** + *

Using the Amazon Cognito User Pools API, you can create a user pool to manage + * directories and users. You can authenticate a user to obtain tokens related to user + * identity and access policies.

+ *

This API reference provides information about user pools in Amazon Cognito User + * Pools.

+ *

For more information, see the Amazon Cognito Documentation.

+ */ +class CognitoIdentityProvider extends CognitoIdentityProviderClient_1.CognitoIdentityProviderClient { + addCustomAttributes(args, optionsOrCb, cb) { + const command = new AddCustomAttributesCommand_1.AddCustomAttributesCommand(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); + } + } + adminAddUserToGroup(args, optionsOrCb, cb) { + const command = new AdminAddUserToGroupCommand_1.AdminAddUserToGroupCommand(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); + } + } + adminConfirmSignUp(args, optionsOrCb, cb) { + const command = new AdminConfirmSignUpCommand_1.AdminConfirmSignUpCommand(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); + } + } + adminCreateUser(args, optionsOrCb, cb) { + const command = new AdminCreateUserCommand_1.AdminCreateUserCommand(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); + } + } + adminDeleteUser(args, optionsOrCb, cb) { + const command = new AdminDeleteUserCommand_1.AdminDeleteUserCommand(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); + } + } + adminDeleteUserAttributes(args, optionsOrCb, cb) { + const command = new AdminDeleteUserAttributesCommand_1.AdminDeleteUserAttributesCommand(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); + } + } + adminDisableProviderForUser(args, optionsOrCb, cb) { + const command = new AdminDisableProviderForUserCommand_1.AdminDisableProviderForUserCommand(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); + } + } + adminDisableUser(args, optionsOrCb, cb) { + const command = new AdminDisableUserCommand_1.AdminDisableUserCommand(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); + } + } + adminEnableUser(args, optionsOrCb, cb) { + const command = new AdminEnableUserCommand_1.AdminEnableUserCommand(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); + } + } + adminForgetDevice(args, optionsOrCb, cb) { + const command = new AdminForgetDeviceCommand_1.AdminForgetDeviceCommand(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); + } + } + adminGetDevice(args, optionsOrCb, cb) { + const command = new AdminGetDeviceCommand_1.AdminGetDeviceCommand(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); + } + } + adminGetUser(args, optionsOrCb, cb) { + const command = new AdminGetUserCommand_1.AdminGetUserCommand(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); + } + } + adminInitiateAuth(args, optionsOrCb, cb) { + const command = new AdminInitiateAuthCommand_1.AdminInitiateAuthCommand(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); + } + } + adminLinkProviderForUser(args, optionsOrCb, cb) { + const command = new AdminLinkProviderForUserCommand_1.AdminLinkProviderForUserCommand(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); + } + } + adminListDevices(args, optionsOrCb, cb) { + const command = new AdminListDevicesCommand_1.AdminListDevicesCommand(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); + } + } + adminListGroupsForUser(args, optionsOrCb, cb) { + const command = new AdminListGroupsForUserCommand_1.AdminListGroupsForUserCommand(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); + } + } + adminListUserAuthEvents(args, optionsOrCb, cb) { + const command = new AdminListUserAuthEventsCommand_1.AdminListUserAuthEventsCommand(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); + } + } + adminRemoveUserFromGroup(args, optionsOrCb, cb) { + const command = new AdminRemoveUserFromGroupCommand_1.AdminRemoveUserFromGroupCommand(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); + } + } + adminResetUserPassword(args, optionsOrCb, cb) { + const command = new AdminResetUserPasswordCommand_1.AdminResetUserPasswordCommand(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); + } + } + adminRespondToAuthChallenge(args, optionsOrCb, cb) { + const command = new AdminRespondToAuthChallengeCommand_1.AdminRespondToAuthChallengeCommand(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); + } + } + adminSetUserMFAPreference(args, optionsOrCb, cb) { + const command = new AdminSetUserMFAPreferenceCommand_1.AdminSetUserMFAPreferenceCommand(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); + } + } + adminSetUserPassword(args, optionsOrCb, cb) { + const command = new AdminSetUserPasswordCommand_1.AdminSetUserPasswordCommand(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); + } + } + adminSetUserSettings(args, optionsOrCb, cb) { + const command = new AdminSetUserSettingsCommand_1.AdminSetUserSettingsCommand(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); + } + } + adminUpdateAuthEventFeedback(args, optionsOrCb, cb) { + const command = new AdminUpdateAuthEventFeedbackCommand_1.AdminUpdateAuthEventFeedbackCommand(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); + } + } + adminUpdateDeviceStatus(args, optionsOrCb, cb) { + const command = new AdminUpdateDeviceStatusCommand_1.AdminUpdateDeviceStatusCommand(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); + } + } + adminUpdateUserAttributes(args, optionsOrCb, cb) { + const command = new AdminUpdateUserAttributesCommand_1.AdminUpdateUserAttributesCommand(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); + } + } + adminUserGlobalSignOut(args, optionsOrCb, cb) { + const command = new AdminUserGlobalSignOutCommand_1.AdminUserGlobalSignOutCommand(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); + } + } + associateSoftwareToken(args, optionsOrCb, cb) { + const command = new AssociateSoftwareTokenCommand_1.AssociateSoftwareTokenCommand(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); + } + } + changePassword(args, optionsOrCb, cb) { + const command = new ChangePasswordCommand_1.ChangePasswordCommand(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); + } + } + confirmDevice(args, optionsOrCb, cb) { + const command = new ConfirmDeviceCommand_1.ConfirmDeviceCommand(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); + } + } + confirmForgotPassword(args, optionsOrCb, cb) { + const command = new ConfirmForgotPasswordCommand_1.ConfirmForgotPasswordCommand(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); + } + } + confirmSignUp(args, optionsOrCb, cb) { + const command = new ConfirmSignUpCommand_1.ConfirmSignUpCommand(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); + } + } + createGroup(args, optionsOrCb, cb) { + const command = new CreateGroupCommand_1.CreateGroupCommand(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); + } + } + createIdentityProvider(args, optionsOrCb, cb) { + const command = new CreateIdentityProviderCommand_1.CreateIdentityProviderCommand(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); + } + } + createResourceServer(args, optionsOrCb, cb) { + const command = new CreateResourceServerCommand_1.CreateResourceServerCommand(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); + } + } + createUserImportJob(args, optionsOrCb, cb) { + const command = new CreateUserImportJobCommand_1.CreateUserImportJobCommand(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); + } + } + createUserPool(args, optionsOrCb, cb) { + const command = new CreateUserPoolCommand_1.CreateUserPoolCommand(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); + } + } + createUserPoolClient(args, optionsOrCb, cb) { + const command = new CreateUserPoolClientCommand_1.CreateUserPoolClientCommand(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); + } + } + createUserPoolDomain(args, optionsOrCb, cb) { + const command = new CreateUserPoolDomainCommand_1.CreateUserPoolDomainCommand(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); + } + } + deleteGroup(args, optionsOrCb, cb) { + const command = new DeleteGroupCommand_1.DeleteGroupCommand(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); + } + } + deleteIdentityProvider(args, optionsOrCb, cb) { + const command = new DeleteIdentityProviderCommand_1.DeleteIdentityProviderCommand(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); + } + } + deleteResourceServer(args, optionsOrCb, cb) { + const command = new DeleteResourceServerCommand_1.DeleteResourceServerCommand(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); + } + } + deleteUser(args, optionsOrCb, cb) { + const command = new DeleteUserCommand_1.DeleteUserCommand(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); + } + } + deleteUserAttributes(args, optionsOrCb, cb) { + const command = new DeleteUserAttributesCommand_1.DeleteUserAttributesCommand(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); + } + } + deleteUserPool(args, optionsOrCb, cb) { + const command = new DeleteUserPoolCommand_1.DeleteUserPoolCommand(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); + } + } + deleteUserPoolClient(args, optionsOrCb, cb) { + const command = new DeleteUserPoolClientCommand_1.DeleteUserPoolClientCommand(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); + } + } + deleteUserPoolDomain(args, optionsOrCb, cb) { + const command = new DeleteUserPoolDomainCommand_1.DeleteUserPoolDomainCommand(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); + } + } + describeIdentityProvider(args, optionsOrCb, cb) { + const command = new DescribeIdentityProviderCommand_1.DescribeIdentityProviderCommand(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); + } + } + describeResourceServer(args, optionsOrCb, cb) { + const command = new DescribeResourceServerCommand_1.DescribeResourceServerCommand(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); + } + } + describeRiskConfiguration(args, optionsOrCb, cb) { + const command = new DescribeRiskConfigurationCommand_1.DescribeRiskConfigurationCommand(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); + } + } + describeUserImportJob(args, optionsOrCb, cb) { + const command = new DescribeUserImportJobCommand_1.DescribeUserImportJobCommand(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); + } + } + describeUserPool(args, optionsOrCb, cb) { + const command = new DescribeUserPoolCommand_1.DescribeUserPoolCommand(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); + } + } + describeUserPoolClient(args, optionsOrCb, cb) { + const command = new DescribeUserPoolClientCommand_1.DescribeUserPoolClientCommand(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); + } + } + describeUserPoolDomain(args, optionsOrCb, cb) { + const command = new DescribeUserPoolDomainCommand_1.DescribeUserPoolDomainCommand(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); + } + } + forgetDevice(args, optionsOrCb, cb) { + const command = new ForgetDeviceCommand_1.ForgetDeviceCommand(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); + } + } + forgotPassword(args, optionsOrCb, cb) { + const command = new ForgotPasswordCommand_1.ForgotPasswordCommand(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); + } + } + getCSVHeader(args, optionsOrCb, cb) { + const command = new GetCSVHeaderCommand_1.GetCSVHeaderCommand(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); + } + } + getDevice(args, optionsOrCb, cb) { + const command = new GetDeviceCommand_1.GetDeviceCommand(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); + } + } + getGroup(args, optionsOrCb, cb) { + const command = new GetGroupCommand_1.GetGroupCommand(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); + } + } + getIdentityProviderByIdentifier(args, optionsOrCb, cb) { + const command = new GetIdentityProviderByIdentifierCommand_1.GetIdentityProviderByIdentifierCommand(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); + } + } + getSigningCertificate(args, optionsOrCb, cb) { + const command = new GetSigningCertificateCommand_1.GetSigningCertificateCommand(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); + } + } + getUICustomization(args, optionsOrCb, cb) { + const command = new GetUICustomizationCommand_1.GetUICustomizationCommand(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); + } + } + getUser(args, optionsOrCb, cb) { + const command = new GetUserCommand_1.GetUserCommand(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); + } + } + getUserAttributeVerificationCode(args, optionsOrCb, cb) { + const command = new GetUserAttributeVerificationCodeCommand_1.GetUserAttributeVerificationCodeCommand(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); + } + } + getUserPoolMfaConfig(args, optionsOrCb, cb) { + const command = new GetUserPoolMfaConfigCommand_1.GetUserPoolMfaConfigCommand(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); + } + } + globalSignOut(args, optionsOrCb, cb) { + const command = new GlobalSignOutCommand_1.GlobalSignOutCommand(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); + } + } + initiateAuth(args, optionsOrCb, cb) { + const command = new InitiateAuthCommand_1.InitiateAuthCommand(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); + } + } + listDevices(args, optionsOrCb, cb) { + const command = new ListDevicesCommand_1.ListDevicesCommand(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); + } + } + listGroups(args, optionsOrCb, cb) { + const command = new ListGroupsCommand_1.ListGroupsCommand(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); + } + } + listIdentityProviders(args, optionsOrCb, cb) { + const command = new ListIdentityProvidersCommand_1.ListIdentityProvidersCommand(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); + } + } + listResourceServers(args, optionsOrCb, cb) { + const command = new ListResourceServersCommand_1.ListResourceServersCommand(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); + } + } + listUserImportJobs(args, optionsOrCb, cb) { + const command = new ListUserImportJobsCommand_1.ListUserImportJobsCommand(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); + } + } + listUserPoolClients(args, optionsOrCb, cb) { + const command = new ListUserPoolClientsCommand_1.ListUserPoolClientsCommand(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); + } + } + listUserPools(args, optionsOrCb, cb) { + const command = new ListUserPoolsCommand_1.ListUserPoolsCommand(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); + } + } + listUsers(args, optionsOrCb, cb) { + const command = new ListUsersCommand_1.ListUsersCommand(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); + } + } + listUsersInGroup(args, optionsOrCb, cb) { + const command = new ListUsersInGroupCommand_1.ListUsersInGroupCommand(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); + } + } + resendConfirmationCode(args, optionsOrCb, cb) { + const command = new ResendConfirmationCodeCommand_1.ResendConfirmationCodeCommand(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); + } + } + respondToAuthChallenge(args, optionsOrCb, cb) { + const command = new RespondToAuthChallengeCommand_1.RespondToAuthChallengeCommand(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); + } + } + setRiskConfiguration(args, optionsOrCb, cb) { + const command = new SetRiskConfigurationCommand_1.SetRiskConfigurationCommand(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); + } + } + setUICustomization(args, optionsOrCb, cb) { + const command = new SetUICustomizationCommand_1.SetUICustomizationCommand(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); + } + } + setUserMFAPreference(args, optionsOrCb, cb) { + const command = new SetUserMFAPreferenceCommand_1.SetUserMFAPreferenceCommand(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); + } + } + setUserPoolMfaConfig(args, optionsOrCb, cb) { + const command = new SetUserPoolMfaConfigCommand_1.SetUserPoolMfaConfigCommand(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); + } + } + setUserSettings(args, optionsOrCb, cb) { + const command = new SetUserSettingsCommand_1.SetUserSettingsCommand(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); + } + } + signUp(args, optionsOrCb, cb) { + const command = new SignUpCommand_1.SignUpCommand(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); + } + } + startUserImportJob(args, optionsOrCb, cb) { + const command = new StartUserImportJobCommand_1.StartUserImportJobCommand(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); + } + } + stopUserImportJob(args, optionsOrCb, cb) { + const command = new StopUserImportJobCommand_1.StopUserImportJobCommand(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); + } + } + updateAuthEventFeedback(args, optionsOrCb, cb) { + const command = new UpdateAuthEventFeedbackCommand_1.UpdateAuthEventFeedbackCommand(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); + } + } + updateDeviceStatus(args, optionsOrCb, cb) { + const command = new UpdateDeviceStatusCommand_1.UpdateDeviceStatusCommand(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); + } + } + updateGroup(args, optionsOrCb, cb) { + const command = new UpdateGroupCommand_1.UpdateGroupCommand(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); + } + } + updateIdentityProvider(args, optionsOrCb, cb) { + const command = new UpdateIdentityProviderCommand_1.UpdateIdentityProviderCommand(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); + } + } + updateResourceServer(args, optionsOrCb, cb) { + const command = new UpdateResourceServerCommand_1.UpdateResourceServerCommand(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); + } + } + updateUserAttributes(args, optionsOrCb, cb) { + const command = new UpdateUserAttributesCommand_1.UpdateUserAttributesCommand(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); + } + } + updateUserPool(args, optionsOrCb, cb) { + const command = new UpdateUserPoolCommand_1.UpdateUserPoolCommand(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); + } + } + updateUserPoolClient(args, optionsOrCb, cb) { + const command = new UpdateUserPoolClientCommand_1.UpdateUserPoolClientCommand(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); + } + } + updateUserPoolDomain(args, optionsOrCb, cb) { + const command = new UpdateUserPoolDomainCommand_1.UpdateUserPoolDomainCommand(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); + } + } + verifySoftwareToken(args, optionsOrCb, cb) { + const command = new VerifySoftwareTokenCommand_1.VerifySoftwareTokenCommand(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); + } + } + verifyUserAttribute(args, optionsOrCb, cb) { + const command = new VerifyUserAttributeCommand_1.VerifyUserAttributeCommand(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.CognitoIdentityProvider = CognitoIdentityProvider; +//# sourceMappingURL=CognitoIdentityProvider.js.map + +/***/ }), + +/***/ 32756: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CognitoIdentityProviderClient = void 0; +const runtimeConfig_1 = __nccwpck_require__(45628); +const config_resolver_1 = __nccwpck_require__(87229); +const middleware_content_length_1 = __nccwpck_require__(69323); +const middleware_host_header_1 = __nccwpck_require__(58645); +const middleware_logger_1 = __nccwpck_require__(98685); +const middleware_retry_1 = __nccwpck_require__(7000); +const middleware_signing_1 = __nccwpck_require__(82487); +const middleware_user_agent_1 = __nccwpck_require__(55976); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Using the Amazon Cognito User Pools API, you can create a user pool to manage + * directories and users. You can authenticate a user to obtain tokens related to user + * identity and access policies.

+ *

This API reference provides information about user pools in Amazon Cognito User + * Pools.

+ *

For more information, see the Amazon Cognito Documentation.

+ */ +class CognitoIdentityProviderClient extends smithy_client_1.Client { + constructor(configuration) { + let _config_0 = { + ...runtimeConfig_1.ClientDefaultValues, + ...configuration, + }; + let _config_1 = config_resolver_1.resolveRegionConfig(_config_0); + let _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1); + let _config_3 = middleware_signing_1.resolveAwsAuthConfig(_config_2); + let _config_4 = middleware_retry_1.resolveRetryConfig(_config_3); + let _config_5 = middleware_host_header_1.resolveHostHeaderConfig(_config_4); + let _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.CognitoIdentityProviderClient = CognitoIdentityProviderClient; +//# sourceMappingURL=CognitoIdentityProviderClient.js.map + +/***/ }), + +/***/ 2336: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AddCustomAttributesCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Adds additional user attributes to the user pool schema.

+ */ +class AddCustomAttributesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AddCustomAttributesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AddCustomAttributesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AddCustomAttributesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AddCustomAttributesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AddCustomAttributesCommand(output, context); + } +} +exports.AddCustomAttributesCommand = AddCustomAttributesCommand; +//# sourceMappingURL=AddCustomAttributesCommand.js.map + +/***/ }), + +/***/ 63030: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminAddUserToGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Adds the specified user to the specified group.

+ *

Calling this action requires developer credentials.

+ */ +class AdminAddUserToGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminAddUserToGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminAddUserToGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminAddUserToGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminAddUserToGroupCommand(output, context); + } +} +exports.AdminAddUserToGroupCommand = AdminAddUserToGroupCommand; +//# sourceMappingURL=AdminAddUserToGroupCommand.js.map + +/***/ }), + +/***/ 8330: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminConfirmSignUpCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Confirms user registration as an admin without using a confirmation code. Works on any + * user.

+ *

Calling this action requires developer credentials.

+ */ +class AdminConfirmSignUpCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminConfirmSignUpCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminConfirmSignUpRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminConfirmSignUpResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminConfirmSignUpCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminConfirmSignUpCommand(output, context); + } +} +exports.AdminConfirmSignUpCommand = AdminConfirmSignUpCommand; +//# sourceMappingURL=AdminConfirmSignUpCommand.js.map + +/***/ }), + +/***/ 18188: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminCreateUserCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a new user in the specified user pool.

+ *

If MessageAction is not set, the default is to send a welcome message via + * email or phone (SMS).

+ *

This message is based on a template that you configured in your call to create or + * update a user pool. This template includes your custom sign-up instructions and placeholders + * for user name and temporary password.

+ *

Alternatively, you can call AdminCreateUser with “SUPPRESS” for the + * MessageAction parameter, and Amazon Cognito will not send any email.

+ *

In either case, the user will be in the FORCE_CHANGE_PASSWORD state until + * they sign in and change their password.

+ *

+ * AdminCreateUser requires developer credentials.

+ */ +class AdminCreateUserCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminCreateUserCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminCreateUserRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminCreateUserResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminCreateUserCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminCreateUserCommand(output, context); + } +} +exports.AdminCreateUserCommand = AdminCreateUserCommand; +//# sourceMappingURL=AdminCreateUserCommand.js.map + +/***/ }), + +/***/ 49653: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminDeleteUserAttributesCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the user attributes in a user pool as an administrator. Works on any + * user.

+ *

Calling this action requires developer credentials.

+ */ +class AdminDeleteUserAttributesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminDeleteUserAttributesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminDeleteUserAttributesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminDeleteUserAttributesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminDeleteUserAttributesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminDeleteUserAttributesCommand(output, context); + } +} +exports.AdminDeleteUserAttributesCommand = AdminDeleteUserAttributesCommand; +//# sourceMappingURL=AdminDeleteUserAttributesCommand.js.map + +/***/ }), + +/***/ 27623: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminDeleteUserCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a user as an administrator. Works on any user.

+ *

Calling this action requires developer credentials.

+ */ +class AdminDeleteUserCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminDeleteUserCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminDeleteUserRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminDeleteUserCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminDeleteUserCommand(output, context); + } +} +exports.AdminDeleteUserCommand = AdminDeleteUserCommand; +//# sourceMappingURL=AdminDeleteUserCommand.js.map + +/***/ }), + +/***/ 24718: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminDisableProviderForUserCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Disables the user from signing in with the specified external (SAML or social) + * identity provider. If the user to disable is a Cognito User Pools native username + + * password user, they are not permitted to use their password to sign-in. If the user to + * disable is a linked external IdP user, any link between that user and an existing user + * is removed. The next time the external user (no longer attached to the previously linked + * DestinationUser) signs in, they must create a new user account. See + * AdminLinkProviderForUser.

+ *

This action is enabled only for admin access and requires developer + * credentials.

+ *

The ProviderName must match the value specified when creating an IdP for + * the pool.

+ *

To disable a native username + password user, the ProviderName value must + * be Cognito and the ProviderAttributeName must be + * Cognito_Subject, with the ProviderAttributeValue being the + * name that is used in the user pool for the user.

+ *

The ProviderAttributeName must always be Cognito_Subject for + * social identity providers. The ProviderAttributeValue must always be the + * exact subject that was used when the user was originally linked as a source user.

+ *

For de-linking a SAML identity, there are two scenarios. If the linked identity has + * not yet been used to sign-in, the ProviderAttributeName and + * ProviderAttributeValue must be the same values that were used for the + * SourceUser when the identities were originally linked using + * AdminLinkProviderForUser call. (If the linking was done with + * ProviderAttributeName set to Cognito_Subject, the same + * applies here). However, if the user has already signed in, the + * ProviderAttributeName must be Cognito_Subject and + * ProviderAttributeValue must be the subject of the SAML + * assertion.

+ */ +class AdminDisableProviderForUserCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminDisableProviderForUserCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminDisableProviderForUserRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminDisableProviderForUserResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminDisableProviderForUserCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminDisableProviderForUserCommand(output, context); + } +} +exports.AdminDisableProviderForUserCommand = AdminDisableProviderForUserCommand; +//# sourceMappingURL=AdminDisableProviderForUserCommand.js.map + +/***/ }), + +/***/ 31989: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminDisableUserCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Disables the specified user.

+ *

Calling this action requires developer credentials.

+ */ +class AdminDisableUserCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminDisableUserCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminDisableUserRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminDisableUserResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminDisableUserCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminDisableUserCommand(output, context); + } +} +exports.AdminDisableUserCommand = AdminDisableUserCommand; +//# sourceMappingURL=AdminDisableUserCommand.js.map + +/***/ }), + +/***/ 78365: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminEnableUserCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Enables the specified user as an administrator. Works on any user.

+ *

Calling this action requires developer credentials.

+ */ +class AdminEnableUserCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminEnableUserCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminEnableUserRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminEnableUserResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminEnableUserCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminEnableUserCommand(output, context); + } +} +exports.AdminEnableUserCommand = AdminEnableUserCommand; +//# sourceMappingURL=AdminEnableUserCommand.js.map + +/***/ }), + +/***/ 35436: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminForgetDeviceCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Forgets the device, as an administrator.

+ *

Calling this action requires developer credentials.

+ */ +class AdminForgetDeviceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminForgetDeviceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminForgetDeviceRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminForgetDeviceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminForgetDeviceCommand(output, context); + } +} +exports.AdminForgetDeviceCommand = AdminForgetDeviceCommand; +//# sourceMappingURL=AdminForgetDeviceCommand.js.map + +/***/ }), + +/***/ 7451: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminGetDeviceCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the device, as an administrator.

+ *

Calling this action requires developer credentials.

+ */ +class AdminGetDeviceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminGetDeviceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminGetDeviceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminGetDeviceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminGetDeviceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminGetDeviceCommand(output, context); + } +} +exports.AdminGetDeviceCommand = AdminGetDeviceCommand; +//# sourceMappingURL=AdminGetDeviceCommand.js.map + +/***/ }), + +/***/ 75054: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminGetUserCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the specified user by user name in a user pool as an administrator. Works on any + * user.

+ *

Calling this action requires developer credentials.

+ */ +class AdminGetUserCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminGetUserCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminGetUserRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminGetUserResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminGetUserCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminGetUserCommand(output, context); + } +} +exports.AdminGetUserCommand = AdminGetUserCommand; +//# sourceMappingURL=AdminGetUserCommand.js.map + +/***/ }), + +/***/ 51153: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminInitiateAuthCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Initiates the authentication flow, as an administrator.

+ *

Calling this action requires developer credentials.

+ */ +class AdminInitiateAuthCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminInitiateAuthCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminInitiateAuthRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminInitiateAuthResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminInitiateAuthCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminInitiateAuthCommand(output, context); + } +} +exports.AdminInitiateAuthCommand = AdminInitiateAuthCommand; +//# sourceMappingURL=AdminInitiateAuthCommand.js.map + +/***/ }), + +/***/ 31763: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminLinkProviderForUserCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Links an existing user account in a user pool (DestinationUser) to an + * identity from an external identity provider (SourceUser) based on a + * specified attribute name and value from the external identity provider. This allows you + * to create a link from the existing user account to an external federated user identity + * that has not yet been used to sign in, so that the federated user identity can be used + * to sign in as the existing user account.

+ *

For example, if there is an existing user with a username and password, this API + * links that user to a federated user identity, so that when the federated user identity + * is used, the user signs in as the existing user account.

+ * + *

The maximum number of federated identities linked to a user is 5.

+ *
+ * + *

Because this API allows a user with an external federated identity to sign in as + * an existing user in the user pool, it is critical that it only be used with external + * identity providers and provider attributes that have been trusted by the application + * owner.

+ *
+ * + *

This action is enabled only for admin access and requires developer + * credentials.

+ */ +class AdminLinkProviderForUserCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminLinkProviderForUserCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminLinkProviderForUserRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminLinkProviderForUserResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminLinkProviderForUserCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminLinkProviderForUserCommand(output, context); + } +} +exports.AdminLinkProviderForUserCommand = AdminLinkProviderForUserCommand; +//# sourceMappingURL=AdminLinkProviderForUserCommand.js.map + +/***/ }), + +/***/ 18926: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminListDevicesCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists devices, as an administrator.

+ *

Calling this action requires developer credentials.

+ */ +class AdminListDevicesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminListDevicesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminListDevicesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminListDevicesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminListDevicesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminListDevicesCommand(output, context); + } +} +exports.AdminListDevicesCommand = AdminListDevicesCommand; +//# sourceMappingURL=AdminListDevicesCommand.js.map + +/***/ }), + +/***/ 4199: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminListGroupsForUserCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the groups that the user belongs to.

+ *

Calling this action requires developer credentials.

+ */ +class AdminListGroupsForUserCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminListGroupsForUserCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminListGroupsForUserRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminListGroupsForUserResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminListGroupsForUserCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminListGroupsForUserCommand(output, context); + } +} +exports.AdminListGroupsForUserCommand = AdminListGroupsForUserCommand; +//# sourceMappingURL=AdminListGroupsForUserCommand.js.map + +/***/ }), + +/***/ 76132: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminListUserAuthEventsCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists a history of user activity and any risks detected as part of Amazon Cognito + * advanced security.

+ */ +class AdminListUserAuthEventsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminListUserAuthEventsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminListUserAuthEventsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminListUserAuthEventsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminListUserAuthEventsCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminListUserAuthEventsCommand(output, context); + } +} +exports.AdminListUserAuthEventsCommand = AdminListUserAuthEventsCommand; +//# sourceMappingURL=AdminListUserAuthEventsCommand.js.map + +/***/ }), + +/***/ 9640: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminRemoveUserFromGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Removes the specified user from the specified group.

+ *

Calling this action requires developer credentials.

+ */ +class AdminRemoveUserFromGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminRemoveUserFromGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminRemoveUserFromGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminRemoveUserFromGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminRemoveUserFromGroupCommand(output, context); + } +} +exports.AdminRemoveUserFromGroupCommand = AdminRemoveUserFromGroupCommand; +//# sourceMappingURL=AdminRemoveUserFromGroupCommand.js.map + +/***/ }), + +/***/ 12557: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminResetUserPasswordCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Resets the specified user's password in a user pool as an administrator. Works on any + * user.

+ *

When a developer calls this API, the current password is invalidated, so it must be + * changed. If a user tries to sign in after the API is called, the app will get a + * PasswordResetRequiredException exception back and should direct the user down the flow + * to reset the password, which is the same as the forgot password flow. In addition, if + * the user pool has phone verification selected and a verified phone number exists for the + * user, or if email verification is selected and a verified email exists for the user, + * calling this API will also result in sending a message to the end user with the code to + * change their password.

+ *

Calling this action requires developer credentials.

+ */ +class AdminResetUserPasswordCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminResetUserPasswordCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminResetUserPasswordRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminResetUserPasswordResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminResetUserPasswordCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminResetUserPasswordCommand(output, context); + } +} +exports.AdminResetUserPasswordCommand = AdminResetUserPasswordCommand; +//# sourceMappingURL=AdminResetUserPasswordCommand.js.map + +/***/ }), + +/***/ 21828: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminRespondToAuthChallengeCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Responds to an authentication challenge, as an administrator.

+ *

Calling this action requires developer credentials.

+ */ +class AdminRespondToAuthChallengeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminRespondToAuthChallengeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminRespondToAuthChallengeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminRespondToAuthChallengeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminRespondToAuthChallengeCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminRespondToAuthChallengeCommand(output, context); + } +} +exports.AdminRespondToAuthChallengeCommand = AdminRespondToAuthChallengeCommand; +//# sourceMappingURL=AdminRespondToAuthChallengeCommand.js.map + +/***/ }), + +/***/ 13421: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminSetUserMFAPreferenceCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets the user's multi-factor authentication (MFA) preference, including which MFA + * options are enabled and if any are preferred. Only one factor can be set as preferred. + * The preferred MFA factor will be used to authenticate a user if multiple factors are + * enabled. If multiple options are enabled and no preference is set, a challenge to choose + * an MFA option will be returned during sign in.

+ */ +class AdminSetUserMFAPreferenceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminSetUserMFAPreferenceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminSetUserMFAPreferenceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminSetUserMFAPreferenceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminSetUserMFAPreferenceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminSetUserMFAPreferenceCommand(output, context); + } +} +exports.AdminSetUserMFAPreferenceCommand = AdminSetUserMFAPreferenceCommand; +//# sourceMappingURL=AdminSetUserMFAPreferenceCommand.js.map + +/***/ }), + +/***/ 75616: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminSetUserPasswordCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets the specified user's password in a user pool as an administrator. Works on any + * user.

+ *

The password can be temporary or permanent. If it is temporary, the user status will + * be placed into the FORCE_CHANGE_PASSWORD state. When the user next tries to + * sign in, the InitiateAuth/AdminInitiateAuth response will contain the + * NEW_PASSWORD_REQUIRED challenge. If the user does not sign in before it + * expires, the user will not be able to sign in and their password will need to be reset + * by an administrator.

+ *

Once the user has set a new password, or the password is permanent, the user status + * will be set to Confirmed.

+ */ +class AdminSetUserPasswordCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminSetUserPasswordCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminSetUserPasswordRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminSetUserPasswordResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminSetUserPasswordCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminSetUserPasswordCommand(output, context); + } +} +exports.AdminSetUserPasswordCommand = AdminSetUserPasswordCommand; +//# sourceMappingURL=AdminSetUserPasswordCommand.js.map + +/***/ }), + +/***/ 36217: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminSetUserSettingsCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

+ * This action is no longer supported. You can use it to configure + * only SMS MFA. You can't use it to configure TOTP software token MFA. To configure either + * type of MFA, use AdminSetUserMFAPreference instead.

+ */ +class AdminSetUserSettingsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminSetUserSettingsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminSetUserSettingsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminSetUserSettingsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminSetUserSettingsCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminSetUserSettingsCommand(output, context); + } +} +exports.AdminSetUserSettingsCommand = AdminSetUserSettingsCommand; +//# sourceMappingURL=AdminSetUserSettingsCommand.js.map + +/***/ }), + +/***/ 57675: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminUpdateAuthEventFeedbackCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Provides feedback for an authentication event as to whether it was from a valid user. + * This feedback is used for improving the risk evaluation decision for the user pool as + * part of Amazon Cognito advanced security.

+ */ +class AdminUpdateAuthEventFeedbackCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminUpdateAuthEventFeedbackCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminUpdateAuthEventFeedbackRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminUpdateAuthEventFeedbackResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminUpdateAuthEventFeedbackCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminUpdateAuthEventFeedbackCommand(output, context); + } +} +exports.AdminUpdateAuthEventFeedbackCommand = AdminUpdateAuthEventFeedbackCommand; +//# sourceMappingURL=AdminUpdateAuthEventFeedbackCommand.js.map + +/***/ }), + +/***/ 18824: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminUpdateDeviceStatusCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the device status as an administrator.

+ *

Calling this action requires developer credentials.

+ */ +class AdminUpdateDeviceStatusCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminUpdateDeviceStatusCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminUpdateDeviceStatusRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminUpdateDeviceStatusResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminUpdateDeviceStatusCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminUpdateDeviceStatusCommand(output, context); + } +} +exports.AdminUpdateDeviceStatusCommand = AdminUpdateDeviceStatusCommand; +//# sourceMappingURL=AdminUpdateDeviceStatusCommand.js.map + +/***/ }), + +/***/ 1541: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminUpdateUserAttributesCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the specified user's attributes, including developer attributes, as an + * administrator. Works on any user.

+ *

For custom attributes, you must prepend the custom: prefix to the + * attribute name.

+ *

In addition to updating user attributes, this API can also be used to mark phone and + * email as verified.

+ *

Calling this action requires developer credentials.

+ */ +class AdminUpdateUserAttributesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminUpdateUserAttributesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminUpdateUserAttributesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminUpdateUserAttributesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminUpdateUserAttributesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminUpdateUserAttributesCommand(output, context); + } +} +exports.AdminUpdateUserAttributesCommand = AdminUpdateUserAttributesCommand; +//# sourceMappingURL=AdminUpdateUserAttributesCommand.js.map + +/***/ }), + +/***/ 11240: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminUserGlobalSignOutCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Signs out users from all devices, as an administrator. It also invalidates all refresh + * tokens issued to a user. The user's current access and Id tokens remain valid until + * their expiry. Access and Id tokens expire one hour after they are issued.

+ *

Calling this action requires developer credentials.

+ */ +class AdminUserGlobalSignOutCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AdminUserGlobalSignOutCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AdminUserGlobalSignOutRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AdminUserGlobalSignOutResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AdminUserGlobalSignOutCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AdminUserGlobalSignOutCommand(output, context); + } +} +exports.AdminUserGlobalSignOutCommand = AdminUserGlobalSignOutCommand; +//# sourceMappingURL=AdminUserGlobalSignOutCommand.js.map + +/***/ }), + +/***/ 52819: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssociateSoftwareTokenCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a unique generated shared secret key code for the user account. The request + * takes an access token or a session string, but not both.

+ */ +class AssociateSoftwareTokenCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "AssociateSoftwareTokenCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AssociateSoftwareTokenRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AssociateSoftwareTokenResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1AssociateSoftwareTokenCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1AssociateSoftwareTokenCommand(output, context); + } +} +exports.AssociateSoftwareTokenCommand = AssociateSoftwareTokenCommand; +//# sourceMappingURL=AssociateSoftwareTokenCommand.js.map + +/***/ }), + +/***/ 65801: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ChangePasswordCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Changes the password for a specified user in a user pool.

+ */ +class ChangePasswordCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ChangePasswordCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ChangePasswordRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ChangePasswordResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ChangePasswordCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ChangePasswordCommand(output, context); + } +} +exports.ChangePasswordCommand = ChangePasswordCommand; +//# sourceMappingURL=ChangePasswordCommand.js.map + +/***/ }), + +/***/ 79275: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ConfirmDeviceCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Confirms tracking of the device. This API call is the call that begins device + * tracking.

+ */ +class ConfirmDeviceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ConfirmDeviceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ConfirmDeviceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ConfirmDeviceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ConfirmDeviceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ConfirmDeviceCommand(output, context); + } +} +exports.ConfirmDeviceCommand = ConfirmDeviceCommand; +//# sourceMappingURL=ConfirmDeviceCommand.js.map + +/***/ }), + +/***/ 35665: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ConfirmForgotPasswordCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Allows a user to enter a confirmation code to reset a forgotten password.

+ */ +class ConfirmForgotPasswordCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ConfirmForgotPasswordCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ConfirmForgotPasswordRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ConfirmForgotPasswordResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ConfirmForgotPasswordCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ConfirmForgotPasswordCommand(output, context); + } +} +exports.ConfirmForgotPasswordCommand = ConfirmForgotPasswordCommand; +//# sourceMappingURL=ConfirmForgotPasswordCommand.js.map + +/***/ }), + +/***/ 18104: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ConfirmSignUpCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Confirms registration of a user and handles the existing alias from a previous + * user.

+ */ +class ConfirmSignUpCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ConfirmSignUpCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ConfirmSignUpRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ConfirmSignUpResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ConfirmSignUpCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ConfirmSignUpCommand(output, context); + } +} +exports.ConfirmSignUpCommand = ConfirmSignUpCommand; +//# sourceMappingURL=ConfirmSignUpCommand.js.map + +/***/ }), + +/***/ 81662: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a new group in the specified user pool.

+ *

Calling this action requires developer credentials.

+ */ +class CreateGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "CreateGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreateGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreateGroupCommand(output, context); + } +} +exports.CreateGroupCommand = CreateGroupCommand; +//# sourceMappingURL=CreateGroupCommand.js.map + +/***/ }), + +/***/ 81266: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateIdentityProviderCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates an identity provider for a user pool.

+ */ +class CreateIdentityProviderCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "CreateIdentityProviderCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateIdentityProviderRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateIdentityProviderResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreateIdentityProviderCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreateIdentityProviderCommand(output, context); + } +} +exports.CreateIdentityProviderCommand = CreateIdentityProviderCommand; +//# sourceMappingURL=CreateIdentityProviderCommand.js.map + +/***/ }), + +/***/ 54935: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateResourceServerCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a new OAuth2.0 resource server and defines custom scopes in it.

+ */ +class CreateResourceServerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "CreateResourceServerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateResourceServerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateResourceServerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreateResourceServerCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreateResourceServerCommand(output, context); + } +} +exports.CreateResourceServerCommand = CreateResourceServerCommand; +//# sourceMappingURL=CreateResourceServerCommand.js.map + +/***/ }), + +/***/ 77974: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateUserImportJobCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates the user import job.

+ */ +class CreateUserImportJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "CreateUserImportJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateUserImportJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateUserImportJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreateUserImportJobCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreateUserImportJobCommand(output, context); + } +} +exports.CreateUserImportJobCommand = CreateUserImportJobCommand; +//# sourceMappingURL=CreateUserImportJobCommand.js.map + +/***/ }), + +/***/ 17824: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateUserPoolClientCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates the user pool client.

+ */ +class CreateUserPoolClientCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "CreateUserPoolClientCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateUserPoolClientRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateUserPoolClientResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreateUserPoolClientCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreateUserPoolClientCommand(output, context); + } +} +exports.CreateUserPoolClientCommand = CreateUserPoolClientCommand; +//# sourceMappingURL=CreateUserPoolClientCommand.js.map + +/***/ }), + +/***/ 74938: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateUserPoolCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a new Amazon Cognito user pool and sets the password policy for the + * pool.

+ */ +class CreateUserPoolCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "CreateUserPoolCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateUserPoolRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateUserPoolResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreateUserPoolCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreateUserPoolCommand(output, context); + } +} +exports.CreateUserPoolCommand = CreateUserPoolCommand; +//# sourceMappingURL=CreateUserPoolCommand.js.map + +/***/ }), + +/***/ 58015: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateUserPoolDomainCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a new domain for a user pool.

+ */ +class CreateUserPoolDomainCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "CreateUserPoolDomainCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateUserPoolDomainRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateUserPoolDomainResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreateUserPoolDomainCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreateUserPoolDomainCommand(output, context); + } +} +exports.CreateUserPoolDomainCommand = CreateUserPoolDomainCommand; +//# sourceMappingURL=CreateUserPoolDomainCommand.js.map + +/***/ }), + +/***/ 73307: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a group. Currently only groups with no members can be deleted.

+ *

Calling this action requires developer credentials.

+ */ +class DeleteGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DeleteGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteGroupCommand(output, context); + } +} +exports.DeleteGroupCommand = DeleteGroupCommand; +//# sourceMappingURL=DeleteGroupCommand.js.map + +/***/ }), + +/***/ 7493: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteIdentityProviderCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes an identity provider for a user pool.

+ */ +class DeleteIdentityProviderCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DeleteIdentityProviderCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteIdentityProviderRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteIdentityProviderCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteIdentityProviderCommand(output, context); + } +} +exports.DeleteIdentityProviderCommand = DeleteIdentityProviderCommand; +//# sourceMappingURL=DeleteIdentityProviderCommand.js.map + +/***/ }), + +/***/ 6049: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteResourceServerCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a resource server.

+ */ +class DeleteResourceServerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DeleteResourceServerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteResourceServerRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteResourceServerCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteResourceServerCommand(output, context); + } +} +exports.DeleteResourceServerCommand = DeleteResourceServerCommand; +//# sourceMappingURL=DeleteResourceServerCommand.js.map + +/***/ }), + +/***/ 99475: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteUserAttributesCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the attributes for a user.

+ */ +class DeleteUserAttributesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DeleteUserAttributesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteUserAttributesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteUserAttributesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteUserAttributesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteUserAttributesCommand(output, context); + } +} +exports.DeleteUserAttributesCommand = DeleteUserAttributesCommand; +//# sourceMappingURL=DeleteUserAttributesCommand.js.map + +/***/ }), + +/***/ 28421: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteUserCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Allows a user to delete himself or herself.

+ */ +class DeleteUserCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DeleteUserCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteUserRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteUserCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteUserCommand(output, context); + } +} +exports.DeleteUserCommand = DeleteUserCommand; +//# sourceMappingURL=DeleteUserCommand.js.map + +/***/ }), + +/***/ 3402: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteUserPoolClientCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Allows the developer to delete the user pool client.

+ */ +class DeleteUserPoolClientCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DeleteUserPoolClientCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteUserPoolClientRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteUserPoolClientCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteUserPoolClientCommand(output, context); + } +} +exports.DeleteUserPoolClientCommand = DeleteUserPoolClientCommand; +//# sourceMappingURL=DeleteUserPoolClientCommand.js.map + +/***/ }), + +/***/ 92314: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteUserPoolCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the specified Amazon Cognito user pool.

+ */ +class DeleteUserPoolCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DeleteUserPoolCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteUserPoolRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteUserPoolCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteUserPoolCommand(output, context); + } +} +exports.DeleteUserPoolCommand = DeleteUserPoolCommand; +//# sourceMappingURL=DeleteUserPoolCommand.js.map + +/***/ }), + +/***/ 79680: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteUserPoolDomainCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a domain for a user pool.

+ */ +class DeleteUserPoolDomainCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DeleteUserPoolDomainCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteUserPoolDomainRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteUserPoolDomainResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteUserPoolDomainCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteUserPoolDomainCommand(output, context); + } +} +exports.DeleteUserPoolDomainCommand = DeleteUserPoolDomainCommand; +//# sourceMappingURL=DeleteUserPoolDomainCommand.js.map + +/***/ }), + +/***/ 96582: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeIdentityProviderCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about a specific identity provider.

+ */ +class DescribeIdentityProviderCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DescribeIdentityProviderCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeIdentityProviderRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeIdentityProviderResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeIdentityProviderCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeIdentityProviderCommand(output, context); + } +} +exports.DescribeIdentityProviderCommand = DescribeIdentityProviderCommand; +//# sourceMappingURL=DescribeIdentityProviderCommand.js.map + +/***/ }), + +/***/ 13045: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeResourceServerCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes a resource server.

+ */ +class DescribeResourceServerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DescribeResourceServerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeResourceServerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeResourceServerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeResourceServerCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeResourceServerCommand(output, context); + } +} +exports.DescribeResourceServerCommand = DescribeResourceServerCommand; +//# sourceMappingURL=DescribeResourceServerCommand.js.map + +/***/ }), + +/***/ 51063: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeRiskConfigurationCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes the risk configuration.

+ */ +class DescribeRiskConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DescribeRiskConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeRiskConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeRiskConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeRiskConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeRiskConfigurationCommand(output, context); + } +} +exports.DescribeRiskConfigurationCommand = DescribeRiskConfigurationCommand; +//# sourceMappingURL=DescribeRiskConfigurationCommand.js.map + +/***/ }), + +/***/ 10902: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeUserImportJobCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes the user import job.

+ */ +class DescribeUserImportJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DescribeUserImportJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeUserImportJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeUserImportJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeUserImportJobCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeUserImportJobCommand(output, context); + } +} +exports.DescribeUserImportJobCommand = DescribeUserImportJobCommand; +//# sourceMappingURL=DescribeUserImportJobCommand.js.map + +/***/ }), + +/***/ 25424: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeUserPoolClientCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Client method for returning the configuration information and metadata of the + * specified user pool app client.

+ */ +class DescribeUserPoolClientCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DescribeUserPoolClientCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeUserPoolClientRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeUserPoolClientResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeUserPoolClientCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeUserPoolClientCommand(output, context); + } +} +exports.DescribeUserPoolClientCommand = DescribeUserPoolClientCommand; +//# sourceMappingURL=DescribeUserPoolClientCommand.js.map + +/***/ }), + +/***/ 67125: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeUserPoolCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the configuration information and metadata of the specified user pool.

+ */ +class DescribeUserPoolCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DescribeUserPoolCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeUserPoolRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeUserPoolResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeUserPoolCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeUserPoolCommand(output, context); + } +} +exports.DescribeUserPoolCommand = DescribeUserPoolCommand; +//# sourceMappingURL=DescribeUserPoolCommand.js.map + +/***/ }), + +/***/ 9253: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeUserPoolDomainCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about a domain.

+ */ +class DescribeUserPoolDomainCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "DescribeUserPoolDomainCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeUserPoolDomainRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeUserPoolDomainResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeUserPoolDomainCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeUserPoolDomainCommand(output, context); + } +} +exports.DescribeUserPoolDomainCommand = DescribeUserPoolDomainCommand; +//# sourceMappingURL=DescribeUserPoolDomainCommand.js.map + +/***/ }), + +/***/ 39305: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ForgetDeviceCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Forgets the specified device.

+ */ +class ForgetDeviceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ForgetDeviceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ForgetDeviceRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ForgetDeviceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ForgetDeviceCommand(output, context); + } +} +exports.ForgetDeviceCommand = ForgetDeviceCommand; +//# sourceMappingURL=ForgetDeviceCommand.js.map + +/***/ }), + +/***/ 15806: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ForgotPasswordCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Calling this API causes a message to be sent to the end user with a confirmation code + * that is required to change the user's password. For the Username parameter, + * you can use the username or user alias. The method used to send the confirmation code is + * sent according to the specified AccountRecoverySetting. For more information, see Recovering User Accounts in the Amazon Cognito Developer Guide. + * If neither a verified phone number nor a verified email exists, an + * InvalidParameterException is thrown. To use the confirmation code for + * resetting the password, call ConfirmForgotPassword.

+ */ +class ForgotPasswordCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ForgotPasswordCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ForgotPasswordRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ForgotPasswordResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ForgotPasswordCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ForgotPasswordCommand(output, context); + } +} +exports.ForgotPasswordCommand = ForgotPasswordCommand; +//# sourceMappingURL=ForgotPasswordCommand.js.map + +/***/ }), + +/***/ 59575: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetCSVHeaderCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the header information for the .csv file to be used as input for the user import + * job.

+ */ +class GetCSVHeaderCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "GetCSVHeaderCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetCSVHeaderRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetCSVHeaderResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetCSVHeaderCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetCSVHeaderCommand(output, context); + } +} +exports.GetCSVHeaderCommand = GetCSVHeaderCommand; +//# sourceMappingURL=GetCSVHeaderCommand.js.map + +/***/ }), + +/***/ 95242: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetDeviceCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the device.

+ */ +class GetDeviceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "GetDeviceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetDeviceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetDeviceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetDeviceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetDeviceCommand(output, context); + } +} +exports.GetDeviceCommand = GetDeviceCommand; +//# sourceMappingURL=GetDeviceCommand.js.map + +/***/ }), + +/***/ 89462: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets a group.

+ *

Calling this action requires developer credentials.

+ */ +class GetGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "GetGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetGroupCommand(output, context); + } +} +exports.GetGroupCommand = GetGroupCommand; +//# sourceMappingURL=GetGroupCommand.js.map + +/***/ }), + +/***/ 29528: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetIdentityProviderByIdentifierCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the specified identity provider.

+ */ +class GetIdentityProviderByIdentifierCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "GetIdentityProviderByIdentifierCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetIdentityProviderByIdentifierRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetIdentityProviderByIdentifierResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetIdentityProviderByIdentifierCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetIdentityProviderByIdentifierCommand(output, context); + } +} +exports.GetIdentityProviderByIdentifierCommand = GetIdentityProviderByIdentifierCommand; +//# sourceMappingURL=GetIdentityProviderByIdentifierCommand.js.map + +/***/ }), + +/***/ 7884: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetSigningCertificateCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

This method takes a user pool ID, and returns the signing certificate.

+ */ +class GetSigningCertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "GetSigningCertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetSigningCertificateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetSigningCertificateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetSigningCertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetSigningCertificateCommand(output, context); + } +} +exports.GetSigningCertificateCommand = GetSigningCertificateCommand; +//# sourceMappingURL=GetSigningCertificateCommand.js.map + +/***/ }), + +/***/ 47556: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetUICustomizationCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the UI Customization information for a particular app client's app UI, if there + * is something set. If nothing is set for the particular client, but there is an existing + * pool level customization (app clientId will be ALL), then that + * is returned. If nothing is present, then an empty shape is returned.

+ */ +class GetUICustomizationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "GetUICustomizationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetUICustomizationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetUICustomizationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetUICustomizationCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetUICustomizationCommand(output, context); + } +} +exports.GetUICustomizationCommand = GetUICustomizationCommand; +//# sourceMappingURL=GetUICustomizationCommand.js.map + +/***/ }), + +/***/ 1966: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetUserAttributeVerificationCodeCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the user attribute verification code for the specified attribute name.

+ */ +class GetUserAttributeVerificationCodeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "GetUserAttributeVerificationCodeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetUserAttributeVerificationCodeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetUserAttributeVerificationCodeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetUserAttributeVerificationCodeCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetUserAttributeVerificationCodeCommand(output, context); + } +} +exports.GetUserAttributeVerificationCodeCommand = GetUserAttributeVerificationCodeCommand; +//# sourceMappingURL=GetUserAttributeVerificationCodeCommand.js.map + +/***/ }), + +/***/ 33079: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetUserCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the user attributes and metadata for a user.

+ */ +class GetUserCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "GetUserCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetUserRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetUserResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetUserCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetUserCommand(output, context); + } +} +exports.GetUserCommand = GetUserCommand; +//# sourceMappingURL=GetUserCommand.js.map + +/***/ }), + +/***/ 59598: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetUserPoolMfaConfigCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the user pool multi-factor authentication (MFA) configuration.

+ */ +class GetUserPoolMfaConfigCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "GetUserPoolMfaConfigCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetUserPoolMfaConfigRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetUserPoolMfaConfigResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetUserPoolMfaConfigCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetUserPoolMfaConfigCommand(output, context); + } +} +exports.GetUserPoolMfaConfigCommand = GetUserPoolMfaConfigCommand; +//# sourceMappingURL=GetUserPoolMfaConfigCommand.js.map + +/***/ }), + +/***/ 783: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GlobalSignOutCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Signs out users from all devices. It also invalidates all refresh tokens issued to a + * user. The user's current access and Id tokens remain valid until their expiry. Access + * and Id tokens expire one hour after they are issued.

+ */ +class GlobalSignOutCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "GlobalSignOutCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GlobalSignOutRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GlobalSignOutResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GlobalSignOutCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GlobalSignOutCommand(output, context); + } +} +exports.GlobalSignOutCommand = GlobalSignOutCommand; +//# sourceMappingURL=GlobalSignOutCommand.js.map + +/***/ }), + +/***/ 25210: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InitiateAuthCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Initiates the authentication flow.

+ */ +class InitiateAuthCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "InitiateAuthCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.InitiateAuthRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.InitiateAuthResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1InitiateAuthCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1InitiateAuthCommand(output, context); + } +} +exports.InitiateAuthCommand = InitiateAuthCommand; +//# sourceMappingURL=InitiateAuthCommand.js.map + +/***/ }), + +/***/ 41445: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListDevicesCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the devices.

+ */ +class ListDevicesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ListDevicesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListDevicesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListDevicesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListDevicesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListDevicesCommand(output, context); + } +} +exports.ListDevicesCommand = ListDevicesCommand; +//# sourceMappingURL=ListDevicesCommand.js.map + +/***/ }), + +/***/ 39386: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListGroupsCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the groups associated with a user pool.

+ *

Calling this action requires developer credentials.

+ */ +class ListGroupsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ListGroupsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListGroupsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListGroupsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListGroupsCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListGroupsCommand(output, context); + } +} +exports.ListGroupsCommand = ListGroupsCommand; +//# sourceMappingURL=ListGroupsCommand.js.map + +/***/ }), + +/***/ 73419: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListIdentityProvidersCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists information about all identity providers for a user pool.

+ */ +class ListIdentityProvidersCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ListIdentityProvidersCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListIdentityProvidersRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListIdentityProvidersResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListIdentityProvidersCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListIdentityProvidersCommand(output, context); + } +} +exports.ListIdentityProvidersCommand = ListIdentityProvidersCommand; +//# sourceMappingURL=ListIdentityProvidersCommand.js.map + +/***/ }), + +/***/ 93783: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListResourceServersCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the resource servers for a user pool.

+ */ +class ListResourceServersCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ListResourceServersCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListResourceServersRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListResourceServersResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListResourceServersCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListResourceServersCommand(output, context); + } +} +exports.ListResourceServersCommand = ListResourceServersCommand; +//# sourceMappingURL=ListResourceServersCommand.js.map + +/***/ }), + +/***/ 22658: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTagsForResourceCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the tags that are assigned to an Amazon Cognito user pool.

+ *

A tag is a label that you can apply to user pools to categorize and manage them in + * different ways, such as by purpose, owner, environment, or other criteria.

+ *

You can use this action up to 10 times per second, per account.

+ */ +class ListTagsForResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + 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; +//# sourceMappingURL=ListTagsForResourceCommand.js.map + +/***/ }), + +/***/ 86421: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListUserImportJobsCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the user import jobs.

+ */ +class ListUserImportJobsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ListUserImportJobsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListUserImportJobsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListUserImportJobsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListUserImportJobsCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListUserImportJobsCommand(output, context); + } +} +exports.ListUserImportJobsCommand = ListUserImportJobsCommand; +//# sourceMappingURL=ListUserImportJobsCommand.js.map + +/***/ }), + +/***/ 87753: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListUserPoolClientsCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the clients that have been created for the specified user pool.

+ */ +class ListUserPoolClientsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ListUserPoolClientsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListUserPoolClientsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListUserPoolClientsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListUserPoolClientsCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListUserPoolClientsCommand(output, context); + } +} +exports.ListUserPoolClientsCommand = ListUserPoolClientsCommand; +//# sourceMappingURL=ListUserPoolClientsCommand.js.map + +/***/ }), + +/***/ 51756: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListUserPoolsCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the user pools associated with an AWS account.

+ */ +class ListUserPoolsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ListUserPoolsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListUserPoolsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListUserPoolsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListUserPoolsCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListUserPoolsCommand(output, context); + } +} +exports.ListUserPoolsCommand = ListUserPoolsCommand; +//# sourceMappingURL=ListUserPoolsCommand.js.map + +/***/ }), + +/***/ 16854: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListUsersCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the users in the Amazon Cognito user pool.

+ */ +class ListUsersCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ListUsersCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListUsersRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListUsersResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListUsersCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListUsersCommand(output, context); + } +} +exports.ListUsersCommand = ListUsersCommand; +//# sourceMappingURL=ListUsersCommand.js.map + +/***/ }), + +/***/ 51577: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListUsersInGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the users in the specified group.

+ *

Calling this action requires developer credentials.

+ */ +class ListUsersInGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ListUsersInGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListUsersInGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListUsersInGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListUsersInGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListUsersInGroupCommand(output, context); + } +} +exports.ListUsersInGroupCommand = ListUsersInGroupCommand; +//# sourceMappingURL=ListUsersInGroupCommand.js.map + +/***/ }), + +/***/ 30730: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ResendConfirmationCodeCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Resends the confirmation (for confirmation of registration) to a specific user in the + * user pool.

+ */ +class ResendConfirmationCodeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "ResendConfirmationCodeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ResendConfirmationCodeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ResendConfirmationCodeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ResendConfirmationCodeCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ResendConfirmationCodeCommand(output, context); + } +} +exports.ResendConfirmationCodeCommand = ResendConfirmationCodeCommand; +//# sourceMappingURL=ResendConfirmationCodeCommand.js.map + +/***/ }), + +/***/ 36946: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RespondToAuthChallengeCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Responds to the authentication challenge.

+ */ +class RespondToAuthChallengeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "RespondToAuthChallengeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.RespondToAuthChallengeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.RespondToAuthChallengeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1RespondToAuthChallengeCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1RespondToAuthChallengeCommand(output, context); + } +} +exports.RespondToAuthChallengeCommand = RespondToAuthChallengeCommand; +//# sourceMappingURL=RespondToAuthChallengeCommand.js.map + +/***/ }), + +/***/ 54210: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetRiskConfigurationCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Configures actions on detected risks. To delete the risk configuration for + * UserPoolId or ClientId, pass null values for all four + * configuration types.

+ *

To enable Amazon Cognito advanced security features, update the user pool to include + * the UserPoolAddOns keyAdvancedSecurityMode.

+ */ +class SetRiskConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "SetRiskConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetRiskConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SetRiskConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1SetRiskConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1SetRiskConfigurationCommand(output, context); + } +} +exports.SetRiskConfigurationCommand = SetRiskConfigurationCommand; +//# sourceMappingURL=SetRiskConfigurationCommand.js.map + +/***/ }), + +/***/ 41002: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetUICustomizationCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets the UI customization information for a user pool's built-in app UI.

+ *

You can specify app UI customization settings for a single client (with a specific + * clientId) or for all clients (by setting the clientId to + * ALL). If you specify ALL, the default configuration will + * be used for every client that has no UI customization set previously. If you specify UI + * customization settings for a particular client, it will no longer fall back to the + * ALL configuration.

+ * + *

To use this API, your user pool must have a domain associated with it. Otherwise, + * there is no place to host the app's pages, and the service will throw an + * error.

+ *
+ */ +class SetUICustomizationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "SetUICustomizationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetUICustomizationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SetUICustomizationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1SetUICustomizationCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1SetUICustomizationCommand(output, context); + } +} +exports.SetUICustomizationCommand = SetUICustomizationCommand; +//# sourceMappingURL=SetUICustomizationCommand.js.map + +/***/ }), + +/***/ 59037: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetUserMFAPreferenceCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Set the user's multi-factor authentication (MFA) method preference, including which + * MFA factors are enabled and if any are preferred. Only one factor can be set as + * preferred. The preferred MFA factor will be used to authenticate a user if multiple + * factors are enabled. If multiple options are enabled and no preference is set, a + * challenge to choose an MFA option will be returned during sign in. If an MFA type is enabled for a user, the user will be prompted for MFA during all sign in attempts, + * unless device tracking is turned on and the device has been trusted. + * If you would like MFA to be applied selectively based on the assessed risk level of sign in attempts, disable MFA for users and turn on Adaptive Authentication for the user pool.

+ */ +class SetUserMFAPreferenceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "SetUserMFAPreferenceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetUserMFAPreferenceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SetUserMFAPreferenceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1SetUserMFAPreferenceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1SetUserMFAPreferenceCommand(output, context); + } +} +exports.SetUserMFAPreferenceCommand = SetUserMFAPreferenceCommand; +//# sourceMappingURL=SetUserMFAPreferenceCommand.js.map + +/***/ }), + +/***/ 39776: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetUserPoolMfaConfigCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Set the user pool multi-factor authentication (MFA) configuration.

+ */ +class SetUserPoolMfaConfigCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "SetUserPoolMfaConfigCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetUserPoolMfaConfigRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SetUserPoolMfaConfigResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1SetUserPoolMfaConfigCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1SetUserPoolMfaConfigCommand(output, context); + } +} +exports.SetUserPoolMfaConfigCommand = SetUserPoolMfaConfigCommand; +//# sourceMappingURL=SetUserPoolMfaConfigCommand.js.map + +/***/ }), + +/***/ 44103: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetUserSettingsCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

+ * This action is no longer supported. You can use it to configure + * only SMS MFA. You can't use it to configure TOTP software token MFA. To configure either + * type of MFA, use SetUserMFAPreference instead.

+ */ +class SetUserSettingsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "SetUserSettingsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetUserSettingsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SetUserSettingsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1SetUserSettingsCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1SetUserSettingsCommand(output, context); + } +} +exports.SetUserSettingsCommand = SetUserSettingsCommand; +//# sourceMappingURL=SetUserSettingsCommand.js.map + +/***/ }), + +/***/ 61298: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SignUpCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Registers the user in the specified user pool and creates a user name, password, and + * user attributes.

+ */ +class SignUpCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "SignUpCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SignUpRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SignUpResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1SignUpCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1SignUpCommand(output, context); + } +} +exports.SignUpCommand = SignUpCommand; +//# sourceMappingURL=SignUpCommand.js.map + +/***/ }), + +/***/ 8066: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StartUserImportJobCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Starts the user import.

+ */ +class StartUserImportJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "StartUserImportJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.StartUserImportJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.StartUserImportJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1StartUserImportJobCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1StartUserImportJobCommand(output, context); + } +} +exports.StartUserImportJobCommand = StartUserImportJobCommand; +//# sourceMappingURL=StartUserImportJobCommand.js.map + +/***/ }), + +/***/ 47546: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StopUserImportJobCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Stops the user import job.

+ */ +class StopUserImportJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "StopUserImportJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.StopUserImportJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.StopUserImportJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1StopUserImportJobCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1StopUserImportJobCommand(output, context); + } +} +exports.StopUserImportJobCommand = StopUserImportJobCommand; +//# sourceMappingURL=StopUserImportJobCommand.js.map + +/***/ }), + +/***/ 13116: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TagResourceCommand = void 0; +const models_0_1 = __nccwpck_require__(38771); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Assigns a set of tags to an Amazon Cognito user pool. A tag is a label that you can + * use to categorize and manage user pools in different ways, such as by purpose, owner, + * environment, or other criteria.

+ *

Each tag consists of a key and value, both of which you define. A key is a general + * category for more specific values. For example, if you have two versions of a user pool, + * one for testing and another for production, you might assign an Environment + * tag key to both user pools. The value of this key might be Test for one + * user pool and Production for the other.

+ *

Tags are useful for cost tracking and access control. You can activate your tags so + * that they appear on the Billing and Cost Management console, where you can track the + * costs associated with your user pools. In an IAM policy, you can constrain permissions + * for user pools based on specific tags or tag values.

+ *

You can use this action up to 5 times per second, per account. A user pool can have as + * many as 50 tags.

+ */ +class TagResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + 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; +//# sourceMappingURL=TagResourceCommand.js.map + +/***/ }), + +/***/ 93194: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UntagResourceCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Removes the specified tags from an Amazon Cognito user pool. You can use this action + * up to 5 times per second, per account

+ */ +class UntagResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.UntagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_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; +//# sourceMappingURL=UntagResourceCommand.js.map + +/***/ }), + +/***/ 45344: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateAuthEventFeedbackCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Provides the feedback for an authentication event whether it was from a valid user or + * not. This feedback is used for improving the risk evaluation decision for the user pool + * as part of Amazon Cognito advanced security.

+ */ +class UpdateAuthEventFeedbackCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "UpdateAuthEventFeedbackCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.UpdateAuthEventFeedbackRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.UpdateAuthEventFeedbackResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UpdateAuthEventFeedbackCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UpdateAuthEventFeedbackCommand(output, context); + } +} +exports.UpdateAuthEventFeedbackCommand = UpdateAuthEventFeedbackCommand; +//# sourceMappingURL=UpdateAuthEventFeedbackCommand.js.map + +/***/ }), + +/***/ 34181: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateDeviceStatusCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the device status.

+ */ +class UpdateDeviceStatusCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "UpdateDeviceStatusCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.UpdateDeviceStatusRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.UpdateDeviceStatusResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UpdateDeviceStatusCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UpdateDeviceStatusCommand(output, context); + } +} +exports.UpdateDeviceStatusCommand = UpdateDeviceStatusCommand; +//# sourceMappingURL=UpdateDeviceStatusCommand.js.map + +/***/ }), + +/***/ 17637: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateGroupCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the specified group with the specified attributes.

+ *

Calling this action requires developer credentials.

+ * + *

If you don't provide a value for an attribute, it will be set to the default + * value.

+ *
+ */ +class UpdateGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "UpdateGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.UpdateGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.UpdateGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UpdateGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UpdateGroupCommand(output, context); + } +} +exports.UpdateGroupCommand = UpdateGroupCommand; +//# sourceMappingURL=UpdateGroupCommand.js.map + +/***/ }), + +/***/ 79222: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateIdentityProviderCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates identity provider information for a user pool.

+ */ +class UpdateIdentityProviderCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "UpdateIdentityProviderCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.UpdateIdentityProviderRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.UpdateIdentityProviderResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UpdateIdentityProviderCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UpdateIdentityProviderCommand(output, context); + } +} +exports.UpdateIdentityProviderCommand = UpdateIdentityProviderCommand; +//# sourceMappingURL=UpdateIdentityProviderCommand.js.map + +/***/ }), + +/***/ 42116: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateResourceServerCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the name and scopes of resource server. All other fields are read-only.

+ * + *

If you don't provide a value for an attribute, it will be set to the default + * value.

+ *
+ */ +class UpdateResourceServerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "UpdateResourceServerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.UpdateResourceServerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.UpdateResourceServerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UpdateResourceServerCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UpdateResourceServerCommand(output, context); + } +} +exports.UpdateResourceServerCommand = UpdateResourceServerCommand; +//# sourceMappingURL=UpdateResourceServerCommand.js.map + +/***/ }), + +/***/ 77311: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateUserAttributesCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Allows a user to update a specific attribute (one at a time).

+ */ +class UpdateUserAttributesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "UpdateUserAttributesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.UpdateUserAttributesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.UpdateUserAttributesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UpdateUserAttributesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UpdateUserAttributesCommand(output, context); + } +} +exports.UpdateUserAttributesCommand = UpdateUserAttributesCommand; +//# sourceMappingURL=UpdateUserAttributesCommand.js.map + +/***/ }), + +/***/ 94287: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateUserPoolClientCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the specified user pool app client with the specified attributes. You can get + * a list of the current user pool app client settings using DescribeUserPoolClient.

+ * + *

If you don't provide a value for an attribute, it will be set to the default + * value.

+ *
+ */ +class UpdateUserPoolClientCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "UpdateUserPoolClientCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.UpdateUserPoolClientRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.UpdateUserPoolClientResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UpdateUserPoolClientCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UpdateUserPoolClientCommand(output, context); + } +} +exports.UpdateUserPoolClientCommand = UpdateUserPoolClientCommand; +//# sourceMappingURL=UpdateUserPoolClientCommand.js.map + +/***/ }), + +/***/ 70670: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateUserPoolCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the specified user pool with the specified attributes. You can get a list of + * the current user pool settings using DescribeUserPool.

+ * + *

If you don't provide a value for an attribute, it will be set to the default + * value.

+ *
+ */ +class UpdateUserPoolCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "UpdateUserPoolCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.UpdateUserPoolRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.UpdateUserPoolResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UpdateUserPoolCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UpdateUserPoolCommand(output, context); + } +} +exports.UpdateUserPoolCommand = UpdateUserPoolCommand; +//# sourceMappingURL=UpdateUserPoolCommand.js.map + +/***/ }), + +/***/ 16919: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateUserPoolDomainCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the Secure Sockets Layer (SSL) certificate for the custom domain for your user + * pool.

+ *

You can use this operation to provide the Amazon Resource Name (ARN) of a new + * certificate to Amazon Cognito. You cannot use it to change the domain for a user + * pool.

+ *

A custom domain is used to host the Amazon Cognito hosted UI, which provides sign-up + * and sign-in pages for your application. When you set up a custom domain, you provide a + * certificate that you manage with AWS Certificate Manager (ACM). When necessary, you can + * use this operation to change the certificate that you applied to your custom + * domain.

+ *

Usually, this is unnecessary following routine certificate renewal with ACM. When you + * renew your existing certificate in ACM, the ARN for your certificate remains the same, + * and your custom domain uses the new certificate automatically.

+ *

However, if you replace your existing certificate with a new one, ACM gives the new + * certificate a new ARN. To apply the new certificate to your custom domain, you must + * provide this ARN to Amazon Cognito.

+ *

When you add your new certificate in ACM, you must choose US East (N. Virginia) as the + * AWS Region.

+ *

After you submit your request, Amazon Cognito requires up to 1 hour to distribute your + * new certificate to your custom domain.

+ *

For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.

+ */ +class UpdateUserPoolDomainCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "UpdateUserPoolDomainCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.UpdateUserPoolDomainRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.UpdateUserPoolDomainResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UpdateUserPoolDomainCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UpdateUserPoolDomainCommand(output, context); + } +} +exports.UpdateUserPoolDomainCommand = UpdateUserPoolDomainCommand; +//# sourceMappingURL=UpdateUserPoolDomainCommand.js.map + +/***/ }), + +/***/ 25918: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.VerifySoftwareTokenCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Use this API to register a user's entered TOTP code and mark the user's software token + * MFA status as "verified" if successful. The request takes an access token or a session + * string, but not both.

+ */ +class VerifySoftwareTokenCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "VerifySoftwareTokenCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.VerifySoftwareTokenRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.VerifySoftwareTokenResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1VerifySoftwareTokenCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1VerifySoftwareTokenCommand(output, context); + } +} +exports.VerifySoftwareTokenCommand = VerifySoftwareTokenCommand; +//# sourceMappingURL=VerifySoftwareTokenCommand.js.map + +/***/ }), + +/***/ 11850: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.VerifyUserAttributeCommand = void 0; +const models_1_1 = __nccwpck_require__(1086); +const Aws_json1_1_1 = __nccwpck_require__(91522); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Verifies the specified user attributes in the user pool.

+ */ +class VerifyUserAttributeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityProviderClient"; + const commandName = "VerifyUserAttributeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.VerifyUserAttributeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.VerifyUserAttributeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1VerifyUserAttributeCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1VerifyUserAttributeCommand(output, context); + } +} +exports.VerifyUserAttributeCommand = VerifyUserAttributeCommand; +//# sourceMappingURL=VerifyUserAttributeCommand.js.map + +/***/ }), + +/***/ 96941: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRegionInfoProvider = void 0; +// Partition default templates +const AWS_TEMPLATE = "cognito-idp.{region}.amazonaws.com"; +const AWS_CN_TEMPLATE = "cognito-idp.{region}.amazonaws.com.cn"; +const AWS_ISO_TEMPLATE = "cognito-idp.{region}.c2s.ic.gov"; +const AWS_ISO_B_TEMPLATE = "cognito-idp.{region}.sc2s.sgov.gov"; +const AWS_US_GOV_TEMPLATE = "cognito-idp.{region}.amazonaws.com"; +// Partition regions +const AWS_REGIONS = new Set([ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "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", +]); +const AWS_CN_REGIONS = new Set(["cn-north-1", "cn-northwest-1"]); +const AWS_ISO_REGIONS = new Set(["us-iso-east-1"]); +const AWS_ISO_B_REGIONS = new Set(["us-isob-east-1"]); +const AWS_US_GOV_REGIONS = new Set(["us-gov-east-1", "us-gov-west-1"]); +const defaultRegionInfoProvider = (region, options) => { + let regionInfo = undefined; + switch (region) { + // First, try to match exact region names. + case "ap-northeast-1": + regionInfo = { + hostname: "cognito-idp.ap-northeast-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-northeast-2": + regionInfo = { + hostname: "cognito-idp.ap-northeast-2.amazonaws.com", + partition: "aws", + }; + break; + case "ap-south-1": + regionInfo = { + hostname: "cognito-idp.ap-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-southeast-1": + regionInfo = { + hostname: "cognito-idp.ap-southeast-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-southeast-2": + regionInfo = { + hostname: "cognito-idp.ap-southeast-2.amazonaws.com", + partition: "aws", + }; + break; + case "ca-central-1": + regionInfo = { + hostname: "cognito-idp.ca-central-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-central-1": + regionInfo = { + hostname: "cognito-idp.eu-central-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-north-1": + regionInfo = { + hostname: "cognito-idp.eu-north-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-1": + regionInfo = { + hostname: "cognito-idp.eu-west-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-2": + regionInfo = { + hostname: "cognito-idp.eu-west-2.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-3": + regionInfo = { + hostname: "cognito-idp.eu-west-3.amazonaws.com", + partition: "aws", + }; + break; + case "fips-us-east-1": + regionInfo = { + hostname: "cognito-idp-fips.us-east-1.amazonaws.com", + partition: "aws", + signingRegion: "us-east-1", + }; + break; + case "fips-us-east-2": + regionInfo = { + hostname: "cognito-idp-fips.us-east-2.amazonaws.com", + partition: "aws", + signingRegion: "us-east-2", + }; + break; + case "fips-us-gov-west-1": + regionInfo = { + hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com", + partition: "aws-us-gov", + signingRegion: "us-gov-west-1", + }; + break; + case "fips-us-west-2": + regionInfo = { + hostname: "cognito-idp-fips.us-west-2.amazonaws.com", + partition: "aws", + signingRegion: "us-west-2", + }; + break; + case "sa-east-1": + regionInfo = { + hostname: "cognito-idp.sa-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-1": + regionInfo = { + hostname: "cognito-idp.us-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-2": + regionInfo = { + hostname: "cognito-idp.us-east-2.amazonaws.com", + partition: "aws", + }; + break; + case "us-gov-west-1": + regionInfo = { + hostname: "cognito-idp.us-gov-west-1.amazonaws.com", + partition: "aws-us-gov", + }; + break; + case "us-west-1": + regionInfo = { + hostname: "cognito-idp.us-west-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-west-2": + regionInfo = { + hostname: "cognito-idp.us-west-2.amazonaws.com", + partition: "aws", + }; + break; + // Next, try to match partition endpoints. + default: + if (AWS_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + }; + } + if (AWS_CN_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_CN_TEMPLATE.replace("{region}", region), + partition: "aws-cn", + }; + } + if (AWS_ISO_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_TEMPLATE.replace("{region}", region), + partition: "aws-iso", + }; + } + if (AWS_ISO_B_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_B_TEMPLATE.replace("{region}", region), + partition: "aws-iso-b", + }; + } + if (AWS_US_GOV_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_US_GOV_TEMPLATE.replace("{region}", region), + partition: "aws-us-gov", + }; + } + // Finally, assume it's an AWS partition endpoint. + if (regionInfo === undefined) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + }; + } + } + return Promise.resolve({ signingService: "cognito-idp", ...regionInfo }); +}; +exports.defaultRegionInfoProvider = defaultRegionInfoProvider; +//# sourceMappingURL=endpoints.js.map + +/***/ }), + +/***/ 69508: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(37706); +tslib_1.__exportStar(__nccwpck_require__(32756), exports); +tslib_1.__exportStar(__nccwpck_require__(63436), exports); +tslib_1.__exportStar(__nccwpck_require__(2336), exports); +tslib_1.__exportStar(__nccwpck_require__(63030), exports); +tslib_1.__exportStar(__nccwpck_require__(8330), exports); +tslib_1.__exportStar(__nccwpck_require__(18188), exports); +tslib_1.__exportStar(__nccwpck_require__(27623), exports); +tslib_1.__exportStar(__nccwpck_require__(49653), exports); +tslib_1.__exportStar(__nccwpck_require__(24718), exports); +tslib_1.__exportStar(__nccwpck_require__(31989), exports); +tslib_1.__exportStar(__nccwpck_require__(78365), exports); +tslib_1.__exportStar(__nccwpck_require__(35436), exports); +tslib_1.__exportStar(__nccwpck_require__(7451), exports); +tslib_1.__exportStar(__nccwpck_require__(75054), exports); +tslib_1.__exportStar(__nccwpck_require__(51153), exports); +tslib_1.__exportStar(__nccwpck_require__(31763), exports); +tslib_1.__exportStar(__nccwpck_require__(18926), exports); +tslib_1.__exportStar(__nccwpck_require__(4199), exports); +tslib_1.__exportStar(__nccwpck_require__(71298), exports); +tslib_1.__exportStar(__nccwpck_require__(76132), exports); +tslib_1.__exportStar(__nccwpck_require__(91606), exports); +tslib_1.__exportStar(__nccwpck_require__(9640), exports); +tslib_1.__exportStar(__nccwpck_require__(12557), exports); +tslib_1.__exportStar(__nccwpck_require__(21828), exports); +tslib_1.__exportStar(__nccwpck_require__(13421), exports); +tslib_1.__exportStar(__nccwpck_require__(75616), exports); +tslib_1.__exportStar(__nccwpck_require__(36217), exports); +tslib_1.__exportStar(__nccwpck_require__(57675), exports); +tslib_1.__exportStar(__nccwpck_require__(18824), exports); +tslib_1.__exportStar(__nccwpck_require__(1541), exports); +tslib_1.__exportStar(__nccwpck_require__(11240), exports); +tslib_1.__exportStar(__nccwpck_require__(52819), exports); +tslib_1.__exportStar(__nccwpck_require__(65801), exports); +tslib_1.__exportStar(__nccwpck_require__(79275), exports); +tslib_1.__exportStar(__nccwpck_require__(35665), exports); +tslib_1.__exportStar(__nccwpck_require__(18104), exports); +tslib_1.__exportStar(__nccwpck_require__(81662), exports); +tslib_1.__exportStar(__nccwpck_require__(81266), exports); +tslib_1.__exportStar(__nccwpck_require__(54935), exports); +tslib_1.__exportStar(__nccwpck_require__(77974), exports); +tslib_1.__exportStar(__nccwpck_require__(74938), exports); +tslib_1.__exportStar(__nccwpck_require__(17824), exports); +tslib_1.__exportStar(__nccwpck_require__(58015), exports); +tslib_1.__exportStar(__nccwpck_require__(73307), exports); +tslib_1.__exportStar(__nccwpck_require__(7493), exports); +tslib_1.__exportStar(__nccwpck_require__(6049), exports); +tslib_1.__exportStar(__nccwpck_require__(28421), exports); +tslib_1.__exportStar(__nccwpck_require__(99475), exports); +tslib_1.__exportStar(__nccwpck_require__(92314), exports); +tslib_1.__exportStar(__nccwpck_require__(3402), exports); +tslib_1.__exportStar(__nccwpck_require__(79680), exports); +tslib_1.__exportStar(__nccwpck_require__(96582), exports); +tslib_1.__exportStar(__nccwpck_require__(13045), exports); +tslib_1.__exportStar(__nccwpck_require__(51063), exports); +tslib_1.__exportStar(__nccwpck_require__(10902), exports); +tslib_1.__exportStar(__nccwpck_require__(67125), exports); +tslib_1.__exportStar(__nccwpck_require__(25424), exports); +tslib_1.__exportStar(__nccwpck_require__(9253), exports); +tslib_1.__exportStar(__nccwpck_require__(39305), exports); +tslib_1.__exportStar(__nccwpck_require__(15806), exports); +tslib_1.__exportStar(__nccwpck_require__(59575), exports); +tslib_1.__exportStar(__nccwpck_require__(95242), exports); +tslib_1.__exportStar(__nccwpck_require__(89462), exports); +tslib_1.__exportStar(__nccwpck_require__(29528), exports); +tslib_1.__exportStar(__nccwpck_require__(7884), exports); +tslib_1.__exportStar(__nccwpck_require__(47556), exports); +tslib_1.__exportStar(__nccwpck_require__(33079), exports); +tslib_1.__exportStar(__nccwpck_require__(1966), exports); +tslib_1.__exportStar(__nccwpck_require__(59598), exports); +tslib_1.__exportStar(__nccwpck_require__(783), exports); +tslib_1.__exportStar(__nccwpck_require__(25210), exports); +tslib_1.__exportStar(__nccwpck_require__(41445), exports); +tslib_1.__exportStar(__nccwpck_require__(39386), exports); +tslib_1.__exportStar(__nccwpck_require__(42484), exports); +tslib_1.__exportStar(__nccwpck_require__(73419), exports); +tslib_1.__exportStar(__nccwpck_require__(24624), exports); +tslib_1.__exportStar(__nccwpck_require__(93783), exports); +tslib_1.__exportStar(__nccwpck_require__(56595), exports); +tslib_1.__exportStar(__nccwpck_require__(22658), exports); +tslib_1.__exportStar(__nccwpck_require__(86421), exports); +tslib_1.__exportStar(__nccwpck_require__(87753), exports); +tslib_1.__exportStar(__nccwpck_require__(64835), exports); +tslib_1.__exportStar(__nccwpck_require__(51756), exports); +tslib_1.__exportStar(__nccwpck_require__(79983), exports); +tslib_1.__exportStar(__nccwpck_require__(16854), exports); +tslib_1.__exportStar(__nccwpck_require__(23221), exports); +tslib_1.__exportStar(__nccwpck_require__(51577), exports); +tslib_1.__exportStar(__nccwpck_require__(24558), exports); +tslib_1.__exportStar(__nccwpck_require__(30730), exports); +tslib_1.__exportStar(__nccwpck_require__(36946), exports); +tslib_1.__exportStar(__nccwpck_require__(54210), exports); +tslib_1.__exportStar(__nccwpck_require__(41002), exports); +tslib_1.__exportStar(__nccwpck_require__(59037), exports); +tslib_1.__exportStar(__nccwpck_require__(39776), exports); +tslib_1.__exportStar(__nccwpck_require__(44103), exports); +tslib_1.__exportStar(__nccwpck_require__(61298), exports); +tslib_1.__exportStar(__nccwpck_require__(8066), exports); +tslib_1.__exportStar(__nccwpck_require__(47546), exports); +tslib_1.__exportStar(__nccwpck_require__(13116), exports); +tslib_1.__exportStar(__nccwpck_require__(93194), exports); +tslib_1.__exportStar(__nccwpck_require__(45344), exports); +tslib_1.__exportStar(__nccwpck_require__(34181), exports); +tslib_1.__exportStar(__nccwpck_require__(17637), exports); +tslib_1.__exportStar(__nccwpck_require__(79222), exports); +tslib_1.__exportStar(__nccwpck_require__(42116), exports); +tslib_1.__exportStar(__nccwpck_require__(77311), exports); +tslib_1.__exportStar(__nccwpck_require__(70670), exports); +tslib_1.__exportStar(__nccwpck_require__(94287), exports); +tslib_1.__exportStar(__nccwpck_require__(16919), exports); +tslib_1.__exportStar(__nccwpck_require__(25918), exports); +tslib_1.__exportStar(__nccwpck_require__(11850), exports); +tslib_1.__exportStar(__nccwpck_require__(14865), exports); +tslib_1.__exportStar(__nccwpck_require__(44523), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 44523: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(37706); +tslib_1.__exportStar(__nccwpck_require__(38771), exports); +tslib_1.__exportStar(__nccwpck_require__(1086), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 38771: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdminDeleteUserAttributesResponse = exports.AdminDeleteUserAttributesRequest = exports.AdminDeleteUserRequest = exports.AdminCreateUserConfigType = exports.MessageTemplateType = exports.UsernameExistsException = exports.UnsupportedUserStateException = exports.PreconditionNotMetException = exports.InvalidSmsRoleTrustRelationshipException = exports.InvalidSmsRoleAccessPolicyException = exports.InvalidPasswordException = exports.CodeDeliveryFailureException = exports.AdminCreateUserResponse = exports.UserType = exports.UserStatusType = exports.MFAOptionType = exports.AdminCreateUserRequest = exports.AttributeType = exports.MessageActionType = exports.DeliveryMediumType = exports.UserLambdaValidationException = exports.UnexpectedLambdaException = exports.TooManyFailedAttemptsException = exports.LimitExceededException = exports.InvalidLambdaResponseException = exports.AdminConfirmSignUpResponse = exports.AdminConfirmSignUpRequest = exports.UserNotFoundException = exports.AdminAddUserToGroupRequest = exports.UserImportInProgressException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.NotAuthorizedException = exports.InvalidParameterException = exports.InternalErrorException = exports.AddCustomAttributesResponse = exports.AddCustomAttributesRequest = exports.SchemaAttributeType = exports.StringAttributeConstraintsType = exports.NumberAttributeConstraintsType = exports.AttributeDataType = exports.AccountTakeoverRiskConfigurationType = exports.NotifyConfigurationType = exports.NotifyEmailType = exports.AccountTakeoverActionsType = exports.AccountTakeoverActionType = exports.AccountTakeoverEventActionType = exports.AccountRecoverySettingType = exports.RecoveryOptionType = exports.RecoveryOptionNameType = void 0; +exports.AdminRemoveUserFromGroupRequest = exports.UserPoolAddOnNotEnabledException = exports.AdminListUserAuthEventsResponse = exports.AuthEventType = exports.EventType = exports.EventRiskType = exports.RiskLevelType = exports.RiskDecisionType = exports.EventResponseType = exports.EventFeedbackType = exports.FeedbackValueType = exports.EventContextDataType = exports.ChallengeResponseType = exports.ChallengeResponse = exports.ChallengeName = exports.AdminListUserAuthEventsRequest = exports.AdminListGroupsForUserResponse = exports.GroupType = exports.AdminListGroupsForUserRequest = exports.AdminListDevicesResponse = exports.AdminListDevicesRequest = exports.AdminLinkProviderForUserResponse = exports.AdminLinkProviderForUserRequest = exports.UserNotConfirmedException = exports.PasswordResetRequiredException = exports.MFAMethodNotFoundException = exports.AdminInitiateAuthResponse = exports.ChallengeNameType = exports.AuthenticationResultType = exports.NewDeviceMetadataType = exports.AdminInitiateAuthRequest = exports.ContextDataType = exports.HttpHeader = exports.AuthFlowType = exports.AnalyticsMetadataType = exports.AdminGetUserResponse = exports.AdminGetUserRequest = exports.AdminGetDeviceResponse = exports.DeviceType = exports.AdminGetDeviceRequest = exports.InvalidUserPoolConfigurationException = exports.AdminForgetDeviceRequest = exports.AdminEnableUserResponse = exports.AdminEnableUserRequest = exports.AdminDisableUserResponse = exports.AdminDisableUserRequest = exports.AliasExistsException = exports.AdminDisableProviderForUserResponse = exports.AdminDisableProviderForUserRequest = exports.ProviderUserIdentifierType = void 0; +exports.ResourceServerScopeType = exports.DuplicateProviderException = exports.CreateIdentityProviderResponse = exports.IdentityProviderType = exports.CreateIdentityProviderRequest = exports.IdentityProviderTypeType = exports.GroupExistsException = exports.CreateGroupResponse = exports.CreateGroupRequest = exports.ConfirmSignUpResponse = exports.ConfirmSignUpRequest = exports.ConfirmForgotPasswordResponse = exports.ConfirmForgotPasswordRequest = exports.UserContextDataType = exports.ConfirmDeviceResponse = exports.ConfirmDeviceRequest = exports.DeviceSecretVerifierConfigType = exports.ChangePasswordResponse = exports.ChangePasswordRequest = exports.ConcurrentModificationException = exports.AssociateSoftwareTokenResponse = exports.AssociateSoftwareTokenRequest = exports.AnalyticsConfigurationType = exports.AliasAttributeType = exports.AdvancedSecurityModeType = exports.AdminUserGlobalSignOutResponse = exports.AdminUserGlobalSignOutRequest = exports.AdminUpdateUserAttributesResponse = exports.AdminUpdateUserAttributesRequest = exports.AdminUpdateDeviceStatusResponse = exports.AdminUpdateDeviceStatusRequest = exports.DeviceRememberedStatusType = exports.AdminUpdateAuthEventFeedbackResponse = exports.AdminUpdateAuthEventFeedbackRequest = exports.AdminSetUserSettingsResponse = exports.AdminSetUserSettingsRequest = exports.AdminSetUserPasswordResponse = exports.AdminSetUserPasswordRequest = exports.AdminSetUserMFAPreferenceResponse = exports.AdminSetUserMFAPreferenceRequest = exports.SoftwareTokenMfaSettingsType = exports.SMSMfaSettingsType = exports.SoftwareTokenMFANotFoundException = exports.ExpiredCodeException = exports.CodeMismatchException = exports.AdminRespondToAuthChallengeResponse = exports.AdminRespondToAuthChallengeRequest = exports.InvalidEmailRoleAccessPolicyException = exports.AdminResetUserPasswordResponse = exports.AdminResetUserPasswordRequest = void 0; +exports.DeleteUserAttributesResponse = exports.DeleteUserAttributesRequest = exports.DeleteUserRequest = exports.DeleteResourceServerRequest = exports.UnsupportedIdentityProviderException = exports.DeleteIdentityProviderRequest = exports.DeleteGroupRequest = exports.CreateUserPoolDomainResponse = exports.CreateUserPoolDomainRequest = exports.CustomDomainConfigType = exports.ScopeDoesNotExistException = exports.InvalidOAuthFlowException = exports.CreateUserPoolClientResponse = exports.UserPoolClientType = exports.CreateUserPoolClientRequest = exports.TokenValidityUnitsType = exports.TimeUnitsType = exports.PreventUserExistenceErrorTypes = exports.ExplicitAuthFlowsType = exports.OAuthFlowType = exports.UserPoolTaggingException = exports.CreateUserPoolResponse = exports.UserPoolType = exports.StatusType = exports.CreateUserPoolRequest = exports.VerificationMessageTemplateType = exports.DefaultEmailOptionType = exports.UserPoolAddOnsType = exports.UsernameConfigurationType = exports.UsernameAttributeType = exports.SmsConfigurationType = exports.UserPoolPolicyType = exports.PasswordPolicyType = exports.UserPoolMfaType = exports.LambdaConfigType = exports.CustomSMSLambdaVersionConfigType = exports.CustomSMSSenderLambdaVersionType = exports.CustomEmailLambdaVersionConfigType = exports.CustomEmailSenderLambdaVersionType = exports.EmailConfigurationType = exports.EmailSendingAccountType = exports.DeviceConfigurationType = exports.VerifiedAttributeType = exports.CreateUserImportJobResponse = exports.UserImportJobType = exports.UserImportJobStatusType = exports.CreateUserImportJobRequest = exports.CreateResourceServerResponse = exports.ResourceServerType = exports.CreateResourceServerRequest = void 0; +exports.SoftwareTokenMfaConfigType = exports.SmsMfaConfigType = exports.GetUserPoolMfaConfigRequest = exports.GetUserAttributeVerificationCodeResponse = exports.GetUserAttributeVerificationCodeRequest = exports.GetUserResponse = exports.GetUserRequest = exports.GetUICustomizationResponse = exports.UICustomizationType = exports.GetUICustomizationRequest = exports.GetSigningCertificateResponse = exports.GetSigningCertificateRequest = exports.GetIdentityProviderByIdentifierResponse = exports.GetIdentityProviderByIdentifierRequest = exports.GetGroupResponse = exports.GetGroupRequest = exports.GetDeviceResponse = exports.GetDeviceRequest = exports.GetCSVHeaderResponse = exports.GetCSVHeaderRequest = exports.ForgotPasswordResponse = exports.CodeDeliveryDetailsType = exports.ForgotPasswordRequest = exports.ForgetDeviceRequest = exports.DescribeUserPoolDomainResponse = exports.DomainDescriptionType = exports.DomainStatusType = exports.DescribeUserPoolDomainRequest = exports.DescribeUserPoolClientResponse = exports.DescribeUserPoolClientRequest = exports.DescribeUserPoolResponse = exports.DescribeUserPoolRequest = exports.DescribeUserImportJobResponse = exports.DescribeUserImportJobRequest = exports.DescribeRiskConfigurationResponse = exports.RiskConfigurationType = exports.RiskExceptionConfigurationType = exports.CompromisedCredentialsRiskConfigurationType = exports.EventFilterType = exports.CompromisedCredentialsActionsType = exports.CompromisedCredentialsEventActionType = exports.DescribeRiskConfigurationRequest = exports.DescribeResourceServerResponse = exports.DescribeResourceServerRequest = exports.DescribeIdentityProviderResponse = exports.DescribeIdentityProviderRequest = exports.DeleteUserPoolDomainResponse = exports.DeleteUserPoolDomainRequest = exports.DeleteUserPoolClientRequest = exports.DeleteUserPoolRequest = void 0; +exports.TagResourceResponse = exports.TagResourceRequest = exports.StopUserImportJobResponse = exports.StopUserImportJobRequest = exports.StartUserImportJobResponse = exports.StartUserImportJobRequest = exports.SignUpResponse = exports.SignUpRequest = exports.SetUserSettingsResponse = exports.SetUserSettingsRequest = exports.SetUserPoolMfaConfigResponse = exports.SetUserPoolMfaConfigRequest = exports.SetUserMFAPreferenceResponse = exports.SetUserMFAPreferenceRequest = exports.SetUICustomizationResponse = exports.SetUICustomizationRequest = exports.SetRiskConfigurationResponse = exports.SetRiskConfigurationRequest = exports.RespondToAuthChallengeResponse = exports.RespondToAuthChallengeRequest = exports.ResendConfirmationCodeResponse = exports.ResendConfirmationCodeRequest = exports.ListUsersInGroupResponse = exports.ListUsersInGroupRequest = exports.ListUsersResponse = exports.ListUsersRequest = exports.ListUserPoolsResponse = exports.UserPoolDescriptionType = exports.ListUserPoolsRequest = exports.ListUserPoolClientsResponse = exports.UserPoolClientDescription = exports.ListUserPoolClientsRequest = exports.ListUserImportJobsResponse = exports.ListUserImportJobsRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListResourceServersResponse = exports.ListResourceServersRequest = exports.ListIdentityProvidersResponse = exports.ProviderDescription = exports.ListIdentityProvidersRequest = exports.ListGroupsResponse = exports.ListGroupsRequest = exports.ListDevicesResponse = exports.ListDevicesRequest = exports.InitiateAuthResponse = exports.InitiateAuthRequest = exports.GlobalSignOutResponse = exports.GlobalSignOutRequest = exports.GetUserPoolMfaConfigResponse = void 0; +const smithy_client_1 = __nccwpck_require__(84060); +var RecoveryOptionNameType; +(function (RecoveryOptionNameType) { + RecoveryOptionNameType["ADMIN_ONLY"] = "admin_only"; + RecoveryOptionNameType["VERIFIED_EMAIL"] = "verified_email"; + RecoveryOptionNameType["VERIFIED_PHONE_NUMBER"] = "verified_phone_number"; +})(RecoveryOptionNameType = exports.RecoveryOptionNameType || (exports.RecoveryOptionNameType = {})); +var RecoveryOptionType; +(function (RecoveryOptionType) { + RecoveryOptionType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RecoveryOptionType = exports.RecoveryOptionType || (exports.RecoveryOptionType = {})); +var AccountRecoverySettingType; +(function (AccountRecoverySettingType) { + AccountRecoverySettingType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AccountRecoverySettingType = exports.AccountRecoverySettingType || (exports.AccountRecoverySettingType = {})); +var AccountTakeoverEventActionType; +(function (AccountTakeoverEventActionType) { + AccountTakeoverEventActionType["BLOCK"] = "BLOCK"; + AccountTakeoverEventActionType["MFA_IF_CONFIGURED"] = "MFA_IF_CONFIGURED"; + AccountTakeoverEventActionType["MFA_REQUIRED"] = "MFA_REQUIRED"; + AccountTakeoverEventActionType["NO_ACTION"] = "NO_ACTION"; +})(AccountTakeoverEventActionType = exports.AccountTakeoverEventActionType || (exports.AccountTakeoverEventActionType = {})); +var AccountTakeoverActionType; +(function (AccountTakeoverActionType) { + AccountTakeoverActionType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AccountTakeoverActionType = exports.AccountTakeoverActionType || (exports.AccountTakeoverActionType = {})); +var AccountTakeoverActionsType; +(function (AccountTakeoverActionsType) { + AccountTakeoverActionsType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AccountTakeoverActionsType = exports.AccountTakeoverActionsType || (exports.AccountTakeoverActionsType = {})); +var NotifyEmailType; +(function (NotifyEmailType) { + NotifyEmailType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(NotifyEmailType = exports.NotifyEmailType || (exports.NotifyEmailType = {})); +var NotifyConfigurationType; +(function (NotifyConfigurationType) { + NotifyConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(NotifyConfigurationType = exports.NotifyConfigurationType || (exports.NotifyConfigurationType = {})); +var AccountTakeoverRiskConfigurationType; +(function (AccountTakeoverRiskConfigurationType) { + AccountTakeoverRiskConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AccountTakeoverRiskConfigurationType = exports.AccountTakeoverRiskConfigurationType || (exports.AccountTakeoverRiskConfigurationType = {})); +var AttributeDataType; +(function (AttributeDataType) { + AttributeDataType["BOOLEAN"] = "Boolean"; + AttributeDataType["DATETIME"] = "DateTime"; + AttributeDataType["NUMBER"] = "Number"; + AttributeDataType["STRING"] = "String"; +})(AttributeDataType = exports.AttributeDataType || (exports.AttributeDataType = {})); +var NumberAttributeConstraintsType; +(function (NumberAttributeConstraintsType) { + NumberAttributeConstraintsType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(NumberAttributeConstraintsType = exports.NumberAttributeConstraintsType || (exports.NumberAttributeConstraintsType = {})); +var StringAttributeConstraintsType; +(function (StringAttributeConstraintsType) { + StringAttributeConstraintsType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StringAttributeConstraintsType = exports.StringAttributeConstraintsType || (exports.StringAttributeConstraintsType = {})); +var SchemaAttributeType; +(function (SchemaAttributeType) { + SchemaAttributeType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SchemaAttributeType = exports.SchemaAttributeType || (exports.SchemaAttributeType = {})); +var AddCustomAttributesRequest; +(function (AddCustomAttributesRequest) { + AddCustomAttributesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AddCustomAttributesRequest = exports.AddCustomAttributesRequest || (exports.AddCustomAttributesRequest = {})); +var AddCustomAttributesResponse; +(function (AddCustomAttributesResponse) { + AddCustomAttributesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AddCustomAttributesResponse = exports.AddCustomAttributesResponse || (exports.AddCustomAttributesResponse = {})); +var InternalErrorException; +(function (InternalErrorException) { + InternalErrorException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InternalErrorException = exports.InternalErrorException || (exports.InternalErrorException = {})); +var InvalidParameterException; +(function (InvalidParameterException) { + InvalidParameterException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidParameterException = exports.InvalidParameterException || (exports.InvalidParameterException = {})); +var NotAuthorizedException; +(function (NotAuthorizedException) { + NotAuthorizedException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(NotAuthorizedException = exports.NotAuthorizedException || (exports.NotAuthorizedException = {})); +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 UserImportInProgressException; +(function (UserImportInProgressException) { + UserImportInProgressException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserImportInProgressException = exports.UserImportInProgressException || (exports.UserImportInProgressException = {})); +var AdminAddUserToGroupRequest; +(function (AdminAddUserToGroupRequest) { + AdminAddUserToGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminAddUserToGroupRequest = exports.AdminAddUserToGroupRequest || (exports.AdminAddUserToGroupRequest = {})); +var UserNotFoundException; +(function (UserNotFoundException) { + UserNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserNotFoundException = exports.UserNotFoundException || (exports.UserNotFoundException = {})); +var AdminConfirmSignUpRequest; +(function (AdminConfirmSignUpRequest) { + AdminConfirmSignUpRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminConfirmSignUpRequest = exports.AdminConfirmSignUpRequest || (exports.AdminConfirmSignUpRequest = {})); +var AdminConfirmSignUpResponse; +(function (AdminConfirmSignUpResponse) { + AdminConfirmSignUpResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminConfirmSignUpResponse = exports.AdminConfirmSignUpResponse || (exports.AdminConfirmSignUpResponse = {})); +var InvalidLambdaResponseException; +(function (InvalidLambdaResponseException) { + InvalidLambdaResponseException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidLambdaResponseException = exports.InvalidLambdaResponseException || (exports.InvalidLambdaResponseException = {})); +var LimitExceededException; +(function (LimitExceededException) { + LimitExceededException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {})); +var TooManyFailedAttemptsException; +(function (TooManyFailedAttemptsException) { + TooManyFailedAttemptsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TooManyFailedAttemptsException = exports.TooManyFailedAttemptsException || (exports.TooManyFailedAttemptsException = {})); +var UnexpectedLambdaException; +(function (UnexpectedLambdaException) { + UnexpectedLambdaException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnexpectedLambdaException = exports.UnexpectedLambdaException || (exports.UnexpectedLambdaException = {})); +var UserLambdaValidationException; +(function (UserLambdaValidationException) { + UserLambdaValidationException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserLambdaValidationException = exports.UserLambdaValidationException || (exports.UserLambdaValidationException = {})); +var DeliveryMediumType; +(function (DeliveryMediumType) { + DeliveryMediumType["EMAIL"] = "EMAIL"; + DeliveryMediumType["SMS"] = "SMS"; +})(DeliveryMediumType = exports.DeliveryMediumType || (exports.DeliveryMediumType = {})); +var MessageActionType; +(function (MessageActionType) { + MessageActionType["RESEND"] = "RESEND"; + MessageActionType["SUPPRESS"] = "SUPPRESS"; +})(MessageActionType = exports.MessageActionType || (exports.MessageActionType = {})); +var AttributeType; +(function (AttributeType) { + AttributeType.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Value && { Value: smithy_client_1.SENSITIVE_STRING }), + }); +})(AttributeType = exports.AttributeType || (exports.AttributeType = {})); +var AdminCreateUserRequest; +(function (AdminCreateUserRequest) { + AdminCreateUserRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + ...(obj.UserAttributes && { + UserAttributes: obj.UserAttributes.map((item) => AttributeType.filterSensitiveLog(item)), + }), + ...(obj.ValidationData && { + ValidationData: obj.ValidationData.map((item) => AttributeType.filterSensitiveLog(item)), + }), + ...(obj.TemporaryPassword && { TemporaryPassword: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminCreateUserRequest = exports.AdminCreateUserRequest || (exports.AdminCreateUserRequest = {})); +var MFAOptionType; +(function (MFAOptionType) { + MFAOptionType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MFAOptionType = exports.MFAOptionType || (exports.MFAOptionType = {})); +var UserStatusType; +(function (UserStatusType) { + UserStatusType["ARCHIVED"] = "ARCHIVED"; + UserStatusType["COMPROMISED"] = "COMPROMISED"; + UserStatusType["CONFIRMED"] = "CONFIRMED"; + UserStatusType["FORCE_CHANGE_PASSWORD"] = "FORCE_CHANGE_PASSWORD"; + UserStatusType["RESET_REQUIRED"] = "RESET_REQUIRED"; + UserStatusType["UNCONFIRMED"] = "UNCONFIRMED"; + UserStatusType["UNKNOWN"] = "UNKNOWN"; +})(UserStatusType = exports.UserStatusType || (exports.UserStatusType = {})); +var UserType; +(function (UserType) { + UserType.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + ...(obj.Attributes && { Attributes: obj.Attributes.map((item) => AttributeType.filterSensitiveLog(item)) }), + }); +})(UserType = exports.UserType || (exports.UserType = {})); +var AdminCreateUserResponse; +(function (AdminCreateUserResponse) { + AdminCreateUserResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.User && { User: UserType.filterSensitiveLog(obj.User) }), + }); +})(AdminCreateUserResponse = exports.AdminCreateUserResponse || (exports.AdminCreateUserResponse = {})); +var CodeDeliveryFailureException; +(function (CodeDeliveryFailureException) { + CodeDeliveryFailureException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CodeDeliveryFailureException = exports.CodeDeliveryFailureException || (exports.CodeDeliveryFailureException = {})); +var InvalidPasswordException; +(function (InvalidPasswordException) { + InvalidPasswordException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidPasswordException = exports.InvalidPasswordException || (exports.InvalidPasswordException = {})); +var InvalidSmsRoleAccessPolicyException; +(function (InvalidSmsRoleAccessPolicyException) { + InvalidSmsRoleAccessPolicyException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidSmsRoleAccessPolicyException = exports.InvalidSmsRoleAccessPolicyException || (exports.InvalidSmsRoleAccessPolicyException = {})); +var InvalidSmsRoleTrustRelationshipException; +(function (InvalidSmsRoleTrustRelationshipException) { + InvalidSmsRoleTrustRelationshipException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidSmsRoleTrustRelationshipException = exports.InvalidSmsRoleTrustRelationshipException || (exports.InvalidSmsRoleTrustRelationshipException = {})); +var PreconditionNotMetException; +(function (PreconditionNotMetException) { + PreconditionNotMetException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PreconditionNotMetException = exports.PreconditionNotMetException || (exports.PreconditionNotMetException = {})); +var UnsupportedUserStateException; +(function (UnsupportedUserStateException) { + UnsupportedUserStateException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnsupportedUserStateException = exports.UnsupportedUserStateException || (exports.UnsupportedUserStateException = {})); +var UsernameExistsException; +(function (UsernameExistsException) { + UsernameExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UsernameExistsException = exports.UsernameExistsException || (exports.UsernameExistsException = {})); +var MessageTemplateType; +(function (MessageTemplateType) { + MessageTemplateType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MessageTemplateType = exports.MessageTemplateType || (exports.MessageTemplateType = {})); +var AdminCreateUserConfigType; +(function (AdminCreateUserConfigType) { + AdminCreateUserConfigType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminCreateUserConfigType = exports.AdminCreateUserConfigType || (exports.AdminCreateUserConfigType = {})); +var AdminDeleteUserRequest; +(function (AdminDeleteUserRequest) { + AdminDeleteUserRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminDeleteUserRequest = exports.AdminDeleteUserRequest || (exports.AdminDeleteUserRequest = {})); +var AdminDeleteUserAttributesRequest; +(function (AdminDeleteUserAttributesRequest) { + AdminDeleteUserAttributesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminDeleteUserAttributesRequest = exports.AdminDeleteUserAttributesRequest || (exports.AdminDeleteUserAttributesRequest = {})); +var AdminDeleteUserAttributesResponse; +(function (AdminDeleteUserAttributesResponse) { + AdminDeleteUserAttributesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminDeleteUserAttributesResponse = exports.AdminDeleteUserAttributesResponse || (exports.AdminDeleteUserAttributesResponse = {})); +var ProviderUserIdentifierType; +(function (ProviderUserIdentifierType) { + ProviderUserIdentifierType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ProviderUserIdentifierType = exports.ProviderUserIdentifierType || (exports.ProviderUserIdentifierType = {})); +var AdminDisableProviderForUserRequest; +(function (AdminDisableProviderForUserRequest) { + AdminDisableProviderForUserRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminDisableProviderForUserRequest = exports.AdminDisableProviderForUserRequest || (exports.AdminDisableProviderForUserRequest = {})); +var AdminDisableProviderForUserResponse; +(function (AdminDisableProviderForUserResponse) { + AdminDisableProviderForUserResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminDisableProviderForUserResponse = exports.AdminDisableProviderForUserResponse || (exports.AdminDisableProviderForUserResponse = {})); +var AliasExistsException; +(function (AliasExistsException) { + AliasExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AliasExistsException = exports.AliasExistsException || (exports.AliasExistsException = {})); +var AdminDisableUserRequest; +(function (AdminDisableUserRequest) { + AdminDisableUserRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminDisableUserRequest = exports.AdminDisableUserRequest || (exports.AdminDisableUserRequest = {})); +var AdminDisableUserResponse; +(function (AdminDisableUserResponse) { + AdminDisableUserResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminDisableUserResponse = exports.AdminDisableUserResponse || (exports.AdminDisableUserResponse = {})); +var AdminEnableUserRequest; +(function (AdminEnableUserRequest) { + AdminEnableUserRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminEnableUserRequest = exports.AdminEnableUserRequest || (exports.AdminEnableUserRequest = {})); +var AdminEnableUserResponse; +(function (AdminEnableUserResponse) { + AdminEnableUserResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminEnableUserResponse = exports.AdminEnableUserResponse || (exports.AdminEnableUserResponse = {})); +var AdminForgetDeviceRequest; +(function (AdminForgetDeviceRequest) { + AdminForgetDeviceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminForgetDeviceRequest = exports.AdminForgetDeviceRequest || (exports.AdminForgetDeviceRequest = {})); +var InvalidUserPoolConfigurationException; +(function (InvalidUserPoolConfigurationException) { + InvalidUserPoolConfigurationException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidUserPoolConfigurationException = exports.InvalidUserPoolConfigurationException || (exports.InvalidUserPoolConfigurationException = {})); +var AdminGetDeviceRequest; +(function (AdminGetDeviceRequest) { + AdminGetDeviceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminGetDeviceRequest = exports.AdminGetDeviceRequest || (exports.AdminGetDeviceRequest = {})); +var DeviceType; +(function (DeviceType) { + DeviceType.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.DeviceAttributes && { + DeviceAttributes: obj.DeviceAttributes.map((item) => AttributeType.filterSensitiveLog(item)), + }), + }); +})(DeviceType = exports.DeviceType || (exports.DeviceType = {})); +var AdminGetDeviceResponse; +(function (AdminGetDeviceResponse) { + AdminGetDeviceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Device && { Device: DeviceType.filterSensitiveLog(obj.Device) }), + }); +})(AdminGetDeviceResponse = exports.AdminGetDeviceResponse || (exports.AdminGetDeviceResponse = {})); +var AdminGetUserRequest; +(function (AdminGetUserRequest) { + AdminGetUserRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminGetUserRequest = exports.AdminGetUserRequest || (exports.AdminGetUserRequest = {})); +var AdminGetUserResponse; +(function (AdminGetUserResponse) { + AdminGetUserResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + ...(obj.UserAttributes && { + UserAttributes: obj.UserAttributes.map((item) => AttributeType.filterSensitiveLog(item)), + }), + }); +})(AdminGetUserResponse = exports.AdminGetUserResponse || (exports.AdminGetUserResponse = {})); +var AnalyticsMetadataType; +(function (AnalyticsMetadataType) { + AnalyticsMetadataType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AnalyticsMetadataType = exports.AnalyticsMetadataType || (exports.AnalyticsMetadataType = {})); +var AuthFlowType; +(function (AuthFlowType) { + AuthFlowType["ADMIN_NO_SRP_AUTH"] = "ADMIN_NO_SRP_AUTH"; + AuthFlowType["ADMIN_USER_PASSWORD_AUTH"] = "ADMIN_USER_PASSWORD_AUTH"; + AuthFlowType["CUSTOM_AUTH"] = "CUSTOM_AUTH"; + AuthFlowType["REFRESH_TOKEN"] = "REFRESH_TOKEN"; + AuthFlowType["REFRESH_TOKEN_AUTH"] = "REFRESH_TOKEN_AUTH"; + AuthFlowType["USER_PASSWORD_AUTH"] = "USER_PASSWORD_AUTH"; + AuthFlowType["USER_SRP_AUTH"] = "USER_SRP_AUTH"; +})(AuthFlowType = exports.AuthFlowType || (exports.AuthFlowType = {})); +var HttpHeader; +(function (HttpHeader) { + HttpHeader.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(HttpHeader = exports.HttpHeader || (exports.HttpHeader = {})); +var ContextDataType; +(function (ContextDataType) { + ContextDataType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ContextDataType = exports.ContextDataType || (exports.ContextDataType = {})); +var AdminInitiateAuthRequest; +(function (AdminInitiateAuthRequest) { + AdminInitiateAuthRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + ...(obj.AuthParameters && { AuthParameters: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminInitiateAuthRequest = exports.AdminInitiateAuthRequest || (exports.AdminInitiateAuthRequest = {})); +var NewDeviceMetadataType; +(function (NewDeviceMetadataType) { + NewDeviceMetadataType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(NewDeviceMetadataType = exports.NewDeviceMetadataType || (exports.NewDeviceMetadataType = {})); +var AuthenticationResultType; +(function (AuthenticationResultType) { + AuthenticationResultType.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + ...(obj.RefreshToken && { RefreshToken: smithy_client_1.SENSITIVE_STRING }), + ...(obj.IdToken && { IdToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(AuthenticationResultType = exports.AuthenticationResultType || (exports.AuthenticationResultType = {})); +var ChallengeNameType; +(function (ChallengeNameType) { + ChallengeNameType["ADMIN_NO_SRP_AUTH"] = "ADMIN_NO_SRP_AUTH"; + ChallengeNameType["CUSTOM_CHALLENGE"] = "CUSTOM_CHALLENGE"; + ChallengeNameType["DEVICE_PASSWORD_VERIFIER"] = "DEVICE_PASSWORD_VERIFIER"; + ChallengeNameType["DEVICE_SRP_AUTH"] = "DEVICE_SRP_AUTH"; + ChallengeNameType["MFA_SETUP"] = "MFA_SETUP"; + ChallengeNameType["NEW_PASSWORD_REQUIRED"] = "NEW_PASSWORD_REQUIRED"; + ChallengeNameType["PASSWORD_VERIFIER"] = "PASSWORD_VERIFIER"; + ChallengeNameType["SELECT_MFA_TYPE"] = "SELECT_MFA_TYPE"; + ChallengeNameType["SMS_MFA"] = "SMS_MFA"; + ChallengeNameType["SOFTWARE_TOKEN_MFA"] = "SOFTWARE_TOKEN_MFA"; +})(ChallengeNameType = exports.ChallengeNameType || (exports.ChallengeNameType = {})); +var AdminInitiateAuthResponse; +(function (AdminInitiateAuthResponse) { + AdminInitiateAuthResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AuthenticationResult && { + AuthenticationResult: AuthenticationResultType.filterSensitiveLog(obj.AuthenticationResult), + }), + }); +})(AdminInitiateAuthResponse = exports.AdminInitiateAuthResponse || (exports.AdminInitiateAuthResponse = {})); +var MFAMethodNotFoundException; +(function (MFAMethodNotFoundException) { + MFAMethodNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MFAMethodNotFoundException = exports.MFAMethodNotFoundException || (exports.MFAMethodNotFoundException = {})); +var PasswordResetRequiredException; +(function (PasswordResetRequiredException) { + PasswordResetRequiredException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PasswordResetRequiredException = exports.PasswordResetRequiredException || (exports.PasswordResetRequiredException = {})); +var UserNotConfirmedException; +(function (UserNotConfirmedException) { + UserNotConfirmedException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserNotConfirmedException = exports.UserNotConfirmedException || (exports.UserNotConfirmedException = {})); +var AdminLinkProviderForUserRequest; +(function (AdminLinkProviderForUserRequest) { + AdminLinkProviderForUserRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminLinkProviderForUserRequest = exports.AdminLinkProviderForUserRequest || (exports.AdminLinkProviderForUserRequest = {})); +var AdminLinkProviderForUserResponse; +(function (AdminLinkProviderForUserResponse) { + AdminLinkProviderForUserResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminLinkProviderForUserResponse = exports.AdminLinkProviderForUserResponse || (exports.AdminLinkProviderForUserResponse = {})); +var AdminListDevicesRequest; +(function (AdminListDevicesRequest) { + AdminListDevicesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminListDevicesRequest = exports.AdminListDevicesRequest || (exports.AdminListDevicesRequest = {})); +var AdminListDevicesResponse; +(function (AdminListDevicesResponse) { + AdminListDevicesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminListDevicesResponse = exports.AdminListDevicesResponse || (exports.AdminListDevicesResponse = {})); +var AdminListGroupsForUserRequest; +(function (AdminListGroupsForUserRequest) { + AdminListGroupsForUserRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminListGroupsForUserRequest = exports.AdminListGroupsForUserRequest || (exports.AdminListGroupsForUserRequest = {})); +var GroupType; +(function (GroupType) { + GroupType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GroupType = exports.GroupType || (exports.GroupType = {})); +var AdminListGroupsForUserResponse; +(function (AdminListGroupsForUserResponse) { + AdminListGroupsForUserResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminListGroupsForUserResponse = exports.AdminListGroupsForUserResponse || (exports.AdminListGroupsForUserResponse = {})); +var AdminListUserAuthEventsRequest; +(function (AdminListUserAuthEventsRequest) { + AdminListUserAuthEventsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminListUserAuthEventsRequest = exports.AdminListUserAuthEventsRequest || (exports.AdminListUserAuthEventsRequest = {})); +var ChallengeName; +(function (ChallengeName) { + ChallengeName["Mfa"] = "Mfa"; + ChallengeName["Password"] = "Password"; +})(ChallengeName = exports.ChallengeName || (exports.ChallengeName = {})); +var ChallengeResponse; +(function (ChallengeResponse) { + ChallengeResponse["Failure"] = "Failure"; + ChallengeResponse["Success"] = "Success"; +})(ChallengeResponse = exports.ChallengeResponse || (exports.ChallengeResponse = {})); +var ChallengeResponseType; +(function (ChallengeResponseType) { + ChallengeResponseType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ChallengeResponseType = exports.ChallengeResponseType || (exports.ChallengeResponseType = {})); +var EventContextDataType; +(function (EventContextDataType) { + EventContextDataType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EventContextDataType = exports.EventContextDataType || (exports.EventContextDataType = {})); +var FeedbackValueType; +(function (FeedbackValueType) { + FeedbackValueType["INVALID"] = "Invalid"; + FeedbackValueType["VALID"] = "Valid"; +})(FeedbackValueType = exports.FeedbackValueType || (exports.FeedbackValueType = {})); +var EventFeedbackType; +(function (EventFeedbackType) { + EventFeedbackType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EventFeedbackType = exports.EventFeedbackType || (exports.EventFeedbackType = {})); +var EventResponseType; +(function (EventResponseType) { + EventResponseType["Failure"] = "Failure"; + EventResponseType["Success"] = "Success"; +})(EventResponseType = exports.EventResponseType || (exports.EventResponseType = {})); +var RiskDecisionType; +(function (RiskDecisionType) { + RiskDecisionType["AccountTakeover"] = "AccountTakeover"; + RiskDecisionType["Block"] = "Block"; + RiskDecisionType["NoRisk"] = "NoRisk"; +})(RiskDecisionType = exports.RiskDecisionType || (exports.RiskDecisionType = {})); +var RiskLevelType; +(function (RiskLevelType) { + RiskLevelType["High"] = "High"; + RiskLevelType["Low"] = "Low"; + RiskLevelType["Medium"] = "Medium"; +})(RiskLevelType = exports.RiskLevelType || (exports.RiskLevelType = {})); +var EventRiskType; +(function (EventRiskType) { + EventRiskType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EventRiskType = exports.EventRiskType || (exports.EventRiskType = {})); +var EventType; +(function (EventType) { + EventType["ForgotPassword"] = "ForgotPassword"; + EventType["SignIn"] = "SignIn"; + EventType["SignUp"] = "SignUp"; +})(EventType = exports.EventType || (exports.EventType = {})); +var AuthEventType; +(function (AuthEventType) { + AuthEventType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuthEventType = exports.AuthEventType || (exports.AuthEventType = {})); +var AdminListUserAuthEventsResponse; +(function (AdminListUserAuthEventsResponse) { + AdminListUserAuthEventsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminListUserAuthEventsResponse = exports.AdminListUserAuthEventsResponse || (exports.AdminListUserAuthEventsResponse = {})); +var UserPoolAddOnNotEnabledException; +(function (UserPoolAddOnNotEnabledException) { + UserPoolAddOnNotEnabledException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserPoolAddOnNotEnabledException = exports.UserPoolAddOnNotEnabledException || (exports.UserPoolAddOnNotEnabledException = {})); +var AdminRemoveUserFromGroupRequest; +(function (AdminRemoveUserFromGroupRequest) { + AdminRemoveUserFromGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminRemoveUserFromGroupRequest = exports.AdminRemoveUserFromGroupRequest || (exports.AdminRemoveUserFromGroupRequest = {})); +var AdminResetUserPasswordRequest; +(function (AdminResetUserPasswordRequest) { + AdminResetUserPasswordRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminResetUserPasswordRequest = exports.AdminResetUserPasswordRequest || (exports.AdminResetUserPasswordRequest = {})); +var AdminResetUserPasswordResponse; +(function (AdminResetUserPasswordResponse) { + AdminResetUserPasswordResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminResetUserPasswordResponse = exports.AdminResetUserPasswordResponse || (exports.AdminResetUserPasswordResponse = {})); +var InvalidEmailRoleAccessPolicyException; +(function (InvalidEmailRoleAccessPolicyException) { + InvalidEmailRoleAccessPolicyException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidEmailRoleAccessPolicyException = exports.InvalidEmailRoleAccessPolicyException || (exports.InvalidEmailRoleAccessPolicyException = {})); +var AdminRespondToAuthChallengeRequest; +(function (AdminRespondToAuthChallengeRequest) { + AdminRespondToAuthChallengeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminRespondToAuthChallengeRequest = exports.AdminRespondToAuthChallengeRequest || (exports.AdminRespondToAuthChallengeRequest = {})); +var AdminRespondToAuthChallengeResponse; +(function (AdminRespondToAuthChallengeResponse) { + AdminRespondToAuthChallengeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AuthenticationResult && { + AuthenticationResult: AuthenticationResultType.filterSensitiveLog(obj.AuthenticationResult), + }), + }); +})(AdminRespondToAuthChallengeResponse = exports.AdminRespondToAuthChallengeResponse || (exports.AdminRespondToAuthChallengeResponse = {})); +var CodeMismatchException; +(function (CodeMismatchException) { + CodeMismatchException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CodeMismatchException = exports.CodeMismatchException || (exports.CodeMismatchException = {})); +var ExpiredCodeException; +(function (ExpiredCodeException) { + ExpiredCodeException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ExpiredCodeException = exports.ExpiredCodeException || (exports.ExpiredCodeException = {})); +var SoftwareTokenMFANotFoundException; +(function (SoftwareTokenMFANotFoundException) { + SoftwareTokenMFANotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SoftwareTokenMFANotFoundException = exports.SoftwareTokenMFANotFoundException || (exports.SoftwareTokenMFANotFoundException = {})); +var SMSMfaSettingsType; +(function (SMSMfaSettingsType) { + SMSMfaSettingsType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SMSMfaSettingsType = exports.SMSMfaSettingsType || (exports.SMSMfaSettingsType = {})); +var SoftwareTokenMfaSettingsType; +(function (SoftwareTokenMfaSettingsType) { + SoftwareTokenMfaSettingsType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SoftwareTokenMfaSettingsType = exports.SoftwareTokenMfaSettingsType || (exports.SoftwareTokenMfaSettingsType = {})); +var AdminSetUserMFAPreferenceRequest; +(function (AdminSetUserMFAPreferenceRequest) { + AdminSetUserMFAPreferenceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminSetUserMFAPreferenceRequest = exports.AdminSetUserMFAPreferenceRequest || (exports.AdminSetUserMFAPreferenceRequest = {})); +var AdminSetUserMFAPreferenceResponse; +(function (AdminSetUserMFAPreferenceResponse) { + AdminSetUserMFAPreferenceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminSetUserMFAPreferenceResponse = exports.AdminSetUserMFAPreferenceResponse || (exports.AdminSetUserMFAPreferenceResponse = {})); +var AdminSetUserPasswordRequest; +(function (AdminSetUserPasswordRequest) { + AdminSetUserPasswordRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + ...(obj.Password && { Password: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminSetUserPasswordRequest = exports.AdminSetUserPasswordRequest || (exports.AdminSetUserPasswordRequest = {})); +var AdminSetUserPasswordResponse; +(function (AdminSetUserPasswordResponse) { + AdminSetUserPasswordResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminSetUserPasswordResponse = exports.AdminSetUserPasswordResponse || (exports.AdminSetUserPasswordResponse = {})); +var AdminSetUserSettingsRequest; +(function (AdminSetUserSettingsRequest) { + AdminSetUserSettingsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminSetUserSettingsRequest = exports.AdminSetUserSettingsRequest || (exports.AdminSetUserSettingsRequest = {})); +var AdminSetUserSettingsResponse; +(function (AdminSetUserSettingsResponse) { + AdminSetUserSettingsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminSetUserSettingsResponse = exports.AdminSetUserSettingsResponse || (exports.AdminSetUserSettingsResponse = {})); +var AdminUpdateAuthEventFeedbackRequest; +(function (AdminUpdateAuthEventFeedbackRequest) { + AdminUpdateAuthEventFeedbackRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminUpdateAuthEventFeedbackRequest = exports.AdminUpdateAuthEventFeedbackRequest || (exports.AdminUpdateAuthEventFeedbackRequest = {})); +var AdminUpdateAuthEventFeedbackResponse; +(function (AdminUpdateAuthEventFeedbackResponse) { + AdminUpdateAuthEventFeedbackResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminUpdateAuthEventFeedbackResponse = exports.AdminUpdateAuthEventFeedbackResponse || (exports.AdminUpdateAuthEventFeedbackResponse = {})); +var DeviceRememberedStatusType; +(function (DeviceRememberedStatusType) { + DeviceRememberedStatusType["NOT_REMEMBERED"] = "not_remembered"; + DeviceRememberedStatusType["REMEMBERED"] = "remembered"; +})(DeviceRememberedStatusType = exports.DeviceRememberedStatusType || (exports.DeviceRememberedStatusType = {})); +var AdminUpdateDeviceStatusRequest; +(function (AdminUpdateDeviceStatusRequest) { + AdminUpdateDeviceStatusRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminUpdateDeviceStatusRequest = exports.AdminUpdateDeviceStatusRequest || (exports.AdminUpdateDeviceStatusRequest = {})); +var AdminUpdateDeviceStatusResponse; +(function (AdminUpdateDeviceStatusResponse) { + AdminUpdateDeviceStatusResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminUpdateDeviceStatusResponse = exports.AdminUpdateDeviceStatusResponse || (exports.AdminUpdateDeviceStatusResponse = {})); +var AdminUpdateUserAttributesRequest; +(function (AdminUpdateUserAttributesRequest) { + AdminUpdateUserAttributesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + ...(obj.UserAttributes && { + UserAttributes: obj.UserAttributes.map((item) => AttributeType.filterSensitiveLog(item)), + }), + }); +})(AdminUpdateUserAttributesRequest = exports.AdminUpdateUserAttributesRequest || (exports.AdminUpdateUserAttributesRequest = {})); +var AdminUpdateUserAttributesResponse; +(function (AdminUpdateUserAttributesResponse) { + AdminUpdateUserAttributesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminUpdateUserAttributesResponse = exports.AdminUpdateUserAttributesResponse || (exports.AdminUpdateUserAttributesResponse = {})); +var AdminUserGlobalSignOutRequest; +(function (AdminUserGlobalSignOutRequest) { + AdminUserGlobalSignOutRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(AdminUserGlobalSignOutRequest = exports.AdminUserGlobalSignOutRequest || (exports.AdminUserGlobalSignOutRequest = {})); +var AdminUserGlobalSignOutResponse; +(function (AdminUserGlobalSignOutResponse) { + AdminUserGlobalSignOutResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AdminUserGlobalSignOutResponse = exports.AdminUserGlobalSignOutResponse || (exports.AdminUserGlobalSignOutResponse = {})); +var AdvancedSecurityModeType; +(function (AdvancedSecurityModeType) { + AdvancedSecurityModeType["AUDIT"] = "AUDIT"; + AdvancedSecurityModeType["ENFORCED"] = "ENFORCED"; + AdvancedSecurityModeType["OFF"] = "OFF"; +})(AdvancedSecurityModeType = exports.AdvancedSecurityModeType || (exports.AdvancedSecurityModeType = {})); +var AliasAttributeType; +(function (AliasAttributeType) { + AliasAttributeType["EMAIL"] = "email"; + AliasAttributeType["PHONE_NUMBER"] = "phone_number"; + AliasAttributeType["PREFERRED_USERNAME"] = "preferred_username"; +})(AliasAttributeType = exports.AliasAttributeType || (exports.AliasAttributeType = {})); +var AnalyticsConfigurationType; +(function (AnalyticsConfigurationType) { + AnalyticsConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AnalyticsConfigurationType = exports.AnalyticsConfigurationType || (exports.AnalyticsConfigurationType = {})); +var AssociateSoftwareTokenRequest; +(function (AssociateSoftwareTokenRequest) { + AssociateSoftwareTokenRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(AssociateSoftwareTokenRequest = exports.AssociateSoftwareTokenRequest || (exports.AssociateSoftwareTokenRequest = {})); +var AssociateSoftwareTokenResponse; +(function (AssociateSoftwareTokenResponse) { + AssociateSoftwareTokenResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.SecretCode && { SecretCode: smithy_client_1.SENSITIVE_STRING }), + }); +})(AssociateSoftwareTokenResponse = exports.AssociateSoftwareTokenResponse || (exports.AssociateSoftwareTokenResponse = {})); +var ConcurrentModificationException; +(function (ConcurrentModificationException) { + ConcurrentModificationException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ConcurrentModificationException = exports.ConcurrentModificationException || (exports.ConcurrentModificationException = {})); +var ChangePasswordRequest; +(function (ChangePasswordRequest) { + ChangePasswordRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.PreviousPassword && { PreviousPassword: smithy_client_1.SENSITIVE_STRING }), + ...(obj.ProposedPassword && { ProposedPassword: smithy_client_1.SENSITIVE_STRING }), + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(ChangePasswordRequest = exports.ChangePasswordRequest || (exports.ChangePasswordRequest = {})); +var ChangePasswordResponse; +(function (ChangePasswordResponse) { + ChangePasswordResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ChangePasswordResponse = exports.ChangePasswordResponse || (exports.ChangePasswordResponse = {})); +var DeviceSecretVerifierConfigType; +(function (DeviceSecretVerifierConfigType) { + DeviceSecretVerifierConfigType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeviceSecretVerifierConfigType = exports.DeviceSecretVerifierConfigType || (exports.DeviceSecretVerifierConfigType = {})); +var ConfirmDeviceRequest; +(function (ConfirmDeviceRequest) { + ConfirmDeviceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(ConfirmDeviceRequest = exports.ConfirmDeviceRequest || (exports.ConfirmDeviceRequest = {})); +var ConfirmDeviceResponse; +(function (ConfirmDeviceResponse) { + ConfirmDeviceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ConfirmDeviceResponse = exports.ConfirmDeviceResponse || (exports.ConfirmDeviceResponse = {})); +var UserContextDataType; +(function (UserContextDataType) { + UserContextDataType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserContextDataType = exports.UserContextDataType || (exports.UserContextDataType = {})); +var ConfirmForgotPasswordRequest; +(function (ConfirmForgotPasswordRequest) { + ConfirmForgotPasswordRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + ...(obj.SecretHash && { SecretHash: smithy_client_1.SENSITIVE_STRING }), + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + ...(obj.Password && { Password: smithy_client_1.SENSITIVE_STRING }), + }); +})(ConfirmForgotPasswordRequest = exports.ConfirmForgotPasswordRequest || (exports.ConfirmForgotPasswordRequest = {})); +var ConfirmForgotPasswordResponse; +(function (ConfirmForgotPasswordResponse) { + ConfirmForgotPasswordResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ConfirmForgotPasswordResponse = exports.ConfirmForgotPasswordResponse || (exports.ConfirmForgotPasswordResponse = {})); +var ConfirmSignUpRequest; +(function (ConfirmSignUpRequest) { + ConfirmSignUpRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + ...(obj.SecretHash && { SecretHash: smithy_client_1.SENSITIVE_STRING }), + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(ConfirmSignUpRequest = exports.ConfirmSignUpRequest || (exports.ConfirmSignUpRequest = {})); +var ConfirmSignUpResponse; +(function (ConfirmSignUpResponse) { + ConfirmSignUpResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ConfirmSignUpResponse = exports.ConfirmSignUpResponse || (exports.ConfirmSignUpResponse = {})); +var CreateGroupRequest; +(function (CreateGroupRequest) { + CreateGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateGroupRequest = exports.CreateGroupRequest || (exports.CreateGroupRequest = {})); +var CreateGroupResponse; +(function (CreateGroupResponse) { + CreateGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateGroupResponse = exports.CreateGroupResponse || (exports.CreateGroupResponse = {})); +var GroupExistsException; +(function (GroupExistsException) { + GroupExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GroupExistsException = exports.GroupExistsException || (exports.GroupExistsException = {})); +var IdentityProviderTypeType; +(function (IdentityProviderTypeType) { + IdentityProviderTypeType["Facebook"] = "Facebook"; + IdentityProviderTypeType["Google"] = "Google"; + IdentityProviderTypeType["LoginWithAmazon"] = "LoginWithAmazon"; + IdentityProviderTypeType["OIDC"] = "OIDC"; + IdentityProviderTypeType["SAML"] = "SAML"; + IdentityProviderTypeType["SignInWithApple"] = "SignInWithApple"; +})(IdentityProviderTypeType = exports.IdentityProviderTypeType || (exports.IdentityProviderTypeType = {})); +var CreateIdentityProviderRequest; +(function (CreateIdentityProviderRequest) { + CreateIdentityProviderRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateIdentityProviderRequest = exports.CreateIdentityProviderRequest || (exports.CreateIdentityProviderRequest = {})); +var IdentityProviderType; +(function (IdentityProviderType) { + IdentityProviderType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(IdentityProviderType = exports.IdentityProviderType || (exports.IdentityProviderType = {})); +var CreateIdentityProviderResponse; +(function (CreateIdentityProviderResponse) { + CreateIdentityProviderResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateIdentityProviderResponse = exports.CreateIdentityProviderResponse || (exports.CreateIdentityProviderResponse = {})); +var DuplicateProviderException; +(function (DuplicateProviderException) { + DuplicateProviderException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DuplicateProviderException = exports.DuplicateProviderException || (exports.DuplicateProviderException = {})); +var ResourceServerScopeType; +(function (ResourceServerScopeType) { + ResourceServerScopeType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceServerScopeType = exports.ResourceServerScopeType || (exports.ResourceServerScopeType = {})); +var CreateResourceServerRequest; +(function (CreateResourceServerRequest) { + CreateResourceServerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateResourceServerRequest = exports.CreateResourceServerRequest || (exports.CreateResourceServerRequest = {})); +var ResourceServerType; +(function (ResourceServerType) { + ResourceServerType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceServerType = exports.ResourceServerType || (exports.ResourceServerType = {})); +var CreateResourceServerResponse; +(function (CreateResourceServerResponse) { + CreateResourceServerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateResourceServerResponse = exports.CreateResourceServerResponse || (exports.CreateResourceServerResponse = {})); +var CreateUserImportJobRequest; +(function (CreateUserImportJobRequest) { + CreateUserImportJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateUserImportJobRequest = exports.CreateUserImportJobRequest || (exports.CreateUserImportJobRequest = {})); +var UserImportJobStatusType; +(function (UserImportJobStatusType) { + UserImportJobStatusType["Created"] = "Created"; + UserImportJobStatusType["Expired"] = "Expired"; + UserImportJobStatusType["Failed"] = "Failed"; + UserImportJobStatusType["InProgress"] = "InProgress"; + UserImportJobStatusType["Pending"] = "Pending"; + UserImportJobStatusType["Stopped"] = "Stopped"; + UserImportJobStatusType["Stopping"] = "Stopping"; + UserImportJobStatusType["Succeeded"] = "Succeeded"; +})(UserImportJobStatusType = exports.UserImportJobStatusType || (exports.UserImportJobStatusType = {})); +var UserImportJobType; +(function (UserImportJobType) { + UserImportJobType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserImportJobType = exports.UserImportJobType || (exports.UserImportJobType = {})); +var CreateUserImportJobResponse; +(function (CreateUserImportJobResponse) { + CreateUserImportJobResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateUserImportJobResponse = exports.CreateUserImportJobResponse || (exports.CreateUserImportJobResponse = {})); +var VerifiedAttributeType; +(function (VerifiedAttributeType) { + VerifiedAttributeType["EMAIL"] = "email"; + VerifiedAttributeType["PHONE_NUMBER"] = "phone_number"; +})(VerifiedAttributeType = exports.VerifiedAttributeType || (exports.VerifiedAttributeType = {})); +var DeviceConfigurationType; +(function (DeviceConfigurationType) { + DeviceConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeviceConfigurationType = exports.DeviceConfigurationType || (exports.DeviceConfigurationType = {})); +var EmailSendingAccountType; +(function (EmailSendingAccountType) { + EmailSendingAccountType["COGNITO_DEFAULT"] = "COGNITO_DEFAULT"; + EmailSendingAccountType["DEVELOPER"] = "DEVELOPER"; +})(EmailSendingAccountType = exports.EmailSendingAccountType || (exports.EmailSendingAccountType = {})); +var EmailConfigurationType; +(function (EmailConfigurationType) { + EmailConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EmailConfigurationType = exports.EmailConfigurationType || (exports.EmailConfigurationType = {})); +var CustomEmailSenderLambdaVersionType; +(function (CustomEmailSenderLambdaVersionType) { + CustomEmailSenderLambdaVersionType["V1_0"] = "V1_0"; +})(CustomEmailSenderLambdaVersionType = exports.CustomEmailSenderLambdaVersionType || (exports.CustomEmailSenderLambdaVersionType = {})); +var CustomEmailLambdaVersionConfigType; +(function (CustomEmailLambdaVersionConfigType) { + CustomEmailLambdaVersionConfigType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CustomEmailLambdaVersionConfigType = exports.CustomEmailLambdaVersionConfigType || (exports.CustomEmailLambdaVersionConfigType = {})); +var CustomSMSSenderLambdaVersionType; +(function (CustomSMSSenderLambdaVersionType) { + CustomSMSSenderLambdaVersionType["V1_0"] = "V1_0"; +})(CustomSMSSenderLambdaVersionType = exports.CustomSMSSenderLambdaVersionType || (exports.CustomSMSSenderLambdaVersionType = {})); +var CustomSMSLambdaVersionConfigType; +(function (CustomSMSLambdaVersionConfigType) { + CustomSMSLambdaVersionConfigType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CustomSMSLambdaVersionConfigType = exports.CustomSMSLambdaVersionConfigType || (exports.CustomSMSLambdaVersionConfigType = {})); +var LambdaConfigType; +(function (LambdaConfigType) { + LambdaConfigType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LambdaConfigType = exports.LambdaConfigType || (exports.LambdaConfigType = {})); +var UserPoolMfaType; +(function (UserPoolMfaType) { + UserPoolMfaType["OFF"] = "OFF"; + UserPoolMfaType["ON"] = "ON"; + UserPoolMfaType["OPTIONAL"] = "OPTIONAL"; +})(UserPoolMfaType = exports.UserPoolMfaType || (exports.UserPoolMfaType = {})); +var PasswordPolicyType; +(function (PasswordPolicyType) { + PasswordPolicyType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PasswordPolicyType = exports.PasswordPolicyType || (exports.PasswordPolicyType = {})); +var UserPoolPolicyType; +(function (UserPoolPolicyType) { + UserPoolPolicyType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserPoolPolicyType = exports.UserPoolPolicyType || (exports.UserPoolPolicyType = {})); +var SmsConfigurationType; +(function (SmsConfigurationType) { + SmsConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SmsConfigurationType = exports.SmsConfigurationType || (exports.SmsConfigurationType = {})); +var UsernameAttributeType; +(function (UsernameAttributeType) { + UsernameAttributeType["EMAIL"] = "email"; + UsernameAttributeType["PHONE_NUMBER"] = "phone_number"; +})(UsernameAttributeType = exports.UsernameAttributeType || (exports.UsernameAttributeType = {})); +var UsernameConfigurationType; +(function (UsernameConfigurationType) { + UsernameConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UsernameConfigurationType = exports.UsernameConfigurationType || (exports.UsernameConfigurationType = {})); +var UserPoolAddOnsType; +(function (UserPoolAddOnsType) { + UserPoolAddOnsType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserPoolAddOnsType = exports.UserPoolAddOnsType || (exports.UserPoolAddOnsType = {})); +var DefaultEmailOptionType; +(function (DefaultEmailOptionType) { + DefaultEmailOptionType["CONFIRM_WITH_CODE"] = "CONFIRM_WITH_CODE"; + DefaultEmailOptionType["CONFIRM_WITH_LINK"] = "CONFIRM_WITH_LINK"; +})(DefaultEmailOptionType = exports.DefaultEmailOptionType || (exports.DefaultEmailOptionType = {})); +var VerificationMessageTemplateType; +(function (VerificationMessageTemplateType) { + VerificationMessageTemplateType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(VerificationMessageTemplateType = exports.VerificationMessageTemplateType || (exports.VerificationMessageTemplateType = {})); +var CreateUserPoolRequest; +(function (CreateUserPoolRequest) { + CreateUserPoolRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateUserPoolRequest = exports.CreateUserPoolRequest || (exports.CreateUserPoolRequest = {})); +var StatusType; +(function (StatusType) { + StatusType["Disabled"] = "Disabled"; + StatusType["Enabled"] = "Enabled"; +})(StatusType = exports.StatusType || (exports.StatusType = {})); +var UserPoolType; +(function (UserPoolType) { + UserPoolType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserPoolType = exports.UserPoolType || (exports.UserPoolType = {})); +var CreateUserPoolResponse; +(function (CreateUserPoolResponse) { + CreateUserPoolResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateUserPoolResponse = exports.CreateUserPoolResponse || (exports.CreateUserPoolResponse = {})); +var UserPoolTaggingException; +(function (UserPoolTaggingException) { + UserPoolTaggingException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserPoolTaggingException = exports.UserPoolTaggingException || (exports.UserPoolTaggingException = {})); +var OAuthFlowType; +(function (OAuthFlowType) { + OAuthFlowType["client_credentials"] = "client_credentials"; + OAuthFlowType["code"] = "code"; + OAuthFlowType["implicit"] = "implicit"; +})(OAuthFlowType = exports.OAuthFlowType || (exports.OAuthFlowType = {})); +var ExplicitAuthFlowsType; +(function (ExplicitAuthFlowsType) { + ExplicitAuthFlowsType["ADMIN_NO_SRP_AUTH"] = "ADMIN_NO_SRP_AUTH"; + ExplicitAuthFlowsType["ALLOW_ADMIN_USER_PASSWORD_AUTH"] = "ALLOW_ADMIN_USER_PASSWORD_AUTH"; + ExplicitAuthFlowsType["ALLOW_CUSTOM_AUTH"] = "ALLOW_CUSTOM_AUTH"; + ExplicitAuthFlowsType["ALLOW_REFRESH_TOKEN_AUTH"] = "ALLOW_REFRESH_TOKEN_AUTH"; + ExplicitAuthFlowsType["ALLOW_USER_PASSWORD_AUTH"] = "ALLOW_USER_PASSWORD_AUTH"; + ExplicitAuthFlowsType["ALLOW_USER_SRP_AUTH"] = "ALLOW_USER_SRP_AUTH"; + ExplicitAuthFlowsType["CUSTOM_AUTH_FLOW_ONLY"] = "CUSTOM_AUTH_FLOW_ONLY"; + ExplicitAuthFlowsType["USER_PASSWORD_AUTH"] = "USER_PASSWORD_AUTH"; +})(ExplicitAuthFlowsType = exports.ExplicitAuthFlowsType || (exports.ExplicitAuthFlowsType = {})); +var PreventUserExistenceErrorTypes; +(function (PreventUserExistenceErrorTypes) { + PreventUserExistenceErrorTypes["ENABLED"] = "ENABLED"; + PreventUserExistenceErrorTypes["LEGACY"] = "LEGACY"; +})(PreventUserExistenceErrorTypes = exports.PreventUserExistenceErrorTypes || (exports.PreventUserExistenceErrorTypes = {})); +var TimeUnitsType; +(function (TimeUnitsType) { + TimeUnitsType["DAYS"] = "days"; + TimeUnitsType["HOURS"] = "hours"; + TimeUnitsType["MINUTES"] = "minutes"; + TimeUnitsType["SECONDS"] = "seconds"; +})(TimeUnitsType = exports.TimeUnitsType || (exports.TimeUnitsType = {})); +var TokenValidityUnitsType; +(function (TokenValidityUnitsType) { + TokenValidityUnitsType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TokenValidityUnitsType = exports.TokenValidityUnitsType || (exports.TokenValidityUnitsType = {})); +var CreateUserPoolClientRequest; +(function (CreateUserPoolClientRequest) { + CreateUserPoolClientRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateUserPoolClientRequest = exports.CreateUserPoolClientRequest || (exports.CreateUserPoolClientRequest = {})); +var UserPoolClientType; +(function (UserPoolClientType) { + UserPoolClientType.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + ...(obj.ClientSecret && { ClientSecret: smithy_client_1.SENSITIVE_STRING }), + }); +})(UserPoolClientType = exports.UserPoolClientType || (exports.UserPoolClientType = {})); +var CreateUserPoolClientResponse; +(function (CreateUserPoolClientResponse) { + CreateUserPoolClientResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.UserPoolClient && { UserPoolClient: UserPoolClientType.filterSensitiveLog(obj.UserPoolClient) }), + }); +})(CreateUserPoolClientResponse = exports.CreateUserPoolClientResponse || (exports.CreateUserPoolClientResponse = {})); +var InvalidOAuthFlowException; +(function (InvalidOAuthFlowException) { + InvalidOAuthFlowException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidOAuthFlowException = exports.InvalidOAuthFlowException || (exports.InvalidOAuthFlowException = {})); +var ScopeDoesNotExistException; +(function (ScopeDoesNotExistException) { + ScopeDoesNotExistException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ScopeDoesNotExistException = exports.ScopeDoesNotExistException || (exports.ScopeDoesNotExistException = {})); +var CustomDomainConfigType; +(function (CustomDomainConfigType) { + CustomDomainConfigType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CustomDomainConfigType = exports.CustomDomainConfigType || (exports.CustomDomainConfigType = {})); +var CreateUserPoolDomainRequest; +(function (CreateUserPoolDomainRequest) { + CreateUserPoolDomainRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateUserPoolDomainRequest = exports.CreateUserPoolDomainRequest || (exports.CreateUserPoolDomainRequest = {})); +var CreateUserPoolDomainResponse; +(function (CreateUserPoolDomainResponse) { + CreateUserPoolDomainResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateUserPoolDomainResponse = exports.CreateUserPoolDomainResponse || (exports.CreateUserPoolDomainResponse = {})); +var DeleteGroupRequest; +(function (DeleteGroupRequest) { + DeleteGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteGroupRequest = exports.DeleteGroupRequest || (exports.DeleteGroupRequest = {})); +var DeleteIdentityProviderRequest; +(function (DeleteIdentityProviderRequest) { + DeleteIdentityProviderRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteIdentityProviderRequest = exports.DeleteIdentityProviderRequest || (exports.DeleteIdentityProviderRequest = {})); +var UnsupportedIdentityProviderException; +(function (UnsupportedIdentityProviderException) { + UnsupportedIdentityProviderException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnsupportedIdentityProviderException = exports.UnsupportedIdentityProviderException || (exports.UnsupportedIdentityProviderException = {})); +var DeleteResourceServerRequest; +(function (DeleteResourceServerRequest) { + DeleteResourceServerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteResourceServerRequest = exports.DeleteResourceServerRequest || (exports.DeleteResourceServerRequest = {})); +var DeleteUserRequest; +(function (DeleteUserRequest) { + DeleteUserRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(DeleteUserRequest = exports.DeleteUserRequest || (exports.DeleteUserRequest = {})); +var DeleteUserAttributesRequest; +(function (DeleteUserAttributesRequest) { + DeleteUserAttributesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(DeleteUserAttributesRequest = exports.DeleteUserAttributesRequest || (exports.DeleteUserAttributesRequest = {})); +var DeleteUserAttributesResponse; +(function (DeleteUserAttributesResponse) { + DeleteUserAttributesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteUserAttributesResponse = exports.DeleteUserAttributesResponse || (exports.DeleteUserAttributesResponse = {})); +var DeleteUserPoolRequest; +(function (DeleteUserPoolRequest) { + DeleteUserPoolRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteUserPoolRequest = exports.DeleteUserPoolRequest || (exports.DeleteUserPoolRequest = {})); +var DeleteUserPoolClientRequest; +(function (DeleteUserPoolClientRequest) { + DeleteUserPoolClientRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(DeleteUserPoolClientRequest = exports.DeleteUserPoolClientRequest || (exports.DeleteUserPoolClientRequest = {})); +var DeleteUserPoolDomainRequest; +(function (DeleteUserPoolDomainRequest) { + DeleteUserPoolDomainRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteUserPoolDomainRequest = exports.DeleteUserPoolDomainRequest || (exports.DeleteUserPoolDomainRequest = {})); +var DeleteUserPoolDomainResponse; +(function (DeleteUserPoolDomainResponse) { + DeleteUserPoolDomainResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteUserPoolDomainResponse = exports.DeleteUserPoolDomainResponse || (exports.DeleteUserPoolDomainResponse = {})); +var DescribeIdentityProviderRequest; +(function (DescribeIdentityProviderRequest) { + DescribeIdentityProviderRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeIdentityProviderRequest = exports.DescribeIdentityProviderRequest || (exports.DescribeIdentityProviderRequest = {})); +var DescribeIdentityProviderResponse; +(function (DescribeIdentityProviderResponse) { + DescribeIdentityProviderResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeIdentityProviderResponse = exports.DescribeIdentityProviderResponse || (exports.DescribeIdentityProviderResponse = {})); +var DescribeResourceServerRequest; +(function (DescribeResourceServerRequest) { + DescribeResourceServerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeResourceServerRequest = exports.DescribeResourceServerRequest || (exports.DescribeResourceServerRequest = {})); +var DescribeResourceServerResponse; +(function (DescribeResourceServerResponse) { + DescribeResourceServerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeResourceServerResponse = exports.DescribeResourceServerResponse || (exports.DescribeResourceServerResponse = {})); +var DescribeRiskConfigurationRequest; +(function (DescribeRiskConfigurationRequest) { + DescribeRiskConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(DescribeRiskConfigurationRequest = exports.DescribeRiskConfigurationRequest || (exports.DescribeRiskConfigurationRequest = {})); +var CompromisedCredentialsEventActionType; +(function (CompromisedCredentialsEventActionType) { + CompromisedCredentialsEventActionType["BLOCK"] = "BLOCK"; + CompromisedCredentialsEventActionType["NO_ACTION"] = "NO_ACTION"; +})(CompromisedCredentialsEventActionType = exports.CompromisedCredentialsEventActionType || (exports.CompromisedCredentialsEventActionType = {})); +var CompromisedCredentialsActionsType; +(function (CompromisedCredentialsActionsType) { + CompromisedCredentialsActionsType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CompromisedCredentialsActionsType = exports.CompromisedCredentialsActionsType || (exports.CompromisedCredentialsActionsType = {})); +var EventFilterType; +(function (EventFilterType) { + EventFilterType["PASSWORD_CHANGE"] = "PASSWORD_CHANGE"; + EventFilterType["SIGN_IN"] = "SIGN_IN"; + EventFilterType["SIGN_UP"] = "SIGN_UP"; +})(EventFilterType = exports.EventFilterType || (exports.EventFilterType = {})); +var CompromisedCredentialsRiskConfigurationType; +(function (CompromisedCredentialsRiskConfigurationType) { + CompromisedCredentialsRiskConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CompromisedCredentialsRiskConfigurationType = exports.CompromisedCredentialsRiskConfigurationType || (exports.CompromisedCredentialsRiskConfigurationType = {})); +var RiskExceptionConfigurationType; +(function (RiskExceptionConfigurationType) { + RiskExceptionConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RiskExceptionConfigurationType = exports.RiskExceptionConfigurationType || (exports.RiskExceptionConfigurationType = {})); +var RiskConfigurationType; +(function (RiskConfigurationType) { + RiskConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(RiskConfigurationType = exports.RiskConfigurationType || (exports.RiskConfigurationType = {})); +var DescribeRiskConfigurationResponse; +(function (DescribeRiskConfigurationResponse) { + DescribeRiskConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.RiskConfiguration && { + RiskConfiguration: RiskConfigurationType.filterSensitiveLog(obj.RiskConfiguration), + }), + }); +})(DescribeRiskConfigurationResponse = exports.DescribeRiskConfigurationResponse || (exports.DescribeRiskConfigurationResponse = {})); +var DescribeUserImportJobRequest; +(function (DescribeUserImportJobRequest) { + DescribeUserImportJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeUserImportJobRequest = exports.DescribeUserImportJobRequest || (exports.DescribeUserImportJobRequest = {})); +var DescribeUserImportJobResponse; +(function (DescribeUserImportJobResponse) { + DescribeUserImportJobResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeUserImportJobResponse = exports.DescribeUserImportJobResponse || (exports.DescribeUserImportJobResponse = {})); +var DescribeUserPoolRequest; +(function (DescribeUserPoolRequest) { + DescribeUserPoolRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeUserPoolRequest = exports.DescribeUserPoolRequest || (exports.DescribeUserPoolRequest = {})); +var DescribeUserPoolResponse; +(function (DescribeUserPoolResponse) { + DescribeUserPoolResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeUserPoolResponse = exports.DescribeUserPoolResponse || (exports.DescribeUserPoolResponse = {})); +var DescribeUserPoolClientRequest; +(function (DescribeUserPoolClientRequest) { + DescribeUserPoolClientRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(DescribeUserPoolClientRequest = exports.DescribeUserPoolClientRequest || (exports.DescribeUserPoolClientRequest = {})); +var DescribeUserPoolClientResponse; +(function (DescribeUserPoolClientResponse) { + DescribeUserPoolClientResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.UserPoolClient && { UserPoolClient: UserPoolClientType.filterSensitiveLog(obj.UserPoolClient) }), + }); +})(DescribeUserPoolClientResponse = exports.DescribeUserPoolClientResponse || (exports.DescribeUserPoolClientResponse = {})); +var DescribeUserPoolDomainRequest; +(function (DescribeUserPoolDomainRequest) { + DescribeUserPoolDomainRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeUserPoolDomainRequest = exports.DescribeUserPoolDomainRequest || (exports.DescribeUserPoolDomainRequest = {})); +var DomainStatusType; +(function (DomainStatusType) { + DomainStatusType["ACTIVE"] = "ACTIVE"; + DomainStatusType["CREATING"] = "CREATING"; + DomainStatusType["DELETING"] = "DELETING"; + DomainStatusType["FAILED"] = "FAILED"; + DomainStatusType["UPDATING"] = "UPDATING"; +})(DomainStatusType = exports.DomainStatusType || (exports.DomainStatusType = {})); +var DomainDescriptionType; +(function (DomainDescriptionType) { + DomainDescriptionType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DomainDescriptionType = exports.DomainDescriptionType || (exports.DomainDescriptionType = {})); +var DescribeUserPoolDomainResponse; +(function (DescribeUserPoolDomainResponse) { + DescribeUserPoolDomainResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeUserPoolDomainResponse = exports.DescribeUserPoolDomainResponse || (exports.DescribeUserPoolDomainResponse = {})); +var ForgetDeviceRequest; +(function (ForgetDeviceRequest) { + ForgetDeviceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(ForgetDeviceRequest = exports.ForgetDeviceRequest || (exports.ForgetDeviceRequest = {})); +var ForgotPasswordRequest; +(function (ForgotPasswordRequest) { + ForgotPasswordRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + ...(obj.SecretHash && { SecretHash: smithy_client_1.SENSITIVE_STRING }), + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(ForgotPasswordRequest = exports.ForgotPasswordRequest || (exports.ForgotPasswordRequest = {})); +var CodeDeliveryDetailsType; +(function (CodeDeliveryDetailsType) { + CodeDeliveryDetailsType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CodeDeliveryDetailsType = exports.CodeDeliveryDetailsType || (exports.CodeDeliveryDetailsType = {})); +var ForgotPasswordResponse; +(function (ForgotPasswordResponse) { + ForgotPasswordResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ForgotPasswordResponse = exports.ForgotPasswordResponse || (exports.ForgotPasswordResponse = {})); +var GetCSVHeaderRequest; +(function (GetCSVHeaderRequest) { + GetCSVHeaderRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetCSVHeaderRequest = exports.GetCSVHeaderRequest || (exports.GetCSVHeaderRequest = {})); +var GetCSVHeaderResponse; +(function (GetCSVHeaderResponse) { + GetCSVHeaderResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetCSVHeaderResponse = exports.GetCSVHeaderResponse || (exports.GetCSVHeaderResponse = {})); +var GetDeviceRequest; +(function (GetDeviceRequest) { + GetDeviceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(GetDeviceRequest = exports.GetDeviceRequest || (exports.GetDeviceRequest = {})); +var GetDeviceResponse; +(function (GetDeviceResponse) { + GetDeviceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Device && { Device: DeviceType.filterSensitiveLog(obj.Device) }), + }); +})(GetDeviceResponse = exports.GetDeviceResponse || (exports.GetDeviceResponse = {})); +var GetGroupRequest; +(function (GetGroupRequest) { + GetGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetGroupRequest = exports.GetGroupRequest || (exports.GetGroupRequest = {})); +var GetGroupResponse; +(function (GetGroupResponse) { + GetGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetGroupResponse = exports.GetGroupResponse || (exports.GetGroupResponse = {})); +var GetIdentityProviderByIdentifierRequest; +(function (GetIdentityProviderByIdentifierRequest) { + GetIdentityProviderByIdentifierRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetIdentityProviderByIdentifierRequest = exports.GetIdentityProviderByIdentifierRequest || (exports.GetIdentityProviderByIdentifierRequest = {})); +var GetIdentityProviderByIdentifierResponse; +(function (GetIdentityProviderByIdentifierResponse) { + GetIdentityProviderByIdentifierResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetIdentityProviderByIdentifierResponse = exports.GetIdentityProviderByIdentifierResponse || (exports.GetIdentityProviderByIdentifierResponse = {})); +var GetSigningCertificateRequest; +(function (GetSigningCertificateRequest) { + GetSigningCertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetSigningCertificateRequest = exports.GetSigningCertificateRequest || (exports.GetSigningCertificateRequest = {})); +var GetSigningCertificateResponse; +(function (GetSigningCertificateResponse) { + GetSigningCertificateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetSigningCertificateResponse = exports.GetSigningCertificateResponse || (exports.GetSigningCertificateResponse = {})); +var GetUICustomizationRequest; +(function (GetUICustomizationRequest) { + GetUICustomizationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(GetUICustomizationRequest = exports.GetUICustomizationRequest || (exports.GetUICustomizationRequest = {})); +var UICustomizationType; +(function (UICustomizationType) { + UICustomizationType.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(UICustomizationType = exports.UICustomizationType || (exports.UICustomizationType = {})); +var GetUICustomizationResponse; +(function (GetUICustomizationResponse) { + GetUICustomizationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.UICustomization && { UICustomization: UICustomizationType.filterSensitiveLog(obj.UICustomization) }), + }); +})(GetUICustomizationResponse = exports.GetUICustomizationResponse || (exports.GetUICustomizationResponse = {})); +var GetUserRequest; +(function (GetUserRequest) { + GetUserRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(GetUserRequest = exports.GetUserRequest || (exports.GetUserRequest = {})); +var GetUserResponse; +(function (GetUserResponse) { + GetUserResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + ...(obj.UserAttributes && { + UserAttributes: obj.UserAttributes.map((item) => AttributeType.filterSensitiveLog(item)), + }), + }); +})(GetUserResponse = exports.GetUserResponse || (exports.GetUserResponse = {})); +var GetUserAttributeVerificationCodeRequest; +(function (GetUserAttributeVerificationCodeRequest) { + GetUserAttributeVerificationCodeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(GetUserAttributeVerificationCodeRequest = exports.GetUserAttributeVerificationCodeRequest || (exports.GetUserAttributeVerificationCodeRequest = {})); +var GetUserAttributeVerificationCodeResponse; +(function (GetUserAttributeVerificationCodeResponse) { + GetUserAttributeVerificationCodeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetUserAttributeVerificationCodeResponse = exports.GetUserAttributeVerificationCodeResponse || (exports.GetUserAttributeVerificationCodeResponse = {})); +var GetUserPoolMfaConfigRequest; +(function (GetUserPoolMfaConfigRequest) { + GetUserPoolMfaConfigRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetUserPoolMfaConfigRequest = exports.GetUserPoolMfaConfigRequest || (exports.GetUserPoolMfaConfigRequest = {})); +var SmsMfaConfigType; +(function (SmsMfaConfigType) { + SmsMfaConfigType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SmsMfaConfigType = exports.SmsMfaConfigType || (exports.SmsMfaConfigType = {})); +var SoftwareTokenMfaConfigType; +(function (SoftwareTokenMfaConfigType) { + SoftwareTokenMfaConfigType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SoftwareTokenMfaConfigType = exports.SoftwareTokenMfaConfigType || (exports.SoftwareTokenMfaConfigType = {})); +var GetUserPoolMfaConfigResponse; +(function (GetUserPoolMfaConfigResponse) { + GetUserPoolMfaConfigResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetUserPoolMfaConfigResponse = exports.GetUserPoolMfaConfigResponse || (exports.GetUserPoolMfaConfigResponse = {})); +var GlobalSignOutRequest; +(function (GlobalSignOutRequest) { + GlobalSignOutRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(GlobalSignOutRequest = exports.GlobalSignOutRequest || (exports.GlobalSignOutRequest = {})); +var GlobalSignOutResponse; +(function (GlobalSignOutResponse) { + GlobalSignOutResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GlobalSignOutResponse = exports.GlobalSignOutResponse || (exports.GlobalSignOutResponse = {})); +var InitiateAuthRequest; +(function (InitiateAuthRequest) { + InitiateAuthRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AuthParameters && { AuthParameters: smithy_client_1.SENSITIVE_STRING }), + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(InitiateAuthRequest = exports.InitiateAuthRequest || (exports.InitiateAuthRequest = {})); +var InitiateAuthResponse; +(function (InitiateAuthResponse) { + InitiateAuthResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AuthenticationResult && { + AuthenticationResult: AuthenticationResultType.filterSensitiveLog(obj.AuthenticationResult), + }), + }); +})(InitiateAuthResponse = exports.InitiateAuthResponse || (exports.InitiateAuthResponse = {})); +var ListDevicesRequest; +(function (ListDevicesRequest) { + ListDevicesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(ListDevicesRequest = exports.ListDevicesRequest || (exports.ListDevicesRequest = {})); +var ListDevicesResponse; +(function (ListDevicesResponse) { + ListDevicesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListDevicesResponse = exports.ListDevicesResponse || (exports.ListDevicesResponse = {})); +var ListGroupsRequest; +(function (ListGroupsRequest) { + ListGroupsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListGroupsRequest = exports.ListGroupsRequest || (exports.ListGroupsRequest = {})); +var ListGroupsResponse; +(function (ListGroupsResponse) { + ListGroupsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListGroupsResponse = exports.ListGroupsResponse || (exports.ListGroupsResponse = {})); +var ListIdentityProvidersRequest; +(function (ListIdentityProvidersRequest) { + ListIdentityProvidersRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListIdentityProvidersRequest = exports.ListIdentityProvidersRequest || (exports.ListIdentityProvidersRequest = {})); +var ProviderDescription; +(function (ProviderDescription) { + ProviderDescription.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ProviderDescription = exports.ProviderDescription || (exports.ProviderDescription = {})); +var ListIdentityProvidersResponse; +(function (ListIdentityProvidersResponse) { + ListIdentityProvidersResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListIdentityProvidersResponse = exports.ListIdentityProvidersResponse || (exports.ListIdentityProvidersResponse = {})); +var ListResourceServersRequest; +(function (ListResourceServersRequest) { + ListResourceServersRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListResourceServersRequest = exports.ListResourceServersRequest || (exports.ListResourceServersRequest = {})); +var ListResourceServersResponse; +(function (ListResourceServersResponse) { + ListResourceServersResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListResourceServersResponse = exports.ListResourceServersResponse || (exports.ListResourceServersResponse = {})); +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 ListUserImportJobsRequest; +(function (ListUserImportJobsRequest) { + ListUserImportJobsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListUserImportJobsRequest = exports.ListUserImportJobsRequest || (exports.ListUserImportJobsRequest = {})); +var ListUserImportJobsResponse; +(function (ListUserImportJobsResponse) { + ListUserImportJobsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListUserImportJobsResponse = exports.ListUserImportJobsResponse || (exports.ListUserImportJobsResponse = {})); +var ListUserPoolClientsRequest; +(function (ListUserPoolClientsRequest) { + ListUserPoolClientsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListUserPoolClientsRequest = exports.ListUserPoolClientsRequest || (exports.ListUserPoolClientsRequest = {})); +var UserPoolClientDescription; +(function (UserPoolClientDescription) { + UserPoolClientDescription.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(UserPoolClientDescription = exports.UserPoolClientDescription || (exports.UserPoolClientDescription = {})); +var ListUserPoolClientsResponse; +(function (ListUserPoolClientsResponse) { + ListUserPoolClientsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.UserPoolClients && { + UserPoolClients: obj.UserPoolClients.map((item) => UserPoolClientDescription.filterSensitiveLog(item)), + }), + }); +})(ListUserPoolClientsResponse = exports.ListUserPoolClientsResponse || (exports.ListUserPoolClientsResponse = {})); +var ListUserPoolsRequest; +(function (ListUserPoolsRequest) { + ListUserPoolsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListUserPoolsRequest = exports.ListUserPoolsRequest || (exports.ListUserPoolsRequest = {})); +var UserPoolDescriptionType; +(function (UserPoolDescriptionType) { + UserPoolDescriptionType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UserPoolDescriptionType = exports.UserPoolDescriptionType || (exports.UserPoolDescriptionType = {})); +var ListUserPoolsResponse; +(function (ListUserPoolsResponse) { + ListUserPoolsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListUserPoolsResponse = exports.ListUserPoolsResponse || (exports.ListUserPoolsResponse = {})); +var ListUsersRequest; +(function (ListUsersRequest) { + ListUsersRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListUsersRequest = exports.ListUsersRequest || (exports.ListUsersRequest = {})); +var ListUsersResponse; +(function (ListUsersResponse) { + ListUsersResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Users && { Users: obj.Users.map((item) => UserType.filterSensitiveLog(item)) }), + }); +})(ListUsersResponse = exports.ListUsersResponse || (exports.ListUsersResponse = {})); +var ListUsersInGroupRequest; +(function (ListUsersInGroupRequest) { + ListUsersInGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListUsersInGroupRequest = exports.ListUsersInGroupRequest || (exports.ListUsersInGroupRequest = {})); +var ListUsersInGroupResponse; +(function (ListUsersInGroupResponse) { + ListUsersInGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Users && { Users: obj.Users.map((item) => UserType.filterSensitiveLog(item)) }), + }); +})(ListUsersInGroupResponse = exports.ListUsersInGroupResponse || (exports.ListUsersInGroupResponse = {})); +var ResendConfirmationCodeRequest; +(function (ResendConfirmationCodeRequest) { + ResendConfirmationCodeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + ...(obj.SecretHash && { SecretHash: smithy_client_1.SENSITIVE_STRING }), + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + }); +})(ResendConfirmationCodeRequest = exports.ResendConfirmationCodeRequest || (exports.ResendConfirmationCodeRequest = {})); +var ResendConfirmationCodeResponse; +(function (ResendConfirmationCodeResponse) { + ResendConfirmationCodeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResendConfirmationCodeResponse = exports.ResendConfirmationCodeResponse || (exports.ResendConfirmationCodeResponse = {})); +var RespondToAuthChallengeRequest; +(function (RespondToAuthChallengeRequest) { + RespondToAuthChallengeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(RespondToAuthChallengeRequest = exports.RespondToAuthChallengeRequest || (exports.RespondToAuthChallengeRequest = {})); +var RespondToAuthChallengeResponse; +(function (RespondToAuthChallengeResponse) { + RespondToAuthChallengeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AuthenticationResult && { + AuthenticationResult: AuthenticationResultType.filterSensitiveLog(obj.AuthenticationResult), + }), + }); +})(RespondToAuthChallengeResponse = exports.RespondToAuthChallengeResponse || (exports.RespondToAuthChallengeResponse = {})); +var SetRiskConfigurationRequest; +(function (SetRiskConfigurationRequest) { + SetRiskConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(SetRiskConfigurationRequest = exports.SetRiskConfigurationRequest || (exports.SetRiskConfigurationRequest = {})); +var SetRiskConfigurationResponse; +(function (SetRiskConfigurationResponse) { + SetRiskConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.RiskConfiguration && { + RiskConfiguration: RiskConfigurationType.filterSensitiveLog(obj.RiskConfiguration), + }), + }); +})(SetRiskConfigurationResponse = exports.SetRiskConfigurationResponse || (exports.SetRiskConfigurationResponse = {})); +var SetUICustomizationRequest; +(function (SetUICustomizationRequest) { + SetUICustomizationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(SetUICustomizationRequest = exports.SetUICustomizationRequest || (exports.SetUICustomizationRequest = {})); +var SetUICustomizationResponse; +(function (SetUICustomizationResponse) { + SetUICustomizationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.UICustomization && { UICustomization: UICustomizationType.filterSensitiveLog(obj.UICustomization) }), + }); +})(SetUICustomizationResponse = exports.SetUICustomizationResponse || (exports.SetUICustomizationResponse = {})); +var SetUserMFAPreferenceRequest; +(function (SetUserMFAPreferenceRequest) { + SetUserMFAPreferenceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(SetUserMFAPreferenceRequest = exports.SetUserMFAPreferenceRequest || (exports.SetUserMFAPreferenceRequest = {})); +var SetUserMFAPreferenceResponse; +(function (SetUserMFAPreferenceResponse) { + SetUserMFAPreferenceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetUserMFAPreferenceResponse = exports.SetUserMFAPreferenceResponse || (exports.SetUserMFAPreferenceResponse = {})); +var SetUserPoolMfaConfigRequest; +(function (SetUserPoolMfaConfigRequest) { + SetUserPoolMfaConfigRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetUserPoolMfaConfigRequest = exports.SetUserPoolMfaConfigRequest || (exports.SetUserPoolMfaConfigRequest = {})); +var SetUserPoolMfaConfigResponse; +(function (SetUserPoolMfaConfigResponse) { + SetUserPoolMfaConfigResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetUserPoolMfaConfigResponse = exports.SetUserPoolMfaConfigResponse || (exports.SetUserPoolMfaConfigResponse = {})); +var SetUserSettingsRequest; +(function (SetUserSettingsRequest) { + SetUserSettingsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(SetUserSettingsRequest = exports.SetUserSettingsRequest || (exports.SetUserSettingsRequest = {})); +var SetUserSettingsResponse; +(function (SetUserSettingsResponse) { + SetUserSettingsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetUserSettingsResponse = exports.SetUserSettingsResponse || (exports.SetUserSettingsResponse = {})); +var SignUpRequest; +(function (SignUpRequest) { + SignUpRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + ...(obj.SecretHash && { SecretHash: smithy_client_1.SENSITIVE_STRING }), + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + ...(obj.Password && { Password: smithy_client_1.SENSITIVE_STRING }), + ...(obj.UserAttributes && { + UserAttributes: obj.UserAttributes.map((item) => AttributeType.filterSensitiveLog(item)), + }), + ...(obj.ValidationData && { + ValidationData: obj.ValidationData.map((item) => AttributeType.filterSensitiveLog(item)), + }), + }); +})(SignUpRequest = exports.SignUpRequest || (exports.SignUpRequest = {})); +var SignUpResponse; +(function (SignUpResponse) { + SignUpResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SignUpResponse = exports.SignUpResponse || (exports.SignUpResponse = {})); +var StartUserImportJobRequest; +(function (StartUserImportJobRequest) { + StartUserImportJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartUserImportJobRequest = exports.StartUserImportJobRequest || (exports.StartUserImportJobRequest = {})); +var StartUserImportJobResponse; +(function (StartUserImportJobResponse) { + StartUserImportJobResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartUserImportJobResponse = exports.StartUserImportJobResponse || (exports.StartUserImportJobResponse = {})); +var StopUserImportJobRequest; +(function (StopUserImportJobRequest) { + StopUserImportJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StopUserImportJobRequest = exports.StopUserImportJobRequest || (exports.StopUserImportJobRequest = {})); +var StopUserImportJobResponse; +(function (StopUserImportJobResponse) { + StopUserImportJobResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StopUserImportJobResponse = exports.StopUserImportJobResponse || (exports.StopUserImportJobResponse = {})); +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 = {})); +//# sourceMappingURL=models_0.js.map + +/***/ }), + +/***/ 1086: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.VerifyUserAttributeResponse = exports.VerifyUserAttributeRequest = exports.VerifySoftwareTokenResponse = exports.VerifySoftwareTokenResponseType = exports.VerifySoftwareTokenRequest = exports.EnableSoftwareTokenMFAException = exports.UpdateUserPoolDomainResponse = exports.UpdateUserPoolDomainRequest = exports.UpdateUserPoolClientResponse = exports.UpdateUserPoolClientRequest = exports.UpdateUserPoolResponse = exports.UpdateUserPoolRequest = exports.UpdateUserAttributesResponse = exports.UpdateUserAttributesRequest = exports.UpdateResourceServerResponse = exports.UpdateResourceServerRequest = exports.UpdateIdentityProviderResponse = exports.UpdateIdentityProviderRequest = exports.UpdateGroupResponse = exports.UpdateGroupRequest = exports.UpdateDeviceStatusResponse = exports.UpdateDeviceStatusRequest = exports.UpdateAuthEventFeedbackResponse = exports.UpdateAuthEventFeedbackRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = void 0; +const models_0_1 = __nccwpck_require__(38771); +const smithy_client_1 = __nccwpck_require__(84060); +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 UpdateAuthEventFeedbackRequest; +(function (UpdateAuthEventFeedbackRequest) { + UpdateAuthEventFeedbackRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Username && { Username: smithy_client_1.SENSITIVE_STRING }), + ...(obj.FeedbackToken && { FeedbackToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(UpdateAuthEventFeedbackRequest = exports.UpdateAuthEventFeedbackRequest || (exports.UpdateAuthEventFeedbackRequest = {})); +var UpdateAuthEventFeedbackResponse; +(function (UpdateAuthEventFeedbackResponse) { + UpdateAuthEventFeedbackResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateAuthEventFeedbackResponse = exports.UpdateAuthEventFeedbackResponse || (exports.UpdateAuthEventFeedbackResponse = {})); +var UpdateDeviceStatusRequest; +(function (UpdateDeviceStatusRequest) { + UpdateDeviceStatusRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(UpdateDeviceStatusRequest = exports.UpdateDeviceStatusRequest || (exports.UpdateDeviceStatusRequest = {})); +var UpdateDeviceStatusResponse; +(function (UpdateDeviceStatusResponse) { + UpdateDeviceStatusResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateDeviceStatusResponse = exports.UpdateDeviceStatusResponse || (exports.UpdateDeviceStatusResponse = {})); +var UpdateGroupRequest; +(function (UpdateGroupRequest) { + UpdateGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateGroupRequest = exports.UpdateGroupRequest || (exports.UpdateGroupRequest = {})); +var UpdateGroupResponse; +(function (UpdateGroupResponse) { + UpdateGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateGroupResponse = exports.UpdateGroupResponse || (exports.UpdateGroupResponse = {})); +var UpdateIdentityProviderRequest; +(function (UpdateIdentityProviderRequest) { + UpdateIdentityProviderRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateIdentityProviderRequest = exports.UpdateIdentityProviderRequest || (exports.UpdateIdentityProviderRequest = {})); +var UpdateIdentityProviderResponse; +(function (UpdateIdentityProviderResponse) { + UpdateIdentityProviderResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateIdentityProviderResponse = exports.UpdateIdentityProviderResponse || (exports.UpdateIdentityProviderResponse = {})); +var UpdateResourceServerRequest; +(function (UpdateResourceServerRequest) { + UpdateResourceServerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateResourceServerRequest = exports.UpdateResourceServerRequest || (exports.UpdateResourceServerRequest = {})); +var UpdateResourceServerResponse; +(function (UpdateResourceServerResponse) { + UpdateResourceServerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateResourceServerResponse = exports.UpdateResourceServerResponse || (exports.UpdateResourceServerResponse = {})); +var UpdateUserAttributesRequest; +(function (UpdateUserAttributesRequest) { + UpdateUserAttributesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.UserAttributes && { + UserAttributes: obj.UserAttributes.map((item) => models_0_1.AttributeType.filterSensitiveLog(item)), + }), + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(UpdateUserAttributesRequest = exports.UpdateUserAttributesRequest || (exports.UpdateUserAttributesRequest = {})); +var UpdateUserAttributesResponse; +(function (UpdateUserAttributesResponse) { + UpdateUserAttributesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateUserAttributesResponse = exports.UpdateUserAttributesResponse || (exports.UpdateUserAttributesResponse = {})); +var UpdateUserPoolRequest; +(function (UpdateUserPoolRequest) { + UpdateUserPoolRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateUserPoolRequest = exports.UpdateUserPoolRequest || (exports.UpdateUserPoolRequest = {})); +var UpdateUserPoolResponse; +(function (UpdateUserPoolResponse) { + UpdateUserPoolResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateUserPoolResponse = exports.UpdateUserPoolResponse || (exports.UpdateUserPoolResponse = {})); +var UpdateUserPoolClientRequest; +(function (UpdateUserPoolClientRequest) { + UpdateUserPoolClientRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.ClientId && { ClientId: smithy_client_1.SENSITIVE_STRING }), + }); +})(UpdateUserPoolClientRequest = exports.UpdateUserPoolClientRequest || (exports.UpdateUserPoolClientRequest = {})); +var UpdateUserPoolClientResponse; +(function (UpdateUserPoolClientResponse) { + UpdateUserPoolClientResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.UserPoolClient && { UserPoolClient: models_0_1.UserPoolClientType.filterSensitiveLog(obj.UserPoolClient) }), + }); +})(UpdateUserPoolClientResponse = exports.UpdateUserPoolClientResponse || (exports.UpdateUserPoolClientResponse = {})); +var UpdateUserPoolDomainRequest; +(function (UpdateUserPoolDomainRequest) { + UpdateUserPoolDomainRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateUserPoolDomainRequest = exports.UpdateUserPoolDomainRequest || (exports.UpdateUserPoolDomainRequest = {})); +var UpdateUserPoolDomainResponse; +(function (UpdateUserPoolDomainResponse) { + UpdateUserPoolDomainResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateUserPoolDomainResponse = exports.UpdateUserPoolDomainResponse || (exports.UpdateUserPoolDomainResponse = {})); +var EnableSoftwareTokenMFAException; +(function (EnableSoftwareTokenMFAException) { + EnableSoftwareTokenMFAException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EnableSoftwareTokenMFAException = exports.EnableSoftwareTokenMFAException || (exports.EnableSoftwareTokenMFAException = {})); +var VerifySoftwareTokenRequest; +(function (VerifySoftwareTokenRequest) { + VerifySoftwareTokenRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(VerifySoftwareTokenRequest = exports.VerifySoftwareTokenRequest || (exports.VerifySoftwareTokenRequest = {})); +var VerifySoftwareTokenResponseType; +(function (VerifySoftwareTokenResponseType) { + VerifySoftwareTokenResponseType["ERROR"] = "ERROR"; + VerifySoftwareTokenResponseType["SUCCESS"] = "SUCCESS"; +})(VerifySoftwareTokenResponseType = exports.VerifySoftwareTokenResponseType || (exports.VerifySoftwareTokenResponseType = {})); +var VerifySoftwareTokenResponse; +(function (VerifySoftwareTokenResponse) { + VerifySoftwareTokenResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(VerifySoftwareTokenResponse = exports.VerifySoftwareTokenResponse || (exports.VerifySoftwareTokenResponse = {})); +var VerifyUserAttributeRequest; +(function (VerifyUserAttributeRequest) { + VerifyUserAttributeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.AccessToken && { AccessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(VerifyUserAttributeRequest = exports.VerifyUserAttributeRequest || (exports.VerifyUserAttributeRequest = {})); +var VerifyUserAttributeResponse; +(function (VerifyUserAttributeResponse) { + VerifyUserAttributeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(VerifyUserAttributeResponse = exports.VerifyUserAttributeResponse || (exports.VerifyUserAttributeResponse = {})); +//# sourceMappingURL=models_1.js.map + +/***/ }), + +/***/ 71298: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateAdminListGroupsForUser = void 0; +const CognitoIdentityProvider_1 = __nccwpck_require__(63436); +const CognitoIdentityProviderClient_1 = __nccwpck_require__(32756); +const AdminListGroupsForUserCommand_1 = __nccwpck_require__(4199); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new AdminListGroupsForUserCommand_1.AdminListGroupsForUserCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.adminListGroupsForUser(input, ...args); +}; +async function* paginateAdminListGroupsForUser(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["Limit"] = config.pageSize; + if (config.client instanceof CognitoIdentityProvider_1.CognitoIdentityProvider) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateAdminListGroupsForUser = paginateAdminListGroupsForUser; +//# sourceMappingURL=AdminListGroupsForUserPaginator.js.map + +/***/ }), + +/***/ 91606: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateAdminListUserAuthEvents = void 0; +const CognitoIdentityProvider_1 = __nccwpck_require__(63436); +const CognitoIdentityProviderClient_1 = __nccwpck_require__(32756); +const AdminListUserAuthEventsCommand_1 = __nccwpck_require__(76132); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new AdminListUserAuthEventsCommand_1.AdminListUserAuthEventsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.adminListUserAuthEvents(input, ...args); +}; +async function* paginateAdminListUserAuthEvents(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CognitoIdentityProvider_1.CognitoIdentityProvider) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateAdminListUserAuthEvents = paginateAdminListUserAuthEvents; +//# sourceMappingURL=AdminListUserAuthEventsPaginator.js.map + +/***/ }), + +/***/ 14865: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=Interfaces.js.map + +/***/ }), + +/***/ 42484: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListGroups = void 0; +const CognitoIdentityProvider_1 = __nccwpck_require__(63436); +const CognitoIdentityProviderClient_1 = __nccwpck_require__(32756); +const ListGroupsCommand_1 = __nccwpck_require__(39386); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListGroupsCommand_1.ListGroupsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listGroups(input, ...args); +}; +async function* paginateListGroups(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["Limit"] = config.pageSize; + if (config.client instanceof CognitoIdentityProvider_1.CognitoIdentityProvider) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListGroups = paginateListGroups; +//# sourceMappingURL=ListGroupsPaginator.js.map + +/***/ }), + +/***/ 24624: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListIdentityProviders = void 0; +const CognitoIdentityProvider_1 = __nccwpck_require__(63436); +const CognitoIdentityProviderClient_1 = __nccwpck_require__(32756); +const ListIdentityProvidersCommand_1 = __nccwpck_require__(73419); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListIdentityProvidersCommand_1.ListIdentityProvidersCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listIdentityProviders(input, ...args); +}; +async function* paginateListIdentityProviders(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CognitoIdentityProvider_1.CognitoIdentityProvider) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListIdentityProviders = paginateListIdentityProviders; +//# sourceMappingURL=ListIdentityProvidersPaginator.js.map + +/***/ }), + +/***/ 56595: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListResourceServers = void 0; +const CognitoIdentityProvider_1 = __nccwpck_require__(63436); +const CognitoIdentityProviderClient_1 = __nccwpck_require__(32756); +const ListResourceServersCommand_1 = __nccwpck_require__(93783); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListResourceServersCommand_1.ListResourceServersCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listResourceServers(input, ...args); +}; +async function* paginateListResourceServers(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CognitoIdentityProvider_1.CognitoIdentityProvider) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListResourceServers = paginateListResourceServers; +//# sourceMappingURL=ListResourceServersPaginator.js.map + +/***/ }), + +/***/ 64835: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListUserPoolClients = void 0; +const CognitoIdentityProvider_1 = __nccwpck_require__(63436); +const CognitoIdentityProviderClient_1 = __nccwpck_require__(32756); +const ListUserPoolClientsCommand_1 = __nccwpck_require__(87753); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListUserPoolClientsCommand_1.ListUserPoolClientsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listUserPoolClients(input, ...args); +}; +async function* paginateListUserPoolClients(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CognitoIdentityProvider_1.CognitoIdentityProvider) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListUserPoolClients = paginateListUserPoolClients; +//# sourceMappingURL=ListUserPoolClientsPaginator.js.map + +/***/ }), + +/***/ 79983: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListUserPools = void 0; +const CognitoIdentityProvider_1 = __nccwpck_require__(63436); +const CognitoIdentityProviderClient_1 = __nccwpck_require__(32756); +const ListUserPoolsCommand_1 = __nccwpck_require__(51756); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListUserPoolsCommand_1.ListUserPoolsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listUserPools(input, ...args); +}; +async function* paginateListUserPools(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CognitoIdentityProvider_1.CognitoIdentityProvider) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListUserPools = paginateListUserPools; +//# sourceMappingURL=ListUserPoolsPaginator.js.map + +/***/ }), + +/***/ 24558: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListUsersInGroup = void 0; +const CognitoIdentityProvider_1 = __nccwpck_require__(63436); +const CognitoIdentityProviderClient_1 = __nccwpck_require__(32756); +const ListUsersInGroupCommand_1 = __nccwpck_require__(51577); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListUsersInGroupCommand_1.ListUsersInGroupCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listUsersInGroup(input, ...args); +}; +async function* paginateListUsersInGroup(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["Limit"] = config.pageSize; + if (config.client instanceof CognitoIdentityProvider_1.CognitoIdentityProvider) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListUsersInGroup = paginateListUsersInGroup; +//# sourceMappingURL=ListUsersInGroupPaginator.js.map + +/***/ }), + +/***/ 23221: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListUsers = void 0; +const CognitoIdentityProvider_1 = __nccwpck_require__(63436); +const CognitoIdentityProviderClient_1 = __nccwpck_require__(32756); +const ListUsersCommand_1 = __nccwpck_require__(16854); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListUsersCommand_1.ListUsersCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listUsers(input, ...args); +}; +async function* paginateListUsers(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.PaginationToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.PaginationToken = token; + input["Limit"] = config.pageSize; + if (config.client instanceof CognitoIdentityProvider_1.CognitoIdentityProvider) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient"); + } + yield page; + token = page.PaginationToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListUsers = paginateListUsers; +//# sourceMappingURL=ListUsersPaginator.js.map + +/***/ }), + +/***/ 91522: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.serializeAws_json1_1DescribeRiskConfigurationCommand = exports.serializeAws_json1_1DescribeResourceServerCommand = exports.serializeAws_json1_1DescribeIdentityProviderCommand = exports.serializeAws_json1_1DeleteUserPoolDomainCommand = exports.serializeAws_json1_1DeleteUserPoolClientCommand = exports.serializeAws_json1_1DeleteUserPoolCommand = exports.serializeAws_json1_1DeleteUserAttributesCommand = exports.serializeAws_json1_1DeleteUserCommand = exports.serializeAws_json1_1DeleteResourceServerCommand = exports.serializeAws_json1_1DeleteIdentityProviderCommand = exports.serializeAws_json1_1DeleteGroupCommand = exports.serializeAws_json1_1CreateUserPoolDomainCommand = exports.serializeAws_json1_1CreateUserPoolClientCommand = exports.serializeAws_json1_1CreateUserPoolCommand = exports.serializeAws_json1_1CreateUserImportJobCommand = exports.serializeAws_json1_1CreateResourceServerCommand = exports.serializeAws_json1_1CreateIdentityProviderCommand = exports.serializeAws_json1_1CreateGroupCommand = exports.serializeAws_json1_1ConfirmSignUpCommand = exports.serializeAws_json1_1ConfirmForgotPasswordCommand = exports.serializeAws_json1_1ConfirmDeviceCommand = exports.serializeAws_json1_1ChangePasswordCommand = exports.serializeAws_json1_1AssociateSoftwareTokenCommand = exports.serializeAws_json1_1AdminUserGlobalSignOutCommand = exports.serializeAws_json1_1AdminUpdateUserAttributesCommand = exports.serializeAws_json1_1AdminUpdateDeviceStatusCommand = exports.serializeAws_json1_1AdminUpdateAuthEventFeedbackCommand = exports.serializeAws_json1_1AdminSetUserSettingsCommand = exports.serializeAws_json1_1AdminSetUserPasswordCommand = exports.serializeAws_json1_1AdminSetUserMFAPreferenceCommand = exports.serializeAws_json1_1AdminRespondToAuthChallengeCommand = exports.serializeAws_json1_1AdminResetUserPasswordCommand = exports.serializeAws_json1_1AdminRemoveUserFromGroupCommand = exports.serializeAws_json1_1AdminListUserAuthEventsCommand = exports.serializeAws_json1_1AdminListGroupsForUserCommand = exports.serializeAws_json1_1AdminListDevicesCommand = exports.serializeAws_json1_1AdminLinkProviderForUserCommand = exports.serializeAws_json1_1AdminInitiateAuthCommand = exports.serializeAws_json1_1AdminGetUserCommand = exports.serializeAws_json1_1AdminGetDeviceCommand = exports.serializeAws_json1_1AdminForgetDeviceCommand = exports.serializeAws_json1_1AdminEnableUserCommand = exports.serializeAws_json1_1AdminDisableUserCommand = exports.serializeAws_json1_1AdminDisableProviderForUserCommand = exports.serializeAws_json1_1AdminDeleteUserAttributesCommand = exports.serializeAws_json1_1AdminDeleteUserCommand = exports.serializeAws_json1_1AdminCreateUserCommand = exports.serializeAws_json1_1AdminConfirmSignUpCommand = exports.serializeAws_json1_1AdminAddUserToGroupCommand = exports.serializeAws_json1_1AddCustomAttributesCommand = void 0; +exports.serializeAws_json1_1VerifyUserAttributeCommand = exports.serializeAws_json1_1VerifySoftwareTokenCommand = exports.serializeAws_json1_1UpdateUserPoolDomainCommand = exports.serializeAws_json1_1UpdateUserPoolClientCommand = exports.serializeAws_json1_1UpdateUserPoolCommand = exports.serializeAws_json1_1UpdateUserAttributesCommand = exports.serializeAws_json1_1UpdateResourceServerCommand = exports.serializeAws_json1_1UpdateIdentityProviderCommand = exports.serializeAws_json1_1UpdateGroupCommand = exports.serializeAws_json1_1UpdateDeviceStatusCommand = exports.serializeAws_json1_1UpdateAuthEventFeedbackCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1StopUserImportJobCommand = exports.serializeAws_json1_1StartUserImportJobCommand = exports.serializeAws_json1_1SignUpCommand = exports.serializeAws_json1_1SetUserSettingsCommand = exports.serializeAws_json1_1SetUserPoolMfaConfigCommand = exports.serializeAws_json1_1SetUserMFAPreferenceCommand = exports.serializeAws_json1_1SetUICustomizationCommand = exports.serializeAws_json1_1SetRiskConfigurationCommand = exports.serializeAws_json1_1RespondToAuthChallengeCommand = exports.serializeAws_json1_1ResendConfirmationCodeCommand = exports.serializeAws_json1_1ListUsersInGroupCommand = exports.serializeAws_json1_1ListUsersCommand = exports.serializeAws_json1_1ListUserPoolsCommand = exports.serializeAws_json1_1ListUserPoolClientsCommand = exports.serializeAws_json1_1ListUserImportJobsCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1ListResourceServersCommand = exports.serializeAws_json1_1ListIdentityProvidersCommand = exports.serializeAws_json1_1ListGroupsCommand = exports.serializeAws_json1_1ListDevicesCommand = exports.serializeAws_json1_1InitiateAuthCommand = exports.serializeAws_json1_1GlobalSignOutCommand = exports.serializeAws_json1_1GetUserPoolMfaConfigCommand = exports.serializeAws_json1_1GetUserAttributeVerificationCodeCommand = exports.serializeAws_json1_1GetUserCommand = exports.serializeAws_json1_1GetUICustomizationCommand = exports.serializeAws_json1_1GetSigningCertificateCommand = exports.serializeAws_json1_1GetIdentityProviderByIdentifierCommand = exports.serializeAws_json1_1GetGroupCommand = exports.serializeAws_json1_1GetDeviceCommand = exports.serializeAws_json1_1GetCSVHeaderCommand = exports.serializeAws_json1_1ForgotPasswordCommand = exports.serializeAws_json1_1ForgetDeviceCommand = exports.serializeAws_json1_1DescribeUserPoolDomainCommand = exports.serializeAws_json1_1DescribeUserPoolClientCommand = exports.serializeAws_json1_1DescribeUserPoolCommand = exports.serializeAws_json1_1DescribeUserImportJobCommand = void 0; +exports.deserializeAws_json1_1DescribeRiskConfigurationCommand = exports.deserializeAws_json1_1DescribeResourceServerCommand = exports.deserializeAws_json1_1DescribeIdentityProviderCommand = exports.deserializeAws_json1_1DeleteUserPoolDomainCommand = exports.deserializeAws_json1_1DeleteUserPoolClientCommand = exports.deserializeAws_json1_1DeleteUserPoolCommand = exports.deserializeAws_json1_1DeleteUserAttributesCommand = exports.deserializeAws_json1_1DeleteUserCommand = exports.deserializeAws_json1_1DeleteResourceServerCommand = exports.deserializeAws_json1_1DeleteIdentityProviderCommand = exports.deserializeAws_json1_1DeleteGroupCommand = exports.deserializeAws_json1_1CreateUserPoolDomainCommand = exports.deserializeAws_json1_1CreateUserPoolClientCommand = exports.deserializeAws_json1_1CreateUserPoolCommand = exports.deserializeAws_json1_1CreateUserImportJobCommand = exports.deserializeAws_json1_1CreateResourceServerCommand = exports.deserializeAws_json1_1CreateIdentityProviderCommand = exports.deserializeAws_json1_1CreateGroupCommand = exports.deserializeAws_json1_1ConfirmSignUpCommand = exports.deserializeAws_json1_1ConfirmForgotPasswordCommand = exports.deserializeAws_json1_1ConfirmDeviceCommand = exports.deserializeAws_json1_1ChangePasswordCommand = exports.deserializeAws_json1_1AssociateSoftwareTokenCommand = exports.deserializeAws_json1_1AdminUserGlobalSignOutCommand = exports.deserializeAws_json1_1AdminUpdateUserAttributesCommand = exports.deserializeAws_json1_1AdminUpdateDeviceStatusCommand = exports.deserializeAws_json1_1AdminUpdateAuthEventFeedbackCommand = exports.deserializeAws_json1_1AdminSetUserSettingsCommand = exports.deserializeAws_json1_1AdminSetUserPasswordCommand = exports.deserializeAws_json1_1AdminSetUserMFAPreferenceCommand = exports.deserializeAws_json1_1AdminRespondToAuthChallengeCommand = exports.deserializeAws_json1_1AdminResetUserPasswordCommand = exports.deserializeAws_json1_1AdminRemoveUserFromGroupCommand = exports.deserializeAws_json1_1AdminListUserAuthEventsCommand = exports.deserializeAws_json1_1AdminListGroupsForUserCommand = exports.deserializeAws_json1_1AdminListDevicesCommand = exports.deserializeAws_json1_1AdminLinkProviderForUserCommand = exports.deserializeAws_json1_1AdminInitiateAuthCommand = exports.deserializeAws_json1_1AdminGetUserCommand = exports.deserializeAws_json1_1AdminGetDeviceCommand = exports.deserializeAws_json1_1AdminForgetDeviceCommand = exports.deserializeAws_json1_1AdminEnableUserCommand = exports.deserializeAws_json1_1AdminDisableUserCommand = exports.deserializeAws_json1_1AdminDisableProviderForUserCommand = exports.deserializeAws_json1_1AdminDeleteUserAttributesCommand = exports.deserializeAws_json1_1AdminDeleteUserCommand = exports.deserializeAws_json1_1AdminCreateUserCommand = exports.deserializeAws_json1_1AdminConfirmSignUpCommand = exports.deserializeAws_json1_1AdminAddUserToGroupCommand = exports.deserializeAws_json1_1AddCustomAttributesCommand = void 0; +exports.deserializeAws_json1_1VerifyUserAttributeCommand = exports.deserializeAws_json1_1VerifySoftwareTokenCommand = exports.deserializeAws_json1_1UpdateUserPoolDomainCommand = exports.deserializeAws_json1_1UpdateUserPoolClientCommand = exports.deserializeAws_json1_1UpdateUserPoolCommand = exports.deserializeAws_json1_1UpdateUserAttributesCommand = exports.deserializeAws_json1_1UpdateResourceServerCommand = exports.deserializeAws_json1_1UpdateIdentityProviderCommand = exports.deserializeAws_json1_1UpdateGroupCommand = exports.deserializeAws_json1_1UpdateDeviceStatusCommand = exports.deserializeAws_json1_1UpdateAuthEventFeedbackCommand = exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1StopUserImportJobCommand = exports.deserializeAws_json1_1StartUserImportJobCommand = exports.deserializeAws_json1_1SignUpCommand = exports.deserializeAws_json1_1SetUserSettingsCommand = exports.deserializeAws_json1_1SetUserPoolMfaConfigCommand = exports.deserializeAws_json1_1SetUserMFAPreferenceCommand = exports.deserializeAws_json1_1SetUICustomizationCommand = exports.deserializeAws_json1_1SetRiskConfigurationCommand = exports.deserializeAws_json1_1RespondToAuthChallengeCommand = exports.deserializeAws_json1_1ResendConfirmationCodeCommand = exports.deserializeAws_json1_1ListUsersInGroupCommand = exports.deserializeAws_json1_1ListUsersCommand = exports.deserializeAws_json1_1ListUserPoolsCommand = exports.deserializeAws_json1_1ListUserPoolClientsCommand = exports.deserializeAws_json1_1ListUserImportJobsCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1ListResourceServersCommand = exports.deserializeAws_json1_1ListIdentityProvidersCommand = exports.deserializeAws_json1_1ListGroupsCommand = exports.deserializeAws_json1_1ListDevicesCommand = exports.deserializeAws_json1_1InitiateAuthCommand = exports.deserializeAws_json1_1GlobalSignOutCommand = exports.deserializeAws_json1_1GetUserPoolMfaConfigCommand = exports.deserializeAws_json1_1GetUserAttributeVerificationCodeCommand = exports.deserializeAws_json1_1GetUserCommand = exports.deserializeAws_json1_1GetUICustomizationCommand = exports.deserializeAws_json1_1GetSigningCertificateCommand = exports.deserializeAws_json1_1GetIdentityProviderByIdentifierCommand = exports.deserializeAws_json1_1GetGroupCommand = exports.deserializeAws_json1_1GetDeviceCommand = exports.deserializeAws_json1_1GetCSVHeaderCommand = exports.deserializeAws_json1_1ForgotPasswordCommand = exports.deserializeAws_json1_1ForgetDeviceCommand = exports.deserializeAws_json1_1DescribeUserPoolDomainCommand = exports.deserializeAws_json1_1DescribeUserPoolClientCommand = exports.deserializeAws_json1_1DescribeUserPoolCommand = exports.deserializeAws_json1_1DescribeUserImportJobCommand = void 0; +const protocol_http_1 = __nccwpck_require__(67498); +const serializeAws_json1_1AddCustomAttributesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AddCustomAttributes", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AddCustomAttributesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AddCustomAttributesCommand = serializeAws_json1_1AddCustomAttributesCommand; +const serializeAws_json1_1AdminAddUserToGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminAddUserToGroup", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminAddUserToGroupRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminAddUserToGroupCommand = serializeAws_json1_1AdminAddUserToGroupCommand; +const serializeAws_json1_1AdminConfirmSignUpCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminConfirmSignUp", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminConfirmSignUpRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminConfirmSignUpCommand = serializeAws_json1_1AdminConfirmSignUpCommand; +const serializeAws_json1_1AdminCreateUserCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminCreateUser", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminCreateUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminCreateUserCommand = serializeAws_json1_1AdminCreateUserCommand; +const serializeAws_json1_1AdminDeleteUserCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminDeleteUser", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminDeleteUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminDeleteUserCommand = serializeAws_json1_1AdminDeleteUserCommand; +const serializeAws_json1_1AdminDeleteUserAttributesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminDeleteUserAttributes", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminDeleteUserAttributesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminDeleteUserAttributesCommand = serializeAws_json1_1AdminDeleteUserAttributesCommand; +const serializeAws_json1_1AdminDisableProviderForUserCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminDisableProviderForUser", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminDisableProviderForUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminDisableProviderForUserCommand = serializeAws_json1_1AdminDisableProviderForUserCommand; +const serializeAws_json1_1AdminDisableUserCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminDisableUser", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminDisableUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminDisableUserCommand = serializeAws_json1_1AdminDisableUserCommand; +const serializeAws_json1_1AdminEnableUserCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminEnableUser", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminEnableUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminEnableUserCommand = serializeAws_json1_1AdminEnableUserCommand; +const serializeAws_json1_1AdminForgetDeviceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminForgetDevice", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminForgetDeviceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminForgetDeviceCommand = serializeAws_json1_1AdminForgetDeviceCommand; +const serializeAws_json1_1AdminGetDeviceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminGetDevice", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminGetDeviceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminGetDeviceCommand = serializeAws_json1_1AdminGetDeviceCommand; +const serializeAws_json1_1AdminGetUserCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminGetUser", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminGetUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminGetUserCommand = serializeAws_json1_1AdminGetUserCommand; +const serializeAws_json1_1AdminInitiateAuthCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminInitiateAuth", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminInitiateAuthRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminInitiateAuthCommand = serializeAws_json1_1AdminInitiateAuthCommand; +const serializeAws_json1_1AdminLinkProviderForUserCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminLinkProviderForUser", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminLinkProviderForUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminLinkProviderForUserCommand = serializeAws_json1_1AdminLinkProviderForUserCommand; +const serializeAws_json1_1AdminListDevicesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminListDevices", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminListDevicesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminListDevicesCommand = serializeAws_json1_1AdminListDevicesCommand; +const serializeAws_json1_1AdminListGroupsForUserCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminListGroupsForUser", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminListGroupsForUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminListGroupsForUserCommand = serializeAws_json1_1AdminListGroupsForUserCommand; +const serializeAws_json1_1AdminListUserAuthEventsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminListUserAuthEvents", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminListUserAuthEventsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminListUserAuthEventsCommand = serializeAws_json1_1AdminListUserAuthEventsCommand; +const serializeAws_json1_1AdminRemoveUserFromGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminRemoveUserFromGroup", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminRemoveUserFromGroupRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminRemoveUserFromGroupCommand = serializeAws_json1_1AdminRemoveUserFromGroupCommand; +const serializeAws_json1_1AdminResetUserPasswordCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminResetUserPassword", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminResetUserPasswordRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminResetUserPasswordCommand = serializeAws_json1_1AdminResetUserPasswordCommand; +const serializeAws_json1_1AdminRespondToAuthChallengeCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminRespondToAuthChallenge", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminRespondToAuthChallengeRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminRespondToAuthChallengeCommand = serializeAws_json1_1AdminRespondToAuthChallengeCommand; +const serializeAws_json1_1AdminSetUserMFAPreferenceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminSetUserMFAPreference", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminSetUserMFAPreferenceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminSetUserMFAPreferenceCommand = serializeAws_json1_1AdminSetUserMFAPreferenceCommand; +const serializeAws_json1_1AdminSetUserPasswordCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminSetUserPassword", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminSetUserPasswordRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminSetUserPasswordCommand = serializeAws_json1_1AdminSetUserPasswordCommand; +const serializeAws_json1_1AdminSetUserSettingsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminSetUserSettings", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminSetUserSettingsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminSetUserSettingsCommand = serializeAws_json1_1AdminSetUserSettingsCommand; +const serializeAws_json1_1AdminUpdateAuthEventFeedbackCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminUpdateAuthEventFeedback", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminUpdateAuthEventFeedbackRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminUpdateAuthEventFeedbackCommand = serializeAws_json1_1AdminUpdateAuthEventFeedbackCommand; +const serializeAws_json1_1AdminUpdateDeviceStatusCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminUpdateDeviceStatus", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminUpdateDeviceStatusRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminUpdateDeviceStatusCommand = serializeAws_json1_1AdminUpdateDeviceStatusCommand; +const serializeAws_json1_1AdminUpdateUserAttributesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminUpdateUserAttributes", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminUpdateUserAttributesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminUpdateUserAttributesCommand = serializeAws_json1_1AdminUpdateUserAttributesCommand; +const serializeAws_json1_1AdminUserGlobalSignOutCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AdminUserGlobalSignOut", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AdminUserGlobalSignOutRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AdminUserGlobalSignOutCommand = serializeAws_json1_1AdminUserGlobalSignOutCommand; +const serializeAws_json1_1AssociateSoftwareTokenCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.AssociateSoftwareToken", + }; + let body; + body = JSON.stringify(serializeAws_json1_1AssociateSoftwareTokenRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1AssociateSoftwareTokenCommand = serializeAws_json1_1AssociateSoftwareTokenCommand; +const serializeAws_json1_1ChangePasswordCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ChangePassword", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ChangePasswordRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ChangePasswordCommand = serializeAws_json1_1ChangePasswordCommand; +const serializeAws_json1_1ConfirmDeviceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ConfirmDevice", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ConfirmDeviceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ConfirmDeviceCommand = serializeAws_json1_1ConfirmDeviceCommand; +const serializeAws_json1_1ConfirmForgotPasswordCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ConfirmForgotPassword", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ConfirmForgotPasswordRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ConfirmForgotPasswordCommand = serializeAws_json1_1ConfirmForgotPasswordCommand; +const serializeAws_json1_1ConfirmSignUpCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ConfirmSignUp", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ConfirmSignUpRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ConfirmSignUpCommand = serializeAws_json1_1ConfirmSignUpCommand; +const serializeAws_json1_1CreateGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.CreateGroup", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreateGroupRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreateGroupCommand = serializeAws_json1_1CreateGroupCommand; +const serializeAws_json1_1CreateIdentityProviderCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.CreateIdentityProvider", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreateIdentityProviderRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreateIdentityProviderCommand = serializeAws_json1_1CreateIdentityProviderCommand; +const serializeAws_json1_1CreateResourceServerCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.CreateResourceServer", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreateResourceServerRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreateResourceServerCommand = serializeAws_json1_1CreateResourceServerCommand; +const serializeAws_json1_1CreateUserImportJobCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.CreateUserImportJob", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreateUserImportJobRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreateUserImportJobCommand = serializeAws_json1_1CreateUserImportJobCommand; +const serializeAws_json1_1CreateUserPoolCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.CreateUserPool", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreateUserPoolRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreateUserPoolCommand = serializeAws_json1_1CreateUserPoolCommand; +const serializeAws_json1_1CreateUserPoolClientCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.CreateUserPoolClient", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreateUserPoolClientRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreateUserPoolClientCommand = serializeAws_json1_1CreateUserPoolClientCommand; +const serializeAws_json1_1CreateUserPoolDomainCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.CreateUserPoolDomain", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreateUserPoolDomainRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreateUserPoolDomainCommand = serializeAws_json1_1CreateUserPoolDomainCommand; +const serializeAws_json1_1DeleteGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DeleteGroup", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteGroupRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteGroupCommand = serializeAws_json1_1DeleteGroupCommand; +const serializeAws_json1_1DeleteIdentityProviderCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DeleteIdentityProvider", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteIdentityProviderRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteIdentityProviderCommand = serializeAws_json1_1DeleteIdentityProviderCommand; +const serializeAws_json1_1DeleteResourceServerCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DeleteResourceServer", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteResourceServerRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteResourceServerCommand = serializeAws_json1_1DeleteResourceServerCommand; +const serializeAws_json1_1DeleteUserCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DeleteUser", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteUserCommand = serializeAws_json1_1DeleteUserCommand; +const serializeAws_json1_1DeleteUserAttributesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DeleteUserAttributes", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteUserAttributesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteUserAttributesCommand = serializeAws_json1_1DeleteUserAttributesCommand; +const serializeAws_json1_1DeleteUserPoolCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DeleteUserPool", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteUserPoolRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteUserPoolCommand = serializeAws_json1_1DeleteUserPoolCommand; +const serializeAws_json1_1DeleteUserPoolClientCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DeleteUserPoolClient", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteUserPoolClientRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteUserPoolClientCommand = serializeAws_json1_1DeleteUserPoolClientCommand; +const serializeAws_json1_1DeleteUserPoolDomainCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DeleteUserPoolDomain", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteUserPoolDomainRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteUserPoolDomainCommand = serializeAws_json1_1DeleteUserPoolDomainCommand; +const serializeAws_json1_1DescribeIdentityProviderCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DescribeIdentityProvider", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeIdentityProviderRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeIdentityProviderCommand = serializeAws_json1_1DescribeIdentityProviderCommand; +const serializeAws_json1_1DescribeResourceServerCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DescribeResourceServer", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeResourceServerRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeResourceServerCommand = serializeAws_json1_1DescribeResourceServerCommand; +const serializeAws_json1_1DescribeRiskConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DescribeRiskConfiguration", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeRiskConfigurationRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeRiskConfigurationCommand = serializeAws_json1_1DescribeRiskConfigurationCommand; +const serializeAws_json1_1DescribeUserImportJobCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DescribeUserImportJob", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeUserImportJobRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeUserImportJobCommand = serializeAws_json1_1DescribeUserImportJobCommand; +const serializeAws_json1_1DescribeUserPoolCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DescribeUserPool", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeUserPoolRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeUserPoolCommand = serializeAws_json1_1DescribeUserPoolCommand; +const serializeAws_json1_1DescribeUserPoolClientCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DescribeUserPoolClient", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeUserPoolClientRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeUserPoolClientCommand = serializeAws_json1_1DescribeUserPoolClientCommand; +const serializeAws_json1_1DescribeUserPoolDomainCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.DescribeUserPoolDomain", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeUserPoolDomainRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeUserPoolDomainCommand = serializeAws_json1_1DescribeUserPoolDomainCommand; +const serializeAws_json1_1ForgetDeviceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ForgetDevice", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ForgetDeviceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ForgetDeviceCommand = serializeAws_json1_1ForgetDeviceCommand; +const serializeAws_json1_1ForgotPasswordCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ForgotPassword", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ForgotPasswordRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ForgotPasswordCommand = serializeAws_json1_1ForgotPasswordCommand; +const serializeAws_json1_1GetCSVHeaderCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.GetCSVHeader", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetCSVHeaderRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetCSVHeaderCommand = serializeAws_json1_1GetCSVHeaderCommand; +const serializeAws_json1_1GetDeviceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.GetDevice", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetDeviceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetDeviceCommand = serializeAws_json1_1GetDeviceCommand; +const serializeAws_json1_1GetGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.GetGroup", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetGroupRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetGroupCommand = serializeAws_json1_1GetGroupCommand; +const serializeAws_json1_1GetIdentityProviderByIdentifierCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.GetIdentityProviderByIdentifier", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetIdentityProviderByIdentifierRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetIdentityProviderByIdentifierCommand = serializeAws_json1_1GetIdentityProviderByIdentifierCommand; +const serializeAws_json1_1GetSigningCertificateCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.GetSigningCertificate", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetSigningCertificateRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetSigningCertificateCommand = serializeAws_json1_1GetSigningCertificateCommand; +const serializeAws_json1_1GetUICustomizationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.GetUICustomization", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetUICustomizationRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetUICustomizationCommand = serializeAws_json1_1GetUICustomizationCommand; +const serializeAws_json1_1GetUserCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.GetUser", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetUserCommand = serializeAws_json1_1GetUserCommand; +const serializeAws_json1_1GetUserAttributeVerificationCodeCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.GetUserAttributeVerificationCode", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetUserAttributeVerificationCodeRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetUserAttributeVerificationCodeCommand = serializeAws_json1_1GetUserAttributeVerificationCodeCommand; +const serializeAws_json1_1GetUserPoolMfaConfigCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.GetUserPoolMfaConfig", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetUserPoolMfaConfigRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetUserPoolMfaConfigCommand = serializeAws_json1_1GetUserPoolMfaConfigCommand; +const serializeAws_json1_1GlobalSignOutCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.GlobalSignOut", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GlobalSignOutRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GlobalSignOutCommand = serializeAws_json1_1GlobalSignOutCommand; +const serializeAws_json1_1InitiateAuthCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.InitiateAuth", + }; + let body; + body = JSON.stringify(serializeAws_json1_1InitiateAuthRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1InitiateAuthCommand = serializeAws_json1_1InitiateAuthCommand; +const serializeAws_json1_1ListDevicesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ListDevices", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListDevicesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListDevicesCommand = serializeAws_json1_1ListDevicesCommand; +const serializeAws_json1_1ListGroupsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ListGroups", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListGroupsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListGroupsCommand = serializeAws_json1_1ListGroupsCommand; +const serializeAws_json1_1ListIdentityProvidersCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ListIdentityProviders", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListIdentityProvidersRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListIdentityProvidersCommand = serializeAws_json1_1ListIdentityProvidersCommand; +const serializeAws_json1_1ListResourceServersCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ListResourceServers", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListResourceServersRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListResourceServersCommand = serializeAws_json1_1ListResourceServersCommand; +const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.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_1ListUserImportJobsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ListUserImportJobs", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListUserImportJobsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListUserImportJobsCommand = serializeAws_json1_1ListUserImportJobsCommand; +const serializeAws_json1_1ListUserPoolClientsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ListUserPoolClients", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListUserPoolClientsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListUserPoolClientsCommand = serializeAws_json1_1ListUserPoolClientsCommand; +const serializeAws_json1_1ListUserPoolsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ListUserPools", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListUserPoolsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListUserPoolsCommand = serializeAws_json1_1ListUserPoolsCommand; +const serializeAws_json1_1ListUsersCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ListUsers", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListUsersRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListUsersCommand = serializeAws_json1_1ListUsersCommand; +const serializeAws_json1_1ListUsersInGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ListUsersInGroup", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListUsersInGroupRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListUsersInGroupCommand = serializeAws_json1_1ListUsersInGroupCommand; +const serializeAws_json1_1ResendConfirmationCodeCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.ResendConfirmationCode", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ResendConfirmationCodeRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ResendConfirmationCodeCommand = serializeAws_json1_1ResendConfirmationCodeCommand; +const serializeAws_json1_1RespondToAuthChallengeCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.RespondToAuthChallenge", + }; + let body; + body = JSON.stringify(serializeAws_json1_1RespondToAuthChallengeRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1RespondToAuthChallengeCommand = serializeAws_json1_1RespondToAuthChallengeCommand; +const serializeAws_json1_1SetRiskConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.SetRiskConfiguration", + }; + let body; + body = JSON.stringify(serializeAws_json1_1SetRiskConfigurationRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1SetRiskConfigurationCommand = serializeAws_json1_1SetRiskConfigurationCommand; +const serializeAws_json1_1SetUICustomizationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.SetUICustomization", + }; + let body; + body = JSON.stringify(serializeAws_json1_1SetUICustomizationRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1SetUICustomizationCommand = serializeAws_json1_1SetUICustomizationCommand; +const serializeAws_json1_1SetUserMFAPreferenceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.SetUserMFAPreference", + }; + let body; + body = JSON.stringify(serializeAws_json1_1SetUserMFAPreferenceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1SetUserMFAPreferenceCommand = serializeAws_json1_1SetUserMFAPreferenceCommand; +const serializeAws_json1_1SetUserPoolMfaConfigCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.SetUserPoolMfaConfig", + }; + let body; + body = JSON.stringify(serializeAws_json1_1SetUserPoolMfaConfigRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1SetUserPoolMfaConfigCommand = serializeAws_json1_1SetUserPoolMfaConfigCommand; +const serializeAws_json1_1SetUserSettingsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.SetUserSettings", + }; + let body; + body = JSON.stringify(serializeAws_json1_1SetUserSettingsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1SetUserSettingsCommand = serializeAws_json1_1SetUserSettingsCommand; +const serializeAws_json1_1SignUpCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.SignUp", + }; + let body; + body = JSON.stringify(serializeAws_json1_1SignUpRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1SignUpCommand = serializeAws_json1_1SignUpCommand; +const serializeAws_json1_1StartUserImportJobCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.StartUserImportJob", + }; + let body; + body = JSON.stringify(serializeAws_json1_1StartUserImportJobRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1StartUserImportJobCommand = serializeAws_json1_1StartUserImportJobCommand; +const serializeAws_json1_1StopUserImportJobCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.StopUserImportJob", + }; + let body; + body = JSON.stringify(serializeAws_json1_1StopUserImportJobRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1StopUserImportJobCommand = serializeAws_json1_1StopUserImportJobCommand; +const serializeAws_json1_1TagResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.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": "AWSCognitoIdentityProviderService.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_1UpdateAuthEventFeedbackCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.UpdateAuthEventFeedback", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UpdateAuthEventFeedbackRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UpdateAuthEventFeedbackCommand = serializeAws_json1_1UpdateAuthEventFeedbackCommand; +const serializeAws_json1_1UpdateDeviceStatusCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.UpdateDeviceStatus", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UpdateDeviceStatusRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UpdateDeviceStatusCommand = serializeAws_json1_1UpdateDeviceStatusCommand; +const serializeAws_json1_1UpdateGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.UpdateGroup", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UpdateGroupRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UpdateGroupCommand = serializeAws_json1_1UpdateGroupCommand; +const serializeAws_json1_1UpdateIdentityProviderCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.UpdateIdentityProvider", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UpdateIdentityProviderRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UpdateIdentityProviderCommand = serializeAws_json1_1UpdateIdentityProviderCommand; +const serializeAws_json1_1UpdateResourceServerCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.UpdateResourceServer", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UpdateResourceServerRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UpdateResourceServerCommand = serializeAws_json1_1UpdateResourceServerCommand; +const serializeAws_json1_1UpdateUserAttributesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.UpdateUserAttributes", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UpdateUserAttributesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UpdateUserAttributesCommand = serializeAws_json1_1UpdateUserAttributesCommand; +const serializeAws_json1_1UpdateUserPoolCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.UpdateUserPool", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UpdateUserPoolRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UpdateUserPoolCommand = serializeAws_json1_1UpdateUserPoolCommand; +const serializeAws_json1_1UpdateUserPoolClientCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.UpdateUserPoolClient", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UpdateUserPoolClientRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UpdateUserPoolClientCommand = serializeAws_json1_1UpdateUserPoolClientCommand; +const serializeAws_json1_1UpdateUserPoolDomainCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.UpdateUserPoolDomain", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UpdateUserPoolDomainRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UpdateUserPoolDomainCommand = serializeAws_json1_1UpdateUserPoolDomainCommand; +const serializeAws_json1_1VerifySoftwareTokenCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.VerifySoftwareToken", + }; + let body; + body = JSON.stringify(serializeAws_json1_1VerifySoftwareTokenRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1VerifySoftwareTokenCommand = serializeAws_json1_1VerifySoftwareTokenCommand; +const serializeAws_json1_1VerifyUserAttributeCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityProviderService.VerifyUserAttribute", + }; + let body; + body = JSON.stringify(serializeAws_json1_1VerifyUserAttributeRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1VerifyUserAttributeCommand = serializeAws_json1_1VerifyUserAttributeCommand; +const deserializeAws_json1_1AddCustomAttributesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AddCustomAttributesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AddCustomAttributesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AddCustomAttributesCommand = deserializeAws_json1_1AddCustomAttributesCommand; +const deserializeAws_json1_1AddCustomAttributesCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserImportInProgressException": + case "com.amazonaws.cognitoidentityprovider#UserImportInProgressException": + response = { + ...(await deserializeAws_json1_1UserImportInProgressExceptionResponse(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_1AdminAddUserToGroupCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminAddUserToGroupCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminAddUserToGroupCommand = deserializeAws_json1_1AdminAddUserToGroupCommand; +const deserializeAws_json1_1AdminAddUserToGroupCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminConfirmSignUpCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminConfirmSignUpCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminConfirmSignUpResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminConfirmSignUpCommand = deserializeAws_json1_1AdminConfirmSignUpCommand; +const deserializeAws_json1_1AdminConfirmSignUpCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyFailedAttemptsException": + case "com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException": + response = { + ...(await deserializeAws_json1_1TooManyFailedAttemptsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminCreateUserCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminCreateUserCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminCreateUserResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminCreateUserCommand = deserializeAws_json1_1AdminCreateUserCommand; +const deserializeAws_json1_1AdminCreateUserCommandError = 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 "CodeDeliveryFailureException": + case "com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException": + response = { + ...(await deserializeAws_json1_1CodeDeliveryFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidPasswordException": + case "com.amazonaws.cognitoidentityprovider#InvalidPasswordException": + response = { + ...(await deserializeAws_json1_1InvalidPasswordExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PreconditionNotMetException": + case "com.amazonaws.cognitoidentityprovider#PreconditionNotMetException": + response = { + ...(await deserializeAws_json1_1PreconditionNotMetExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedUserStateException": + case "com.amazonaws.cognitoidentityprovider#UnsupportedUserStateException": + response = { + ...(await deserializeAws_json1_1UnsupportedUserStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UsernameExistsException": + case "com.amazonaws.cognitoidentityprovider#UsernameExistsException": + response = { + ...(await deserializeAws_json1_1UsernameExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminDeleteUserCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminDeleteUserCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminDeleteUserCommand = deserializeAws_json1_1AdminDeleteUserCommand; +const deserializeAws_json1_1AdminDeleteUserCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminDeleteUserAttributesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminDeleteUserAttributesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminDeleteUserAttributesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminDeleteUserAttributesCommand = deserializeAws_json1_1AdminDeleteUserAttributesCommand; +const deserializeAws_json1_1AdminDeleteUserAttributesCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminDisableProviderForUserCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminDisableProviderForUserCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminDisableProviderForUserResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminDisableProviderForUserCommand = deserializeAws_json1_1AdminDisableProviderForUserCommand; +const deserializeAws_json1_1AdminDisableProviderForUserCommandError = 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 "AliasExistsException": + case "com.amazonaws.cognitoidentityprovider#AliasExistsException": + response = { + ...(await deserializeAws_json1_1AliasExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminDisableUserCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminDisableUserCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminDisableUserResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminDisableUserCommand = deserializeAws_json1_1AdminDisableUserCommand; +const deserializeAws_json1_1AdminDisableUserCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminEnableUserCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminEnableUserCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminEnableUserResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminEnableUserCommand = deserializeAws_json1_1AdminEnableUserCommand; +const deserializeAws_json1_1AdminEnableUserCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminForgetDeviceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminForgetDeviceCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminForgetDeviceCommand = deserializeAws_json1_1AdminForgetDeviceCommand; +const deserializeAws_json1_1AdminForgetDeviceCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminGetDeviceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminGetDeviceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminGetDeviceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminGetDeviceCommand = deserializeAws_json1_1AdminGetDeviceCommand; +const deserializeAws_json1_1AdminGetDeviceCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1AdminGetUserCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminGetUserCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminGetUserResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminGetUserCommand = deserializeAws_json1_1AdminGetUserCommand; +const deserializeAws_json1_1AdminGetUserCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminInitiateAuthCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminInitiateAuthCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminInitiateAuthResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminInitiateAuthCommand = deserializeAws_json1_1AdminInitiateAuthCommand; +const deserializeAws_json1_1AdminInitiateAuthCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "MFAMethodNotFoundException": + case "com.amazonaws.cognitoidentityprovider#MFAMethodNotFoundException": + response = { + ...(await deserializeAws_json1_1MFAMethodNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminLinkProviderForUserCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminLinkProviderForUserCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminLinkProviderForUserResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminLinkProviderForUserCommand = deserializeAws_json1_1AdminLinkProviderForUserCommand; +const deserializeAws_json1_1AdminLinkProviderForUserCommandError = 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 "AliasExistsException": + case "com.amazonaws.cognitoidentityprovider#AliasExistsException": + response = { + ...(await deserializeAws_json1_1AliasExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminListDevicesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminListDevicesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminListDevicesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminListDevicesCommand = deserializeAws_json1_1AdminListDevicesCommand; +const deserializeAws_json1_1AdminListDevicesCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1AdminListGroupsForUserCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminListGroupsForUserCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminListGroupsForUserResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminListGroupsForUserCommand = deserializeAws_json1_1AdminListGroupsForUserCommand; +const deserializeAws_json1_1AdminListGroupsForUserCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminListUserAuthEventsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminListUserAuthEventsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminListUserAuthEventsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminListUserAuthEventsCommand = deserializeAws_json1_1AdminListUserAuthEventsCommand; +const deserializeAws_json1_1AdminListUserAuthEventsCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserPoolAddOnNotEnabledException": + case "com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException": + response = { + ...(await deserializeAws_json1_1UserPoolAddOnNotEnabledExceptionResponse(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_1AdminRemoveUserFromGroupCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminRemoveUserFromGroupCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminRemoveUserFromGroupCommand = deserializeAws_json1_1AdminRemoveUserFromGroupCommand; +const deserializeAws_json1_1AdminRemoveUserFromGroupCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminResetUserPasswordCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminResetUserPasswordCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminResetUserPasswordResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminResetUserPasswordCommand = deserializeAws_json1_1AdminResetUserPasswordCommand; +const deserializeAws_json1_1AdminResetUserPasswordCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidEmailRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminRespondToAuthChallengeCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminRespondToAuthChallengeCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminRespondToAuthChallengeResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminRespondToAuthChallengeCommand = deserializeAws_json1_1AdminRespondToAuthChallengeCommand; +const deserializeAws_json1_1AdminRespondToAuthChallengeCommandError = 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 "AliasExistsException": + case "com.amazonaws.cognitoidentityprovider#AliasExistsException": + response = { + ...(await deserializeAws_json1_1AliasExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "CodeMismatchException": + case "com.amazonaws.cognitoidentityprovider#CodeMismatchException": + response = { + ...(await deserializeAws_json1_1CodeMismatchExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ExpiredCodeException": + case "com.amazonaws.cognitoidentityprovider#ExpiredCodeException": + response = { + ...(await deserializeAws_json1_1ExpiredCodeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidPasswordException": + case "com.amazonaws.cognitoidentityprovider#InvalidPasswordException": + response = { + ...(await deserializeAws_json1_1InvalidPasswordExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "MFAMethodNotFoundException": + case "com.amazonaws.cognitoidentityprovider#MFAMethodNotFoundException": + response = { + ...(await deserializeAws_json1_1MFAMethodNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "SoftwareTokenMFANotFoundException": + case "com.amazonaws.cognitoidentityprovider#SoftwareTokenMFANotFoundException": + response = { + ...(await deserializeAws_json1_1SoftwareTokenMFANotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminSetUserMFAPreferenceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminSetUserMFAPreferenceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminSetUserMFAPreferenceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminSetUserMFAPreferenceCommand = deserializeAws_json1_1AdminSetUserMFAPreferenceCommand; +const deserializeAws_json1_1AdminSetUserMFAPreferenceCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminSetUserPasswordCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminSetUserPasswordCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminSetUserPasswordResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminSetUserPasswordCommand = deserializeAws_json1_1AdminSetUserPasswordCommand; +const deserializeAws_json1_1AdminSetUserPasswordCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidPasswordException": + case "com.amazonaws.cognitoidentityprovider#InvalidPasswordException": + response = { + ...(await deserializeAws_json1_1InvalidPasswordExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminSetUserSettingsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminSetUserSettingsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminSetUserSettingsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminSetUserSettingsCommand = deserializeAws_json1_1AdminSetUserSettingsCommand; +const deserializeAws_json1_1AdminSetUserSettingsCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminUpdateAuthEventFeedbackCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminUpdateAuthEventFeedbackCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminUpdateAuthEventFeedbackResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminUpdateAuthEventFeedbackCommand = deserializeAws_json1_1AdminUpdateAuthEventFeedbackCommand; +const deserializeAws_json1_1AdminUpdateAuthEventFeedbackCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserPoolAddOnNotEnabledException": + case "com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException": + response = { + ...(await deserializeAws_json1_1UserPoolAddOnNotEnabledExceptionResponse(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_1AdminUpdateDeviceStatusCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminUpdateDeviceStatusCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminUpdateDeviceStatusResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminUpdateDeviceStatusCommand = deserializeAws_json1_1AdminUpdateDeviceStatusCommand; +const deserializeAws_json1_1AdminUpdateDeviceStatusCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminUpdateUserAttributesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminUpdateUserAttributesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminUpdateUserAttributesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminUpdateUserAttributesCommand = deserializeAws_json1_1AdminUpdateUserAttributesCommand; +const deserializeAws_json1_1AdminUpdateUserAttributesCommandError = 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 "AliasExistsException": + case "com.amazonaws.cognitoidentityprovider#AliasExistsException": + response = { + ...(await deserializeAws_json1_1AliasExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidEmailRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AdminUserGlobalSignOutCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AdminUserGlobalSignOutCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AdminUserGlobalSignOutResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AdminUserGlobalSignOutCommand = deserializeAws_json1_1AdminUserGlobalSignOutCommand; +const deserializeAws_json1_1AdminUserGlobalSignOutCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AssociateSoftwareTokenCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1AssociateSoftwareTokenCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1AssociateSoftwareTokenResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1AssociateSoftwareTokenCommand = deserializeAws_json1_1AssociateSoftwareTokenCommand; +const deserializeAws_json1_1AssociateSoftwareTokenCommandError = 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 "ConcurrentModificationException": + case "com.amazonaws.cognitoidentityprovider#ConcurrentModificationException": + response = { + ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "SoftwareTokenMFANotFoundException": + case "com.amazonaws.cognitoidentityprovider#SoftwareTokenMFANotFoundException": + response = { + ...(await deserializeAws_json1_1SoftwareTokenMFANotFoundExceptionResponse(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_1ChangePasswordCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ChangePasswordCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ChangePasswordResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ChangePasswordCommand = deserializeAws_json1_1ChangePasswordCommand; +const deserializeAws_json1_1ChangePasswordCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidPasswordException": + case "com.amazonaws.cognitoidentityprovider#InvalidPasswordException": + response = { + ...(await deserializeAws_json1_1InvalidPasswordExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1ConfirmDeviceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ConfirmDeviceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ConfirmDeviceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ConfirmDeviceCommand = deserializeAws_json1_1ConfirmDeviceCommand; +const deserializeAws_json1_1ConfirmDeviceCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidPasswordException": + case "com.amazonaws.cognitoidentityprovider#InvalidPasswordException": + response = { + ...(await deserializeAws_json1_1InvalidPasswordExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UsernameExistsException": + case "com.amazonaws.cognitoidentityprovider#UsernameExistsException": + response = { + ...(await deserializeAws_json1_1UsernameExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1ConfirmForgotPasswordCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ConfirmForgotPasswordCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ConfirmForgotPasswordResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ConfirmForgotPasswordCommand = deserializeAws_json1_1ConfirmForgotPasswordCommand; +const deserializeAws_json1_1ConfirmForgotPasswordCommandError = 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 "CodeMismatchException": + case "com.amazonaws.cognitoidentityprovider#CodeMismatchException": + response = { + ...(await deserializeAws_json1_1CodeMismatchExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ExpiredCodeException": + case "com.amazonaws.cognitoidentityprovider#ExpiredCodeException": + response = { + ...(await deserializeAws_json1_1ExpiredCodeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidPasswordException": + case "com.amazonaws.cognitoidentityprovider#InvalidPasswordException": + response = { + ...(await deserializeAws_json1_1InvalidPasswordExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyFailedAttemptsException": + case "com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException": + response = { + ...(await deserializeAws_json1_1TooManyFailedAttemptsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1ConfirmSignUpCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ConfirmSignUpCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ConfirmSignUpResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ConfirmSignUpCommand = deserializeAws_json1_1ConfirmSignUpCommand; +const deserializeAws_json1_1ConfirmSignUpCommandError = 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 "AliasExistsException": + case "com.amazonaws.cognitoidentityprovider#AliasExistsException": + response = { + ...(await deserializeAws_json1_1AliasExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "CodeMismatchException": + case "com.amazonaws.cognitoidentityprovider#CodeMismatchException": + response = { + ...(await deserializeAws_json1_1CodeMismatchExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ExpiredCodeException": + case "com.amazonaws.cognitoidentityprovider#ExpiredCodeException": + response = { + ...(await deserializeAws_json1_1ExpiredCodeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyFailedAttemptsException": + case "com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException": + response = { + ...(await deserializeAws_json1_1TooManyFailedAttemptsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1CreateGroupCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateGroupCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CreateGroupResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreateGroupCommand = deserializeAws_json1_1CreateGroupCommand; +const deserializeAws_json1_1CreateGroupCommandError = 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 "GroupExistsException": + case "com.amazonaws.cognitoidentityprovider#GroupExistsException": + response = { + ...(await deserializeAws_json1_1GroupExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1CreateIdentityProviderCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateIdentityProviderCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CreateIdentityProviderResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreateIdentityProviderCommand = deserializeAws_json1_1CreateIdentityProviderCommand; +const deserializeAws_json1_1CreateIdentityProviderCommandError = 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 "DuplicateProviderException": + case "com.amazonaws.cognitoidentityprovider#DuplicateProviderException": + response = { + ...(await deserializeAws_json1_1DuplicateProviderExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1CreateResourceServerCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateResourceServerCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CreateResourceServerResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreateResourceServerCommand = deserializeAws_json1_1CreateResourceServerCommand; +const deserializeAws_json1_1CreateResourceServerCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1CreateUserImportJobCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateUserImportJobCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CreateUserImportJobResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreateUserImportJobCommand = deserializeAws_json1_1CreateUserImportJobCommand; +const deserializeAws_json1_1CreateUserImportJobCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PreconditionNotMetException": + case "com.amazonaws.cognitoidentityprovider#PreconditionNotMetException": + response = { + ...(await deserializeAws_json1_1PreconditionNotMetExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1CreateUserPoolCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateUserPoolCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CreateUserPoolResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreateUserPoolCommand = deserializeAws_json1_1CreateUserPoolCommand; +const deserializeAws_json1_1CreateUserPoolCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidEmailRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserPoolTaggingException": + case "com.amazonaws.cognitoidentityprovider#UserPoolTaggingException": + response = { + ...(await deserializeAws_json1_1UserPoolTaggingExceptionResponse(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_1CreateUserPoolClientCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateUserPoolClientCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CreateUserPoolClientResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreateUserPoolClientCommand = deserializeAws_json1_1CreateUserPoolClientCommand; +const deserializeAws_json1_1CreateUserPoolClientCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidOAuthFlowException": + case "com.amazonaws.cognitoidentityprovider#InvalidOAuthFlowException": + response = { + ...(await deserializeAws_json1_1InvalidOAuthFlowExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ScopeDoesNotExistException": + case "com.amazonaws.cognitoidentityprovider#ScopeDoesNotExistException": + response = { + ...(await deserializeAws_json1_1ScopeDoesNotExistExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1CreateUserPoolDomainCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateUserPoolDomainCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CreateUserPoolDomainResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreateUserPoolDomainCommand = deserializeAws_json1_1CreateUserPoolDomainCommand; +const deserializeAws_json1_1CreateUserPoolDomainCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(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_1DeleteGroupCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteGroupCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteGroupCommand = deserializeAws_json1_1DeleteGroupCommand; +const deserializeAws_json1_1DeleteGroupCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DeleteIdentityProviderCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteIdentityProviderCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteIdentityProviderCommand = deserializeAws_json1_1DeleteIdentityProviderCommand; +const deserializeAws_json1_1DeleteIdentityProviderCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedIdentityProviderException": + case "com.amazonaws.cognitoidentityprovider#UnsupportedIdentityProviderException": + response = { + ...(await deserializeAws_json1_1UnsupportedIdentityProviderExceptionResponse(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_1DeleteResourceServerCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteResourceServerCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteResourceServerCommand = deserializeAws_json1_1DeleteResourceServerCommand; +const deserializeAws_json1_1DeleteResourceServerCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DeleteUserCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteUserCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteUserCommand = deserializeAws_json1_1DeleteUserCommand; +const deserializeAws_json1_1DeleteUserCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1DeleteUserAttributesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteUserAttributesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DeleteUserAttributesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteUserAttributesCommand = deserializeAws_json1_1DeleteUserAttributesCommand; +const deserializeAws_json1_1DeleteUserAttributesCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1DeleteUserPoolCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteUserPoolCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteUserPoolCommand = deserializeAws_json1_1DeleteUserPoolCommand; +const deserializeAws_json1_1DeleteUserPoolCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserImportInProgressException": + case "com.amazonaws.cognitoidentityprovider#UserImportInProgressException": + response = { + ...(await deserializeAws_json1_1UserImportInProgressExceptionResponse(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_1DeleteUserPoolClientCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteUserPoolClientCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteUserPoolClientCommand = deserializeAws_json1_1DeleteUserPoolClientCommand; +const deserializeAws_json1_1DeleteUserPoolClientCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DeleteUserPoolDomainCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteUserPoolDomainCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DeleteUserPoolDomainResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteUserPoolDomainCommand = deserializeAws_json1_1DeleteUserPoolDomainCommand; +const deserializeAws_json1_1DeleteUserPoolDomainCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(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_1DescribeIdentityProviderCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeIdentityProviderCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeIdentityProviderResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeIdentityProviderCommand = deserializeAws_json1_1DescribeIdentityProviderCommand; +const deserializeAws_json1_1DescribeIdentityProviderCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DescribeResourceServerCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeResourceServerCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeResourceServerResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeResourceServerCommand = deserializeAws_json1_1DescribeResourceServerCommand; +const deserializeAws_json1_1DescribeResourceServerCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DescribeRiskConfigurationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeRiskConfigurationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeRiskConfigurationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeRiskConfigurationCommand = deserializeAws_json1_1DescribeRiskConfigurationCommand; +const deserializeAws_json1_1DescribeRiskConfigurationCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserPoolAddOnNotEnabledException": + case "com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException": + response = { + ...(await deserializeAws_json1_1UserPoolAddOnNotEnabledExceptionResponse(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_1DescribeUserImportJobCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeUserImportJobCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeUserImportJobResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeUserImportJobCommand = deserializeAws_json1_1DescribeUserImportJobCommand; +const deserializeAws_json1_1DescribeUserImportJobCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DescribeUserPoolCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeUserPoolCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeUserPoolResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeUserPoolCommand = deserializeAws_json1_1DescribeUserPoolCommand; +const deserializeAws_json1_1DescribeUserPoolCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserPoolTaggingException": + case "com.amazonaws.cognitoidentityprovider#UserPoolTaggingException": + response = { + ...(await deserializeAws_json1_1UserPoolTaggingExceptionResponse(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_1DescribeUserPoolClientCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeUserPoolClientCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeUserPoolClientResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeUserPoolClientCommand = deserializeAws_json1_1DescribeUserPoolClientCommand; +const deserializeAws_json1_1DescribeUserPoolClientCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DescribeUserPoolDomainCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeUserPoolDomainCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeUserPoolDomainResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeUserPoolDomainCommand = deserializeAws_json1_1DescribeUserPoolDomainCommand; +const deserializeAws_json1_1DescribeUserPoolDomainCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(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_1ForgetDeviceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ForgetDeviceCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ForgetDeviceCommand = deserializeAws_json1_1ForgetDeviceCommand; +const deserializeAws_json1_1ForgetDeviceCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1ForgotPasswordCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ForgotPasswordCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ForgotPasswordResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ForgotPasswordCommand = deserializeAws_json1_1ForgotPasswordCommand; +const deserializeAws_json1_1ForgotPasswordCommandError = 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 "CodeDeliveryFailureException": + case "com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException": + response = { + ...(await deserializeAws_json1_1CodeDeliveryFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidEmailRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1GetCSVHeaderCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetCSVHeaderCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetCSVHeaderResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetCSVHeaderCommand = deserializeAws_json1_1GetCSVHeaderCommand; +const deserializeAws_json1_1GetCSVHeaderCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1GetDeviceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetDeviceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetDeviceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetDeviceCommand = deserializeAws_json1_1GetDeviceCommand; +const deserializeAws_json1_1GetDeviceCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1GetGroupCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetGroupCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetGroupResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetGroupCommand = deserializeAws_json1_1GetGroupCommand; +const deserializeAws_json1_1GetGroupCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1GetIdentityProviderByIdentifierCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetIdentityProviderByIdentifierCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetIdentityProviderByIdentifierResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetIdentityProviderByIdentifierCommand = deserializeAws_json1_1GetIdentityProviderByIdentifierCommand; +const deserializeAws_json1_1GetIdentityProviderByIdentifierCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1GetSigningCertificateCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetSigningCertificateCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetSigningCertificateResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetSigningCertificateCommand = deserializeAws_json1_1GetSigningCertificateCommand; +const deserializeAws_json1_1GetSigningCertificateCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(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_1GetUICustomizationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetUICustomizationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetUICustomizationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetUICustomizationCommand = deserializeAws_json1_1GetUICustomizationCommand; +const deserializeAws_json1_1GetUICustomizationCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1GetUserCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetUserCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetUserResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetUserCommand = deserializeAws_json1_1GetUserCommand; +const deserializeAws_json1_1GetUserCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1GetUserAttributeVerificationCodeCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetUserAttributeVerificationCodeCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetUserAttributeVerificationCodeResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetUserAttributeVerificationCodeCommand = deserializeAws_json1_1GetUserAttributeVerificationCodeCommand; +const deserializeAws_json1_1GetUserAttributeVerificationCodeCommandError = 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 "CodeDeliveryFailureException": + case "com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException": + response = { + ...(await deserializeAws_json1_1CodeDeliveryFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidEmailRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1GetUserPoolMfaConfigCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetUserPoolMfaConfigCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetUserPoolMfaConfigResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetUserPoolMfaConfigCommand = deserializeAws_json1_1GetUserPoolMfaConfigCommand; +const deserializeAws_json1_1GetUserPoolMfaConfigCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1GlobalSignOutCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GlobalSignOutCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GlobalSignOutResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GlobalSignOutCommand = deserializeAws_json1_1GlobalSignOutCommand; +const deserializeAws_json1_1GlobalSignOutCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(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_1InitiateAuthCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1InitiateAuthCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1InitiateAuthResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1InitiateAuthCommand = deserializeAws_json1_1InitiateAuthCommand; +const deserializeAws_json1_1InitiateAuthCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1ListDevicesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListDevicesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListDevicesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListDevicesCommand = deserializeAws_json1_1ListDevicesCommand; +const deserializeAws_json1_1ListDevicesCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1ListGroupsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListGroupsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListGroupsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListGroupsCommand = deserializeAws_json1_1ListGroupsCommand; +const deserializeAws_json1_1ListGroupsCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ListIdentityProvidersCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListIdentityProvidersCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListIdentityProvidersResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListIdentityProvidersCommand = deserializeAws_json1_1ListIdentityProvidersCommand; +const deserializeAws_json1_1ListIdentityProvidersCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ListResourceServersCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListResourceServersCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListResourceServersResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListResourceServersCommand = deserializeAws_json1_1ListResourceServersCommand; +const deserializeAws_json1_1ListResourceServersCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ListUserImportJobsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListUserImportJobsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListUserImportJobsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListUserImportJobsCommand = deserializeAws_json1_1ListUserImportJobsCommand; +const deserializeAws_json1_1ListUserImportJobsCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ListUserPoolClientsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListUserPoolClientsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListUserPoolClientsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListUserPoolClientsCommand = deserializeAws_json1_1ListUserPoolClientsCommand; +const deserializeAws_json1_1ListUserPoolClientsCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ListUserPoolsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListUserPoolsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListUserPoolsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListUserPoolsCommand = deserializeAws_json1_1ListUserPoolsCommand; +const deserializeAws_json1_1ListUserPoolsCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ListUsersCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListUsersCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListUsersResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListUsersCommand = deserializeAws_json1_1ListUsersCommand; +const deserializeAws_json1_1ListUsersCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ListUsersInGroupCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListUsersInGroupCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListUsersInGroupResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListUsersInGroupCommand = deserializeAws_json1_1ListUsersInGroupCommand; +const deserializeAws_json1_1ListUsersInGroupCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ResendConfirmationCodeCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ResendConfirmationCodeCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ResendConfirmationCodeResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ResendConfirmationCodeCommand = deserializeAws_json1_1ResendConfirmationCodeCommand; +const deserializeAws_json1_1ResendConfirmationCodeCommandError = 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 "CodeDeliveryFailureException": + case "com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException": + response = { + ...(await deserializeAws_json1_1CodeDeliveryFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidEmailRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1RespondToAuthChallengeCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1RespondToAuthChallengeCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1RespondToAuthChallengeResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1RespondToAuthChallengeCommand = deserializeAws_json1_1RespondToAuthChallengeCommand; +const deserializeAws_json1_1RespondToAuthChallengeCommandError = 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 "AliasExistsException": + case "com.amazonaws.cognitoidentityprovider#AliasExistsException": + response = { + ...(await deserializeAws_json1_1AliasExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "CodeMismatchException": + case "com.amazonaws.cognitoidentityprovider#CodeMismatchException": + response = { + ...(await deserializeAws_json1_1CodeMismatchExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ExpiredCodeException": + case "com.amazonaws.cognitoidentityprovider#ExpiredCodeException": + response = { + ...(await deserializeAws_json1_1ExpiredCodeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidPasswordException": + case "com.amazonaws.cognitoidentityprovider#InvalidPasswordException": + response = { + ...(await deserializeAws_json1_1InvalidPasswordExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "MFAMethodNotFoundException": + case "com.amazonaws.cognitoidentityprovider#MFAMethodNotFoundException": + response = { + ...(await deserializeAws_json1_1MFAMethodNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "SoftwareTokenMFANotFoundException": + case "com.amazonaws.cognitoidentityprovider#SoftwareTokenMFANotFoundException": + response = { + ...(await deserializeAws_json1_1SoftwareTokenMFANotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1SetRiskConfigurationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1SetRiskConfigurationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1SetRiskConfigurationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1SetRiskConfigurationCommand = deserializeAws_json1_1SetRiskConfigurationCommand; +const deserializeAws_json1_1SetRiskConfigurationCommandError = 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 "CodeDeliveryFailureException": + case "com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException": + response = { + ...(await deserializeAws_json1_1CodeDeliveryFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidEmailRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserPoolAddOnNotEnabledException": + case "com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException": + response = { + ...(await deserializeAws_json1_1UserPoolAddOnNotEnabledExceptionResponse(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_1SetUICustomizationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1SetUICustomizationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1SetUICustomizationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1SetUICustomizationCommand = deserializeAws_json1_1SetUICustomizationCommand; +const deserializeAws_json1_1SetUICustomizationCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1SetUserMFAPreferenceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1SetUserMFAPreferenceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1SetUserMFAPreferenceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1SetUserMFAPreferenceCommand = deserializeAws_json1_1SetUserMFAPreferenceCommand; +const deserializeAws_json1_1SetUserMFAPreferenceCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1SetUserPoolMfaConfigCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1SetUserPoolMfaConfigCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1SetUserPoolMfaConfigResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1SetUserPoolMfaConfigCommand = deserializeAws_json1_1SetUserPoolMfaConfigCommand; +const deserializeAws_json1_1SetUserPoolMfaConfigCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1SetUserSettingsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1SetUserSettingsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1SetUserSettingsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1SetUserSettingsCommand = deserializeAws_json1_1SetUserSettingsCommand; +const deserializeAws_json1_1SetUserSettingsCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1SignUpCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1SignUpCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1SignUpResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1SignUpCommand = deserializeAws_json1_1SignUpCommand; +const deserializeAws_json1_1SignUpCommandError = 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 "CodeDeliveryFailureException": + case "com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException": + response = { + ...(await deserializeAws_json1_1CodeDeliveryFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidEmailRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidPasswordException": + case "com.amazonaws.cognitoidentityprovider#InvalidPasswordException": + response = { + ...(await deserializeAws_json1_1InvalidPasswordExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UsernameExistsException": + case "com.amazonaws.cognitoidentityprovider#UsernameExistsException": + response = { + ...(await deserializeAws_json1_1UsernameExistsExceptionResponse(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_1StartUserImportJobCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1StartUserImportJobCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1StartUserImportJobResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1StartUserImportJobCommand = deserializeAws_json1_1StartUserImportJobCommand; +const deserializeAws_json1_1StartUserImportJobCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PreconditionNotMetException": + case "com.amazonaws.cognitoidentityprovider#PreconditionNotMetException": + response = { + ...(await deserializeAws_json1_1PreconditionNotMetExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1StopUserImportJobCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1StopUserImportJobCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1StopUserImportJobResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1StopUserImportJobCommand = deserializeAws_json1_1StopUserImportJobCommand; +const deserializeAws_json1_1StopUserImportJobCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PreconditionNotMetException": + case "com.amazonaws.cognitoidentityprovider#PreconditionNotMetException": + response = { + ...(await deserializeAws_json1_1PreconditionNotMetExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1UpdateAuthEventFeedbackCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateAuthEventFeedbackCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UpdateAuthEventFeedbackResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UpdateAuthEventFeedbackCommand = deserializeAws_json1_1UpdateAuthEventFeedbackCommand; +const deserializeAws_json1_1UpdateAuthEventFeedbackCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserPoolAddOnNotEnabledException": + case "com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException": + response = { + ...(await deserializeAws_json1_1UserPoolAddOnNotEnabledExceptionResponse(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_1UpdateDeviceStatusCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateDeviceStatusCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UpdateDeviceStatusResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UpdateDeviceStatusCommand = deserializeAws_json1_1UpdateDeviceStatusCommand; +const deserializeAws_json1_1UpdateDeviceStatusCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1UpdateGroupCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateGroupCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UpdateGroupResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UpdateGroupCommand = deserializeAws_json1_1UpdateGroupCommand; +const deserializeAws_json1_1UpdateGroupCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1UpdateIdentityProviderCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateIdentityProviderCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UpdateIdentityProviderResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UpdateIdentityProviderCommand = deserializeAws_json1_1UpdateIdentityProviderCommand; +const deserializeAws_json1_1UpdateIdentityProviderCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedIdentityProviderException": + case "com.amazonaws.cognitoidentityprovider#UnsupportedIdentityProviderException": + response = { + ...(await deserializeAws_json1_1UnsupportedIdentityProviderExceptionResponse(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_1UpdateResourceServerCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateResourceServerCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UpdateResourceServerResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UpdateResourceServerCommand = deserializeAws_json1_1UpdateResourceServerCommand; +const deserializeAws_json1_1UpdateResourceServerCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1UpdateUserAttributesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateUserAttributesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UpdateUserAttributesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UpdateUserAttributesCommand = deserializeAws_json1_1UpdateUserAttributesCommand; +const deserializeAws_json1_1UpdateUserAttributesCommandError = 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 "AliasExistsException": + case "com.amazonaws.cognitoidentityprovider#AliasExistsException": + response = { + ...(await deserializeAws_json1_1AliasExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "CodeDeliveryFailureException": + case "com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException": + response = { + ...(await deserializeAws_json1_1CodeDeliveryFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "CodeMismatchException": + case "com.amazonaws.cognitoidentityprovider#CodeMismatchException": + response = { + ...(await deserializeAws_json1_1CodeMismatchExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ExpiredCodeException": + case "com.amazonaws.cognitoidentityprovider#ExpiredCodeException": + response = { + ...(await deserializeAws_json1_1ExpiredCodeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidEmailRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLambdaResponseException": + case "com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException": + response = { + ...(await deserializeAws_json1_1InvalidLambdaResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnexpectedLambdaException": + case "com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException": + response = { + ...(await deserializeAws_json1_1UnexpectedLambdaExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserLambdaValidationException": + case "com.amazonaws.cognitoidentityprovider#UserLambdaValidationException": + response = { + ...(await deserializeAws_json1_1UserLambdaValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1UpdateUserPoolCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateUserPoolCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UpdateUserPoolResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UpdateUserPoolCommand = deserializeAws_json1_1UpdateUserPoolCommand; +const deserializeAws_json1_1UpdateUserPoolCommandError = 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 "ConcurrentModificationException": + case "com.amazonaws.cognitoidentityprovider#ConcurrentModificationException": + response = { + ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidEmailRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleAccessPolicyException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSmsRoleTrustRelationshipException": + case "com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException": + response = { + ...(await deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserImportInProgressException": + case "com.amazonaws.cognitoidentityprovider#UserImportInProgressException": + response = { + ...(await deserializeAws_json1_1UserImportInProgressExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserPoolTaggingException": + case "com.amazonaws.cognitoidentityprovider#UserPoolTaggingException": + response = { + ...(await deserializeAws_json1_1UserPoolTaggingExceptionResponse(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_1UpdateUserPoolClientCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateUserPoolClientCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UpdateUserPoolClientResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UpdateUserPoolClientCommand = deserializeAws_json1_1UpdateUserPoolClientCommand; +const deserializeAws_json1_1UpdateUserPoolClientCommandError = 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 "ConcurrentModificationException": + case "com.amazonaws.cognitoidentityprovider#ConcurrentModificationException": + response = { + ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidOAuthFlowException": + case "com.amazonaws.cognitoidentityprovider#InvalidOAuthFlowException": + response = { + ...(await deserializeAws_json1_1InvalidOAuthFlowExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ScopeDoesNotExistException": + case "com.amazonaws.cognitoidentityprovider#ScopeDoesNotExistException": + response = { + ...(await deserializeAws_json1_1ScopeDoesNotExistExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1UpdateUserPoolDomainCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateUserPoolDomainCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UpdateUserPoolDomainResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UpdateUserPoolDomainCommand = deserializeAws_json1_1UpdateUserPoolDomainCommand; +const deserializeAws_json1_1UpdateUserPoolDomainCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1VerifySoftwareTokenCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1VerifySoftwareTokenCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1VerifySoftwareTokenResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1VerifySoftwareTokenCommand = deserializeAws_json1_1VerifySoftwareTokenCommand; +const deserializeAws_json1_1VerifySoftwareTokenCommandError = 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 "CodeMismatchException": + case "com.amazonaws.cognitoidentityprovider#CodeMismatchException": + response = { + ...(await deserializeAws_json1_1CodeMismatchExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "EnableSoftwareTokenMFAException": + case "com.amazonaws.cognitoidentityprovider#EnableSoftwareTokenMFAException": + response = { + ...(await deserializeAws_json1_1EnableSoftwareTokenMFAExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidUserPoolConfigurationException": + case "com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "SoftwareTokenMFANotFoundException": + case "com.amazonaws.cognitoidentityprovider#SoftwareTokenMFANotFoundException": + response = { + ...(await deserializeAws_json1_1SoftwareTokenMFANotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1VerifyUserAttributeCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1VerifyUserAttributeCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1VerifyUserAttributeResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1VerifyUserAttributeCommand = deserializeAws_json1_1VerifyUserAttributeCommand; +const deserializeAws_json1_1VerifyUserAttributeCommandError = 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 "CodeMismatchException": + case "com.amazonaws.cognitoidentityprovider#CodeMismatchException": + response = { + ...(await deserializeAws_json1_1CodeMismatchExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ExpiredCodeException": + case "com.amazonaws.cognitoidentityprovider#ExpiredCodeException": + response = { + ...(await deserializeAws_json1_1ExpiredCodeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentityprovider#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentityprovider#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentityprovider#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentityprovider#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PasswordResetRequiredException": + case "com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException": + response = { + ...(await deserializeAws_json1_1PasswordResetRequiredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentityprovider#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotConfirmedException": + case "com.amazonaws.cognitoidentityprovider#UserNotConfirmedException": + response = { + ...(await deserializeAws_json1_1UserNotConfirmedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UserNotFoundException": + case "com.amazonaws.cognitoidentityprovider#UserNotFoundException": + response = { + ...(await deserializeAws_json1_1UserNotFoundExceptionResponse(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_1AliasExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1AliasExistsException(body, context); + const contents = { + name: "AliasExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1CodeDeliveryFailureExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1CodeDeliveryFailureException(body, context); + const contents = { + name: "CodeDeliveryFailureException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1CodeMismatchExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1CodeMismatchException(body, context); + const contents = { + name: "CodeMismatchException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ConcurrentModificationExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ConcurrentModificationException(body, context); + const contents = { + name: "ConcurrentModificationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1DuplicateProviderExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1DuplicateProviderException(body, context); + const contents = { + name: "DuplicateProviderException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1EnableSoftwareTokenMFAExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1EnableSoftwareTokenMFAException(body, context); + const contents = { + name: "EnableSoftwareTokenMFAException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ExpiredCodeExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ExpiredCodeException(body, context); + const contents = { + name: "ExpiredCodeException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1GroupExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1GroupExistsException(body, context); + const contents = { + name: "GroupExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InternalErrorExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InternalErrorException(body, context); + const contents = { + name: "InternalErrorException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidEmailRoleAccessPolicyExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidEmailRoleAccessPolicyException(body, context); + const contents = { + name: "InvalidEmailRoleAccessPolicyException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidLambdaResponseExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidLambdaResponseException(body, context); + const contents = { + name: "InvalidLambdaResponseException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidOAuthFlowExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidOAuthFlowException(body, context); + const contents = { + name: "InvalidOAuthFlowException", + $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_1InvalidPasswordExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidPasswordException(body, context); + const contents = { + name: "InvalidPasswordException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidSmsRoleAccessPolicyExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidSmsRoleAccessPolicyException(body, context); + const contents = { + name: "InvalidSmsRoleAccessPolicyException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidSmsRoleTrustRelationshipExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidSmsRoleTrustRelationshipException(body, context); + const contents = { + name: "InvalidSmsRoleTrustRelationshipException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidUserPoolConfigurationExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidUserPoolConfigurationException(body, context); + const contents = { + name: "InvalidUserPoolConfigurationException", + $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_1MFAMethodNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1MFAMethodNotFoundException(body, context); + const contents = { + name: "MFAMethodNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1NotAuthorizedExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1NotAuthorizedException(body, context); + const contents = { + name: "NotAuthorizedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1PasswordResetRequiredExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1PasswordResetRequiredException(body, context); + const contents = { + name: "PasswordResetRequiredException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1PreconditionNotMetExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1PreconditionNotMetException(body, context); + const contents = { + name: "PreconditionNotMetException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context); + const contents = { + name: "ResourceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ScopeDoesNotExistExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ScopeDoesNotExistException(body, context); + const contents = { + name: "ScopeDoesNotExistException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1SoftwareTokenMFANotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1SoftwareTokenMFANotFoundException(body, context); + const contents = { + name: "SoftwareTokenMFANotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1TooManyFailedAttemptsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1TooManyFailedAttemptsException(body, context); + const contents = { + name: "TooManyFailedAttemptsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1TooManyRequestsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1TooManyRequestsException(body, context); + const contents = { + name: "TooManyRequestsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UnexpectedLambdaExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UnexpectedLambdaException(body, context); + const contents = { + name: "UnexpectedLambdaException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UnsupportedIdentityProviderExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UnsupportedIdentityProviderException(body, context); + const contents = { + name: "UnsupportedIdentityProviderException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UnsupportedUserStateExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UnsupportedUserStateException(body, context); + const contents = { + name: "UnsupportedUserStateException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UserImportInProgressExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UserImportInProgressException(body, context); + const contents = { + name: "UserImportInProgressException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UserLambdaValidationExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UserLambdaValidationException(body, context); + const contents = { + name: "UserLambdaValidationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UsernameExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UsernameExistsException(body, context); + const contents = { + name: "UsernameExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UserNotConfirmedExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UserNotConfirmedException(body, context); + const contents = { + name: "UserNotConfirmedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UserNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UserNotFoundException(body, context); + const contents = { + name: "UserNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UserPoolAddOnNotEnabledExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UserPoolAddOnNotEnabledException(body, context); + const contents = { + name: "UserPoolAddOnNotEnabledException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UserPoolTaggingExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UserPoolTaggingException(body, context); + const contents = { + name: "UserPoolTaggingException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const serializeAws_json1_1AccountRecoverySettingType = (input, context) => { + return { + ...(input.RecoveryMechanisms !== undefined && + input.RecoveryMechanisms !== null && { + RecoveryMechanisms: serializeAws_json1_1RecoveryMechanismsType(input.RecoveryMechanisms, context), + }), + }; +}; +const serializeAws_json1_1AccountTakeoverActionsType = (input, context) => { + return { + ...(input.HighAction !== undefined && + input.HighAction !== null && { + HighAction: serializeAws_json1_1AccountTakeoverActionType(input.HighAction, context), + }), + ...(input.LowAction !== undefined && + input.LowAction !== null && { + LowAction: serializeAws_json1_1AccountTakeoverActionType(input.LowAction, context), + }), + ...(input.MediumAction !== undefined && + input.MediumAction !== null && { + MediumAction: serializeAws_json1_1AccountTakeoverActionType(input.MediumAction, context), + }), + }; +}; +const serializeAws_json1_1AccountTakeoverActionType = (input, context) => { + return { + ...(input.EventAction !== undefined && input.EventAction !== null && { EventAction: input.EventAction }), + ...(input.Notify !== undefined && input.Notify !== null && { Notify: input.Notify }), + }; +}; +const serializeAws_json1_1AccountTakeoverRiskConfigurationType = (input, context) => { + return { + ...(input.Actions !== undefined && + input.Actions !== null && { Actions: serializeAws_json1_1AccountTakeoverActionsType(input.Actions, context) }), + ...(input.NotifyConfiguration !== undefined && + input.NotifyConfiguration !== null && { + NotifyConfiguration: serializeAws_json1_1NotifyConfigurationType(input.NotifyConfiguration, context), + }), + }; +}; +const serializeAws_json1_1AddCustomAttributesRequest = (input, context) => { + return { + ...(input.CustomAttributes !== undefined && + input.CustomAttributes !== null && { + CustomAttributes: serializeAws_json1_1CustomAttributesListType(input.CustomAttributes, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1AdminAddUserToGroupRequest = (input, context) => { + return { + ...(input.GroupName !== undefined && input.GroupName !== null && { GroupName: input.GroupName }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminConfirmSignUpRequest = (input, context) => { + return { + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminCreateUserConfigType = (input, context) => { + return { + ...(input.AllowAdminCreateUserOnly !== undefined && + input.AllowAdminCreateUserOnly !== null && { AllowAdminCreateUserOnly: input.AllowAdminCreateUserOnly }), + ...(input.InviteMessageTemplate !== undefined && + input.InviteMessageTemplate !== null && { + InviteMessageTemplate: serializeAws_json1_1MessageTemplateType(input.InviteMessageTemplate, context), + }), + ...(input.UnusedAccountValidityDays !== undefined && + input.UnusedAccountValidityDays !== null && { UnusedAccountValidityDays: input.UnusedAccountValidityDays }), + }; +}; +const serializeAws_json1_1AdminCreateUserRequest = (input, context) => { + return { + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.DesiredDeliveryMediums !== undefined && + input.DesiredDeliveryMediums !== null && { + DesiredDeliveryMediums: serializeAws_json1_1DeliveryMediumListType(input.DesiredDeliveryMediums, context), + }), + ...(input.ForceAliasCreation !== undefined && + input.ForceAliasCreation !== null && { ForceAliasCreation: input.ForceAliasCreation }), + ...(input.MessageAction !== undefined && input.MessageAction !== null && { MessageAction: input.MessageAction }), + ...(input.TemporaryPassword !== undefined && + input.TemporaryPassword !== null && { TemporaryPassword: input.TemporaryPassword }), + ...(input.UserAttributes !== undefined && + input.UserAttributes !== null && { + UserAttributes: serializeAws_json1_1AttributeListType(input.UserAttributes, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + ...(input.ValidationData !== undefined && + input.ValidationData !== null && { + ValidationData: serializeAws_json1_1AttributeListType(input.ValidationData, context), + }), + }; +}; +const serializeAws_json1_1AdminDeleteUserAttributesRequest = (input, context) => { + return { + ...(input.UserAttributeNames !== undefined && + input.UserAttributeNames !== null && { + UserAttributeNames: serializeAws_json1_1AttributeNameListType(input.UserAttributeNames, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminDeleteUserRequest = (input, context) => { + return { + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminDisableProviderForUserRequest = (input, context) => { + return { + ...(input.User !== undefined && + input.User !== null && { User: serializeAws_json1_1ProviderUserIdentifierType(input.User, context) }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1AdminDisableUserRequest = (input, context) => { + return { + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminEnableUserRequest = (input, context) => { + return { + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminForgetDeviceRequest = (input, context) => { + return { + ...(input.DeviceKey !== undefined && input.DeviceKey !== null && { DeviceKey: input.DeviceKey }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminGetDeviceRequest = (input, context) => { + return { + ...(input.DeviceKey !== undefined && input.DeviceKey !== null && { DeviceKey: input.DeviceKey }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminGetUserRequest = (input, context) => { + return { + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminInitiateAuthRequest = (input, context) => { + return { + ...(input.AnalyticsMetadata !== undefined && + input.AnalyticsMetadata !== null && { + AnalyticsMetadata: serializeAws_json1_1AnalyticsMetadataType(input.AnalyticsMetadata, context), + }), + ...(input.AuthFlow !== undefined && input.AuthFlow !== null && { AuthFlow: input.AuthFlow }), + ...(input.AuthParameters !== undefined && + input.AuthParameters !== null && { + AuthParameters: serializeAws_json1_1AuthParametersType(input.AuthParameters, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.ContextData !== undefined && + input.ContextData !== null && { ContextData: serializeAws_json1_1ContextDataType(input.ContextData, context) }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1AdminLinkProviderForUserRequest = (input, context) => { + return { + ...(input.DestinationUser !== undefined && + input.DestinationUser !== null && { + DestinationUser: serializeAws_json1_1ProviderUserIdentifierType(input.DestinationUser, context), + }), + ...(input.SourceUser !== undefined && + input.SourceUser !== null && { + SourceUser: serializeAws_json1_1ProviderUserIdentifierType(input.SourceUser, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1AdminListDevicesRequest = (input, context) => { + return { + ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }), + ...(input.PaginationToken !== undefined && + input.PaginationToken !== null && { PaginationToken: input.PaginationToken }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminListGroupsForUserRequest = (input, context) => { + return { + ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminListUserAuthEventsRequest = (input, context) => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminRemoveUserFromGroupRequest = (input, context) => { + return { + ...(input.GroupName !== undefined && input.GroupName !== null && { GroupName: input.GroupName }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminResetUserPasswordRequest = (input, context) => { + return { + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminRespondToAuthChallengeRequest = (input, context) => { + return { + ...(input.AnalyticsMetadata !== undefined && + input.AnalyticsMetadata !== null && { + AnalyticsMetadata: serializeAws_json1_1AnalyticsMetadataType(input.AnalyticsMetadata, context), + }), + ...(input.ChallengeName !== undefined && input.ChallengeName !== null && { ChallengeName: input.ChallengeName }), + ...(input.ChallengeResponses !== undefined && + input.ChallengeResponses !== null && { + ChallengeResponses: serializeAws_json1_1ChallengeResponsesType(input.ChallengeResponses, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.ContextData !== undefined && + input.ContextData !== null && { ContextData: serializeAws_json1_1ContextDataType(input.ContextData, context) }), + ...(input.Session !== undefined && input.Session !== null && { Session: input.Session }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1AdminSetUserMFAPreferenceRequest = (input, context) => { + return { + ...(input.SMSMfaSettings !== undefined && + input.SMSMfaSettings !== null && { + SMSMfaSettings: serializeAws_json1_1SMSMfaSettingsType(input.SMSMfaSettings, context), + }), + ...(input.SoftwareTokenMfaSettings !== undefined && + input.SoftwareTokenMfaSettings !== null && { + SoftwareTokenMfaSettings: serializeAws_json1_1SoftwareTokenMfaSettingsType(input.SoftwareTokenMfaSettings, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminSetUserPasswordRequest = (input, context) => { + return { + ...(input.Password !== undefined && input.Password !== null && { Password: input.Password }), + ...(input.Permanent !== undefined && input.Permanent !== null && { Permanent: input.Permanent }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminSetUserSettingsRequest = (input, context) => { + return { + ...(input.MFAOptions !== undefined && + input.MFAOptions !== null && { MFAOptions: serializeAws_json1_1MFAOptionListType(input.MFAOptions, context) }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminUpdateAuthEventFeedbackRequest = (input, context) => { + return { + ...(input.EventId !== undefined && input.EventId !== null && { EventId: input.EventId }), + ...(input.FeedbackValue !== undefined && input.FeedbackValue !== null && { FeedbackValue: input.FeedbackValue }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminUpdateDeviceStatusRequest = (input, context) => { + return { + ...(input.DeviceKey !== undefined && input.DeviceKey !== null && { DeviceKey: input.DeviceKey }), + ...(input.DeviceRememberedStatus !== undefined && + input.DeviceRememberedStatus !== null && { DeviceRememberedStatus: input.DeviceRememberedStatus }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminUpdateUserAttributesRequest = (input, context) => { + return { + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.UserAttributes !== undefined && + input.UserAttributes !== null && { + UserAttributes: serializeAws_json1_1AttributeListType(input.UserAttributes, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AdminUserGlobalSignOutRequest = (input, context) => { + return { + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1AliasAttributesListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1AnalyticsConfigurationType = (input, context) => { + return { + ...(input.ApplicationArn !== undefined && + input.ApplicationArn !== null && { ApplicationArn: input.ApplicationArn }), + ...(input.ApplicationId !== undefined && input.ApplicationId !== null && { ApplicationId: input.ApplicationId }), + ...(input.ExternalId !== undefined && input.ExternalId !== null && { ExternalId: input.ExternalId }), + ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }), + ...(input.UserDataShared !== undefined && + input.UserDataShared !== null && { UserDataShared: input.UserDataShared }), + }; +}; +const serializeAws_json1_1AnalyticsMetadataType = (input, context) => { + return { + ...(input.AnalyticsEndpointId !== undefined && + input.AnalyticsEndpointId !== null && { AnalyticsEndpointId: input.AnalyticsEndpointId }), + }; +}; +const serializeAws_json1_1AssociateSoftwareTokenRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.Session !== undefined && input.Session !== null && { Session: input.Session }), + }; +}; +const serializeAws_json1_1AttributeListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1AttributeType(entry, context); + }); +}; +const serializeAws_json1_1AttributeMappingType = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_json1_1AttributeNameListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1AttributeType = (input, context) => { + return { + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }), + }; +}; +const serializeAws_json1_1AuthParametersType = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_json1_1BlockedIPRangeListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1CallbackURLsListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1ChallengeResponsesType = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_json1_1ChangePasswordRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.PreviousPassword !== undefined && + input.PreviousPassword !== null && { PreviousPassword: input.PreviousPassword }), + ...(input.ProposedPassword !== undefined && + input.ProposedPassword !== null && { ProposedPassword: input.ProposedPassword }), + }; +}; +const serializeAws_json1_1ClientMetadataType = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_json1_1ClientPermissionListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1CompromisedCredentialsActionsType = (input, context) => { + return { + ...(input.EventAction !== undefined && input.EventAction !== null && { EventAction: input.EventAction }), + }; +}; +const serializeAws_json1_1CompromisedCredentialsRiskConfigurationType = (input, context) => { + return { + ...(input.Actions !== undefined && + input.Actions !== null && { + Actions: serializeAws_json1_1CompromisedCredentialsActionsType(input.Actions, context), + }), + ...(input.EventFilter !== undefined && + input.EventFilter !== null && { EventFilter: serializeAws_json1_1EventFiltersType(input.EventFilter, context) }), + }; +}; +const serializeAws_json1_1ConfirmDeviceRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.DeviceKey !== undefined && input.DeviceKey !== null && { DeviceKey: input.DeviceKey }), + ...(input.DeviceName !== undefined && input.DeviceName !== null && { DeviceName: input.DeviceName }), + ...(input.DeviceSecretVerifierConfig !== undefined && + input.DeviceSecretVerifierConfig !== null && { + DeviceSecretVerifierConfig: serializeAws_json1_1DeviceSecretVerifierConfigType(input.DeviceSecretVerifierConfig, context), + }), + }; +}; +const serializeAws_json1_1ConfirmForgotPasswordRequest = (input, context) => { + return { + ...(input.AnalyticsMetadata !== undefined && + input.AnalyticsMetadata !== null && { + AnalyticsMetadata: serializeAws_json1_1AnalyticsMetadataType(input.AnalyticsMetadata, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.ConfirmationCode !== undefined && + input.ConfirmationCode !== null && { ConfirmationCode: input.ConfirmationCode }), + ...(input.Password !== undefined && input.Password !== null && { Password: input.Password }), + ...(input.SecretHash !== undefined && input.SecretHash !== null && { SecretHash: input.SecretHash }), + ...(input.UserContextData !== undefined && + input.UserContextData !== null && { + UserContextData: serializeAws_json1_1UserContextDataType(input.UserContextData, context), + }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1ConfirmSignUpRequest = (input, context) => { + return { + ...(input.AnalyticsMetadata !== undefined && + input.AnalyticsMetadata !== null && { + AnalyticsMetadata: serializeAws_json1_1AnalyticsMetadataType(input.AnalyticsMetadata, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.ConfirmationCode !== undefined && + input.ConfirmationCode !== null && { ConfirmationCode: input.ConfirmationCode }), + ...(input.ForceAliasCreation !== undefined && + input.ForceAliasCreation !== null && { ForceAliasCreation: input.ForceAliasCreation }), + ...(input.SecretHash !== undefined && input.SecretHash !== null && { SecretHash: input.SecretHash }), + ...(input.UserContextData !== undefined && + input.UserContextData !== null && { + UserContextData: serializeAws_json1_1UserContextDataType(input.UserContextData, context), + }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1ContextDataType = (input, context) => { + return { + ...(input.EncodedData !== undefined && input.EncodedData !== null && { EncodedData: input.EncodedData }), + ...(input.HttpHeaders !== undefined && + input.HttpHeaders !== null && { HttpHeaders: serializeAws_json1_1HttpHeaderList(input.HttpHeaders, context) }), + ...(input.IpAddress !== undefined && input.IpAddress !== null && { IpAddress: input.IpAddress }), + ...(input.ServerName !== undefined && input.ServerName !== null && { ServerName: input.ServerName }), + ...(input.ServerPath !== undefined && input.ServerPath !== null && { ServerPath: input.ServerPath }), + }; +}; +const serializeAws_json1_1CreateGroupRequest = (input, context) => { + return { + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.GroupName !== undefined && input.GroupName !== null && { GroupName: input.GroupName }), + ...(input.Precedence !== undefined && input.Precedence !== null && { Precedence: input.Precedence }), + ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1CreateIdentityProviderRequest = (input, context) => { + return { + ...(input.AttributeMapping !== undefined && + input.AttributeMapping !== null && { + AttributeMapping: serializeAws_json1_1AttributeMappingType(input.AttributeMapping, context), + }), + ...(input.IdpIdentifiers !== undefined && + input.IdpIdentifiers !== null && { + IdpIdentifiers: serializeAws_json1_1IdpIdentifiersListType(input.IdpIdentifiers, context), + }), + ...(input.ProviderDetails !== undefined && + input.ProviderDetails !== null && { + ProviderDetails: serializeAws_json1_1ProviderDetailsType(input.ProviderDetails, context), + }), + ...(input.ProviderName !== undefined && input.ProviderName !== null && { ProviderName: input.ProviderName }), + ...(input.ProviderType !== undefined && input.ProviderType !== null && { ProviderType: input.ProviderType }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1CreateResourceServerRequest = (input, context) => { + return { + ...(input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.Scopes !== undefined && + input.Scopes !== null && { Scopes: serializeAws_json1_1ResourceServerScopeListType(input.Scopes, context) }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1CreateUserImportJobRequest = (input, context) => { + return { + ...(input.CloudWatchLogsRoleArn !== undefined && + input.CloudWatchLogsRoleArn !== null && { CloudWatchLogsRoleArn: input.CloudWatchLogsRoleArn }), + ...(input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1CreateUserPoolClientRequest = (input, context) => { + return { + ...(input.AccessTokenValidity !== undefined && + input.AccessTokenValidity !== null && { AccessTokenValidity: input.AccessTokenValidity }), + ...(input.AllowedOAuthFlows !== undefined && + input.AllowedOAuthFlows !== null && { + AllowedOAuthFlows: serializeAws_json1_1OAuthFlowsType(input.AllowedOAuthFlows, context), + }), + ...(input.AllowedOAuthFlowsUserPoolClient !== undefined && + input.AllowedOAuthFlowsUserPoolClient !== null && { + AllowedOAuthFlowsUserPoolClient: input.AllowedOAuthFlowsUserPoolClient, + }), + ...(input.AllowedOAuthScopes !== undefined && + input.AllowedOAuthScopes !== null && { + AllowedOAuthScopes: serializeAws_json1_1ScopeListType(input.AllowedOAuthScopes, context), + }), + ...(input.AnalyticsConfiguration !== undefined && + input.AnalyticsConfiguration !== null && { + AnalyticsConfiguration: serializeAws_json1_1AnalyticsConfigurationType(input.AnalyticsConfiguration, context), + }), + ...(input.CallbackURLs !== undefined && + input.CallbackURLs !== null && { + CallbackURLs: serializeAws_json1_1CallbackURLsListType(input.CallbackURLs, context), + }), + ...(input.ClientName !== undefined && input.ClientName !== null && { ClientName: input.ClientName }), + ...(input.DefaultRedirectURI !== undefined && + input.DefaultRedirectURI !== null && { DefaultRedirectURI: input.DefaultRedirectURI }), + ...(input.ExplicitAuthFlows !== undefined && + input.ExplicitAuthFlows !== null && { + ExplicitAuthFlows: serializeAws_json1_1ExplicitAuthFlowsListType(input.ExplicitAuthFlows, context), + }), + ...(input.GenerateSecret !== undefined && + input.GenerateSecret !== null && { GenerateSecret: input.GenerateSecret }), + ...(input.IdTokenValidity !== undefined && + input.IdTokenValidity !== null && { IdTokenValidity: input.IdTokenValidity }), + ...(input.LogoutURLs !== undefined && + input.LogoutURLs !== null && { LogoutURLs: serializeAws_json1_1LogoutURLsListType(input.LogoutURLs, context) }), + ...(input.PreventUserExistenceErrors !== undefined && + input.PreventUserExistenceErrors !== null && { PreventUserExistenceErrors: input.PreventUserExistenceErrors }), + ...(input.ReadAttributes !== undefined && + input.ReadAttributes !== null && { + ReadAttributes: serializeAws_json1_1ClientPermissionListType(input.ReadAttributes, context), + }), + ...(input.RefreshTokenValidity !== undefined && + input.RefreshTokenValidity !== null && { RefreshTokenValidity: input.RefreshTokenValidity }), + ...(input.SupportedIdentityProviders !== undefined && + input.SupportedIdentityProviders !== null && { + SupportedIdentityProviders: serializeAws_json1_1SupportedIdentityProvidersListType(input.SupportedIdentityProviders, context), + }), + ...(input.TokenValidityUnits !== undefined && + input.TokenValidityUnits !== null && { + TokenValidityUnits: serializeAws_json1_1TokenValidityUnitsType(input.TokenValidityUnits, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.WriteAttributes !== undefined && + input.WriteAttributes !== null && { + WriteAttributes: serializeAws_json1_1ClientPermissionListType(input.WriteAttributes, context), + }), + }; +}; +const serializeAws_json1_1CreateUserPoolDomainRequest = (input, context) => { + return { + ...(input.CustomDomainConfig !== undefined && + input.CustomDomainConfig !== null && { + CustomDomainConfig: serializeAws_json1_1CustomDomainConfigType(input.CustomDomainConfig, context), + }), + ...(input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1CreateUserPoolRequest = (input, context) => { + return { + ...(input.AccountRecoverySetting !== undefined && + input.AccountRecoverySetting !== null && { + AccountRecoverySetting: serializeAws_json1_1AccountRecoverySettingType(input.AccountRecoverySetting, context), + }), + ...(input.AdminCreateUserConfig !== undefined && + input.AdminCreateUserConfig !== null && { + AdminCreateUserConfig: serializeAws_json1_1AdminCreateUserConfigType(input.AdminCreateUserConfig, context), + }), + ...(input.AliasAttributes !== undefined && + input.AliasAttributes !== null && { + AliasAttributes: serializeAws_json1_1AliasAttributesListType(input.AliasAttributes, context), + }), + ...(input.AutoVerifiedAttributes !== undefined && + input.AutoVerifiedAttributes !== null && { + AutoVerifiedAttributes: serializeAws_json1_1VerifiedAttributesListType(input.AutoVerifiedAttributes, context), + }), + ...(input.DeviceConfiguration !== undefined && + input.DeviceConfiguration !== null && { + DeviceConfiguration: serializeAws_json1_1DeviceConfigurationType(input.DeviceConfiguration, context), + }), + ...(input.EmailConfiguration !== undefined && + input.EmailConfiguration !== null && { + EmailConfiguration: serializeAws_json1_1EmailConfigurationType(input.EmailConfiguration, context), + }), + ...(input.EmailVerificationMessage !== undefined && + input.EmailVerificationMessage !== null && { EmailVerificationMessage: input.EmailVerificationMessage }), + ...(input.EmailVerificationSubject !== undefined && + input.EmailVerificationSubject !== null && { EmailVerificationSubject: input.EmailVerificationSubject }), + ...(input.LambdaConfig !== undefined && + input.LambdaConfig !== null && { + LambdaConfig: serializeAws_json1_1LambdaConfigType(input.LambdaConfig, context), + }), + ...(input.MfaConfiguration !== undefined && + input.MfaConfiguration !== null && { MfaConfiguration: input.MfaConfiguration }), + ...(input.Policies !== undefined && + input.Policies !== null && { Policies: serializeAws_json1_1UserPoolPolicyType(input.Policies, context) }), + ...(input.PoolName !== undefined && input.PoolName !== null && { PoolName: input.PoolName }), + ...(input.Schema !== undefined && + input.Schema !== null && { Schema: serializeAws_json1_1SchemaAttributesListType(input.Schema, context) }), + ...(input.SmsAuthenticationMessage !== undefined && + input.SmsAuthenticationMessage !== null && { SmsAuthenticationMessage: input.SmsAuthenticationMessage }), + ...(input.SmsConfiguration !== undefined && + input.SmsConfiguration !== null && { + SmsConfiguration: serializeAws_json1_1SmsConfigurationType(input.SmsConfiguration, context), + }), + ...(input.SmsVerificationMessage !== undefined && + input.SmsVerificationMessage !== null && { SmsVerificationMessage: input.SmsVerificationMessage }), + ...(input.UserPoolAddOns !== undefined && + input.UserPoolAddOns !== null && { + UserPoolAddOns: serializeAws_json1_1UserPoolAddOnsType(input.UserPoolAddOns, context), + }), + ...(input.UserPoolTags !== undefined && + input.UserPoolTags !== null && { + UserPoolTags: serializeAws_json1_1UserPoolTagsType(input.UserPoolTags, context), + }), + ...(input.UsernameAttributes !== undefined && + input.UsernameAttributes !== null && { + UsernameAttributes: serializeAws_json1_1UsernameAttributesListType(input.UsernameAttributes, context), + }), + ...(input.UsernameConfiguration !== undefined && + input.UsernameConfiguration !== null && { + UsernameConfiguration: serializeAws_json1_1UsernameConfigurationType(input.UsernameConfiguration, context), + }), + ...(input.VerificationMessageTemplate !== undefined && + input.VerificationMessageTemplate !== null && { + VerificationMessageTemplate: serializeAws_json1_1VerificationMessageTemplateType(input.VerificationMessageTemplate, context), + }), + }; +}; +const serializeAws_json1_1CustomAttributesListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1SchemaAttributeType(entry, context); + }); +}; +const serializeAws_json1_1CustomDomainConfigType = (input, context) => { + return { + ...(input.CertificateArn !== undefined && + input.CertificateArn !== null && { CertificateArn: input.CertificateArn }), + }; +}; +const serializeAws_json1_1CustomEmailLambdaVersionConfigType = (input, context) => { + return { + ...(input.LambdaArn !== undefined && input.LambdaArn !== null && { LambdaArn: input.LambdaArn }), + ...(input.LambdaVersion !== undefined && input.LambdaVersion !== null && { LambdaVersion: input.LambdaVersion }), + }; +}; +const serializeAws_json1_1CustomSMSLambdaVersionConfigType = (input, context) => { + return { + ...(input.LambdaArn !== undefined && input.LambdaArn !== null && { LambdaArn: input.LambdaArn }), + ...(input.LambdaVersion !== undefined && input.LambdaVersion !== null && { LambdaVersion: input.LambdaVersion }), + }; +}; +const serializeAws_json1_1DeleteGroupRequest = (input, context) => { + return { + ...(input.GroupName !== undefined && input.GroupName !== null && { GroupName: input.GroupName }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DeleteIdentityProviderRequest = (input, context) => { + return { + ...(input.ProviderName !== undefined && input.ProviderName !== null && { ProviderName: input.ProviderName }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DeleteResourceServerRequest = (input, context) => { + return { + ...(input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DeleteUserAttributesRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.UserAttributeNames !== undefined && + input.UserAttributeNames !== null && { + UserAttributeNames: serializeAws_json1_1AttributeNameListType(input.UserAttributeNames, context), + }), + }; +}; +const serializeAws_json1_1DeleteUserPoolClientRequest = (input, context) => { + return { + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DeleteUserPoolDomainRequest = (input, context) => { + return { + ...(input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DeleteUserPoolRequest = (input, context) => { + return { + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DeleteUserRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + }; +}; +const serializeAws_json1_1DeliveryMediumListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1DescribeIdentityProviderRequest = (input, context) => { + return { + ...(input.ProviderName !== undefined && input.ProviderName !== null && { ProviderName: input.ProviderName }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DescribeResourceServerRequest = (input, context) => { + return { + ...(input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DescribeRiskConfigurationRequest = (input, context) => { + return { + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DescribeUserImportJobRequest = (input, context) => { + return { + ...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DescribeUserPoolClientRequest = (input, context) => { + return { + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DescribeUserPoolDomainRequest = (input, context) => { + return { + ...(input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain }), + }; +}; +const serializeAws_json1_1DescribeUserPoolRequest = (input, context) => { + return { + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1DeviceConfigurationType = (input, context) => { + return { + ...(input.ChallengeRequiredOnNewDevice !== undefined && + input.ChallengeRequiredOnNewDevice !== null && { + ChallengeRequiredOnNewDevice: input.ChallengeRequiredOnNewDevice, + }), + ...(input.DeviceOnlyRememberedOnUserPrompt !== undefined && + input.DeviceOnlyRememberedOnUserPrompt !== null && { + DeviceOnlyRememberedOnUserPrompt: input.DeviceOnlyRememberedOnUserPrompt, + }), + }; +}; +const serializeAws_json1_1DeviceSecretVerifierConfigType = (input, context) => { + return { + ...(input.PasswordVerifier !== undefined && + input.PasswordVerifier !== null && { PasswordVerifier: input.PasswordVerifier }), + ...(input.Salt !== undefined && input.Salt !== null && { Salt: input.Salt }), + }; +}; +const serializeAws_json1_1EmailConfigurationType = (input, context) => { + return { + ...(input.ConfigurationSet !== undefined && + input.ConfigurationSet !== null && { ConfigurationSet: input.ConfigurationSet }), + ...(input.EmailSendingAccount !== undefined && + input.EmailSendingAccount !== null && { EmailSendingAccount: input.EmailSendingAccount }), + ...(input.From !== undefined && input.From !== null && { From: input.From }), + ...(input.ReplyToEmailAddress !== undefined && + input.ReplyToEmailAddress !== null && { ReplyToEmailAddress: input.ReplyToEmailAddress }), + ...(input.SourceArn !== undefined && input.SourceArn !== null && { SourceArn: input.SourceArn }), + }; +}; +const serializeAws_json1_1EventFiltersType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1ExplicitAuthFlowsListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1ForgetDeviceRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.DeviceKey !== undefined && input.DeviceKey !== null && { DeviceKey: input.DeviceKey }), + }; +}; +const serializeAws_json1_1ForgotPasswordRequest = (input, context) => { + return { + ...(input.AnalyticsMetadata !== undefined && + input.AnalyticsMetadata !== null && { + AnalyticsMetadata: serializeAws_json1_1AnalyticsMetadataType(input.AnalyticsMetadata, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.SecretHash !== undefined && input.SecretHash !== null && { SecretHash: input.SecretHash }), + ...(input.UserContextData !== undefined && + input.UserContextData !== null && { + UserContextData: serializeAws_json1_1UserContextDataType(input.UserContextData, context), + }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1GetCSVHeaderRequest = (input, context) => { + return { + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1GetDeviceRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.DeviceKey !== undefined && input.DeviceKey !== null && { DeviceKey: input.DeviceKey }), + }; +}; +const serializeAws_json1_1GetGroupRequest = (input, context) => { + return { + ...(input.GroupName !== undefined && input.GroupName !== null && { GroupName: input.GroupName }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1GetIdentityProviderByIdentifierRequest = (input, context) => { + return { + ...(input.IdpIdentifier !== undefined && input.IdpIdentifier !== null && { IdpIdentifier: input.IdpIdentifier }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1GetSigningCertificateRequest = (input, context) => { + return { + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1GetUICustomizationRequest = (input, context) => { + return { + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1GetUserAttributeVerificationCodeRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.AttributeName !== undefined && input.AttributeName !== null && { AttributeName: input.AttributeName }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + }; +}; +const serializeAws_json1_1GetUserPoolMfaConfigRequest = (input, context) => { + return { + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1GetUserRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + }; +}; +const serializeAws_json1_1GlobalSignOutRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + }; +}; +const serializeAws_json1_1HttpHeader = (input, context) => { + return { + ...(input.headerName !== undefined && input.headerName !== null && { headerName: input.headerName }), + ...(input.headerValue !== undefined && input.headerValue !== null && { headerValue: input.headerValue }), + }; +}; +const serializeAws_json1_1HttpHeaderList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1HttpHeader(entry, context); + }); +}; +const serializeAws_json1_1IdpIdentifiersListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1InitiateAuthRequest = (input, context) => { + return { + ...(input.AnalyticsMetadata !== undefined && + input.AnalyticsMetadata !== null && { + AnalyticsMetadata: serializeAws_json1_1AnalyticsMetadataType(input.AnalyticsMetadata, context), + }), + ...(input.AuthFlow !== undefined && input.AuthFlow !== null && { AuthFlow: input.AuthFlow }), + ...(input.AuthParameters !== undefined && + input.AuthParameters !== null && { + AuthParameters: serializeAws_json1_1AuthParametersType(input.AuthParameters, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.UserContextData !== undefined && + input.UserContextData !== null && { + UserContextData: serializeAws_json1_1UserContextDataType(input.UserContextData, context), + }), + }; +}; +const serializeAws_json1_1LambdaConfigType = (input, context) => { + return { + ...(input.CreateAuthChallenge !== undefined && + input.CreateAuthChallenge !== null && { CreateAuthChallenge: input.CreateAuthChallenge }), + ...(input.CustomEmailSender !== undefined && + input.CustomEmailSender !== null && { + CustomEmailSender: serializeAws_json1_1CustomEmailLambdaVersionConfigType(input.CustomEmailSender, context), + }), + ...(input.CustomMessage !== undefined && input.CustomMessage !== null && { CustomMessage: input.CustomMessage }), + ...(input.CustomSMSSender !== undefined && + input.CustomSMSSender !== null && { + CustomSMSSender: serializeAws_json1_1CustomSMSLambdaVersionConfigType(input.CustomSMSSender, context), + }), + ...(input.DefineAuthChallenge !== undefined && + input.DefineAuthChallenge !== null && { DefineAuthChallenge: input.DefineAuthChallenge }), + ...(input.KMSKeyID !== undefined && input.KMSKeyID !== null && { KMSKeyID: input.KMSKeyID }), + ...(input.PostAuthentication !== undefined && + input.PostAuthentication !== null && { PostAuthentication: input.PostAuthentication }), + ...(input.PostConfirmation !== undefined && + input.PostConfirmation !== null && { PostConfirmation: input.PostConfirmation }), + ...(input.PreAuthentication !== undefined && + input.PreAuthentication !== null && { PreAuthentication: input.PreAuthentication }), + ...(input.PreSignUp !== undefined && input.PreSignUp !== null && { PreSignUp: input.PreSignUp }), + ...(input.PreTokenGeneration !== undefined && + input.PreTokenGeneration !== null && { PreTokenGeneration: input.PreTokenGeneration }), + ...(input.UserMigration !== undefined && input.UserMigration !== null && { UserMigration: input.UserMigration }), + ...(input.VerifyAuthChallengeResponse !== undefined && + input.VerifyAuthChallengeResponse !== null && { VerifyAuthChallengeResponse: input.VerifyAuthChallengeResponse }), + }; +}; +const serializeAws_json1_1ListDevicesRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }), + ...(input.PaginationToken !== undefined && + input.PaginationToken !== null && { PaginationToken: input.PaginationToken }), + }; +}; +const serializeAws_json1_1ListGroupsRequest = (input, context) => { + return { + ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1ListIdentityProvidersRequest = (input, context) => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1ListResourceServersRequest = (input, context) => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => { + return { + ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }), + }; +}; +const serializeAws_json1_1ListUserImportJobsRequest = (input, context) => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.PaginationToken !== undefined && + input.PaginationToken !== null && { PaginationToken: input.PaginationToken }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1ListUserPoolClientsRequest = (input, context) => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1ListUserPoolsRequest = (input, context) => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + }; +}; +const serializeAws_json1_1ListUsersInGroupRequest = (input, context) => { + return { + ...(input.GroupName !== undefined && input.GroupName !== null && { GroupName: input.GroupName }), + ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1ListUsersRequest = (input, context) => { + return { + ...(input.AttributesToGet !== undefined && + input.AttributesToGet !== null && { + AttributesToGet: serializeAws_json1_1SearchedAttributeNamesListType(input.AttributesToGet, context), + }), + ...(input.Filter !== undefined && input.Filter !== null && { Filter: input.Filter }), + ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }), + ...(input.PaginationToken !== undefined && + input.PaginationToken !== null && { PaginationToken: input.PaginationToken }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1LogoutURLsListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1MessageTemplateType = (input, context) => { + return { + ...(input.EmailMessage !== undefined && input.EmailMessage !== null && { EmailMessage: input.EmailMessage }), + ...(input.EmailSubject !== undefined && input.EmailSubject !== null && { EmailSubject: input.EmailSubject }), + ...(input.SMSMessage !== undefined && input.SMSMessage !== null && { SMSMessage: input.SMSMessage }), + }; +}; +const serializeAws_json1_1MFAOptionListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1MFAOptionType(entry, context); + }); +}; +const serializeAws_json1_1MFAOptionType = (input, context) => { + return { + ...(input.AttributeName !== undefined && input.AttributeName !== null && { AttributeName: input.AttributeName }), + ...(input.DeliveryMedium !== undefined && + input.DeliveryMedium !== null && { DeliveryMedium: input.DeliveryMedium }), + }; +}; +const serializeAws_json1_1NotifyConfigurationType = (input, context) => { + return { + ...(input.BlockEmail !== undefined && + input.BlockEmail !== null && { BlockEmail: serializeAws_json1_1NotifyEmailType(input.BlockEmail, context) }), + ...(input.From !== undefined && input.From !== null && { From: input.From }), + ...(input.MfaEmail !== undefined && + input.MfaEmail !== null && { MfaEmail: serializeAws_json1_1NotifyEmailType(input.MfaEmail, context) }), + ...(input.NoActionEmail !== undefined && + input.NoActionEmail !== null && { + NoActionEmail: serializeAws_json1_1NotifyEmailType(input.NoActionEmail, context), + }), + ...(input.ReplyTo !== undefined && input.ReplyTo !== null && { ReplyTo: input.ReplyTo }), + ...(input.SourceArn !== undefined && input.SourceArn !== null && { SourceArn: input.SourceArn }), + }; +}; +const serializeAws_json1_1NotifyEmailType = (input, context) => { + return { + ...(input.HtmlBody !== undefined && input.HtmlBody !== null && { HtmlBody: input.HtmlBody }), + ...(input.Subject !== undefined && input.Subject !== null && { Subject: input.Subject }), + ...(input.TextBody !== undefined && input.TextBody !== null && { TextBody: input.TextBody }), + }; +}; +const serializeAws_json1_1NumberAttributeConstraintsType = (input, context) => { + return { + ...(input.MaxValue !== undefined && input.MaxValue !== null && { MaxValue: input.MaxValue }), + ...(input.MinValue !== undefined && input.MinValue !== null && { MinValue: input.MinValue }), + }; +}; +const serializeAws_json1_1OAuthFlowsType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1PasswordPolicyType = (input, context) => { + return { + ...(input.MinimumLength !== undefined && input.MinimumLength !== null && { MinimumLength: input.MinimumLength }), + ...(input.RequireLowercase !== undefined && + input.RequireLowercase !== null && { RequireLowercase: input.RequireLowercase }), + ...(input.RequireNumbers !== undefined && + input.RequireNumbers !== null && { RequireNumbers: input.RequireNumbers }), + ...(input.RequireSymbols !== undefined && + input.RequireSymbols !== null && { RequireSymbols: input.RequireSymbols }), + ...(input.RequireUppercase !== undefined && + input.RequireUppercase !== null && { RequireUppercase: input.RequireUppercase }), + ...(input.TemporaryPasswordValidityDays !== undefined && + input.TemporaryPasswordValidityDays !== null && { + TemporaryPasswordValidityDays: input.TemporaryPasswordValidityDays, + }), + }; +}; +const serializeAws_json1_1ProviderDetailsType = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_json1_1ProviderUserIdentifierType = (input, context) => { + return { + ...(input.ProviderAttributeName !== undefined && + input.ProviderAttributeName !== null && { ProviderAttributeName: input.ProviderAttributeName }), + ...(input.ProviderAttributeValue !== undefined && + input.ProviderAttributeValue !== null && { ProviderAttributeValue: input.ProviderAttributeValue }), + ...(input.ProviderName !== undefined && input.ProviderName !== null && { ProviderName: input.ProviderName }), + }; +}; +const serializeAws_json1_1RecoveryMechanismsType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1RecoveryOptionType(entry, context); + }); +}; +const serializeAws_json1_1RecoveryOptionType = (input, context) => { + return { + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.Priority !== undefined && input.Priority !== null && { Priority: input.Priority }), + }; +}; +const serializeAws_json1_1ResendConfirmationCodeRequest = (input, context) => { + return { + ...(input.AnalyticsMetadata !== undefined && + input.AnalyticsMetadata !== null && { + AnalyticsMetadata: serializeAws_json1_1AnalyticsMetadataType(input.AnalyticsMetadata, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.SecretHash !== undefined && input.SecretHash !== null && { SecretHash: input.SecretHash }), + ...(input.UserContextData !== undefined && + input.UserContextData !== null && { + UserContextData: serializeAws_json1_1UserContextDataType(input.UserContextData, context), + }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1ResourceServerScopeListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1ResourceServerScopeType(entry, context); + }); +}; +const serializeAws_json1_1ResourceServerScopeType = (input, context) => { + return { + ...(input.ScopeDescription !== undefined && + input.ScopeDescription !== null && { ScopeDescription: input.ScopeDescription }), + ...(input.ScopeName !== undefined && input.ScopeName !== null && { ScopeName: input.ScopeName }), + }; +}; +const serializeAws_json1_1RespondToAuthChallengeRequest = (input, context) => { + return { + ...(input.AnalyticsMetadata !== undefined && + input.AnalyticsMetadata !== null && { + AnalyticsMetadata: serializeAws_json1_1AnalyticsMetadataType(input.AnalyticsMetadata, context), + }), + ...(input.ChallengeName !== undefined && input.ChallengeName !== null && { ChallengeName: input.ChallengeName }), + ...(input.ChallengeResponses !== undefined && + input.ChallengeResponses !== null && { + ChallengeResponses: serializeAws_json1_1ChallengeResponsesType(input.ChallengeResponses, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.Session !== undefined && input.Session !== null && { Session: input.Session }), + ...(input.UserContextData !== undefined && + input.UserContextData !== null && { + UserContextData: serializeAws_json1_1UserContextDataType(input.UserContextData, context), + }), + }; +}; +const serializeAws_json1_1RiskExceptionConfigurationType = (input, context) => { + return { + ...(input.BlockedIPRangeList !== undefined && + input.BlockedIPRangeList !== null && { + BlockedIPRangeList: serializeAws_json1_1BlockedIPRangeListType(input.BlockedIPRangeList, context), + }), + ...(input.SkippedIPRangeList !== undefined && + input.SkippedIPRangeList !== null && { + SkippedIPRangeList: serializeAws_json1_1SkippedIPRangeListType(input.SkippedIPRangeList, context), + }), + }; +}; +const serializeAws_json1_1SchemaAttributesListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1SchemaAttributeType(entry, context); + }); +}; +const serializeAws_json1_1SchemaAttributeType = (input, context) => { + return { + ...(input.AttributeDataType !== undefined && + input.AttributeDataType !== null && { AttributeDataType: input.AttributeDataType }), + ...(input.DeveloperOnlyAttribute !== undefined && + input.DeveloperOnlyAttribute !== null && { DeveloperOnlyAttribute: input.DeveloperOnlyAttribute }), + ...(input.Mutable !== undefined && input.Mutable !== null && { Mutable: input.Mutable }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.NumberAttributeConstraints !== undefined && + input.NumberAttributeConstraints !== null && { + NumberAttributeConstraints: serializeAws_json1_1NumberAttributeConstraintsType(input.NumberAttributeConstraints, context), + }), + ...(input.Required !== undefined && input.Required !== null && { Required: input.Required }), + ...(input.StringAttributeConstraints !== undefined && + input.StringAttributeConstraints !== null && { + StringAttributeConstraints: serializeAws_json1_1StringAttributeConstraintsType(input.StringAttributeConstraints, context), + }), + }; +}; +const serializeAws_json1_1ScopeListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1SearchedAttributeNamesListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1SetRiskConfigurationRequest = (input, context) => { + return { + ...(input.AccountTakeoverRiskConfiguration !== undefined && + input.AccountTakeoverRiskConfiguration !== null && { + AccountTakeoverRiskConfiguration: serializeAws_json1_1AccountTakeoverRiskConfigurationType(input.AccountTakeoverRiskConfiguration, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.CompromisedCredentialsRiskConfiguration !== undefined && + input.CompromisedCredentialsRiskConfiguration !== null && { + CompromisedCredentialsRiskConfiguration: serializeAws_json1_1CompromisedCredentialsRiskConfigurationType(input.CompromisedCredentialsRiskConfiguration, context), + }), + ...(input.RiskExceptionConfiguration !== undefined && + input.RiskExceptionConfiguration !== null && { + RiskExceptionConfiguration: serializeAws_json1_1RiskExceptionConfigurationType(input.RiskExceptionConfiguration, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1SetUICustomizationRequest = (input, context) => { + return { + ...(input.CSS !== undefined && input.CSS !== null && { CSS: input.CSS }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ImageFile !== undefined && + input.ImageFile !== null && { ImageFile: context.base64Encoder(input.ImageFile) }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1SetUserMFAPreferenceRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.SMSMfaSettings !== undefined && + input.SMSMfaSettings !== null && { + SMSMfaSettings: serializeAws_json1_1SMSMfaSettingsType(input.SMSMfaSettings, context), + }), + ...(input.SoftwareTokenMfaSettings !== undefined && + input.SoftwareTokenMfaSettings !== null && { + SoftwareTokenMfaSettings: serializeAws_json1_1SoftwareTokenMfaSettingsType(input.SoftwareTokenMfaSettings, context), + }), + }; +}; +const serializeAws_json1_1SetUserPoolMfaConfigRequest = (input, context) => { + return { + ...(input.MfaConfiguration !== undefined && + input.MfaConfiguration !== null && { MfaConfiguration: input.MfaConfiguration }), + ...(input.SmsMfaConfiguration !== undefined && + input.SmsMfaConfiguration !== null && { + SmsMfaConfiguration: serializeAws_json1_1SmsMfaConfigType(input.SmsMfaConfiguration, context), + }), + ...(input.SoftwareTokenMfaConfiguration !== undefined && + input.SoftwareTokenMfaConfiguration !== null && { + SoftwareTokenMfaConfiguration: serializeAws_json1_1SoftwareTokenMfaConfigType(input.SoftwareTokenMfaConfiguration, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1SetUserSettingsRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.MFAOptions !== undefined && + input.MFAOptions !== null && { MFAOptions: serializeAws_json1_1MFAOptionListType(input.MFAOptions, context) }), + }; +}; +const serializeAws_json1_1SignUpRequest = (input, context) => { + return { + ...(input.AnalyticsMetadata !== undefined && + input.AnalyticsMetadata !== null && { + AnalyticsMetadata: serializeAws_json1_1AnalyticsMetadataType(input.AnalyticsMetadata, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.Password !== undefined && input.Password !== null && { Password: input.Password }), + ...(input.SecretHash !== undefined && input.SecretHash !== null && { SecretHash: input.SecretHash }), + ...(input.UserAttributes !== undefined && + input.UserAttributes !== null && { + UserAttributes: serializeAws_json1_1AttributeListType(input.UserAttributes, context), + }), + ...(input.UserContextData !== undefined && + input.UserContextData !== null && { + UserContextData: serializeAws_json1_1UserContextDataType(input.UserContextData, context), + }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + ...(input.ValidationData !== undefined && + input.ValidationData !== null && { + ValidationData: serializeAws_json1_1AttributeListType(input.ValidationData, context), + }), + }; +}; +const serializeAws_json1_1SkippedIPRangeListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1SmsConfigurationType = (input, context) => { + return { + ...(input.ExternalId !== undefined && input.ExternalId !== null && { ExternalId: input.ExternalId }), + ...(input.SnsCallerArn !== undefined && input.SnsCallerArn !== null && { SnsCallerArn: input.SnsCallerArn }), + }; +}; +const serializeAws_json1_1SmsMfaConfigType = (input, context) => { + return { + ...(input.SmsAuthenticationMessage !== undefined && + input.SmsAuthenticationMessage !== null && { SmsAuthenticationMessage: input.SmsAuthenticationMessage }), + ...(input.SmsConfiguration !== undefined && + input.SmsConfiguration !== null && { + SmsConfiguration: serializeAws_json1_1SmsConfigurationType(input.SmsConfiguration, context), + }), + }; +}; +const serializeAws_json1_1SMSMfaSettingsType = (input, context) => { + return { + ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }), + ...(input.PreferredMfa !== undefined && input.PreferredMfa !== null && { PreferredMfa: input.PreferredMfa }), + }; +}; +const serializeAws_json1_1SoftwareTokenMfaConfigType = (input, context) => { + return { + ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }), + }; +}; +const serializeAws_json1_1SoftwareTokenMfaSettingsType = (input, context) => { + return { + ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }), + ...(input.PreferredMfa !== undefined && input.PreferredMfa !== null && { PreferredMfa: input.PreferredMfa }), + }; +}; +const serializeAws_json1_1StartUserImportJobRequest = (input, context) => { + return { + ...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1StopUserImportJobRequest = (input, context) => { + return { + ...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1StringAttributeConstraintsType = (input, context) => { + return { + ...(input.MaxLength !== undefined && input.MaxLength !== null && { MaxLength: input.MaxLength }), + ...(input.MinLength !== undefined && input.MinLength !== null && { MinLength: input.MinLength }), + }; +}; +const serializeAws_json1_1SupportedIdentityProvidersListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +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_1UserPoolTagsType(input.Tags, context) }), + }; +}; +const serializeAws_json1_1TokenValidityUnitsType = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.IdToken !== undefined && input.IdToken !== null && { IdToken: input.IdToken }), + ...(input.RefreshToken !== undefined && input.RefreshToken !== null && { RefreshToken: input.RefreshToken }), + }; +}; +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_1UserPoolTagsListType(input.TagKeys, context) }), + }; +}; +const serializeAws_json1_1UpdateAuthEventFeedbackRequest = (input, context) => { + return { + ...(input.EventId !== undefined && input.EventId !== null && { EventId: input.EventId }), + ...(input.FeedbackToken !== undefined && input.FeedbackToken !== null && { FeedbackToken: input.FeedbackToken }), + ...(input.FeedbackValue !== undefined && input.FeedbackValue !== null && { FeedbackValue: input.FeedbackValue }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; +const serializeAws_json1_1UpdateDeviceStatusRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.DeviceKey !== undefined && input.DeviceKey !== null && { DeviceKey: input.DeviceKey }), + ...(input.DeviceRememberedStatus !== undefined && + input.DeviceRememberedStatus !== null && { DeviceRememberedStatus: input.DeviceRememberedStatus }), + }; +}; +const serializeAws_json1_1UpdateGroupRequest = (input, context) => { + return { + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.GroupName !== undefined && input.GroupName !== null && { GroupName: input.GroupName }), + ...(input.Precedence !== undefined && input.Precedence !== null && { Precedence: input.Precedence }), + ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1UpdateIdentityProviderRequest = (input, context) => { + return { + ...(input.AttributeMapping !== undefined && + input.AttributeMapping !== null && { + AttributeMapping: serializeAws_json1_1AttributeMappingType(input.AttributeMapping, context), + }), + ...(input.IdpIdentifiers !== undefined && + input.IdpIdentifiers !== null && { + IdpIdentifiers: serializeAws_json1_1IdpIdentifiersListType(input.IdpIdentifiers, context), + }), + ...(input.ProviderDetails !== undefined && + input.ProviderDetails !== null && { + ProviderDetails: serializeAws_json1_1ProviderDetailsType(input.ProviderDetails, context), + }), + ...(input.ProviderName !== undefined && input.ProviderName !== null && { ProviderName: input.ProviderName }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1UpdateResourceServerRequest = (input, context) => { + return { + ...(input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.Scopes !== undefined && + input.Scopes !== null && { Scopes: serializeAws_json1_1ResourceServerScopeListType(input.Scopes, context) }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1UpdateUserAttributesRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.ClientMetadata !== undefined && + input.ClientMetadata !== null && { + ClientMetadata: serializeAws_json1_1ClientMetadataType(input.ClientMetadata, context), + }), + ...(input.UserAttributes !== undefined && + input.UserAttributes !== null && { + UserAttributes: serializeAws_json1_1AttributeListType(input.UserAttributes, context), + }), + }; +}; +const serializeAws_json1_1UpdateUserPoolClientRequest = (input, context) => { + return { + ...(input.AccessTokenValidity !== undefined && + input.AccessTokenValidity !== null && { AccessTokenValidity: input.AccessTokenValidity }), + ...(input.AllowedOAuthFlows !== undefined && + input.AllowedOAuthFlows !== null && { + AllowedOAuthFlows: serializeAws_json1_1OAuthFlowsType(input.AllowedOAuthFlows, context), + }), + ...(input.AllowedOAuthFlowsUserPoolClient !== undefined && + input.AllowedOAuthFlowsUserPoolClient !== null && { + AllowedOAuthFlowsUserPoolClient: input.AllowedOAuthFlowsUserPoolClient, + }), + ...(input.AllowedOAuthScopes !== undefined && + input.AllowedOAuthScopes !== null && { + AllowedOAuthScopes: serializeAws_json1_1ScopeListType(input.AllowedOAuthScopes, context), + }), + ...(input.AnalyticsConfiguration !== undefined && + input.AnalyticsConfiguration !== null && { + AnalyticsConfiguration: serializeAws_json1_1AnalyticsConfigurationType(input.AnalyticsConfiguration, context), + }), + ...(input.CallbackURLs !== undefined && + input.CallbackURLs !== null && { + CallbackURLs: serializeAws_json1_1CallbackURLsListType(input.CallbackURLs, context), + }), + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ClientName !== undefined && input.ClientName !== null && { ClientName: input.ClientName }), + ...(input.DefaultRedirectURI !== undefined && + input.DefaultRedirectURI !== null && { DefaultRedirectURI: input.DefaultRedirectURI }), + ...(input.ExplicitAuthFlows !== undefined && + input.ExplicitAuthFlows !== null && { + ExplicitAuthFlows: serializeAws_json1_1ExplicitAuthFlowsListType(input.ExplicitAuthFlows, context), + }), + ...(input.IdTokenValidity !== undefined && + input.IdTokenValidity !== null && { IdTokenValidity: input.IdTokenValidity }), + ...(input.LogoutURLs !== undefined && + input.LogoutURLs !== null && { LogoutURLs: serializeAws_json1_1LogoutURLsListType(input.LogoutURLs, context) }), + ...(input.PreventUserExistenceErrors !== undefined && + input.PreventUserExistenceErrors !== null && { PreventUserExistenceErrors: input.PreventUserExistenceErrors }), + ...(input.ReadAttributes !== undefined && + input.ReadAttributes !== null && { + ReadAttributes: serializeAws_json1_1ClientPermissionListType(input.ReadAttributes, context), + }), + ...(input.RefreshTokenValidity !== undefined && + input.RefreshTokenValidity !== null && { RefreshTokenValidity: input.RefreshTokenValidity }), + ...(input.SupportedIdentityProviders !== undefined && + input.SupportedIdentityProviders !== null && { + SupportedIdentityProviders: serializeAws_json1_1SupportedIdentityProvidersListType(input.SupportedIdentityProviders, context), + }), + ...(input.TokenValidityUnits !== undefined && + input.TokenValidityUnits !== null && { + TokenValidityUnits: serializeAws_json1_1TokenValidityUnitsType(input.TokenValidityUnits, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.WriteAttributes !== undefined && + input.WriteAttributes !== null && { + WriteAttributes: serializeAws_json1_1ClientPermissionListType(input.WriteAttributes, context), + }), + }; +}; +const serializeAws_json1_1UpdateUserPoolDomainRequest = (input, context) => { + return { + ...(input.CustomDomainConfig !== undefined && + input.CustomDomainConfig !== null && { + CustomDomainConfig: serializeAws_json1_1CustomDomainConfigType(input.CustomDomainConfig, context), + }), + ...(input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + }; +}; +const serializeAws_json1_1UpdateUserPoolRequest = (input, context) => { + return { + ...(input.AccountRecoverySetting !== undefined && + input.AccountRecoverySetting !== null && { + AccountRecoverySetting: serializeAws_json1_1AccountRecoverySettingType(input.AccountRecoverySetting, context), + }), + ...(input.AdminCreateUserConfig !== undefined && + input.AdminCreateUserConfig !== null && { + AdminCreateUserConfig: serializeAws_json1_1AdminCreateUserConfigType(input.AdminCreateUserConfig, context), + }), + ...(input.AutoVerifiedAttributes !== undefined && + input.AutoVerifiedAttributes !== null && { + AutoVerifiedAttributes: serializeAws_json1_1VerifiedAttributesListType(input.AutoVerifiedAttributes, context), + }), + ...(input.DeviceConfiguration !== undefined && + input.DeviceConfiguration !== null && { + DeviceConfiguration: serializeAws_json1_1DeviceConfigurationType(input.DeviceConfiguration, context), + }), + ...(input.EmailConfiguration !== undefined && + input.EmailConfiguration !== null && { + EmailConfiguration: serializeAws_json1_1EmailConfigurationType(input.EmailConfiguration, context), + }), + ...(input.EmailVerificationMessage !== undefined && + input.EmailVerificationMessage !== null && { EmailVerificationMessage: input.EmailVerificationMessage }), + ...(input.EmailVerificationSubject !== undefined && + input.EmailVerificationSubject !== null && { EmailVerificationSubject: input.EmailVerificationSubject }), + ...(input.LambdaConfig !== undefined && + input.LambdaConfig !== null && { + LambdaConfig: serializeAws_json1_1LambdaConfigType(input.LambdaConfig, context), + }), + ...(input.MfaConfiguration !== undefined && + input.MfaConfiguration !== null && { MfaConfiguration: input.MfaConfiguration }), + ...(input.Policies !== undefined && + input.Policies !== null && { Policies: serializeAws_json1_1UserPoolPolicyType(input.Policies, context) }), + ...(input.SmsAuthenticationMessage !== undefined && + input.SmsAuthenticationMessage !== null && { SmsAuthenticationMessage: input.SmsAuthenticationMessage }), + ...(input.SmsConfiguration !== undefined && + input.SmsConfiguration !== null && { + SmsConfiguration: serializeAws_json1_1SmsConfigurationType(input.SmsConfiguration, context), + }), + ...(input.SmsVerificationMessage !== undefined && + input.SmsVerificationMessage !== null && { SmsVerificationMessage: input.SmsVerificationMessage }), + ...(input.UserPoolAddOns !== undefined && + input.UserPoolAddOns !== null && { + UserPoolAddOns: serializeAws_json1_1UserPoolAddOnsType(input.UserPoolAddOns, context), + }), + ...(input.UserPoolId !== undefined && input.UserPoolId !== null && { UserPoolId: input.UserPoolId }), + ...(input.UserPoolTags !== undefined && + input.UserPoolTags !== null && { + UserPoolTags: serializeAws_json1_1UserPoolTagsType(input.UserPoolTags, context), + }), + ...(input.VerificationMessageTemplate !== undefined && + input.VerificationMessageTemplate !== null && { + VerificationMessageTemplate: serializeAws_json1_1VerificationMessageTemplateType(input.VerificationMessageTemplate, context), + }), + }; +}; +const serializeAws_json1_1UserContextDataType = (input, context) => { + return { + ...(input.EncodedData !== undefined && input.EncodedData !== null && { EncodedData: input.EncodedData }), + }; +}; +const serializeAws_json1_1UsernameAttributesListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1UsernameConfigurationType = (input, context) => { + return { + ...(input.CaseSensitive !== undefined && input.CaseSensitive !== null && { CaseSensitive: input.CaseSensitive }), + }; +}; +const serializeAws_json1_1UserPoolAddOnsType = (input, context) => { + return { + ...(input.AdvancedSecurityMode !== undefined && + input.AdvancedSecurityMode !== null && { AdvancedSecurityMode: input.AdvancedSecurityMode }), + }; +}; +const serializeAws_json1_1UserPoolPolicyType = (input, context) => { + return { + ...(input.PasswordPolicy !== undefined && + input.PasswordPolicy !== null && { + PasswordPolicy: serializeAws_json1_1PasswordPolicyType(input.PasswordPolicy, context), + }), + }; +}; +const serializeAws_json1_1UserPoolTagsListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1UserPoolTagsType = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_json1_1VerificationMessageTemplateType = (input, context) => { + return { + ...(input.DefaultEmailOption !== undefined && + input.DefaultEmailOption !== null && { DefaultEmailOption: input.DefaultEmailOption }), + ...(input.EmailMessage !== undefined && input.EmailMessage !== null && { EmailMessage: input.EmailMessage }), + ...(input.EmailMessageByLink !== undefined && + input.EmailMessageByLink !== null && { EmailMessageByLink: input.EmailMessageByLink }), + ...(input.EmailSubject !== undefined && input.EmailSubject !== null && { EmailSubject: input.EmailSubject }), + ...(input.EmailSubjectByLink !== undefined && + input.EmailSubjectByLink !== null && { EmailSubjectByLink: input.EmailSubjectByLink }), + ...(input.SmsMessage !== undefined && input.SmsMessage !== null && { SmsMessage: input.SmsMessage }), + }; +}; +const serializeAws_json1_1VerifiedAttributesListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1VerifySoftwareTokenRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.FriendlyDeviceName !== undefined && + input.FriendlyDeviceName !== null && { FriendlyDeviceName: input.FriendlyDeviceName }), + ...(input.Session !== undefined && input.Session !== null && { Session: input.Session }), + ...(input.UserCode !== undefined && input.UserCode !== null && { UserCode: input.UserCode }), + }; +}; +const serializeAws_json1_1VerifyUserAttributeRequest = (input, context) => { + return { + ...(input.AccessToken !== undefined && input.AccessToken !== null && { AccessToken: input.AccessToken }), + ...(input.AttributeName !== undefined && input.AttributeName !== null && { AttributeName: input.AttributeName }), + ...(input.Code !== undefined && input.Code !== null && { Code: input.Code }), + }; +}; +const deserializeAws_json1_1AccountRecoverySettingType = (output, context) => { + return { + RecoveryMechanisms: output.RecoveryMechanisms !== undefined && output.RecoveryMechanisms !== null + ? deserializeAws_json1_1RecoveryMechanismsType(output.RecoveryMechanisms, context) + : undefined, + }; +}; +const deserializeAws_json1_1AccountTakeoverActionsType = (output, context) => { + return { + HighAction: output.HighAction !== undefined && output.HighAction !== null + ? deserializeAws_json1_1AccountTakeoverActionType(output.HighAction, context) + : undefined, + LowAction: output.LowAction !== undefined && output.LowAction !== null + ? deserializeAws_json1_1AccountTakeoverActionType(output.LowAction, context) + : undefined, + MediumAction: output.MediumAction !== undefined && output.MediumAction !== null + ? deserializeAws_json1_1AccountTakeoverActionType(output.MediumAction, context) + : undefined, + }; +}; +const deserializeAws_json1_1AccountTakeoverActionType = (output, context) => { + return { + EventAction: output.EventAction !== undefined && output.EventAction !== null ? output.EventAction : undefined, + Notify: output.Notify !== undefined && output.Notify !== null ? output.Notify : undefined, + }; +}; +const deserializeAws_json1_1AccountTakeoverRiskConfigurationType = (output, context) => { + return { + Actions: output.Actions !== undefined && output.Actions !== null + ? deserializeAws_json1_1AccountTakeoverActionsType(output.Actions, context) + : undefined, + NotifyConfiguration: output.NotifyConfiguration !== undefined && output.NotifyConfiguration !== null + ? deserializeAws_json1_1NotifyConfigurationType(output.NotifyConfiguration, context) + : undefined, + }; +}; +const deserializeAws_json1_1AddCustomAttributesResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminConfirmSignUpResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminCreateUserConfigType = (output, context) => { + return { + AllowAdminCreateUserOnly: output.AllowAdminCreateUserOnly !== undefined && output.AllowAdminCreateUserOnly !== null + ? output.AllowAdminCreateUserOnly + : undefined, + InviteMessageTemplate: output.InviteMessageTemplate !== undefined && output.InviteMessageTemplate !== null + ? deserializeAws_json1_1MessageTemplateType(output.InviteMessageTemplate, context) + : undefined, + UnusedAccountValidityDays: output.UnusedAccountValidityDays !== undefined && output.UnusedAccountValidityDays !== null + ? output.UnusedAccountValidityDays + : undefined, + }; +}; +const deserializeAws_json1_1AdminCreateUserResponse = (output, context) => { + return { + User: output.User !== undefined && output.User !== null + ? deserializeAws_json1_1UserType(output.User, context) + : undefined, + }; +}; +const deserializeAws_json1_1AdminDeleteUserAttributesResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminDisableProviderForUserResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminDisableUserResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminEnableUserResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminGetDeviceResponse = (output, context) => { + return { + Device: output.Device !== undefined && output.Device !== null + ? deserializeAws_json1_1DeviceType(output.Device, context) + : undefined, + }; +}; +const deserializeAws_json1_1AdminGetUserResponse = (output, context) => { + return { + Enabled: output.Enabled !== undefined && output.Enabled !== null ? output.Enabled : undefined, + MFAOptions: output.MFAOptions !== undefined && output.MFAOptions !== null + ? deserializeAws_json1_1MFAOptionListType(output.MFAOptions, context) + : undefined, + PreferredMfaSetting: output.PreferredMfaSetting !== undefined && output.PreferredMfaSetting !== null + ? output.PreferredMfaSetting + : undefined, + UserAttributes: output.UserAttributes !== undefined && output.UserAttributes !== null + ? deserializeAws_json1_1AttributeListType(output.UserAttributes, context) + : undefined, + UserCreateDate: output.UserCreateDate !== undefined && output.UserCreateDate !== null + ? new Date(Math.round(output.UserCreateDate * 1000)) + : undefined, + UserLastModifiedDate: output.UserLastModifiedDate !== undefined && output.UserLastModifiedDate !== null + ? new Date(Math.round(output.UserLastModifiedDate * 1000)) + : undefined, + UserMFASettingList: output.UserMFASettingList !== undefined && output.UserMFASettingList !== null + ? deserializeAws_json1_1UserMFASettingListType(output.UserMFASettingList, context) + : undefined, + UserStatus: output.UserStatus !== undefined && output.UserStatus !== null ? output.UserStatus : undefined, + Username: output.Username !== undefined && output.Username !== null ? output.Username : undefined, + }; +}; +const deserializeAws_json1_1AdminInitiateAuthResponse = (output, context) => { + return { + AuthenticationResult: output.AuthenticationResult !== undefined && output.AuthenticationResult !== null + ? deserializeAws_json1_1AuthenticationResultType(output.AuthenticationResult, context) + : undefined, + ChallengeName: output.ChallengeName !== undefined && output.ChallengeName !== null ? output.ChallengeName : undefined, + ChallengeParameters: output.ChallengeParameters !== undefined && output.ChallengeParameters !== null + ? deserializeAws_json1_1ChallengeParametersType(output.ChallengeParameters, context) + : undefined, + Session: output.Session !== undefined && output.Session !== null ? output.Session : undefined, + }; +}; +const deserializeAws_json1_1AdminLinkProviderForUserResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminListDevicesResponse = (output, context) => { + return { + Devices: output.Devices !== undefined && output.Devices !== null + ? deserializeAws_json1_1DeviceListType(output.Devices, context) + : undefined, + PaginationToken: output.PaginationToken !== undefined && output.PaginationToken !== null ? output.PaginationToken : undefined, + }; +}; +const deserializeAws_json1_1AdminListGroupsForUserResponse = (output, context) => { + return { + Groups: output.Groups !== undefined && output.Groups !== null + ? deserializeAws_json1_1GroupListType(output.Groups, context) + : undefined, + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + }; +}; +const deserializeAws_json1_1AdminListUserAuthEventsResponse = (output, context) => { + return { + AuthEvents: output.AuthEvents !== undefined && output.AuthEvents !== null + ? deserializeAws_json1_1AuthEventsType(output.AuthEvents, context) + : undefined, + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + }; +}; +const deserializeAws_json1_1AdminResetUserPasswordResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminRespondToAuthChallengeResponse = (output, context) => { + return { + AuthenticationResult: output.AuthenticationResult !== undefined && output.AuthenticationResult !== null + ? deserializeAws_json1_1AuthenticationResultType(output.AuthenticationResult, context) + : undefined, + ChallengeName: output.ChallengeName !== undefined && output.ChallengeName !== null ? output.ChallengeName : undefined, + ChallengeParameters: output.ChallengeParameters !== undefined && output.ChallengeParameters !== null + ? deserializeAws_json1_1ChallengeParametersType(output.ChallengeParameters, context) + : undefined, + Session: output.Session !== undefined && output.Session !== null ? output.Session : undefined, + }; +}; +const deserializeAws_json1_1AdminSetUserMFAPreferenceResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminSetUserPasswordResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminSetUserSettingsResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminUpdateAuthEventFeedbackResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminUpdateDeviceStatusResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminUpdateUserAttributesResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AdminUserGlobalSignOutResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1AliasAttributesListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1AliasExistsException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1AnalyticsConfigurationType = (output, context) => { + return { + ApplicationArn: output.ApplicationArn !== undefined && output.ApplicationArn !== null ? output.ApplicationArn : undefined, + ApplicationId: output.ApplicationId !== undefined && output.ApplicationId !== null ? output.ApplicationId : undefined, + ExternalId: output.ExternalId !== undefined && output.ExternalId !== null ? output.ExternalId : undefined, + RoleArn: output.RoleArn !== undefined && output.RoleArn !== null ? output.RoleArn : undefined, + UserDataShared: output.UserDataShared !== undefined && output.UserDataShared !== null ? output.UserDataShared : undefined, + }; +}; +const deserializeAws_json1_1AssociateSoftwareTokenResponse = (output, context) => { + return { + SecretCode: output.SecretCode !== undefined && output.SecretCode !== null ? output.SecretCode : undefined, + Session: output.Session !== undefined && output.Session !== null ? output.Session : undefined, + }; +}; +const deserializeAws_json1_1AttributeListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1AttributeType(entry, context); + }); +}; +const deserializeAws_json1_1AttributeMappingType = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_json1_1AttributeType = (output, context) => { + return { + Name: output.Name !== undefined && output.Name !== null ? output.Name : undefined, + Value: output.Value !== undefined && output.Value !== null ? output.Value : undefined, + }; +}; +const deserializeAws_json1_1AuthenticationResultType = (output, context) => { + return { + AccessToken: output.AccessToken !== undefined && output.AccessToken !== null ? output.AccessToken : undefined, + ExpiresIn: output.ExpiresIn !== undefined && output.ExpiresIn !== null ? output.ExpiresIn : undefined, + IdToken: output.IdToken !== undefined && output.IdToken !== null ? output.IdToken : undefined, + NewDeviceMetadata: output.NewDeviceMetadata !== undefined && output.NewDeviceMetadata !== null + ? deserializeAws_json1_1NewDeviceMetadataType(output.NewDeviceMetadata, context) + : undefined, + RefreshToken: output.RefreshToken !== undefined && output.RefreshToken !== null ? output.RefreshToken : undefined, + TokenType: output.TokenType !== undefined && output.TokenType !== null ? output.TokenType : undefined, + }; +}; +const deserializeAws_json1_1AuthEventsType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1AuthEventType(entry, context); + }); +}; +const deserializeAws_json1_1AuthEventType = (output, context) => { + return { + ChallengeResponses: output.ChallengeResponses !== undefined && output.ChallengeResponses !== null + ? deserializeAws_json1_1ChallengeResponseListType(output.ChallengeResponses, context) + : undefined, + CreationDate: output.CreationDate !== undefined && output.CreationDate !== null + ? new Date(Math.round(output.CreationDate * 1000)) + : undefined, + EventContextData: output.EventContextData !== undefined && output.EventContextData !== null + ? deserializeAws_json1_1EventContextDataType(output.EventContextData, context) + : undefined, + EventFeedback: output.EventFeedback !== undefined && output.EventFeedback !== null + ? deserializeAws_json1_1EventFeedbackType(output.EventFeedback, context) + : undefined, + EventId: output.EventId !== undefined && output.EventId !== null ? output.EventId : undefined, + EventResponse: output.EventResponse !== undefined && output.EventResponse !== null ? output.EventResponse : undefined, + EventRisk: output.EventRisk !== undefined && output.EventRisk !== null + ? deserializeAws_json1_1EventRiskType(output.EventRisk, context) + : undefined, + EventType: output.EventType !== undefined && output.EventType !== null ? output.EventType : undefined, + }; +}; +const deserializeAws_json1_1BlockedIPRangeListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1CallbackURLsListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1ChallengeParametersType = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_json1_1ChallengeResponseListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ChallengeResponseType(entry, context); + }); +}; +const deserializeAws_json1_1ChallengeResponseType = (output, context) => { + return { + ChallengeName: output.ChallengeName !== undefined && output.ChallengeName !== null ? output.ChallengeName : undefined, + ChallengeResponse: output.ChallengeResponse !== undefined && output.ChallengeResponse !== null + ? output.ChallengeResponse + : undefined, + }; +}; +const deserializeAws_json1_1ChangePasswordResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1ClientPermissionListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1CodeDeliveryDetailsListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1CodeDeliveryDetailsType(entry, context); + }); +}; +const deserializeAws_json1_1CodeDeliveryDetailsType = (output, context) => { + return { + AttributeName: output.AttributeName !== undefined && output.AttributeName !== null ? output.AttributeName : undefined, + DeliveryMedium: output.DeliveryMedium !== undefined && output.DeliveryMedium !== null ? output.DeliveryMedium : undefined, + Destination: output.Destination !== undefined && output.Destination !== null ? output.Destination : undefined, + }; +}; +const deserializeAws_json1_1CodeDeliveryFailureException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1CodeMismatchException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1CompromisedCredentialsActionsType = (output, context) => { + return { + EventAction: output.EventAction !== undefined && output.EventAction !== null ? output.EventAction : undefined, + }; +}; +const deserializeAws_json1_1CompromisedCredentialsRiskConfigurationType = (output, context) => { + return { + Actions: output.Actions !== undefined && output.Actions !== null + ? deserializeAws_json1_1CompromisedCredentialsActionsType(output.Actions, context) + : undefined, + EventFilter: output.EventFilter !== undefined && output.EventFilter !== null + ? deserializeAws_json1_1EventFiltersType(output.EventFilter, context) + : undefined, + }; +}; +const deserializeAws_json1_1ConcurrentModificationException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1ConfirmDeviceResponse = (output, context) => { + return { + UserConfirmationNecessary: output.UserConfirmationNecessary !== undefined && output.UserConfirmationNecessary !== null + ? output.UserConfirmationNecessary + : undefined, + }; +}; +const deserializeAws_json1_1ConfirmForgotPasswordResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1ConfirmSignUpResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1CreateGroupResponse = (output, context) => { + return { + Group: output.Group !== undefined && output.Group !== null + ? deserializeAws_json1_1GroupType(output.Group, context) + : undefined, + }; +}; +const deserializeAws_json1_1CreateIdentityProviderResponse = (output, context) => { + return { + IdentityProvider: output.IdentityProvider !== undefined && output.IdentityProvider !== null + ? deserializeAws_json1_1IdentityProviderType(output.IdentityProvider, context) + : undefined, + }; +}; +const deserializeAws_json1_1CreateResourceServerResponse = (output, context) => { + return { + ResourceServer: output.ResourceServer !== undefined && output.ResourceServer !== null + ? deserializeAws_json1_1ResourceServerType(output.ResourceServer, context) + : undefined, + }; +}; +const deserializeAws_json1_1CreateUserImportJobResponse = (output, context) => { + return { + UserImportJob: output.UserImportJob !== undefined && output.UserImportJob !== null + ? deserializeAws_json1_1UserImportJobType(output.UserImportJob, context) + : undefined, + }; +}; +const deserializeAws_json1_1CreateUserPoolClientResponse = (output, context) => { + return { + UserPoolClient: output.UserPoolClient !== undefined && output.UserPoolClient !== null + ? deserializeAws_json1_1UserPoolClientType(output.UserPoolClient, context) + : undefined, + }; +}; +const deserializeAws_json1_1CreateUserPoolDomainResponse = (output, context) => { + return { + CloudFrontDomain: output.CloudFrontDomain !== undefined && output.CloudFrontDomain !== null ? output.CloudFrontDomain : undefined, + }; +}; +const deserializeAws_json1_1CreateUserPoolResponse = (output, context) => { + return { + UserPool: output.UserPool !== undefined && output.UserPool !== null + ? deserializeAws_json1_1UserPoolType(output.UserPool, context) + : undefined, + }; +}; +const deserializeAws_json1_1CustomDomainConfigType = (output, context) => { + return { + CertificateArn: output.CertificateArn !== undefined && output.CertificateArn !== null ? output.CertificateArn : undefined, + }; +}; +const deserializeAws_json1_1CustomEmailLambdaVersionConfigType = (output, context) => { + return { + LambdaArn: output.LambdaArn !== undefined && output.LambdaArn !== null ? output.LambdaArn : undefined, + LambdaVersion: output.LambdaVersion !== undefined && output.LambdaVersion !== null ? output.LambdaVersion : undefined, + }; +}; +const deserializeAws_json1_1CustomSMSLambdaVersionConfigType = (output, context) => { + return { + LambdaArn: output.LambdaArn !== undefined && output.LambdaArn !== null ? output.LambdaArn : undefined, + LambdaVersion: output.LambdaVersion !== undefined && output.LambdaVersion !== null ? output.LambdaVersion : undefined, + }; +}; +const deserializeAws_json1_1DeleteUserAttributesResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1DeleteUserPoolDomainResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1DescribeIdentityProviderResponse = (output, context) => { + return { + IdentityProvider: output.IdentityProvider !== undefined && output.IdentityProvider !== null + ? deserializeAws_json1_1IdentityProviderType(output.IdentityProvider, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeResourceServerResponse = (output, context) => { + return { + ResourceServer: output.ResourceServer !== undefined && output.ResourceServer !== null + ? deserializeAws_json1_1ResourceServerType(output.ResourceServer, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeRiskConfigurationResponse = (output, context) => { + return { + RiskConfiguration: output.RiskConfiguration !== undefined && output.RiskConfiguration !== null + ? deserializeAws_json1_1RiskConfigurationType(output.RiskConfiguration, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeUserImportJobResponse = (output, context) => { + return { + UserImportJob: output.UserImportJob !== undefined && output.UserImportJob !== null + ? deserializeAws_json1_1UserImportJobType(output.UserImportJob, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeUserPoolClientResponse = (output, context) => { + return { + UserPoolClient: output.UserPoolClient !== undefined && output.UserPoolClient !== null + ? deserializeAws_json1_1UserPoolClientType(output.UserPoolClient, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeUserPoolDomainResponse = (output, context) => { + return { + DomainDescription: output.DomainDescription !== undefined && output.DomainDescription !== null + ? deserializeAws_json1_1DomainDescriptionType(output.DomainDescription, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeUserPoolResponse = (output, context) => { + return { + UserPool: output.UserPool !== undefined && output.UserPool !== null + ? deserializeAws_json1_1UserPoolType(output.UserPool, context) + : undefined, + }; +}; +const deserializeAws_json1_1DeviceConfigurationType = (output, context) => { + return { + ChallengeRequiredOnNewDevice: output.ChallengeRequiredOnNewDevice !== undefined && output.ChallengeRequiredOnNewDevice !== null + ? output.ChallengeRequiredOnNewDevice + : undefined, + DeviceOnlyRememberedOnUserPrompt: output.DeviceOnlyRememberedOnUserPrompt !== undefined && output.DeviceOnlyRememberedOnUserPrompt !== null + ? output.DeviceOnlyRememberedOnUserPrompt + : undefined, + }; +}; +const deserializeAws_json1_1DeviceListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1DeviceType(entry, context); + }); +}; +const deserializeAws_json1_1DeviceType = (output, context) => { + return { + DeviceAttributes: output.DeviceAttributes !== undefined && output.DeviceAttributes !== null + ? deserializeAws_json1_1AttributeListType(output.DeviceAttributes, context) + : undefined, + DeviceCreateDate: output.DeviceCreateDate !== undefined && output.DeviceCreateDate !== null + ? new Date(Math.round(output.DeviceCreateDate * 1000)) + : undefined, + DeviceKey: output.DeviceKey !== undefined && output.DeviceKey !== null ? output.DeviceKey : undefined, + DeviceLastAuthenticatedDate: output.DeviceLastAuthenticatedDate !== undefined && output.DeviceLastAuthenticatedDate !== null + ? new Date(Math.round(output.DeviceLastAuthenticatedDate * 1000)) + : undefined, + DeviceLastModifiedDate: output.DeviceLastModifiedDate !== undefined && output.DeviceLastModifiedDate !== null + ? new Date(Math.round(output.DeviceLastModifiedDate * 1000)) + : undefined, + }; +}; +const deserializeAws_json1_1DomainDescriptionType = (output, context) => { + return { + AWSAccountId: output.AWSAccountId !== undefined && output.AWSAccountId !== null ? output.AWSAccountId : undefined, + CloudFrontDistribution: output.CloudFrontDistribution !== undefined && output.CloudFrontDistribution !== null + ? output.CloudFrontDistribution + : undefined, + CustomDomainConfig: output.CustomDomainConfig !== undefined && output.CustomDomainConfig !== null + ? deserializeAws_json1_1CustomDomainConfigType(output.CustomDomainConfig, context) + : undefined, + Domain: output.Domain !== undefined && output.Domain !== null ? output.Domain : undefined, + S3Bucket: output.S3Bucket !== undefined && output.S3Bucket !== null ? output.S3Bucket : undefined, + Status: output.Status !== undefined && output.Status !== null ? output.Status : undefined, + UserPoolId: output.UserPoolId !== undefined && output.UserPoolId !== null ? output.UserPoolId : undefined, + Version: output.Version !== undefined && output.Version !== null ? output.Version : undefined, + }; +}; +const deserializeAws_json1_1DuplicateProviderException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1EmailConfigurationType = (output, context) => { + return { + ConfigurationSet: output.ConfigurationSet !== undefined && output.ConfigurationSet !== null ? output.ConfigurationSet : undefined, + EmailSendingAccount: output.EmailSendingAccount !== undefined && output.EmailSendingAccount !== null + ? output.EmailSendingAccount + : undefined, + From: output.From !== undefined && output.From !== null ? output.From : undefined, + ReplyToEmailAddress: output.ReplyToEmailAddress !== undefined && output.ReplyToEmailAddress !== null + ? output.ReplyToEmailAddress + : undefined, + SourceArn: output.SourceArn !== undefined && output.SourceArn !== null ? output.SourceArn : undefined, + }; +}; +const deserializeAws_json1_1EnableSoftwareTokenMFAException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1EventContextDataType = (output, context) => { + return { + City: output.City !== undefined && output.City !== null ? output.City : undefined, + Country: output.Country !== undefined && output.Country !== null ? output.Country : undefined, + DeviceName: output.DeviceName !== undefined && output.DeviceName !== null ? output.DeviceName : undefined, + IpAddress: output.IpAddress !== undefined && output.IpAddress !== null ? output.IpAddress : undefined, + Timezone: output.Timezone !== undefined && output.Timezone !== null ? output.Timezone : undefined, + }; +}; +const deserializeAws_json1_1EventFeedbackType = (output, context) => { + return { + FeedbackDate: output.FeedbackDate !== undefined && output.FeedbackDate !== null + ? new Date(Math.round(output.FeedbackDate * 1000)) + : undefined, + FeedbackValue: output.FeedbackValue !== undefined && output.FeedbackValue !== null ? output.FeedbackValue : undefined, + Provider: output.Provider !== undefined && output.Provider !== null ? output.Provider : undefined, + }; +}; +const deserializeAws_json1_1EventFiltersType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1EventRiskType = (output, context) => { + return { + CompromisedCredentialsDetected: output.CompromisedCredentialsDetected !== undefined && output.CompromisedCredentialsDetected !== null + ? output.CompromisedCredentialsDetected + : undefined, + RiskDecision: output.RiskDecision !== undefined && output.RiskDecision !== null ? output.RiskDecision : undefined, + RiskLevel: output.RiskLevel !== undefined && output.RiskLevel !== null ? output.RiskLevel : undefined, + }; +}; +const deserializeAws_json1_1ExpiredCodeException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1ExplicitAuthFlowsListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1ForgotPasswordResponse = (output, context) => { + return { + CodeDeliveryDetails: output.CodeDeliveryDetails !== undefined && output.CodeDeliveryDetails !== null + ? deserializeAws_json1_1CodeDeliveryDetailsType(output.CodeDeliveryDetails, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetCSVHeaderResponse = (output, context) => { + return { + CSVHeader: output.CSVHeader !== undefined && output.CSVHeader !== null + ? deserializeAws_json1_1ListOfStringTypes(output.CSVHeader, context) + : undefined, + UserPoolId: output.UserPoolId !== undefined && output.UserPoolId !== null ? output.UserPoolId : undefined, + }; +}; +const deserializeAws_json1_1GetDeviceResponse = (output, context) => { + return { + Device: output.Device !== undefined && output.Device !== null + ? deserializeAws_json1_1DeviceType(output.Device, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetGroupResponse = (output, context) => { + return { + Group: output.Group !== undefined && output.Group !== null + ? deserializeAws_json1_1GroupType(output.Group, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetIdentityProviderByIdentifierResponse = (output, context) => { + return { + IdentityProvider: output.IdentityProvider !== undefined && output.IdentityProvider !== null + ? deserializeAws_json1_1IdentityProviderType(output.IdentityProvider, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetSigningCertificateResponse = (output, context) => { + return { + Certificate: output.Certificate !== undefined && output.Certificate !== null ? output.Certificate : undefined, + }; +}; +const deserializeAws_json1_1GetUICustomizationResponse = (output, context) => { + return { + UICustomization: output.UICustomization !== undefined && output.UICustomization !== null + ? deserializeAws_json1_1UICustomizationType(output.UICustomization, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetUserAttributeVerificationCodeResponse = (output, context) => { + return { + CodeDeliveryDetails: output.CodeDeliveryDetails !== undefined && output.CodeDeliveryDetails !== null + ? deserializeAws_json1_1CodeDeliveryDetailsType(output.CodeDeliveryDetails, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetUserPoolMfaConfigResponse = (output, context) => { + return { + MfaConfiguration: output.MfaConfiguration !== undefined && output.MfaConfiguration !== null ? output.MfaConfiguration : undefined, + SmsMfaConfiguration: output.SmsMfaConfiguration !== undefined && output.SmsMfaConfiguration !== null + ? deserializeAws_json1_1SmsMfaConfigType(output.SmsMfaConfiguration, context) + : undefined, + SoftwareTokenMfaConfiguration: output.SoftwareTokenMfaConfiguration !== undefined && output.SoftwareTokenMfaConfiguration !== null + ? deserializeAws_json1_1SoftwareTokenMfaConfigType(output.SoftwareTokenMfaConfiguration, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetUserResponse = (output, context) => { + return { + MFAOptions: output.MFAOptions !== undefined && output.MFAOptions !== null + ? deserializeAws_json1_1MFAOptionListType(output.MFAOptions, context) + : undefined, + PreferredMfaSetting: output.PreferredMfaSetting !== undefined && output.PreferredMfaSetting !== null + ? output.PreferredMfaSetting + : undefined, + UserAttributes: output.UserAttributes !== undefined && output.UserAttributes !== null + ? deserializeAws_json1_1AttributeListType(output.UserAttributes, context) + : undefined, + UserMFASettingList: output.UserMFASettingList !== undefined && output.UserMFASettingList !== null + ? deserializeAws_json1_1UserMFASettingListType(output.UserMFASettingList, context) + : undefined, + Username: output.Username !== undefined && output.Username !== null ? output.Username : undefined, + }; +}; +const deserializeAws_json1_1GlobalSignOutResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1GroupExistsException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1GroupListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1GroupType(entry, context); + }); +}; +const deserializeAws_json1_1GroupType = (output, context) => { + return { + CreationDate: output.CreationDate !== undefined && output.CreationDate !== null + ? new Date(Math.round(output.CreationDate * 1000)) + : undefined, + Description: output.Description !== undefined && output.Description !== null ? output.Description : undefined, + GroupName: output.GroupName !== undefined && output.GroupName !== null ? output.GroupName : undefined, + LastModifiedDate: output.LastModifiedDate !== undefined && output.LastModifiedDate !== null + ? new Date(Math.round(output.LastModifiedDate * 1000)) + : undefined, + Precedence: output.Precedence !== undefined && output.Precedence !== null ? output.Precedence : undefined, + RoleArn: output.RoleArn !== undefined && output.RoleArn !== null ? output.RoleArn : undefined, + UserPoolId: output.UserPoolId !== undefined && output.UserPoolId !== null ? output.UserPoolId : undefined, + }; +}; +const deserializeAws_json1_1IdentityProviderType = (output, context) => { + return { + AttributeMapping: output.AttributeMapping !== undefined && output.AttributeMapping !== null + ? deserializeAws_json1_1AttributeMappingType(output.AttributeMapping, context) + : undefined, + CreationDate: output.CreationDate !== undefined && output.CreationDate !== null + ? new Date(Math.round(output.CreationDate * 1000)) + : undefined, + IdpIdentifiers: output.IdpIdentifiers !== undefined && output.IdpIdentifiers !== null + ? deserializeAws_json1_1IdpIdentifiersListType(output.IdpIdentifiers, context) + : undefined, + LastModifiedDate: output.LastModifiedDate !== undefined && output.LastModifiedDate !== null + ? new Date(Math.round(output.LastModifiedDate * 1000)) + : undefined, + ProviderDetails: output.ProviderDetails !== undefined && output.ProviderDetails !== null + ? deserializeAws_json1_1ProviderDetailsType(output.ProviderDetails, context) + : undefined, + ProviderName: output.ProviderName !== undefined && output.ProviderName !== null ? output.ProviderName : undefined, + ProviderType: output.ProviderType !== undefined && output.ProviderType !== null ? output.ProviderType : undefined, + UserPoolId: output.UserPoolId !== undefined && output.UserPoolId !== null ? output.UserPoolId : undefined, + }; +}; +const deserializeAws_json1_1IdpIdentifiersListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1InitiateAuthResponse = (output, context) => { + return { + AuthenticationResult: output.AuthenticationResult !== undefined && output.AuthenticationResult !== null + ? deserializeAws_json1_1AuthenticationResultType(output.AuthenticationResult, context) + : undefined, + ChallengeName: output.ChallengeName !== undefined && output.ChallengeName !== null ? output.ChallengeName : undefined, + ChallengeParameters: output.ChallengeParameters !== undefined && output.ChallengeParameters !== null + ? deserializeAws_json1_1ChallengeParametersType(output.ChallengeParameters, context) + : undefined, + Session: output.Session !== undefined && output.Session !== null ? output.Session : undefined, + }; +}; +const deserializeAws_json1_1InternalErrorException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1InvalidEmailRoleAccessPolicyException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1InvalidLambdaResponseException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1InvalidOAuthFlowException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1InvalidParameterException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1InvalidPasswordException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1InvalidSmsRoleAccessPolicyException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1InvalidSmsRoleTrustRelationshipException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1InvalidUserPoolConfigurationException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1LambdaConfigType = (output, context) => { + return { + CreateAuthChallenge: output.CreateAuthChallenge !== undefined && output.CreateAuthChallenge !== null + ? output.CreateAuthChallenge + : undefined, + CustomEmailSender: output.CustomEmailSender !== undefined && output.CustomEmailSender !== null + ? deserializeAws_json1_1CustomEmailLambdaVersionConfigType(output.CustomEmailSender, context) + : undefined, + CustomMessage: output.CustomMessage !== undefined && output.CustomMessage !== null ? output.CustomMessage : undefined, + CustomSMSSender: output.CustomSMSSender !== undefined && output.CustomSMSSender !== null + ? deserializeAws_json1_1CustomSMSLambdaVersionConfigType(output.CustomSMSSender, context) + : undefined, + DefineAuthChallenge: output.DefineAuthChallenge !== undefined && output.DefineAuthChallenge !== null + ? output.DefineAuthChallenge + : undefined, + KMSKeyID: output.KMSKeyID !== undefined && output.KMSKeyID !== null ? output.KMSKeyID : undefined, + PostAuthentication: output.PostAuthentication !== undefined && output.PostAuthentication !== null + ? output.PostAuthentication + : undefined, + PostConfirmation: output.PostConfirmation !== undefined && output.PostConfirmation !== null ? output.PostConfirmation : undefined, + PreAuthentication: output.PreAuthentication !== undefined && output.PreAuthentication !== null + ? output.PreAuthentication + : undefined, + PreSignUp: output.PreSignUp !== undefined && output.PreSignUp !== null ? output.PreSignUp : undefined, + PreTokenGeneration: output.PreTokenGeneration !== undefined && output.PreTokenGeneration !== null + ? output.PreTokenGeneration + : undefined, + UserMigration: output.UserMigration !== undefined && output.UserMigration !== null ? output.UserMigration : undefined, + VerifyAuthChallengeResponse: output.VerifyAuthChallengeResponse !== undefined && output.VerifyAuthChallengeResponse !== null + ? output.VerifyAuthChallengeResponse + : undefined, + }; +}; +const deserializeAws_json1_1LimitExceededException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1ListDevicesResponse = (output, context) => { + return { + Devices: output.Devices !== undefined && output.Devices !== null + ? deserializeAws_json1_1DeviceListType(output.Devices, context) + : undefined, + PaginationToken: output.PaginationToken !== undefined && output.PaginationToken !== null ? output.PaginationToken : undefined, + }; +}; +const deserializeAws_json1_1ListGroupsResponse = (output, context) => { + return { + Groups: output.Groups !== undefined && output.Groups !== null + ? deserializeAws_json1_1GroupListType(output.Groups, context) + : undefined, + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + }; +}; +const deserializeAws_json1_1ListIdentityProvidersResponse = (output, context) => { + return { + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + Providers: output.Providers !== undefined && output.Providers !== null + ? deserializeAws_json1_1ProvidersListType(output.Providers, context) + : undefined, + }; +}; +const deserializeAws_json1_1ListOfStringTypes = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1ListResourceServersResponse = (output, context) => { + return { + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + ResourceServers: output.ResourceServers !== undefined && output.ResourceServers !== null + ? deserializeAws_json1_1ResourceServersListType(output.ResourceServers, context) + : undefined, + }; +}; +const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => { + return { + Tags: output.Tags !== undefined && output.Tags !== null + ? deserializeAws_json1_1UserPoolTagsType(output.Tags, context) + : undefined, + }; +}; +const deserializeAws_json1_1ListUserImportJobsResponse = (output, context) => { + return { + PaginationToken: output.PaginationToken !== undefined && output.PaginationToken !== null ? output.PaginationToken : undefined, + UserImportJobs: output.UserImportJobs !== undefined && output.UserImportJobs !== null + ? deserializeAws_json1_1UserImportJobsListType(output.UserImportJobs, context) + : undefined, + }; +}; +const deserializeAws_json1_1ListUserPoolClientsResponse = (output, context) => { + return { + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + UserPoolClients: output.UserPoolClients !== undefined && output.UserPoolClients !== null + ? deserializeAws_json1_1UserPoolClientListType(output.UserPoolClients, context) + : undefined, + }; +}; +const deserializeAws_json1_1ListUserPoolsResponse = (output, context) => { + return { + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + UserPools: output.UserPools !== undefined && output.UserPools !== null + ? deserializeAws_json1_1UserPoolListType(output.UserPools, context) + : undefined, + }; +}; +const deserializeAws_json1_1ListUsersInGroupResponse = (output, context) => { + return { + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + Users: output.Users !== undefined && output.Users !== null + ? deserializeAws_json1_1UsersListType(output.Users, context) + : undefined, + }; +}; +const deserializeAws_json1_1ListUsersResponse = (output, context) => { + return { + PaginationToken: output.PaginationToken !== undefined && output.PaginationToken !== null ? output.PaginationToken : undefined, + Users: output.Users !== undefined && output.Users !== null + ? deserializeAws_json1_1UsersListType(output.Users, context) + : undefined, + }; +}; +const deserializeAws_json1_1LogoutURLsListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1MessageTemplateType = (output, context) => { + return { + EmailMessage: output.EmailMessage !== undefined && output.EmailMessage !== null ? output.EmailMessage : undefined, + EmailSubject: output.EmailSubject !== undefined && output.EmailSubject !== null ? output.EmailSubject : undefined, + SMSMessage: output.SMSMessage !== undefined && output.SMSMessage !== null ? output.SMSMessage : undefined, + }; +}; +const deserializeAws_json1_1MFAMethodNotFoundException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1MFAOptionListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1MFAOptionType(entry, context); + }); +}; +const deserializeAws_json1_1MFAOptionType = (output, context) => { + return { + AttributeName: output.AttributeName !== undefined && output.AttributeName !== null ? output.AttributeName : undefined, + DeliveryMedium: output.DeliveryMedium !== undefined && output.DeliveryMedium !== null ? output.DeliveryMedium : undefined, + }; +}; +const deserializeAws_json1_1NewDeviceMetadataType = (output, context) => { + return { + DeviceGroupKey: output.DeviceGroupKey !== undefined && output.DeviceGroupKey !== null ? output.DeviceGroupKey : undefined, + DeviceKey: output.DeviceKey !== undefined && output.DeviceKey !== null ? output.DeviceKey : undefined, + }; +}; +const deserializeAws_json1_1NotAuthorizedException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1NotifyConfigurationType = (output, context) => { + return { + BlockEmail: output.BlockEmail !== undefined && output.BlockEmail !== null + ? deserializeAws_json1_1NotifyEmailType(output.BlockEmail, context) + : undefined, + From: output.From !== undefined && output.From !== null ? output.From : undefined, + MfaEmail: output.MfaEmail !== undefined && output.MfaEmail !== null + ? deserializeAws_json1_1NotifyEmailType(output.MfaEmail, context) + : undefined, + NoActionEmail: output.NoActionEmail !== undefined && output.NoActionEmail !== null + ? deserializeAws_json1_1NotifyEmailType(output.NoActionEmail, context) + : undefined, + ReplyTo: output.ReplyTo !== undefined && output.ReplyTo !== null ? output.ReplyTo : undefined, + SourceArn: output.SourceArn !== undefined && output.SourceArn !== null ? output.SourceArn : undefined, + }; +}; +const deserializeAws_json1_1NotifyEmailType = (output, context) => { + return { + HtmlBody: output.HtmlBody !== undefined && output.HtmlBody !== null ? output.HtmlBody : undefined, + Subject: output.Subject !== undefined && output.Subject !== null ? output.Subject : undefined, + TextBody: output.TextBody !== undefined && output.TextBody !== null ? output.TextBody : undefined, + }; +}; +const deserializeAws_json1_1NumberAttributeConstraintsType = (output, context) => { + return { + MaxValue: output.MaxValue !== undefined && output.MaxValue !== null ? output.MaxValue : undefined, + MinValue: output.MinValue !== undefined && output.MinValue !== null ? output.MinValue : undefined, + }; +}; +const deserializeAws_json1_1OAuthFlowsType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1PasswordPolicyType = (output, context) => { + return { + MinimumLength: output.MinimumLength !== undefined && output.MinimumLength !== null ? output.MinimumLength : undefined, + RequireLowercase: output.RequireLowercase !== undefined && output.RequireLowercase !== null ? output.RequireLowercase : undefined, + RequireNumbers: output.RequireNumbers !== undefined && output.RequireNumbers !== null ? output.RequireNumbers : undefined, + RequireSymbols: output.RequireSymbols !== undefined && output.RequireSymbols !== null ? output.RequireSymbols : undefined, + RequireUppercase: output.RequireUppercase !== undefined && output.RequireUppercase !== null ? output.RequireUppercase : undefined, + TemporaryPasswordValidityDays: output.TemporaryPasswordValidityDays !== undefined && output.TemporaryPasswordValidityDays !== null + ? output.TemporaryPasswordValidityDays + : undefined, + }; +}; +const deserializeAws_json1_1PasswordResetRequiredException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1PreconditionNotMetException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1ProviderDescription = (output, context) => { + return { + CreationDate: output.CreationDate !== undefined && output.CreationDate !== null + ? new Date(Math.round(output.CreationDate * 1000)) + : undefined, + LastModifiedDate: output.LastModifiedDate !== undefined && output.LastModifiedDate !== null + ? new Date(Math.round(output.LastModifiedDate * 1000)) + : undefined, + ProviderName: output.ProviderName !== undefined && output.ProviderName !== null ? output.ProviderName : undefined, + ProviderType: output.ProviderType !== undefined && output.ProviderType !== null ? output.ProviderType : undefined, + }; +}; +const deserializeAws_json1_1ProviderDetailsType = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_json1_1ProvidersListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ProviderDescription(entry, context); + }); +}; +const deserializeAws_json1_1RecoveryMechanismsType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1RecoveryOptionType(entry, context); + }); +}; +const deserializeAws_json1_1RecoveryOptionType = (output, context) => { + return { + Name: output.Name !== undefined && output.Name !== null ? output.Name : undefined, + Priority: output.Priority !== undefined && output.Priority !== null ? output.Priority : undefined, + }; +}; +const deserializeAws_json1_1ResendConfirmationCodeResponse = (output, context) => { + return { + CodeDeliveryDetails: output.CodeDeliveryDetails !== undefined && output.CodeDeliveryDetails !== null + ? deserializeAws_json1_1CodeDeliveryDetailsType(output.CodeDeliveryDetails, context) + : undefined, + }; +}; +const deserializeAws_json1_1ResourceNotFoundException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1ResourceServerScopeListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ResourceServerScopeType(entry, context); + }); +}; +const deserializeAws_json1_1ResourceServerScopeType = (output, context) => { + return { + ScopeDescription: output.ScopeDescription !== undefined && output.ScopeDescription !== null ? output.ScopeDescription : undefined, + ScopeName: output.ScopeName !== undefined && output.ScopeName !== null ? output.ScopeName : undefined, + }; +}; +const deserializeAws_json1_1ResourceServersListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ResourceServerType(entry, context); + }); +}; +const deserializeAws_json1_1ResourceServerType = (output, context) => { + return { + Identifier: output.Identifier !== undefined && output.Identifier !== null ? output.Identifier : undefined, + Name: output.Name !== undefined && output.Name !== null ? output.Name : undefined, + Scopes: output.Scopes !== undefined && output.Scopes !== null + ? deserializeAws_json1_1ResourceServerScopeListType(output.Scopes, context) + : undefined, + UserPoolId: output.UserPoolId !== undefined && output.UserPoolId !== null ? output.UserPoolId : undefined, + }; +}; +const deserializeAws_json1_1RespondToAuthChallengeResponse = (output, context) => { + return { + AuthenticationResult: output.AuthenticationResult !== undefined && output.AuthenticationResult !== null + ? deserializeAws_json1_1AuthenticationResultType(output.AuthenticationResult, context) + : undefined, + ChallengeName: output.ChallengeName !== undefined && output.ChallengeName !== null ? output.ChallengeName : undefined, + ChallengeParameters: output.ChallengeParameters !== undefined && output.ChallengeParameters !== null + ? deserializeAws_json1_1ChallengeParametersType(output.ChallengeParameters, context) + : undefined, + Session: output.Session !== undefined && output.Session !== null ? output.Session : undefined, + }; +}; +const deserializeAws_json1_1RiskConfigurationType = (output, context) => { + return { + AccountTakeoverRiskConfiguration: output.AccountTakeoverRiskConfiguration !== undefined && output.AccountTakeoverRiskConfiguration !== null + ? deserializeAws_json1_1AccountTakeoverRiskConfigurationType(output.AccountTakeoverRiskConfiguration, context) + : undefined, + ClientId: output.ClientId !== undefined && output.ClientId !== null ? output.ClientId : undefined, + CompromisedCredentialsRiskConfiguration: output.CompromisedCredentialsRiskConfiguration !== undefined && + output.CompromisedCredentialsRiskConfiguration !== null + ? deserializeAws_json1_1CompromisedCredentialsRiskConfigurationType(output.CompromisedCredentialsRiskConfiguration, context) + : undefined, + LastModifiedDate: output.LastModifiedDate !== undefined && output.LastModifiedDate !== null + ? new Date(Math.round(output.LastModifiedDate * 1000)) + : undefined, + RiskExceptionConfiguration: output.RiskExceptionConfiguration !== undefined && output.RiskExceptionConfiguration !== null + ? deserializeAws_json1_1RiskExceptionConfigurationType(output.RiskExceptionConfiguration, context) + : undefined, + UserPoolId: output.UserPoolId !== undefined && output.UserPoolId !== null ? output.UserPoolId : undefined, + }; +}; +const deserializeAws_json1_1RiskExceptionConfigurationType = (output, context) => { + return { + BlockedIPRangeList: output.BlockedIPRangeList !== undefined && output.BlockedIPRangeList !== null + ? deserializeAws_json1_1BlockedIPRangeListType(output.BlockedIPRangeList, context) + : undefined, + SkippedIPRangeList: output.SkippedIPRangeList !== undefined && output.SkippedIPRangeList !== null + ? deserializeAws_json1_1SkippedIPRangeListType(output.SkippedIPRangeList, context) + : undefined, + }; +}; +const deserializeAws_json1_1SchemaAttributesListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1SchemaAttributeType(entry, context); + }); +}; +const deserializeAws_json1_1SchemaAttributeType = (output, context) => { + return { + AttributeDataType: output.AttributeDataType !== undefined && output.AttributeDataType !== null + ? output.AttributeDataType + : undefined, + DeveloperOnlyAttribute: output.DeveloperOnlyAttribute !== undefined && output.DeveloperOnlyAttribute !== null + ? output.DeveloperOnlyAttribute + : undefined, + Mutable: output.Mutable !== undefined && output.Mutable !== null ? output.Mutable : undefined, + Name: output.Name !== undefined && output.Name !== null ? output.Name : undefined, + NumberAttributeConstraints: output.NumberAttributeConstraints !== undefined && output.NumberAttributeConstraints !== null + ? deserializeAws_json1_1NumberAttributeConstraintsType(output.NumberAttributeConstraints, context) + : undefined, + Required: output.Required !== undefined && output.Required !== null ? output.Required : undefined, + StringAttributeConstraints: output.StringAttributeConstraints !== undefined && output.StringAttributeConstraints !== null + ? deserializeAws_json1_1StringAttributeConstraintsType(output.StringAttributeConstraints, context) + : undefined, + }; +}; +const deserializeAws_json1_1ScopeDoesNotExistException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1ScopeListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1SetRiskConfigurationResponse = (output, context) => { + return { + RiskConfiguration: output.RiskConfiguration !== undefined && output.RiskConfiguration !== null + ? deserializeAws_json1_1RiskConfigurationType(output.RiskConfiguration, context) + : undefined, + }; +}; +const deserializeAws_json1_1SetUICustomizationResponse = (output, context) => { + return { + UICustomization: output.UICustomization !== undefined && output.UICustomization !== null + ? deserializeAws_json1_1UICustomizationType(output.UICustomization, context) + : undefined, + }; +}; +const deserializeAws_json1_1SetUserMFAPreferenceResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1SetUserPoolMfaConfigResponse = (output, context) => { + return { + MfaConfiguration: output.MfaConfiguration !== undefined && output.MfaConfiguration !== null ? output.MfaConfiguration : undefined, + SmsMfaConfiguration: output.SmsMfaConfiguration !== undefined && output.SmsMfaConfiguration !== null + ? deserializeAws_json1_1SmsMfaConfigType(output.SmsMfaConfiguration, context) + : undefined, + SoftwareTokenMfaConfiguration: output.SoftwareTokenMfaConfiguration !== undefined && output.SoftwareTokenMfaConfiguration !== null + ? deserializeAws_json1_1SoftwareTokenMfaConfigType(output.SoftwareTokenMfaConfiguration, context) + : undefined, + }; +}; +const deserializeAws_json1_1SetUserSettingsResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1SignUpResponse = (output, context) => { + return { + CodeDeliveryDetails: output.CodeDeliveryDetails !== undefined && output.CodeDeliveryDetails !== null + ? deserializeAws_json1_1CodeDeliveryDetailsType(output.CodeDeliveryDetails, context) + : undefined, + UserConfirmed: output.UserConfirmed !== undefined && output.UserConfirmed !== null ? output.UserConfirmed : undefined, + UserSub: output.UserSub !== undefined && output.UserSub !== null ? output.UserSub : undefined, + }; +}; +const deserializeAws_json1_1SkippedIPRangeListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1SmsConfigurationType = (output, context) => { + return { + ExternalId: output.ExternalId !== undefined && output.ExternalId !== null ? output.ExternalId : undefined, + SnsCallerArn: output.SnsCallerArn !== undefined && output.SnsCallerArn !== null ? output.SnsCallerArn : undefined, + }; +}; +const deserializeAws_json1_1SmsMfaConfigType = (output, context) => { + return { + SmsAuthenticationMessage: output.SmsAuthenticationMessage !== undefined && output.SmsAuthenticationMessage !== null + ? output.SmsAuthenticationMessage + : undefined, + SmsConfiguration: output.SmsConfiguration !== undefined && output.SmsConfiguration !== null + ? deserializeAws_json1_1SmsConfigurationType(output.SmsConfiguration, context) + : undefined, + }; +}; +const deserializeAws_json1_1SoftwareTokenMfaConfigType = (output, context) => { + return { + Enabled: output.Enabled !== undefined && output.Enabled !== null ? output.Enabled : undefined, + }; +}; +const deserializeAws_json1_1SoftwareTokenMFANotFoundException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1StartUserImportJobResponse = (output, context) => { + return { + UserImportJob: output.UserImportJob !== undefined && output.UserImportJob !== null + ? deserializeAws_json1_1UserImportJobType(output.UserImportJob, context) + : undefined, + }; +}; +const deserializeAws_json1_1StopUserImportJobResponse = (output, context) => { + return { + UserImportJob: output.UserImportJob !== undefined && output.UserImportJob !== null + ? deserializeAws_json1_1UserImportJobType(output.UserImportJob, context) + : undefined, + }; +}; +const deserializeAws_json1_1StringAttributeConstraintsType = (output, context) => { + return { + MaxLength: output.MaxLength !== undefined && output.MaxLength !== null ? output.MaxLength : undefined, + MinLength: output.MinLength !== undefined && output.MinLength !== null ? output.MinLength : undefined, + }; +}; +const deserializeAws_json1_1SupportedIdentityProvidersListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1TagResourceResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1TokenValidityUnitsType = (output, context) => { + return { + AccessToken: output.AccessToken !== undefined && output.AccessToken !== null ? output.AccessToken : undefined, + IdToken: output.IdToken !== undefined && output.IdToken !== null ? output.IdToken : undefined, + RefreshToken: output.RefreshToken !== undefined && output.RefreshToken !== null ? output.RefreshToken : undefined, + }; +}; +const deserializeAws_json1_1TooManyFailedAttemptsException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1TooManyRequestsException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UICustomizationType = (output, context) => { + return { + CSS: output.CSS !== undefined && output.CSS !== null ? output.CSS : undefined, + CSSVersion: output.CSSVersion !== undefined && output.CSSVersion !== null ? output.CSSVersion : undefined, + ClientId: output.ClientId !== undefined && output.ClientId !== null ? output.ClientId : undefined, + CreationDate: output.CreationDate !== undefined && output.CreationDate !== null + ? new Date(Math.round(output.CreationDate * 1000)) + : undefined, + ImageUrl: output.ImageUrl !== undefined && output.ImageUrl !== null ? output.ImageUrl : undefined, + LastModifiedDate: output.LastModifiedDate !== undefined && output.LastModifiedDate !== null + ? new Date(Math.round(output.LastModifiedDate * 1000)) + : undefined, + UserPoolId: output.UserPoolId !== undefined && output.UserPoolId !== null ? output.UserPoolId : undefined, + }; +}; +const deserializeAws_json1_1UnexpectedLambdaException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UnsupportedIdentityProviderException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UnsupportedUserStateException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UntagResourceResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1UpdateAuthEventFeedbackResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1UpdateDeviceStatusResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1UpdateGroupResponse = (output, context) => { + return { + Group: output.Group !== undefined && output.Group !== null + ? deserializeAws_json1_1GroupType(output.Group, context) + : undefined, + }; +}; +const deserializeAws_json1_1UpdateIdentityProviderResponse = (output, context) => { + return { + IdentityProvider: output.IdentityProvider !== undefined && output.IdentityProvider !== null + ? deserializeAws_json1_1IdentityProviderType(output.IdentityProvider, context) + : undefined, + }; +}; +const deserializeAws_json1_1UpdateResourceServerResponse = (output, context) => { + return { + ResourceServer: output.ResourceServer !== undefined && output.ResourceServer !== null + ? deserializeAws_json1_1ResourceServerType(output.ResourceServer, context) + : undefined, + }; +}; +const deserializeAws_json1_1UpdateUserAttributesResponse = (output, context) => { + return { + CodeDeliveryDetailsList: output.CodeDeliveryDetailsList !== undefined && output.CodeDeliveryDetailsList !== null + ? deserializeAws_json1_1CodeDeliveryDetailsListType(output.CodeDeliveryDetailsList, context) + : undefined, + }; +}; +const deserializeAws_json1_1UpdateUserPoolClientResponse = (output, context) => { + return { + UserPoolClient: output.UserPoolClient !== undefined && output.UserPoolClient !== null + ? deserializeAws_json1_1UserPoolClientType(output.UserPoolClient, context) + : undefined, + }; +}; +const deserializeAws_json1_1UpdateUserPoolDomainResponse = (output, context) => { + return { + CloudFrontDomain: output.CloudFrontDomain !== undefined && output.CloudFrontDomain !== null ? output.CloudFrontDomain : undefined, + }; +}; +const deserializeAws_json1_1UpdateUserPoolResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1UserImportInProgressException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UserImportJobsListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1UserImportJobType(entry, context); + }); +}; +const deserializeAws_json1_1UserImportJobType = (output, context) => { + return { + CloudWatchLogsRoleArn: output.CloudWatchLogsRoleArn !== undefined && output.CloudWatchLogsRoleArn !== null + ? output.CloudWatchLogsRoleArn + : undefined, + CompletionDate: output.CompletionDate !== undefined && output.CompletionDate !== null + ? new Date(Math.round(output.CompletionDate * 1000)) + : undefined, + CompletionMessage: output.CompletionMessage !== undefined && output.CompletionMessage !== null + ? output.CompletionMessage + : undefined, + CreationDate: output.CreationDate !== undefined && output.CreationDate !== null + ? new Date(Math.round(output.CreationDate * 1000)) + : undefined, + FailedUsers: output.FailedUsers !== undefined && output.FailedUsers !== null ? output.FailedUsers : undefined, + ImportedUsers: output.ImportedUsers !== undefined && output.ImportedUsers !== null ? output.ImportedUsers : undefined, + JobId: output.JobId !== undefined && output.JobId !== null ? output.JobId : undefined, + JobName: output.JobName !== undefined && output.JobName !== null ? output.JobName : undefined, + PreSignedUrl: output.PreSignedUrl !== undefined && output.PreSignedUrl !== null ? output.PreSignedUrl : undefined, + SkippedUsers: output.SkippedUsers !== undefined && output.SkippedUsers !== null ? output.SkippedUsers : undefined, + StartDate: output.StartDate !== undefined && output.StartDate !== null + ? new Date(Math.round(output.StartDate * 1000)) + : undefined, + Status: output.Status !== undefined && output.Status !== null ? output.Status : undefined, + UserPoolId: output.UserPoolId !== undefined && output.UserPoolId !== null ? output.UserPoolId : undefined, + }; +}; +const deserializeAws_json1_1UserLambdaValidationException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UserMFASettingListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1UsernameAttributesListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1UsernameConfigurationType = (output, context) => { + return { + CaseSensitive: output.CaseSensitive !== undefined && output.CaseSensitive !== null ? output.CaseSensitive : undefined, + }; +}; +const deserializeAws_json1_1UsernameExistsException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UserNotConfirmedException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UserNotFoundException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UserPoolAddOnNotEnabledException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UserPoolAddOnsType = (output, context) => { + return { + AdvancedSecurityMode: output.AdvancedSecurityMode !== undefined && output.AdvancedSecurityMode !== null + ? output.AdvancedSecurityMode + : undefined, + }; +}; +const deserializeAws_json1_1UserPoolClientDescription = (output, context) => { + return { + ClientId: output.ClientId !== undefined && output.ClientId !== null ? output.ClientId : undefined, + ClientName: output.ClientName !== undefined && output.ClientName !== null ? output.ClientName : undefined, + UserPoolId: output.UserPoolId !== undefined && output.UserPoolId !== null ? output.UserPoolId : undefined, + }; +}; +const deserializeAws_json1_1UserPoolClientListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1UserPoolClientDescription(entry, context); + }); +}; +const deserializeAws_json1_1UserPoolClientType = (output, context) => { + return { + AccessTokenValidity: output.AccessTokenValidity !== undefined && output.AccessTokenValidity !== null + ? output.AccessTokenValidity + : undefined, + AllowedOAuthFlows: output.AllowedOAuthFlows !== undefined && output.AllowedOAuthFlows !== null + ? deserializeAws_json1_1OAuthFlowsType(output.AllowedOAuthFlows, context) + : undefined, + AllowedOAuthFlowsUserPoolClient: output.AllowedOAuthFlowsUserPoolClient !== undefined && output.AllowedOAuthFlowsUserPoolClient !== null + ? output.AllowedOAuthFlowsUserPoolClient + : undefined, + AllowedOAuthScopes: output.AllowedOAuthScopes !== undefined && output.AllowedOAuthScopes !== null + ? deserializeAws_json1_1ScopeListType(output.AllowedOAuthScopes, context) + : undefined, + AnalyticsConfiguration: output.AnalyticsConfiguration !== undefined && output.AnalyticsConfiguration !== null + ? deserializeAws_json1_1AnalyticsConfigurationType(output.AnalyticsConfiguration, context) + : undefined, + CallbackURLs: output.CallbackURLs !== undefined && output.CallbackURLs !== null + ? deserializeAws_json1_1CallbackURLsListType(output.CallbackURLs, context) + : undefined, + ClientId: output.ClientId !== undefined && output.ClientId !== null ? output.ClientId : undefined, + ClientName: output.ClientName !== undefined && output.ClientName !== null ? output.ClientName : undefined, + ClientSecret: output.ClientSecret !== undefined && output.ClientSecret !== null ? output.ClientSecret : undefined, + CreationDate: output.CreationDate !== undefined && output.CreationDate !== null + ? new Date(Math.round(output.CreationDate * 1000)) + : undefined, + DefaultRedirectURI: output.DefaultRedirectURI !== undefined && output.DefaultRedirectURI !== null + ? output.DefaultRedirectURI + : undefined, + ExplicitAuthFlows: output.ExplicitAuthFlows !== undefined && output.ExplicitAuthFlows !== null + ? deserializeAws_json1_1ExplicitAuthFlowsListType(output.ExplicitAuthFlows, context) + : undefined, + IdTokenValidity: output.IdTokenValidity !== undefined && output.IdTokenValidity !== null ? output.IdTokenValidity : undefined, + LastModifiedDate: output.LastModifiedDate !== undefined && output.LastModifiedDate !== null + ? new Date(Math.round(output.LastModifiedDate * 1000)) + : undefined, + LogoutURLs: output.LogoutURLs !== undefined && output.LogoutURLs !== null + ? deserializeAws_json1_1LogoutURLsListType(output.LogoutURLs, context) + : undefined, + PreventUserExistenceErrors: output.PreventUserExistenceErrors !== undefined && output.PreventUserExistenceErrors !== null + ? output.PreventUserExistenceErrors + : undefined, + ReadAttributes: output.ReadAttributes !== undefined && output.ReadAttributes !== null + ? deserializeAws_json1_1ClientPermissionListType(output.ReadAttributes, context) + : undefined, + RefreshTokenValidity: output.RefreshTokenValidity !== undefined && output.RefreshTokenValidity !== null + ? output.RefreshTokenValidity + : undefined, + SupportedIdentityProviders: output.SupportedIdentityProviders !== undefined && output.SupportedIdentityProviders !== null + ? deserializeAws_json1_1SupportedIdentityProvidersListType(output.SupportedIdentityProviders, context) + : undefined, + TokenValidityUnits: output.TokenValidityUnits !== undefined && output.TokenValidityUnits !== null + ? deserializeAws_json1_1TokenValidityUnitsType(output.TokenValidityUnits, context) + : undefined, + UserPoolId: output.UserPoolId !== undefined && output.UserPoolId !== null ? output.UserPoolId : undefined, + WriteAttributes: output.WriteAttributes !== undefined && output.WriteAttributes !== null + ? deserializeAws_json1_1ClientPermissionListType(output.WriteAttributes, context) + : undefined, + }; +}; +const deserializeAws_json1_1UserPoolDescriptionType = (output, context) => { + return { + CreationDate: output.CreationDate !== undefined && output.CreationDate !== null + ? new Date(Math.round(output.CreationDate * 1000)) + : undefined, + Id: output.Id !== undefined && output.Id !== null ? output.Id : undefined, + LambdaConfig: output.LambdaConfig !== undefined && output.LambdaConfig !== null + ? deserializeAws_json1_1LambdaConfigType(output.LambdaConfig, context) + : undefined, + LastModifiedDate: output.LastModifiedDate !== undefined && output.LastModifiedDate !== null + ? new Date(Math.round(output.LastModifiedDate * 1000)) + : undefined, + Name: output.Name !== undefined && output.Name !== null ? output.Name : undefined, + Status: output.Status !== undefined && output.Status !== null ? output.Status : undefined, + }; +}; +const deserializeAws_json1_1UserPoolListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1UserPoolDescriptionType(entry, context); + }); +}; +const deserializeAws_json1_1UserPoolPolicyType = (output, context) => { + return { + PasswordPolicy: output.PasswordPolicy !== undefined && output.PasswordPolicy !== null + ? deserializeAws_json1_1PasswordPolicyType(output.PasswordPolicy, context) + : undefined, + }; +}; +const deserializeAws_json1_1UserPoolTaggingException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UserPoolTagsType = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_json1_1UserPoolType = (output, context) => { + return { + AccountRecoverySetting: output.AccountRecoverySetting !== undefined && output.AccountRecoverySetting !== null + ? deserializeAws_json1_1AccountRecoverySettingType(output.AccountRecoverySetting, context) + : undefined, + AdminCreateUserConfig: output.AdminCreateUserConfig !== undefined && output.AdminCreateUserConfig !== null + ? deserializeAws_json1_1AdminCreateUserConfigType(output.AdminCreateUserConfig, context) + : undefined, + AliasAttributes: output.AliasAttributes !== undefined && output.AliasAttributes !== null + ? deserializeAws_json1_1AliasAttributesListType(output.AliasAttributes, context) + : undefined, + Arn: output.Arn !== undefined && output.Arn !== null ? output.Arn : undefined, + AutoVerifiedAttributes: output.AutoVerifiedAttributes !== undefined && output.AutoVerifiedAttributes !== null + ? deserializeAws_json1_1VerifiedAttributesListType(output.AutoVerifiedAttributes, context) + : undefined, + CreationDate: output.CreationDate !== undefined && output.CreationDate !== null + ? new Date(Math.round(output.CreationDate * 1000)) + : undefined, + CustomDomain: output.CustomDomain !== undefined && output.CustomDomain !== null ? output.CustomDomain : undefined, + DeviceConfiguration: output.DeviceConfiguration !== undefined && output.DeviceConfiguration !== null + ? deserializeAws_json1_1DeviceConfigurationType(output.DeviceConfiguration, context) + : undefined, + Domain: output.Domain !== undefined && output.Domain !== null ? output.Domain : undefined, + EmailConfiguration: output.EmailConfiguration !== undefined && output.EmailConfiguration !== null + ? deserializeAws_json1_1EmailConfigurationType(output.EmailConfiguration, context) + : undefined, + EmailConfigurationFailure: output.EmailConfigurationFailure !== undefined && output.EmailConfigurationFailure !== null + ? output.EmailConfigurationFailure + : undefined, + EmailVerificationMessage: output.EmailVerificationMessage !== undefined && output.EmailVerificationMessage !== null + ? output.EmailVerificationMessage + : undefined, + EmailVerificationSubject: output.EmailVerificationSubject !== undefined && output.EmailVerificationSubject !== null + ? output.EmailVerificationSubject + : undefined, + EstimatedNumberOfUsers: output.EstimatedNumberOfUsers !== undefined && output.EstimatedNumberOfUsers !== null + ? output.EstimatedNumberOfUsers + : undefined, + Id: output.Id !== undefined && output.Id !== null ? output.Id : undefined, + LambdaConfig: output.LambdaConfig !== undefined && output.LambdaConfig !== null + ? deserializeAws_json1_1LambdaConfigType(output.LambdaConfig, context) + : undefined, + LastModifiedDate: output.LastModifiedDate !== undefined && output.LastModifiedDate !== null + ? new Date(Math.round(output.LastModifiedDate * 1000)) + : undefined, + MfaConfiguration: output.MfaConfiguration !== undefined && output.MfaConfiguration !== null ? output.MfaConfiguration : undefined, + Name: output.Name !== undefined && output.Name !== null ? output.Name : undefined, + Policies: output.Policies !== undefined && output.Policies !== null + ? deserializeAws_json1_1UserPoolPolicyType(output.Policies, context) + : undefined, + SchemaAttributes: output.SchemaAttributes !== undefined && output.SchemaAttributes !== null + ? deserializeAws_json1_1SchemaAttributesListType(output.SchemaAttributes, context) + : undefined, + SmsAuthenticationMessage: output.SmsAuthenticationMessage !== undefined && output.SmsAuthenticationMessage !== null + ? output.SmsAuthenticationMessage + : undefined, + SmsConfiguration: output.SmsConfiguration !== undefined && output.SmsConfiguration !== null + ? deserializeAws_json1_1SmsConfigurationType(output.SmsConfiguration, context) + : undefined, + SmsConfigurationFailure: output.SmsConfigurationFailure !== undefined && output.SmsConfigurationFailure !== null + ? output.SmsConfigurationFailure + : undefined, + SmsVerificationMessage: output.SmsVerificationMessage !== undefined && output.SmsVerificationMessage !== null + ? output.SmsVerificationMessage + : undefined, + Status: output.Status !== undefined && output.Status !== null ? output.Status : undefined, + UserPoolAddOns: output.UserPoolAddOns !== undefined && output.UserPoolAddOns !== null + ? deserializeAws_json1_1UserPoolAddOnsType(output.UserPoolAddOns, context) + : undefined, + UserPoolTags: output.UserPoolTags !== undefined && output.UserPoolTags !== null + ? deserializeAws_json1_1UserPoolTagsType(output.UserPoolTags, context) + : undefined, + UsernameAttributes: output.UsernameAttributes !== undefined && output.UsernameAttributes !== null + ? deserializeAws_json1_1UsernameAttributesListType(output.UsernameAttributes, context) + : undefined, + UsernameConfiguration: output.UsernameConfiguration !== undefined && output.UsernameConfiguration !== null + ? deserializeAws_json1_1UsernameConfigurationType(output.UsernameConfiguration, context) + : undefined, + VerificationMessageTemplate: output.VerificationMessageTemplate !== undefined && output.VerificationMessageTemplate !== null + ? deserializeAws_json1_1VerificationMessageTemplateType(output.VerificationMessageTemplate, context) + : undefined, + }; +}; +const deserializeAws_json1_1UsersListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1UserType(entry, context); + }); +}; +const deserializeAws_json1_1UserType = (output, context) => { + return { + Attributes: output.Attributes !== undefined && output.Attributes !== null + ? deserializeAws_json1_1AttributeListType(output.Attributes, context) + : undefined, + Enabled: output.Enabled !== undefined && output.Enabled !== null ? output.Enabled : undefined, + MFAOptions: output.MFAOptions !== undefined && output.MFAOptions !== null + ? deserializeAws_json1_1MFAOptionListType(output.MFAOptions, context) + : undefined, + UserCreateDate: output.UserCreateDate !== undefined && output.UserCreateDate !== null + ? new Date(Math.round(output.UserCreateDate * 1000)) + : undefined, + UserLastModifiedDate: output.UserLastModifiedDate !== undefined && output.UserLastModifiedDate !== null + ? new Date(Math.round(output.UserLastModifiedDate * 1000)) + : undefined, + UserStatus: output.UserStatus !== undefined && output.UserStatus !== null ? output.UserStatus : undefined, + Username: output.Username !== undefined && output.Username !== null ? output.Username : undefined, + }; +}; +const deserializeAws_json1_1VerificationMessageTemplateType = (output, context) => { + return { + DefaultEmailOption: output.DefaultEmailOption !== undefined && output.DefaultEmailOption !== null + ? output.DefaultEmailOption + : undefined, + EmailMessage: output.EmailMessage !== undefined && output.EmailMessage !== null ? output.EmailMessage : undefined, + EmailMessageByLink: output.EmailMessageByLink !== undefined && output.EmailMessageByLink !== null + ? output.EmailMessageByLink + : undefined, + EmailSubject: output.EmailSubject !== undefined && output.EmailSubject !== null ? output.EmailSubject : undefined, + EmailSubjectByLink: output.EmailSubjectByLink !== undefined && output.EmailSubjectByLink !== null + ? output.EmailSubjectByLink + : undefined, + SmsMessage: output.SmsMessage !== undefined && output.SmsMessage !== null ? output.SmsMessage : undefined, + }; +}; +const deserializeAws_json1_1VerifiedAttributesListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1VerifySoftwareTokenResponse = (output, context) => { + return { + Session: output.Session !== undefined && output.Session !== null ? output.Session : undefined, + Status: output.Status !== undefined && output.Status !== null ? output.Status : undefined, + }; +}; +const deserializeAws_json1_1VerifyUserAttributeResponse = (output, context) => { + return {}; +}; +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"], + }); +}; +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; +// Encode Uint8Array data into string with utf-8. +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 } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + 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 {}; +}); +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +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 ""; +}; +//# sourceMappingURL=Aws_json1_1.js.map + +/***/ }), + +/***/ 45628: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientDefaultValues = void 0; +const tslib_1 = __nccwpck_require__(37706); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(48166)); +const config_resolver_1 = __nccwpck_require__(87229); +const credential_provider_node_1 = __nccwpck_require__(98030); +const hash_node_1 = __nccwpck_require__(90791); +const middleware_retry_1 = __nccwpck_require__(7000); +const node_config_provider_1 = __nccwpck_require__(71124); +const node_http_handler_1 = __nccwpck_require__(15168); +const util_base64_node_1 = __nccwpck_require__(2091); +const util_body_length_node_1 = __nccwpck_require__(40286); +const util_user_agent_node_1 = __nccwpck_require__(64717); +const util_utf8_node_1 = __nccwpck_require__(85227); +const runtimeConfig_shared_1 = __nccwpck_require__(34192); +/** + * @internal + */ +exports.ClientDefaultValues = { + ...runtimeConfig_shared_1.ClientSharedValues, + runtime: "node", + base64Decoder: util_base64_node_1.fromBase64, + base64Encoder: util_base64_node_1.toBase64, + bodyLengthChecker: util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: util_user_agent_node_1.defaultUserAgent({ + serviceId: runtimeConfig_shared_1.ClientSharedValues.serviceId, + clientVersion: package_json_1.default.version, + }), + maxAttempts: node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: new node_http_handler_1.NodeHttpHandler(), + sha256: hash_node_1.Hash.bind(null, "sha256"), + streamCollector: node_http_handler_1.streamCollector, + utf8Decoder: util_utf8_node_1.fromUtf8, + utf8Encoder: util_utf8_node_1.toUtf8, +}; +//# sourceMappingURL=runtimeConfig.js.map + +/***/ }), + +/***/ 34192: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientSharedValues = void 0; +const endpoints_1 = __nccwpck_require__(96941); +const url_parser_1 = __nccwpck_require__(99427); +/** + * @internal + */ +exports.ClientSharedValues = { + apiVersion: "2016-04-18", + disableHostPrefix: false, + logger: {}, + regionInfoProvider: endpoints_1.defaultRegionInfoProvider, + serviceId: "Cognito Identity Provider", + urlParser: url_parser_1.parseUrl, +}; +//# sourceMappingURL=runtimeConfig.shared.js.map + +/***/ }), + +/***/ 37706: +/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +__nccwpck_require__.r(__webpack_exports__); +/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { +/* harmony export */ "__extends": () => /* binding */ __extends, +/* harmony export */ "__assign": () => /* binding */ __assign, +/* harmony export */ "__rest": () => /* binding */ __rest, +/* harmony export */ "__decorate": () => /* binding */ __decorate, +/* harmony export */ "__param": () => /* binding */ __param, +/* harmony export */ "__metadata": () => /* binding */ __metadata, +/* harmony export */ "__awaiter": () => /* binding */ __awaiter, +/* harmony export */ "__generator": () => /* binding */ __generator, +/* harmony export */ "__createBinding": () => /* binding */ __createBinding, +/* harmony export */ "__exportStar": () => /* binding */ __exportStar, +/* harmony export */ "__values": () => /* binding */ __values, +/* harmony export */ "__read": () => /* binding */ __read, +/* harmony export */ "__spread": () => /* binding */ __spread, +/* harmony export */ "__spreadArrays": () => /* binding */ __spreadArrays, +/* harmony export */ "__spreadArray": () => /* binding */ __spreadArray, +/* harmony export */ "__await": () => /* binding */ __await, +/* harmony export */ "__asyncGenerator": () => /* binding */ __asyncGenerator, +/* harmony export */ "__asyncDelegator": () => /* binding */ __asyncDelegator, +/* harmony export */ "__asyncValues": () => /* binding */ __asyncValues, +/* harmony export */ "__makeTemplateObject": () => /* binding */ __makeTemplateObject, +/* harmony export */ "__importStar": () => /* binding */ __importStar, +/* harmony export */ "__importDefault": () => /* binding */ __importDefault, +/* harmony export */ "__classPrivateFieldGet": () => /* binding */ __classPrivateFieldGet, +/* harmony export */ "__classPrivateFieldSet": () => /* binding */ __classPrivateFieldSet +/* harmony export */ }); +/*! ***************************************************************************** +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 Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + 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 }; + } +} + +var __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]; +}); + +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function __spreadArray(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, 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]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function __importStar(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; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} + + +/***/ }), + +/***/ 67301: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CognitoIdentity = void 0; +const CognitoIdentityClient_1 = __nccwpck_require__(72614); +const CreateIdentityPoolCommand_1 = __nccwpck_require__(7373); +const DeleteIdentitiesCommand_1 = __nccwpck_require__(16080); +const DeleteIdentityPoolCommand_1 = __nccwpck_require__(91472); +const DescribeIdentityCommand_1 = __nccwpck_require__(14047); +const DescribeIdentityPoolCommand_1 = __nccwpck_require__(41066); +const GetCredentialsForIdentityCommand_1 = __nccwpck_require__(24133); +const GetIdCommand_1 = __nccwpck_require__(37292); +const GetIdentityPoolRolesCommand_1 = __nccwpck_require__(23106); +const GetOpenIdTokenCommand_1 = __nccwpck_require__(89258); +const GetOpenIdTokenForDeveloperIdentityCommand_1 = __nccwpck_require__(86688); +const ListIdentitiesCommand_1 = __nccwpck_require__(24194); +const ListIdentityPoolsCommand_1 = __nccwpck_require__(53836); +const ListTagsForResourceCommand_1 = __nccwpck_require__(29314); +const LookupDeveloperIdentityCommand_1 = __nccwpck_require__(4664); +const MergeDeveloperIdentitiesCommand_1 = __nccwpck_require__(64385); +const SetIdentityPoolRolesCommand_1 = __nccwpck_require__(4039); +const TagResourceCommand_1 = __nccwpck_require__(67926); +const UnlinkDeveloperIdentityCommand_1 = __nccwpck_require__(55410); +const UnlinkIdentityCommand_1 = __nccwpck_require__(98248); +const UntagResourceCommand_1 = __nccwpck_require__(37358); +const UpdateIdentityPoolCommand_1 = __nccwpck_require__(97273); +/** + * Amazon Cognito Federated Identities + *

Amazon Cognito Federated Identities is a web service that delivers scoped temporary + * credentials to mobile devices and other untrusted environments. It uniquely identifies a + * device and supplies the user with a consistent identity over the lifetime of an + * application.

+ *

Using Amazon Cognito Federated Identities, you can enable authentication with one or + * more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon + * Cognito user pool, and you can also choose to support unauthenticated access from your app. + * Cognito delivers a unique identifier for each user and acts as an OpenID token provider + * trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS + * credentials.

+ *

For a description of the authentication flow from the Amazon Cognito Developer Guide + * see Authentication Flow.

+ *

For more information see Amazon Cognito Federated Identities.

+ */ +class CognitoIdentity extends CognitoIdentityClient_1.CognitoIdentityClient { + createIdentityPool(args, optionsOrCb, cb) { + const command = new CreateIdentityPoolCommand_1.CreateIdentityPoolCommand(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); + } + } + deleteIdentities(args, optionsOrCb, cb) { + const command = new DeleteIdentitiesCommand_1.DeleteIdentitiesCommand(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); + } + } + deleteIdentityPool(args, optionsOrCb, cb) { + const command = new DeleteIdentityPoolCommand_1.DeleteIdentityPoolCommand(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); + } + } + describeIdentity(args, optionsOrCb, cb) { + const command = new DescribeIdentityCommand_1.DescribeIdentityCommand(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); + } + } + describeIdentityPool(args, optionsOrCb, cb) { + const command = new DescribeIdentityPoolCommand_1.DescribeIdentityPoolCommand(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); + } + } + getCredentialsForIdentity(args, optionsOrCb, cb) { + const command = new GetCredentialsForIdentityCommand_1.GetCredentialsForIdentityCommand(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); + } + } + getId(args, optionsOrCb, cb) { + const command = new GetIdCommand_1.GetIdCommand(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); + } + } + getIdentityPoolRoles(args, optionsOrCb, cb) { + const command = new GetIdentityPoolRolesCommand_1.GetIdentityPoolRolesCommand(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); + } + } + getOpenIdToken(args, optionsOrCb, cb) { + const command = new GetOpenIdTokenCommand_1.GetOpenIdTokenCommand(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); + } + } + getOpenIdTokenForDeveloperIdentity(args, optionsOrCb, cb) { + const command = new GetOpenIdTokenForDeveloperIdentityCommand_1.GetOpenIdTokenForDeveloperIdentityCommand(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); + } + } + listIdentities(args, optionsOrCb, cb) { + const command = new ListIdentitiesCommand_1.ListIdentitiesCommand(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); + } + } + listIdentityPools(args, optionsOrCb, cb) { + const command = new ListIdentityPoolsCommand_1.ListIdentityPoolsCommand(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); + } + } + lookupDeveloperIdentity(args, optionsOrCb, cb) { + const command = new LookupDeveloperIdentityCommand_1.LookupDeveloperIdentityCommand(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); + } + } + mergeDeveloperIdentities(args, optionsOrCb, cb) { + const command = new MergeDeveloperIdentitiesCommand_1.MergeDeveloperIdentitiesCommand(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); + } + } + setIdentityPoolRoles(args, optionsOrCb, cb) { + const command = new SetIdentityPoolRolesCommand_1.SetIdentityPoolRolesCommand(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); + } + } + unlinkDeveloperIdentity(args, optionsOrCb, cb) { + const command = new UnlinkDeveloperIdentityCommand_1.UnlinkDeveloperIdentityCommand(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); + } + } + unlinkIdentity(args, optionsOrCb, cb) { + const command = new UnlinkIdentityCommand_1.UnlinkIdentityCommand(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); + } + } + updateIdentityPool(args, optionsOrCb, cb) { + const command = new UpdateIdentityPoolCommand_1.UpdateIdentityPoolCommand(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.CognitoIdentity = CognitoIdentity; +//# sourceMappingURL=CognitoIdentity.js.map + +/***/ }), + +/***/ 72614: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CognitoIdentityClient = void 0; +const runtimeConfig_1 = __nccwpck_require__(11407); +const config_resolver_1 = __nccwpck_require__(87229); +const middleware_content_length_1 = __nccwpck_require__(69323); +const middleware_host_header_1 = __nccwpck_require__(58645); +const middleware_logger_1 = __nccwpck_require__(98685); +const middleware_retry_1 = __nccwpck_require__(7000); +const middleware_signing_1 = __nccwpck_require__(82487); +const middleware_user_agent_1 = __nccwpck_require__(55976); +const smithy_client_1 = __nccwpck_require__(84060); +/** + * Amazon Cognito Federated Identities + *

Amazon Cognito Federated Identities is a web service that delivers scoped temporary + * credentials to mobile devices and other untrusted environments. It uniquely identifies a + * device and supplies the user with a consistent identity over the lifetime of an + * application.

+ *

Using Amazon Cognito Federated Identities, you can enable authentication with one or + * more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon + * Cognito user pool, and you can also choose to support unauthenticated access from your app. + * Cognito delivers a unique identifier for each user and acts as an OpenID token provider + * trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS + * credentials.

+ *

For a description of the authentication flow from the Amazon Cognito Developer Guide + * see Authentication Flow.

+ *

For more information see Amazon Cognito Federated Identities.

+ */ +class CognitoIdentityClient extends smithy_client_1.Client { + constructor(configuration) { + let _config_0 = { + ...runtimeConfig_1.ClientDefaultValues, + ...configuration, + }; + let _config_1 = config_resolver_1.resolveRegionConfig(_config_0); + let _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1); + let _config_3 = middleware_signing_1.resolveAwsAuthConfig(_config_2); + let _config_4 = middleware_retry_1.resolveRetryConfig(_config_3); + let _config_5 = middleware_host_header_1.resolveHostHeaderConfig(_config_4); + let _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.CognitoIdentityClient = CognitoIdentityClient; +//# sourceMappingURL=CognitoIdentityClient.js.map + +/***/ }), + +/***/ 7373: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateIdentityPoolCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a new identity pool. The identity pool is a store of user identity + * information that is specific to your AWS account. The keys for SupportedLoginProviders are as follows:

+ * + * + * + *

You must use AWS Developer credentials to call this API.

+ */ +class CreateIdentityPoolCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "CreateIdentityPoolCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateIdentityPoolInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.IdentityPool.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreateIdentityPoolCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreateIdentityPoolCommand(output, context); + } +} +exports.CreateIdentityPoolCommand = CreateIdentityPoolCommand; +//# sourceMappingURL=CreateIdentityPoolCommand.js.map + +/***/ }), + +/***/ 16080: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteIdentitiesCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes identities from an identity pool. You can specify a list of 1-60 identities + * that you want to delete.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class DeleteIdentitiesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "DeleteIdentitiesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteIdentitiesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteIdentitiesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteIdentitiesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteIdentitiesCommand(output, context); + } +} +exports.DeleteIdentitiesCommand = DeleteIdentitiesCommand; +//# sourceMappingURL=DeleteIdentitiesCommand.js.map + +/***/ }), + +/***/ 91472: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteIdentityPoolCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes an identity pool. Once a pool is deleted, users will not be able to + * authenticate with the pool.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class DeleteIdentityPoolCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "DeleteIdentityPoolCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteIdentityPoolInput.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteIdentityPoolCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteIdentityPoolCommand(output, context); + } +} +exports.DeleteIdentityPoolCommand = DeleteIdentityPoolCommand; +//# sourceMappingURL=DeleteIdentityPoolCommand.js.map + +/***/ }), + +/***/ 14047: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeIdentityCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns metadata related to the given identity, including when the identity was + * created and any associated linked logins.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class DescribeIdentityCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "DescribeIdentityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeIdentityInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.IdentityDescription.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeIdentityCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeIdentityCommand(output, context); + } +} +exports.DescribeIdentityCommand = DescribeIdentityCommand; +//# sourceMappingURL=DescribeIdentityCommand.js.map + +/***/ }), + +/***/ 41066: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeIdentityPoolCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets details about a particular identity pool, including the pool name, ID + * description, creation date, and current number of users.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class DescribeIdentityPoolCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "DescribeIdentityPoolCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeIdentityPoolInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.IdentityPool.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeIdentityPoolCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeIdentityPoolCommand(output, context); + } +} +exports.DescribeIdentityPoolCommand = DescribeIdentityPoolCommand; +//# sourceMappingURL=DescribeIdentityPoolCommand.js.map + +/***/ }), + +/***/ 24133: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetCredentialsForIdentityCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns credentials for the provided identity ID. Any provided logins will be + * validated against supported login providers. If the token is for + * cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service + * with the appropriate role for the token.

+ *

This is a public API. You do not need any credentials to call this API.

+ */ +class GetCredentialsForIdentityCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "GetCredentialsForIdentityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetCredentialsForIdentityInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetCredentialsForIdentityResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetCredentialsForIdentityCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetCredentialsForIdentityCommand(output, context); + } +} +exports.GetCredentialsForIdentityCommand = GetCredentialsForIdentityCommand; +//# sourceMappingURL=GetCredentialsForIdentityCommand.js.map + +/***/ }), + +/***/ 37292: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetIdCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an + * implicit linked account.

+ *

This is a public API. You do not need any credentials to call this API.

+ */ +class GetIdCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "GetIdCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetIdInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetIdResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetIdCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetIdCommand(output, context); + } +} +exports.GetIdCommand = GetIdCommand; +//# sourceMappingURL=GetIdCommand.js.map + +/***/ }), + +/***/ 23106: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetIdentityPoolRolesCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the roles for an identity pool.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class GetIdentityPoolRolesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "GetIdentityPoolRolesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetIdentityPoolRolesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetIdentityPoolRolesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetIdentityPoolRolesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetIdentityPoolRolesCommand(output, context); + } +} +exports.GetIdentityPoolRolesCommand = GetIdentityPoolRolesCommand; +//# sourceMappingURL=GetIdentityPoolRolesCommand.js.map + +/***/ }), + +/***/ 89258: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetOpenIdTokenCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by + * GetId. You can optionally add additional logins for the identity. + * Supplying multiple logins creates an implicit link.

+ *

The OpenId token is valid for 10 minutes.

+ *

This is a public API. You do not need any credentials to call this API.

+ */ +class GetOpenIdTokenCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "GetOpenIdTokenCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetOpenIdTokenInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetOpenIdTokenResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetOpenIdTokenCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetOpenIdTokenCommand(output, context); + } +} +exports.GetOpenIdTokenCommand = GetOpenIdTokenCommand; +//# sourceMappingURL=GetOpenIdTokenCommand.js.map + +/***/ }), + +/***/ 86688: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetOpenIdTokenForDeveloperIdentityCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Registers (or retrieves) a Cognito IdentityId and an OpenID Connect + * token for a user authenticated by your backend authentication process. Supplying multiple + * logins will create an implicit linked account. You can only specify one developer provider + * as part of the Logins map, which is linked to the identity pool. The developer + * provider is the "domain" by which Cognito will refer to your users.

+ *

You can use GetOpenIdTokenForDeveloperIdentity to create a new identity + * and to link new logins (that is, user credentials issued by a public provider or developer + * provider) to an existing identity. When you want to create a new identity, the + * IdentityId should be null. When you want to associate a new login with an + * existing authenticated/unauthenticated identity, you can do so by providing the existing + * IdentityId. This API will create the identity in the specified + * IdentityPoolId.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class GetOpenIdTokenForDeveloperIdentityCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "GetOpenIdTokenForDeveloperIdentityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetOpenIdTokenForDeveloperIdentityInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetOpenIdTokenForDeveloperIdentityResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand(output, context); + } +} +exports.GetOpenIdTokenForDeveloperIdentityCommand = GetOpenIdTokenForDeveloperIdentityCommand; +//# sourceMappingURL=GetOpenIdTokenForDeveloperIdentityCommand.js.map + +/***/ }), + +/***/ 24194: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListIdentitiesCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the identities in an identity pool.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class ListIdentitiesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "ListIdentitiesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListIdentitiesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListIdentitiesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListIdentitiesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListIdentitiesCommand(output, context); + } +} +exports.ListIdentitiesCommand = ListIdentitiesCommand; +//# sourceMappingURL=ListIdentitiesCommand.js.map + +/***/ }), + +/***/ 53836: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListIdentityPoolsCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists all of the Cognito identity pools registered for your account.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class ListIdentityPoolsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "ListIdentityPoolsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListIdentityPoolsInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListIdentityPoolsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListIdentityPoolsCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListIdentityPoolsCommand(output, context); + } +} +exports.ListIdentityPoolsCommand = ListIdentityPoolsCommand; +//# sourceMappingURL=ListIdentityPoolsCommand.js.map + +/***/ }), + +/***/ 29314: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTagsForResourceCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the tags that are assigned to an Amazon Cognito identity pool.

+ *

A tag is a label that you can apply to identity pools to categorize and manage them in + * different ways, such as by purpose, owner, environment, or other criteria.

+ *

You can use this action up to 10 times per second, per account.

+ */ +class ListTagsForResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListTagsForResourceInput.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; +//# sourceMappingURL=ListTagsForResourceCommand.js.map + +/***/ }), + +/***/ 4664: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LookupDeveloperIdentityCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Retrieves the IdentityID associated with a + * DeveloperUserIdentifier or the list of DeveloperUserIdentifier + * values associated with an IdentityId for an existing identity. Either + * IdentityID or DeveloperUserIdentifier must not be null. If you + * supply only one of these values, the other value will be searched in the database and + * returned as a part of the response. If you supply both, + * DeveloperUserIdentifier will be matched against IdentityID. If + * the values are verified against the database, the response returns both values and is the + * same as the request. Otherwise a ResourceConflictException is + * thrown.

+ *

+ * LookupDeveloperIdentity is intended for low-throughput control plane + * operations: for example, to enable customer service to locate an identity ID by username. + * If you are using it for higher-volume operations such as user authentication, your requests + * are likely to be throttled. GetOpenIdTokenForDeveloperIdentity is a + * better option for higher-volume operations for user authentication.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class LookupDeveloperIdentityCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "LookupDeveloperIdentityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.LookupDeveloperIdentityInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.LookupDeveloperIdentityResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1LookupDeveloperIdentityCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1LookupDeveloperIdentityCommand(output, context); + } +} +exports.LookupDeveloperIdentityCommand = LookupDeveloperIdentityCommand; +//# sourceMappingURL=LookupDeveloperIdentityCommand.js.map + +/***/ }), + +/***/ 64385: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MergeDeveloperIdentitiesCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Merges two users having different IdentityIds, existing in the same + * identity pool, and identified by the same developer provider. You can use this action to + * request that discrete users be merged and identified as a single user in the Cognito + * environment. Cognito associates the given source user (SourceUserIdentifier) + * with the IdentityId of the DestinationUserIdentifier. Only + * developer-authenticated users can be merged. If the users to be merged are associated with + * the same public provider, but as two different users, an exception will be + * thrown.

+ *

The number of linked logins is limited to 20. So, the number of linked logins for the + * source user, SourceUserIdentifier, and the destination user, + * DestinationUserIdentifier, together should not be larger than 20. + * Otherwise, an exception will be thrown.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class MergeDeveloperIdentitiesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "MergeDeveloperIdentitiesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.MergeDeveloperIdentitiesInput.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.MergeDeveloperIdentitiesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1MergeDeveloperIdentitiesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1MergeDeveloperIdentitiesCommand(output, context); + } +} +exports.MergeDeveloperIdentitiesCommand = MergeDeveloperIdentitiesCommand; +//# sourceMappingURL=MergeDeveloperIdentitiesCommand.js.map + +/***/ }), + +/***/ 4039: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetIdentityPoolRolesCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class SetIdentityPoolRolesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "SetIdentityPoolRolesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetIdentityPoolRolesInput.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1SetIdentityPoolRolesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1SetIdentityPoolRolesCommand(output, context); + } +} +exports.SetIdentityPoolRolesCommand = SetIdentityPoolRolesCommand; +//# sourceMappingURL=SetIdentityPoolRolesCommand.js.map + +/***/ }), + +/***/ 67926: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TagResourceCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Assigns a set of tags to an Amazon Cognito identity pool. A tag is a label that you can + * use to categorize and manage identity pools in different ways, such as by purpose, owner, + * environment, or other criteria.

+ *

Each tag consists of a key and value, both of which you define. A key is a general + * category for more specific values. For example, if you have two versions of an identity + * pool, one for testing and another for production, you might assign an + * Environment tag key to both identity pools. The value of this key might be + * Test for one identity pool and Production for the + * other.

+ *

Tags are useful for cost tracking and access control. You can activate your tags so that + * they appear on the Billing and Cost Management console, where you can track the costs + * associated with your identity pools. In an IAM policy, you can constrain permissions for + * identity pools based on specific tags or tag values.

+ *

You can use this action up to 5 times per second, per account. An identity pool can have + * as many as 50 tags.

+ */ +class TagResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.TagResourceInput.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; +//# sourceMappingURL=TagResourceCommand.js.map + +/***/ }), + +/***/ 55410: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UnlinkDeveloperIdentityCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked + * developer users will be considered new identities next time they are seen. If, for a given + * Cognito identity, you remove all federated identities as well as the developer user + * identifier, the Cognito identity becomes inaccessible.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class UnlinkDeveloperIdentityCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "UnlinkDeveloperIdentityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UnlinkDeveloperIdentityInput.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UnlinkDeveloperIdentityCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UnlinkDeveloperIdentityCommand(output, context); + } +} +exports.UnlinkDeveloperIdentityCommand = UnlinkDeveloperIdentityCommand; +//# sourceMappingURL=UnlinkDeveloperIdentityCommand.js.map + +/***/ }), + +/***/ 98248: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UnlinkIdentityCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Unlinks a federated identity from an existing account. Unlinked logins will be + * considered new identities next time they are seen. Removing the last linked login will make + * this identity inaccessible.

+ *

This is a public API. You do not need any credentials to call this API.

+ */ +class UnlinkIdentityCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "UnlinkIdentityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UnlinkIdentityInput.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UnlinkIdentityCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UnlinkIdentityCommand(output, context); + } +} +exports.UnlinkIdentityCommand = UnlinkIdentityCommand; +//# sourceMappingURL=UnlinkIdentityCommand.js.map + +/***/ }), + +/***/ 37358: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UntagResourceCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Removes the specified tags from an Amazon Cognito identity pool. You can use this action + * up to 5 times per second, per account

+ */ +class UntagResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UntagResourceInput.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; +//# sourceMappingURL=UntagResourceCommand.js.map + +/***/ }), + +/***/ 97273: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateIdentityPoolCommand = void 0; +const models_0_1 = __nccwpck_require__(76319); +const Aws_json1_1_1 = __nccwpck_require__(69579); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates an identity pool.

+ *

You must use AWS Developer credentials to call this API.

+ */ +class UpdateIdentityPoolCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "CognitoIdentityClient"; + const commandName = "UpdateIdentityPoolCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.IdentityPool.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.IdentityPool.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UpdateIdentityPoolCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UpdateIdentityPoolCommand(output, context); + } +} +exports.UpdateIdentityPoolCommand = UpdateIdentityPoolCommand; +//# sourceMappingURL=UpdateIdentityPoolCommand.js.map + +/***/ }), + +/***/ 43366: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRegionInfoProvider = void 0; +// Partition default templates +const AWS_TEMPLATE = "cognito-identity.{region}.amazonaws.com"; +const AWS_CN_TEMPLATE = "cognito-identity.{region}.amazonaws.com.cn"; +const AWS_ISO_TEMPLATE = "cognito-identity.{region}.c2s.ic.gov"; +const AWS_ISO_B_TEMPLATE = "cognito-identity.{region}.sc2s.sgov.gov"; +const AWS_US_GOV_TEMPLATE = "cognito-identity.{region}.amazonaws.com"; +// Partition regions +const AWS_REGIONS = new Set([ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "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", +]); +const AWS_CN_REGIONS = new Set(["cn-north-1", "cn-northwest-1"]); +const AWS_ISO_REGIONS = new Set(["us-iso-east-1"]); +const AWS_ISO_B_REGIONS = new Set(["us-isob-east-1"]); +const AWS_US_GOV_REGIONS = new Set(["us-gov-east-1", "us-gov-west-1"]); +const defaultRegionInfoProvider = (region, options) => { + let regionInfo = undefined; + switch (region) { + // First, try to match exact region names. + case "ap-northeast-1": + regionInfo = { + hostname: "cognito-identity.ap-northeast-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-northeast-2": + regionInfo = { + hostname: "cognito-identity.ap-northeast-2.amazonaws.com", + partition: "aws", + }; + break; + case "ap-south-1": + regionInfo = { + hostname: "cognito-identity.ap-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-southeast-1": + regionInfo = { + hostname: "cognito-identity.ap-southeast-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-southeast-2": + regionInfo = { + hostname: "cognito-identity.ap-southeast-2.amazonaws.com", + partition: "aws", + }; + break; + case "ca-central-1": + regionInfo = { + hostname: "cognito-identity.ca-central-1.amazonaws.com", + partition: "aws", + }; + break; + case "cn-north-1": + regionInfo = { + hostname: "cognito-identity.cn-north-1.amazonaws.com.cn", + partition: "aws-cn", + }; + break; + case "eu-central-1": + regionInfo = { + hostname: "cognito-identity.eu-central-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-north-1": + regionInfo = { + hostname: "cognito-identity.eu-north-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-1": + regionInfo = { + hostname: "cognito-identity.eu-west-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-2": + regionInfo = { + hostname: "cognito-identity.eu-west-2.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-3": + regionInfo = { + hostname: "cognito-identity.eu-west-3.amazonaws.com", + partition: "aws", + }; + break; + case "fips-us-east-1": + regionInfo = { + hostname: "cognito-identity-fips.us-east-1.amazonaws.com", + partition: "aws", + signingRegion: "us-east-1", + }; + break; + case "fips-us-east-2": + regionInfo = { + hostname: "cognito-identity-fips.us-east-2.amazonaws.com", + partition: "aws", + signingRegion: "us-east-2", + }; + break; + case "fips-us-gov-west-1": + regionInfo = { + hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com", + partition: "aws-us-gov", + signingRegion: "us-gov-west-1", + }; + break; + case "fips-us-west-2": + regionInfo = { + hostname: "cognito-identity-fips.us-west-2.amazonaws.com", + partition: "aws", + signingRegion: "us-west-2", + }; + break; + case "sa-east-1": + regionInfo = { + hostname: "cognito-identity.sa-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-1": + regionInfo = { + hostname: "cognito-identity.us-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-2": + regionInfo = { + hostname: "cognito-identity.us-east-2.amazonaws.com", + partition: "aws", + }; + break; + case "us-gov-west-1": + regionInfo = { + hostname: "cognito-identity.us-gov-west-1.amazonaws.com", + partition: "aws-us-gov", + }; + break; + case "us-west-1": + regionInfo = { + hostname: "cognito-identity.us-west-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-west-2": + regionInfo = { + hostname: "cognito-identity.us-west-2.amazonaws.com", + partition: "aws", + }; + break; + // Next, try to match partition endpoints. + default: + if (AWS_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + }; + } + if (AWS_CN_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_CN_TEMPLATE.replace("{region}", region), + partition: "aws-cn", + }; + } + if (AWS_ISO_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_TEMPLATE.replace("{region}", region), + partition: "aws-iso", + }; + } + if (AWS_ISO_B_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_B_TEMPLATE.replace("{region}", region), + partition: "aws-iso-b", + }; + } + if (AWS_US_GOV_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_US_GOV_TEMPLATE.replace("{region}", region), + partition: "aws-us-gov", + }; + } + // Finally, assume it's an AWS partition endpoint. + if (regionInfo === undefined) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + }; + } + } + return Promise.resolve({ signingService: "cognito-identity", ...regionInfo }); +}; +exports.defaultRegionInfoProvider = defaultRegionInfoProvider; +//# sourceMappingURL=endpoints.js.map + +/***/ }), + +/***/ 25949: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(57088); +tslib_1.__exportStar(__nccwpck_require__(72614), exports); +tslib_1.__exportStar(__nccwpck_require__(67301), exports); +tslib_1.__exportStar(__nccwpck_require__(7373), exports); +tslib_1.__exportStar(__nccwpck_require__(16080), exports); +tslib_1.__exportStar(__nccwpck_require__(91472), exports); +tslib_1.__exportStar(__nccwpck_require__(14047), exports); +tslib_1.__exportStar(__nccwpck_require__(41066), exports); +tslib_1.__exportStar(__nccwpck_require__(24133), exports); +tslib_1.__exportStar(__nccwpck_require__(37292), exports); +tslib_1.__exportStar(__nccwpck_require__(23106), exports); +tslib_1.__exportStar(__nccwpck_require__(89258), exports); +tslib_1.__exportStar(__nccwpck_require__(86688), exports); +tslib_1.__exportStar(__nccwpck_require__(24194), exports); +tslib_1.__exportStar(__nccwpck_require__(53836), exports); +tslib_1.__exportStar(__nccwpck_require__(26964), exports); +tslib_1.__exportStar(__nccwpck_require__(29314), exports); +tslib_1.__exportStar(__nccwpck_require__(4664), exports); +tslib_1.__exportStar(__nccwpck_require__(64385), exports); +tslib_1.__exportStar(__nccwpck_require__(4039), exports); +tslib_1.__exportStar(__nccwpck_require__(67926), exports); +tslib_1.__exportStar(__nccwpck_require__(55410), exports); +tslib_1.__exportStar(__nccwpck_require__(98248), exports); +tslib_1.__exportStar(__nccwpck_require__(37358), exports); +tslib_1.__exportStar(__nccwpck_require__(97273), exports); +tslib_1.__exportStar(__nccwpck_require__(46914), exports); +tslib_1.__exportStar(__nccwpck_require__(69902), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 69902: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(57088); +tslib_1.__exportStar(__nccwpck_require__(76319), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 76319: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ConcurrentModificationException = exports.MergeDeveloperIdentitiesResponse = exports.MergeDeveloperIdentitiesInput = exports.LookupDeveloperIdentityResponse = exports.LookupDeveloperIdentityInput = exports.ListTagsForResourceResponse = exports.ListTagsForResourceInput = exports.ListIdentityPoolsResponse = exports.IdentityPoolShortDescription = exports.ListIdentityPoolsInput = exports.ListIdentitiesResponse = exports.ListIdentitiesInput = exports.GetOpenIdTokenForDeveloperIdentityResponse = exports.GetOpenIdTokenForDeveloperIdentityInput = exports.DeveloperUserAlreadyRegisteredException = exports.GetOpenIdTokenResponse = exports.GetOpenIdTokenInput = exports.GetIdentityPoolRolesResponse = exports.RoleMapping = exports.RoleMappingType = exports.RulesConfigurationType = exports.MappingRule = exports.MappingRuleMatchType = exports.GetIdentityPoolRolesInput = exports.GetIdResponse = exports.GetIdInput = exports.InvalidIdentityPoolConfigurationException = exports.GetCredentialsForIdentityResponse = exports.Credentials = exports.GetCredentialsForIdentityInput = exports.ExternalServiceException = exports.DescribeIdentityPoolInput = exports.IdentityDescription = exports.DescribeIdentityInput = exports.ResourceNotFoundException = exports.DeleteIdentityPoolInput = exports.DeleteIdentitiesResponse = exports.UnprocessedIdentityId = exports.ErrorCode = exports.DeleteIdentitiesInput = exports.TooManyRequestsException = exports.ResourceConflictException = exports.NotAuthorizedException = exports.LimitExceededException = exports.InvalidParameterException = exports.InternalErrorException = exports.IdentityPool = exports.CreateIdentityPoolInput = exports.CognitoIdentityProvider = exports.AmbiguousRoleResolutionType = void 0; +exports.UntagResourceResponse = exports.UntagResourceInput = exports.UnlinkIdentityInput = exports.UnlinkDeveloperIdentityInput = exports.TagResourceResponse = exports.TagResourceInput = exports.SetIdentityPoolRolesInput = void 0; +var AmbiguousRoleResolutionType; +(function (AmbiguousRoleResolutionType) { + AmbiguousRoleResolutionType["AUTHENTICATED_ROLE"] = "AuthenticatedRole"; + AmbiguousRoleResolutionType["DENY"] = "Deny"; +})(AmbiguousRoleResolutionType = exports.AmbiguousRoleResolutionType || (exports.AmbiguousRoleResolutionType = {})); +var CognitoIdentityProvider; +(function (CognitoIdentityProvider) { + CognitoIdentityProvider.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CognitoIdentityProvider = exports.CognitoIdentityProvider || (exports.CognitoIdentityProvider = {})); +var CreateIdentityPoolInput; +(function (CreateIdentityPoolInput) { + CreateIdentityPoolInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateIdentityPoolInput = exports.CreateIdentityPoolInput || (exports.CreateIdentityPoolInput = {})); +var IdentityPool; +(function (IdentityPool) { + IdentityPool.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(IdentityPool = exports.IdentityPool || (exports.IdentityPool = {})); +var InternalErrorException; +(function (InternalErrorException) { + InternalErrorException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InternalErrorException = exports.InternalErrorException || (exports.InternalErrorException = {})); +var InvalidParameterException; +(function (InvalidParameterException) { + InvalidParameterException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidParameterException = exports.InvalidParameterException || (exports.InvalidParameterException = {})); +var LimitExceededException; +(function (LimitExceededException) { + LimitExceededException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {})); +var NotAuthorizedException; +(function (NotAuthorizedException) { + NotAuthorizedException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(NotAuthorizedException = exports.NotAuthorizedException || (exports.NotAuthorizedException = {})); +var ResourceConflictException; +(function (ResourceConflictException) { + ResourceConflictException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceConflictException = exports.ResourceConflictException || (exports.ResourceConflictException = {})); +var TooManyRequestsException; +(function (TooManyRequestsException) { + TooManyRequestsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TooManyRequestsException = exports.TooManyRequestsException || (exports.TooManyRequestsException = {})); +var DeleteIdentitiesInput; +(function (DeleteIdentitiesInput) { + DeleteIdentitiesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteIdentitiesInput = exports.DeleteIdentitiesInput || (exports.DeleteIdentitiesInput = {})); +var ErrorCode; +(function (ErrorCode) { + ErrorCode["ACCESS_DENIED"] = "AccessDenied"; + ErrorCode["INTERNAL_SERVER_ERROR"] = "InternalServerError"; +})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); +var UnprocessedIdentityId; +(function (UnprocessedIdentityId) { + UnprocessedIdentityId.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnprocessedIdentityId = exports.UnprocessedIdentityId || (exports.UnprocessedIdentityId = {})); +var DeleteIdentitiesResponse; +(function (DeleteIdentitiesResponse) { + DeleteIdentitiesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteIdentitiesResponse = exports.DeleteIdentitiesResponse || (exports.DeleteIdentitiesResponse = {})); +var DeleteIdentityPoolInput; +(function (DeleteIdentityPoolInput) { + DeleteIdentityPoolInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteIdentityPoolInput = exports.DeleteIdentityPoolInput || (exports.DeleteIdentityPoolInput = {})); +var ResourceNotFoundException; +(function (ResourceNotFoundException) { + ResourceNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceNotFoundException = exports.ResourceNotFoundException || (exports.ResourceNotFoundException = {})); +var DescribeIdentityInput; +(function (DescribeIdentityInput) { + DescribeIdentityInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeIdentityInput = exports.DescribeIdentityInput || (exports.DescribeIdentityInput = {})); +var IdentityDescription; +(function (IdentityDescription) { + IdentityDescription.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(IdentityDescription = exports.IdentityDescription || (exports.IdentityDescription = {})); +var DescribeIdentityPoolInput; +(function (DescribeIdentityPoolInput) { + DescribeIdentityPoolInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeIdentityPoolInput = exports.DescribeIdentityPoolInput || (exports.DescribeIdentityPoolInput = {})); +var ExternalServiceException; +(function (ExternalServiceException) { + ExternalServiceException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ExternalServiceException = exports.ExternalServiceException || (exports.ExternalServiceException = {})); +var GetCredentialsForIdentityInput; +(function (GetCredentialsForIdentityInput) { + GetCredentialsForIdentityInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetCredentialsForIdentityInput = exports.GetCredentialsForIdentityInput || (exports.GetCredentialsForIdentityInput = {})); +var Credentials; +(function (Credentials) { + Credentials.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Credentials = exports.Credentials || (exports.Credentials = {})); +var GetCredentialsForIdentityResponse; +(function (GetCredentialsForIdentityResponse) { + GetCredentialsForIdentityResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetCredentialsForIdentityResponse = exports.GetCredentialsForIdentityResponse || (exports.GetCredentialsForIdentityResponse = {})); +var InvalidIdentityPoolConfigurationException; +(function (InvalidIdentityPoolConfigurationException) { + InvalidIdentityPoolConfigurationException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidIdentityPoolConfigurationException = exports.InvalidIdentityPoolConfigurationException || (exports.InvalidIdentityPoolConfigurationException = {})); +var GetIdInput; +(function (GetIdInput) { + GetIdInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetIdInput = exports.GetIdInput || (exports.GetIdInput = {})); +var GetIdResponse; +(function (GetIdResponse) { + GetIdResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetIdResponse = exports.GetIdResponse || (exports.GetIdResponse = {})); +var GetIdentityPoolRolesInput; +(function (GetIdentityPoolRolesInput) { + GetIdentityPoolRolesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetIdentityPoolRolesInput = exports.GetIdentityPoolRolesInput || (exports.GetIdentityPoolRolesInput = {})); +var MappingRuleMatchType; +(function (MappingRuleMatchType) { + MappingRuleMatchType["CONTAINS"] = "Contains"; + MappingRuleMatchType["EQUALS"] = "Equals"; + MappingRuleMatchType["NOT_EQUAL"] = "NotEqual"; + MappingRuleMatchType["STARTS_WITH"] = "StartsWith"; +})(MappingRuleMatchType = exports.MappingRuleMatchType || (exports.MappingRuleMatchType = {})); +var MappingRule; +(function (MappingRule) { + MappingRule.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MappingRule = exports.MappingRule || (exports.MappingRule = {})); +var RulesConfigurationType; +(function (RulesConfigurationType) { + RulesConfigurationType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RulesConfigurationType = exports.RulesConfigurationType || (exports.RulesConfigurationType = {})); +var RoleMappingType; +(function (RoleMappingType) { + RoleMappingType["RULES"] = "Rules"; + RoleMappingType["TOKEN"] = "Token"; +})(RoleMappingType = exports.RoleMappingType || (exports.RoleMappingType = {})); +var RoleMapping; +(function (RoleMapping) { + RoleMapping.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RoleMapping = exports.RoleMapping || (exports.RoleMapping = {})); +var GetIdentityPoolRolesResponse; +(function (GetIdentityPoolRolesResponse) { + GetIdentityPoolRolesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetIdentityPoolRolesResponse = exports.GetIdentityPoolRolesResponse || (exports.GetIdentityPoolRolesResponse = {})); +var GetOpenIdTokenInput; +(function (GetOpenIdTokenInput) { + GetOpenIdTokenInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetOpenIdTokenInput = exports.GetOpenIdTokenInput || (exports.GetOpenIdTokenInput = {})); +var GetOpenIdTokenResponse; +(function (GetOpenIdTokenResponse) { + GetOpenIdTokenResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetOpenIdTokenResponse = exports.GetOpenIdTokenResponse || (exports.GetOpenIdTokenResponse = {})); +var DeveloperUserAlreadyRegisteredException; +(function (DeveloperUserAlreadyRegisteredException) { + DeveloperUserAlreadyRegisteredException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeveloperUserAlreadyRegisteredException = exports.DeveloperUserAlreadyRegisteredException || (exports.DeveloperUserAlreadyRegisteredException = {})); +var GetOpenIdTokenForDeveloperIdentityInput; +(function (GetOpenIdTokenForDeveloperIdentityInput) { + GetOpenIdTokenForDeveloperIdentityInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetOpenIdTokenForDeveloperIdentityInput = exports.GetOpenIdTokenForDeveloperIdentityInput || (exports.GetOpenIdTokenForDeveloperIdentityInput = {})); +var GetOpenIdTokenForDeveloperIdentityResponse; +(function (GetOpenIdTokenForDeveloperIdentityResponse) { + GetOpenIdTokenForDeveloperIdentityResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetOpenIdTokenForDeveloperIdentityResponse = exports.GetOpenIdTokenForDeveloperIdentityResponse || (exports.GetOpenIdTokenForDeveloperIdentityResponse = {})); +var ListIdentitiesInput; +(function (ListIdentitiesInput) { + ListIdentitiesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListIdentitiesInput = exports.ListIdentitiesInput || (exports.ListIdentitiesInput = {})); +var ListIdentitiesResponse; +(function (ListIdentitiesResponse) { + ListIdentitiesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListIdentitiesResponse = exports.ListIdentitiesResponse || (exports.ListIdentitiesResponse = {})); +var ListIdentityPoolsInput; +(function (ListIdentityPoolsInput) { + ListIdentityPoolsInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListIdentityPoolsInput = exports.ListIdentityPoolsInput || (exports.ListIdentityPoolsInput = {})); +var IdentityPoolShortDescription; +(function (IdentityPoolShortDescription) { + IdentityPoolShortDescription.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(IdentityPoolShortDescription = exports.IdentityPoolShortDescription || (exports.IdentityPoolShortDescription = {})); +var ListIdentityPoolsResponse; +(function (ListIdentityPoolsResponse) { + ListIdentityPoolsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListIdentityPoolsResponse = exports.ListIdentityPoolsResponse || (exports.ListIdentityPoolsResponse = {})); +var ListTagsForResourceInput; +(function (ListTagsForResourceInput) { + ListTagsForResourceInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTagsForResourceInput = exports.ListTagsForResourceInput || (exports.ListTagsForResourceInput = {})); +var ListTagsForResourceResponse; +(function (ListTagsForResourceResponse) { + ListTagsForResourceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTagsForResourceResponse = exports.ListTagsForResourceResponse || (exports.ListTagsForResourceResponse = {})); +var LookupDeveloperIdentityInput; +(function (LookupDeveloperIdentityInput) { + LookupDeveloperIdentityInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LookupDeveloperIdentityInput = exports.LookupDeveloperIdentityInput || (exports.LookupDeveloperIdentityInput = {})); +var LookupDeveloperIdentityResponse; +(function (LookupDeveloperIdentityResponse) { + LookupDeveloperIdentityResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LookupDeveloperIdentityResponse = exports.LookupDeveloperIdentityResponse || (exports.LookupDeveloperIdentityResponse = {})); +var MergeDeveloperIdentitiesInput; +(function (MergeDeveloperIdentitiesInput) { + MergeDeveloperIdentitiesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MergeDeveloperIdentitiesInput = exports.MergeDeveloperIdentitiesInput || (exports.MergeDeveloperIdentitiesInput = {})); +var MergeDeveloperIdentitiesResponse; +(function (MergeDeveloperIdentitiesResponse) { + MergeDeveloperIdentitiesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MergeDeveloperIdentitiesResponse = exports.MergeDeveloperIdentitiesResponse || (exports.MergeDeveloperIdentitiesResponse = {})); +var ConcurrentModificationException; +(function (ConcurrentModificationException) { + ConcurrentModificationException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ConcurrentModificationException = exports.ConcurrentModificationException || (exports.ConcurrentModificationException = {})); +var SetIdentityPoolRolesInput; +(function (SetIdentityPoolRolesInput) { + SetIdentityPoolRolesInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetIdentityPoolRolesInput = exports.SetIdentityPoolRolesInput || (exports.SetIdentityPoolRolesInput = {})); +var TagResourceInput; +(function (TagResourceInput) { + TagResourceInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TagResourceInput = exports.TagResourceInput || (exports.TagResourceInput = {})); +var TagResourceResponse; +(function (TagResourceResponse) { + TagResourceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TagResourceResponse = exports.TagResourceResponse || (exports.TagResourceResponse = {})); +var UnlinkDeveloperIdentityInput; +(function (UnlinkDeveloperIdentityInput) { + UnlinkDeveloperIdentityInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnlinkDeveloperIdentityInput = exports.UnlinkDeveloperIdentityInput || (exports.UnlinkDeveloperIdentityInput = {})); +var UnlinkIdentityInput; +(function (UnlinkIdentityInput) { + UnlinkIdentityInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnlinkIdentityInput = exports.UnlinkIdentityInput || (exports.UnlinkIdentityInput = {})); +var UntagResourceInput; +(function (UntagResourceInput) { + UntagResourceInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UntagResourceInput = exports.UntagResourceInput || (exports.UntagResourceInput = {})); +var UntagResourceResponse; +(function (UntagResourceResponse) { + UntagResourceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UntagResourceResponse = exports.UntagResourceResponse || (exports.UntagResourceResponse = {})); +//# sourceMappingURL=models_0.js.map + +/***/ }), + +/***/ 46914: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=Interfaces.js.map + +/***/ }), + +/***/ 26964: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListIdentityPools = void 0; +const CognitoIdentity_1 = __nccwpck_require__(67301); +const CognitoIdentityClient_1 = __nccwpck_require__(72614); +const ListIdentityPoolsCommand_1 = __nccwpck_require__(53836); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListIdentityPoolsCommand_1.ListIdentityPoolsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listIdentityPools(input, ...args); +}; +async function* paginateListIdentityPools(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CognitoIdentity_1.CognitoIdentity) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof CognitoIdentityClient_1.CognitoIdentityClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected CognitoIdentity | CognitoIdentityClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListIdentityPools = paginateListIdentityPools; +//# sourceMappingURL=ListIdentityPoolsPaginator.js.map + +/***/ }), + +/***/ 69579: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deserializeAws_json1_1UpdateIdentityPoolCommand = exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1UnlinkIdentityCommand = exports.deserializeAws_json1_1UnlinkDeveloperIdentityCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1SetIdentityPoolRolesCommand = exports.deserializeAws_json1_1MergeDeveloperIdentitiesCommand = exports.deserializeAws_json1_1LookupDeveloperIdentityCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1ListIdentityPoolsCommand = exports.deserializeAws_json1_1ListIdentitiesCommand = exports.deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand = exports.deserializeAws_json1_1GetOpenIdTokenCommand = exports.deserializeAws_json1_1GetIdentityPoolRolesCommand = exports.deserializeAws_json1_1GetIdCommand = exports.deserializeAws_json1_1GetCredentialsForIdentityCommand = exports.deserializeAws_json1_1DescribeIdentityPoolCommand = exports.deserializeAws_json1_1DescribeIdentityCommand = exports.deserializeAws_json1_1DeleteIdentityPoolCommand = exports.deserializeAws_json1_1DeleteIdentitiesCommand = exports.deserializeAws_json1_1CreateIdentityPoolCommand = exports.serializeAws_json1_1UpdateIdentityPoolCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1UnlinkIdentityCommand = exports.serializeAws_json1_1UnlinkDeveloperIdentityCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1SetIdentityPoolRolesCommand = exports.serializeAws_json1_1MergeDeveloperIdentitiesCommand = exports.serializeAws_json1_1LookupDeveloperIdentityCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1ListIdentityPoolsCommand = exports.serializeAws_json1_1ListIdentitiesCommand = exports.serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand = exports.serializeAws_json1_1GetOpenIdTokenCommand = exports.serializeAws_json1_1GetIdentityPoolRolesCommand = exports.serializeAws_json1_1GetIdCommand = exports.serializeAws_json1_1GetCredentialsForIdentityCommand = exports.serializeAws_json1_1DescribeIdentityPoolCommand = exports.serializeAws_json1_1DescribeIdentityCommand = exports.serializeAws_json1_1DeleteIdentityPoolCommand = exports.serializeAws_json1_1DeleteIdentitiesCommand = exports.serializeAws_json1_1CreateIdentityPoolCommand = void 0; +const protocol_http_1 = __nccwpck_require__(67498); +const serializeAws_json1_1CreateIdentityPoolCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.CreateIdentityPool", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreateIdentityPoolInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreateIdentityPoolCommand = serializeAws_json1_1CreateIdentityPoolCommand; +const serializeAws_json1_1DeleteIdentitiesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.DeleteIdentities", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteIdentitiesInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteIdentitiesCommand = serializeAws_json1_1DeleteIdentitiesCommand; +const serializeAws_json1_1DeleteIdentityPoolCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.DeleteIdentityPool", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteIdentityPoolInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteIdentityPoolCommand = serializeAws_json1_1DeleteIdentityPoolCommand; +const serializeAws_json1_1DescribeIdentityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.DescribeIdentity", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeIdentityInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeIdentityCommand = serializeAws_json1_1DescribeIdentityCommand; +const serializeAws_json1_1DescribeIdentityPoolCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.DescribeIdentityPool", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeIdentityPoolInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeIdentityPoolCommand = serializeAws_json1_1DescribeIdentityPoolCommand; +const serializeAws_json1_1GetCredentialsForIdentityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.GetCredentialsForIdentity", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetCredentialsForIdentityInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetCredentialsForIdentityCommand = serializeAws_json1_1GetCredentialsForIdentityCommand; +const serializeAws_json1_1GetIdCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.GetId", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetIdInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetIdCommand = serializeAws_json1_1GetIdCommand; +const serializeAws_json1_1GetIdentityPoolRolesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.GetIdentityPoolRoles", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetIdentityPoolRolesInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetIdentityPoolRolesCommand = serializeAws_json1_1GetIdentityPoolRolesCommand; +const serializeAws_json1_1GetOpenIdTokenCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.GetOpenIdToken", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetOpenIdTokenInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetOpenIdTokenCommand = serializeAws_json1_1GetOpenIdTokenCommand; +const serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.GetOpenIdTokenForDeveloperIdentity", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand = serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand; +const serializeAws_json1_1ListIdentitiesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.ListIdentities", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListIdentitiesInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListIdentitiesCommand = serializeAws_json1_1ListIdentitiesCommand; +const serializeAws_json1_1ListIdentityPoolsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.ListIdentityPools", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListIdentityPoolsInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListIdentityPoolsCommand = serializeAws_json1_1ListIdentityPoolsCommand; +const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.ListTagsForResource", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListTagsForResourceInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListTagsForResourceCommand = serializeAws_json1_1ListTagsForResourceCommand; +const serializeAws_json1_1LookupDeveloperIdentityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.LookupDeveloperIdentity", + }; + let body; + body = JSON.stringify(serializeAws_json1_1LookupDeveloperIdentityInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1LookupDeveloperIdentityCommand = serializeAws_json1_1LookupDeveloperIdentityCommand; +const serializeAws_json1_1MergeDeveloperIdentitiesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.MergeDeveloperIdentities", + }; + let body; + body = JSON.stringify(serializeAws_json1_1MergeDeveloperIdentitiesInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1MergeDeveloperIdentitiesCommand = serializeAws_json1_1MergeDeveloperIdentitiesCommand; +const serializeAws_json1_1SetIdentityPoolRolesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.SetIdentityPoolRoles", + }; + let body; + body = JSON.stringify(serializeAws_json1_1SetIdentityPoolRolesInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1SetIdentityPoolRolesCommand = serializeAws_json1_1SetIdentityPoolRolesCommand; +const serializeAws_json1_1TagResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.TagResource", + }; + let body; + body = JSON.stringify(serializeAws_json1_1TagResourceInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1TagResourceCommand = serializeAws_json1_1TagResourceCommand; +const serializeAws_json1_1UnlinkDeveloperIdentityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.UnlinkDeveloperIdentity", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UnlinkDeveloperIdentityInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UnlinkDeveloperIdentityCommand = serializeAws_json1_1UnlinkDeveloperIdentityCommand; +const serializeAws_json1_1UnlinkIdentityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.UnlinkIdentity", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UnlinkIdentityInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UnlinkIdentityCommand = serializeAws_json1_1UnlinkIdentityCommand; +const serializeAws_json1_1UntagResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.UntagResource", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UntagResourceInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UntagResourceCommand = serializeAws_json1_1UntagResourceCommand; +const serializeAws_json1_1UpdateIdentityPoolCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSCognitoIdentityService.UpdateIdentityPool", + }; + let body; + body = JSON.stringify(serializeAws_json1_1IdentityPool(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UpdateIdentityPoolCommand = serializeAws_json1_1UpdateIdentityPoolCommand; +const deserializeAws_json1_1CreateIdentityPoolCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateIdentityPoolCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1IdentityPool(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreateIdentityPoolCommand = deserializeAws_json1_1CreateIdentityPoolCommand; +const deserializeAws_json1_1CreateIdentityPoolCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentity#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DeleteIdentitiesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteIdentitiesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DeleteIdentitiesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteIdentitiesCommand = deserializeAws_json1_1DeleteIdentitiesCommand; +const deserializeAws_json1_1DeleteIdentitiesCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DeleteIdentityPoolCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteIdentityPoolCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteIdentityPoolCommand = deserializeAws_json1_1DeleteIdentityPoolCommand; +const deserializeAws_json1_1DeleteIdentityPoolCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DescribeIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeIdentityCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1IdentityDescription(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeIdentityCommand = deserializeAws_json1_1DescribeIdentityCommand; +const deserializeAws_json1_1DescribeIdentityCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1DescribeIdentityPoolCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeIdentityPoolCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1IdentityPool(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeIdentityPoolCommand = deserializeAws_json1_1DescribeIdentityPoolCommand; +const deserializeAws_json1_1DescribeIdentityPoolCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1GetCredentialsForIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetCredentialsForIdentityCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetCredentialsForIdentityResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetCredentialsForIdentityCommand = deserializeAws_json1_1GetCredentialsForIdentityCommand; +const deserializeAws_json1_1GetCredentialsForIdentityCommandError = 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 "ExternalServiceException": + case "com.amazonaws.cognitoidentity#ExternalServiceException": + response = { + ...(await deserializeAws_json1_1ExternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidIdentityPoolConfigurationException": + case "com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException": + response = { + ...(await deserializeAws_json1_1InvalidIdentityPoolConfigurationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1GetIdCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetIdCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetIdResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetIdCommand = deserializeAws_json1_1GetIdCommand; +const deserializeAws_json1_1GetIdCommandError = 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 "ExternalServiceException": + case "com.amazonaws.cognitoidentity#ExternalServiceException": + response = { + ...(await deserializeAws_json1_1ExternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentity#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1GetIdentityPoolRolesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetIdentityPoolRolesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetIdentityPoolRolesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetIdentityPoolRolesCommand = deserializeAws_json1_1GetIdentityPoolRolesCommand; +const deserializeAws_json1_1GetIdentityPoolRolesCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1GetOpenIdTokenCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetOpenIdTokenCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetOpenIdTokenResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetOpenIdTokenCommand = deserializeAws_json1_1GetOpenIdTokenCommand; +const deserializeAws_json1_1GetOpenIdTokenCommandError = 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 "ExternalServiceException": + case "com.amazonaws.cognitoidentity#ExternalServiceException": + response = { + ...(await deserializeAws_json1_1ExternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1GetOpenIdTokenForDeveloperIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand = deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand; +const deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommandError = 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 "DeveloperUserAlreadyRegisteredException": + case "com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException": + response = { + ...(await deserializeAws_json1_1DeveloperUserAlreadyRegisteredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ListIdentitiesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListIdentitiesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListIdentitiesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListIdentitiesCommand = deserializeAws_json1_1ListIdentitiesCommand; +const deserializeAws_json1_1ListIdentitiesCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ListIdentityPoolsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListIdentityPoolsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListIdentityPoolsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListIdentityPoolsCommand = deserializeAws_json1_1ListIdentityPoolsCommand; +const deserializeAws_json1_1ListIdentityPoolsCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1LookupDeveloperIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1LookupDeveloperIdentityCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1LookupDeveloperIdentityResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1LookupDeveloperIdentityCommand = deserializeAws_json1_1LookupDeveloperIdentityCommand; +const deserializeAws_json1_1LookupDeveloperIdentityCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1MergeDeveloperIdentitiesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1MergeDeveloperIdentitiesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1MergeDeveloperIdentitiesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1MergeDeveloperIdentitiesCommand = deserializeAws_json1_1MergeDeveloperIdentitiesCommand; +const deserializeAws_json1_1MergeDeveloperIdentitiesCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1SetIdentityPoolRolesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1SetIdentityPoolRolesCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1SetIdentityPoolRolesCommand = deserializeAws_json1_1SetIdentityPoolRolesCommand; +const deserializeAws_json1_1SetIdentityPoolRolesCommandError = 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 "ConcurrentModificationException": + case "com.amazonaws.cognitoidentity#ConcurrentModificationException": + response = { + ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1UnlinkDeveloperIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UnlinkDeveloperIdentityCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UnlinkDeveloperIdentityCommand = deserializeAws_json1_1UnlinkDeveloperIdentityCommand; +const deserializeAws_json1_1UnlinkDeveloperIdentityCommandError = 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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1UnlinkIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UnlinkIdentityCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UnlinkIdentityCommand = deserializeAws_json1_1UnlinkIdentityCommand; +const deserializeAws_json1_1UnlinkIdentityCommandError = 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 "ExternalServiceException": + case "com.amazonaws.cognitoidentity#ExternalServiceException": + response = { + ...(await deserializeAws_json1_1ExternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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 "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1UpdateIdentityPoolCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateIdentityPoolCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1IdentityPool(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UpdateIdentityPoolCommand = deserializeAws_json1_1UpdateIdentityPoolCommand; +const deserializeAws_json1_1UpdateIdentityPoolCommandError = 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 "ConcurrentModificationException": + case "com.amazonaws.cognitoidentity#ConcurrentModificationException": + response = { + ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.cognitoidentity#InternalErrorException": + response = { + ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.cognitoidentity#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.cognitoidentity#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotAuthorizedException": + case "com.amazonaws.cognitoidentity#NotAuthorizedException": + response = { + ...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceConflictException": + case "com.amazonaws.cognitoidentity#ResourceConflictException": + response = { + ...(await deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.cognitoidentity#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.cognitoidentity#TooManyRequestsException": + response = { + ...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(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_1ConcurrentModificationExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ConcurrentModificationException(body, context); + const contents = { + name: "ConcurrentModificationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1DeveloperUserAlreadyRegisteredExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1DeveloperUserAlreadyRegisteredException(body, context); + const contents = { + name: "DeveloperUserAlreadyRegisteredException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ExternalServiceExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ExternalServiceException(body, context); + const contents = { + name: "ExternalServiceException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InternalErrorExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InternalErrorException(body, context); + const contents = { + name: "InternalErrorException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidIdentityPoolConfigurationExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidIdentityPoolConfigurationException(body, context); + const contents = { + name: "InvalidIdentityPoolConfigurationException", + $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_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_1NotAuthorizedExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1NotAuthorizedException(body, context); + const contents = { + name: "NotAuthorizedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ResourceConflictExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ResourceConflictException(body, context); + const contents = { + name: "ResourceConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context); + const contents = { + name: "ResourceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1TooManyRequestsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1TooManyRequestsException(body, context); + const contents = { + name: "TooManyRequestsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const serializeAws_json1_1CognitoIdentityProvider = (input, context) => { + return { + ...(input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId }), + ...(input.ProviderName !== undefined && input.ProviderName !== null && { ProviderName: input.ProviderName }), + ...(input.ServerSideTokenCheck !== undefined && + input.ServerSideTokenCheck !== null && { ServerSideTokenCheck: input.ServerSideTokenCheck }), + }; +}; +const serializeAws_json1_1CognitoIdentityProviderList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1CognitoIdentityProvider(entry, context); + }); +}; +const serializeAws_json1_1CreateIdentityPoolInput = (input, context) => { + return { + ...(input.AllowClassicFlow !== undefined && + input.AllowClassicFlow !== null && { AllowClassicFlow: input.AllowClassicFlow }), + ...(input.AllowUnauthenticatedIdentities !== undefined && + input.AllowUnauthenticatedIdentities !== null && { + AllowUnauthenticatedIdentities: input.AllowUnauthenticatedIdentities, + }), + ...(input.CognitoIdentityProviders !== undefined && + input.CognitoIdentityProviders !== null && { + CognitoIdentityProviders: serializeAws_json1_1CognitoIdentityProviderList(input.CognitoIdentityProviders, context), + }), + ...(input.DeveloperProviderName !== undefined && + input.DeveloperProviderName !== null && { DeveloperProviderName: input.DeveloperProviderName }), + ...(input.IdentityPoolName !== undefined && + input.IdentityPoolName !== null && { IdentityPoolName: input.IdentityPoolName }), + ...(input.IdentityPoolTags !== undefined && + input.IdentityPoolTags !== null && { + IdentityPoolTags: serializeAws_json1_1IdentityPoolTagsType(input.IdentityPoolTags, context), + }), + ...(input.OpenIdConnectProviderARNs !== undefined && + input.OpenIdConnectProviderARNs !== null && { + OpenIdConnectProviderARNs: serializeAws_json1_1OIDCProviderList(input.OpenIdConnectProviderARNs, context), + }), + ...(input.SamlProviderARNs !== undefined && + input.SamlProviderARNs !== null && { + SamlProviderARNs: serializeAws_json1_1SAMLProviderList(input.SamlProviderARNs, context), + }), + ...(input.SupportedLoginProviders !== undefined && + input.SupportedLoginProviders !== null && { + SupportedLoginProviders: serializeAws_json1_1IdentityProviders(input.SupportedLoginProviders, context), + }), + }; +}; +const serializeAws_json1_1DeleteIdentitiesInput = (input, context) => { + return { + ...(input.IdentityIdsToDelete !== undefined && + input.IdentityIdsToDelete !== null && { + IdentityIdsToDelete: serializeAws_json1_1IdentityIdList(input.IdentityIdsToDelete, context), + }), + }; +}; +const serializeAws_json1_1DeleteIdentityPoolInput = (input, context) => { + return { + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + }; +}; +const serializeAws_json1_1DescribeIdentityInput = (input, context) => { + return { + ...(input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId }), + }; +}; +const serializeAws_json1_1DescribeIdentityPoolInput = (input, context) => { + return { + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + }; +}; +const serializeAws_json1_1GetCredentialsForIdentityInput = (input, context) => { + return { + ...(input.CustomRoleArn !== undefined && input.CustomRoleArn !== null && { CustomRoleArn: input.CustomRoleArn }), + ...(input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId }), + ...(input.Logins !== undefined && + input.Logins !== null && { Logins: serializeAws_json1_1LoginsMap(input.Logins, context) }), + }; +}; +const serializeAws_json1_1GetIdentityPoolRolesInput = (input, context) => { + return { + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + }; +}; +const serializeAws_json1_1GetIdInput = (input, context) => { + return { + ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }), + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + ...(input.Logins !== undefined && + input.Logins !== null && { Logins: serializeAws_json1_1LoginsMap(input.Logins, context) }), + }; +}; +const serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityInput = (input, context) => { + return { + ...(input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId }), + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + ...(input.Logins !== undefined && + input.Logins !== null && { Logins: serializeAws_json1_1LoginsMap(input.Logins, context) }), + ...(input.TokenDuration !== undefined && input.TokenDuration !== null && { TokenDuration: input.TokenDuration }), + }; +}; +const serializeAws_json1_1GetOpenIdTokenInput = (input, context) => { + return { + ...(input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId }), + ...(input.Logins !== undefined && + input.Logins !== null && { Logins: serializeAws_json1_1LoginsMap(input.Logins, context) }), + }; +}; +const serializeAws_json1_1IdentityIdList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1IdentityPool = (input, context) => { + return { + ...(input.AllowClassicFlow !== undefined && + input.AllowClassicFlow !== null && { AllowClassicFlow: input.AllowClassicFlow }), + ...(input.AllowUnauthenticatedIdentities !== undefined && + input.AllowUnauthenticatedIdentities !== null && { + AllowUnauthenticatedIdentities: input.AllowUnauthenticatedIdentities, + }), + ...(input.CognitoIdentityProviders !== undefined && + input.CognitoIdentityProviders !== null && { + CognitoIdentityProviders: serializeAws_json1_1CognitoIdentityProviderList(input.CognitoIdentityProviders, context), + }), + ...(input.DeveloperProviderName !== undefined && + input.DeveloperProviderName !== null && { DeveloperProviderName: input.DeveloperProviderName }), + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + ...(input.IdentityPoolName !== undefined && + input.IdentityPoolName !== null && { IdentityPoolName: input.IdentityPoolName }), + ...(input.IdentityPoolTags !== undefined && + input.IdentityPoolTags !== null && { + IdentityPoolTags: serializeAws_json1_1IdentityPoolTagsType(input.IdentityPoolTags, context), + }), + ...(input.OpenIdConnectProviderARNs !== undefined && + input.OpenIdConnectProviderARNs !== null && { + OpenIdConnectProviderARNs: serializeAws_json1_1OIDCProviderList(input.OpenIdConnectProviderARNs, context), + }), + ...(input.SamlProviderARNs !== undefined && + input.SamlProviderARNs !== null && { + SamlProviderARNs: serializeAws_json1_1SAMLProviderList(input.SamlProviderARNs, context), + }), + ...(input.SupportedLoginProviders !== undefined && + input.SupportedLoginProviders !== null && { + SupportedLoginProviders: serializeAws_json1_1IdentityProviders(input.SupportedLoginProviders, context), + }), + }; +}; +const serializeAws_json1_1IdentityPoolTagsListType = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1IdentityPoolTagsType = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_json1_1IdentityProviders = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_json1_1ListIdentitiesInput = (input, context) => { + return { + ...(input.HideDisabled !== undefined && input.HideDisabled !== null && { HideDisabled: input.HideDisabled }), + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + }; +}; +const serializeAws_json1_1ListIdentityPoolsInput = (input, context) => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + }; +}; +const serializeAws_json1_1ListTagsForResourceInput = (input, context) => { + return { + ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }), + }; +}; +const serializeAws_json1_1LoginsList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1LoginsMap = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_json1_1LookupDeveloperIdentityInput = (input, context) => { + return { + ...(input.DeveloperUserIdentifier !== undefined && + input.DeveloperUserIdentifier !== null && { DeveloperUserIdentifier: input.DeveloperUserIdentifier }), + ...(input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId }), + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + }; +}; +const serializeAws_json1_1MappingRule = (input, context) => { + return { + ...(input.Claim !== undefined && input.Claim !== null && { Claim: input.Claim }), + ...(input.MatchType !== undefined && input.MatchType !== null && { MatchType: input.MatchType }), + ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }), + ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }), + }; +}; +const serializeAws_json1_1MappingRulesList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1MappingRule(entry, context); + }); +}; +const serializeAws_json1_1MergeDeveloperIdentitiesInput = (input, context) => { + return { + ...(input.DestinationUserIdentifier !== undefined && + input.DestinationUserIdentifier !== null && { DestinationUserIdentifier: input.DestinationUserIdentifier }), + ...(input.DeveloperProviderName !== undefined && + input.DeveloperProviderName !== null && { DeveloperProviderName: input.DeveloperProviderName }), + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + ...(input.SourceUserIdentifier !== undefined && + input.SourceUserIdentifier !== null && { SourceUserIdentifier: input.SourceUserIdentifier }), + }; +}; +const serializeAws_json1_1OIDCProviderList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1RoleMapping = (input, context) => { + return { + ...(input.AmbiguousRoleResolution !== undefined && + input.AmbiguousRoleResolution !== null && { AmbiguousRoleResolution: input.AmbiguousRoleResolution }), + ...(input.RulesConfiguration !== undefined && + input.RulesConfiguration !== null && { + RulesConfiguration: serializeAws_json1_1RulesConfigurationType(input.RulesConfiguration, context), + }), + ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }), + }; +}; +const serializeAws_json1_1RoleMappingMap = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: serializeAws_json1_1RoleMapping(value, context), + }; + }, {}); +}; +const serializeAws_json1_1RolesMap = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_json1_1RulesConfigurationType = (input, context) => { + return { + ...(input.Rules !== undefined && + input.Rules !== null && { Rules: serializeAws_json1_1MappingRulesList(input.Rules, context) }), + }; +}; +const serializeAws_json1_1SAMLProviderList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1SetIdentityPoolRolesInput = (input, context) => { + return { + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + ...(input.RoleMappings !== undefined && + input.RoleMappings !== null && { RoleMappings: serializeAws_json1_1RoleMappingMap(input.RoleMappings, context) }), + ...(input.Roles !== undefined && + input.Roles !== null && { Roles: serializeAws_json1_1RolesMap(input.Roles, context) }), + }; +}; +const serializeAws_json1_1TagResourceInput = (input, context) => { + return { + ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }), + ...(input.Tags !== undefined && + input.Tags !== null && { Tags: serializeAws_json1_1IdentityPoolTagsType(input.Tags, context) }), + }; +}; +const serializeAws_json1_1UnlinkDeveloperIdentityInput = (input, context) => { + return { + ...(input.DeveloperProviderName !== undefined && + input.DeveloperProviderName !== null && { DeveloperProviderName: input.DeveloperProviderName }), + ...(input.DeveloperUserIdentifier !== undefined && + input.DeveloperUserIdentifier !== null && { DeveloperUserIdentifier: input.DeveloperUserIdentifier }), + ...(input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId }), + ...(input.IdentityPoolId !== undefined && + input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }), + }; +}; +const serializeAws_json1_1UnlinkIdentityInput = (input, context) => { + return { + ...(input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId }), + ...(input.Logins !== undefined && + input.Logins !== null && { Logins: serializeAws_json1_1LoginsMap(input.Logins, context) }), + ...(input.LoginsToRemove !== undefined && + input.LoginsToRemove !== null && { + LoginsToRemove: serializeAws_json1_1LoginsList(input.LoginsToRemove, context), + }), + }; +}; +const serializeAws_json1_1UntagResourceInput = (input, context) => { + return { + ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }), + ...(input.TagKeys !== undefined && + input.TagKeys !== null && { TagKeys: serializeAws_json1_1IdentityPoolTagsListType(input.TagKeys, context) }), + }; +}; +const deserializeAws_json1_1CognitoIdentityProvider = (output, context) => { + return { + ClientId: output.ClientId !== undefined && output.ClientId !== null ? output.ClientId : undefined, + ProviderName: output.ProviderName !== undefined && output.ProviderName !== null ? output.ProviderName : undefined, + ServerSideTokenCheck: output.ServerSideTokenCheck !== undefined && output.ServerSideTokenCheck !== null + ? output.ServerSideTokenCheck + : undefined, + }; +}; +const deserializeAws_json1_1CognitoIdentityProviderList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1CognitoIdentityProvider(entry, context); + }); +}; +const deserializeAws_json1_1ConcurrentModificationException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1Credentials = (output, context) => { + return { + AccessKeyId: output.AccessKeyId !== undefined && output.AccessKeyId !== null ? output.AccessKeyId : undefined, + Expiration: output.Expiration !== undefined && output.Expiration !== null + ? new Date(Math.round(output.Expiration * 1000)) + : undefined, + SecretKey: output.SecretKey !== undefined && output.SecretKey !== null ? output.SecretKey : undefined, + SessionToken: output.SessionToken !== undefined && output.SessionToken !== null ? output.SessionToken : undefined, + }; +}; +const deserializeAws_json1_1DeleteIdentitiesResponse = (output, context) => { + return { + UnprocessedIdentityIds: output.UnprocessedIdentityIds !== undefined && output.UnprocessedIdentityIds !== null + ? deserializeAws_json1_1UnprocessedIdentityIdList(output.UnprocessedIdentityIds, context) + : undefined, + }; +}; +const deserializeAws_json1_1DeveloperUserAlreadyRegisteredException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1DeveloperUserIdentifierList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1ExternalServiceException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1GetCredentialsForIdentityResponse = (output, context) => { + return { + Credentials: output.Credentials !== undefined && output.Credentials !== null + ? deserializeAws_json1_1Credentials(output.Credentials, context) + : undefined, + IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined, + }; +}; +const deserializeAws_json1_1GetIdentityPoolRolesResponse = (output, context) => { + return { + IdentityPoolId: output.IdentityPoolId !== undefined && output.IdentityPoolId !== null ? output.IdentityPoolId : undefined, + RoleMappings: output.RoleMappings !== undefined && output.RoleMappings !== null + ? deserializeAws_json1_1RoleMappingMap(output.RoleMappings, context) + : undefined, + Roles: output.Roles !== undefined && output.Roles !== null + ? deserializeAws_json1_1RolesMap(output.Roles, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetIdResponse = (output, context) => { + return { + IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined, + }; +}; +const deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityResponse = (output, context) => { + return { + IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined, + Token: output.Token !== undefined && output.Token !== null ? output.Token : undefined, + }; +}; +const deserializeAws_json1_1GetOpenIdTokenResponse = (output, context) => { + return { + IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined, + Token: output.Token !== undefined && output.Token !== null ? output.Token : undefined, + }; +}; +const deserializeAws_json1_1IdentitiesList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1IdentityDescription(entry, context); + }); +}; +const deserializeAws_json1_1IdentityDescription = (output, context) => { + return { + CreationDate: output.CreationDate !== undefined && output.CreationDate !== null + ? new Date(Math.round(output.CreationDate * 1000)) + : undefined, + IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined, + LastModifiedDate: output.LastModifiedDate !== undefined && output.LastModifiedDate !== null + ? new Date(Math.round(output.LastModifiedDate * 1000)) + : undefined, + Logins: output.Logins !== undefined && output.Logins !== null + ? deserializeAws_json1_1LoginsList(output.Logins, context) + : undefined, + }; +}; +const deserializeAws_json1_1IdentityPool = (output, context) => { + return { + AllowClassicFlow: output.AllowClassicFlow !== undefined && output.AllowClassicFlow !== null ? output.AllowClassicFlow : undefined, + AllowUnauthenticatedIdentities: output.AllowUnauthenticatedIdentities !== undefined && output.AllowUnauthenticatedIdentities !== null + ? output.AllowUnauthenticatedIdentities + : undefined, + CognitoIdentityProviders: output.CognitoIdentityProviders !== undefined && output.CognitoIdentityProviders !== null + ? deserializeAws_json1_1CognitoIdentityProviderList(output.CognitoIdentityProviders, context) + : undefined, + DeveloperProviderName: output.DeveloperProviderName !== undefined && output.DeveloperProviderName !== null + ? output.DeveloperProviderName + : undefined, + IdentityPoolId: output.IdentityPoolId !== undefined && output.IdentityPoolId !== null ? output.IdentityPoolId : undefined, + IdentityPoolName: output.IdentityPoolName !== undefined && output.IdentityPoolName !== null ? output.IdentityPoolName : undefined, + IdentityPoolTags: output.IdentityPoolTags !== undefined && output.IdentityPoolTags !== null + ? deserializeAws_json1_1IdentityPoolTagsType(output.IdentityPoolTags, context) + : undefined, + OpenIdConnectProviderARNs: output.OpenIdConnectProviderARNs !== undefined && output.OpenIdConnectProviderARNs !== null + ? deserializeAws_json1_1OIDCProviderList(output.OpenIdConnectProviderARNs, context) + : undefined, + SamlProviderARNs: output.SamlProviderARNs !== undefined && output.SamlProviderARNs !== null + ? deserializeAws_json1_1SAMLProviderList(output.SamlProviderARNs, context) + : undefined, + SupportedLoginProviders: output.SupportedLoginProviders !== undefined && output.SupportedLoginProviders !== null + ? deserializeAws_json1_1IdentityProviders(output.SupportedLoginProviders, context) + : undefined, + }; +}; +const deserializeAws_json1_1IdentityPoolShortDescription = (output, context) => { + return { + IdentityPoolId: output.IdentityPoolId !== undefined && output.IdentityPoolId !== null ? output.IdentityPoolId : undefined, + IdentityPoolName: output.IdentityPoolName !== undefined && output.IdentityPoolName !== null ? output.IdentityPoolName : undefined, + }; +}; +const deserializeAws_json1_1IdentityPoolsList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1IdentityPoolShortDescription(entry, context); + }); +}; +const deserializeAws_json1_1IdentityPoolTagsType = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_json1_1IdentityProviders = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_json1_1InternalErrorException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1InvalidIdentityPoolConfigurationException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1InvalidParameterException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1LimitExceededException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1ListIdentitiesResponse = (output, context) => { + return { + Identities: output.Identities !== undefined && output.Identities !== null + ? deserializeAws_json1_1IdentitiesList(output.Identities, context) + : undefined, + IdentityPoolId: output.IdentityPoolId !== undefined && output.IdentityPoolId !== null ? output.IdentityPoolId : undefined, + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + }; +}; +const deserializeAws_json1_1ListIdentityPoolsResponse = (output, context) => { + return { + IdentityPools: output.IdentityPools !== undefined && output.IdentityPools !== null + ? deserializeAws_json1_1IdentityPoolsList(output.IdentityPools, context) + : undefined, + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + }; +}; +const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => { + return { + Tags: output.Tags !== undefined && output.Tags !== null + ? deserializeAws_json1_1IdentityPoolTagsType(output.Tags, context) + : undefined, + }; +}; +const deserializeAws_json1_1LoginsList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1LookupDeveloperIdentityResponse = (output, context) => { + return { + DeveloperUserIdentifierList: output.DeveloperUserIdentifierList !== undefined && output.DeveloperUserIdentifierList !== null + ? deserializeAws_json1_1DeveloperUserIdentifierList(output.DeveloperUserIdentifierList, context) + : undefined, + IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined, + NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined, + }; +}; +const deserializeAws_json1_1MappingRule = (output, context) => { + return { + Claim: output.Claim !== undefined && output.Claim !== null ? output.Claim : undefined, + MatchType: output.MatchType !== undefined && output.MatchType !== null ? output.MatchType : undefined, + RoleARN: output.RoleARN !== undefined && output.RoleARN !== null ? output.RoleARN : undefined, + Value: output.Value !== undefined && output.Value !== null ? output.Value : undefined, + }; +}; +const deserializeAws_json1_1MappingRulesList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1MappingRule(entry, context); + }); +}; +const deserializeAws_json1_1MergeDeveloperIdentitiesResponse = (output, context) => { + return { + IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined, + }; +}; +const deserializeAws_json1_1NotAuthorizedException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1OIDCProviderList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1ResourceConflictException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1ResourceNotFoundException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1RoleMapping = (output, context) => { + return { + AmbiguousRoleResolution: output.AmbiguousRoleResolution !== undefined && output.AmbiguousRoleResolution !== null + ? output.AmbiguousRoleResolution + : undefined, + RulesConfiguration: output.RulesConfiguration !== undefined && output.RulesConfiguration !== null + ? deserializeAws_json1_1RulesConfigurationType(output.RulesConfiguration, context) + : undefined, + Type: output.Type !== undefined && output.Type !== null ? output.Type : undefined, + }; +}; +const deserializeAws_json1_1RoleMappingMap = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_json1_1RoleMapping(value, context), + }; + }, {}); +}; +const deserializeAws_json1_1RolesMap = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_json1_1RulesConfigurationType = (output, context) => { + return { + Rules: output.Rules !== undefined && output.Rules !== null + ? deserializeAws_json1_1MappingRulesList(output.Rules, context) + : undefined, + }; +}; +const deserializeAws_json1_1SAMLProviderList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_json1_1TagResourceResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1TooManyRequestsException = (output, context) => { + return { + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_json1_1UnprocessedIdentityId = (output, context) => { + return { + ErrorCode: output.ErrorCode !== undefined && output.ErrorCode !== null ? output.ErrorCode : undefined, + IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined, + }; +}; +const deserializeAws_json1_1UnprocessedIdentityIdList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1UnprocessedIdentityId(entry, context); + }); +}; +const deserializeAws_json1_1UntagResourceResponse = (output, context) => { + return {}; +}; +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"], + }); +}; +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; +// Encode Uint8Array data into string with utf-8. +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 } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + 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 {}; +}); +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +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 ""; +}; +//# sourceMappingURL=Aws_json1_1.js.map + +/***/ }), + +/***/ 11407: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientDefaultValues = void 0; +const tslib_1 = __nccwpck_require__(57088); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(67367)); +const config_resolver_1 = __nccwpck_require__(87229); +const credential_provider_node_1 = __nccwpck_require__(98030); +const hash_node_1 = __nccwpck_require__(90791); +const middleware_retry_1 = __nccwpck_require__(7000); +const node_config_provider_1 = __nccwpck_require__(71124); +const node_http_handler_1 = __nccwpck_require__(15168); +const util_base64_node_1 = __nccwpck_require__(2091); +const util_body_length_node_1 = __nccwpck_require__(40286); +const util_user_agent_node_1 = __nccwpck_require__(64717); +const util_utf8_node_1 = __nccwpck_require__(85227); +const runtimeConfig_shared_1 = __nccwpck_require__(59013); +/** + * @internal + */ +exports.ClientDefaultValues = { + ...runtimeConfig_shared_1.ClientSharedValues, + runtime: "node", + base64Decoder: util_base64_node_1.fromBase64, + base64Encoder: util_base64_node_1.toBase64, + bodyLengthChecker: util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: util_user_agent_node_1.defaultUserAgent({ + serviceId: runtimeConfig_shared_1.ClientSharedValues.serviceId, + clientVersion: package_json_1.default.version, + }), + maxAttempts: node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: new node_http_handler_1.NodeHttpHandler(), + sha256: hash_node_1.Hash.bind(null, "sha256"), + streamCollector: node_http_handler_1.streamCollector, + utf8Decoder: util_utf8_node_1.fromUtf8, + utf8Encoder: util_utf8_node_1.toUtf8, +}; +//# sourceMappingURL=runtimeConfig.js.map + +/***/ }), + +/***/ 59013: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientSharedValues = void 0; +const endpoints_1 = __nccwpck_require__(43366); +const url_parser_1 = __nccwpck_require__(99427); +/** + * @internal + */ +exports.ClientSharedValues = { + apiVersion: "2014-06-30", + disableHostPrefix: false, + logger: {}, + regionInfoProvider: endpoints_1.defaultRegionInfoProvider, + serviceId: "Cognito Identity", + urlParser: url_parser_1.parseUrl, +}; +//# sourceMappingURL=runtimeConfig.shared.js.map + +/***/ }), + +/***/ 57088: +/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +__nccwpck_require__.r(__webpack_exports__); +/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { +/* harmony export */ "__extends": () => /* binding */ __extends, +/* harmony export */ "__assign": () => /* binding */ __assign, +/* harmony export */ "__rest": () => /* binding */ __rest, +/* harmony export */ "__decorate": () => /* binding */ __decorate, +/* harmony export */ "__param": () => /* binding */ __param, +/* harmony export */ "__metadata": () => /* binding */ __metadata, +/* harmony export */ "__awaiter": () => /* binding */ __awaiter, +/* harmony export */ "__generator": () => /* binding */ __generator, +/* harmony export */ "__createBinding": () => /* binding */ __createBinding, +/* harmony export */ "__exportStar": () => /* binding */ __exportStar, +/* harmony export */ "__values": () => /* binding */ __values, +/* harmony export */ "__read": () => /* binding */ __read, +/* harmony export */ "__spread": () => /* binding */ __spread, +/* harmony export */ "__spreadArrays": () => /* binding */ __spreadArrays, +/* harmony export */ "__spreadArray": () => /* binding */ __spreadArray, +/* harmony export */ "__await": () => /* binding */ __await, +/* harmony export */ "__asyncGenerator": () => /* binding */ __asyncGenerator, +/* harmony export */ "__asyncDelegator": () => /* binding */ __asyncDelegator, +/* harmony export */ "__asyncValues": () => /* binding */ __asyncValues, +/* harmony export */ "__makeTemplateObject": () => /* binding */ __makeTemplateObject, +/* harmony export */ "__importStar": () => /* binding */ __importStar, +/* harmony export */ "__importDefault": () => /* binding */ __importDefault, +/* harmony export */ "__classPrivateFieldGet": () => /* binding */ __classPrivateFieldGet, +/* harmony export */ "__classPrivateFieldSet": () => /* binding */ __classPrivateFieldSet +/* harmony export */ }); +/*! ***************************************************************************** +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 Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + 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 }; + } +} + +var __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]; +}); + +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function __spreadArray(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, 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]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function __importStar(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; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} + + +/***/ }), + +/***/ 37811: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IoT = void 0; +const IoTClient_1 = __nccwpck_require__(31450); +const AcceptCertificateTransferCommand_1 = __nccwpck_require__(56298); +const AddThingToBillingGroupCommand_1 = __nccwpck_require__(50444); +const AddThingToThingGroupCommand_1 = __nccwpck_require__(70565); +const AssociateTargetsWithJobCommand_1 = __nccwpck_require__(35126); +const AttachPolicyCommand_1 = __nccwpck_require__(90420); +const AttachPrincipalPolicyCommand_1 = __nccwpck_require__(4077); +const AttachSecurityProfileCommand_1 = __nccwpck_require__(36378); +const AttachThingPrincipalCommand_1 = __nccwpck_require__(92532); +const CancelAuditMitigationActionsTaskCommand_1 = __nccwpck_require__(84); +const CancelAuditTaskCommand_1 = __nccwpck_require__(58801); +const CancelCertificateTransferCommand_1 = __nccwpck_require__(69974); +const CancelJobCommand_1 = __nccwpck_require__(62205); +const CancelJobExecutionCommand_1 = __nccwpck_require__(21972); +const ClearDefaultAuthorizerCommand_1 = __nccwpck_require__(97176); +const ConfirmTopicRuleDestinationCommand_1 = __nccwpck_require__(83239); +const CreateAuditSuppressionCommand_1 = __nccwpck_require__(27690); +const CreateAuthorizerCommand_1 = __nccwpck_require__(57959); +const CreateBillingGroupCommand_1 = __nccwpck_require__(81102); +const CreateCertificateFromCsrCommand_1 = __nccwpck_require__(26470); +const CreateDimensionCommand_1 = __nccwpck_require__(71146); +const CreateDomainConfigurationCommand_1 = __nccwpck_require__(18664); +const CreateDynamicThingGroupCommand_1 = __nccwpck_require__(22271); +const CreateJobCommand_1 = __nccwpck_require__(14059); +const CreateKeysAndCertificateCommand_1 = __nccwpck_require__(4848); +const CreateMitigationActionCommand_1 = __nccwpck_require__(19583); +const CreateOTAUpdateCommand_1 = __nccwpck_require__(45447); +const CreatePolicyCommand_1 = __nccwpck_require__(35362); +const CreatePolicyVersionCommand_1 = __nccwpck_require__(72718); +const CreateProvisioningClaimCommand_1 = __nccwpck_require__(38826); +const CreateProvisioningTemplateCommand_1 = __nccwpck_require__(79093); +const CreateProvisioningTemplateVersionCommand_1 = __nccwpck_require__(28951); +const CreateRoleAliasCommand_1 = __nccwpck_require__(78443); +const CreateScheduledAuditCommand_1 = __nccwpck_require__(6809); +const CreateSecurityProfileCommand_1 = __nccwpck_require__(56822); +const CreateStreamCommand_1 = __nccwpck_require__(312); +const CreateThingCommand_1 = __nccwpck_require__(60949); +const CreateThingGroupCommand_1 = __nccwpck_require__(99585); +const CreateThingTypeCommand_1 = __nccwpck_require__(76406); +const CreateTopicRuleCommand_1 = __nccwpck_require__(96982); +const CreateTopicRuleDestinationCommand_1 = __nccwpck_require__(15724); +const DeleteAccountAuditConfigurationCommand_1 = __nccwpck_require__(4430); +const DeleteAuditSuppressionCommand_1 = __nccwpck_require__(90704); +const DeleteAuthorizerCommand_1 = __nccwpck_require__(32183); +const DeleteBillingGroupCommand_1 = __nccwpck_require__(56409); +const DeleteCACertificateCommand_1 = __nccwpck_require__(73697); +const DeleteCertificateCommand_1 = __nccwpck_require__(63911); +const DeleteDimensionCommand_1 = __nccwpck_require__(91697); +const DeleteDomainConfigurationCommand_1 = __nccwpck_require__(38666); +const DeleteDynamicThingGroupCommand_1 = __nccwpck_require__(17557); +const DeleteJobCommand_1 = __nccwpck_require__(22855); +const DeleteJobExecutionCommand_1 = __nccwpck_require__(39671); +const DeleteMitigationActionCommand_1 = __nccwpck_require__(45947); +const DeleteOTAUpdateCommand_1 = __nccwpck_require__(52941); +const DeletePolicyCommand_1 = __nccwpck_require__(26106); +const DeletePolicyVersionCommand_1 = __nccwpck_require__(67779); +const DeleteProvisioningTemplateCommand_1 = __nccwpck_require__(11659); +const DeleteProvisioningTemplateVersionCommand_1 = __nccwpck_require__(37562); +const DeleteRegistrationCodeCommand_1 = __nccwpck_require__(23235); +const DeleteRoleAliasCommand_1 = __nccwpck_require__(42187); +const DeleteScheduledAuditCommand_1 = __nccwpck_require__(61685); +const DeleteSecurityProfileCommand_1 = __nccwpck_require__(77857); +const DeleteStreamCommand_1 = __nccwpck_require__(68349); +const DeleteThingCommand_1 = __nccwpck_require__(31281); +const DeleteThingGroupCommand_1 = __nccwpck_require__(73451); +const DeleteThingTypeCommand_1 = __nccwpck_require__(36024); +const DeleteTopicRuleCommand_1 = __nccwpck_require__(32270); +const DeleteTopicRuleDestinationCommand_1 = __nccwpck_require__(62838); +const DeleteV2LoggingLevelCommand_1 = __nccwpck_require__(35964); +const DeprecateThingTypeCommand_1 = __nccwpck_require__(13748); +const DescribeAccountAuditConfigurationCommand_1 = __nccwpck_require__(13811); +const DescribeAuditFindingCommand_1 = __nccwpck_require__(91538); +const DescribeAuditMitigationActionsTaskCommand_1 = __nccwpck_require__(16532); +const DescribeAuditSuppressionCommand_1 = __nccwpck_require__(84970); +const DescribeAuditTaskCommand_1 = __nccwpck_require__(74328); +const DescribeAuthorizerCommand_1 = __nccwpck_require__(85629); +const DescribeBillingGroupCommand_1 = __nccwpck_require__(40564); +const DescribeCACertificateCommand_1 = __nccwpck_require__(42279); +const DescribeCertificateCommand_1 = __nccwpck_require__(78585); +const DescribeDefaultAuthorizerCommand_1 = __nccwpck_require__(68623); +const DescribeDimensionCommand_1 = __nccwpck_require__(46755); +const DescribeDomainConfigurationCommand_1 = __nccwpck_require__(83673); +const DescribeEndpointCommand_1 = __nccwpck_require__(77554); +const DescribeEventConfigurationsCommand_1 = __nccwpck_require__(87665); +const DescribeIndexCommand_1 = __nccwpck_require__(77948); +const DescribeJobCommand_1 = __nccwpck_require__(28980); +const DescribeJobExecutionCommand_1 = __nccwpck_require__(65547); +const DescribeMitigationActionCommand_1 = __nccwpck_require__(1175); +const DescribeProvisioningTemplateCommand_1 = __nccwpck_require__(44539); +const DescribeProvisioningTemplateVersionCommand_1 = __nccwpck_require__(34488); +const DescribeRoleAliasCommand_1 = __nccwpck_require__(44504); +const DescribeScheduledAuditCommand_1 = __nccwpck_require__(61131); +const DescribeSecurityProfileCommand_1 = __nccwpck_require__(22237); +const DescribeStreamCommand_1 = __nccwpck_require__(90953); +const DescribeThingCommand_1 = __nccwpck_require__(44526); +const DescribeThingGroupCommand_1 = __nccwpck_require__(19878); +const DescribeThingRegistrationTaskCommand_1 = __nccwpck_require__(83198); +const DescribeThingTypeCommand_1 = __nccwpck_require__(50780); +const DetachPolicyCommand_1 = __nccwpck_require__(17402); +const DetachPrincipalPolicyCommand_1 = __nccwpck_require__(7189); +const DetachSecurityProfileCommand_1 = __nccwpck_require__(9688); +const DetachThingPrincipalCommand_1 = __nccwpck_require__(71366); +const DisableTopicRuleCommand_1 = __nccwpck_require__(79248); +const EnableTopicRuleCommand_1 = __nccwpck_require__(83282); +const GetCardinalityCommand_1 = __nccwpck_require__(19687); +const GetEffectivePoliciesCommand_1 = __nccwpck_require__(51757); +const GetIndexingConfigurationCommand_1 = __nccwpck_require__(189); +const GetJobDocumentCommand_1 = __nccwpck_require__(91665); +const GetLoggingOptionsCommand_1 = __nccwpck_require__(57429); +const GetOTAUpdateCommand_1 = __nccwpck_require__(24694); +const GetPercentilesCommand_1 = __nccwpck_require__(33048); +const GetPolicyCommand_1 = __nccwpck_require__(22965); +const GetPolicyVersionCommand_1 = __nccwpck_require__(51843); +const GetRegistrationCodeCommand_1 = __nccwpck_require__(22069); +const GetStatisticsCommand_1 = __nccwpck_require__(36408); +const GetTopicRuleCommand_1 = __nccwpck_require__(82246); +const GetTopicRuleDestinationCommand_1 = __nccwpck_require__(93616); +const GetV2LoggingOptionsCommand_1 = __nccwpck_require__(23036); +const ListActiveViolationsCommand_1 = __nccwpck_require__(90886); +const ListAttachedPoliciesCommand_1 = __nccwpck_require__(59388); +const ListAuditFindingsCommand_1 = __nccwpck_require__(55133); +const ListAuditMitigationActionsExecutionsCommand_1 = __nccwpck_require__(35836); +const ListAuditMitigationActionsTasksCommand_1 = __nccwpck_require__(45704); +const ListAuditSuppressionsCommand_1 = __nccwpck_require__(60827); +const ListAuditTasksCommand_1 = __nccwpck_require__(50108); +const ListAuthorizersCommand_1 = __nccwpck_require__(99389); +const ListBillingGroupsCommand_1 = __nccwpck_require__(13648); +const ListCACertificatesCommand_1 = __nccwpck_require__(77650); +const ListCertificatesByCACommand_1 = __nccwpck_require__(23163); +const ListCertificatesCommand_1 = __nccwpck_require__(14749); +const ListDimensionsCommand_1 = __nccwpck_require__(74775); +const ListDomainConfigurationsCommand_1 = __nccwpck_require__(75947); +const ListIndicesCommand_1 = __nccwpck_require__(36240); +const ListJobExecutionsForJobCommand_1 = __nccwpck_require__(68068); +const ListJobExecutionsForThingCommand_1 = __nccwpck_require__(20874); +const ListJobsCommand_1 = __nccwpck_require__(25341); +const ListMitigationActionsCommand_1 = __nccwpck_require__(93159); +const ListOTAUpdatesCommand_1 = __nccwpck_require__(76188); +const ListOutgoingCertificatesCommand_1 = __nccwpck_require__(90321); +const ListPoliciesCommand_1 = __nccwpck_require__(81192); +const ListPolicyPrincipalsCommand_1 = __nccwpck_require__(86657); +const ListPolicyVersionsCommand_1 = __nccwpck_require__(21085); +const ListPrincipalPoliciesCommand_1 = __nccwpck_require__(3702); +const ListPrincipalThingsCommand_1 = __nccwpck_require__(62558); +const ListProvisioningTemplateVersionsCommand_1 = __nccwpck_require__(48529); +const ListProvisioningTemplatesCommand_1 = __nccwpck_require__(59524); +const ListRoleAliasesCommand_1 = __nccwpck_require__(31543); +const ListScheduledAuditsCommand_1 = __nccwpck_require__(79905); +const ListSecurityProfilesCommand_1 = __nccwpck_require__(17473); +const ListSecurityProfilesForTargetCommand_1 = __nccwpck_require__(26323); +const ListStreamsCommand_1 = __nccwpck_require__(76326); +const ListTagsForResourceCommand_1 = __nccwpck_require__(87749); +const ListTargetsForPolicyCommand_1 = __nccwpck_require__(71438); +const ListTargetsForSecurityProfileCommand_1 = __nccwpck_require__(47470); +const ListThingGroupsCommand_1 = __nccwpck_require__(59885); +const ListThingGroupsForThingCommand_1 = __nccwpck_require__(532); +const ListThingPrincipalsCommand_1 = __nccwpck_require__(18466); +const ListThingRegistrationTaskReportsCommand_1 = __nccwpck_require__(31905); +const ListThingRegistrationTasksCommand_1 = __nccwpck_require__(74999); +const ListThingTypesCommand_1 = __nccwpck_require__(28092); +const ListThingsCommand_1 = __nccwpck_require__(1243); +const ListThingsInBillingGroupCommand_1 = __nccwpck_require__(51357); +const ListThingsInThingGroupCommand_1 = __nccwpck_require__(33672); +const ListTopicRuleDestinationsCommand_1 = __nccwpck_require__(29621); +const ListTopicRulesCommand_1 = __nccwpck_require__(2823); +const ListV2LoggingLevelsCommand_1 = __nccwpck_require__(47492); +const ListViolationEventsCommand_1 = __nccwpck_require__(77560); +const RegisterCACertificateCommand_1 = __nccwpck_require__(97568); +const RegisterCertificateCommand_1 = __nccwpck_require__(59389); +const RegisterCertificateWithoutCACommand_1 = __nccwpck_require__(69343); +const RegisterThingCommand_1 = __nccwpck_require__(35331); +const RejectCertificateTransferCommand_1 = __nccwpck_require__(75265); +const RemoveThingFromBillingGroupCommand_1 = __nccwpck_require__(98700); +const RemoveThingFromThingGroupCommand_1 = __nccwpck_require__(47706); +const ReplaceTopicRuleCommand_1 = __nccwpck_require__(22174); +const SearchIndexCommand_1 = __nccwpck_require__(8101); +const SetDefaultAuthorizerCommand_1 = __nccwpck_require__(47153); +const SetDefaultPolicyVersionCommand_1 = __nccwpck_require__(93486); +const SetLoggingOptionsCommand_1 = __nccwpck_require__(74975); +const SetV2LoggingLevelCommand_1 = __nccwpck_require__(63248); +const SetV2LoggingOptionsCommand_1 = __nccwpck_require__(56768); +const StartAuditMitigationActionsTaskCommand_1 = __nccwpck_require__(67796); +const StartOnDemandAuditTaskCommand_1 = __nccwpck_require__(37467); +const StartThingRegistrationTaskCommand_1 = __nccwpck_require__(47587); +const StopThingRegistrationTaskCommand_1 = __nccwpck_require__(84000); +const TagResourceCommand_1 = __nccwpck_require__(94545); +const TestAuthorizationCommand_1 = __nccwpck_require__(31855); +const TestInvokeAuthorizerCommand_1 = __nccwpck_require__(21145); +const TransferCertificateCommand_1 = __nccwpck_require__(96463); +const UntagResourceCommand_1 = __nccwpck_require__(15850); +const UpdateAccountAuditConfigurationCommand_1 = __nccwpck_require__(12283); +const UpdateAuditSuppressionCommand_1 = __nccwpck_require__(13125); +const UpdateAuthorizerCommand_1 = __nccwpck_require__(27955); +const UpdateBillingGroupCommand_1 = __nccwpck_require__(14430); +const UpdateCACertificateCommand_1 = __nccwpck_require__(18036); +const UpdateCertificateCommand_1 = __nccwpck_require__(30885); +const UpdateDimensionCommand_1 = __nccwpck_require__(52162); +const UpdateDomainConfigurationCommand_1 = __nccwpck_require__(89212); +const UpdateDynamicThingGroupCommand_1 = __nccwpck_require__(39452); +const UpdateEventConfigurationsCommand_1 = __nccwpck_require__(90134); +const UpdateIndexingConfigurationCommand_1 = __nccwpck_require__(40352); +const UpdateJobCommand_1 = __nccwpck_require__(22654); +const UpdateMitigationActionCommand_1 = __nccwpck_require__(57468); +const UpdateProvisioningTemplateCommand_1 = __nccwpck_require__(72154); +const UpdateRoleAliasCommand_1 = __nccwpck_require__(47584); +const UpdateScheduledAuditCommand_1 = __nccwpck_require__(45277); +const UpdateSecurityProfileCommand_1 = __nccwpck_require__(21654); +const UpdateStreamCommand_1 = __nccwpck_require__(98689); +const UpdateThingCommand_1 = __nccwpck_require__(51903); +const UpdateThingGroupCommand_1 = __nccwpck_require__(46410); +const UpdateThingGroupsForThingCommand_1 = __nccwpck_require__(71585); +const UpdateTopicRuleDestinationCommand_1 = __nccwpck_require__(18671); +const ValidateSecurityProfileBehaviorsCommand_1 = __nccwpck_require__(91452); +/** + * AWS IoT + *

AWS IoT provides secure, bi-directional communication between Internet-connected + * devices (such as sensors, actuators, embedded devices, or smart appliances) and the AWS + * cloud. You can discover your custom IoT-Data endpoint to communicate with, configure + * rules for data processing and integration with other services, organize resources + * associated with each device (Registry), configure logging, and create and manage + * policies and credentials to authenticate devices.

+ *

The service endpoints that expose this API are listed in + * AWS IoT Core Endpoints and Quotas. + * You must use the endpoint for the region that has the resources you want to access.

+ *

The service name used by AWS + * Signature Version 4 to sign the request is: + * execute-api.

+ *

For more information about how AWS IoT works, see the Developer + * Guide.

+ *

For information about how to use the credentials provider for AWS IoT, see Authorizing Direct Calls to AWS Services.

+ */ +class IoT extends IoTClient_1.IoTClient { + acceptCertificateTransfer(args, optionsOrCb, cb) { + const command = new AcceptCertificateTransferCommand_1.AcceptCertificateTransferCommand(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); + } + } + addThingToBillingGroup(args, optionsOrCb, cb) { + const command = new AddThingToBillingGroupCommand_1.AddThingToBillingGroupCommand(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); + } + } + addThingToThingGroup(args, optionsOrCb, cb) { + const command = new AddThingToThingGroupCommand_1.AddThingToThingGroupCommand(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); + } + } + associateTargetsWithJob(args, optionsOrCb, cb) { + const command = new AssociateTargetsWithJobCommand_1.AssociateTargetsWithJobCommand(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); + } + } + attachPolicy(args, optionsOrCb, cb) { + const command = new AttachPolicyCommand_1.AttachPolicyCommand(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); + } + } + attachPrincipalPolicy(args, optionsOrCb, cb) { + const command = new AttachPrincipalPolicyCommand_1.AttachPrincipalPolicyCommand(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); + } + } + attachSecurityProfile(args, optionsOrCb, cb) { + const command = new AttachSecurityProfileCommand_1.AttachSecurityProfileCommand(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); + } + } + attachThingPrincipal(args, optionsOrCb, cb) { + const command = new AttachThingPrincipalCommand_1.AttachThingPrincipalCommand(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); + } + } + cancelAuditMitigationActionsTask(args, optionsOrCb, cb) { + const command = new CancelAuditMitigationActionsTaskCommand_1.CancelAuditMitigationActionsTaskCommand(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); + } + } + cancelAuditTask(args, optionsOrCb, cb) { + const command = new CancelAuditTaskCommand_1.CancelAuditTaskCommand(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); + } + } + cancelCertificateTransfer(args, optionsOrCb, cb) { + const command = new CancelCertificateTransferCommand_1.CancelCertificateTransferCommand(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); + } + } + cancelJob(args, optionsOrCb, cb) { + const command = new CancelJobCommand_1.CancelJobCommand(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); + } + } + cancelJobExecution(args, optionsOrCb, cb) { + const command = new CancelJobExecutionCommand_1.CancelJobExecutionCommand(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); + } + } + clearDefaultAuthorizer(args, optionsOrCb, cb) { + const command = new ClearDefaultAuthorizerCommand_1.ClearDefaultAuthorizerCommand(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); + } + } + confirmTopicRuleDestination(args, optionsOrCb, cb) { + const command = new ConfirmTopicRuleDestinationCommand_1.ConfirmTopicRuleDestinationCommand(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); + } + } + createAuditSuppression(args, optionsOrCb, cb) { + const command = new CreateAuditSuppressionCommand_1.CreateAuditSuppressionCommand(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); + } + } + createAuthorizer(args, optionsOrCb, cb) { + const command = new CreateAuthorizerCommand_1.CreateAuthorizerCommand(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); + } + } + createBillingGroup(args, optionsOrCb, cb) { + const command = new CreateBillingGroupCommand_1.CreateBillingGroupCommand(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); + } + } + createCertificateFromCsr(args, optionsOrCb, cb) { + const command = new CreateCertificateFromCsrCommand_1.CreateCertificateFromCsrCommand(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); + } + } + createDimension(args, optionsOrCb, cb) { + const command = new CreateDimensionCommand_1.CreateDimensionCommand(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); + } + } + createDomainConfiguration(args, optionsOrCb, cb) { + const command = new CreateDomainConfigurationCommand_1.CreateDomainConfigurationCommand(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); + } + } + createDynamicThingGroup(args, optionsOrCb, cb) { + const command = new CreateDynamicThingGroupCommand_1.CreateDynamicThingGroupCommand(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); + } + } + createJob(args, optionsOrCb, cb) { + const command = new CreateJobCommand_1.CreateJobCommand(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); + } + } + createKeysAndCertificate(args, optionsOrCb, cb) { + const command = new CreateKeysAndCertificateCommand_1.CreateKeysAndCertificateCommand(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); + } + } + createMitigationAction(args, optionsOrCb, cb) { + const command = new CreateMitigationActionCommand_1.CreateMitigationActionCommand(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); + } + } + createOTAUpdate(args, optionsOrCb, cb) { + const command = new CreateOTAUpdateCommand_1.CreateOTAUpdateCommand(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); + } + } + createPolicy(args, optionsOrCb, cb) { + const command = new CreatePolicyCommand_1.CreatePolicyCommand(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); + } + } + createPolicyVersion(args, optionsOrCb, cb) { + const command = new CreatePolicyVersionCommand_1.CreatePolicyVersionCommand(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); + } + } + createProvisioningClaim(args, optionsOrCb, cb) { + const command = new CreateProvisioningClaimCommand_1.CreateProvisioningClaimCommand(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); + } + } + createProvisioningTemplate(args, optionsOrCb, cb) { + const command = new CreateProvisioningTemplateCommand_1.CreateProvisioningTemplateCommand(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); + } + } + createProvisioningTemplateVersion(args, optionsOrCb, cb) { + const command = new CreateProvisioningTemplateVersionCommand_1.CreateProvisioningTemplateVersionCommand(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); + } + } + createRoleAlias(args, optionsOrCb, cb) { + const command = new CreateRoleAliasCommand_1.CreateRoleAliasCommand(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); + } + } + createScheduledAudit(args, optionsOrCb, cb) { + const command = new CreateScheduledAuditCommand_1.CreateScheduledAuditCommand(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); + } + } + createSecurityProfile(args, optionsOrCb, cb) { + const command = new CreateSecurityProfileCommand_1.CreateSecurityProfileCommand(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); + } + } + createStream(args, optionsOrCb, cb) { + const command = new CreateStreamCommand_1.CreateStreamCommand(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); + } + } + createThing(args, optionsOrCb, cb) { + const command = new CreateThingCommand_1.CreateThingCommand(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); + } + } + createThingGroup(args, optionsOrCb, cb) { + const command = new CreateThingGroupCommand_1.CreateThingGroupCommand(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); + } + } + createThingType(args, optionsOrCb, cb) { + const command = new CreateThingTypeCommand_1.CreateThingTypeCommand(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); + } + } + createTopicRule(args, optionsOrCb, cb) { + const command = new CreateTopicRuleCommand_1.CreateTopicRuleCommand(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); + } + } + createTopicRuleDestination(args, optionsOrCb, cb) { + const command = new CreateTopicRuleDestinationCommand_1.CreateTopicRuleDestinationCommand(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); + } + } + deleteAccountAuditConfiguration(args, optionsOrCb, cb) { + const command = new DeleteAccountAuditConfigurationCommand_1.DeleteAccountAuditConfigurationCommand(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); + } + } + deleteAuditSuppression(args, optionsOrCb, cb) { + const command = new DeleteAuditSuppressionCommand_1.DeleteAuditSuppressionCommand(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); + } + } + deleteAuthorizer(args, optionsOrCb, cb) { + const command = new DeleteAuthorizerCommand_1.DeleteAuthorizerCommand(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); + } + } + deleteBillingGroup(args, optionsOrCb, cb) { + const command = new DeleteBillingGroupCommand_1.DeleteBillingGroupCommand(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); + } + } + deleteCACertificate(args, optionsOrCb, cb) { + const command = new DeleteCACertificateCommand_1.DeleteCACertificateCommand(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); + } + } + deleteCertificate(args, optionsOrCb, cb) { + const command = new DeleteCertificateCommand_1.DeleteCertificateCommand(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); + } + } + deleteDimension(args, optionsOrCb, cb) { + const command = new DeleteDimensionCommand_1.DeleteDimensionCommand(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); + } + } + deleteDomainConfiguration(args, optionsOrCb, cb) { + const command = new DeleteDomainConfigurationCommand_1.DeleteDomainConfigurationCommand(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); + } + } + deleteDynamicThingGroup(args, optionsOrCb, cb) { + const command = new DeleteDynamicThingGroupCommand_1.DeleteDynamicThingGroupCommand(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); + } + } + deleteJob(args, optionsOrCb, cb) { + const command = new DeleteJobCommand_1.DeleteJobCommand(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); + } + } + deleteJobExecution(args, optionsOrCb, cb) { + const command = new DeleteJobExecutionCommand_1.DeleteJobExecutionCommand(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); + } + } + deleteMitigationAction(args, optionsOrCb, cb) { + const command = new DeleteMitigationActionCommand_1.DeleteMitigationActionCommand(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); + } + } + deleteOTAUpdate(args, optionsOrCb, cb) { + const command = new DeleteOTAUpdateCommand_1.DeleteOTAUpdateCommand(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); + } + } + deletePolicy(args, optionsOrCb, cb) { + const command = new DeletePolicyCommand_1.DeletePolicyCommand(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); + } + } + deletePolicyVersion(args, optionsOrCb, cb) { + const command = new DeletePolicyVersionCommand_1.DeletePolicyVersionCommand(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); + } + } + deleteProvisioningTemplate(args, optionsOrCb, cb) { + const command = new DeleteProvisioningTemplateCommand_1.DeleteProvisioningTemplateCommand(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); + } + } + deleteProvisioningTemplateVersion(args, optionsOrCb, cb) { + const command = new DeleteProvisioningTemplateVersionCommand_1.DeleteProvisioningTemplateVersionCommand(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); + } + } + deleteRegistrationCode(args, optionsOrCb, cb) { + const command = new DeleteRegistrationCodeCommand_1.DeleteRegistrationCodeCommand(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); + } + } + deleteRoleAlias(args, optionsOrCb, cb) { + const command = new DeleteRoleAliasCommand_1.DeleteRoleAliasCommand(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); + } + } + deleteScheduledAudit(args, optionsOrCb, cb) { + const command = new DeleteScheduledAuditCommand_1.DeleteScheduledAuditCommand(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); + } + } + deleteSecurityProfile(args, optionsOrCb, cb) { + const command = new DeleteSecurityProfileCommand_1.DeleteSecurityProfileCommand(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); + } + } + deleteStream(args, optionsOrCb, cb) { + const command = new DeleteStreamCommand_1.DeleteStreamCommand(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); + } + } + deleteThing(args, optionsOrCb, cb) { + const command = new DeleteThingCommand_1.DeleteThingCommand(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); + } + } + deleteThingGroup(args, optionsOrCb, cb) { + const command = new DeleteThingGroupCommand_1.DeleteThingGroupCommand(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); + } + } + deleteThingType(args, optionsOrCb, cb) { + const command = new DeleteThingTypeCommand_1.DeleteThingTypeCommand(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); + } + } + deleteTopicRule(args, optionsOrCb, cb) { + const command = new DeleteTopicRuleCommand_1.DeleteTopicRuleCommand(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); + } + } + deleteTopicRuleDestination(args, optionsOrCb, cb) { + const command = new DeleteTopicRuleDestinationCommand_1.DeleteTopicRuleDestinationCommand(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); + } + } + deleteV2LoggingLevel(args, optionsOrCb, cb) { + const command = new DeleteV2LoggingLevelCommand_1.DeleteV2LoggingLevelCommand(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); + } + } + deprecateThingType(args, optionsOrCb, cb) { + const command = new DeprecateThingTypeCommand_1.DeprecateThingTypeCommand(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); + } + } + describeAccountAuditConfiguration(args, optionsOrCb, cb) { + const command = new DescribeAccountAuditConfigurationCommand_1.DescribeAccountAuditConfigurationCommand(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); + } + } + describeAuditFinding(args, optionsOrCb, cb) { + const command = new DescribeAuditFindingCommand_1.DescribeAuditFindingCommand(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); + } + } + describeAuditMitigationActionsTask(args, optionsOrCb, cb) { + const command = new DescribeAuditMitigationActionsTaskCommand_1.DescribeAuditMitigationActionsTaskCommand(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); + } + } + describeAuditSuppression(args, optionsOrCb, cb) { + const command = new DescribeAuditSuppressionCommand_1.DescribeAuditSuppressionCommand(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); + } + } + describeAuditTask(args, optionsOrCb, cb) { + const command = new DescribeAuditTaskCommand_1.DescribeAuditTaskCommand(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); + } + } + describeAuthorizer(args, optionsOrCb, cb) { + const command = new DescribeAuthorizerCommand_1.DescribeAuthorizerCommand(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); + } + } + describeBillingGroup(args, optionsOrCb, cb) { + const command = new DescribeBillingGroupCommand_1.DescribeBillingGroupCommand(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); + } + } + describeCACertificate(args, optionsOrCb, cb) { + const command = new DescribeCACertificateCommand_1.DescribeCACertificateCommand(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); + } + } + describeCertificate(args, optionsOrCb, cb) { + const command = new DescribeCertificateCommand_1.DescribeCertificateCommand(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); + } + } + describeDefaultAuthorizer(args, optionsOrCb, cb) { + const command = new DescribeDefaultAuthorizerCommand_1.DescribeDefaultAuthorizerCommand(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); + } + } + describeDimension(args, optionsOrCb, cb) { + const command = new DescribeDimensionCommand_1.DescribeDimensionCommand(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); + } + } + describeDomainConfiguration(args, optionsOrCb, cb) { + const command = new DescribeDomainConfigurationCommand_1.DescribeDomainConfigurationCommand(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); + } + } + describeEndpoint(args, optionsOrCb, cb) { + const command = new DescribeEndpointCommand_1.DescribeEndpointCommand(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); + } + } + describeEventConfigurations(args, optionsOrCb, cb) { + const command = new DescribeEventConfigurationsCommand_1.DescribeEventConfigurationsCommand(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); + } + } + describeIndex(args, optionsOrCb, cb) { + const command = new DescribeIndexCommand_1.DescribeIndexCommand(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); + } + } + describeJob(args, optionsOrCb, cb) { + const command = new DescribeJobCommand_1.DescribeJobCommand(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); + } + } + describeJobExecution(args, optionsOrCb, cb) { + const command = new DescribeJobExecutionCommand_1.DescribeJobExecutionCommand(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); + } + } + describeMitigationAction(args, optionsOrCb, cb) { + const command = new DescribeMitigationActionCommand_1.DescribeMitigationActionCommand(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); + } + } + describeProvisioningTemplate(args, optionsOrCb, cb) { + const command = new DescribeProvisioningTemplateCommand_1.DescribeProvisioningTemplateCommand(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); + } + } + describeProvisioningTemplateVersion(args, optionsOrCb, cb) { + const command = new DescribeProvisioningTemplateVersionCommand_1.DescribeProvisioningTemplateVersionCommand(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); + } + } + describeRoleAlias(args, optionsOrCb, cb) { + const command = new DescribeRoleAliasCommand_1.DescribeRoleAliasCommand(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); + } + } + describeScheduledAudit(args, optionsOrCb, cb) { + const command = new DescribeScheduledAuditCommand_1.DescribeScheduledAuditCommand(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); + } + } + describeSecurityProfile(args, optionsOrCb, cb) { + const command = new DescribeSecurityProfileCommand_1.DescribeSecurityProfileCommand(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); + } + } + describeStream(args, optionsOrCb, cb) { + const command = new DescribeStreamCommand_1.DescribeStreamCommand(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); + } + } + describeThing(args, optionsOrCb, cb) { + const command = new DescribeThingCommand_1.DescribeThingCommand(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); + } + } + describeThingGroup(args, optionsOrCb, cb) { + const command = new DescribeThingGroupCommand_1.DescribeThingGroupCommand(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); + } + } + describeThingRegistrationTask(args, optionsOrCb, cb) { + const command = new DescribeThingRegistrationTaskCommand_1.DescribeThingRegistrationTaskCommand(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); + } + } + describeThingType(args, optionsOrCb, cb) { + const command = new DescribeThingTypeCommand_1.DescribeThingTypeCommand(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); + } + } + detachPolicy(args, optionsOrCb, cb) { + const command = new DetachPolicyCommand_1.DetachPolicyCommand(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); + } + } + detachPrincipalPolicy(args, optionsOrCb, cb) { + const command = new DetachPrincipalPolicyCommand_1.DetachPrincipalPolicyCommand(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); + } + } + detachSecurityProfile(args, optionsOrCb, cb) { + const command = new DetachSecurityProfileCommand_1.DetachSecurityProfileCommand(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); + } + } + detachThingPrincipal(args, optionsOrCb, cb) { + const command = new DetachThingPrincipalCommand_1.DetachThingPrincipalCommand(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); + } + } + disableTopicRule(args, optionsOrCb, cb) { + const command = new DisableTopicRuleCommand_1.DisableTopicRuleCommand(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); + } + } + enableTopicRule(args, optionsOrCb, cb) { + const command = new EnableTopicRuleCommand_1.EnableTopicRuleCommand(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); + } + } + getCardinality(args, optionsOrCb, cb) { + const command = new GetCardinalityCommand_1.GetCardinalityCommand(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); + } + } + getEffectivePolicies(args, optionsOrCb, cb) { + const command = new GetEffectivePoliciesCommand_1.GetEffectivePoliciesCommand(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); + } + } + getIndexingConfiguration(args, optionsOrCb, cb) { + const command = new GetIndexingConfigurationCommand_1.GetIndexingConfigurationCommand(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); + } + } + getJobDocument(args, optionsOrCb, cb) { + const command = new GetJobDocumentCommand_1.GetJobDocumentCommand(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); + } + } + getLoggingOptions(args, optionsOrCb, cb) { + const command = new GetLoggingOptionsCommand_1.GetLoggingOptionsCommand(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); + } + } + getOTAUpdate(args, optionsOrCb, cb) { + const command = new GetOTAUpdateCommand_1.GetOTAUpdateCommand(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); + } + } + getPercentiles(args, optionsOrCb, cb) { + const command = new GetPercentilesCommand_1.GetPercentilesCommand(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); + } + } + getPolicy(args, optionsOrCb, cb) { + const command = new GetPolicyCommand_1.GetPolicyCommand(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); + } + } + getPolicyVersion(args, optionsOrCb, cb) { + const command = new GetPolicyVersionCommand_1.GetPolicyVersionCommand(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); + } + } + getRegistrationCode(args, optionsOrCb, cb) { + const command = new GetRegistrationCodeCommand_1.GetRegistrationCodeCommand(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); + } + } + getStatistics(args, optionsOrCb, cb) { + const command = new GetStatisticsCommand_1.GetStatisticsCommand(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); + } + } + getTopicRule(args, optionsOrCb, cb) { + const command = new GetTopicRuleCommand_1.GetTopicRuleCommand(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); + } + } + getTopicRuleDestination(args, optionsOrCb, cb) { + const command = new GetTopicRuleDestinationCommand_1.GetTopicRuleDestinationCommand(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); + } + } + getV2LoggingOptions(args, optionsOrCb, cb) { + const command = new GetV2LoggingOptionsCommand_1.GetV2LoggingOptionsCommand(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); + } + } + listActiveViolations(args, optionsOrCb, cb) { + const command = new ListActiveViolationsCommand_1.ListActiveViolationsCommand(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); + } + } + listAttachedPolicies(args, optionsOrCb, cb) { + const command = new ListAttachedPoliciesCommand_1.ListAttachedPoliciesCommand(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); + } + } + listAuditFindings(args, optionsOrCb, cb) { + const command = new ListAuditFindingsCommand_1.ListAuditFindingsCommand(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); + } + } + listAuditMitigationActionsExecutions(args, optionsOrCb, cb) { + const command = new ListAuditMitigationActionsExecutionsCommand_1.ListAuditMitigationActionsExecutionsCommand(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); + } + } + listAuditMitigationActionsTasks(args, optionsOrCb, cb) { + const command = new ListAuditMitigationActionsTasksCommand_1.ListAuditMitigationActionsTasksCommand(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); + } + } + listAuditSuppressions(args, optionsOrCb, cb) { + const command = new ListAuditSuppressionsCommand_1.ListAuditSuppressionsCommand(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); + } + } + listAuditTasks(args, optionsOrCb, cb) { + const command = new ListAuditTasksCommand_1.ListAuditTasksCommand(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); + } + } + listAuthorizers(args, optionsOrCb, cb) { + const command = new ListAuthorizersCommand_1.ListAuthorizersCommand(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); + } + } + listBillingGroups(args, optionsOrCb, cb) { + const command = new ListBillingGroupsCommand_1.ListBillingGroupsCommand(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); + } + } + listCACertificates(args, optionsOrCb, cb) { + const command = new ListCACertificatesCommand_1.ListCACertificatesCommand(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); + } + } + listCertificates(args, optionsOrCb, cb) { + const command = new ListCertificatesCommand_1.ListCertificatesCommand(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); + } + } + listCertificatesByCA(args, optionsOrCb, cb) { + const command = new ListCertificatesByCACommand_1.ListCertificatesByCACommand(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); + } + } + listDimensions(args, optionsOrCb, cb) { + const command = new ListDimensionsCommand_1.ListDimensionsCommand(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); + } + } + listDomainConfigurations(args, optionsOrCb, cb) { + const command = new ListDomainConfigurationsCommand_1.ListDomainConfigurationsCommand(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); + } + } + listIndices(args, optionsOrCb, cb) { + const command = new ListIndicesCommand_1.ListIndicesCommand(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); + } + } + listJobExecutionsForJob(args, optionsOrCb, cb) { + const command = new ListJobExecutionsForJobCommand_1.ListJobExecutionsForJobCommand(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); + } + } + listJobExecutionsForThing(args, optionsOrCb, cb) { + const command = new ListJobExecutionsForThingCommand_1.ListJobExecutionsForThingCommand(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); + } + } + listJobs(args, optionsOrCb, cb) { + const command = new ListJobsCommand_1.ListJobsCommand(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); + } + } + listMitigationActions(args, optionsOrCb, cb) { + const command = new ListMitigationActionsCommand_1.ListMitigationActionsCommand(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); + } + } + listOTAUpdates(args, optionsOrCb, cb) { + const command = new ListOTAUpdatesCommand_1.ListOTAUpdatesCommand(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); + } + } + listOutgoingCertificates(args, optionsOrCb, cb) { + const command = new ListOutgoingCertificatesCommand_1.ListOutgoingCertificatesCommand(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); + } + } + listPolicies(args, optionsOrCb, cb) { + const command = new ListPoliciesCommand_1.ListPoliciesCommand(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); + } + } + listPolicyPrincipals(args, optionsOrCb, cb) { + const command = new ListPolicyPrincipalsCommand_1.ListPolicyPrincipalsCommand(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); + } + } + listPolicyVersions(args, optionsOrCb, cb) { + const command = new ListPolicyVersionsCommand_1.ListPolicyVersionsCommand(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); + } + } + listPrincipalPolicies(args, optionsOrCb, cb) { + const command = new ListPrincipalPoliciesCommand_1.ListPrincipalPoliciesCommand(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); + } + } + listPrincipalThings(args, optionsOrCb, cb) { + const command = new ListPrincipalThingsCommand_1.ListPrincipalThingsCommand(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); + } + } + listProvisioningTemplates(args, optionsOrCb, cb) { + const command = new ListProvisioningTemplatesCommand_1.ListProvisioningTemplatesCommand(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); + } + } + listProvisioningTemplateVersions(args, optionsOrCb, cb) { + const command = new ListProvisioningTemplateVersionsCommand_1.ListProvisioningTemplateVersionsCommand(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); + } + } + listRoleAliases(args, optionsOrCb, cb) { + const command = new ListRoleAliasesCommand_1.ListRoleAliasesCommand(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); + } + } + listScheduledAudits(args, optionsOrCb, cb) { + const command = new ListScheduledAuditsCommand_1.ListScheduledAuditsCommand(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); + } + } + listSecurityProfiles(args, optionsOrCb, cb) { + const command = new ListSecurityProfilesCommand_1.ListSecurityProfilesCommand(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); + } + } + listSecurityProfilesForTarget(args, optionsOrCb, cb) { + const command = new ListSecurityProfilesForTargetCommand_1.ListSecurityProfilesForTargetCommand(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); + } + } + listStreams(args, optionsOrCb, cb) { + const command = new ListStreamsCommand_1.ListStreamsCommand(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); + } + } + listTargetsForPolicy(args, optionsOrCb, cb) { + const command = new ListTargetsForPolicyCommand_1.ListTargetsForPolicyCommand(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); + } + } + listTargetsForSecurityProfile(args, optionsOrCb, cb) { + const command = new ListTargetsForSecurityProfileCommand_1.ListTargetsForSecurityProfileCommand(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); + } + } + listThingGroups(args, optionsOrCb, cb) { + const command = new ListThingGroupsCommand_1.ListThingGroupsCommand(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); + } + } + listThingGroupsForThing(args, optionsOrCb, cb) { + const command = new ListThingGroupsForThingCommand_1.ListThingGroupsForThingCommand(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); + } + } + listThingPrincipals(args, optionsOrCb, cb) { + const command = new ListThingPrincipalsCommand_1.ListThingPrincipalsCommand(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); + } + } + listThingRegistrationTaskReports(args, optionsOrCb, cb) { + const command = new ListThingRegistrationTaskReportsCommand_1.ListThingRegistrationTaskReportsCommand(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); + } + } + listThingRegistrationTasks(args, optionsOrCb, cb) { + const command = new ListThingRegistrationTasksCommand_1.ListThingRegistrationTasksCommand(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); + } + } + listThings(args, optionsOrCb, cb) { + const command = new ListThingsCommand_1.ListThingsCommand(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); + } + } + listThingsInBillingGroup(args, optionsOrCb, cb) { + const command = new ListThingsInBillingGroupCommand_1.ListThingsInBillingGroupCommand(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); + } + } + listThingsInThingGroup(args, optionsOrCb, cb) { + const command = new ListThingsInThingGroupCommand_1.ListThingsInThingGroupCommand(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); + } + } + listThingTypes(args, optionsOrCb, cb) { + const command = new ListThingTypesCommand_1.ListThingTypesCommand(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); + } + } + listTopicRuleDestinations(args, optionsOrCb, cb) { + const command = new ListTopicRuleDestinationsCommand_1.ListTopicRuleDestinationsCommand(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); + } + } + listTopicRules(args, optionsOrCb, cb) { + const command = new ListTopicRulesCommand_1.ListTopicRulesCommand(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); + } + } + listV2LoggingLevels(args, optionsOrCb, cb) { + const command = new ListV2LoggingLevelsCommand_1.ListV2LoggingLevelsCommand(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); + } + } + listViolationEvents(args, optionsOrCb, cb) { + const command = new ListViolationEventsCommand_1.ListViolationEventsCommand(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); + } + } + registerCACertificate(args, optionsOrCb, cb) { + const command = new RegisterCACertificateCommand_1.RegisterCACertificateCommand(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); + } + } + registerCertificate(args, optionsOrCb, cb) { + const command = new RegisterCertificateCommand_1.RegisterCertificateCommand(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); + } + } + registerCertificateWithoutCA(args, optionsOrCb, cb) { + const command = new RegisterCertificateWithoutCACommand_1.RegisterCertificateWithoutCACommand(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); + } + } + registerThing(args, optionsOrCb, cb) { + const command = new RegisterThingCommand_1.RegisterThingCommand(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); + } + } + rejectCertificateTransfer(args, optionsOrCb, cb) { + const command = new RejectCertificateTransferCommand_1.RejectCertificateTransferCommand(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); + } + } + removeThingFromBillingGroup(args, optionsOrCb, cb) { + const command = new RemoveThingFromBillingGroupCommand_1.RemoveThingFromBillingGroupCommand(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); + } + } + removeThingFromThingGroup(args, optionsOrCb, cb) { + const command = new RemoveThingFromThingGroupCommand_1.RemoveThingFromThingGroupCommand(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); + } + } + replaceTopicRule(args, optionsOrCb, cb) { + const command = new ReplaceTopicRuleCommand_1.ReplaceTopicRuleCommand(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); + } + } + searchIndex(args, optionsOrCb, cb) { + const command = new SearchIndexCommand_1.SearchIndexCommand(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); + } + } + setDefaultAuthorizer(args, optionsOrCb, cb) { + const command = new SetDefaultAuthorizerCommand_1.SetDefaultAuthorizerCommand(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); + } + } + setDefaultPolicyVersion(args, optionsOrCb, cb) { + const command = new SetDefaultPolicyVersionCommand_1.SetDefaultPolicyVersionCommand(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); + } + } + setLoggingOptions(args, optionsOrCb, cb) { + const command = new SetLoggingOptionsCommand_1.SetLoggingOptionsCommand(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); + } + } + setV2LoggingLevel(args, optionsOrCb, cb) { + const command = new SetV2LoggingLevelCommand_1.SetV2LoggingLevelCommand(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); + } + } + setV2LoggingOptions(args, optionsOrCb, cb) { + const command = new SetV2LoggingOptionsCommand_1.SetV2LoggingOptionsCommand(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); + } + } + startAuditMitigationActionsTask(args, optionsOrCb, cb) { + const command = new StartAuditMitigationActionsTaskCommand_1.StartAuditMitigationActionsTaskCommand(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); + } + } + startOnDemandAuditTask(args, optionsOrCb, cb) { + const command = new StartOnDemandAuditTaskCommand_1.StartOnDemandAuditTaskCommand(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); + } + } + startThingRegistrationTask(args, optionsOrCb, cb) { + const command = new StartThingRegistrationTaskCommand_1.StartThingRegistrationTaskCommand(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); + } + } + stopThingRegistrationTask(args, optionsOrCb, cb) { + const command = new StopThingRegistrationTaskCommand_1.StopThingRegistrationTaskCommand(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); + } + } + testAuthorization(args, optionsOrCb, cb) { + const command = new TestAuthorizationCommand_1.TestAuthorizationCommand(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); + } + } + testInvokeAuthorizer(args, optionsOrCb, cb) { + const command = new TestInvokeAuthorizerCommand_1.TestInvokeAuthorizerCommand(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); + } + } + transferCertificate(args, optionsOrCb, cb) { + const command = new TransferCertificateCommand_1.TransferCertificateCommand(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); + } + } + updateAccountAuditConfiguration(args, optionsOrCb, cb) { + const command = new UpdateAccountAuditConfigurationCommand_1.UpdateAccountAuditConfigurationCommand(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); + } + } + updateAuditSuppression(args, optionsOrCb, cb) { + const command = new UpdateAuditSuppressionCommand_1.UpdateAuditSuppressionCommand(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); + } + } + updateAuthorizer(args, optionsOrCb, cb) { + const command = new UpdateAuthorizerCommand_1.UpdateAuthorizerCommand(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); + } + } + updateBillingGroup(args, optionsOrCb, cb) { + const command = new UpdateBillingGroupCommand_1.UpdateBillingGroupCommand(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); + } + } + updateCACertificate(args, optionsOrCb, cb) { + const command = new UpdateCACertificateCommand_1.UpdateCACertificateCommand(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); + } + } + updateCertificate(args, optionsOrCb, cb) { + const command = new UpdateCertificateCommand_1.UpdateCertificateCommand(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); + } + } + updateDimension(args, optionsOrCb, cb) { + const command = new UpdateDimensionCommand_1.UpdateDimensionCommand(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); + } + } + updateDomainConfiguration(args, optionsOrCb, cb) { + const command = new UpdateDomainConfigurationCommand_1.UpdateDomainConfigurationCommand(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); + } + } + updateDynamicThingGroup(args, optionsOrCb, cb) { + const command = new UpdateDynamicThingGroupCommand_1.UpdateDynamicThingGroupCommand(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); + } + } + updateEventConfigurations(args, optionsOrCb, cb) { + const command = new UpdateEventConfigurationsCommand_1.UpdateEventConfigurationsCommand(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); + } + } + updateIndexingConfiguration(args, optionsOrCb, cb) { + const command = new UpdateIndexingConfigurationCommand_1.UpdateIndexingConfigurationCommand(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); + } + } + updateJob(args, optionsOrCb, cb) { + const command = new UpdateJobCommand_1.UpdateJobCommand(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); + } + } + updateMitigationAction(args, optionsOrCb, cb) { + const command = new UpdateMitigationActionCommand_1.UpdateMitigationActionCommand(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); + } + } + updateProvisioningTemplate(args, optionsOrCb, cb) { + const command = new UpdateProvisioningTemplateCommand_1.UpdateProvisioningTemplateCommand(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); + } + } + updateRoleAlias(args, optionsOrCb, cb) { + const command = new UpdateRoleAliasCommand_1.UpdateRoleAliasCommand(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); + } + } + updateScheduledAudit(args, optionsOrCb, cb) { + const command = new UpdateScheduledAuditCommand_1.UpdateScheduledAuditCommand(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); + } + } + updateSecurityProfile(args, optionsOrCb, cb) { + const command = new UpdateSecurityProfileCommand_1.UpdateSecurityProfileCommand(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); + } + } + updateStream(args, optionsOrCb, cb) { + const command = new UpdateStreamCommand_1.UpdateStreamCommand(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); + } + } + updateThing(args, optionsOrCb, cb) { + const command = new UpdateThingCommand_1.UpdateThingCommand(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); + } + } + updateThingGroup(args, optionsOrCb, cb) { + const command = new UpdateThingGroupCommand_1.UpdateThingGroupCommand(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); + } + } + updateThingGroupsForThing(args, optionsOrCb, cb) { + const command = new UpdateThingGroupsForThingCommand_1.UpdateThingGroupsForThingCommand(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); + } + } + updateTopicRuleDestination(args, optionsOrCb, cb) { + const command = new UpdateTopicRuleDestinationCommand_1.UpdateTopicRuleDestinationCommand(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); + } + } + validateSecurityProfileBehaviors(args, optionsOrCb, cb) { + const command = new ValidateSecurityProfileBehaviorsCommand_1.ValidateSecurityProfileBehaviorsCommand(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.IoT = IoT; +//# sourceMappingURL=IoT.js.map + +/***/ }), + +/***/ 31450: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IoTClient = void 0; +const runtimeConfig_1 = __nccwpck_require__(67490); +const config_resolver_1 = __nccwpck_require__(87229); +const middleware_content_length_1 = __nccwpck_require__(69323); +const middleware_host_header_1 = __nccwpck_require__(58645); +const middleware_logger_1 = __nccwpck_require__(98685); +const middleware_retry_1 = __nccwpck_require__(7000); +const middleware_signing_1 = __nccwpck_require__(82487); +const middleware_user_agent_1 = __nccwpck_require__(55976); +const smithy_client_1 = __nccwpck_require__(84060); +/** + * AWS IoT + *

AWS IoT provides secure, bi-directional communication between Internet-connected + * devices (such as sensors, actuators, embedded devices, or smart appliances) and the AWS + * cloud. You can discover your custom IoT-Data endpoint to communicate with, configure + * rules for data processing and integration with other services, organize resources + * associated with each device (Registry), configure logging, and create and manage + * policies and credentials to authenticate devices.

+ *

The service endpoints that expose this API are listed in + * AWS IoT Core Endpoints and Quotas. + * You must use the endpoint for the region that has the resources you want to access.

+ *

The service name used by AWS + * Signature Version 4 to sign the request is: + * execute-api.

+ *

For more information about how AWS IoT works, see the Developer + * Guide.

+ *

For information about how to use the credentials provider for AWS IoT, see Authorizing Direct Calls to AWS Services.

+ */ +class IoTClient extends smithy_client_1.Client { + constructor(configuration) { + let _config_0 = { + ...runtimeConfig_1.ClientDefaultValues, + ...configuration, + }; + let _config_1 = config_resolver_1.resolveRegionConfig(_config_0); + let _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1); + let _config_3 = middleware_signing_1.resolveAwsAuthConfig(_config_2); + let _config_4 = middleware_retry_1.resolveRetryConfig(_config_3); + let _config_5 = middleware_host_header_1.resolveHostHeaderConfig(_config_4); + let _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(this.config)); + 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)); + this.middlewareStack.use(middleware_retry_1.getOmitRetryHeadersPlugin(this.config)); + } + destroy() { + super.destroy(); + } +} +exports.IoTClient = IoTClient; +//# sourceMappingURL=IoTClient.js.map + +/***/ }), + +/***/ 56298: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AcceptCertificateTransferCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Accepts a pending certificate transfer. The default state of the certificate is + * INACTIVE.

+ *

To check for pending certificate transfers, call ListCertificates + * to enumerate your certificates.

+ */ +class AcceptCertificateTransferCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "AcceptCertificateTransferCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AcceptCertificateTransferRequest.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_restJson1AcceptCertificateTransferCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1AcceptCertificateTransferCommand(output, context); + } +} +exports.AcceptCertificateTransferCommand = AcceptCertificateTransferCommand; +//# sourceMappingURL=AcceptCertificateTransferCommand.js.map + +/***/ }), + +/***/ 50444: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AddThingToBillingGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Adds a thing to a billing group.

+ */ +class AddThingToBillingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "AddThingToBillingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AddThingToBillingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AddThingToBillingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1AddThingToBillingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1AddThingToBillingGroupCommand(output, context); + } +} +exports.AddThingToBillingGroupCommand = AddThingToBillingGroupCommand; +//# sourceMappingURL=AddThingToBillingGroupCommand.js.map + +/***/ }), + +/***/ 70565: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AddThingToThingGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Adds a thing to a thing group.

+ */ +class AddThingToThingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "AddThingToThingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AddThingToThingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AddThingToThingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1AddThingToThingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1AddThingToThingGroupCommand(output, context); + } +} +exports.AddThingToThingGroupCommand = AddThingToThingGroupCommand; +//# sourceMappingURL=AddThingToThingGroupCommand.js.map + +/***/ }), + +/***/ 35126: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssociateTargetsWithJobCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Associates a group with a continuous job. The following criteria must be met:

+ * + */ +class AssociateTargetsWithJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "AssociateTargetsWithJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AssociateTargetsWithJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AssociateTargetsWithJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1AssociateTargetsWithJobCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1AssociateTargetsWithJobCommand(output, context); + } +} +exports.AssociateTargetsWithJobCommand = AssociateTargetsWithJobCommand; +//# sourceMappingURL=AssociateTargetsWithJobCommand.js.map + +/***/ }), + +/***/ 90420: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AttachPolicyCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Attaches a policy to the specified target.

+ */ +class AttachPolicyCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "AttachPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AttachPolicyRequest.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_restJson1AttachPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1AttachPolicyCommand(output, context); + } +} +exports.AttachPolicyCommand = AttachPolicyCommand; +//# sourceMappingURL=AttachPolicyCommand.js.map + +/***/ }), + +/***/ 4077: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AttachPrincipalPolicyCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + * @deprecated + * + *

Attaches the specified policy to the specified principal (certificate or other + * credential).

+ *

+ * Note: This API is deprecated. Please use AttachPolicy instead.

+ */ +class AttachPrincipalPolicyCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "AttachPrincipalPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AttachPrincipalPolicyRequest.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_restJson1AttachPrincipalPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1AttachPrincipalPolicyCommand(output, context); + } +} +exports.AttachPrincipalPolicyCommand = AttachPrincipalPolicyCommand; +//# sourceMappingURL=AttachPrincipalPolicyCommand.js.map + +/***/ }), + +/***/ 36378: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AttachSecurityProfileCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Associates a Device Defender security profile with a thing group or this account. Each + * thing group or account can have up to five security profiles associated with it.

+ */ +class AttachSecurityProfileCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "AttachSecurityProfileCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AttachSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AttachSecurityProfileResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1AttachSecurityProfileCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1AttachSecurityProfileCommand(output, context); + } +} +exports.AttachSecurityProfileCommand = AttachSecurityProfileCommand; +//# sourceMappingURL=AttachSecurityProfileCommand.js.map + +/***/ }), + +/***/ 92532: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AttachThingPrincipalCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Attaches the specified principal to the specified thing. A principal can be X.509 + * certificates, IAM users, groups, and roles, Amazon Cognito identities or federated + * identities.

+ */ +class AttachThingPrincipalCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "AttachThingPrincipalCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AttachThingPrincipalRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AttachThingPrincipalResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1AttachThingPrincipalCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1AttachThingPrincipalCommand(output, context); + } +} +exports.AttachThingPrincipalCommand = AttachThingPrincipalCommand; +//# sourceMappingURL=AttachThingPrincipalCommand.js.map + +/***/ }), + +/***/ 84: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CancelAuditMitigationActionsTaskCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Cancels a mitigation action task that is in progress. If the task is not in progress, an InvalidRequestException occurs.

+ */ +class CancelAuditMitigationActionsTaskCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CancelAuditMitigationActionsTaskCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CancelAuditMitigationActionsTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CancelAuditMitigationActionsTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CancelAuditMitigationActionsTaskCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CancelAuditMitigationActionsTaskCommand(output, context); + } +} +exports.CancelAuditMitigationActionsTaskCommand = CancelAuditMitigationActionsTaskCommand; +//# sourceMappingURL=CancelAuditMitigationActionsTaskCommand.js.map + +/***/ }), + +/***/ 58801: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CancelAuditTaskCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Cancels an audit that is in progress. The audit can be either scheduled or on-demand. + * If the audit is not in progress, an "InvalidRequestException" occurs.

+ */ +class CancelAuditTaskCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CancelAuditTaskCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CancelAuditTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CancelAuditTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CancelAuditTaskCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CancelAuditTaskCommand(output, context); + } +} +exports.CancelAuditTaskCommand = CancelAuditTaskCommand; +//# sourceMappingURL=CancelAuditTaskCommand.js.map + +/***/ }), + +/***/ 69974: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CancelCertificateTransferCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Cancels a pending transfer for the specified certificate.

+ *

+ * Note Only the transfer source account can use this + * operation to cancel a transfer. (Transfer destinations can use RejectCertificateTransfer instead.) After transfer, AWS IoT returns the + * certificate to the source account in the INACTIVE state. After the destination account has + * accepted the transfer, the transfer cannot be cancelled.

+ *

After a certificate transfer is cancelled, the status of the certificate changes from + * PENDING_TRANSFER to INACTIVE.

+ */ +class CancelCertificateTransferCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CancelCertificateTransferCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CancelCertificateTransferRequest.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_restJson1CancelCertificateTransferCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CancelCertificateTransferCommand(output, context); + } +} +exports.CancelCertificateTransferCommand = CancelCertificateTransferCommand; +//# sourceMappingURL=CancelCertificateTransferCommand.js.map + +/***/ }), + +/***/ 62205: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CancelJobCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Cancels a job.

+ */ +class CancelJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CancelJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CancelJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CancelJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CancelJobCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CancelJobCommand(output, context); + } +} +exports.CancelJobCommand = CancelJobCommand; +//# sourceMappingURL=CancelJobCommand.js.map + +/***/ }), + +/***/ 21972: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CancelJobExecutionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Cancels the execution of a job for a given thing.

+ */ +class CancelJobExecutionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CancelJobExecutionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CancelJobExecutionRequest.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_restJson1CancelJobExecutionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CancelJobExecutionCommand(output, context); + } +} +exports.CancelJobExecutionCommand = CancelJobExecutionCommand; +//# sourceMappingURL=CancelJobExecutionCommand.js.map + +/***/ }), + +/***/ 97176: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClearDefaultAuthorizerCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Clears the default authorizer.

+ */ +class ClearDefaultAuthorizerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ClearDefaultAuthorizerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ClearDefaultAuthorizerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ClearDefaultAuthorizerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ClearDefaultAuthorizerCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ClearDefaultAuthorizerCommand(output, context); + } +} +exports.ClearDefaultAuthorizerCommand = ClearDefaultAuthorizerCommand; +//# sourceMappingURL=ClearDefaultAuthorizerCommand.js.map + +/***/ }), + +/***/ 83239: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ConfirmTopicRuleDestinationCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Confirms a topic rule destination. When you create a rule requiring a destination, AWS + * IoT sends a confirmation message to the endpoint or base address you specify. The message + * includes a token which you pass back when calling ConfirmTopicRuleDestination + * to confirm that you own or have access to the endpoint.

+ */ +class ConfirmTopicRuleDestinationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ConfirmTopicRuleDestinationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ConfirmTopicRuleDestinationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ConfirmTopicRuleDestinationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ConfirmTopicRuleDestinationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ConfirmTopicRuleDestinationCommand(output, context); + } +} +exports.ConfirmTopicRuleDestinationCommand = ConfirmTopicRuleDestinationCommand; +//# sourceMappingURL=ConfirmTopicRuleDestinationCommand.js.map + +/***/ }), + +/***/ 27690: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateAuditSuppressionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

+ * Creates a Device Defender audit suppression. + *

+ */ +class CreateAuditSuppressionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateAuditSuppressionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateAuditSuppressionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateAuditSuppressionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateAuditSuppressionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateAuditSuppressionCommand(output, context); + } +} +exports.CreateAuditSuppressionCommand = CreateAuditSuppressionCommand; +//# sourceMappingURL=CreateAuditSuppressionCommand.js.map + +/***/ }), + +/***/ 57959: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateAuthorizerCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates an authorizer.

+ */ +class CreateAuthorizerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateAuthorizerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateAuthorizerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateAuthorizerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateAuthorizerCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateAuthorizerCommand(output, context); + } +} +exports.CreateAuthorizerCommand = CreateAuthorizerCommand; +//# sourceMappingURL=CreateAuthorizerCommand.js.map + +/***/ }), + +/***/ 81102: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateBillingGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a billing group.

+ */ +class CreateBillingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateBillingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateBillingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateBillingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateBillingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateBillingGroupCommand(output, context); + } +} +exports.CreateBillingGroupCommand = CreateBillingGroupCommand; +//# sourceMappingURL=CreateBillingGroupCommand.js.map + +/***/ }), + +/***/ 26470: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateCertificateFromCsrCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates an X.509 certificate using the specified certificate signing + * request.

+ *

+ * Note: The CSR must include a public key that is either an + * RSA key with a length of at least 2048 bits or an ECC key from NIST P-256 or NIST P-384 + * curves.

+ *

+ * Note: Reusing the same certificate signing request (CSR) + * results in a distinct certificate.

+ *

You can create multiple certificates in a batch by creating a directory, copying + * multiple .csr files into that directory, and then specifying that directory on the command + * line. The following commands show how to create a batch of certificates given a batch of + * CSRs.

+ *

Assuming a set of CSRs are located inside of the directory + * my-csr-directory:

+ * + *

On Linux and OS X, the command is:

+ * + *

$ ls my-csr-directory/ | xargs -I {} aws iot create-certificate-from-csr + * --certificate-signing-request file://my-csr-directory/{}

+ *

This command lists all of the CSRs in my-csr-directory and pipes each CSR file name + * to the aws iot create-certificate-from-csr AWS CLI command to create a certificate for the + * corresponding CSR.

+ *

The aws iot create-certificate-from-csr part of the command can also be run in + * parallel to speed up the certificate creation process:

+ *

$ ls my-csr-directory/ | xargs -P 10 -I {} aws iot create-certificate-from-csr + * --certificate-signing-request file://my-csr-directory/{}

+ *

On Windows PowerShell, the command to create certificates for all CSRs in + * my-csr-directory is:

+ *

> ls -Name my-csr-directory | %{aws iot create-certificate-from-csr + * --certificate-signing-request file://my-csr-directory/$_}

+ *

On a Windows command prompt, the command to create certificates for all CSRs in + * my-csr-directory is:

+ *

> forfiles /p my-csr-directory /c "cmd /c aws iot create-certificate-from-csr + * --certificate-signing-request file://@path"

+ */ +class CreateCertificateFromCsrCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateCertificateFromCsrCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateCertificateFromCsrRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateCertificateFromCsrResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateCertificateFromCsrCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateCertificateFromCsrCommand(output, context); + } +} +exports.CreateCertificateFromCsrCommand = CreateCertificateFromCsrCommand; +//# sourceMappingURL=CreateCertificateFromCsrCommand.js.map + +/***/ }), + +/***/ 71146: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateDimensionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Create a dimension that you can use to limit the scope of a metric used in a security profile for AWS IoT Device Defender. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric only to MQTT topics whose name match the pattern specified in the dimension.

+ */ +class CreateDimensionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateDimensionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateDimensionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateDimensionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateDimensionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateDimensionCommand(output, context); + } +} +exports.CreateDimensionCommand = CreateDimensionCommand; +//# sourceMappingURL=CreateDimensionCommand.js.map + +/***/ }), + +/***/ 18664: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateDomainConfigurationCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a domain configuration.

+ * + *

The domain configuration feature is in public preview and is subject to change.

+ *
+ */ +class CreateDomainConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateDomainConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateDomainConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateDomainConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateDomainConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateDomainConfigurationCommand(output, context); + } +} +exports.CreateDomainConfigurationCommand = CreateDomainConfigurationCommand; +//# sourceMappingURL=CreateDomainConfigurationCommand.js.map + +/***/ }), + +/***/ 22271: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateDynamicThingGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a dynamic thing group.

+ */ +class CreateDynamicThingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateDynamicThingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateDynamicThingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateDynamicThingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateDynamicThingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateDynamicThingGroupCommand(output, context); + } +} +exports.CreateDynamicThingGroupCommand = CreateDynamicThingGroupCommand; +//# sourceMappingURL=CreateDynamicThingGroupCommand.js.map + +/***/ }), + +/***/ 14059: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateJobCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a job.

+ */ +class CreateJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateJobCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateJobCommand(output, context); + } +} +exports.CreateJobCommand = CreateJobCommand; +//# sourceMappingURL=CreateJobCommand.js.map + +/***/ }), + +/***/ 4848: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateKeysAndCertificateCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a 2048-bit RSA key pair and issues an X.509 certificate using the issued + * public key. You can also call CreateKeysAndCertificate over MQTT from a + * device, for more information, see Provisioning MQTT API.

+ *

+ * Note This is the only time AWS IoT issues the private key + * for this certificate, so it is important to keep it in a secure location.

+ */ +class CreateKeysAndCertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateKeysAndCertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateKeysAndCertificateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateKeysAndCertificateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateKeysAndCertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateKeysAndCertificateCommand(output, context); + } +} +exports.CreateKeysAndCertificateCommand = CreateKeysAndCertificateCommand; +//# sourceMappingURL=CreateKeysAndCertificateCommand.js.map + +/***/ }), + +/***/ 19583: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateMitigationActionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Defines an action that can be applied to audit findings by using StartAuditMitigationActionsTask. Only certain types of mitigation actions can be applied to specific check names. For more information, see Mitigation actions. Each mitigation action can apply only one type of change.

+ */ +class CreateMitigationActionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateMitigationActionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateMitigationActionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateMitigationActionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateMitigationActionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateMitigationActionCommand(output, context); + } +} +exports.CreateMitigationActionCommand = CreateMitigationActionCommand; +//# sourceMappingURL=CreateMitigationActionCommand.js.map + +/***/ }), + +/***/ 45447: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateOTAUpdateCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates an AWS IoT OTAUpdate on a target group of things or groups.

+ */ +class CreateOTAUpdateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateOTAUpdateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateOTAUpdateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateOTAUpdateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateOTAUpdateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateOTAUpdateCommand(output, context); + } +} +exports.CreateOTAUpdateCommand = CreateOTAUpdateCommand; +//# sourceMappingURL=CreateOTAUpdateCommand.js.map + +/***/ }), + +/***/ 35362: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreatePolicyCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates an AWS IoT policy.

+ *

The created policy is the default version for the policy. This operation creates a + * policy version with a version identifier of 1 and sets + * 1 as the policy's default version.

+ */ +class CreatePolicyCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreatePolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreatePolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreatePolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreatePolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreatePolicyCommand(output, context); + } +} +exports.CreatePolicyCommand = CreatePolicyCommand; +//# sourceMappingURL=CreatePolicyCommand.js.map + +/***/ }), + +/***/ 72718: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreatePolicyVersionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a new version of the specified AWS IoT policy. To update a policy, create a + * new policy version. A managed policy can have up to five versions. If the policy has five + * versions, you must use DeletePolicyVersion to delete an existing version + * before you create a new one.

+ *

Optionally, you can set the new version as the policy's default version. The default + * version is the operative version (that is, the version that is in effect for the + * certificates to which the policy is attached).

+ */ +class CreatePolicyVersionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreatePolicyVersionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreatePolicyVersionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreatePolicyVersionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreatePolicyVersionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreatePolicyVersionCommand(output, context); + } +} +exports.CreatePolicyVersionCommand = CreatePolicyVersionCommand; +//# sourceMappingURL=CreatePolicyVersionCommand.js.map + +/***/ }), + +/***/ 38826: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateProvisioningClaimCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a provisioning claim.

+ */ +class CreateProvisioningClaimCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateProvisioningClaimCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateProvisioningClaimRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateProvisioningClaimResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateProvisioningClaimCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateProvisioningClaimCommand(output, context); + } +} +exports.CreateProvisioningClaimCommand = CreateProvisioningClaimCommand; +//# sourceMappingURL=CreateProvisioningClaimCommand.js.map + +/***/ }), + +/***/ 79093: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateProvisioningTemplateCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a fleet provisioning template.

+ */ +class CreateProvisioningTemplateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateProvisioningTemplateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateProvisioningTemplateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateProvisioningTemplateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateProvisioningTemplateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateProvisioningTemplateCommand(output, context); + } +} +exports.CreateProvisioningTemplateCommand = CreateProvisioningTemplateCommand; +//# sourceMappingURL=CreateProvisioningTemplateCommand.js.map + +/***/ }), + +/***/ 28951: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateProvisioningTemplateVersionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a new version of a fleet provisioning template.

+ */ +class CreateProvisioningTemplateVersionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateProvisioningTemplateVersionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateProvisioningTemplateVersionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateProvisioningTemplateVersionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateProvisioningTemplateVersionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateProvisioningTemplateVersionCommand(output, context); + } +} +exports.CreateProvisioningTemplateVersionCommand = CreateProvisioningTemplateVersionCommand; +//# sourceMappingURL=CreateProvisioningTemplateVersionCommand.js.map + +/***/ }), + +/***/ 78443: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateRoleAliasCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a role alias.

+ */ +class CreateRoleAliasCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateRoleAliasCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateRoleAliasRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateRoleAliasResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateRoleAliasCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateRoleAliasCommand(output, context); + } +} +exports.CreateRoleAliasCommand = CreateRoleAliasCommand; +//# sourceMappingURL=CreateRoleAliasCommand.js.map + +/***/ }), + +/***/ 6809: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateScheduledAuditCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a scheduled audit that is run at a specified + * time interval.

+ */ +class CreateScheduledAuditCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateScheduledAuditCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateScheduledAuditRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateScheduledAuditResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateScheduledAuditCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateScheduledAuditCommand(output, context); + } +} +exports.CreateScheduledAuditCommand = CreateScheduledAuditCommand; +//# sourceMappingURL=CreateScheduledAuditCommand.js.map + +/***/ }), + +/***/ 56822: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateSecurityProfileCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a Device Defender security profile.

+ */ +class CreateSecurityProfileCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateSecurityProfileCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateSecurityProfileResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateSecurityProfileCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateSecurityProfileCommand(output, context); + } +} +exports.CreateSecurityProfileCommand = CreateSecurityProfileCommand; +//# sourceMappingURL=CreateSecurityProfileCommand.js.map + +/***/ }), + +/***/ 312: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateStreamCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a stream for delivering one or more large files in chunks over MQTT. A stream transports data + * bytes in chunks or blocks packaged as MQTT messages from a source like S3. You can have one or more files + * associated with a stream.

+ */ +class CreateStreamCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateStreamCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateStreamRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateStreamResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateStreamCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateStreamCommand(output, context); + } +} +exports.CreateStreamCommand = CreateStreamCommand; +//# sourceMappingURL=CreateStreamCommand.js.map + +/***/ }), + +/***/ 60949: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateThingCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a thing record in the registry. If this call is made multiple times using + * the same thing name and configuration, the call will succeed. If this call is made with + * the same thing name but different configuration a + * ResourceAlreadyExistsException is thrown.

+ * + *

This is a control plane operation. See Authorization for + * information about authorizing control plane actions.

+ *
+ */ +class CreateThingCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateThingCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateThingRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateThingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateThingCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateThingCommand(output, context); + } +} +exports.CreateThingCommand = CreateThingCommand; +//# sourceMappingURL=CreateThingCommand.js.map + +/***/ }), + +/***/ 99585: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateThingGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Create a thing group.

+ * + *

This is a control plane operation. See Authorization for + * information about authorizing control plane actions.

+ *
+ */ +class CreateThingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateThingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateThingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateThingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateThingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateThingGroupCommand(output, context); + } +} +exports.CreateThingGroupCommand = CreateThingGroupCommand; +//# sourceMappingURL=CreateThingGroupCommand.js.map + +/***/ }), + +/***/ 76406: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateThingTypeCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a new thing type.

+ */ +class CreateThingTypeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateThingTypeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateThingTypeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateThingTypeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateThingTypeCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateThingTypeCommand(output, context); + } +} +exports.CreateThingTypeCommand = CreateThingTypeCommand; +//# sourceMappingURL=CreateThingTypeCommand.js.map + +/***/ }), + +/***/ 96982: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateTopicRuleCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a rule. Creating rules is an administrator-level action. Any user who has + * permission to create rules will be able to access data processed by the rule.

+ */ +class CreateTopicRuleCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateTopicRuleCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateTopicRuleRequest.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_restJson1CreateTopicRuleCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateTopicRuleCommand(output, context); + } +} +exports.CreateTopicRuleCommand = CreateTopicRuleCommand; +//# sourceMappingURL=CreateTopicRuleCommand.js.map + +/***/ }), + +/***/ 15724: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateTopicRuleDestinationCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a topic rule destination. The destination must be confirmed prior to use.

+ */ +class CreateTopicRuleDestinationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "CreateTopicRuleDestinationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateTopicRuleDestinationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateTopicRuleDestinationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1CreateTopicRuleDestinationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1CreateTopicRuleDestinationCommand(output, context); + } +} +exports.CreateTopicRuleDestinationCommand = CreateTopicRuleDestinationCommand; +//# sourceMappingURL=CreateTopicRuleDestinationCommand.js.map + +/***/ }), + +/***/ 4430: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteAccountAuditConfigurationCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Restores the default settings for Device Defender audits for this account. Any + * configuration data you entered is deleted and all audit checks are reset to + * disabled.

+ */ +class DeleteAccountAuditConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteAccountAuditConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteAccountAuditConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteAccountAuditConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteAccountAuditConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteAccountAuditConfigurationCommand(output, context); + } +} +exports.DeleteAccountAuditConfigurationCommand = DeleteAccountAuditConfigurationCommand; +//# sourceMappingURL=DeleteAccountAuditConfigurationCommand.js.map + +/***/ }), + +/***/ 90704: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteAuditSuppressionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

+ * Deletes a Device Defender audit suppression. + *

+ */ +class DeleteAuditSuppressionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteAuditSuppressionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteAuditSuppressionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteAuditSuppressionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteAuditSuppressionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteAuditSuppressionCommand(output, context); + } +} +exports.DeleteAuditSuppressionCommand = DeleteAuditSuppressionCommand; +//# sourceMappingURL=DeleteAuditSuppressionCommand.js.map + +/***/ }), + +/***/ 32183: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteAuthorizerCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes an authorizer.

+ */ +class DeleteAuthorizerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteAuthorizerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteAuthorizerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteAuthorizerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteAuthorizerCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteAuthorizerCommand(output, context); + } +} +exports.DeleteAuthorizerCommand = DeleteAuthorizerCommand; +//# sourceMappingURL=DeleteAuthorizerCommand.js.map + +/***/ }), + +/***/ 56409: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteBillingGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the billing group.

+ */ +class DeleteBillingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteBillingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteBillingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteBillingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteBillingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteBillingGroupCommand(output, context); + } +} +exports.DeleteBillingGroupCommand = DeleteBillingGroupCommand; +//# sourceMappingURL=DeleteBillingGroupCommand.js.map + +/***/ }), + +/***/ 73697: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteCACertificateCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a registered CA certificate.

+ */ +class DeleteCACertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteCACertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteCACertificateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteCACertificateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteCACertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteCACertificateCommand(output, context); + } +} +exports.DeleteCACertificateCommand = DeleteCACertificateCommand; +//# sourceMappingURL=DeleteCACertificateCommand.js.map + +/***/ }), + +/***/ 63911: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteCertificateCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the specified certificate.

+ *

A certificate cannot be deleted if it has a policy or IoT thing attached to it or if + * its status is set to ACTIVE. To delete a certificate, first use the DetachPrincipalPolicy API to detach all policies. Next, use the UpdateCertificate API to set the certificate to the INACTIVE + * status.

+ */ +class DeleteCertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteCertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteCertificateRequest.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_restJson1DeleteCertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteCertificateCommand(output, context); + } +} +exports.DeleteCertificateCommand = DeleteCertificateCommand; +//# sourceMappingURL=DeleteCertificateCommand.js.map + +/***/ }), + +/***/ 91697: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteDimensionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Removes the specified dimension from your AWS account.

+ */ +class DeleteDimensionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteDimensionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteDimensionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteDimensionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteDimensionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteDimensionCommand(output, context); + } +} +exports.DeleteDimensionCommand = DeleteDimensionCommand; +//# sourceMappingURL=DeleteDimensionCommand.js.map + +/***/ }), + +/***/ 38666: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteDomainConfigurationCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the specified domain configuration.

+ * + *

The domain configuration feature is in public preview and is subject to change.

+ *
+ */ +class DeleteDomainConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteDomainConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteDomainConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteDomainConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteDomainConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteDomainConfigurationCommand(output, context); + } +} +exports.DeleteDomainConfigurationCommand = DeleteDomainConfigurationCommand; +//# sourceMappingURL=DeleteDomainConfigurationCommand.js.map + +/***/ }), + +/***/ 17557: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteDynamicThingGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a dynamic thing group.

+ */ +class DeleteDynamicThingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteDynamicThingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteDynamicThingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteDynamicThingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteDynamicThingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteDynamicThingGroupCommand(output, context); + } +} +exports.DeleteDynamicThingGroupCommand = DeleteDynamicThingGroupCommand; +//# sourceMappingURL=DeleteDynamicThingGroupCommand.js.map + +/***/ }), + +/***/ 22855: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteJobCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a job and its related job executions.

+ *

Deleting a job may take time, depending on the number of job + * executions created for the job and various other factors. While the job + * is being deleted, the status of the job will be shown as + * "DELETION_IN_PROGRESS". Attempting to delete or cancel a job whose status + * is already "DELETION_IN_PROGRESS" will result in an error.

+ *

Only 10 jobs may have status "DELETION_IN_PROGRESS" at the same time, or + * a LimitExceededException will occur.

+ */ +class DeleteJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteJobRequest.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_restJson1DeleteJobCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteJobCommand(output, context); + } +} +exports.DeleteJobCommand = DeleteJobCommand; +//# sourceMappingURL=DeleteJobCommand.js.map + +/***/ }), + +/***/ 39671: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteJobExecutionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a job execution.

+ */ +class DeleteJobExecutionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteJobExecutionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteJobExecutionRequest.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_restJson1DeleteJobExecutionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteJobExecutionCommand(output, context); + } +} +exports.DeleteJobExecutionCommand = DeleteJobExecutionCommand; +//# sourceMappingURL=DeleteJobExecutionCommand.js.map + +/***/ }), + +/***/ 45947: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteMitigationActionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a defined mitigation action from your AWS account.

+ */ +class DeleteMitigationActionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteMitigationActionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteMitigationActionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteMitigationActionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteMitigationActionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteMitigationActionCommand(output, context); + } +} +exports.DeleteMitigationActionCommand = DeleteMitigationActionCommand; +//# sourceMappingURL=DeleteMitigationActionCommand.js.map + +/***/ }), + +/***/ 52941: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteOTAUpdateCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Delete an OTA update.

+ */ +class DeleteOTAUpdateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteOTAUpdateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteOTAUpdateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteOTAUpdateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteOTAUpdateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteOTAUpdateCommand(output, context); + } +} +exports.DeleteOTAUpdateCommand = DeleteOTAUpdateCommand; +//# sourceMappingURL=DeleteOTAUpdateCommand.js.map + +/***/ }), + +/***/ 26106: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeletePolicyCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the specified policy.

+ *

A policy cannot be deleted if it has non-default versions or it is attached to any + * certificate.

+ *

To delete a policy, use the DeletePolicyVersion API to delete all non-default + * versions of the policy; use the DetachPrincipalPolicy API to detach the policy from any + * certificate; and then use the DeletePolicy API to delete the policy.

+ *

When a policy is deleted using DeletePolicy, its default version is deleted with + * it.

+ */ +class DeletePolicyCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeletePolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeletePolicyRequest.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_restJson1DeletePolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeletePolicyCommand(output, context); + } +} +exports.DeletePolicyCommand = DeletePolicyCommand; +//# sourceMappingURL=DeletePolicyCommand.js.map + +/***/ }), + +/***/ 67779: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeletePolicyVersionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the specified version of the specified policy. You cannot delete the default + * version of a policy using this API. To delete the default version of a policy, use DeletePolicy. To find out which version of a policy is marked as the default + * version, use ListPolicyVersions.

+ */ +class DeletePolicyVersionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeletePolicyVersionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeletePolicyVersionRequest.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_restJson1DeletePolicyVersionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeletePolicyVersionCommand(output, context); + } +} +exports.DeletePolicyVersionCommand = DeletePolicyVersionCommand; +//# sourceMappingURL=DeletePolicyVersionCommand.js.map + +/***/ }), + +/***/ 11659: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteProvisioningTemplateCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a fleet provisioning template.

+ */ +class DeleteProvisioningTemplateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteProvisioningTemplateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteProvisioningTemplateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteProvisioningTemplateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteProvisioningTemplateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteProvisioningTemplateCommand(output, context); + } +} +exports.DeleteProvisioningTemplateCommand = DeleteProvisioningTemplateCommand; +//# sourceMappingURL=DeleteProvisioningTemplateCommand.js.map + +/***/ }), + +/***/ 37562: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteProvisioningTemplateVersionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a fleet provisioning template version.

+ */ +class DeleteProvisioningTemplateVersionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteProvisioningTemplateVersionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteProvisioningTemplateVersionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteProvisioningTemplateVersionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteProvisioningTemplateVersionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteProvisioningTemplateVersionCommand(output, context); + } +} +exports.DeleteProvisioningTemplateVersionCommand = DeleteProvisioningTemplateVersionCommand; +//# sourceMappingURL=DeleteProvisioningTemplateVersionCommand.js.map + +/***/ }), + +/***/ 23235: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteRegistrationCodeCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a CA certificate registration code.

+ */ +class DeleteRegistrationCodeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteRegistrationCodeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteRegistrationCodeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteRegistrationCodeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteRegistrationCodeCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteRegistrationCodeCommand(output, context); + } +} +exports.DeleteRegistrationCodeCommand = DeleteRegistrationCodeCommand; +//# sourceMappingURL=DeleteRegistrationCodeCommand.js.map + +/***/ }), + +/***/ 42187: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteRoleAliasCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a role alias

+ */ +class DeleteRoleAliasCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteRoleAliasCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteRoleAliasRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteRoleAliasResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteRoleAliasCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteRoleAliasCommand(output, context); + } +} +exports.DeleteRoleAliasCommand = DeleteRoleAliasCommand; +//# sourceMappingURL=DeleteRoleAliasCommand.js.map + +/***/ }), + +/***/ 61685: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteScheduledAuditCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a scheduled audit.

+ */ +class DeleteScheduledAuditCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteScheduledAuditCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteScheduledAuditRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteScheduledAuditResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteScheduledAuditCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteScheduledAuditCommand(output, context); + } +} +exports.DeleteScheduledAuditCommand = DeleteScheduledAuditCommand; +//# sourceMappingURL=DeleteScheduledAuditCommand.js.map + +/***/ }), + +/***/ 77857: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteSecurityProfileCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a Device Defender security profile.

+ */ +class DeleteSecurityProfileCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteSecurityProfileCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteSecurityProfileResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteSecurityProfileCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteSecurityProfileCommand(output, context); + } +} +exports.DeleteSecurityProfileCommand = DeleteSecurityProfileCommand; +//# sourceMappingURL=DeleteSecurityProfileCommand.js.map + +/***/ }), + +/***/ 68349: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteStreamCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a stream.

+ */ +class DeleteStreamCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteStreamCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteStreamRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteStreamResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteStreamCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteStreamCommand(output, context); + } +} +exports.DeleteStreamCommand = DeleteStreamCommand; +//# sourceMappingURL=DeleteStreamCommand.js.map + +/***/ }), + +/***/ 31281: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteThingCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the specified thing. Returns successfully with no error if the deletion is + * successful or you specify a thing that doesn't exist.

+ */ +class DeleteThingCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteThingCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteThingRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteThingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteThingCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteThingCommand(output, context); + } +} +exports.DeleteThingCommand = DeleteThingCommand; +//# sourceMappingURL=DeleteThingCommand.js.map + +/***/ }), + +/***/ 73451: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteThingGroupCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a thing group.

+ */ +class DeleteThingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteThingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteThingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteThingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteThingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteThingGroupCommand(output, context); + } +} +exports.DeleteThingGroupCommand = DeleteThingGroupCommand; +//# sourceMappingURL=DeleteThingGroupCommand.js.map + +/***/ }), + +/***/ 36024: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteThingTypeCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the specified thing type. You cannot delete a thing type if it has things + * associated with it. To delete a thing type, first mark it as deprecated by calling DeprecateThingType, then remove any associated things by calling UpdateThing to change the thing type on any associated thing, and + * finally use DeleteThingType to delete the thing type.

+ */ +class DeleteThingTypeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteThingTypeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteThingTypeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteThingTypeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteThingTypeCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteThingTypeCommand(output, context); + } +} +exports.DeleteThingTypeCommand = DeleteThingTypeCommand; +//# sourceMappingURL=DeleteThingTypeCommand.js.map + +/***/ }), + +/***/ 32270: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteTopicRuleCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the rule.

+ */ +class DeleteTopicRuleCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteTopicRuleCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteTopicRuleRequest.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_restJson1DeleteTopicRuleCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteTopicRuleCommand(output, context); + } +} +exports.DeleteTopicRuleCommand = DeleteTopicRuleCommand; +//# sourceMappingURL=DeleteTopicRuleCommand.js.map + +/***/ }), + +/***/ 62838: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteTopicRuleDestinationCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a topic rule destination.

+ */ +class DeleteTopicRuleDestinationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteTopicRuleDestinationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteTopicRuleDestinationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteTopicRuleDestinationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeleteTopicRuleDestinationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteTopicRuleDestinationCommand(output, context); + } +} +exports.DeleteTopicRuleDestinationCommand = DeleteTopicRuleDestinationCommand; +//# sourceMappingURL=DeleteTopicRuleDestinationCommand.js.map + +/***/ }), + +/***/ 35964: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteV2LoggingLevelCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes a logging level.

+ */ +class DeleteV2LoggingLevelCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeleteV2LoggingLevelCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteV2LoggingLevelRequest.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_restJson1DeleteV2LoggingLevelCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeleteV2LoggingLevelCommand(output, context); + } +} +exports.DeleteV2LoggingLevelCommand = DeleteV2LoggingLevelCommand; +//# sourceMappingURL=DeleteV2LoggingLevelCommand.js.map + +/***/ }), + +/***/ 13748: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeprecateThingTypeCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deprecates a thing type. You can not associate new things with deprecated thing + * type.

+ */ +class DeprecateThingTypeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DeprecateThingTypeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeprecateThingTypeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeprecateThingTypeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DeprecateThingTypeCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DeprecateThingTypeCommand(output, context); + } +} +exports.DeprecateThingTypeCommand = DeprecateThingTypeCommand; +//# sourceMappingURL=DeprecateThingTypeCommand.js.map + +/***/ }), + +/***/ 13811: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeAccountAuditConfigurationCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about the Device Defender audit settings for this account. + * Settings include how audit notifications are sent and which audit checks are + * enabled or disabled.

+ */ +class DescribeAccountAuditConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeAccountAuditConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeAccountAuditConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeAccountAuditConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeAccountAuditConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeAccountAuditConfigurationCommand(output, context); + } +} +exports.DescribeAccountAuditConfigurationCommand = DescribeAccountAuditConfigurationCommand; +//# sourceMappingURL=DescribeAccountAuditConfigurationCommand.js.map + +/***/ }), + +/***/ 91538: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeAuditFindingCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about a single audit finding. Properties include the reason for noncompliance, the severity of the issue, and when the audit that returned the finding was started.

+ */ +class DescribeAuditFindingCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeAuditFindingCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeAuditFindingRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeAuditFindingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeAuditFindingCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeAuditFindingCommand(output, context); + } +} +exports.DescribeAuditFindingCommand = DescribeAuditFindingCommand; +//# sourceMappingURL=DescribeAuditFindingCommand.js.map + +/***/ }), + +/***/ 16532: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeAuditMitigationActionsTaskCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about an audit mitigation task that is used to apply mitigation actions to a set of audit findings. Properties include the actions being applied, the audit checks to which they're being applied, the task status, and aggregated task statistics.

+ */ +class DescribeAuditMitigationActionsTaskCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeAuditMitigationActionsTaskCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeAuditMitigationActionsTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeAuditMitigationActionsTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeAuditMitigationActionsTaskCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeAuditMitigationActionsTaskCommand(output, context); + } +} +exports.DescribeAuditMitigationActionsTaskCommand = DescribeAuditMitigationActionsTaskCommand; +//# sourceMappingURL=DescribeAuditMitigationActionsTaskCommand.js.map + +/***/ }), + +/***/ 84970: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeAuditSuppressionCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

+ * Gets information about a Device Defender audit suppression. + *

+ */ +class DescribeAuditSuppressionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeAuditSuppressionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeAuditSuppressionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeAuditSuppressionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeAuditSuppressionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeAuditSuppressionCommand(output, context); + } +} +exports.DescribeAuditSuppressionCommand = DescribeAuditSuppressionCommand; +//# sourceMappingURL=DescribeAuditSuppressionCommand.js.map + +/***/ }), + +/***/ 74328: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeAuditTaskCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about a Device Defender audit.

+ */ +class DescribeAuditTaskCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeAuditTaskCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeAuditTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeAuditTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeAuditTaskCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeAuditTaskCommand(output, context); + } +} +exports.DescribeAuditTaskCommand = DescribeAuditTaskCommand; +//# sourceMappingURL=DescribeAuditTaskCommand.js.map + +/***/ }), + +/***/ 85629: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeAuthorizerCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes an authorizer.

+ */ +class DescribeAuthorizerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeAuthorizerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeAuthorizerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeAuthorizerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeAuthorizerCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeAuthorizerCommand(output, context); + } +} +exports.DescribeAuthorizerCommand = DescribeAuthorizerCommand; +//# sourceMappingURL=DescribeAuthorizerCommand.js.map + +/***/ }), + +/***/ 40564: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeBillingGroupCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns information about a billing group.

+ */ +class DescribeBillingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeBillingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeBillingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeBillingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeBillingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeBillingGroupCommand(output, context); + } +} +exports.DescribeBillingGroupCommand = DescribeBillingGroupCommand; +//# sourceMappingURL=DescribeBillingGroupCommand.js.map + +/***/ }), + +/***/ 42279: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeCACertificateCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes a registered CA certificate.

+ */ +class DescribeCACertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeCACertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeCACertificateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeCACertificateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeCACertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeCACertificateCommand(output, context); + } +} +exports.DescribeCACertificateCommand = DescribeCACertificateCommand; +//# sourceMappingURL=DescribeCACertificateCommand.js.map + +/***/ }), + +/***/ 78585: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeCertificateCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about the specified certificate.

+ */ +class DescribeCertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeCertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeCertificateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeCertificateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeCertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeCertificateCommand(output, context); + } +} +exports.DescribeCertificateCommand = DescribeCertificateCommand; +//# sourceMappingURL=DescribeCertificateCommand.js.map + +/***/ }), + +/***/ 68623: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeDefaultAuthorizerCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes the default authorizer.

+ */ +class DescribeDefaultAuthorizerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeDefaultAuthorizerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeDefaultAuthorizerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeDefaultAuthorizerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeDefaultAuthorizerCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeDefaultAuthorizerCommand(output, context); + } +} +exports.DescribeDefaultAuthorizerCommand = DescribeDefaultAuthorizerCommand; +//# sourceMappingURL=DescribeDefaultAuthorizerCommand.js.map + +/***/ }), + +/***/ 46755: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeDimensionCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Provides details about a dimension that is defined in your AWS account.

+ */ +class DescribeDimensionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeDimensionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeDimensionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeDimensionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeDimensionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeDimensionCommand(output, context); + } +} +exports.DescribeDimensionCommand = DescribeDimensionCommand; +//# sourceMappingURL=DescribeDimensionCommand.js.map + +/***/ }), + +/***/ 83673: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeDomainConfigurationCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets summary information about a domain configuration.

+ * + *

The domain configuration feature is in public preview and is subject to change.

+ *
+ */ +class DescribeDomainConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeDomainConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeDomainConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeDomainConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeDomainConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeDomainConfigurationCommand(output, context); + } +} +exports.DescribeDomainConfigurationCommand = DescribeDomainConfigurationCommand; +//# sourceMappingURL=DescribeDomainConfigurationCommand.js.map + +/***/ }), + +/***/ 77554: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeEndpointCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a unique endpoint specific to the AWS account making the call.

+ */ +class DescribeEndpointCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeEndpointCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeEndpointRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeEndpointResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeEndpointCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeEndpointCommand(output, context); + } +} +exports.DescribeEndpointCommand = DescribeEndpointCommand; +//# sourceMappingURL=DescribeEndpointCommand.js.map + +/***/ }), + +/***/ 87665: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeEventConfigurationsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes event configurations.

+ */ +class DescribeEventConfigurationsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeEventConfigurationsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeEventConfigurationsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeEventConfigurationsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeEventConfigurationsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeEventConfigurationsCommand(output, context); + } +} +exports.DescribeEventConfigurationsCommand = DescribeEventConfigurationsCommand; +//# sourceMappingURL=DescribeEventConfigurationsCommand.js.map + +/***/ }), + +/***/ 77948: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeIndexCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes a search index.

+ */ +class DescribeIndexCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeIndexCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeIndexRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeIndexResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeIndexCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeIndexCommand(output, context); + } +} +exports.DescribeIndexCommand = DescribeIndexCommand; +//# sourceMappingURL=DescribeIndexCommand.js.map + +/***/ }), + +/***/ 28980: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeJobCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes a job.

+ */ +class DescribeJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeJobCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeJobCommand(output, context); + } +} +exports.DescribeJobCommand = DescribeJobCommand; +//# sourceMappingURL=DescribeJobCommand.js.map + +/***/ }), + +/***/ 65547: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeJobExecutionCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes a job execution.

+ */ +class DescribeJobExecutionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeJobExecutionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeJobExecutionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeJobExecutionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeJobExecutionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeJobExecutionCommand(output, context); + } +} +exports.DescribeJobExecutionCommand = DescribeJobExecutionCommand; +//# sourceMappingURL=DescribeJobExecutionCommand.js.map + +/***/ }), + +/***/ 1175: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeMitigationActionCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about a mitigation action.

+ */ +class DescribeMitigationActionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeMitigationActionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeMitigationActionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeMitigationActionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeMitigationActionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeMitigationActionCommand(output, context); + } +} +exports.DescribeMitigationActionCommand = DescribeMitigationActionCommand; +//# sourceMappingURL=DescribeMitigationActionCommand.js.map + +/***/ }), + +/***/ 44539: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeProvisioningTemplateCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns information about a fleet provisioning template.

+ */ +class DescribeProvisioningTemplateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeProvisioningTemplateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeProvisioningTemplateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeProvisioningTemplateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeProvisioningTemplateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeProvisioningTemplateCommand(output, context); + } +} +exports.DescribeProvisioningTemplateCommand = DescribeProvisioningTemplateCommand; +//# sourceMappingURL=DescribeProvisioningTemplateCommand.js.map + +/***/ }), + +/***/ 34488: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeProvisioningTemplateVersionCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns information about a fleet provisioning template version.

+ */ +class DescribeProvisioningTemplateVersionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeProvisioningTemplateVersionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeProvisioningTemplateVersionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeProvisioningTemplateVersionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeProvisioningTemplateVersionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeProvisioningTemplateVersionCommand(output, context); + } +} +exports.DescribeProvisioningTemplateVersionCommand = DescribeProvisioningTemplateVersionCommand; +//# sourceMappingURL=DescribeProvisioningTemplateVersionCommand.js.map + +/***/ }), + +/***/ 44504: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeRoleAliasCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes a role alias.

+ */ +class DescribeRoleAliasCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeRoleAliasCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeRoleAliasRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeRoleAliasResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeRoleAliasCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeRoleAliasCommand(output, context); + } +} +exports.DescribeRoleAliasCommand = DescribeRoleAliasCommand; +//# sourceMappingURL=DescribeRoleAliasCommand.js.map + +/***/ }), + +/***/ 61131: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeScheduledAuditCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about a scheduled audit.

+ */ +class DescribeScheduledAuditCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeScheduledAuditCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeScheduledAuditRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeScheduledAuditResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeScheduledAuditCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeScheduledAuditCommand(output, context); + } +} +exports.DescribeScheduledAuditCommand = DescribeScheduledAuditCommand; +//# sourceMappingURL=DescribeScheduledAuditCommand.js.map + +/***/ }), + +/***/ 22237: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeSecurityProfileCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about a Device Defender security profile.

+ */ +class DescribeSecurityProfileCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeSecurityProfileCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeSecurityProfileResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeSecurityProfileCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeSecurityProfileCommand(output, context); + } +} +exports.DescribeSecurityProfileCommand = DescribeSecurityProfileCommand; +//# sourceMappingURL=DescribeSecurityProfileCommand.js.map + +/***/ }), + +/***/ 90953: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeStreamCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about a stream.

+ */ +class DescribeStreamCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeStreamCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeStreamRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeStreamResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeStreamCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeStreamCommand(output, context); + } +} +exports.DescribeStreamCommand = DescribeStreamCommand; +//# sourceMappingURL=DescribeStreamCommand.js.map + +/***/ }), + +/***/ 44526: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeThingCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about the specified thing.

+ */ +class DescribeThingCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeThingCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeThingRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeThingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeThingCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeThingCommand(output, context); + } +} +exports.DescribeThingCommand = DescribeThingCommand; +//# sourceMappingURL=DescribeThingCommand.js.map + +/***/ }), + +/***/ 19878: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeThingGroupCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describe a thing group.

+ */ +class DescribeThingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeThingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeThingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeThingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeThingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeThingGroupCommand(output, context); + } +} +exports.DescribeThingGroupCommand = DescribeThingGroupCommand; +//# sourceMappingURL=DescribeThingGroupCommand.js.map + +/***/ }), + +/***/ 83198: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeThingRegistrationTaskCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Describes a bulk thing provisioning task.

+ */ +class DescribeThingRegistrationTaskCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeThingRegistrationTaskCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeThingRegistrationTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeThingRegistrationTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeThingRegistrationTaskCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeThingRegistrationTaskCommand(output, context); + } +} +exports.DescribeThingRegistrationTaskCommand = DescribeThingRegistrationTaskCommand; +//# sourceMappingURL=DescribeThingRegistrationTaskCommand.js.map + +/***/ }), + +/***/ 50780: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeThingTypeCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about the specified thing type.

+ */ +class DescribeThingTypeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DescribeThingTypeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DescribeThingTypeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DescribeThingTypeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DescribeThingTypeCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DescribeThingTypeCommand(output, context); + } +} +exports.DescribeThingTypeCommand = DescribeThingTypeCommand; +//# sourceMappingURL=DescribeThingTypeCommand.js.map + +/***/ }), + +/***/ 17402: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DetachPolicyCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Detaches a policy from the specified target.

+ */ +class DetachPolicyCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DetachPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DetachPolicyRequest.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_restJson1DetachPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DetachPolicyCommand(output, context); + } +} +exports.DetachPolicyCommand = DetachPolicyCommand; +//# sourceMappingURL=DetachPolicyCommand.js.map + +/***/ }), + +/***/ 7189: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DetachPrincipalPolicyCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + * @deprecated + * + *

Removes the specified policy from the specified certificate.

+ *

+ * Note: This API is deprecated. Please use DetachPolicy instead.

+ */ +class DetachPrincipalPolicyCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DetachPrincipalPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DetachPrincipalPolicyRequest.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_restJson1DetachPrincipalPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DetachPrincipalPolicyCommand(output, context); + } +} +exports.DetachPrincipalPolicyCommand = DetachPrincipalPolicyCommand; +//# sourceMappingURL=DetachPrincipalPolicyCommand.js.map + +/***/ }), + +/***/ 9688: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DetachSecurityProfileCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Disassociates a Device Defender security profile from a thing group or from this account.

+ */ +class DetachSecurityProfileCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DetachSecurityProfileCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DetachSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DetachSecurityProfileResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DetachSecurityProfileCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DetachSecurityProfileCommand(output, context); + } +} +exports.DetachSecurityProfileCommand = DetachSecurityProfileCommand; +//# sourceMappingURL=DetachSecurityProfileCommand.js.map + +/***/ }), + +/***/ 71366: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DetachThingPrincipalCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Detaches the specified principal from the specified thing. A principal can be X.509 + * certificates, IAM users, groups, and roles, Amazon Cognito identities or federated + * identities.

+ * + *

This call is asynchronous. It might take several seconds for the detachment to + * propagate.

+ *
+ */ +class DetachThingPrincipalCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DetachThingPrincipalCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DetachThingPrincipalRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.DetachThingPrincipalResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1DetachThingPrincipalCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DetachThingPrincipalCommand(output, context); + } +} +exports.DetachThingPrincipalCommand = DetachThingPrincipalCommand; +//# sourceMappingURL=DetachThingPrincipalCommand.js.map + +/***/ }), + +/***/ 79248: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DisableTopicRuleCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Disables the rule.

+ */ +class DisableTopicRuleCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "DisableTopicRuleCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.DisableTopicRuleRequest.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_restJson1DisableTopicRuleCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1DisableTopicRuleCommand(output, context); + } +} +exports.DisableTopicRuleCommand = DisableTopicRuleCommand; +//# sourceMappingURL=DisableTopicRuleCommand.js.map + +/***/ }), + +/***/ 83282: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EnableTopicRuleCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Enables the rule.

+ */ +class EnableTopicRuleCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "EnableTopicRuleCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.EnableTopicRuleRequest.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_restJson1EnableTopicRuleCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1EnableTopicRuleCommand(output, context); + } +} +exports.EnableTopicRuleCommand = EnableTopicRuleCommand; +//# sourceMappingURL=EnableTopicRuleCommand.js.map + +/***/ }), + +/***/ 19687: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetCardinalityCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the approximate count of unique values that match the query.

+ */ +class GetCardinalityCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetCardinalityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetCardinalityRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetCardinalityResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetCardinalityCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetCardinalityCommand(output, context); + } +} +exports.GetCardinalityCommand = GetCardinalityCommand; +//# sourceMappingURL=GetCardinalityCommand.js.map + +/***/ }), + +/***/ 51757: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetEffectivePoliciesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets a list of the policies that have an effect on the authorization behavior of the + * specified device when it connects to the AWS IoT device gateway.

+ */ +class GetEffectivePoliciesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetEffectivePoliciesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetEffectivePoliciesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetEffectivePoliciesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetEffectivePoliciesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetEffectivePoliciesCommand(output, context); + } +} +exports.GetEffectivePoliciesCommand = GetEffectivePoliciesCommand; +//# sourceMappingURL=GetEffectivePoliciesCommand.js.map + +/***/ }), + +/***/ 189: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetIndexingConfigurationCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the indexing configuration.

+ */ +class GetIndexingConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetIndexingConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetIndexingConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetIndexingConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetIndexingConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetIndexingConfigurationCommand(output, context); + } +} +exports.GetIndexingConfigurationCommand = GetIndexingConfigurationCommand; +//# sourceMappingURL=GetIndexingConfigurationCommand.js.map + +/***/ }), + +/***/ 91665: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetJobDocumentCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets a job document.

+ */ +class GetJobDocumentCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetJobDocumentCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetJobDocumentRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetJobDocumentResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetJobDocumentCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetJobDocumentCommand(output, context); + } +} +exports.GetJobDocumentCommand = GetJobDocumentCommand; +//# sourceMappingURL=GetJobDocumentCommand.js.map + +/***/ }), + +/***/ 57429: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetLoggingOptionsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the logging options.

+ *

NOTE: use of this command is not recommended. Use GetV2LoggingOptions + * instead.

+ */ +class GetLoggingOptionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetLoggingOptionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetLoggingOptionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetLoggingOptionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetLoggingOptionsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetLoggingOptionsCommand(output, context); + } +} +exports.GetLoggingOptionsCommand = GetLoggingOptionsCommand; +//# sourceMappingURL=GetLoggingOptionsCommand.js.map + +/***/ }), + +/***/ 24694: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetOTAUpdateCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets an OTA update.

+ */ +class GetOTAUpdateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetOTAUpdateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetOTAUpdateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetOTAUpdateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetOTAUpdateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetOTAUpdateCommand(output, context); + } +} +exports.GetOTAUpdateCommand = GetOTAUpdateCommand; +//# sourceMappingURL=GetOTAUpdateCommand.js.map + +/***/ }), + +/***/ 33048: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetPercentilesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Groups the aggregated values that match the query into percentile groupings. The default + * percentile groupings are: 1,5,25,50,75,95,99, although you can specify your own + * when you call GetPercentiles. This function returns a value for each + * percentile group specified (or the default percentile groupings). The percentile group + * "1" contains the aggregated field value that occurs in approximately one percent of the + * values that match the query. The percentile group "5" contains the aggregated field value + * that occurs in approximately five percent of the values that match the query, and so on. + * The result is an approximation, the more values that match the query, the more accurate + * the percentile values.

+ */ +class GetPercentilesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetPercentilesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetPercentilesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetPercentilesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetPercentilesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetPercentilesCommand(output, context); + } +} +exports.GetPercentilesCommand = GetPercentilesCommand; +//# sourceMappingURL=GetPercentilesCommand.js.map + +/***/ }), + +/***/ 22965: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetPolicyCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about the specified policy with the policy document of the default + * version.

+ */ +class GetPolicyCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetPolicyCommand(output, context); + } +} +exports.GetPolicyCommand = GetPolicyCommand; +//# sourceMappingURL=GetPolicyCommand.js.map + +/***/ }), + +/***/ 51843: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetPolicyVersionCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about the specified policy version.

+ */ +class GetPolicyVersionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetPolicyVersionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetPolicyVersionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetPolicyVersionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetPolicyVersionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetPolicyVersionCommand(output, context); + } +} +exports.GetPolicyVersionCommand = GetPolicyVersionCommand; +//# sourceMappingURL=GetPolicyVersionCommand.js.map + +/***/ }), + +/***/ 22069: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetRegistrationCodeCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets a registration code used to register a CA certificate with AWS IoT.

+ */ +class GetRegistrationCodeCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetRegistrationCodeCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetRegistrationCodeRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetRegistrationCodeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetRegistrationCodeCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetRegistrationCodeCommand(output, context); + } +} +exports.GetRegistrationCodeCommand = GetRegistrationCodeCommand; +//# sourceMappingURL=GetRegistrationCodeCommand.js.map + +/***/ }), + +/***/ 36408: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetStatisticsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the count, average, sum, minimum, maximum, sum of squares, variance, + * and standard deviation for the specified aggregated field. If the aggregation field is of type + * String, only the count statistic is returned.

+ */ +class GetStatisticsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetStatisticsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetStatisticsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetStatisticsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetStatisticsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetStatisticsCommand(output, context); + } +} +exports.GetStatisticsCommand = GetStatisticsCommand; +//# sourceMappingURL=GetStatisticsCommand.js.map + +/***/ }), + +/***/ 82246: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetTopicRuleCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about the rule.

+ */ +class GetTopicRuleCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetTopicRuleCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetTopicRuleRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetTopicRuleResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetTopicRuleCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetTopicRuleCommand(output, context); + } +} +exports.GetTopicRuleCommand = GetTopicRuleCommand; +//# sourceMappingURL=GetTopicRuleCommand.js.map + +/***/ }), + +/***/ 93616: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetTopicRuleDestinationCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets information about a topic rule destination.

+ */ +class GetTopicRuleDestinationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetTopicRuleDestinationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetTopicRuleDestinationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetTopicRuleDestinationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetTopicRuleDestinationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetTopicRuleDestinationCommand(output, context); + } +} +exports.GetTopicRuleDestinationCommand = GetTopicRuleDestinationCommand; +//# sourceMappingURL=GetTopicRuleDestinationCommand.js.map + +/***/ }), + +/***/ 23036: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetV2LoggingOptionsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the fine grained logging options.

+ */ +class GetV2LoggingOptionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "GetV2LoggingOptionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.GetV2LoggingOptionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.GetV2LoggingOptionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetV2LoggingOptionsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetV2LoggingOptionsCommand(output, context); + } +} +exports.GetV2LoggingOptionsCommand = GetV2LoggingOptionsCommand; +//# sourceMappingURL=GetV2LoggingOptionsCommand.js.map + +/***/ }), + +/***/ 90886: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListActiveViolationsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the active violations for a given Device Defender security profile.

+ */ +class ListActiveViolationsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListActiveViolationsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListActiveViolationsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListActiveViolationsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListActiveViolationsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListActiveViolationsCommand(output, context); + } +} +exports.ListActiveViolationsCommand = ListActiveViolationsCommand; +//# sourceMappingURL=ListActiveViolationsCommand.js.map + +/***/ }), + +/***/ 59388: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListAttachedPoliciesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the policies attached to the specified thing group.

+ */ +class ListAttachedPoliciesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListAttachedPoliciesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListAttachedPoliciesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListAttachedPoliciesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListAttachedPoliciesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListAttachedPoliciesCommand(output, context); + } +} +exports.ListAttachedPoliciesCommand = ListAttachedPoliciesCommand; +//# sourceMappingURL=ListAttachedPoliciesCommand.js.map + +/***/ }), + +/***/ 55133: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListAuditFindingsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the findings (results) of a Device Defender audit or of the audits + * performed during a specified time period. (Findings are retained for 90 days.)

+ */ +class ListAuditFindingsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListAuditFindingsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListAuditFindingsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListAuditFindingsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListAuditFindingsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListAuditFindingsCommand(output, context); + } +} +exports.ListAuditFindingsCommand = ListAuditFindingsCommand; +//# sourceMappingURL=ListAuditFindingsCommand.js.map + +/***/ }), + +/***/ 35836: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListAuditMitigationActionsExecutionsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets the status of audit mitigation action tasks that were executed.

+ */ +class ListAuditMitigationActionsExecutionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListAuditMitigationActionsExecutionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListAuditMitigationActionsExecutionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListAuditMitigationActionsExecutionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListAuditMitigationActionsExecutionsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListAuditMitigationActionsExecutionsCommand(output, context); + } +} +exports.ListAuditMitigationActionsExecutionsCommand = ListAuditMitigationActionsExecutionsCommand; +//# sourceMappingURL=ListAuditMitigationActionsExecutionsCommand.js.map + +/***/ }), + +/***/ 45704: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListAuditMitigationActionsTasksCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets a list of audit mitigation action tasks that match the specified filters.

+ */ +class ListAuditMitigationActionsTasksCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListAuditMitigationActionsTasksCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListAuditMitigationActionsTasksRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListAuditMitigationActionsTasksResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListAuditMitigationActionsTasksCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListAuditMitigationActionsTasksCommand(output, context); + } +} +exports.ListAuditMitigationActionsTasksCommand = ListAuditMitigationActionsTasksCommand; +//# sourceMappingURL=ListAuditMitigationActionsTasksCommand.js.map + +/***/ }), + +/***/ 60827: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListAuditSuppressionsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

+ * Lists your Device Defender audit listings. + *

+ */ +class ListAuditSuppressionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListAuditSuppressionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListAuditSuppressionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListAuditSuppressionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListAuditSuppressionsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListAuditSuppressionsCommand(output, context); + } +} +exports.ListAuditSuppressionsCommand = ListAuditSuppressionsCommand; +//# sourceMappingURL=ListAuditSuppressionsCommand.js.map + +/***/ }), + +/***/ 50108: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListAuditTasksCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the Device Defender audits that have been performed during a given + * time period.

+ */ +class ListAuditTasksCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListAuditTasksCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListAuditTasksRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListAuditTasksResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListAuditTasksCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListAuditTasksCommand(output, context); + } +} +exports.ListAuditTasksCommand = ListAuditTasksCommand; +//# sourceMappingURL=ListAuditTasksCommand.js.map + +/***/ }), + +/***/ 99389: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListAuthorizersCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the authorizers registered in your account.

+ */ +class ListAuthorizersCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListAuthorizersCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListAuthorizersRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListAuthorizersResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListAuthorizersCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListAuthorizersCommand(output, context); + } +} +exports.ListAuthorizersCommand = ListAuthorizersCommand; +//# sourceMappingURL=ListAuthorizersCommand.js.map + +/***/ }), + +/***/ 13648: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListBillingGroupsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the billing groups you have created.

+ */ +class ListBillingGroupsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListBillingGroupsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListBillingGroupsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListBillingGroupsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListBillingGroupsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListBillingGroupsCommand(output, context); + } +} +exports.ListBillingGroupsCommand = ListBillingGroupsCommand; +//# sourceMappingURL=ListBillingGroupsCommand.js.map + +/***/ }), + +/***/ 77650: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListCACertificatesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the CA certificates registered for your AWS account.

+ *

The results are paginated with a default page size of 25. You can use the returned + * marker to retrieve additional results.

+ */ +class ListCACertificatesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListCACertificatesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListCACertificatesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListCACertificatesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListCACertificatesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListCACertificatesCommand(output, context); + } +} +exports.ListCACertificatesCommand = ListCACertificatesCommand; +//# sourceMappingURL=ListCACertificatesCommand.js.map + +/***/ }), + +/***/ 23163: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListCertificatesByCACommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

List the device certificates signed by the specified CA certificate.

+ */ +class ListCertificatesByCACommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListCertificatesByCACommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListCertificatesByCARequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListCertificatesByCAResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListCertificatesByCACommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListCertificatesByCACommand(output, context); + } +} +exports.ListCertificatesByCACommand = ListCertificatesByCACommand; +//# sourceMappingURL=ListCertificatesByCACommand.js.map + +/***/ }), + +/***/ 14749: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListCertificatesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the certificates registered in your AWS account.

+ *

The results are paginated with a default page size of 25. You can use the returned + * marker to retrieve additional results.

+ */ +class ListCertificatesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListCertificatesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListCertificatesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListCertificatesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListCertificatesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListCertificatesCommand(output, context); + } +} +exports.ListCertificatesCommand = ListCertificatesCommand; +//# sourceMappingURL=ListCertificatesCommand.js.map + +/***/ }), + +/***/ 74775: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListDimensionsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

List the set of dimensions that are defined for your AWS account.

+ */ +class ListDimensionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListDimensionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListDimensionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListDimensionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListDimensionsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListDimensionsCommand(output, context); + } +} +exports.ListDimensionsCommand = ListDimensionsCommand; +//# sourceMappingURL=ListDimensionsCommand.js.map + +/***/ }), + +/***/ 75947: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListDomainConfigurationsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets a list of domain configurations for the user. This list is sorted alphabetically by domain configuration name.

+ * + *

The domain configuration feature is in public preview and is subject to change.

+ *
+ */ +class ListDomainConfigurationsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListDomainConfigurationsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListDomainConfigurationsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListDomainConfigurationsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListDomainConfigurationsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListDomainConfigurationsCommand(output, context); + } +} +exports.ListDomainConfigurationsCommand = ListDomainConfigurationsCommand; +//# sourceMappingURL=ListDomainConfigurationsCommand.js.map + +/***/ }), + +/***/ 36240: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListIndicesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the search indices.

+ */ +class ListIndicesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListIndicesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListIndicesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListIndicesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListIndicesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListIndicesCommand(output, context); + } +} +exports.ListIndicesCommand = ListIndicesCommand; +//# sourceMappingURL=ListIndicesCommand.js.map + +/***/ }), + +/***/ 68068: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListJobExecutionsForJobCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the job executions for a job.

+ */ +class ListJobExecutionsForJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListJobExecutionsForJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListJobExecutionsForJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListJobExecutionsForJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListJobExecutionsForJobCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListJobExecutionsForJobCommand(output, context); + } +} +exports.ListJobExecutionsForJobCommand = ListJobExecutionsForJobCommand; +//# sourceMappingURL=ListJobExecutionsForJobCommand.js.map + +/***/ }), + +/***/ 20874: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListJobExecutionsForThingCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the job executions for the specified thing.

+ */ +class ListJobExecutionsForThingCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListJobExecutionsForThingCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListJobExecutionsForThingRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListJobExecutionsForThingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListJobExecutionsForThingCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListJobExecutionsForThingCommand(output, context); + } +} +exports.ListJobExecutionsForThingCommand = ListJobExecutionsForThingCommand; +//# sourceMappingURL=ListJobExecutionsForThingCommand.js.map + +/***/ }), + +/***/ 25341: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListJobsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists jobs.

+ */ +class ListJobsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListJobsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListJobsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListJobsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListJobsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListJobsCommand(output, context); + } +} +exports.ListJobsCommand = ListJobsCommand; +//# sourceMappingURL=ListJobsCommand.js.map + +/***/ }), + +/***/ 93159: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListMitigationActionsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets a list of all mitigation actions that match the specified filter criteria.

+ */ +class ListMitigationActionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListMitigationActionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListMitigationActionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListMitigationActionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListMitigationActionsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListMitigationActionsCommand(output, context); + } +} +exports.ListMitigationActionsCommand = ListMitigationActionsCommand; +//# sourceMappingURL=ListMitigationActionsCommand.js.map + +/***/ }), + +/***/ 76188: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListOTAUpdatesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists OTA updates.

+ */ +class ListOTAUpdatesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListOTAUpdatesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListOTAUpdatesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListOTAUpdatesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListOTAUpdatesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListOTAUpdatesCommand(output, context); + } +} +exports.ListOTAUpdatesCommand = ListOTAUpdatesCommand; +//# sourceMappingURL=ListOTAUpdatesCommand.js.map + +/***/ }), + +/***/ 90321: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListOutgoingCertificatesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists certificates that are being transferred but not yet accepted.

+ */ +class ListOutgoingCertificatesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListOutgoingCertificatesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListOutgoingCertificatesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListOutgoingCertificatesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListOutgoingCertificatesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListOutgoingCertificatesCommand(output, context); + } +} +exports.ListOutgoingCertificatesCommand = ListOutgoingCertificatesCommand; +//# sourceMappingURL=ListOutgoingCertificatesCommand.js.map + +/***/ }), + +/***/ 81192: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListPoliciesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists your policies.

+ */ +class ListPoliciesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListPoliciesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListPoliciesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListPoliciesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListPoliciesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListPoliciesCommand(output, context); + } +} +exports.ListPoliciesCommand = ListPoliciesCommand; +//# sourceMappingURL=ListPoliciesCommand.js.map + +/***/ }), + +/***/ 86657: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListPolicyPrincipalsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + * @deprecated + * + *

Lists the principals associated with the specified policy.

+ *

+ * Note: This API is deprecated. Please use ListTargetsForPolicy instead.

+ */ +class ListPolicyPrincipalsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListPolicyPrincipalsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListPolicyPrincipalsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListPolicyPrincipalsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListPolicyPrincipalsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListPolicyPrincipalsCommand(output, context); + } +} +exports.ListPolicyPrincipalsCommand = ListPolicyPrincipalsCommand; +//# sourceMappingURL=ListPolicyPrincipalsCommand.js.map + +/***/ }), + +/***/ 21085: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListPolicyVersionsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the versions of the specified policy and identifies the default + * version.

+ */ +class ListPolicyVersionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListPolicyVersionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListPolicyVersionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListPolicyVersionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListPolicyVersionsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListPolicyVersionsCommand(output, context); + } +} +exports.ListPolicyVersionsCommand = ListPolicyVersionsCommand; +//# sourceMappingURL=ListPolicyVersionsCommand.js.map + +/***/ }), + +/***/ 3702: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListPrincipalPoliciesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + * @deprecated + * + *

Lists the policies attached to the specified principal. If you use an Cognito + * identity, the ID must be in AmazonCognito Identity format.

+ *

+ * Note: This API is deprecated. Please use ListAttachedPolicies instead.

+ */ +class ListPrincipalPoliciesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListPrincipalPoliciesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListPrincipalPoliciesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListPrincipalPoliciesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListPrincipalPoliciesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListPrincipalPoliciesCommand(output, context); + } +} +exports.ListPrincipalPoliciesCommand = ListPrincipalPoliciesCommand; +//# sourceMappingURL=ListPrincipalPoliciesCommand.js.map + +/***/ }), + +/***/ 62558: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListPrincipalThingsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the things associated with the specified principal. A principal can be X.509 + * certificates, IAM users, groups, and roles, Amazon Cognito identities or federated + * identities.

+ */ +class ListPrincipalThingsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListPrincipalThingsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListPrincipalThingsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListPrincipalThingsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListPrincipalThingsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListPrincipalThingsCommand(output, context); + } +} +exports.ListPrincipalThingsCommand = ListPrincipalThingsCommand; +//# sourceMappingURL=ListPrincipalThingsCommand.js.map + +/***/ }), + +/***/ 48529: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListProvisioningTemplateVersionsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

A list of fleet provisioning template versions.

+ */ +class ListProvisioningTemplateVersionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListProvisioningTemplateVersionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListProvisioningTemplateVersionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListProvisioningTemplateVersionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListProvisioningTemplateVersionsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListProvisioningTemplateVersionsCommand(output, context); + } +} +exports.ListProvisioningTemplateVersionsCommand = ListProvisioningTemplateVersionsCommand; +//# sourceMappingURL=ListProvisioningTemplateVersionsCommand.js.map + +/***/ }), + +/***/ 59524: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListProvisioningTemplatesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the fleet provisioning templates in your AWS account.

+ */ +class ListProvisioningTemplatesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListProvisioningTemplatesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListProvisioningTemplatesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListProvisioningTemplatesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListProvisioningTemplatesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListProvisioningTemplatesCommand(output, context); + } +} +exports.ListProvisioningTemplatesCommand = ListProvisioningTemplatesCommand; +//# sourceMappingURL=ListProvisioningTemplatesCommand.js.map + +/***/ }), + +/***/ 31543: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListRoleAliasesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the role aliases registered in your account.

+ */ +class ListRoleAliasesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListRoleAliasesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListRoleAliasesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListRoleAliasesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListRoleAliasesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListRoleAliasesCommand(output, context); + } +} +exports.ListRoleAliasesCommand = ListRoleAliasesCommand; +//# sourceMappingURL=ListRoleAliasesCommand.js.map + +/***/ }), + +/***/ 79905: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListScheduledAuditsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists all of your scheduled audits.

+ */ +class ListScheduledAuditsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListScheduledAuditsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListScheduledAuditsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListScheduledAuditsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListScheduledAuditsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListScheduledAuditsCommand(output, context); + } +} +exports.ListScheduledAuditsCommand = ListScheduledAuditsCommand; +//# sourceMappingURL=ListScheduledAuditsCommand.js.map + +/***/ }), + +/***/ 17473: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListSecurityProfilesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the Device Defender security profiles you have created. You can use filters to list only those security + * profiles associated with a thing group or only those associated with your account.

+ */ +class ListSecurityProfilesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListSecurityProfilesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListSecurityProfilesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListSecurityProfilesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListSecurityProfilesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListSecurityProfilesCommand(output, context); + } +} +exports.ListSecurityProfilesCommand = ListSecurityProfilesCommand; +//# sourceMappingURL=ListSecurityProfilesCommand.js.map + +/***/ }), + +/***/ 26323: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListSecurityProfilesForTargetCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the Device Defender security profiles attached to a target (thing group).

+ */ +class ListSecurityProfilesForTargetCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListSecurityProfilesForTargetCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListSecurityProfilesForTargetRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListSecurityProfilesForTargetResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListSecurityProfilesForTargetCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListSecurityProfilesForTargetCommand(output, context); + } +} +exports.ListSecurityProfilesForTargetCommand = ListSecurityProfilesForTargetCommand; +//# sourceMappingURL=ListSecurityProfilesForTargetCommand.js.map + +/***/ }), + +/***/ 76326: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListStreamsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists all of the streams in your AWS account.

+ */ +class ListStreamsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListStreamsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListStreamsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListStreamsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListStreamsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListStreamsCommand(output, context); + } +} +exports.ListStreamsCommand = ListStreamsCommand; +//# sourceMappingURL=ListStreamsCommand.js.map + +/***/ }), + +/***/ 87749: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTagsForResourceCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the tags (metadata) you have assigned to the resource.

+ */ +class ListTagsForResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListTagsForResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListTagsForResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListTagsForResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListTagsForResourceCommand(output, context); + } +} +exports.ListTagsForResourceCommand = ListTagsForResourceCommand; +//# sourceMappingURL=ListTagsForResourceCommand.js.map + +/***/ }), + +/***/ 71438: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTargetsForPolicyCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

List targets for the specified policy.

+ */ +class ListTargetsForPolicyCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListTargetsForPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListTargetsForPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListTargetsForPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListTargetsForPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListTargetsForPolicyCommand(output, context); + } +} +exports.ListTargetsForPolicyCommand = ListTargetsForPolicyCommand; +//# sourceMappingURL=ListTargetsForPolicyCommand.js.map + +/***/ }), + +/***/ 47470: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTargetsForSecurityProfileCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the targets (thing groups) associated with a given Device Defender security profile.

+ */ +class ListTargetsForSecurityProfileCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListTargetsForSecurityProfileCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListTargetsForSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListTargetsForSecurityProfileResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListTargetsForSecurityProfileCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListTargetsForSecurityProfileCommand(output, context); + } +} +exports.ListTargetsForSecurityProfileCommand = ListTargetsForSecurityProfileCommand; +//# sourceMappingURL=ListTargetsForSecurityProfileCommand.js.map + +/***/ }), + +/***/ 59885: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListThingGroupsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

List the thing groups in your account.

+ */ +class ListThingGroupsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListThingGroupsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListThingGroupsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListThingGroupsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListThingGroupsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListThingGroupsCommand(output, context); + } +} +exports.ListThingGroupsCommand = ListThingGroupsCommand; +//# sourceMappingURL=ListThingGroupsCommand.js.map + +/***/ }), + +/***/ 532: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListThingGroupsForThingCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

List the thing groups to which the specified thing belongs.

+ */ +class ListThingGroupsForThingCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListThingGroupsForThingCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListThingGroupsForThingRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListThingGroupsForThingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListThingGroupsForThingCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListThingGroupsForThingCommand(output, context); + } +} +exports.ListThingGroupsForThingCommand = ListThingGroupsForThingCommand; +//# sourceMappingURL=ListThingGroupsForThingCommand.js.map + +/***/ }), + +/***/ 18466: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListThingPrincipalsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the principals associated with the specified thing. A principal can be X.509 + * certificates, IAM users, groups, and roles, Amazon Cognito identities or federated + * identities.

+ */ +class ListThingPrincipalsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListThingPrincipalsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListThingPrincipalsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListThingPrincipalsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListThingPrincipalsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListThingPrincipalsCommand(output, context); + } +} +exports.ListThingPrincipalsCommand = ListThingPrincipalsCommand; +//# sourceMappingURL=ListThingPrincipalsCommand.js.map + +/***/ }), + +/***/ 31905: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListThingRegistrationTaskReportsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Information about the thing registration tasks.

+ */ +class ListThingRegistrationTaskReportsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListThingRegistrationTaskReportsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListThingRegistrationTaskReportsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListThingRegistrationTaskReportsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListThingRegistrationTaskReportsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListThingRegistrationTaskReportsCommand(output, context); + } +} +exports.ListThingRegistrationTaskReportsCommand = ListThingRegistrationTaskReportsCommand; +//# sourceMappingURL=ListThingRegistrationTaskReportsCommand.js.map + +/***/ }), + +/***/ 74999: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListThingRegistrationTasksCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

List bulk thing provisioning tasks.

+ */ +class ListThingRegistrationTasksCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListThingRegistrationTasksCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListThingRegistrationTasksRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListThingRegistrationTasksResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListThingRegistrationTasksCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListThingRegistrationTasksCommand(output, context); + } +} +exports.ListThingRegistrationTasksCommand = ListThingRegistrationTasksCommand; +//# sourceMappingURL=ListThingRegistrationTasksCommand.js.map + +/***/ }), + +/***/ 28092: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListThingTypesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the existing thing types.

+ */ +class ListThingTypesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListThingTypesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListThingTypesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListThingTypesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListThingTypesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListThingTypesCommand(output, context); + } +} +exports.ListThingTypesCommand = ListThingTypesCommand; +//# sourceMappingURL=ListThingTypesCommand.js.map + +/***/ }), + +/***/ 1243: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListThingsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists your things. Use the attributeName and + * attributeValue parameters to filter your things. + * For example, calling ListThings with attributeName=Color and + * attributeValue=Red retrieves all things in the registry that contain an attribute + * Color with the value Red.

+ * + *

You will not be charged for calling this API if an Access denied error is returned. You will also not be charged if no attributes or pagination token was provided in request and no pagination token and no results were returned.

+ *
+ */ +class ListThingsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListThingsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListThingsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListThingsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListThingsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListThingsCommand(output, context); + } +} +exports.ListThingsCommand = ListThingsCommand; +//# sourceMappingURL=ListThingsCommand.js.map + +/***/ }), + +/***/ 51357: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListThingsInBillingGroupCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the things you have added to the given billing group.

+ */ +class ListThingsInBillingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListThingsInBillingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListThingsInBillingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListThingsInBillingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListThingsInBillingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListThingsInBillingGroupCommand(output, context); + } +} +exports.ListThingsInBillingGroupCommand = ListThingsInBillingGroupCommand; +//# sourceMappingURL=ListThingsInBillingGroupCommand.js.map + +/***/ }), + +/***/ 33672: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListThingsInThingGroupCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the things in the specified group.

+ */ +class ListThingsInThingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListThingsInThingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListThingsInThingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListThingsInThingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListThingsInThingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListThingsInThingGroupCommand(output, context); + } +} +exports.ListThingsInThingGroupCommand = ListThingsInThingGroupCommand; +//# sourceMappingURL=ListThingsInThingGroupCommand.js.map + +/***/ }), + +/***/ 29621: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTopicRuleDestinationsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists all the topic rule destinations in your AWS account.

+ */ +class ListTopicRuleDestinationsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListTopicRuleDestinationsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListTopicRuleDestinationsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListTopicRuleDestinationsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListTopicRuleDestinationsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListTopicRuleDestinationsCommand(output, context); + } +} +exports.ListTopicRuleDestinationsCommand = ListTopicRuleDestinationsCommand; +//# sourceMappingURL=ListTopicRuleDestinationsCommand.js.map + +/***/ }), + +/***/ 2823: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTopicRulesCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the rules for the specific topic.

+ */ +class ListTopicRulesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListTopicRulesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListTopicRulesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListTopicRulesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListTopicRulesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListTopicRulesCommand(output, context); + } +} +exports.ListTopicRulesCommand = ListTopicRulesCommand; +//# sourceMappingURL=ListTopicRulesCommand.js.map + +/***/ }), + +/***/ 47492: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListV2LoggingLevelsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists logging levels.

+ */ +class ListV2LoggingLevelsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListV2LoggingLevelsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListV2LoggingLevelsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListV2LoggingLevelsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListV2LoggingLevelsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListV2LoggingLevelsCommand(output, context); + } +} +exports.ListV2LoggingLevelsCommand = ListV2LoggingLevelsCommand; +//# sourceMappingURL=ListV2LoggingLevelsCommand.js.map + +/***/ }), + +/***/ 77560: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListViolationEventsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Lists the Device Defender security profile violations discovered during the given time period. + * You can use filters to limit the results to those alerts issued for a particular security profile, + * behavior, or thing (device).

+ */ +class ListViolationEventsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ListViolationEventsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ListViolationEventsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.ListViolationEventsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListViolationEventsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListViolationEventsCommand(output, context); + } +} +exports.ListViolationEventsCommand = ListViolationEventsCommand; +//# sourceMappingURL=ListViolationEventsCommand.js.map + +/***/ }), + +/***/ 97568: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RegisterCACertificateCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Registers a CA certificate with AWS IoT. This CA certificate can then be used to sign + * device certificates, which can be then registered with AWS IoT. You can register up to 10 + * CA certificates per AWS account that have the same subject field. This enables you to have + * up to 10 certificate authorities sign your device certificates. If you have more than one + * CA certificate registered, make sure you pass the CA certificate when you register your + * device certificates with the RegisterCertificate API.

+ */ +class RegisterCACertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "RegisterCACertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.RegisterCACertificateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.RegisterCACertificateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1RegisterCACertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1RegisterCACertificateCommand(output, context); + } +} +exports.RegisterCACertificateCommand = RegisterCACertificateCommand; +//# sourceMappingURL=RegisterCACertificateCommand.js.map + +/***/ }), + +/***/ 59389: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RegisterCertificateCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Registers a device certificate with AWS IoT. If you have more than one CA certificate + * that has the same subject field, you must specify the CA certificate that was used to sign + * the device certificate being registered.

+ */ +class RegisterCertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "RegisterCertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.RegisterCertificateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.RegisterCertificateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1RegisterCertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1RegisterCertificateCommand(output, context); + } +} +exports.RegisterCertificateCommand = RegisterCertificateCommand; +//# sourceMappingURL=RegisterCertificateCommand.js.map + +/***/ }), + +/***/ 69343: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RegisterCertificateWithoutCACommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Register a certificate that does not have a certificate authority (CA).

+ */ +class RegisterCertificateWithoutCACommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "RegisterCertificateWithoutCACommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.RegisterCertificateWithoutCARequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.RegisterCertificateWithoutCAResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1RegisterCertificateWithoutCACommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1RegisterCertificateWithoutCACommand(output, context); + } +} +exports.RegisterCertificateWithoutCACommand = RegisterCertificateWithoutCACommand; +//# sourceMappingURL=RegisterCertificateWithoutCACommand.js.map + +/***/ }), + +/***/ 35331: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RegisterThingCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Provisions a thing in the device registry. RegisterThing calls other AWS IoT control + * plane APIs. These calls might exceed your account level + * AWS IoT Throttling Limits and cause throttle errors. Please contact AWS Customer Support to raise + * your throttling limits if necessary.

+ */ +class RegisterThingCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "RegisterThingCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.RegisterThingRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.RegisterThingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1RegisterThingCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1RegisterThingCommand(output, context); + } +} +exports.RegisterThingCommand = RegisterThingCommand; +//# sourceMappingURL=RegisterThingCommand.js.map + +/***/ }), + +/***/ 75265: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RejectCertificateTransferCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Rejects a pending certificate transfer. After AWS IoT rejects a certificate transfer, + * the certificate status changes from PENDING_TRANSFER to + * INACTIVE.

+ *

To check for pending certificate transfers, call ListCertificates + * to enumerate your certificates.

+ *

This operation can only be called by the transfer destination. After it is called, + * the certificate will be returned to the source's account in the INACTIVE state.

+ */ +class RejectCertificateTransferCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "RejectCertificateTransferCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.RejectCertificateTransferRequest.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_restJson1RejectCertificateTransferCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1RejectCertificateTransferCommand(output, context); + } +} +exports.RejectCertificateTransferCommand = RejectCertificateTransferCommand; +//# sourceMappingURL=RejectCertificateTransferCommand.js.map + +/***/ }), + +/***/ 98700: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RemoveThingFromBillingGroupCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Removes the given thing from the billing group.

+ */ +class RemoveThingFromBillingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "RemoveThingFromBillingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.RemoveThingFromBillingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.RemoveThingFromBillingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1RemoveThingFromBillingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1RemoveThingFromBillingGroupCommand(output, context); + } +} +exports.RemoveThingFromBillingGroupCommand = RemoveThingFromBillingGroupCommand; +//# sourceMappingURL=RemoveThingFromBillingGroupCommand.js.map + +/***/ }), + +/***/ 47706: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RemoveThingFromThingGroupCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Remove the specified thing from the specified group.

+ *

You must specify either a thingGroupArn or a + * thingGroupName to identify the thing group and + * either a thingArn or a thingName to + * identify the thing to remove from the thing group. + *

+ */ +class RemoveThingFromThingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "RemoveThingFromThingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.RemoveThingFromThingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.RemoveThingFromThingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1RemoveThingFromThingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1RemoveThingFromThingGroupCommand(output, context); + } +} +exports.RemoveThingFromThingGroupCommand = RemoveThingFromThingGroupCommand; +//# sourceMappingURL=RemoveThingFromThingGroupCommand.js.map + +/***/ }), + +/***/ 22174: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ReplaceTopicRuleCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Replaces the rule. You must specify all parameters for the new rule. Creating rules + * is an administrator-level action. Any user who has permission to create rules will be able + * to access data processed by the rule.

+ */ +class ReplaceTopicRuleCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ReplaceTopicRuleCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.ReplaceTopicRuleRequest.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_restJson1ReplaceTopicRuleCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ReplaceTopicRuleCommand(output, context); + } +} +exports.ReplaceTopicRuleCommand = ReplaceTopicRuleCommand; +//# sourceMappingURL=ReplaceTopicRuleCommand.js.map + +/***/ }), + +/***/ 8101: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SearchIndexCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

The query search index.

+ */ +class SearchIndexCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "SearchIndexCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.SearchIndexRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.SearchIndexResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1SearchIndexCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1SearchIndexCommand(output, context); + } +} +exports.SearchIndexCommand = SearchIndexCommand; +//# sourceMappingURL=SearchIndexCommand.js.map + +/***/ }), + +/***/ 47153: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetDefaultAuthorizerCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets the default authorizer. This will be used if a websocket connection is made + * without specifying an authorizer.

+ */ +class SetDefaultAuthorizerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "SetDefaultAuthorizerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.SetDefaultAuthorizerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.SetDefaultAuthorizerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1SetDefaultAuthorizerCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1SetDefaultAuthorizerCommand(output, context); + } +} +exports.SetDefaultAuthorizerCommand = SetDefaultAuthorizerCommand; +//# sourceMappingURL=SetDefaultAuthorizerCommand.js.map + +/***/ }), + +/***/ 93486: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetDefaultPolicyVersionCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets the specified version of the specified policy as the policy's default + * (operative) version. This action affects all certificates to which the policy is attached. + * To list the principals the policy is attached to, use the ListPrincipalPolicy + * API.

+ */ +class SetDefaultPolicyVersionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "SetDefaultPolicyVersionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.SetDefaultPolicyVersionRequest.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_restJson1SetDefaultPolicyVersionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1SetDefaultPolicyVersionCommand(output, context); + } +} +exports.SetDefaultPolicyVersionCommand = SetDefaultPolicyVersionCommand; +//# sourceMappingURL=SetDefaultPolicyVersionCommand.js.map + +/***/ }), + +/***/ 74975: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetLoggingOptionsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets the logging options.

+ *

NOTE: use of this command is not recommended. Use SetV2LoggingOptions + * instead.

+ */ +class SetLoggingOptionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "SetLoggingOptionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.SetLoggingOptionsRequest.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_restJson1SetLoggingOptionsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1SetLoggingOptionsCommand(output, context); + } +} +exports.SetLoggingOptionsCommand = SetLoggingOptionsCommand; +//# sourceMappingURL=SetLoggingOptionsCommand.js.map + +/***/ }), + +/***/ 63248: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetV2LoggingLevelCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets the logging level.

+ */ +class SetV2LoggingLevelCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "SetV2LoggingLevelCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.SetV2LoggingLevelRequest.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_restJson1SetV2LoggingLevelCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1SetV2LoggingLevelCommand(output, context); + } +} +exports.SetV2LoggingLevelCommand = SetV2LoggingLevelCommand; +//# sourceMappingURL=SetV2LoggingLevelCommand.js.map + +/***/ }), + +/***/ 56768: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetV2LoggingOptionsCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets the logging options for the V2 logging service.

+ */ +class SetV2LoggingOptionsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "SetV2LoggingOptionsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.SetV2LoggingOptionsRequest.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_restJson1SetV2LoggingOptionsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1SetV2LoggingOptionsCommand(output, context); + } +} +exports.SetV2LoggingOptionsCommand = SetV2LoggingOptionsCommand; +//# sourceMappingURL=SetV2LoggingOptionsCommand.js.map + +/***/ }), + +/***/ 67796: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StartAuditMitigationActionsTaskCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Starts a task that applies a set of mitigation actions to the specified target.

+ */ +class StartAuditMitigationActionsTaskCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "StartAuditMitigationActionsTaskCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.StartAuditMitigationActionsTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.StartAuditMitigationActionsTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1StartAuditMitigationActionsTaskCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1StartAuditMitigationActionsTaskCommand(output, context); + } +} +exports.StartAuditMitigationActionsTaskCommand = StartAuditMitigationActionsTaskCommand; +//# sourceMappingURL=StartAuditMitigationActionsTaskCommand.js.map + +/***/ }), + +/***/ 37467: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StartOnDemandAuditTaskCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Starts an on-demand Device Defender audit.

+ */ +class StartOnDemandAuditTaskCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "StartOnDemandAuditTaskCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.StartOnDemandAuditTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.StartOnDemandAuditTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1StartOnDemandAuditTaskCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1StartOnDemandAuditTaskCommand(output, context); + } +} +exports.StartOnDemandAuditTaskCommand = StartOnDemandAuditTaskCommand; +//# sourceMappingURL=StartOnDemandAuditTaskCommand.js.map + +/***/ }), + +/***/ 47587: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StartThingRegistrationTaskCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a bulk thing provisioning task.

+ */ +class StartThingRegistrationTaskCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "StartThingRegistrationTaskCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.StartThingRegistrationTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.StartThingRegistrationTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1StartThingRegistrationTaskCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1StartThingRegistrationTaskCommand(output, context); + } +} +exports.StartThingRegistrationTaskCommand = StartThingRegistrationTaskCommand; +//# sourceMappingURL=StartThingRegistrationTaskCommand.js.map + +/***/ }), + +/***/ 84000: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StopThingRegistrationTaskCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Cancels a bulk thing provisioning task.

+ */ +class StopThingRegistrationTaskCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "StopThingRegistrationTaskCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.StopThingRegistrationTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.StopThingRegistrationTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1StopThingRegistrationTaskCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1StopThingRegistrationTaskCommand(output, context); + } +} +exports.StopThingRegistrationTaskCommand = StopThingRegistrationTaskCommand; +//# sourceMappingURL=StopThingRegistrationTaskCommand.js.map + +/***/ }), + +/***/ 94545: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TagResourceCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Adds to or modifies the tags of the given resource. Tags are metadata which can be + * used to manage a resource.

+ */ +class TagResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.TagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.TagResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1TagResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1TagResourceCommand(output, context); + } +} +exports.TagResourceCommand = TagResourceCommand; +//# sourceMappingURL=TagResourceCommand.js.map + +/***/ }), + +/***/ 31855: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TestAuthorizationCommand = void 0; +const models_1_1 = __nccwpck_require__(29889); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Tests if a specified principal is authorized to perform an AWS IoT action on a + * specified resource. Use this to test and debug the authorization behavior of devices that + * connect to the AWS IoT device gateway.

+ */ +class TestAuthorizationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "TestAuthorizationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_1_1.TestAuthorizationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_1_1.TestAuthorizationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1TestAuthorizationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1TestAuthorizationCommand(output, context); + } +} +exports.TestAuthorizationCommand = TestAuthorizationCommand; +//# sourceMappingURL=TestAuthorizationCommand.js.map + +/***/ }), + +/***/ 21145: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TestInvokeAuthorizerCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Tests a custom authorization behavior by invoking a specified custom authorizer. Use + * this to test and debug the custom authorization behavior of devices that connect to the AWS + * IoT device gateway.

+ */ +class TestInvokeAuthorizerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "TestInvokeAuthorizerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.TestInvokeAuthorizerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.TestInvokeAuthorizerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1TestInvokeAuthorizerCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1TestInvokeAuthorizerCommand(output, context); + } +} +exports.TestInvokeAuthorizerCommand = TestInvokeAuthorizerCommand; +//# sourceMappingURL=TestInvokeAuthorizerCommand.js.map + +/***/ }), + +/***/ 96463: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TransferCertificateCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Transfers the specified certificate to the specified AWS account.

+ *

You can cancel the transfer until it is acknowledged by the recipient.

+ *

No notification is sent to the transfer destination's account. It is up to the caller + * to notify the transfer target.

+ *

The certificate being transferred must not be in the ACTIVE state. You can use the + * UpdateCertificate API to deactivate it.

+ *

The certificate must not have any policies attached to it. You can use the + * DetachPrincipalPolicy API to detach them.

+ */ +class TransferCertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "TransferCertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.TransferCertificateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.TransferCertificateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1TransferCertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1TransferCertificateCommand(output, context); + } +} +exports.TransferCertificateCommand = TransferCertificateCommand; +//# sourceMappingURL=TransferCertificateCommand.js.map + +/***/ }), + +/***/ 15850: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UntagResourceCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Removes the given tags (metadata) from the resource.

+ */ +class UntagResourceCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UntagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UntagResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UntagResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UntagResourceCommand(output, context); + } +} +exports.UntagResourceCommand = UntagResourceCommand; +//# sourceMappingURL=UntagResourceCommand.js.map + +/***/ }), + +/***/ 12283: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateAccountAuditConfigurationCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Configures or reconfigures the Device Defender audit settings for this account. + * Settings include how audit notifications are sent and which audit checks are + * enabled or disabled.

+ */ +class UpdateAccountAuditConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateAccountAuditConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateAccountAuditConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateAccountAuditConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateAccountAuditConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateAccountAuditConfigurationCommand(output, context); + } +} +exports.UpdateAccountAuditConfigurationCommand = UpdateAccountAuditConfigurationCommand; +//# sourceMappingURL=UpdateAccountAuditConfigurationCommand.js.map + +/***/ }), + +/***/ 13125: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateAuditSuppressionCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

+ * Updates a Device Defender audit suppression. + *

+ */ +class UpdateAuditSuppressionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateAuditSuppressionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateAuditSuppressionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateAuditSuppressionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateAuditSuppressionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateAuditSuppressionCommand(output, context); + } +} +exports.UpdateAuditSuppressionCommand = UpdateAuditSuppressionCommand; +//# sourceMappingURL=UpdateAuditSuppressionCommand.js.map + +/***/ }), + +/***/ 27955: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateAuthorizerCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates an authorizer.

+ */ +class UpdateAuthorizerCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateAuthorizerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateAuthorizerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateAuthorizerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateAuthorizerCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateAuthorizerCommand(output, context); + } +} +exports.UpdateAuthorizerCommand = UpdateAuthorizerCommand; +//# sourceMappingURL=UpdateAuthorizerCommand.js.map + +/***/ }), + +/***/ 14430: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateBillingGroupCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates information about the billing group.

+ */ +class UpdateBillingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateBillingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateBillingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateBillingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateBillingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateBillingGroupCommand(output, context); + } +} +exports.UpdateBillingGroupCommand = UpdateBillingGroupCommand; +//# sourceMappingURL=UpdateBillingGroupCommand.js.map + +/***/ }), + +/***/ 18036: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateCACertificateCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates a registered CA certificate.

+ */ +class UpdateCACertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateCACertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateCACertificateRequest.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_restJson1UpdateCACertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateCACertificateCommand(output, context); + } +} +exports.UpdateCACertificateCommand = UpdateCACertificateCommand; +//# sourceMappingURL=UpdateCACertificateCommand.js.map + +/***/ }), + +/***/ 30885: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateCertificateCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the status of the specified certificate. This operation is + * idempotent.

+ *

Certificates must be in the ACTIVE state to authenticate devices that use + * a certificate to connect to AWS IoT.

+ *

Within a few minutes of updating a certificate from the ACTIVE state to any other + * state, AWS IoT disconnects all devices that used that certificate to connect. Devices cannot + * use a certificate that is not in the ACTIVE state to reconnect.

+ */ +class UpdateCertificateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateCertificateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateCertificateRequest.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_restJson1UpdateCertificateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateCertificateCommand(output, context); + } +} +exports.UpdateCertificateCommand = UpdateCertificateCommand; +//# sourceMappingURL=UpdateCertificateCommand.js.map + +/***/ }), + +/***/ 52162: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateDimensionCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the definition for a dimension. You cannot change the type of a dimension after it is created (you can delete it and re-create it).

+ */ +class UpdateDimensionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateDimensionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateDimensionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateDimensionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateDimensionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateDimensionCommand(output, context); + } +} +exports.UpdateDimensionCommand = UpdateDimensionCommand; +//# sourceMappingURL=UpdateDimensionCommand.js.map + +/***/ }), + +/***/ 89212: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateDomainConfigurationCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates values stored in the domain configuration. Domain configurations for default endpoints can't be updated.

+ * + *

The domain configuration feature is in public preview and is subject to change.

+ *
+ */ +class UpdateDomainConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateDomainConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateDomainConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateDomainConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateDomainConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateDomainConfigurationCommand(output, context); + } +} +exports.UpdateDomainConfigurationCommand = UpdateDomainConfigurationCommand; +//# sourceMappingURL=UpdateDomainConfigurationCommand.js.map + +/***/ }), + +/***/ 39452: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateDynamicThingGroupCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates a dynamic thing group.

+ */ +class UpdateDynamicThingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateDynamicThingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateDynamicThingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateDynamicThingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateDynamicThingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateDynamicThingGroupCommand(output, context); + } +} +exports.UpdateDynamicThingGroupCommand = UpdateDynamicThingGroupCommand; +//# sourceMappingURL=UpdateDynamicThingGroupCommand.js.map + +/***/ }), + +/***/ 90134: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateEventConfigurationsCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the event configurations.

+ */ +class UpdateEventConfigurationsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateEventConfigurationsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateEventConfigurationsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateEventConfigurationsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateEventConfigurationsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateEventConfigurationsCommand(output, context); + } +} +exports.UpdateEventConfigurationsCommand = UpdateEventConfigurationsCommand; +//# sourceMappingURL=UpdateEventConfigurationsCommand.js.map + +/***/ }), + +/***/ 40352: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateIndexingConfigurationCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the search configuration.

+ */ +class UpdateIndexingConfigurationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateIndexingConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateIndexingConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateIndexingConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateIndexingConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateIndexingConfigurationCommand(output, context); + } +} +exports.UpdateIndexingConfigurationCommand = UpdateIndexingConfigurationCommand; +//# sourceMappingURL=UpdateIndexingConfigurationCommand.js.map + +/***/ }), + +/***/ 22654: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateJobCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates supported fields of the specified job.

+ */ +class UpdateJobCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateJobCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateJobRequest.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_restJson1UpdateJobCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateJobCommand(output, context); + } +} +exports.UpdateJobCommand = UpdateJobCommand; +//# sourceMappingURL=UpdateJobCommand.js.map + +/***/ }), + +/***/ 57468: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateMitigationActionCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the definition for the specified mitigation action.

+ */ +class UpdateMitigationActionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateMitigationActionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateMitigationActionRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateMitigationActionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateMitigationActionCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateMitigationActionCommand(output, context); + } +} +exports.UpdateMitigationActionCommand = UpdateMitigationActionCommand; +//# sourceMappingURL=UpdateMitigationActionCommand.js.map + +/***/ }), + +/***/ 72154: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateProvisioningTemplateCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates a fleet provisioning template.

+ */ +class UpdateProvisioningTemplateCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateProvisioningTemplateCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateProvisioningTemplateRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateProvisioningTemplateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateProvisioningTemplateCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateProvisioningTemplateCommand(output, context); + } +} +exports.UpdateProvisioningTemplateCommand = UpdateProvisioningTemplateCommand; +//# sourceMappingURL=UpdateProvisioningTemplateCommand.js.map + +/***/ }), + +/***/ 47584: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateRoleAliasCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates a role alias.

+ */ +class UpdateRoleAliasCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateRoleAliasCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateRoleAliasRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateRoleAliasResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateRoleAliasCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateRoleAliasCommand(output, context); + } +} +exports.UpdateRoleAliasCommand = UpdateRoleAliasCommand; +//# sourceMappingURL=UpdateRoleAliasCommand.js.map + +/***/ }), + +/***/ 45277: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateScheduledAuditCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates a scheduled audit, including which checks are performed and + * how often the audit takes place.

+ */ +class UpdateScheduledAuditCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateScheduledAuditCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateScheduledAuditRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateScheduledAuditResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateScheduledAuditCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateScheduledAuditCommand(output, context); + } +} +exports.UpdateScheduledAuditCommand = UpdateScheduledAuditCommand; +//# sourceMappingURL=UpdateScheduledAuditCommand.js.map + +/***/ }), + +/***/ 21654: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateSecurityProfileCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates a Device Defender security profile.

+ */ +class UpdateSecurityProfileCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateSecurityProfileCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateSecurityProfileResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateSecurityProfileCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateSecurityProfileCommand(output, context); + } +} +exports.UpdateSecurityProfileCommand = UpdateSecurityProfileCommand; +//# sourceMappingURL=UpdateSecurityProfileCommand.js.map + +/***/ }), + +/***/ 98689: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateStreamCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates an existing stream. The stream version will be incremented by one.

+ */ +class UpdateStreamCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateStreamCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateStreamRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateStreamResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateStreamCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateStreamCommand(output, context); + } +} +exports.UpdateStreamCommand = UpdateStreamCommand; +//# sourceMappingURL=UpdateStreamCommand.js.map + +/***/ }), + +/***/ 51903: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateThingCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the data for a thing.

+ */ +class UpdateThingCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateThingCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateThingRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateThingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateThingCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateThingCommand(output, context); + } +} +exports.UpdateThingCommand = UpdateThingCommand; +//# sourceMappingURL=UpdateThingCommand.js.map + +/***/ }), + +/***/ 46410: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateThingGroupCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Update a thing group.

+ */ +class UpdateThingGroupCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateThingGroupCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateThingGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateThingGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateThingGroupCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateThingGroupCommand(output, context); + } +} +exports.UpdateThingGroupCommand = UpdateThingGroupCommand; +//# sourceMappingURL=UpdateThingGroupCommand.js.map + +/***/ }), + +/***/ 71585: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateThingGroupsForThingCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates the groups to which the thing belongs.

+ */ +class UpdateThingGroupsForThingCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateThingGroupsForThingCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateThingGroupsForThingRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateThingGroupsForThingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateThingGroupsForThingCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateThingGroupsForThingCommand(output, context); + } +} +exports.UpdateThingGroupsForThingCommand = UpdateThingGroupsForThingCommand; +//# sourceMappingURL=UpdateThingGroupsForThingCommand.js.map + +/***/ }), + +/***/ 18671: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UpdateTopicRuleDestinationCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Updates a topic rule destination. You use this to change the status, endpoint URL, or + * confirmation URL of the destination.

+ */ +class UpdateTopicRuleDestinationCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "UpdateTopicRuleDestinationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.UpdateTopicRuleDestinationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.UpdateTopicRuleDestinationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1UpdateTopicRuleDestinationCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1UpdateTopicRuleDestinationCommand(output, context); + } +} +exports.UpdateTopicRuleDestinationCommand = UpdateTopicRuleDestinationCommand; +//# sourceMappingURL=UpdateTopicRuleDestinationCommand.js.map + +/***/ }), + +/***/ 91452: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ValidateSecurityProfileBehaviorsCommand = void 0; +const models_2_1 = __nccwpck_require__(18560); +const Aws_restJson1_1 = __nccwpck_require__(66639); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Validates a Device Defender security profile behaviors specification.

+ */ +class ValidateSecurityProfileBehaviorsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "IoTClient"; + const commandName = "ValidateSecurityProfileBehaviorsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_2_1.ValidateSecurityProfileBehaviorsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_2_1.ValidateSecurityProfileBehaviorsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ValidateSecurityProfileBehaviorsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ValidateSecurityProfileBehaviorsCommand(output, context); + } +} +exports.ValidateSecurityProfileBehaviorsCommand = ValidateSecurityProfileBehaviorsCommand; +//# sourceMappingURL=ValidateSecurityProfileBehaviorsCommand.js.map + +/***/ }), + +/***/ 37987: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRegionInfoProvider = void 0; +// Partition default templates +const AWS_TEMPLATE = "iot.{region}.amazonaws.com"; +const AWS_CN_TEMPLATE = "iot.{region}.amazonaws.com.cn"; +const AWS_ISO_TEMPLATE = "iot.{region}.c2s.ic.gov"; +const AWS_ISO_B_TEMPLATE = "iot.{region}.sc2s.sgov.gov"; +const AWS_US_GOV_TEMPLATE = "iot.{region}.amazonaws.com"; +// Partition regions +const AWS_REGIONS = new Set([ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "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", +]); +const AWS_CN_REGIONS = new Set(["cn-north-1", "cn-northwest-1"]); +const AWS_ISO_REGIONS = new Set(["us-iso-east-1"]); +const AWS_ISO_B_REGIONS = new Set(["us-isob-east-1"]); +const AWS_US_GOV_REGIONS = new Set(["us-gov-east-1", "us-gov-west-1"]); +const defaultRegionInfoProvider = (region, options) => { + let regionInfo = undefined; + switch (region) { + // First, try to match exact region names. + case "ap-east-1": + regionInfo = { + hostname: "iot.ap-east-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "ap-northeast-1": + regionInfo = { + hostname: "iot.ap-northeast-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "ap-northeast-2": + regionInfo = { + hostname: "iot.ap-northeast-2.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "ap-south-1": + regionInfo = { + hostname: "iot.ap-south-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "ap-southeast-1": + regionInfo = { + hostname: "iot.ap-southeast-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "ap-southeast-2": + regionInfo = { + hostname: "iot.ap-southeast-2.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "ca-central-1": + regionInfo = { + hostname: "iot.ca-central-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "cn-north-1": + regionInfo = { + hostname: "iot.cn-north-1.amazonaws.com.cn", + partition: "aws-cn", + signingService: "execute-api", + }; + break; + case "cn-northwest-1": + regionInfo = { + hostname: "iot.cn-northwest-1.amazonaws.com.cn", + partition: "aws-cn", + signingService: "execute-api", + }; + break; + case "eu-central-1": + regionInfo = { + hostname: "iot.eu-central-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "eu-north-1": + regionInfo = { + hostname: "iot.eu-north-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "eu-west-1": + regionInfo = { + hostname: "iot.eu-west-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "eu-west-2": + regionInfo = { + hostname: "iot.eu-west-2.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "eu-west-3": + regionInfo = { + hostname: "iot.eu-west-3.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "me-south-1": + regionInfo = { + hostname: "iot.me-south-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "sa-east-1": + regionInfo = { + hostname: "iot.sa-east-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "us-east-1": + regionInfo = { + hostname: "iot.us-east-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "us-east-2": + regionInfo = { + hostname: "iot.us-east-2.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "us-gov-east-1": + regionInfo = { + hostname: "iot.us-gov-east-1.amazonaws.com", + partition: "aws-us-gov", + signingService: "execute-api", + }; + break; + case "us-gov-west-1": + regionInfo = { + hostname: "iot.us-gov-west-1.amazonaws.com", + partition: "aws-us-gov", + signingService: "execute-api", + }; + break; + case "us-west-1": + regionInfo = { + hostname: "iot.us-west-1.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + case "us-west-2": + regionInfo = { + hostname: "iot.us-west-2.amazonaws.com", + partition: "aws", + signingService: "execute-api", + }; + break; + // Next, try to match partition endpoints. + default: + if (AWS_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + signingService: "execute-api", + }; + } + if (AWS_CN_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_CN_TEMPLATE.replace("{region}", region), + partition: "aws-cn", + signingService: "execute-api", + }; + } + if (AWS_ISO_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_TEMPLATE.replace("{region}", region), + partition: "aws-iso", + }; + } + if (AWS_ISO_B_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_B_TEMPLATE.replace("{region}", region), + partition: "aws-iso-b", + }; + } + if (AWS_US_GOV_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_US_GOV_TEMPLATE.replace("{region}", region), + partition: "aws-us-gov", + signingService: "execute-api", + }; + } + // Finally, assume it's an AWS partition endpoint. + if (regionInfo === undefined) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + signingService: "execute-api", + }; + } + } + return Promise.resolve({ signingService: "execute-api", ...regionInfo }); +}; +exports.defaultRegionInfoProvider = defaultRegionInfoProvider; +//# sourceMappingURL=endpoints.js.map + +/***/ }), + +/***/ 81222: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(3153); +tslib_1.__exportStar(__nccwpck_require__(31450), exports); +tslib_1.__exportStar(__nccwpck_require__(37811), exports); +tslib_1.__exportStar(__nccwpck_require__(56298), exports); +tslib_1.__exportStar(__nccwpck_require__(50444), exports); +tslib_1.__exportStar(__nccwpck_require__(70565), exports); +tslib_1.__exportStar(__nccwpck_require__(35126), exports); +tslib_1.__exportStar(__nccwpck_require__(90420), exports); +tslib_1.__exportStar(__nccwpck_require__(4077), exports); +tslib_1.__exportStar(__nccwpck_require__(36378), exports); +tslib_1.__exportStar(__nccwpck_require__(92532), exports); +tslib_1.__exportStar(__nccwpck_require__(84), exports); +tslib_1.__exportStar(__nccwpck_require__(58801), exports); +tslib_1.__exportStar(__nccwpck_require__(69974), exports); +tslib_1.__exportStar(__nccwpck_require__(62205), exports); +tslib_1.__exportStar(__nccwpck_require__(21972), exports); +tslib_1.__exportStar(__nccwpck_require__(97176), exports); +tslib_1.__exportStar(__nccwpck_require__(83239), exports); +tslib_1.__exportStar(__nccwpck_require__(27690), exports); +tslib_1.__exportStar(__nccwpck_require__(57959), exports); +tslib_1.__exportStar(__nccwpck_require__(81102), exports); +tslib_1.__exportStar(__nccwpck_require__(26470), exports); +tslib_1.__exportStar(__nccwpck_require__(71146), exports); +tslib_1.__exportStar(__nccwpck_require__(18664), exports); +tslib_1.__exportStar(__nccwpck_require__(22271), exports); +tslib_1.__exportStar(__nccwpck_require__(14059), exports); +tslib_1.__exportStar(__nccwpck_require__(4848), exports); +tslib_1.__exportStar(__nccwpck_require__(19583), exports); +tslib_1.__exportStar(__nccwpck_require__(45447), exports); +tslib_1.__exportStar(__nccwpck_require__(35362), exports); +tslib_1.__exportStar(__nccwpck_require__(72718), exports); +tslib_1.__exportStar(__nccwpck_require__(38826), exports); +tslib_1.__exportStar(__nccwpck_require__(79093), exports); +tslib_1.__exportStar(__nccwpck_require__(28951), exports); +tslib_1.__exportStar(__nccwpck_require__(78443), exports); +tslib_1.__exportStar(__nccwpck_require__(6809), exports); +tslib_1.__exportStar(__nccwpck_require__(56822), exports); +tslib_1.__exportStar(__nccwpck_require__(312), exports); +tslib_1.__exportStar(__nccwpck_require__(60949), exports); +tslib_1.__exportStar(__nccwpck_require__(99585), exports); +tslib_1.__exportStar(__nccwpck_require__(76406), exports); +tslib_1.__exportStar(__nccwpck_require__(96982), exports); +tslib_1.__exportStar(__nccwpck_require__(15724), exports); +tslib_1.__exportStar(__nccwpck_require__(4430), exports); +tslib_1.__exportStar(__nccwpck_require__(90704), exports); +tslib_1.__exportStar(__nccwpck_require__(32183), exports); +tslib_1.__exportStar(__nccwpck_require__(56409), exports); +tslib_1.__exportStar(__nccwpck_require__(73697), exports); +tslib_1.__exportStar(__nccwpck_require__(63911), exports); +tslib_1.__exportStar(__nccwpck_require__(91697), exports); +tslib_1.__exportStar(__nccwpck_require__(38666), exports); +tslib_1.__exportStar(__nccwpck_require__(17557), exports); +tslib_1.__exportStar(__nccwpck_require__(22855), exports); +tslib_1.__exportStar(__nccwpck_require__(39671), exports); +tslib_1.__exportStar(__nccwpck_require__(45947), exports); +tslib_1.__exportStar(__nccwpck_require__(52941), exports); +tslib_1.__exportStar(__nccwpck_require__(26106), exports); +tslib_1.__exportStar(__nccwpck_require__(67779), exports); +tslib_1.__exportStar(__nccwpck_require__(11659), exports); +tslib_1.__exportStar(__nccwpck_require__(37562), exports); +tslib_1.__exportStar(__nccwpck_require__(23235), exports); +tslib_1.__exportStar(__nccwpck_require__(42187), exports); +tslib_1.__exportStar(__nccwpck_require__(61685), exports); +tslib_1.__exportStar(__nccwpck_require__(77857), exports); +tslib_1.__exportStar(__nccwpck_require__(68349), exports); +tslib_1.__exportStar(__nccwpck_require__(31281), exports); +tslib_1.__exportStar(__nccwpck_require__(73451), exports); +tslib_1.__exportStar(__nccwpck_require__(36024), exports); +tslib_1.__exportStar(__nccwpck_require__(32270), exports); +tslib_1.__exportStar(__nccwpck_require__(62838), exports); +tslib_1.__exportStar(__nccwpck_require__(35964), exports); +tslib_1.__exportStar(__nccwpck_require__(13748), exports); +tslib_1.__exportStar(__nccwpck_require__(13811), exports); +tslib_1.__exportStar(__nccwpck_require__(91538), exports); +tslib_1.__exportStar(__nccwpck_require__(16532), exports); +tslib_1.__exportStar(__nccwpck_require__(84970), exports); +tslib_1.__exportStar(__nccwpck_require__(74328), exports); +tslib_1.__exportStar(__nccwpck_require__(85629), exports); +tslib_1.__exportStar(__nccwpck_require__(40564), exports); +tslib_1.__exportStar(__nccwpck_require__(42279), exports); +tslib_1.__exportStar(__nccwpck_require__(78585), exports); +tslib_1.__exportStar(__nccwpck_require__(68623), exports); +tslib_1.__exportStar(__nccwpck_require__(46755), exports); +tslib_1.__exportStar(__nccwpck_require__(83673), exports); +tslib_1.__exportStar(__nccwpck_require__(77554), exports); +tslib_1.__exportStar(__nccwpck_require__(87665), exports); +tslib_1.__exportStar(__nccwpck_require__(77948), exports); +tslib_1.__exportStar(__nccwpck_require__(28980), exports); +tslib_1.__exportStar(__nccwpck_require__(65547), exports); +tslib_1.__exportStar(__nccwpck_require__(1175), exports); +tslib_1.__exportStar(__nccwpck_require__(44539), exports); +tslib_1.__exportStar(__nccwpck_require__(34488), exports); +tslib_1.__exportStar(__nccwpck_require__(44504), exports); +tslib_1.__exportStar(__nccwpck_require__(61131), exports); +tslib_1.__exportStar(__nccwpck_require__(22237), exports); +tslib_1.__exportStar(__nccwpck_require__(90953), exports); +tslib_1.__exportStar(__nccwpck_require__(44526), exports); +tslib_1.__exportStar(__nccwpck_require__(19878), exports); +tslib_1.__exportStar(__nccwpck_require__(83198), exports); +tslib_1.__exportStar(__nccwpck_require__(50780), exports); +tslib_1.__exportStar(__nccwpck_require__(17402), exports); +tslib_1.__exportStar(__nccwpck_require__(7189), exports); +tslib_1.__exportStar(__nccwpck_require__(9688), exports); +tslib_1.__exportStar(__nccwpck_require__(71366), exports); +tslib_1.__exportStar(__nccwpck_require__(79248), exports); +tslib_1.__exportStar(__nccwpck_require__(83282), exports); +tslib_1.__exportStar(__nccwpck_require__(19687), exports); +tslib_1.__exportStar(__nccwpck_require__(51757), exports); +tslib_1.__exportStar(__nccwpck_require__(189), exports); +tslib_1.__exportStar(__nccwpck_require__(91665), exports); +tslib_1.__exportStar(__nccwpck_require__(57429), exports); +tslib_1.__exportStar(__nccwpck_require__(24694), exports); +tslib_1.__exportStar(__nccwpck_require__(33048), exports); +tslib_1.__exportStar(__nccwpck_require__(22965), exports); +tslib_1.__exportStar(__nccwpck_require__(51843), exports); +tslib_1.__exportStar(__nccwpck_require__(22069), exports); +tslib_1.__exportStar(__nccwpck_require__(36408), exports); +tslib_1.__exportStar(__nccwpck_require__(82246), exports); +tslib_1.__exportStar(__nccwpck_require__(93616), exports); +tslib_1.__exportStar(__nccwpck_require__(23036), exports); +tslib_1.__exportStar(__nccwpck_require__(90886), exports); +tslib_1.__exportStar(__nccwpck_require__(68814), exports); +tslib_1.__exportStar(__nccwpck_require__(59388), exports); +tslib_1.__exportStar(__nccwpck_require__(58222), exports); +tslib_1.__exportStar(__nccwpck_require__(55133), exports); +tslib_1.__exportStar(__nccwpck_require__(58370), exports); +tslib_1.__exportStar(__nccwpck_require__(35836), exports); +tslib_1.__exportStar(__nccwpck_require__(92447), exports); +tslib_1.__exportStar(__nccwpck_require__(45704), exports); +tslib_1.__exportStar(__nccwpck_require__(67042), exports); +tslib_1.__exportStar(__nccwpck_require__(60827), exports); +tslib_1.__exportStar(__nccwpck_require__(69192), exports); +tslib_1.__exportStar(__nccwpck_require__(50108), exports); +tslib_1.__exportStar(__nccwpck_require__(27418), exports); +tslib_1.__exportStar(__nccwpck_require__(99389), exports); +tslib_1.__exportStar(__nccwpck_require__(92292), exports); +tslib_1.__exportStar(__nccwpck_require__(13648), exports); +tslib_1.__exportStar(__nccwpck_require__(18259), exports); +tslib_1.__exportStar(__nccwpck_require__(77650), exports); +tslib_1.__exportStar(__nccwpck_require__(68779), exports); +tslib_1.__exportStar(__nccwpck_require__(14749), exports); +tslib_1.__exportStar(__nccwpck_require__(6910), exports); +tslib_1.__exportStar(__nccwpck_require__(23163), exports); +tslib_1.__exportStar(__nccwpck_require__(14659), exports); +tslib_1.__exportStar(__nccwpck_require__(74775), exports); +tslib_1.__exportStar(__nccwpck_require__(9723), exports); +tslib_1.__exportStar(__nccwpck_require__(75947), exports); +tslib_1.__exportStar(__nccwpck_require__(138), exports); +tslib_1.__exportStar(__nccwpck_require__(36240), exports); +tslib_1.__exportStar(__nccwpck_require__(5668), exports); +tslib_1.__exportStar(__nccwpck_require__(68068), exports); +tslib_1.__exportStar(__nccwpck_require__(74053), exports); +tslib_1.__exportStar(__nccwpck_require__(20874), exports); +tslib_1.__exportStar(__nccwpck_require__(21477), exports); +tslib_1.__exportStar(__nccwpck_require__(25341), exports); +tslib_1.__exportStar(__nccwpck_require__(7859), exports); +tslib_1.__exportStar(__nccwpck_require__(93159), exports); +tslib_1.__exportStar(__nccwpck_require__(57331), exports); +tslib_1.__exportStar(__nccwpck_require__(76188), exports); +tslib_1.__exportStar(__nccwpck_require__(41916), exports); +tslib_1.__exportStar(__nccwpck_require__(90321), exports); +tslib_1.__exportStar(__nccwpck_require__(92342), exports); +tslib_1.__exportStar(__nccwpck_require__(81192), exports); +tslib_1.__exportStar(__nccwpck_require__(37844), exports); +tslib_1.__exportStar(__nccwpck_require__(86657), exports); +tslib_1.__exportStar(__nccwpck_require__(57302), exports); +tslib_1.__exportStar(__nccwpck_require__(21085), exports); +tslib_1.__exportStar(__nccwpck_require__(3702), exports); +tslib_1.__exportStar(__nccwpck_require__(42167), exports); +tslib_1.__exportStar(__nccwpck_require__(62558), exports); +tslib_1.__exportStar(__nccwpck_require__(24220), exports); +tslib_1.__exportStar(__nccwpck_require__(59524), exports); +tslib_1.__exportStar(__nccwpck_require__(14156), exports); +tslib_1.__exportStar(__nccwpck_require__(48529), exports); +tslib_1.__exportStar(__nccwpck_require__(54754), exports); +tslib_1.__exportStar(__nccwpck_require__(31543), exports); +tslib_1.__exportStar(__nccwpck_require__(9058), exports); +tslib_1.__exportStar(__nccwpck_require__(79905), exports); +tslib_1.__exportStar(__nccwpck_require__(47065), exports); +tslib_1.__exportStar(__nccwpck_require__(17473), exports); +tslib_1.__exportStar(__nccwpck_require__(70383), exports); +tslib_1.__exportStar(__nccwpck_require__(26323), exports); +tslib_1.__exportStar(__nccwpck_require__(99728), exports); +tslib_1.__exportStar(__nccwpck_require__(76326), exports); +tslib_1.__exportStar(__nccwpck_require__(53265), exports); +tslib_1.__exportStar(__nccwpck_require__(87749), exports); +tslib_1.__exportStar(__nccwpck_require__(35733), exports); +tslib_1.__exportStar(__nccwpck_require__(71438), exports); +tslib_1.__exportStar(__nccwpck_require__(12956), exports); +tslib_1.__exportStar(__nccwpck_require__(47470), exports); +tslib_1.__exportStar(__nccwpck_require__(95814), exports); +tslib_1.__exportStar(__nccwpck_require__(59885), exports); +tslib_1.__exportStar(__nccwpck_require__(95068), exports); +tslib_1.__exportStar(__nccwpck_require__(532), exports); +tslib_1.__exportStar(__nccwpck_require__(30363), exports); +tslib_1.__exportStar(__nccwpck_require__(18466), exports); +tslib_1.__exportStar(__nccwpck_require__(3030), exports); +tslib_1.__exportStar(__nccwpck_require__(31905), exports); +tslib_1.__exportStar(__nccwpck_require__(26240), exports); +tslib_1.__exportStar(__nccwpck_require__(74999), exports); +tslib_1.__exportStar(__nccwpck_require__(92400), exports); +tslib_1.__exportStar(__nccwpck_require__(1243), exports); +tslib_1.__exportStar(__nccwpck_require__(36161), exports); +tslib_1.__exportStar(__nccwpck_require__(51357), exports); +tslib_1.__exportStar(__nccwpck_require__(70873), exports); +tslib_1.__exportStar(__nccwpck_require__(33672), exports); +tslib_1.__exportStar(__nccwpck_require__(90446), exports); +tslib_1.__exportStar(__nccwpck_require__(28092), exports); +tslib_1.__exportStar(__nccwpck_require__(38172), exports); +tslib_1.__exportStar(__nccwpck_require__(29621), exports); +tslib_1.__exportStar(__nccwpck_require__(90598), exports); +tslib_1.__exportStar(__nccwpck_require__(2823), exports); +tslib_1.__exportStar(__nccwpck_require__(21749), exports); +tslib_1.__exportStar(__nccwpck_require__(47492), exports); +tslib_1.__exportStar(__nccwpck_require__(56717), exports); +tslib_1.__exportStar(__nccwpck_require__(77560), exports); +tslib_1.__exportStar(__nccwpck_require__(72581), exports); +tslib_1.__exportStar(__nccwpck_require__(97568), exports); +tslib_1.__exportStar(__nccwpck_require__(59389), exports); +tslib_1.__exportStar(__nccwpck_require__(69343), exports); +tslib_1.__exportStar(__nccwpck_require__(35331), exports); +tslib_1.__exportStar(__nccwpck_require__(75265), exports); +tslib_1.__exportStar(__nccwpck_require__(98700), exports); +tslib_1.__exportStar(__nccwpck_require__(47706), exports); +tslib_1.__exportStar(__nccwpck_require__(22174), exports); +tslib_1.__exportStar(__nccwpck_require__(8101), exports); +tslib_1.__exportStar(__nccwpck_require__(47153), exports); +tslib_1.__exportStar(__nccwpck_require__(93486), exports); +tslib_1.__exportStar(__nccwpck_require__(74975), exports); +tslib_1.__exportStar(__nccwpck_require__(63248), exports); +tslib_1.__exportStar(__nccwpck_require__(56768), exports); +tslib_1.__exportStar(__nccwpck_require__(67796), exports); +tslib_1.__exportStar(__nccwpck_require__(37467), exports); +tslib_1.__exportStar(__nccwpck_require__(47587), exports); +tslib_1.__exportStar(__nccwpck_require__(84000), exports); +tslib_1.__exportStar(__nccwpck_require__(94545), exports); +tslib_1.__exportStar(__nccwpck_require__(31855), exports); +tslib_1.__exportStar(__nccwpck_require__(21145), exports); +tslib_1.__exportStar(__nccwpck_require__(96463), exports); +tslib_1.__exportStar(__nccwpck_require__(15850), exports); +tslib_1.__exportStar(__nccwpck_require__(12283), exports); +tslib_1.__exportStar(__nccwpck_require__(13125), exports); +tslib_1.__exportStar(__nccwpck_require__(27955), exports); +tslib_1.__exportStar(__nccwpck_require__(14430), exports); +tslib_1.__exportStar(__nccwpck_require__(18036), exports); +tslib_1.__exportStar(__nccwpck_require__(30885), exports); +tslib_1.__exportStar(__nccwpck_require__(52162), exports); +tslib_1.__exportStar(__nccwpck_require__(89212), exports); +tslib_1.__exportStar(__nccwpck_require__(39452), exports); +tslib_1.__exportStar(__nccwpck_require__(90134), exports); +tslib_1.__exportStar(__nccwpck_require__(40352), exports); +tslib_1.__exportStar(__nccwpck_require__(22654), exports); +tslib_1.__exportStar(__nccwpck_require__(57468), exports); +tslib_1.__exportStar(__nccwpck_require__(72154), exports); +tslib_1.__exportStar(__nccwpck_require__(47584), exports); +tslib_1.__exportStar(__nccwpck_require__(45277), exports); +tslib_1.__exportStar(__nccwpck_require__(21654), exports); +tslib_1.__exportStar(__nccwpck_require__(98689), exports); +tslib_1.__exportStar(__nccwpck_require__(51903), exports); +tslib_1.__exportStar(__nccwpck_require__(46410), exports); +tslib_1.__exportStar(__nccwpck_require__(71585), exports); +tslib_1.__exportStar(__nccwpck_require__(18671), exports); +tslib_1.__exportStar(__nccwpck_require__(91452), exports); +tslib_1.__exportStar(__nccwpck_require__(84794), exports); +tslib_1.__exportStar(__nccwpck_require__(4417), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 4417: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(3153); +tslib_1.__exportStar(__nccwpck_require__(34387), exports); +tslib_1.__exportStar(__nccwpck_require__(29889), exports); +tslib_1.__exportStar(__nccwpck_require__(18560), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 34387: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MetricValue = exports.StatisticalThreshold = exports.ComparisonOperator = exports.ActionType = exports.Action = exports.TimestreamAction = exports.TimestreamTimestamp = exports.TimestreamDimension = exports.StepFunctionsAction = exports.SqsAction = exports.SnsAction = exports.MessageFormat = exports.SalesforceAction = exports.S3Action = exports.CannedAccessControlList = exports.RepublishAction = exports.LambdaAction = exports.KinesisAction = exports.IotSiteWiseAction = exports.PutAssetPropertyValueEntry = exports.AssetPropertyValue = exports.AssetPropertyVariant = exports.AssetPropertyTimestamp = exports.IotEventsAction = exports.IotAnalyticsAction = exports.HttpAction = exports.HttpActionHeader = exports.HttpAuthorization = exports.SigV4Authorization = exports.FirehoseAction = exports.ElasticsearchAction = exports.DynamoDBv2Action = exports.PutItemInput = exports.DynamoDBAction = exports.DynamoKeyType = exports.CloudwatchMetricAction = exports.CloudwatchLogsAction = exports.CloudwatchAlarmAction = exports.UnauthorizedException = exports.TransferAlreadyCompletedException = exports.ThrottlingException = exports.ServiceUnavailableException = exports.ResourceNotFoundException = exports.InvalidRequestException = exports.InternalFailureException = exports.AcceptCertificateTransferRequest = exports.AbortConfig = exports.AbortCriteria = exports.JobExecutionFailureType = exports.AbortAction = void 0; +exports.AuthDecision = exports.AuditTaskMetadata = exports.AuditTaskType = exports.AuditTaskStatus = exports.AuditSuppression = exports.AuditNotificationType = exports.AuditNotificationTarget = exports.AuditMitigationActionsTaskTarget = exports.TaskStatisticsForAuditCheck = exports.AuditMitigationActionsTaskMetadata = exports.AuditMitigationActionsTaskStatus = exports.AuditMitigationActionExecutionMetadata = exports.AuditMitigationActionsExecutionStatus = exports.AuditFrequency = exports.AuditFinding = exports.AuditFindingSeverity = exports.RelatedResource = exports.NonCompliantResource = exports.ResourceType = exports.ResourceIdentifier = exports.PolicyVersionIdentifier = exports.AuditCheckDetails = exports.AuditCheckRunStatus = exports.AuditCheckConfiguration = exports.AttributePayload = exports.AttachThingPrincipalResponse = exports.AttachThingPrincipalRequest = exports.VersionConflictException = exports.AttachSecurityProfileResponse = exports.AttachSecurityProfileRequest = exports.AttachPrincipalPolicyRequest = exports.AttachPolicyRequest = exports.LimitExceededException = exports.AssociateTargetsWithJobResponse = exports.AssociateTargetsWithJobRequest = exports.Allowed = exports.Policy = exports.AlertTargetType = exports.AlertTarget = exports.AddThingToThingGroupResponse = exports.AddThingToThingGroupRequest = exports.AddThingToBillingGroupResponse = exports.AddThingToBillingGroupRequest = exports.AddThingsToThingGroupParams = exports.MetricToRetain = exports.ActiveViolation = exports.Behavior = exports.MetricDimension = exports.DimensionValueOperator = exports.BehaviorCriteria = void 0; +exports.JobExecutionsRolloutConfig = exports.ExponentialRolloutRate = exports.RateIncreaseCriteria = exports.InvalidQueryException = exports.CreateDynamicThingGroupResponse = exports.CreateDynamicThingGroupRequest = exports.ThingGroupProperties = exports.CreateDomainConfigurationResponse = exports.CreateDomainConfigurationRequest = exports.ServiceType = exports.CertificateValidationException = exports.CreateDimensionResponse = exports.CreateDimensionRequest = exports.DimensionType = exports.CreateCertificateFromCsrResponse = exports.CreateCertificateFromCsrRequest = exports.CreateBillingGroupResponse = exports.CreateBillingGroupRequest = exports.BillingGroupProperties = exports.CreateAuthorizerResponse = exports.CreateAuthorizerRequest = exports.Tag = exports.ResourceAlreadyExistsException = exports.CreateAuditSuppressionResponse = exports.CreateAuditSuppressionRequest = exports.InternalException = exports.ConflictingResourceUpdateException = exports.ConfirmTopicRuleDestinationResponse = exports.ConfirmTopicRuleDestinationRequest = exports.ClearDefaultAuthorizerResponse = exports.ClearDefaultAuthorizerRequest = exports.InvalidStateTransitionException = exports.CancelJobExecutionRequest = exports.CancelJobResponse = exports.CancelJobRequest = exports.CancelCertificateTransferRequest = exports.CancelAuditTaskResponse = exports.CancelAuditTaskRequest = exports.CancelAuditMitigationActionsTaskResponse = exports.CancelAuditMitigationActionsTaskRequest = exports.AutoRegistrationStatus = exports.AuthResult = exports.Denied = exports.ImplicitDeny = exports.ExplicitDeny = exports.AuthorizerSummary = exports.AuthorizerDescription = exports.AuthorizerStatus = exports.AuthorizerConfig = exports.AuthInfo = void 0; +exports.CreatePolicyVersionResponse = exports.CreatePolicyVersionRequest = exports.MalformedPolicyException = exports.CreatePolicyResponse = exports.CreatePolicyRequest = exports.CreateOTAUpdateResponse = exports.OTAUpdateStatus = exports.CreateOTAUpdateRequest = exports.Protocol = exports.OTAUpdateFile = exports.FileLocation = exports._Stream = exports.S3Location = exports.CodeSigning = exports.StartSigningJobParameter = exports.SigningProfileParameter = exports.Destination = exports.S3Destination = exports.CustomCodeSigning = exports.CodeSigningSignature = exports.CodeSigningCertificateChain = exports.AwsJobTimeoutConfig = exports.AwsJobPresignedUrlConfig = exports.AwsJobExecutionsRolloutConfig = exports.AwsJobExponentialRolloutRate = exports.AwsJobRateIncreaseCriteria = exports.AwsJobAbortConfig = exports.AwsJobAbortCriteria = exports.AwsJobAbortCriteriaFailureType = exports.AwsJobAbortCriteriaAbortAction = exports.CreateMitigationActionResponse = exports.CreateMitigationActionRequest = exports.MitigationActionParams = exports.UpdateDeviceCertificateParams = exports.DeviceCertificateUpdateAction = exports.UpdateCACertificateParams = exports.CACertificateUpdateAction = exports.ReplaceDefaultPolicyVersionParams = exports.PolicyTemplateName = exports.PublishFindingToSnsParams = exports.EnableIoTLoggingParams = exports.LogLevel = exports.CreateKeysAndCertificateResponse = exports.KeyPair = exports.CreateKeysAndCertificateRequest = exports.CreateJobResponse = exports.CreateJobRequest = exports.TimeoutConfig = exports.TargetSelection = exports.PresignedUrlConfig = void 0; +exports.DeleteDimensionResponse = exports.DeleteDimensionRequest = exports.DeleteCertificateRequest = exports.DeleteCACertificateResponse = exports.DeleteCACertificateRequest = exports.CertificateStateException = exports.DeleteBillingGroupResponse = exports.DeleteBillingGroupRequest = exports.DeleteConflictException = exports.DeleteAuthorizerResponse = exports.DeleteAuthorizerRequest = exports.DeleteAuditSuppressionResponse = exports.DeleteAuditSuppressionRequest = exports.DeleteAccountAuditConfigurationResponse = exports.DeleteAccountAuditConfigurationRequest = exports.CreateTopicRuleDestinationResponse = exports.TopicRuleDestination = exports.TopicRuleDestinationStatus = exports.HttpUrlDestinationProperties = exports.CreateTopicRuleDestinationRequest = exports.TopicRuleDestinationConfiguration = exports.HttpUrlDestinationConfiguration = exports.SqlParseException = exports.CreateTopicRuleRequest = exports.TopicRulePayload = exports.CreateThingTypeResponse = exports.CreateThingTypeRequest = exports.ThingTypeProperties = exports.CreateThingGroupResponse = exports.CreateThingGroupRequest = exports.CreateThingResponse = exports.CreateThingRequest = exports.CreateStreamResponse = exports.CreateStreamRequest = exports.StreamFile = exports.CreateSecurityProfileResponse = exports.CreateSecurityProfileRequest = exports.CreateScheduledAuditResponse = exports.CreateScheduledAuditRequest = exports.DayOfWeek = exports.CreateRoleAliasResponse = exports.CreateRoleAliasRequest = exports.CreateProvisioningTemplateVersionResponse = exports.CreateProvisioningTemplateVersionRequest = exports.CreateProvisioningTemplateResponse = exports.CreateProvisioningTemplateRequest = exports.ProvisioningHook = exports.CreateProvisioningClaimResponse = exports.CreateProvisioningClaimRequest = exports.VersionsLimitExceededException = void 0; +exports.TaskStatistics = exports.DescribeAuditTaskRequest = exports.DescribeAuditSuppressionResponse = exports.DescribeAuditSuppressionRequest = exports.DescribeAuditMitigationActionsTaskResponse = exports.MitigationAction = exports.DescribeAuditMitigationActionsTaskRequest = exports.DescribeAuditFindingResponse = exports.DescribeAuditFindingRequest = exports.DescribeAccountAuditConfigurationResponse = exports.DescribeAccountAuditConfigurationRequest = exports.DeprecateThingTypeResponse = exports.DeprecateThingTypeRequest = exports.DeleteV2LoggingLevelRequest = exports.LogTargetType = exports.DeleteTopicRuleDestinationResponse = exports.DeleteTopicRuleDestinationRequest = exports.DeleteTopicRuleRequest = exports.DeleteThingTypeResponse = exports.DeleteThingTypeRequest = exports.DeleteThingGroupResponse = exports.DeleteThingGroupRequest = exports.DeleteThingResponse = exports.DeleteThingRequest = exports.DeleteStreamResponse = exports.DeleteStreamRequest = exports.DeleteSecurityProfileResponse = exports.DeleteSecurityProfileRequest = exports.DeleteScheduledAuditResponse = exports.DeleteScheduledAuditRequest = exports.DeleteRoleAliasResponse = exports.DeleteRoleAliasRequest = exports.DeleteRegistrationCodeResponse = exports.DeleteRegistrationCodeRequest = exports.DeleteProvisioningTemplateVersionResponse = exports.DeleteProvisioningTemplateVersionRequest = exports.DeleteProvisioningTemplateResponse = exports.DeleteProvisioningTemplateRequest = exports.DeletePolicyVersionRequest = exports.DeletePolicyRequest = exports.DeleteOTAUpdateResponse = exports.DeleteOTAUpdateRequest = exports.DeleteMitigationActionResponse = exports.DeleteMitigationActionRequest = exports.DeleteJobExecutionRequest = exports.DeleteJobRequest = exports.DeleteDynamicThingGroupResponse = exports.DeleteDynamicThingGroupRequest = exports.DeleteDomainConfigurationResponse = exports.DeleteDomainConfigurationRequest = void 0; +const smithy_client_1 = __nccwpck_require__(84060); +var AbortAction; +(function (AbortAction) { + AbortAction["CANCEL"] = "CANCEL"; +})(AbortAction = exports.AbortAction || (exports.AbortAction = {})); +var JobExecutionFailureType; +(function (JobExecutionFailureType) { + JobExecutionFailureType["ALL"] = "ALL"; + JobExecutionFailureType["FAILED"] = "FAILED"; + JobExecutionFailureType["REJECTED"] = "REJECTED"; + JobExecutionFailureType["TIMED_OUT"] = "TIMED_OUT"; +})(JobExecutionFailureType = exports.JobExecutionFailureType || (exports.JobExecutionFailureType = {})); +var AbortCriteria; +(function (AbortCriteria) { + AbortCriteria.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AbortCriteria = exports.AbortCriteria || (exports.AbortCriteria = {})); +var AbortConfig; +(function (AbortConfig) { + AbortConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AbortConfig = exports.AbortConfig || (exports.AbortConfig = {})); +var AcceptCertificateTransferRequest; +(function (AcceptCertificateTransferRequest) { + AcceptCertificateTransferRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AcceptCertificateTransferRequest = exports.AcceptCertificateTransferRequest || (exports.AcceptCertificateTransferRequest = {})); +var InternalFailureException; +(function (InternalFailureException) { + InternalFailureException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InternalFailureException = exports.InternalFailureException || (exports.InternalFailureException = {})); +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 ServiceUnavailableException; +(function (ServiceUnavailableException) { + ServiceUnavailableException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ServiceUnavailableException = exports.ServiceUnavailableException || (exports.ServiceUnavailableException = {})); +var ThrottlingException; +(function (ThrottlingException) { + ThrottlingException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThrottlingException = exports.ThrottlingException || (exports.ThrottlingException = {})); +var TransferAlreadyCompletedException; +(function (TransferAlreadyCompletedException) { + TransferAlreadyCompletedException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TransferAlreadyCompletedException = exports.TransferAlreadyCompletedException || (exports.TransferAlreadyCompletedException = {})); +var UnauthorizedException; +(function (UnauthorizedException) { + UnauthorizedException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnauthorizedException = exports.UnauthorizedException || (exports.UnauthorizedException = {})); +var CloudwatchAlarmAction; +(function (CloudwatchAlarmAction) { + CloudwatchAlarmAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CloudwatchAlarmAction = exports.CloudwatchAlarmAction || (exports.CloudwatchAlarmAction = {})); +var CloudwatchLogsAction; +(function (CloudwatchLogsAction) { + CloudwatchLogsAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CloudwatchLogsAction = exports.CloudwatchLogsAction || (exports.CloudwatchLogsAction = {})); +var CloudwatchMetricAction; +(function (CloudwatchMetricAction) { + CloudwatchMetricAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CloudwatchMetricAction = exports.CloudwatchMetricAction || (exports.CloudwatchMetricAction = {})); +var DynamoKeyType; +(function (DynamoKeyType) { + DynamoKeyType["NUMBER"] = "NUMBER"; + DynamoKeyType["STRING"] = "STRING"; +})(DynamoKeyType = exports.DynamoKeyType || (exports.DynamoKeyType = {})); +var DynamoDBAction; +(function (DynamoDBAction) { + DynamoDBAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DynamoDBAction = exports.DynamoDBAction || (exports.DynamoDBAction = {})); +var PutItemInput; +(function (PutItemInput) { + PutItemInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutItemInput = exports.PutItemInput || (exports.PutItemInput = {})); +var DynamoDBv2Action; +(function (DynamoDBv2Action) { + DynamoDBv2Action.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DynamoDBv2Action = exports.DynamoDBv2Action || (exports.DynamoDBv2Action = {})); +var ElasticsearchAction; +(function (ElasticsearchAction) { + ElasticsearchAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ElasticsearchAction = exports.ElasticsearchAction || (exports.ElasticsearchAction = {})); +var FirehoseAction; +(function (FirehoseAction) { + FirehoseAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(FirehoseAction = exports.FirehoseAction || (exports.FirehoseAction = {})); +var SigV4Authorization; +(function (SigV4Authorization) { + SigV4Authorization.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SigV4Authorization = exports.SigV4Authorization || (exports.SigV4Authorization = {})); +var HttpAuthorization; +(function (HttpAuthorization) { + HttpAuthorization.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(HttpAuthorization = exports.HttpAuthorization || (exports.HttpAuthorization = {})); +var HttpActionHeader; +(function (HttpActionHeader) { + HttpActionHeader.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(HttpActionHeader = exports.HttpActionHeader || (exports.HttpActionHeader = {})); +var HttpAction; +(function (HttpAction) { + HttpAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(HttpAction = exports.HttpAction || (exports.HttpAction = {})); +var IotAnalyticsAction; +(function (IotAnalyticsAction) { + IotAnalyticsAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(IotAnalyticsAction = exports.IotAnalyticsAction || (exports.IotAnalyticsAction = {})); +var IotEventsAction; +(function (IotEventsAction) { + IotEventsAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(IotEventsAction = exports.IotEventsAction || (exports.IotEventsAction = {})); +var AssetPropertyTimestamp; +(function (AssetPropertyTimestamp) { + AssetPropertyTimestamp.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AssetPropertyTimestamp = exports.AssetPropertyTimestamp || (exports.AssetPropertyTimestamp = {})); +var AssetPropertyVariant; +(function (AssetPropertyVariant) { + AssetPropertyVariant.visit = (value, visitor) => { + if (value.stringValue !== undefined) + return visitor.stringValue(value.stringValue); + if (value.integerValue !== undefined) + return visitor.integerValue(value.integerValue); + if (value.doubleValue !== undefined) + return visitor.doubleValue(value.doubleValue); + if (value.booleanValue !== undefined) + return visitor.booleanValue(value.booleanValue); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; + AssetPropertyVariant.filterSensitiveLog = (obj) => { + if (obj.stringValue !== undefined) + return { stringValue: obj.stringValue }; + if (obj.integerValue !== undefined) + return { integerValue: obj.integerValue }; + if (obj.doubleValue !== undefined) + return { doubleValue: obj.doubleValue }; + if (obj.booleanValue !== undefined) + return { booleanValue: obj.booleanValue }; + if (obj.$unknown !== undefined) + return { [obj.$unknown[0]]: "UNKNOWN" }; + }; +})(AssetPropertyVariant = exports.AssetPropertyVariant || (exports.AssetPropertyVariant = {})); +var AssetPropertyValue; +(function (AssetPropertyValue) { + AssetPropertyValue.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.value && { value: AssetPropertyVariant.filterSensitiveLog(obj.value) }), + }); +})(AssetPropertyValue = exports.AssetPropertyValue || (exports.AssetPropertyValue = {})); +var PutAssetPropertyValueEntry; +(function (PutAssetPropertyValueEntry) { + PutAssetPropertyValueEntry.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.propertyValues && { + propertyValues: obj.propertyValues.map((item) => AssetPropertyValue.filterSensitiveLog(item)), + }), + }); +})(PutAssetPropertyValueEntry = exports.PutAssetPropertyValueEntry || (exports.PutAssetPropertyValueEntry = {})); +var IotSiteWiseAction; +(function (IotSiteWiseAction) { + IotSiteWiseAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(IotSiteWiseAction = exports.IotSiteWiseAction || (exports.IotSiteWiseAction = {})); +var KinesisAction; +(function (KinesisAction) { + KinesisAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(KinesisAction = exports.KinesisAction || (exports.KinesisAction = {})); +var LambdaAction; +(function (LambdaAction) { + LambdaAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LambdaAction = exports.LambdaAction || (exports.LambdaAction = {})); +var RepublishAction; +(function (RepublishAction) { + RepublishAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepublishAction = exports.RepublishAction || (exports.RepublishAction = {})); +var CannedAccessControlList; +(function (CannedAccessControlList) { + CannedAccessControlList["AuthenticatedRead"] = "authenticated-read"; + CannedAccessControlList["AwsExecRead"] = "aws-exec-read"; + CannedAccessControlList["BucketOwnerFullControl"] = "bucket-owner-full-control"; + CannedAccessControlList["BucketOwnerRead"] = "bucket-owner-read"; + CannedAccessControlList["LogDeliveryWrite"] = "log-delivery-write"; + CannedAccessControlList["Private"] = "private"; + CannedAccessControlList["PublicRead"] = "public-read"; + CannedAccessControlList["PublicReadWrite"] = "public-read-write"; +})(CannedAccessControlList = exports.CannedAccessControlList || (exports.CannedAccessControlList = {})); +var S3Action; +(function (S3Action) { + S3Action.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(S3Action = exports.S3Action || (exports.S3Action = {})); +var SalesforceAction; +(function (SalesforceAction) { + SalesforceAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SalesforceAction = exports.SalesforceAction || (exports.SalesforceAction = {})); +var MessageFormat; +(function (MessageFormat) { + MessageFormat["JSON"] = "JSON"; + MessageFormat["RAW"] = "RAW"; +})(MessageFormat = exports.MessageFormat || (exports.MessageFormat = {})); +var SnsAction; +(function (SnsAction) { + SnsAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SnsAction = exports.SnsAction || (exports.SnsAction = {})); +var SqsAction; +(function (SqsAction) { + SqsAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SqsAction = exports.SqsAction || (exports.SqsAction = {})); +var StepFunctionsAction; +(function (StepFunctionsAction) { + StepFunctionsAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StepFunctionsAction = exports.StepFunctionsAction || (exports.StepFunctionsAction = {})); +var TimestreamDimension; +(function (TimestreamDimension) { + TimestreamDimension.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TimestreamDimension = exports.TimestreamDimension || (exports.TimestreamDimension = {})); +var TimestreamTimestamp; +(function (TimestreamTimestamp) { + TimestreamTimestamp.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TimestreamTimestamp = exports.TimestreamTimestamp || (exports.TimestreamTimestamp = {})); +var TimestreamAction; +(function (TimestreamAction) { + TimestreamAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TimestreamAction = exports.TimestreamAction || (exports.TimestreamAction = {})); +var Action; +(function (Action) { + Action.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Action = exports.Action || (exports.Action = {})); +var ActionType; +(function (ActionType) { + ActionType["CONNECT"] = "CONNECT"; + ActionType["PUBLISH"] = "PUBLISH"; + ActionType["RECEIVE"] = "RECEIVE"; + ActionType["SUBSCRIBE"] = "SUBSCRIBE"; +})(ActionType = exports.ActionType || (exports.ActionType = {})); +var ComparisonOperator; +(function (ComparisonOperator) { + ComparisonOperator["GREATER_THAN"] = "greater-than"; + ComparisonOperator["GREATER_THAN_EQUALS"] = "greater-than-equals"; + ComparisonOperator["IN_CIDR_SET"] = "in-cidr-set"; + ComparisonOperator["IN_PORT_SET"] = "in-port-set"; + ComparisonOperator["LESS_THAN"] = "less-than"; + ComparisonOperator["LESS_THAN_EQUALS"] = "less-than-equals"; + ComparisonOperator["NOT_IN_CIDR_SET"] = "not-in-cidr-set"; + ComparisonOperator["NOT_IN_PORT_SET"] = "not-in-port-set"; +})(ComparisonOperator = exports.ComparisonOperator || (exports.ComparisonOperator = {})); +var StatisticalThreshold; +(function (StatisticalThreshold) { + StatisticalThreshold.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StatisticalThreshold = exports.StatisticalThreshold || (exports.StatisticalThreshold = {})); +var MetricValue; +(function (MetricValue) { + MetricValue.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MetricValue = exports.MetricValue || (exports.MetricValue = {})); +var BehaviorCriteria; +(function (BehaviorCriteria) { + BehaviorCriteria.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BehaviorCriteria = exports.BehaviorCriteria || (exports.BehaviorCriteria = {})); +var DimensionValueOperator; +(function (DimensionValueOperator) { + DimensionValueOperator["IN"] = "IN"; + DimensionValueOperator["NOT_IN"] = "NOT_IN"; +})(DimensionValueOperator = exports.DimensionValueOperator || (exports.DimensionValueOperator = {})); +var MetricDimension; +(function (MetricDimension) { + MetricDimension.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MetricDimension = exports.MetricDimension || (exports.MetricDimension = {})); +var Behavior; +(function (Behavior) { + Behavior.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Behavior = exports.Behavior || (exports.Behavior = {})); +var ActiveViolation; +(function (ActiveViolation) { + ActiveViolation.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ActiveViolation = exports.ActiveViolation || (exports.ActiveViolation = {})); +var MetricToRetain; +(function (MetricToRetain) { + MetricToRetain.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MetricToRetain = exports.MetricToRetain || (exports.MetricToRetain = {})); +var AddThingsToThingGroupParams; +(function (AddThingsToThingGroupParams) { + AddThingsToThingGroupParams.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AddThingsToThingGroupParams = exports.AddThingsToThingGroupParams || (exports.AddThingsToThingGroupParams = {})); +var AddThingToBillingGroupRequest; +(function (AddThingToBillingGroupRequest) { + AddThingToBillingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AddThingToBillingGroupRequest = exports.AddThingToBillingGroupRequest || (exports.AddThingToBillingGroupRequest = {})); +var AddThingToBillingGroupResponse; +(function (AddThingToBillingGroupResponse) { + AddThingToBillingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AddThingToBillingGroupResponse = exports.AddThingToBillingGroupResponse || (exports.AddThingToBillingGroupResponse = {})); +var AddThingToThingGroupRequest; +(function (AddThingToThingGroupRequest) { + AddThingToThingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AddThingToThingGroupRequest = exports.AddThingToThingGroupRequest || (exports.AddThingToThingGroupRequest = {})); +var AddThingToThingGroupResponse; +(function (AddThingToThingGroupResponse) { + AddThingToThingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AddThingToThingGroupResponse = exports.AddThingToThingGroupResponse || (exports.AddThingToThingGroupResponse = {})); +var AlertTarget; +(function (AlertTarget) { + AlertTarget.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AlertTarget = exports.AlertTarget || (exports.AlertTarget = {})); +var AlertTargetType; +(function (AlertTargetType) { + AlertTargetType["SNS"] = "SNS"; +})(AlertTargetType = exports.AlertTargetType || (exports.AlertTargetType = {})); +var Policy; +(function (Policy) { + Policy.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Policy = exports.Policy || (exports.Policy = {})); +var Allowed; +(function (Allowed) { + Allowed.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Allowed = exports.Allowed || (exports.Allowed = {})); +var AssociateTargetsWithJobRequest; +(function (AssociateTargetsWithJobRequest) { + AssociateTargetsWithJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AssociateTargetsWithJobRequest = exports.AssociateTargetsWithJobRequest || (exports.AssociateTargetsWithJobRequest = {})); +var AssociateTargetsWithJobResponse; +(function (AssociateTargetsWithJobResponse) { + AssociateTargetsWithJobResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AssociateTargetsWithJobResponse = exports.AssociateTargetsWithJobResponse || (exports.AssociateTargetsWithJobResponse = {})); +var LimitExceededException; +(function (LimitExceededException) { + LimitExceededException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {})); +var AttachPolicyRequest; +(function (AttachPolicyRequest) { + AttachPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AttachPolicyRequest = exports.AttachPolicyRequest || (exports.AttachPolicyRequest = {})); +var AttachPrincipalPolicyRequest; +(function (AttachPrincipalPolicyRequest) { + AttachPrincipalPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AttachPrincipalPolicyRequest = exports.AttachPrincipalPolicyRequest || (exports.AttachPrincipalPolicyRequest = {})); +var AttachSecurityProfileRequest; +(function (AttachSecurityProfileRequest) { + AttachSecurityProfileRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AttachSecurityProfileRequest = exports.AttachSecurityProfileRequest || (exports.AttachSecurityProfileRequest = {})); +var AttachSecurityProfileResponse; +(function (AttachSecurityProfileResponse) { + AttachSecurityProfileResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AttachSecurityProfileResponse = exports.AttachSecurityProfileResponse || (exports.AttachSecurityProfileResponse = {})); +var VersionConflictException; +(function (VersionConflictException) { + VersionConflictException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(VersionConflictException = exports.VersionConflictException || (exports.VersionConflictException = {})); +var AttachThingPrincipalRequest; +(function (AttachThingPrincipalRequest) { + AttachThingPrincipalRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AttachThingPrincipalRequest = exports.AttachThingPrincipalRequest || (exports.AttachThingPrincipalRequest = {})); +var AttachThingPrincipalResponse; +(function (AttachThingPrincipalResponse) { + AttachThingPrincipalResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AttachThingPrincipalResponse = exports.AttachThingPrincipalResponse || (exports.AttachThingPrincipalResponse = {})); +var AttributePayload; +(function (AttributePayload) { + AttributePayload.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AttributePayload = exports.AttributePayload || (exports.AttributePayload = {})); +var AuditCheckConfiguration; +(function (AuditCheckConfiguration) { + AuditCheckConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuditCheckConfiguration = exports.AuditCheckConfiguration || (exports.AuditCheckConfiguration = {})); +var AuditCheckRunStatus; +(function (AuditCheckRunStatus) { + AuditCheckRunStatus["CANCELED"] = "CANCELED"; + AuditCheckRunStatus["COMPLETED_COMPLIANT"] = "COMPLETED_COMPLIANT"; + AuditCheckRunStatus["COMPLETED_NON_COMPLIANT"] = "COMPLETED_NON_COMPLIANT"; + AuditCheckRunStatus["FAILED"] = "FAILED"; + AuditCheckRunStatus["IN_PROGRESS"] = "IN_PROGRESS"; + AuditCheckRunStatus["WAITING_FOR_DATA_COLLECTION"] = "WAITING_FOR_DATA_COLLECTION"; +})(AuditCheckRunStatus = exports.AuditCheckRunStatus || (exports.AuditCheckRunStatus = {})); +var AuditCheckDetails; +(function (AuditCheckDetails) { + AuditCheckDetails.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuditCheckDetails = exports.AuditCheckDetails || (exports.AuditCheckDetails = {})); +var PolicyVersionIdentifier; +(function (PolicyVersionIdentifier) { + PolicyVersionIdentifier.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PolicyVersionIdentifier = exports.PolicyVersionIdentifier || (exports.PolicyVersionIdentifier = {})); +var ResourceIdentifier; +(function (ResourceIdentifier) { + ResourceIdentifier.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceIdentifier = exports.ResourceIdentifier || (exports.ResourceIdentifier = {})); +var ResourceType; +(function (ResourceType) { + ResourceType["ACCOUNT_SETTINGS"] = "ACCOUNT_SETTINGS"; + ResourceType["CA_CERTIFICATE"] = "CA_CERTIFICATE"; + ResourceType["CLIENT_ID"] = "CLIENT_ID"; + ResourceType["COGNITO_IDENTITY_POOL"] = "COGNITO_IDENTITY_POOL"; + ResourceType["DEVICE_CERTIFICATE"] = "DEVICE_CERTIFICATE"; + ResourceType["IAM_ROLE"] = "IAM_ROLE"; + ResourceType["IOT_POLICY"] = "IOT_POLICY"; + ResourceType["ROLE_ALIAS"] = "ROLE_ALIAS"; +})(ResourceType = exports.ResourceType || (exports.ResourceType = {})); +var NonCompliantResource; +(function (NonCompliantResource) { + NonCompliantResource.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(NonCompliantResource = exports.NonCompliantResource || (exports.NonCompliantResource = {})); +var RelatedResource; +(function (RelatedResource) { + RelatedResource.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RelatedResource = exports.RelatedResource || (exports.RelatedResource = {})); +var AuditFindingSeverity; +(function (AuditFindingSeverity) { + AuditFindingSeverity["CRITICAL"] = "CRITICAL"; + AuditFindingSeverity["HIGH"] = "HIGH"; + AuditFindingSeverity["LOW"] = "LOW"; + AuditFindingSeverity["MEDIUM"] = "MEDIUM"; +})(AuditFindingSeverity = exports.AuditFindingSeverity || (exports.AuditFindingSeverity = {})); +var AuditFinding; +(function (AuditFinding) { + AuditFinding.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuditFinding = exports.AuditFinding || (exports.AuditFinding = {})); +var AuditFrequency; +(function (AuditFrequency) { + AuditFrequency["BIWEEKLY"] = "BIWEEKLY"; + AuditFrequency["DAILY"] = "DAILY"; + AuditFrequency["MONTHLY"] = "MONTHLY"; + AuditFrequency["WEEKLY"] = "WEEKLY"; +})(AuditFrequency = exports.AuditFrequency || (exports.AuditFrequency = {})); +var AuditMitigationActionsExecutionStatus; +(function (AuditMitigationActionsExecutionStatus) { + AuditMitigationActionsExecutionStatus["CANCELED"] = "CANCELED"; + AuditMitigationActionsExecutionStatus["COMPLETED"] = "COMPLETED"; + AuditMitigationActionsExecutionStatus["FAILED"] = "FAILED"; + AuditMitigationActionsExecutionStatus["IN_PROGRESS"] = "IN_PROGRESS"; + AuditMitigationActionsExecutionStatus["PENDING"] = "PENDING"; + AuditMitigationActionsExecutionStatus["SKIPPED"] = "SKIPPED"; +})(AuditMitigationActionsExecutionStatus = exports.AuditMitigationActionsExecutionStatus || (exports.AuditMitigationActionsExecutionStatus = {})); +var AuditMitigationActionExecutionMetadata; +(function (AuditMitigationActionExecutionMetadata) { + AuditMitigationActionExecutionMetadata.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuditMitigationActionExecutionMetadata = exports.AuditMitigationActionExecutionMetadata || (exports.AuditMitigationActionExecutionMetadata = {})); +var AuditMitigationActionsTaskStatus; +(function (AuditMitigationActionsTaskStatus) { + AuditMitigationActionsTaskStatus["CANCELED"] = "CANCELED"; + AuditMitigationActionsTaskStatus["COMPLETED"] = "COMPLETED"; + AuditMitigationActionsTaskStatus["FAILED"] = "FAILED"; + AuditMitigationActionsTaskStatus["IN_PROGRESS"] = "IN_PROGRESS"; +})(AuditMitigationActionsTaskStatus = exports.AuditMitigationActionsTaskStatus || (exports.AuditMitigationActionsTaskStatus = {})); +var AuditMitigationActionsTaskMetadata; +(function (AuditMitigationActionsTaskMetadata) { + AuditMitigationActionsTaskMetadata.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuditMitigationActionsTaskMetadata = exports.AuditMitigationActionsTaskMetadata || (exports.AuditMitigationActionsTaskMetadata = {})); +var TaskStatisticsForAuditCheck; +(function (TaskStatisticsForAuditCheck) { + TaskStatisticsForAuditCheck.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TaskStatisticsForAuditCheck = exports.TaskStatisticsForAuditCheck || (exports.TaskStatisticsForAuditCheck = {})); +var AuditMitigationActionsTaskTarget; +(function (AuditMitigationActionsTaskTarget) { + AuditMitigationActionsTaskTarget.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuditMitigationActionsTaskTarget = exports.AuditMitigationActionsTaskTarget || (exports.AuditMitigationActionsTaskTarget = {})); +var AuditNotificationTarget; +(function (AuditNotificationTarget) { + AuditNotificationTarget.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuditNotificationTarget = exports.AuditNotificationTarget || (exports.AuditNotificationTarget = {})); +var AuditNotificationType; +(function (AuditNotificationType) { + AuditNotificationType["SNS"] = "SNS"; +})(AuditNotificationType = exports.AuditNotificationType || (exports.AuditNotificationType = {})); +var AuditSuppression; +(function (AuditSuppression) { + AuditSuppression.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuditSuppression = exports.AuditSuppression || (exports.AuditSuppression = {})); +var AuditTaskStatus; +(function (AuditTaskStatus) { + AuditTaskStatus["CANCELED"] = "CANCELED"; + AuditTaskStatus["COMPLETED"] = "COMPLETED"; + AuditTaskStatus["FAILED"] = "FAILED"; + AuditTaskStatus["IN_PROGRESS"] = "IN_PROGRESS"; +})(AuditTaskStatus = exports.AuditTaskStatus || (exports.AuditTaskStatus = {})); +var AuditTaskType; +(function (AuditTaskType) { + AuditTaskType["ON_DEMAND_AUDIT_TASK"] = "ON_DEMAND_AUDIT_TASK"; + AuditTaskType["SCHEDULED_AUDIT_TASK"] = "SCHEDULED_AUDIT_TASK"; +})(AuditTaskType = exports.AuditTaskType || (exports.AuditTaskType = {})); +var AuditTaskMetadata; +(function (AuditTaskMetadata) { + AuditTaskMetadata.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuditTaskMetadata = exports.AuditTaskMetadata || (exports.AuditTaskMetadata = {})); +var AuthDecision; +(function (AuthDecision) { + AuthDecision["ALLOWED"] = "ALLOWED"; + AuthDecision["EXPLICIT_DENY"] = "EXPLICIT_DENY"; + AuthDecision["IMPLICIT_DENY"] = "IMPLICIT_DENY"; +})(AuthDecision = exports.AuthDecision || (exports.AuthDecision = {})); +var AuthInfo; +(function (AuthInfo) { + AuthInfo.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuthInfo = exports.AuthInfo || (exports.AuthInfo = {})); +var AuthorizerConfig; +(function (AuthorizerConfig) { + AuthorizerConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuthorizerConfig = exports.AuthorizerConfig || (exports.AuthorizerConfig = {})); +var AuthorizerStatus; +(function (AuthorizerStatus) { + AuthorizerStatus["ACTIVE"] = "ACTIVE"; + AuthorizerStatus["INACTIVE"] = "INACTIVE"; +})(AuthorizerStatus = exports.AuthorizerStatus || (exports.AuthorizerStatus = {})); +var AuthorizerDescription; +(function (AuthorizerDescription) { + AuthorizerDescription.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuthorizerDescription = exports.AuthorizerDescription || (exports.AuthorizerDescription = {})); +var AuthorizerSummary; +(function (AuthorizerSummary) { + AuthorizerSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuthorizerSummary = exports.AuthorizerSummary || (exports.AuthorizerSummary = {})); +var ExplicitDeny; +(function (ExplicitDeny) { + ExplicitDeny.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ExplicitDeny = exports.ExplicitDeny || (exports.ExplicitDeny = {})); +var ImplicitDeny; +(function (ImplicitDeny) { + ImplicitDeny.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImplicitDeny = exports.ImplicitDeny || (exports.ImplicitDeny = {})); +var Denied; +(function (Denied) { + Denied.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Denied = exports.Denied || (exports.Denied = {})); +var AuthResult; +(function (AuthResult) { + AuthResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuthResult = exports.AuthResult || (exports.AuthResult = {})); +var AutoRegistrationStatus; +(function (AutoRegistrationStatus) { + AutoRegistrationStatus["DISABLE"] = "DISABLE"; + AutoRegistrationStatus["ENABLE"] = "ENABLE"; +})(AutoRegistrationStatus = exports.AutoRegistrationStatus || (exports.AutoRegistrationStatus = {})); +var CancelAuditMitigationActionsTaskRequest; +(function (CancelAuditMitigationActionsTaskRequest) { + CancelAuditMitigationActionsTaskRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CancelAuditMitigationActionsTaskRequest = exports.CancelAuditMitigationActionsTaskRequest || (exports.CancelAuditMitigationActionsTaskRequest = {})); +var CancelAuditMitigationActionsTaskResponse; +(function (CancelAuditMitigationActionsTaskResponse) { + CancelAuditMitigationActionsTaskResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CancelAuditMitigationActionsTaskResponse = exports.CancelAuditMitigationActionsTaskResponse || (exports.CancelAuditMitigationActionsTaskResponse = {})); +var CancelAuditTaskRequest; +(function (CancelAuditTaskRequest) { + CancelAuditTaskRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CancelAuditTaskRequest = exports.CancelAuditTaskRequest || (exports.CancelAuditTaskRequest = {})); +var CancelAuditTaskResponse; +(function (CancelAuditTaskResponse) { + CancelAuditTaskResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CancelAuditTaskResponse = exports.CancelAuditTaskResponse || (exports.CancelAuditTaskResponse = {})); +var CancelCertificateTransferRequest; +(function (CancelCertificateTransferRequest) { + CancelCertificateTransferRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CancelCertificateTransferRequest = exports.CancelCertificateTransferRequest || (exports.CancelCertificateTransferRequest = {})); +var CancelJobRequest; +(function (CancelJobRequest) { + CancelJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CancelJobRequest = exports.CancelJobRequest || (exports.CancelJobRequest = {})); +var CancelJobResponse; +(function (CancelJobResponse) { + CancelJobResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CancelJobResponse = exports.CancelJobResponse || (exports.CancelJobResponse = {})); +var CancelJobExecutionRequest; +(function (CancelJobExecutionRequest) { + CancelJobExecutionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CancelJobExecutionRequest = exports.CancelJobExecutionRequest || (exports.CancelJobExecutionRequest = {})); +var InvalidStateTransitionException; +(function (InvalidStateTransitionException) { + InvalidStateTransitionException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidStateTransitionException = exports.InvalidStateTransitionException || (exports.InvalidStateTransitionException = {})); +var ClearDefaultAuthorizerRequest; +(function (ClearDefaultAuthorizerRequest) { + ClearDefaultAuthorizerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ClearDefaultAuthorizerRequest = exports.ClearDefaultAuthorizerRequest || (exports.ClearDefaultAuthorizerRequest = {})); +var ClearDefaultAuthorizerResponse; +(function (ClearDefaultAuthorizerResponse) { + ClearDefaultAuthorizerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ClearDefaultAuthorizerResponse = exports.ClearDefaultAuthorizerResponse || (exports.ClearDefaultAuthorizerResponse = {})); +var ConfirmTopicRuleDestinationRequest; +(function (ConfirmTopicRuleDestinationRequest) { + ConfirmTopicRuleDestinationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ConfirmTopicRuleDestinationRequest = exports.ConfirmTopicRuleDestinationRequest || (exports.ConfirmTopicRuleDestinationRequest = {})); +var ConfirmTopicRuleDestinationResponse; +(function (ConfirmTopicRuleDestinationResponse) { + ConfirmTopicRuleDestinationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ConfirmTopicRuleDestinationResponse = exports.ConfirmTopicRuleDestinationResponse || (exports.ConfirmTopicRuleDestinationResponse = {})); +var ConflictingResourceUpdateException; +(function (ConflictingResourceUpdateException) { + ConflictingResourceUpdateException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ConflictingResourceUpdateException = exports.ConflictingResourceUpdateException || (exports.ConflictingResourceUpdateException = {})); +var InternalException; +(function (InternalException) { + InternalException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InternalException = exports.InternalException || (exports.InternalException = {})); +var CreateAuditSuppressionRequest; +(function (CreateAuditSuppressionRequest) { + CreateAuditSuppressionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateAuditSuppressionRequest = exports.CreateAuditSuppressionRequest || (exports.CreateAuditSuppressionRequest = {})); +var CreateAuditSuppressionResponse; +(function (CreateAuditSuppressionResponse) { + CreateAuditSuppressionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateAuditSuppressionResponse = exports.CreateAuditSuppressionResponse || (exports.CreateAuditSuppressionResponse = {})); +var ResourceAlreadyExistsException; +(function (ResourceAlreadyExistsException) { + ResourceAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceAlreadyExistsException = exports.ResourceAlreadyExistsException || (exports.ResourceAlreadyExistsException = {})); +var Tag; +(function (Tag) { + Tag.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Tag = exports.Tag || (exports.Tag = {})); +var CreateAuthorizerRequest; +(function (CreateAuthorizerRequest) { + CreateAuthorizerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateAuthorizerRequest = exports.CreateAuthorizerRequest || (exports.CreateAuthorizerRequest = {})); +var CreateAuthorizerResponse; +(function (CreateAuthorizerResponse) { + CreateAuthorizerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateAuthorizerResponse = exports.CreateAuthorizerResponse || (exports.CreateAuthorizerResponse = {})); +var BillingGroupProperties; +(function (BillingGroupProperties) { + BillingGroupProperties.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BillingGroupProperties = exports.BillingGroupProperties || (exports.BillingGroupProperties = {})); +var CreateBillingGroupRequest; +(function (CreateBillingGroupRequest) { + CreateBillingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateBillingGroupRequest = exports.CreateBillingGroupRequest || (exports.CreateBillingGroupRequest = {})); +var CreateBillingGroupResponse; +(function (CreateBillingGroupResponse) { + CreateBillingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateBillingGroupResponse = exports.CreateBillingGroupResponse || (exports.CreateBillingGroupResponse = {})); +var CreateCertificateFromCsrRequest; +(function (CreateCertificateFromCsrRequest) { + CreateCertificateFromCsrRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateCertificateFromCsrRequest = exports.CreateCertificateFromCsrRequest || (exports.CreateCertificateFromCsrRequest = {})); +var CreateCertificateFromCsrResponse; +(function (CreateCertificateFromCsrResponse) { + CreateCertificateFromCsrResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateCertificateFromCsrResponse = exports.CreateCertificateFromCsrResponse || (exports.CreateCertificateFromCsrResponse = {})); +var DimensionType; +(function (DimensionType) { + DimensionType["TOPIC_FILTER"] = "TOPIC_FILTER"; +})(DimensionType = exports.DimensionType || (exports.DimensionType = {})); +var CreateDimensionRequest; +(function (CreateDimensionRequest) { + CreateDimensionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateDimensionRequest = exports.CreateDimensionRequest || (exports.CreateDimensionRequest = {})); +var CreateDimensionResponse; +(function (CreateDimensionResponse) { + CreateDimensionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateDimensionResponse = exports.CreateDimensionResponse || (exports.CreateDimensionResponse = {})); +var CertificateValidationException; +(function (CertificateValidationException) { + CertificateValidationException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CertificateValidationException = exports.CertificateValidationException || (exports.CertificateValidationException = {})); +var ServiceType; +(function (ServiceType) { + ServiceType["CREDENTIAL_PROVIDER"] = "CREDENTIAL_PROVIDER"; + ServiceType["DATA"] = "DATA"; + ServiceType["JOBS"] = "JOBS"; +})(ServiceType = exports.ServiceType || (exports.ServiceType = {})); +var CreateDomainConfigurationRequest; +(function (CreateDomainConfigurationRequest) { + CreateDomainConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateDomainConfigurationRequest = exports.CreateDomainConfigurationRequest || (exports.CreateDomainConfigurationRequest = {})); +var CreateDomainConfigurationResponse; +(function (CreateDomainConfigurationResponse) { + CreateDomainConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateDomainConfigurationResponse = exports.CreateDomainConfigurationResponse || (exports.CreateDomainConfigurationResponse = {})); +var ThingGroupProperties; +(function (ThingGroupProperties) { + ThingGroupProperties.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingGroupProperties = exports.ThingGroupProperties || (exports.ThingGroupProperties = {})); +var CreateDynamicThingGroupRequest; +(function (CreateDynamicThingGroupRequest) { + CreateDynamicThingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateDynamicThingGroupRequest = exports.CreateDynamicThingGroupRequest || (exports.CreateDynamicThingGroupRequest = {})); +var CreateDynamicThingGroupResponse; +(function (CreateDynamicThingGroupResponse) { + CreateDynamicThingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateDynamicThingGroupResponse = exports.CreateDynamicThingGroupResponse || (exports.CreateDynamicThingGroupResponse = {})); +var InvalidQueryException; +(function (InvalidQueryException) { + InvalidQueryException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidQueryException = exports.InvalidQueryException || (exports.InvalidQueryException = {})); +var RateIncreaseCriteria; +(function (RateIncreaseCriteria) { + RateIncreaseCriteria.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RateIncreaseCriteria = exports.RateIncreaseCriteria || (exports.RateIncreaseCriteria = {})); +var ExponentialRolloutRate; +(function (ExponentialRolloutRate) { + ExponentialRolloutRate.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ExponentialRolloutRate = exports.ExponentialRolloutRate || (exports.ExponentialRolloutRate = {})); +var JobExecutionsRolloutConfig; +(function (JobExecutionsRolloutConfig) { + JobExecutionsRolloutConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(JobExecutionsRolloutConfig = exports.JobExecutionsRolloutConfig || (exports.JobExecutionsRolloutConfig = {})); +var PresignedUrlConfig; +(function (PresignedUrlConfig) { + PresignedUrlConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PresignedUrlConfig = exports.PresignedUrlConfig || (exports.PresignedUrlConfig = {})); +var TargetSelection; +(function (TargetSelection) { + TargetSelection["CONTINUOUS"] = "CONTINUOUS"; + TargetSelection["SNAPSHOT"] = "SNAPSHOT"; +})(TargetSelection = exports.TargetSelection || (exports.TargetSelection = {})); +var TimeoutConfig; +(function (TimeoutConfig) { + TimeoutConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TimeoutConfig = exports.TimeoutConfig || (exports.TimeoutConfig = {})); +var CreateJobRequest; +(function (CreateJobRequest) { + CreateJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateJobRequest = exports.CreateJobRequest || (exports.CreateJobRequest = {})); +var CreateJobResponse; +(function (CreateJobResponse) { + CreateJobResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateJobResponse = exports.CreateJobResponse || (exports.CreateJobResponse = {})); +var CreateKeysAndCertificateRequest; +(function (CreateKeysAndCertificateRequest) { + CreateKeysAndCertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateKeysAndCertificateRequest = exports.CreateKeysAndCertificateRequest || (exports.CreateKeysAndCertificateRequest = {})); +var KeyPair; +(function (KeyPair) { + KeyPair.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.PrivateKey && { PrivateKey: smithy_client_1.SENSITIVE_STRING }), + }); +})(KeyPair = exports.KeyPair || (exports.KeyPair = {})); +var CreateKeysAndCertificateResponse; +(function (CreateKeysAndCertificateResponse) { + CreateKeysAndCertificateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.keyPair && { keyPair: KeyPair.filterSensitiveLog(obj.keyPair) }), + }); +})(CreateKeysAndCertificateResponse = exports.CreateKeysAndCertificateResponse || (exports.CreateKeysAndCertificateResponse = {})); +var LogLevel; +(function (LogLevel) { + LogLevel["DEBUG"] = "DEBUG"; + LogLevel["DISABLED"] = "DISABLED"; + LogLevel["ERROR"] = "ERROR"; + LogLevel["INFO"] = "INFO"; + LogLevel["WARN"] = "WARN"; +})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); +var EnableIoTLoggingParams; +(function (EnableIoTLoggingParams) { + EnableIoTLoggingParams.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EnableIoTLoggingParams = exports.EnableIoTLoggingParams || (exports.EnableIoTLoggingParams = {})); +var PublishFindingToSnsParams; +(function (PublishFindingToSnsParams) { + PublishFindingToSnsParams.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PublishFindingToSnsParams = exports.PublishFindingToSnsParams || (exports.PublishFindingToSnsParams = {})); +var PolicyTemplateName; +(function (PolicyTemplateName) { + PolicyTemplateName["BLANK_POLICY"] = "BLANK_POLICY"; +})(PolicyTemplateName = exports.PolicyTemplateName || (exports.PolicyTemplateName = {})); +var ReplaceDefaultPolicyVersionParams; +(function (ReplaceDefaultPolicyVersionParams) { + ReplaceDefaultPolicyVersionParams.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReplaceDefaultPolicyVersionParams = exports.ReplaceDefaultPolicyVersionParams || (exports.ReplaceDefaultPolicyVersionParams = {})); +var CACertificateUpdateAction; +(function (CACertificateUpdateAction) { + CACertificateUpdateAction["DEACTIVATE"] = "DEACTIVATE"; +})(CACertificateUpdateAction = exports.CACertificateUpdateAction || (exports.CACertificateUpdateAction = {})); +var UpdateCACertificateParams; +(function (UpdateCACertificateParams) { + UpdateCACertificateParams.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateCACertificateParams = exports.UpdateCACertificateParams || (exports.UpdateCACertificateParams = {})); +var DeviceCertificateUpdateAction; +(function (DeviceCertificateUpdateAction) { + DeviceCertificateUpdateAction["DEACTIVATE"] = "DEACTIVATE"; +})(DeviceCertificateUpdateAction = exports.DeviceCertificateUpdateAction || (exports.DeviceCertificateUpdateAction = {})); +var UpdateDeviceCertificateParams; +(function (UpdateDeviceCertificateParams) { + UpdateDeviceCertificateParams.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateDeviceCertificateParams = exports.UpdateDeviceCertificateParams || (exports.UpdateDeviceCertificateParams = {})); +var MitigationActionParams; +(function (MitigationActionParams) { + MitigationActionParams.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MitigationActionParams = exports.MitigationActionParams || (exports.MitigationActionParams = {})); +var CreateMitigationActionRequest; +(function (CreateMitigationActionRequest) { + CreateMitigationActionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateMitigationActionRequest = exports.CreateMitigationActionRequest || (exports.CreateMitigationActionRequest = {})); +var CreateMitigationActionResponse; +(function (CreateMitigationActionResponse) { + CreateMitigationActionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateMitigationActionResponse = exports.CreateMitigationActionResponse || (exports.CreateMitigationActionResponse = {})); +var AwsJobAbortCriteriaAbortAction; +(function (AwsJobAbortCriteriaAbortAction) { + AwsJobAbortCriteriaAbortAction["CANCEL"] = "CANCEL"; +})(AwsJobAbortCriteriaAbortAction = exports.AwsJobAbortCriteriaAbortAction || (exports.AwsJobAbortCriteriaAbortAction = {})); +var AwsJobAbortCriteriaFailureType; +(function (AwsJobAbortCriteriaFailureType) { + AwsJobAbortCriteriaFailureType["ALL"] = "ALL"; + AwsJobAbortCriteriaFailureType["FAILED"] = "FAILED"; + AwsJobAbortCriteriaFailureType["REJECTED"] = "REJECTED"; + AwsJobAbortCriteriaFailureType["TIMED_OUT"] = "TIMED_OUT"; +})(AwsJobAbortCriteriaFailureType = exports.AwsJobAbortCriteriaFailureType || (exports.AwsJobAbortCriteriaFailureType = {})); +var AwsJobAbortCriteria; +(function (AwsJobAbortCriteria) { + AwsJobAbortCriteria.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AwsJobAbortCriteria = exports.AwsJobAbortCriteria || (exports.AwsJobAbortCriteria = {})); +var AwsJobAbortConfig; +(function (AwsJobAbortConfig) { + AwsJobAbortConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AwsJobAbortConfig = exports.AwsJobAbortConfig || (exports.AwsJobAbortConfig = {})); +var AwsJobRateIncreaseCriteria; +(function (AwsJobRateIncreaseCriteria) { + AwsJobRateIncreaseCriteria.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AwsJobRateIncreaseCriteria = exports.AwsJobRateIncreaseCriteria || (exports.AwsJobRateIncreaseCriteria = {})); +var AwsJobExponentialRolloutRate; +(function (AwsJobExponentialRolloutRate) { + AwsJobExponentialRolloutRate.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AwsJobExponentialRolloutRate = exports.AwsJobExponentialRolloutRate || (exports.AwsJobExponentialRolloutRate = {})); +var AwsJobExecutionsRolloutConfig; +(function (AwsJobExecutionsRolloutConfig) { + AwsJobExecutionsRolloutConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AwsJobExecutionsRolloutConfig = exports.AwsJobExecutionsRolloutConfig || (exports.AwsJobExecutionsRolloutConfig = {})); +var AwsJobPresignedUrlConfig; +(function (AwsJobPresignedUrlConfig) { + AwsJobPresignedUrlConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AwsJobPresignedUrlConfig = exports.AwsJobPresignedUrlConfig || (exports.AwsJobPresignedUrlConfig = {})); +var AwsJobTimeoutConfig; +(function (AwsJobTimeoutConfig) { + AwsJobTimeoutConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AwsJobTimeoutConfig = exports.AwsJobTimeoutConfig || (exports.AwsJobTimeoutConfig = {})); +var CodeSigningCertificateChain; +(function (CodeSigningCertificateChain) { + CodeSigningCertificateChain.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CodeSigningCertificateChain = exports.CodeSigningCertificateChain || (exports.CodeSigningCertificateChain = {})); +var CodeSigningSignature; +(function (CodeSigningSignature) { + CodeSigningSignature.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CodeSigningSignature = exports.CodeSigningSignature || (exports.CodeSigningSignature = {})); +var CustomCodeSigning; +(function (CustomCodeSigning) { + CustomCodeSigning.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CustomCodeSigning = exports.CustomCodeSigning || (exports.CustomCodeSigning = {})); +var S3Destination; +(function (S3Destination) { + S3Destination.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(S3Destination = exports.S3Destination || (exports.S3Destination = {})); +var Destination; +(function (Destination) { + Destination.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Destination = exports.Destination || (exports.Destination = {})); +var SigningProfileParameter; +(function (SigningProfileParameter) { + SigningProfileParameter.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SigningProfileParameter = exports.SigningProfileParameter || (exports.SigningProfileParameter = {})); +var StartSigningJobParameter; +(function (StartSigningJobParameter) { + StartSigningJobParameter.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartSigningJobParameter = exports.StartSigningJobParameter || (exports.StartSigningJobParameter = {})); +var CodeSigning; +(function (CodeSigning) { + CodeSigning.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CodeSigning = exports.CodeSigning || (exports.CodeSigning = {})); +var S3Location; +(function (S3Location) { + S3Location.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(S3Location = exports.S3Location || (exports.S3Location = {})); +var _Stream; +(function (_Stream) { + _Stream.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(_Stream = exports._Stream || (exports._Stream = {})); +var FileLocation; +(function (FileLocation) { + FileLocation.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(FileLocation = exports.FileLocation || (exports.FileLocation = {})); +var OTAUpdateFile; +(function (OTAUpdateFile) { + OTAUpdateFile.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(OTAUpdateFile = exports.OTAUpdateFile || (exports.OTAUpdateFile = {})); +var Protocol; +(function (Protocol) { + Protocol["HTTP"] = "HTTP"; + Protocol["MQTT"] = "MQTT"; +})(Protocol = exports.Protocol || (exports.Protocol = {})); +var CreateOTAUpdateRequest; +(function (CreateOTAUpdateRequest) { + CreateOTAUpdateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateOTAUpdateRequest = exports.CreateOTAUpdateRequest || (exports.CreateOTAUpdateRequest = {})); +var OTAUpdateStatus; +(function (OTAUpdateStatus) { + OTAUpdateStatus["CREATE_COMPLETE"] = "CREATE_COMPLETE"; + OTAUpdateStatus["CREATE_FAILED"] = "CREATE_FAILED"; + OTAUpdateStatus["CREATE_IN_PROGRESS"] = "CREATE_IN_PROGRESS"; + OTAUpdateStatus["CREATE_PENDING"] = "CREATE_PENDING"; +})(OTAUpdateStatus = exports.OTAUpdateStatus || (exports.OTAUpdateStatus = {})); +var CreateOTAUpdateResponse; +(function (CreateOTAUpdateResponse) { + CreateOTAUpdateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateOTAUpdateResponse = exports.CreateOTAUpdateResponse || (exports.CreateOTAUpdateResponse = {})); +var CreatePolicyRequest; +(function (CreatePolicyRequest) { + CreatePolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreatePolicyRequest = exports.CreatePolicyRequest || (exports.CreatePolicyRequest = {})); +var CreatePolicyResponse; +(function (CreatePolicyResponse) { + CreatePolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreatePolicyResponse = exports.CreatePolicyResponse || (exports.CreatePolicyResponse = {})); +var MalformedPolicyException; +(function (MalformedPolicyException) { + MalformedPolicyException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MalformedPolicyException = exports.MalformedPolicyException || (exports.MalformedPolicyException = {})); +var CreatePolicyVersionRequest; +(function (CreatePolicyVersionRequest) { + CreatePolicyVersionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreatePolicyVersionRequest = exports.CreatePolicyVersionRequest || (exports.CreatePolicyVersionRequest = {})); +var CreatePolicyVersionResponse; +(function (CreatePolicyVersionResponse) { + CreatePolicyVersionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreatePolicyVersionResponse = exports.CreatePolicyVersionResponse || (exports.CreatePolicyVersionResponse = {})); +var VersionsLimitExceededException; +(function (VersionsLimitExceededException) { + VersionsLimitExceededException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(VersionsLimitExceededException = exports.VersionsLimitExceededException || (exports.VersionsLimitExceededException = {})); +var CreateProvisioningClaimRequest; +(function (CreateProvisioningClaimRequest) { + CreateProvisioningClaimRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateProvisioningClaimRequest = exports.CreateProvisioningClaimRequest || (exports.CreateProvisioningClaimRequest = {})); +var CreateProvisioningClaimResponse; +(function (CreateProvisioningClaimResponse) { + CreateProvisioningClaimResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.keyPair && { keyPair: KeyPair.filterSensitiveLog(obj.keyPair) }), + }); +})(CreateProvisioningClaimResponse = exports.CreateProvisioningClaimResponse || (exports.CreateProvisioningClaimResponse = {})); +var ProvisioningHook; +(function (ProvisioningHook) { + ProvisioningHook.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ProvisioningHook = exports.ProvisioningHook || (exports.ProvisioningHook = {})); +var CreateProvisioningTemplateRequest; +(function (CreateProvisioningTemplateRequest) { + CreateProvisioningTemplateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateProvisioningTemplateRequest = exports.CreateProvisioningTemplateRequest || (exports.CreateProvisioningTemplateRequest = {})); +var CreateProvisioningTemplateResponse; +(function (CreateProvisioningTemplateResponse) { + CreateProvisioningTemplateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateProvisioningTemplateResponse = exports.CreateProvisioningTemplateResponse || (exports.CreateProvisioningTemplateResponse = {})); +var CreateProvisioningTemplateVersionRequest; +(function (CreateProvisioningTemplateVersionRequest) { + CreateProvisioningTemplateVersionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateProvisioningTemplateVersionRequest = exports.CreateProvisioningTemplateVersionRequest || (exports.CreateProvisioningTemplateVersionRequest = {})); +var CreateProvisioningTemplateVersionResponse; +(function (CreateProvisioningTemplateVersionResponse) { + CreateProvisioningTemplateVersionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateProvisioningTemplateVersionResponse = exports.CreateProvisioningTemplateVersionResponse || (exports.CreateProvisioningTemplateVersionResponse = {})); +var CreateRoleAliasRequest; +(function (CreateRoleAliasRequest) { + CreateRoleAliasRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateRoleAliasRequest = exports.CreateRoleAliasRequest || (exports.CreateRoleAliasRequest = {})); +var CreateRoleAliasResponse; +(function (CreateRoleAliasResponse) { + CreateRoleAliasResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateRoleAliasResponse = exports.CreateRoleAliasResponse || (exports.CreateRoleAliasResponse = {})); +var DayOfWeek; +(function (DayOfWeek) { + DayOfWeek["FRI"] = "FRI"; + DayOfWeek["MON"] = "MON"; + DayOfWeek["SAT"] = "SAT"; + DayOfWeek["SUN"] = "SUN"; + DayOfWeek["THU"] = "THU"; + DayOfWeek["TUE"] = "TUE"; + DayOfWeek["WED"] = "WED"; +})(DayOfWeek = exports.DayOfWeek || (exports.DayOfWeek = {})); +var CreateScheduledAuditRequest; +(function (CreateScheduledAuditRequest) { + CreateScheduledAuditRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateScheduledAuditRequest = exports.CreateScheduledAuditRequest || (exports.CreateScheduledAuditRequest = {})); +var CreateScheduledAuditResponse; +(function (CreateScheduledAuditResponse) { + CreateScheduledAuditResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateScheduledAuditResponse = exports.CreateScheduledAuditResponse || (exports.CreateScheduledAuditResponse = {})); +var CreateSecurityProfileRequest; +(function (CreateSecurityProfileRequest) { + CreateSecurityProfileRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateSecurityProfileRequest = exports.CreateSecurityProfileRequest || (exports.CreateSecurityProfileRequest = {})); +var CreateSecurityProfileResponse; +(function (CreateSecurityProfileResponse) { + CreateSecurityProfileResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateSecurityProfileResponse = exports.CreateSecurityProfileResponse || (exports.CreateSecurityProfileResponse = {})); +var StreamFile; +(function (StreamFile) { + StreamFile.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StreamFile = exports.StreamFile || (exports.StreamFile = {})); +var CreateStreamRequest; +(function (CreateStreamRequest) { + CreateStreamRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateStreamRequest = exports.CreateStreamRequest || (exports.CreateStreamRequest = {})); +var CreateStreamResponse; +(function (CreateStreamResponse) { + CreateStreamResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateStreamResponse = exports.CreateStreamResponse || (exports.CreateStreamResponse = {})); +var CreateThingRequest; +(function (CreateThingRequest) { + CreateThingRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateThingRequest = exports.CreateThingRequest || (exports.CreateThingRequest = {})); +var CreateThingResponse; +(function (CreateThingResponse) { + CreateThingResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateThingResponse = exports.CreateThingResponse || (exports.CreateThingResponse = {})); +var CreateThingGroupRequest; +(function (CreateThingGroupRequest) { + CreateThingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateThingGroupRequest = exports.CreateThingGroupRequest || (exports.CreateThingGroupRequest = {})); +var CreateThingGroupResponse; +(function (CreateThingGroupResponse) { + CreateThingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateThingGroupResponse = exports.CreateThingGroupResponse || (exports.CreateThingGroupResponse = {})); +var ThingTypeProperties; +(function (ThingTypeProperties) { + ThingTypeProperties.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingTypeProperties = exports.ThingTypeProperties || (exports.ThingTypeProperties = {})); +var CreateThingTypeRequest; +(function (CreateThingTypeRequest) { + CreateThingTypeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateThingTypeRequest = exports.CreateThingTypeRequest || (exports.CreateThingTypeRequest = {})); +var CreateThingTypeResponse; +(function (CreateThingTypeResponse) { + CreateThingTypeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateThingTypeResponse = exports.CreateThingTypeResponse || (exports.CreateThingTypeResponse = {})); +var TopicRulePayload; +(function (TopicRulePayload) { + TopicRulePayload.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TopicRulePayload = exports.TopicRulePayload || (exports.TopicRulePayload = {})); +var CreateTopicRuleRequest; +(function (CreateTopicRuleRequest) { + CreateTopicRuleRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateTopicRuleRequest = exports.CreateTopicRuleRequest || (exports.CreateTopicRuleRequest = {})); +var SqlParseException; +(function (SqlParseException) { + SqlParseException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SqlParseException = exports.SqlParseException || (exports.SqlParseException = {})); +var HttpUrlDestinationConfiguration; +(function (HttpUrlDestinationConfiguration) { + HttpUrlDestinationConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(HttpUrlDestinationConfiguration = exports.HttpUrlDestinationConfiguration || (exports.HttpUrlDestinationConfiguration = {})); +var TopicRuleDestinationConfiguration; +(function (TopicRuleDestinationConfiguration) { + TopicRuleDestinationConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TopicRuleDestinationConfiguration = exports.TopicRuleDestinationConfiguration || (exports.TopicRuleDestinationConfiguration = {})); +var CreateTopicRuleDestinationRequest; +(function (CreateTopicRuleDestinationRequest) { + CreateTopicRuleDestinationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateTopicRuleDestinationRequest = exports.CreateTopicRuleDestinationRequest || (exports.CreateTopicRuleDestinationRequest = {})); +var HttpUrlDestinationProperties; +(function (HttpUrlDestinationProperties) { + HttpUrlDestinationProperties.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(HttpUrlDestinationProperties = exports.HttpUrlDestinationProperties || (exports.HttpUrlDestinationProperties = {})); +var TopicRuleDestinationStatus; +(function (TopicRuleDestinationStatus) { + TopicRuleDestinationStatus["DISABLED"] = "DISABLED"; + TopicRuleDestinationStatus["ENABLED"] = "ENABLED"; + TopicRuleDestinationStatus["ERROR"] = "ERROR"; + TopicRuleDestinationStatus["IN_PROGRESS"] = "IN_PROGRESS"; +})(TopicRuleDestinationStatus = exports.TopicRuleDestinationStatus || (exports.TopicRuleDestinationStatus = {})); +var TopicRuleDestination; +(function (TopicRuleDestination) { + TopicRuleDestination.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TopicRuleDestination = exports.TopicRuleDestination || (exports.TopicRuleDestination = {})); +var CreateTopicRuleDestinationResponse; +(function (CreateTopicRuleDestinationResponse) { + CreateTopicRuleDestinationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateTopicRuleDestinationResponse = exports.CreateTopicRuleDestinationResponse || (exports.CreateTopicRuleDestinationResponse = {})); +var DeleteAccountAuditConfigurationRequest; +(function (DeleteAccountAuditConfigurationRequest) { + DeleteAccountAuditConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteAccountAuditConfigurationRequest = exports.DeleteAccountAuditConfigurationRequest || (exports.DeleteAccountAuditConfigurationRequest = {})); +var DeleteAccountAuditConfigurationResponse; +(function (DeleteAccountAuditConfigurationResponse) { + DeleteAccountAuditConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteAccountAuditConfigurationResponse = exports.DeleteAccountAuditConfigurationResponse || (exports.DeleteAccountAuditConfigurationResponse = {})); +var DeleteAuditSuppressionRequest; +(function (DeleteAuditSuppressionRequest) { + DeleteAuditSuppressionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteAuditSuppressionRequest = exports.DeleteAuditSuppressionRequest || (exports.DeleteAuditSuppressionRequest = {})); +var DeleteAuditSuppressionResponse; +(function (DeleteAuditSuppressionResponse) { + DeleteAuditSuppressionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteAuditSuppressionResponse = exports.DeleteAuditSuppressionResponse || (exports.DeleteAuditSuppressionResponse = {})); +var DeleteAuthorizerRequest; +(function (DeleteAuthorizerRequest) { + DeleteAuthorizerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteAuthorizerRequest = exports.DeleteAuthorizerRequest || (exports.DeleteAuthorizerRequest = {})); +var DeleteAuthorizerResponse; +(function (DeleteAuthorizerResponse) { + DeleteAuthorizerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteAuthorizerResponse = exports.DeleteAuthorizerResponse || (exports.DeleteAuthorizerResponse = {})); +var DeleteConflictException; +(function (DeleteConflictException) { + DeleteConflictException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteConflictException = exports.DeleteConflictException || (exports.DeleteConflictException = {})); +var DeleteBillingGroupRequest; +(function (DeleteBillingGroupRequest) { + DeleteBillingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteBillingGroupRequest = exports.DeleteBillingGroupRequest || (exports.DeleteBillingGroupRequest = {})); +var DeleteBillingGroupResponse; +(function (DeleteBillingGroupResponse) { + DeleteBillingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteBillingGroupResponse = exports.DeleteBillingGroupResponse || (exports.DeleteBillingGroupResponse = {})); +var CertificateStateException; +(function (CertificateStateException) { + CertificateStateException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CertificateStateException = exports.CertificateStateException || (exports.CertificateStateException = {})); +var DeleteCACertificateRequest; +(function (DeleteCACertificateRequest) { + DeleteCACertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteCACertificateRequest = exports.DeleteCACertificateRequest || (exports.DeleteCACertificateRequest = {})); +var DeleteCACertificateResponse; +(function (DeleteCACertificateResponse) { + DeleteCACertificateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteCACertificateResponse = exports.DeleteCACertificateResponse || (exports.DeleteCACertificateResponse = {})); +var DeleteCertificateRequest; +(function (DeleteCertificateRequest) { + DeleteCertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteCertificateRequest = exports.DeleteCertificateRequest || (exports.DeleteCertificateRequest = {})); +var DeleteDimensionRequest; +(function (DeleteDimensionRequest) { + DeleteDimensionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteDimensionRequest = exports.DeleteDimensionRequest || (exports.DeleteDimensionRequest = {})); +var DeleteDimensionResponse; +(function (DeleteDimensionResponse) { + DeleteDimensionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteDimensionResponse = exports.DeleteDimensionResponse || (exports.DeleteDimensionResponse = {})); +var DeleteDomainConfigurationRequest; +(function (DeleteDomainConfigurationRequest) { + DeleteDomainConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteDomainConfigurationRequest = exports.DeleteDomainConfigurationRequest || (exports.DeleteDomainConfigurationRequest = {})); +var DeleteDomainConfigurationResponse; +(function (DeleteDomainConfigurationResponse) { + DeleteDomainConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteDomainConfigurationResponse = exports.DeleteDomainConfigurationResponse || (exports.DeleteDomainConfigurationResponse = {})); +var DeleteDynamicThingGroupRequest; +(function (DeleteDynamicThingGroupRequest) { + DeleteDynamicThingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteDynamicThingGroupRequest = exports.DeleteDynamicThingGroupRequest || (exports.DeleteDynamicThingGroupRequest = {})); +var DeleteDynamicThingGroupResponse; +(function (DeleteDynamicThingGroupResponse) { + DeleteDynamicThingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteDynamicThingGroupResponse = exports.DeleteDynamicThingGroupResponse || (exports.DeleteDynamicThingGroupResponse = {})); +var DeleteJobRequest; +(function (DeleteJobRequest) { + DeleteJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteJobRequest = exports.DeleteJobRequest || (exports.DeleteJobRequest = {})); +var DeleteJobExecutionRequest; +(function (DeleteJobExecutionRequest) { + DeleteJobExecutionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteJobExecutionRequest = exports.DeleteJobExecutionRequest || (exports.DeleteJobExecutionRequest = {})); +var DeleteMitigationActionRequest; +(function (DeleteMitigationActionRequest) { + DeleteMitigationActionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteMitigationActionRequest = exports.DeleteMitigationActionRequest || (exports.DeleteMitigationActionRequest = {})); +var DeleteMitigationActionResponse; +(function (DeleteMitigationActionResponse) { + DeleteMitigationActionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteMitigationActionResponse = exports.DeleteMitigationActionResponse || (exports.DeleteMitigationActionResponse = {})); +var DeleteOTAUpdateRequest; +(function (DeleteOTAUpdateRequest) { + DeleteOTAUpdateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteOTAUpdateRequest = exports.DeleteOTAUpdateRequest || (exports.DeleteOTAUpdateRequest = {})); +var DeleteOTAUpdateResponse; +(function (DeleteOTAUpdateResponse) { + DeleteOTAUpdateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteOTAUpdateResponse = exports.DeleteOTAUpdateResponse || (exports.DeleteOTAUpdateResponse = {})); +var DeletePolicyRequest; +(function (DeletePolicyRequest) { + DeletePolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeletePolicyRequest = exports.DeletePolicyRequest || (exports.DeletePolicyRequest = {})); +var DeletePolicyVersionRequest; +(function (DeletePolicyVersionRequest) { + DeletePolicyVersionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeletePolicyVersionRequest = exports.DeletePolicyVersionRequest || (exports.DeletePolicyVersionRequest = {})); +var DeleteProvisioningTemplateRequest; +(function (DeleteProvisioningTemplateRequest) { + DeleteProvisioningTemplateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteProvisioningTemplateRequest = exports.DeleteProvisioningTemplateRequest || (exports.DeleteProvisioningTemplateRequest = {})); +var DeleteProvisioningTemplateResponse; +(function (DeleteProvisioningTemplateResponse) { + DeleteProvisioningTemplateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteProvisioningTemplateResponse = exports.DeleteProvisioningTemplateResponse || (exports.DeleteProvisioningTemplateResponse = {})); +var DeleteProvisioningTemplateVersionRequest; +(function (DeleteProvisioningTemplateVersionRequest) { + DeleteProvisioningTemplateVersionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteProvisioningTemplateVersionRequest = exports.DeleteProvisioningTemplateVersionRequest || (exports.DeleteProvisioningTemplateVersionRequest = {})); +var DeleteProvisioningTemplateVersionResponse; +(function (DeleteProvisioningTemplateVersionResponse) { + DeleteProvisioningTemplateVersionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteProvisioningTemplateVersionResponse = exports.DeleteProvisioningTemplateVersionResponse || (exports.DeleteProvisioningTemplateVersionResponse = {})); +var DeleteRegistrationCodeRequest; +(function (DeleteRegistrationCodeRequest) { + DeleteRegistrationCodeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRegistrationCodeRequest = exports.DeleteRegistrationCodeRequest || (exports.DeleteRegistrationCodeRequest = {})); +var DeleteRegistrationCodeResponse; +(function (DeleteRegistrationCodeResponse) { + DeleteRegistrationCodeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRegistrationCodeResponse = exports.DeleteRegistrationCodeResponse || (exports.DeleteRegistrationCodeResponse = {})); +var DeleteRoleAliasRequest; +(function (DeleteRoleAliasRequest) { + DeleteRoleAliasRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRoleAliasRequest = exports.DeleteRoleAliasRequest || (exports.DeleteRoleAliasRequest = {})); +var DeleteRoleAliasResponse; +(function (DeleteRoleAliasResponse) { + DeleteRoleAliasResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRoleAliasResponse = exports.DeleteRoleAliasResponse || (exports.DeleteRoleAliasResponse = {})); +var DeleteScheduledAuditRequest; +(function (DeleteScheduledAuditRequest) { + DeleteScheduledAuditRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteScheduledAuditRequest = exports.DeleteScheduledAuditRequest || (exports.DeleteScheduledAuditRequest = {})); +var DeleteScheduledAuditResponse; +(function (DeleteScheduledAuditResponse) { + DeleteScheduledAuditResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteScheduledAuditResponse = exports.DeleteScheduledAuditResponse || (exports.DeleteScheduledAuditResponse = {})); +var DeleteSecurityProfileRequest; +(function (DeleteSecurityProfileRequest) { + DeleteSecurityProfileRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteSecurityProfileRequest = exports.DeleteSecurityProfileRequest || (exports.DeleteSecurityProfileRequest = {})); +var DeleteSecurityProfileResponse; +(function (DeleteSecurityProfileResponse) { + DeleteSecurityProfileResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteSecurityProfileResponse = exports.DeleteSecurityProfileResponse || (exports.DeleteSecurityProfileResponse = {})); +var DeleteStreamRequest; +(function (DeleteStreamRequest) { + DeleteStreamRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteStreamRequest = exports.DeleteStreamRequest || (exports.DeleteStreamRequest = {})); +var DeleteStreamResponse; +(function (DeleteStreamResponse) { + DeleteStreamResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteStreamResponse = exports.DeleteStreamResponse || (exports.DeleteStreamResponse = {})); +var DeleteThingRequest; +(function (DeleteThingRequest) { + DeleteThingRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteThingRequest = exports.DeleteThingRequest || (exports.DeleteThingRequest = {})); +var DeleteThingResponse; +(function (DeleteThingResponse) { + DeleteThingResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteThingResponse = exports.DeleteThingResponse || (exports.DeleteThingResponse = {})); +var DeleteThingGroupRequest; +(function (DeleteThingGroupRequest) { + DeleteThingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteThingGroupRequest = exports.DeleteThingGroupRequest || (exports.DeleteThingGroupRequest = {})); +var DeleteThingGroupResponse; +(function (DeleteThingGroupResponse) { + DeleteThingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteThingGroupResponse = exports.DeleteThingGroupResponse || (exports.DeleteThingGroupResponse = {})); +var DeleteThingTypeRequest; +(function (DeleteThingTypeRequest) { + DeleteThingTypeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteThingTypeRequest = exports.DeleteThingTypeRequest || (exports.DeleteThingTypeRequest = {})); +var DeleteThingTypeResponse; +(function (DeleteThingTypeResponse) { + DeleteThingTypeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteThingTypeResponse = exports.DeleteThingTypeResponse || (exports.DeleteThingTypeResponse = {})); +var DeleteTopicRuleRequest; +(function (DeleteTopicRuleRequest) { + DeleteTopicRuleRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteTopicRuleRequest = exports.DeleteTopicRuleRequest || (exports.DeleteTopicRuleRequest = {})); +var DeleteTopicRuleDestinationRequest; +(function (DeleteTopicRuleDestinationRequest) { + DeleteTopicRuleDestinationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteTopicRuleDestinationRequest = exports.DeleteTopicRuleDestinationRequest || (exports.DeleteTopicRuleDestinationRequest = {})); +var DeleteTopicRuleDestinationResponse; +(function (DeleteTopicRuleDestinationResponse) { + DeleteTopicRuleDestinationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteTopicRuleDestinationResponse = exports.DeleteTopicRuleDestinationResponse || (exports.DeleteTopicRuleDestinationResponse = {})); +var LogTargetType; +(function (LogTargetType) { + LogTargetType["DEFAULT"] = "DEFAULT"; + LogTargetType["THING_GROUP"] = "THING_GROUP"; +})(LogTargetType = exports.LogTargetType || (exports.LogTargetType = {})); +var DeleteV2LoggingLevelRequest; +(function (DeleteV2LoggingLevelRequest) { + DeleteV2LoggingLevelRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteV2LoggingLevelRequest = exports.DeleteV2LoggingLevelRequest || (exports.DeleteV2LoggingLevelRequest = {})); +var DeprecateThingTypeRequest; +(function (DeprecateThingTypeRequest) { + DeprecateThingTypeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeprecateThingTypeRequest = exports.DeprecateThingTypeRequest || (exports.DeprecateThingTypeRequest = {})); +var DeprecateThingTypeResponse; +(function (DeprecateThingTypeResponse) { + DeprecateThingTypeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeprecateThingTypeResponse = exports.DeprecateThingTypeResponse || (exports.DeprecateThingTypeResponse = {})); +var DescribeAccountAuditConfigurationRequest; +(function (DescribeAccountAuditConfigurationRequest) { + DescribeAccountAuditConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAccountAuditConfigurationRequest = exports.DescribeAccountAuditConfigurationRequest || (exports.DescribeAccountAuditConfigurationRequest = {})); +var DescribeAccountAuditConfigurationResponse; +(function (DescribeAccountAuditConfigurationResponse) { + DescribeAccountAuditConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAccountAuditConfigurationResponse = exports.DescribeAccountAuditConfigurationResponse || (exports.DescribeAccountAuditConfigurationResponse = {})); +var DescribeAuditFindingRequest; +(function (DescribeAuditFindingRequest) { + DescribeAuditFindingRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAuditFindingRequest = exports.DescribeAuditFindingRequest || (exports.DescribeAuditFindingRequest = {})); +var DescribeAuditFindingResponse; +(function (DescribeAuditFindingResponse) { + DescribeAuditFindingResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAuditFindingResponse = exports.DescribeAuditFindingResponse || (exports.DescribeAuditFindingResponse = {})); +var DescribeAuditMitigationActionsTaskRequest; +(function (DescribeAuditMitigationActionsTaskRequest) { + DescribeAuditMitigationActionsTaskRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAuditMitigationActionsTaskRequest = exports.DescribeAuditMitigationActionsTaskRequest || (exports.DescribeAuditMitigationActionsTaskRequest = {})); +var MitigationAction; +(function (MitigationAction) { + MitigationAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MitigationAction = exports.MitigationAction || (exports.MitigationAction = {})); +var DescribeAuditMitigationActionsTaskResponse; +(function (DescribeAuditMitigationActionsTaskResponse) { + DescribeAuditMitigationActionsTaskResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAuditMitigationActionsTaskResponse = exports.DescribeAuditMitigationActionsTaskResponse || (exports.DescribeAuditMitigationActionsTaskResponse = {})); +var DescribeAuditSuppressionRequest; +(function (DescribeAuditSuppressionRequest) { + DescribeAuditSuppressionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAuditSuppressionRequest = exports.DescribeAuditSuppressionRequest || (exports.DescribeAuditSuppressionRequest = {})); +var DescribeAuditSuppressionResponse; +(function (DescribeAuditSuppressionResponse) { + DescribeAuditSuppressionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAuditSuppressionResponse = exports.DescribeAuditSuppressionResponse || (exports.DescribeAuditSuppressionResponse = {})); +var DescribeAuditTaskRequest; +(function (DescribeAuditTaskRequest) { + DescribeAuditTaskRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAuditTaskRequest = exports.DescribeAuditTaskRequest || (exports.DescribeAuditTaskRequest = {})); +var TaskStatistics; +(function (TaskStatistics) { + TaskStatistics.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TaskStatistics = exports.TaskStatistics || (exports.TaskStatistics = {})); +//# sourceMappingURL=models_0.js.map + +/***/ }), + +/***/ 29889: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeMitigationActionResponse = exports.MitigationActionType = exports.DescribeMitigationActionRequest = exports.DescribeJobExecutionResponse = exports.JobExecution = exports.JobExecutionStatusDetails = exports.JobExecutionStatus = exports.DescribeJobExecutionRequest = exports.DescribeJobResponse = exports.Job = exports.JobStatus = exports.JobProcessDetails = exports.DescribeJobRequest = exports.DescribeIndexResponse = exports.IndexStatus = exports.DescribeIndexRequest = exports.DescribeEventConfigurationsResponse = exports.Configuration = exports.EventType = exports.DescribeEventConfigurationsRequest = exports.DescribeEndpointResponse = exports.DescribeEndpointRequest = exports.DescribeDomainConfigurationResponse = exports.ServerCertificateSummary = exports.ServerCertificateStatus = exports.DomainType = exports.DomainConfigurationStatus = exports.DescribeDomainConfigurationRequest = exports.DescribeDimensionResponse = exports.DescribeDimensionRequest = exports.DescribeDefaultAuthorizerResponse = exports.DescribeDefaultAuthorizerRequest = exports.DescribeCertificateResponse = exports.CertificateDescription = exports.TransferData = exports.CertificateStatus = exports.CertificateMode = exports.DescribeCertificateRequest = exports.DescribeCACertificateResponse = exports.RegistrationConfig = exports.CACertificateDescription = exports.CertificateValidity = exports.CACertificateStatus = exports.DescribeCACertificateRequest = exports.DescribeBillingGroupResponse = exports.BillingGroupMetadata = exports.DescribeBillingGroupRequest = exports.DescribeAuthorizerResponse = exports.DescribeAuthorizerRequest = exports.DescribeAuditTaskResponse = void 0; +exports.ThingIndexingConfiguration = exports.ThingIndexingMode = exports.ThingConnectivityIndexingMode = exports.ThingGroupIndexingConfiguration = exports.ThingGroupIndexingMode = exports.Field = exports.FieldType = exports.GetIndexingConfigurationRequest = exports.GetEffectivePoliciesResponse = exports.EffectivePolicy = exports.GetEffectivePoliciesRequest = exports.InvalidAggregationException = exports.IndexNotReadyException = exports.GetCardinalityResponse = exports.GetCardinalityRequest = exports.EnableTopicRuleRequest = exports.DisableTopicRuleRequest = exports.DetachThingPrincipalResponse = exports.DetachThingPrincipalRequest = exports.DetachSecurityProfileResponse = exports.DetachSecurityProfileRequest = exports.DetachPrincipalPolicyRequest = exports.DetachPolicyRequest = exports.DescribeThingTypeResponse = exports.ThingTypeMetadata = exports.DescribeThingTypeRequest = exports.DescribeThingRegistrationTaskResponse = exports.Status = exports.DescribeThingRegistrationTaskRequest = exports.DescribeThingGroupResponse = exports.ThingGroupMetadata = exports.GroupNameAndArn = exports.DynamicGroupStatus = exports.DescribeThingGroupRequest = exports.DescribeThingResponse = exports.DescribeThingRequest = exports.DescribeStreamResponse = exports.StreamInfo = exports.DescribeStreamRequest = exports.DescribeSecurityProfileResponse = exports.DescribeSecurityProfileRequest = exports.DescribeScheduledAuditResponse = exports.DescribeScheduledAuditRequest = exports.DescribeRoleAliasResponse = exports.RoleAliasDescription = exports.DescribeRoleAliasRequest = exports.DescribeProvisioningTemplateVersionResponse = exports.DescribeProvisioningTemplateVersionRequest = exports.DescribeProvisioningTemplateResponse = exports.DescribeProvisioningTemplateRequest = void 0; +exports.ListCACertificatesResponse = exports.CACertificate = exports.ListCACertificatesRequest = exports.ListBillingGroupsResponse = exports.ListBillingGroupsRequest = exports.ListAuthorizersResponse = exports.ListAuthorizersRequest = exports.ListAuditTasksResponse = exports.ListAuditTasksRequest = exports.ListAuditSuppressionsResponse = exports.ListAuditSuppressionsRequest = exports.ListAuditMitigationActionsTasksResponse = exports.ListAuditMitigationActionsTasksRequest = exports.ListAuditMitigationActionsExecutionsResponse = exports.ListAuditMitigationActionsExecutionsRequest = exports.ListAuditFindingsResponse = exports.ListAuditFindingsRequest = exports.ListAttachedPoliciesResponse = exports.ListAttachedPoliciesRequest = exports.ListActiveViolationsResponse = exports.ListActiveViolationsRequest = exports.NotConfiguredException = exports.GetV2LoggingOptionsResponse = exports.GetV2LoggingOptionsRequest = exports.GetTopicRuleDestinationResponse = exports.GetTopicRuleDestinationRequest = exports.GetTopicRuleResponse = exports.TopicRule = exports.GetTopicRuleRequest = exports.GetStatisticsResponse = exports.Statistics = exports.GetStatisticsRequest = exports.GetRegistrationCodeResponse = exports.GetRegistrationCodeRequest = exports.GetPolicyVersionResponse = exports.GetPolicyVersionRequest = exports.GetPolicyResponse = exports.GetPolicyRequest = exports.GetPercentilesResponse = exports.PercentPair = exports.GetPercentilesRequest = exports.GetOTAUpdateResponse = exports.OTAUpdateInfo = exports.ErrorInfo = exports.GetOTAUpdateRequest = exports.GetLoggingOptionsResponse = exports.GetLoggingOptionsRequest = exports.GetJobDocumentResponse = exports.GetJobDocumentRequest = exports.GetIndexingConfigurationResponse = void 0; +exports.ListRoleAliasesResponse = exports.ListRoleAliasesRequest = exports.ListProvisioningTemplateVersionsResponse = exports.ProvisioningTemplateVersionSummary = exports.ListProvisioningTemplateVersionsRequest = exports.ListProvisioningTemplatesResponse = exports.ProvisioningTemplateSummary = exports.ListProvisioningTemplatesRequest = exports.ListPrincipalThingsResponse = exports.ListPrincipalThingsRequest = exports.ListPrincipalPoliciesResponse = exports.ListPrincipalPoliciesRequest = exports.ListPolicyVersionsResponse = exports.PolicyVersion = exports.ListPolicyVersionsRequest = exports.ListPolicyPrincipalsResponse = exports.ListPolicyPrincipalsRequest = exports.ListPoliciesResponse = exports.ListPoliciesRequest = exports.ListOutgoingCertificatesResponse = exports.OutgoingCertificate = exports.ListOutgoingCertificatesRequest = exports.ListOTAUpdatesResponse = exports.OTAUpdateSummary = exports.ListOTAUpdatesRequest = exports.ListMitigationActionsResponse = exports.MitigationActionIdentifier = exports.ListMitigationActionsRequest = exports.ListJobsResponse = exports.JobSummary = exports.ListJobsRequest = exports.ListJobExecutionsForThingResponse = exports.JobExecutionSummaryForThing = exports.ListJobExecutionsForThingRequest = exports.ListJobExecutionsForJobResponse = exports.JobExecutionSummaryForJob = exports.JobExecutionSummary = exports.ListJobExecutionsForJobRequest = exports.ListIndicesResponse = exports.ListIndicesRequest = exports.ListDomainConfigurationsResponse = exports.DomainConfigurationSummary = exports.ListDomainConfigurationsRequest = exports.ListDimensionsResponse = exports.ListDimensionsRequest = exports.ListCertificatesByCAResponse = exports.ListCertificatesByCARequest = exports.ListCertificatesResponse = exports.Certificate = exports.ListCertificatesRequest = void 0; +exports.LogTargetConfiguration = exports.LogTarget = exports.ListV2LoggingLevelsRequest = exports.ListTopicRulesResponse = exports.TopicRuleListItem = exports.ListTopicRulesRequest = exports.ListTopicRuleDestinationsResponse = exports.TopicRuleDestinationSummary = exports.HttpUrlDestinationSummary = exports.ListTopicRuleDestinationsRequest = exports.ListThingTypesResponse = exports.ThingTypeDefinition = exports.ListThingTypesRequest = exports.ListThingsInThingGroupResponse = exports.ListThingsInThingGroupRequest = exports.ListThingsInBillingGroupResponse = exports.ListThingsInBillingGroupRequest = exports.ListThingsResponse = exports.ThingAttribute = exports.ListThingsRequest = exports.ListThingRegistrationTasksResponse = exports.ListThingRegistrationTasksRequest = exports.ListThingRegistrationTaskReportsResponse = exports.ListThingRegistrationTaskReportsRequest = exports.ReportType = exports.ListThingPrincipalsResponse = exports.ListThingPrincipalsRequest = exports.ListThingGroupsForThingResponse = exports.ListThingGroupsForThingRequest = exports.ListThingGroupsResponse = exports.ListThingGroupsRequest = exports.ListTargetsForSecurityProfileResponse = exports.ListTargetsForSecurityProfileRequest = exports.ListTargetsForPolicyResponse = exports.ListTargetsForPolicyRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListStreamsResponse = exports.StreamSummary = exports.ListStreamsRequest = exports.ListSecurityProfilesForTargetResponse = exports.SecurityProfileTargetMapping = exports.SecurityProfileTarget = exports.ListSecurityProfilesForTargetRequest = exports.ListSecurityProfilesResponse = exports.SecurityProfileIdentifier = exports.ListSecurityProfilesRequest = exports.ListScheduledAuditsResponse = exports.ScheduledAuditMetadata = exports.ListScheduledAuditsRequest = void 0; +exports.MqttContext = exports.HttpContext = exports.InvalidResponseException = exports.TestAuthorizationResponse = exports.TestAuthorizationRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.StopThingRegistrationTaskResponse = exports.StopThingRegistrationTaskRequest = exports.StartThingRegistrationTaskResponse = exports.StartThingRegistrationTaskRequest = exports.StartOnDemandAuditTaskResponse = exports.StartOnDemandAuditTaskRequest = exports.TaskAlreadyExistsException = exports.StartAuditMitigationActionsTaskResponse = exports.StartAuditMitigationActionsTaskRequest = exports.SetV2LoggingOptionsRequest = exports.SetV2LoggingLevelRequest = exports.SetLoggingOptionsRequest = exports.LoggingOptionsPayload = exports.SetDefaultPolicyVersionRequest = exports.SetDefaultAuthorizerResponse = exports.SetDefaultAuthorizerRequest = exports.SearchIndexResponse = exports.ThingDocument = exports.ThingConnectivity = exports.ThingGroupDocument = exports.SearchIndexRequest = exports.ReplaceTopicRuleRequest = exports.RemoveThingFromThingGroupResponse = exports.RemoveThingFromThingGroupRequest = exports.RemoveThingFromBillingGroupResponse = exports.RemoveThingFromBillingGroupRequest = exports.RejectCertificateTransferRequest = exports.ResourceRegistrationFailureException = exports.RegisterThingResponse = exports.RegisterThingRequest = exports.RegisterCertificateWithoutCAResponse = exports.RegisterCertificateWithoutCARequest = exports.RegisterCertificateResponse = exports.RegisterCertificateRequest = exports.CertificateConflictException = exports.RegistrationCodeValidationException = exports.RegisterCACertificateResponse = exports.RegisterCACertificateRequest = exports.ListViolationEventsResponse = exports.ViolationEvent = exports.ViolationEventType = exports.ListViolationEventsRequest = exports.ListV2LoggingLevelsResponse = void 0; +var DescribeAuditTaskResponse; +(function (DescribeAuditTaskResponse) { + DescribeAuditTaskResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAuditTaskResponse = exports.DescribeAuditTaskResponse || (exports.DescribeAuditTaskResponse = {})); +var DescribeAuthorizerRequest; +(function (DescribeAuthorizerRequest) { + DescribeAuthorizerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAuthorizerRequest = exports.DescribeAuthorizerRequest || (exports.DescribeAuthorizerRequest = {})); +var DescribeAuthorizerResponse; +(function (DescribeAuthorizerResponse) { + DescribeAuthorizerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeAuthorizerResponse = exports.DescribeAuthorizerResponse || (exports.DescribeAuthorizerResponse = {})); +var DescribeBillingGroupRequest; +(function (DescribeBillingGroupRequest) { + DescribeBillingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeBillingGroupRequest = exports.DescribeBillingGroupRequest || (exports.DescribeBillingGroupRequest = {})); +var BillingGroupMetadata; +(function (BillingGroupMetadata) { + BillingGroupMetadata.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BillingGroupMetadata = exports.BillingGroupMetadata || (exports.BillingGroupMetadata = {})); +var DescribeBillingGroupResponse; +(function (DescribeBillingGroupResponse) { + DescribeBillingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeBillingGroupResponse = exports.DescribeBillingGroupResponse || (exports.DescribeBillingGroupResponse = {})); +var DescribeCACertificateRequest; +(function (DescribeCACertificateRequest) { + DescribeCACertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeCACertificateRequest = exports.DescribeCACertificateRequest || (exports.DescribeCACertificateRequest = {})); +var CACertificateStatus; +(function (CACertificateStatus) { + CACertificateStatus["ACTIVE"] = "ACTIVE"; + CACertificateStatus["INACTIVE"] = "INACTIVE"; +})(CACertificateStatus = exports.CACertificateStatus || (exports.CACertificateStatus = {})); +var CertificateValidity; +(function (CertificateValidity) { + CertificateValidity.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CertificateValidity = exports.CertificateValidity || (exports.CertificateValidity = {})); +var CACertificateDescription; +(function (CACertificateDescription) { + CACertificateDescription.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CACertificateDescription = exports.CACertificateDescription || (exports.CACertificateDescription = {})); +var RegistrationConfig; +(function (RegistrationConfig) { + RegistrationConfig.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegistrationConfig = exports.RegistrationConfig || (exports.RegistrationConfig = {})); +var DescribeCACertificateResponse; +(function (DescribeCACertificateResponse) { + DescribeCACertificateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeCACertificateResponse = exports.DescribeCACertificateResponse || (exports.DescribeCACertificateResponse = {})); +var DescribeCertificateRequest; +(function (DescribeCertificateRequest) { + DescribeCertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeCertificateRequest = exports.DescribeCertificateRequest || (exports.DescribeCertificateRequest = {})); +var CertificateMode; +(function (CertificateMode) { + CertificateMode["DEFAULT"] = "DEFAULT"; + CertificateMode["SNI_ONLY"] = "SNI_ONLY"; +})(CertificateMode = exports.CertificateMode || (exports.CertificateMode = {})); +var CertificateStatus; +(function (CertificateStatus) { + CertificateStatus["ACTIVE"] = "ACTIVE"; + CertificateStatus["INACTIVE"] = "INACTIVE"; + CertificateStatus["PENDING_ACTIVATION"] = "PENDING_ACTIVATION"; + CertificateStatus["PENDING_TRANSFER"] = "PENDING_TRANSFER"; + CertificateStatus["REGISTER_INACTIVE"] = "REGISTER_INACTIVE"; + CertificateStatus["REVOKED"] = "REVOKED"; +})(CertificateStatus = exports.CertificateStatus || (exports.CertificateStatus = {})); +var TransferData; +(function (TransferData) { + TransferData.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TransferData = exports.TransferData || (exports.TransferData = {})); +var CertificateDescription; +(function (CertificateDescription) { + CertificateDescription.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CertificateDescription = exports.CertificateDescription || (exports.CertificateDescription = {})); +var DescribeCertificateResponse; +(function (DescribeCertificateResponse) { + DescribeCertificateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeCertificateResponse = exports.DescribeCertificateResponse || (exports.DescribeCertificateResponse = {})); +var DescribeDefaultAuthorizerRequest; +(function (DescribeDefaultAuthorizerRequest) { + DescribeDefaultAuthorizerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeDefaultAuthorizerRequest = exports.DescribeDefaultAuthorizerRequest || (exports.DescribeDefaultAuthorizerRequest = {})); +var DescribeDefaultAuthorizerResponse; +(function (DescribeDefaultAuthorizerResponse) { + DescribeDefaultAuthorizerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeDefaultAuthorizerResponse = exports.DescribeDefaultAuthorizerResponse || (exports.DescribeDefaultAuthorizerResponse = {})); +var DescribeDimensionRequest; +(function (DescribeDimensionRequest) { + DescribeDimensionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeDimensionRequest = exports.DescribeDimensionRequest || (exports.DescribeDimensionRequest = {})); +var DescribeDimensionResponse; +(function (DescribeDimensionResponse) { + DescribeDimensionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeDimensionResponse = exports.DescribeDimensionResponse || (exports.DescribeDimensionResponse = {})); +var DescribeDomainConfigurationRequest; +(function (DescribeDomainConfigurationRequest) { + DescribeDomainConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeDomainConfigurationRequest = exports.DescribeDomainConfigurationRequest || (exports.DescribeDomainConfigurationRequest = {})); +var DomainConfigurationStatus; +(function (DomainConfigurationStatus) { + DomainConfigurationStatus["DISABLED"] = "DISABLED"; + DomainConfigurationStatus["ENABLED"] = "ENABLED"; +})(DomainConfigurationStatus = exports.DomainConfigurationStatus || (exports.DomainConfigurationStatus = {})); +var DomainType; +(function (DomainType) { + DomainType["AWS_MANAGED"] = "AWS_MANAGED"; + DomainType["CUSTOMER_MANAGED"] = "CUSTOMER_MANAGED"; + DomainType["ENDPOINT"] = "ENDPOINT"; +})(DomainType = exports.DomainType || (exports.DomainType = {})); +var ServerCertificateStatus; +(function (ServerCertificateStatus) { + ServerCertificateStatus["INVALID"] = "INVALID"; + ServerCertificateStatus["VALID"] = "VALID"; +})(ServerCertificateStatus = exports.ServerCertificateStatus || (exports.ServerCertificateStatus = {})); +var ServerCertificateSummary; +(function (ServerCertificateSummary) { + ServerCertificateSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ServerCertificateSummary = exports.ServerCertificateSummary || (exports.ServerCertificateSummary = {})); +var DescribeDomainConfigurationResponse; +(function (DescribeDomainConfigurationResponse) { + DescribeDomainConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeDomainConfigurationResponse = exports.DescribeDomainConfigurationResponse || (exports.DescribeDomainConfigurationResponse = {})); +var DescribeEndpointRequest; +(function (DescribeEndpointRequest) { + DescribeEndpointRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeEndpointRequest = exports.DescribeEndpointRequest || (exports.DescribeEndpointRequest = {})); +var DescribeEndpointResponse; +(function (DescribeEndpointResponse) { + DescribeEndpointResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeEndpointResponse = exports.DescribeEndpointResponse || (exports.DescribeEndpointResponse = {})); +var DescribeEventConfigurationsRequest; +(function (DescribeEventConfigurationsRequest) { + DescribeEventConfigurationsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeEventConfigurationsRequest = exports.DescribeEventConfigurationsRequest || (exports.DescribeEventConfigurationsRequest = {})); +var EventType; +(function (EventType) { + EventType["CA_CERTIFICATE"] = "CA_CERTIFICATE"; + EventType["CERTIFICATE"] = "CERTIFICATE"; + EventType["JOB"] = "JOB"; + EventType["JOB_EXECUTION"] = "JOB_EXECUTION"; + EventType["POLICY"] = "POLICY"; + EventType["THING"] = "THING"; + EventType["THING_GROUP"] = "THING_GROUP"; + EventType["THING_GROUP_HIERARCHY"] = "THING_GROUP_HIERARCHY"; + EventType["THING_GROUP_MEMBERSHIP"] = "THING_GROUP_MEMBERSHIP"; + EventType["THING_TYPE"] = "THING_TYPE"; + EventType["THING_TYPE_ASSOCIATION"] = "THING_TYPE_ASSOCIATION"; +})(EventType = exports.EventType || (exports.EventType = {})); +var Configuration; +(function (Configuration) { + Configuration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Configuration = exports.Configuration || (exports.Configuration = {})); +var DescribeEventConfigurationsResponse; +(function (DescribeEventConfigurationsResponse) { + DescribeEventConfigurationsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeEventConfigurationsResponse = exports.DescribeEventConfigurationsResponse || (exports.DescribeEventConfigurationsResponse = {})); +var DescribeIndexRequest; +(function (DescribeIndexRequest) { + DescribeIndexRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeIndexRequest = exports.DescribeIndexRequest || (exports.DescribeIndexRequest = {})); +var IndexStatus; +(function (IndexStatus) { + IndexStatus["ACTIVE"] = "ACTIVE"; + IndexStatus["BUILDING"] = "BUILDING"; + IndexStatus["REBUILDING"] = "REBUILDING"; +})(IndexStatus = exports.IndexStatus || (exports.IndexStatus = {})); +var DescribeIndexResponse; +(function (DescribeIndexResponse) { + DescribeIndexResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeIndexResponse = exports.DescribeIndexResponse || (exports.DescribeIndexResponse = {})); +var DescribeJobRequest; +(function (DescribeJobRequest) { + DescribeJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeJobRequest = exports.DescribeJobRequest || (exports.DescribeJobRequest = {})); +var JobProcessDetails; +(function (JobProcessDetails) { + JobProcessDetails.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(JobProcessDetails = exports.JobProcessDetails || (exports.JobProcessDetails = {})); +var JobStatus; +(function (JobStatus) { + JobStatus["CANCELED"] = "CANCELED"; + JobStatus["COMPLETED"] = "COMPLETED"; + JobStatus["DELETION_IN_PROGRESS"] = "DELETION_IN_PROGRESS"; + JobStatus["IN_PROGRESS"] = "IN_PROGRESS"; +})(JobStatus = exports.JobStatus || (exports.JobStatus = {})); +var Job; +(function (Job) { + Job.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Job = exports.Job || (exports.Job = {})); +var DescribeJobResponse; +(function (DescribeJobResponse) { + DescribeJobResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeJobResponse = exports.DescribeJobResponse || (exports.DescribeJobResponse = {})); +var DescribeJobExecutionRequest; +(function (DescribeJobExecutionRequest) { + DescribeJobExecutionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeJobExecutionRequest = exports.DescribeJobExecutionRequest || (exports.DescribeJobExecutionRequest = {})); +var JobExecutionStatus; +(function (JobExecutionStatus) { + JobExecutionStatus["CANCELED"] = "CANCELED"; + JobExecutionStatus["FAILED"] = "FAILED"; + JobExecutionStatus["IN_PROGRESS"] = "IN_PROGRESS"; + JobExecutionStatus["QUEUED"] = "QUEUED"; + JobExecutionStatus["REJECTED"] = "REJECTED"; + JobExecutionStatus["REMOVED"] = "REMOVED"; + JobExecutionStatus["SUCCEEDED"] = "SUCCEEDED"; + JobExecutionStatus["TIMED_OUT"] = "TIMED_OUT"; +})(JobExecutionStatus = exports.JobExecutionStatus || (exports.JobExecutionStatus = {})); +var JobExecutionStatusDetails; +(function (JobExecutionStatusDetails) { + JobExecutionStatusDetails.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(JobExecutionStatusDetails = exports.JobExecutionStatusDetails || (exports.JobExecutionStatusDetails = {})); +var JobExecution; +(function (JobExecution) { + JobExecution.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(JobExecution = exports.JobExecution || (exports.JobExecution = {})); +var DescribeJobExecutionResponse; +(function (DescribeJobExecutionResponse) { + DescribeJobExecutionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeJobExecutionResponse = exports.DescribeJobExecutionResponse || (exports.DescribeJobExecutionResponse = {})); +var DescribeMitigationActionRequest; +(function (DescribeMitigationActionRequest) { + DescribeMitigationActionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeMitigationActionRequest = exports.DescribeMitigationActionRequest || (exports.DescribeMitigationActionRequest = {})); +var MitigationActionType; +(function (MitigationActionType) { + MitigationActionType["ADD_THINGS_TO_THING_GROUP"] = "ADD_THINGS_TO_THING_GROUP"; + MitigationActionType["ENABLE_IOT_LOGGING"] = "ENABLE_IOT_LOGGING"; + MitigationActionType["PUBLISH_FINDING_TO_SNS"] = "PUBLISH_FINDING_TO_SNS"; + MitigationActionType["REPLACE_DEFAULT_POLICY_VERSION"] = "REPLACE_DEFAULT_POLICY_VERSION"; + MitigationActionType["UPDATE_CA_CERTIFICATE"] = "UPDATE_CA_CERTIFICATE"; + MitigationActionType["UPDATE_DEVICE_CERTIFICATE"] = "UPDATE_DEVICE_CERTIFICATE"; +})(MitigationActionType = exports.MitigationActionType || (exports.MitigationActionType = {})); +var DescribeMitigationActionResponse; +(function (DescribeMitigationActionResponse) { + DescribeMitigationActionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeMitigationActionResponse = exports.DescribeMitigationActionResponse || (exports.DescribeMitigationActionResponse = {})); +var DescribeProvisioningTemplateRequest; +(function (DescribeProvisioningTemplateRequest) { + DescribeProvisioningTemplateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeProvisioningTemplateRequest = exports.DescribeProvisioningTemplateRequest || (exports.DescribeProvisioningTemplateRequest = {})); +var DescribeProvisioningTemplateResponse; +(function (DescribeProvisioningTemplateResponse) { + DescribeProvisioningTemplateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeProvisioningTemplateResponse = exports.DescribeProvisioningTemplateResponse || (exports.DescribeProvisioningTemplateResponse = {})); +var DescribeProvisioningTemplateVersionRequest; +(function (DescribeProvisioningTemplateVersionRequest) { + DescribeProvisioningTemplateVersionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeProvisioningTemplateVersionRequest = exports.DescribeProvisioningTemplateVersionRequest || (exports.DescribeProvisioningTemplateVersionRequest = {})); +var DescribeProvisioningTemplateVersionResponse; +(function (DescribeProvisioningTemplateVersionResponse) { + DescribeProvisioningTemplateVersionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeProvisioningTemplateVersionResponse = exports.DescribeProvisioningTemplateVersionResponse || (exports.DescribeProvisioningTemplateVersionResponse = {})); +var DescribeRoleAliasRequest; +(function (DescribeRoleAliasRequest) { + DescribeRoleAliasRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeRoleAliasRequest = exports.DescribeRoleAliasRequest || (exports.DescribeRoleAliasRequest = {})); +var RoleAliasDescription; +(function (RoleAliasDescription) { + RoleAliasDescription.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RoleAliasDescription = exports.RoleAliasDescription || (exports.RoleAliasDescription = {})); +var DescribeRoleAliasResponse; +(function (DescribeRoleAliasResponse) { + DescribeRoleAliasResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeRoleAliasResponse = exports.DescribeRoleAliasResponse || (exports.DescribeRoleAliasResponse = {})); +var DescribeScheduledAuditRequest; +(function (DescribeScheduledAuditRequest) { + DescribeScheduledAuditRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeScheduledAuditRequest = exports.DescribeScheduledAuditRequest || (exports.DescribeScheduledAuditRequest = {})); +var DescribeScheduledAuditResponse; +(function (DescribeScheduledAuditResponse) { + DescribeScheduledAuditResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeScheduledAuditResponse = exports.DescribeScheduledAuditResponse || (exports.DescribeScheduledAuditResponse = {})); +var DescribeSecurityProfileRequest; +(function (DescribeSecurityProfileRequest) { + DescribeSecurityProfileRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeSecurityProfileRequest = exports.DescribeSecurityProfileRequest || (exports.DescribeSecurityProfileRequest = {})); +var DescribeSecurityProfileResponse; +(function (DescribeSecurityProfileResponse) { + DescribeSecurityProfileResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeSecurityProfileResponse = exports.DescribeSecurityProfileResponse || (exports.DescribeSecurityProfileResponse = {})); +var DescribeStreamRequest; +(function (DescribeStreamRequest) { + DescribeStreamRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStreamRequest = exports.DescribeStreamRequest || (exports.DescribeStreamRequest = {})); +var StreamInfo; +(function (StreamInfo) { + StreamInfo.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StreamInfo = exports.StreamInfo || (exports.StreamInfo = {})); +var DescribeStreamResponse; +(function (DescribeStreamResponse) { + DescribeStreamResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeStreamResponse = exports.DescribeStreamResponse || (exports.DescribeStreamResponse = {})); +var DescribeThingRequest; +(function (DescribeThingRequest) { + DescribeThingRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeThingRequest = exports.DescribeThingRequest || (exports.DescribeThingRequest = {})); +var DescribeThingResponse; +(function (DescribeThingResponse) { + DescribeThingResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeThingResponse = exports.DescribeThingResponse || (exports.DescribeThingResponse = {})); +var DescribeThingGroupRequest; +(function (DescribeThingGroupRequest) { + DescribeThingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeThingGroupRequest = exports.DescribeThingGroupRequest || (exports.DescribeThingGroupRequest = {})); +var DynamicGroupStatus; +(function (DynamicGroupStatus) { + DynamicGroupStatus["ACTIVE"] = "ACTIVE"; + DynamicGroupStatus["BUILDING"] = "BUILDING"; + DynamicGroupStatus["REBUILDING"] = "REBUILDING"; +})(DynamicGroupStatus = exports.DynamicGroupStatus || (exports.DynamicGroupStatus = {})); +var GroupNameAndArn; +(function (GroupNameAndArn) { + GroupNameAndArn.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GroupNameAndArn = exports.GroupNameAndArn || (exports.GroupNameAndArn = {})); +var ThingGroupMetadata; +(function (ThingGroupMetadata) { + ThingGroupMetadata.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingGroupMetadata = exports.ThingGroupMetadata || (exports.ThingGroupMetadata = {})); +var DescribeThingGroupResponse; +(function (DescribeThingGroupResponse) { + DescribeThingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeThingGroupResponse = exports.DescribeThingGroupResponse || (exports.DescribeThingGroupResponse = {})); +var DescribeThingRegistrationTaskRequest; +(function (DescribeThingRegistrationTaskRequest) { + DescribeThingRegistrationTaskRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeThingRegistrationTaskRequest = exports.DescribeThingRegistrationTaskRequest || (exports.DescribeThingRegistrationTaskRequest = {})); +var Status; +(function (Status) { + Status["Cancelled"] = "Cancelled"; + Status["Cancelling"] = "Cancelling"; + Status["Completed"] = "Completed"; + Status["Failed"] = "Failed"; + Status["InProgress"] = "InProgress"; +})(Status = exports.Status || (exports.Status = {})); +var DescribeThingRegistrationTaskResponse; +(function (DescribeThingRegistrationTaskResponse) { + DescribeThingRegistrationTaskResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeThingRegistrationTaskResponse = exports.DescribeThingRegistrationTaskResponse || (exports.DescribeThingRegistrationTaskResponse = {})); +var DescribeThingTypeRequest; +(function (DescribeThingTypeRequest) { + DescribeThingTypeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeThingTypeRequest = exports.DescribeThingTypeRequest || (exports.DescribeThingTypeRequest = {})); +var ThingTypeMetadata; +(function (ThingTypeMetadata) { + ThingTypeMetadata.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingTypeMetadata = exports.ThingTypeMetadata || (exports.ThingTypeMetadata = {})); +var DescribeThingTypeResponse; +(function (DescribeThingTypeResponse) { + DescribeThingTypeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeThingTypeResponse = exports.DescribeThingTypeResponse || (exports.DescribeThingTypeResponse = {})); +var DetachPolicyRequest; +(function (DetachPolicyRequest) { + DetachPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetachPolicyRequest = exports.DetachPolicyRequest || (exports.DetachPolicyRequest = {})); +var DetachPrincipalPolicyRequest; +(function (DetachPrincipalPolicyRequest) { + DetachPrincipalPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetachPrincipalPolicyRequest = exports.DetachPrincipalPolicyRequest || (exports.DetachPrincipalPolicyRequest = {})); +var DetachSecurityProfileRequest; +(function (DetachSecurityProfileRequest) { + DetachSecurityProfileRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetachSecurityProfileRequest = exports.DetachSecurityProfileRequest || (exports.DetachSecurityProfileRequest = {})); +var DetachSecurityProfileResponse; +(function (DetachSecurityProfileResponse) { + DetachSecurityProfileResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetachSecurityProfileResponse = exports.DetachSecurityProfileResponse || (exports.DetachSecurityProfileResponse = {})); +var DetachThingPrincipalRequest; +(function (DetachThingPrincipalRequest) { + DetachThingPrincipalRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetachThingPrincipalRequest = exports.DetachThingPrincipalRequest || (exports.DetachThingPrincipalRequest = {})); +var DetachThingPrincipalResponse; +(function (DetachThingPrincipalResponse) { + DetachThingPrincipalResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DetachThingPrincipalResponse = exports.DetachThingPrincipalResponse || (exports.DetachThingPrincipalResponse = {})); +var DisableTopicRuleRequest; +(function (DisableTopicRuleRequest) { + DisableTopicRuleRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DisableTopicRuleRequest = exports.DisableTopicRuleRequest || (exports.DisableTopicRuleRequest = {})); +var EnableTopicRuleRequest; +(function (EnableTopicRuleRequest) { + EnableTopicRuleRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EnableTopicRuleRequest = exports.EnableTopicRuleRequest || (exports.EnableTopicRuleRequest = {})); +var GetCardinalityRequest; +(function (GetCardinalityRequest) { + GetCardinalityRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetCardinalityRequest = exports.GetCardinalityRequest || (exports.GetCardinalityRequest = {})); +var GetCardinalityResponse; +(function (GetCardinalityResponse) { + GetCardinalityResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetCardinalityResponse = exports.GetCardinalityResponse || (exports.GetCardinalityResponse = {})); +var IndexNotReadyException; +(function (IndexNotReadyException) { + IndexNotReadyException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(IndexNotReadyException = exports.IndexNotReadyException || (exports.IndexNotReadyException = {})); +var InvalidAggregationException; +(function (InvalidAggregationException) { + InvalidAggregationException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidAggregationException = exports.InvalidAggregationException || (exports.InvalidAggregationException = {})); +var GetEffectivePoliciesRequest; +(function (GetEffectivePoliciesRequest) { + GetEffectivePoliciesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetEffectivePoliciesRequest = exports.GetEffectivePoliciesRequest || (exports.GetEffectivePoliciesRequest = {})); +var EffectivePolicy; +(function (EffectivePolicy) { + EffectivePolicy.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EffectivePolicy = exports.EffectivePolicy || (exports.EffectivePolicy = {})); +var GetEffectivePoliciesResponse; +(function (GetEffectivePoliciesResponse) { + GetEffectivePoliciesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetEffectivePoliciesResponse = exports.GetEffectivePoliciesResponse || (exports.GetEffectivePoliciesResponse = {})); +var GetIndexingConfigurationRequest; +(function (GetIndexingConfigurationRequest) { + GetIndexingConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetIndexingConfigurationRequest = exports.GetIndexingConfigurationRequest || (exports.GetIndexingConfigurationRequest = {})); +var FieldType; +(function (FieldType) { + FieldType["BOOLEAN"] = "Boolean"; + FieldType["NUMBER"] = "Number"; + FieldType["STRING"] = "String"; +})(FieldType = exports.FieldType || (exports.FieldType = {})); +var Field; +(function (Field) { + Field.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Field = exports.Field || (exports.Field = {})); +var ThingGroupIndexingMode; +(function (ThingGroupIndexingMode) { + ThingGroupIndexingMode["OFF"] = "OFF"; + ThingGroupIndexingMode["ON"] = "ON"; +})(ThingGroupIndexingMode = exports.ThingGroupIndexingMode || (exports.ThingGroupIndexingMode = {})); +var ThingGroupIndexingConfiguration; +(function (ThingGroupIndexingConfiguration) { + ThingGroupIndexingConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingGroupIndexingConfiguration = exports.ThingGroupIndexingConfiguration || (exports.ThingGroupIndexingConfiguration = {})); +var ThingConnectivityIndexingMode; +(function (ThingConnectivityIndexingMode) { + ThingConnectivityIndexingMode["OFF"] = "OFF"; + ThingConnectivityIndexingMode["STATUS"] = "STATUS"; +})(ThingConnectivityIndexingMode = exports.ThingConnectivityIndexingMode || (exports.ThingConnectivityIndexingMode = {})); +var ThingIndexingMode; +(function (ThingIndexingMode) { + ThingIndexingMode["OFF"] = "OFF"; + ThingIndexingMode["REGISTRY"] = "REGISTRY"; + ThingIndexingMode["REGISTRY_AND_SHADOW"] = "REGISTRY_AND_SHADOW"; +})(ThingIndexingMode = exports.ThingIndexingMode || (exports.ThingIndexingMode = {})); +var ThingIndexingConfiguration; +(function (ThingIndexingConfiguration) { + ThingIndexingConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingIndexingConfiguration = exports.ThingIndexingConfiguration || (exports.ThingIndexingConfiguration = {})); +var GetIndexingConfigurationResponse; +(function (GetIndexingConfigurationResponse) { + GetIndexingConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetIndexingConfigurationResponse = exports.GetIndexingConfigurationResponse || (exports.GetIndexingConfigurationResponse = {})); +var GetJobDocumentRequest; +(function (GetJobDocumentRequest) { + GetJobDocumentRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetJobDocumentRequest = exports.GetJobDocumentRequest || (exports.GetJobDocumentRequest = {})); +var GetJobDocumentResponse; +(function (GetJobDocumentResponse) { + GetJobDocumentResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetJobDocumentResponse = exports.GetJobDocumentResponse || (exports.GetJobDocumentResponse = {})); +var GetLoggingOptionsRequest; +(function (GetLoggingOptionsRequest) { + GetLoggingOptionsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetLoggingOptionsRequest = exports.GetLoggingOptionsRequest || (exports.GetLoggingOptionsRequest = {})); +var GetLoggingOptionsResponse; +(function (GetLoggingOptionsResponse) { + GetLoggingOptionsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetLoggingOptionsResponse = exports.GetLoggingOptionsResponse || (exports.GetLoggingOptionsResponse = {})); +var GetOTAUpdateRequest; +(function (GetOTAUpdateRequest) { + GetOTAUpdateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetOTAUpdateRequest = exports.GetOTAUpdateRequest || (exports.GetOTAUpdateRequest = {})); +var ErrorInfo; +(function (ErrorInfo) { + ErrorInfo.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ErrorInfo = exports.ErrorInfo || (exports.ErrorInfo = {})); +var OTAUpdateInfo; +(function (OTAUpdateInfo) { + OTAUpdateInfo.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(OTAUpdateInfo = exports.OTAUpdateInfo || (exports.OTAUpdateInfo = {})); +var GetOTAUpdateResponse; +(function (GetOTAUpdateResponse) { + GetOTAUpdateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetOTAUpdateResponse = exports.GetOTAUpdateResponse || (exports.GetOTAUpdateResponse = {})); +var GetPercentilesRequest; +(function (GetPercentilesRequest) { + GetPercentilesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetPercentilesRequest = exports.GetPercentilesRequest || (exports.GetPercentilesRequest = {})); +var PercentPair; +(function (PercentPair) { + PercentPair.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PercentPair = exports.PercentPair || (exports.PercentPair = {})); +var GetPercentilesResponse; +(function (GetPercentilesResponse) { + GetPercentilesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetPercentilesResponse = exports.GetPercentilesResponse || (exports.GetPercentilesResponse = {})); +var GetPolicyRequest; +(function (GetPolicyRequest) { + GetPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetPolicyRequest = exports.GetPolicyRequest || (exports.GetPolicyRequest = {})); +var GetPolicyResponse; +(function (GetPolicyResponse) { + GetPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetPolicyResponse = exports.GetPolicyResponse || (exports.GetPolicyResponse = {})); +var GetPolicyVersionRequest; +(function (GetPolicyVersionRequest) { + GetPolicyVersionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetPolicyVersionRequest = exports.GetPolicyVersionRequest || (exports.GetPolicyVersionRequest = {})); +var GetPolicyVersionResponse; +(function (GetPolicyVersionResponse) { + GetPolicyVersionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetPolicyVersionResponse = exports.GetPolicyVersionResponse || (exports.GetPolicyVersionResponse = {})); +var GetRegistrationCodeRequest; +(function (GetRegistrationCodeRequest) { + GetRegistrationCodeRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRegistrationCodeRequest = exports.GetRegistrationCodeRequest || (exports.GetRegistrationCodeRequest = {})); +var GetRegistrationCodeResponse; +(function (GetRegistrationCodeResponse) { + GetRegistrationCodeResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRegistrationCodeResponse = exports.GetRegistrationCodeResponse || (exports.GetRegistrationCodeResponse = {})); +var GetStatisticsRequest; +(function (GetStatisticsRequest) { + GetStatisticsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetStatisticsRequest = exports.GetStatisticsRequest || (exports.GetStatisticsRequest = {})); +var Statistics; +(function (Statistics) { + Statistics.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Statistics = exports.Statistics || (exports.Statistics = {})); +var GetStatisticsResponse; +(function (GetStatisticsResponse) { + GetStatisticsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetStatisticsResponse = exports.GetStatisticsResponse || (exports.GetStatisticsResponse = {})); +var GetTopicRuleRequest; +(function (GetTopicRuleRequest) { + GetTopicRuleRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetTopicRuleRequest = exports.GetTopicRuleRequest || (exports.GetTopicRuleRequest = {})); +var TopicRule; +(function (TopicRule) { + TopicRule.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TopicRule = exports.TopicRule || (exports.TopicRule = {})); +var GetTopicRuleResponse; +(function (GetTopicRuleResponse) { + GetTopicRuleResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetTopicRuleResponse = exports.GetTopicRuleResponse || (exports.GetTopicRuleResponse = {})); +var GetTopicRuleDestinationRequest; +(function (GetTopicRuleDestinationRequest) { + GetTopicRuleDestinationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetTopicRuleDestinationRequest = exports.GetTopicRuleDestinationRequest || (exports.GetTopicRuleDestinationRequest = {})); +var GetTopicRuleDestinationResponse; +(function (GetTopicRuleDestinationResponse) { + GetTopicRuleDestinationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetTopicRuleDestinationResponse = exports.GetTopicRuleDestinationResponse || (exports.GetTopicRuleDestinationResponse = {})); +var GetV2LoggingOptionsRequest; +(function (GetV2LoggingOptionsRequest) { + GetV2LoggingOptionsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetV2LoggingOptionsRequest = exports.GetV2LoggingOptionsRequest || (exports.GetV2LoggingOptionsRequest = {})); +var GetV2LoggingOptionsResponse; +(function (GetV2LoggingOptionsResponse) { + GetV2LoggingOptionsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetV2LoggingOptionsResponse = exports.GetV2LoggingOptionsResponse || (exports.GetV2LoggingOptionsResponse = {})); +var NotConfiguredException; +(function (NotConfiguredException) { + NotConfiguredException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(NotConfiguredException = exports.NotConfiguredException || (exports.NotConfiguredException = {})); +var ListActiveViolationsRequest; +(function (ListActiveViolationsRequest) { + ListActiveViolationsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListActiveViolationsRequest = exports.ListActiveViolationsRequest || (exports.ListActiveViolationsRequest = {})); +var ListActiveViolationsResponse; +(function (ListActiveViolationsResponse) { + ListActiveViolationsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListActiveViolationsResponse = exports.ListActiveViolationsResponse || (exports.ListActiveViolationsResponse = {})); +var ListAttachedPoliciesRequest; +(function (ListAttachedPoliciesRequest) { + ListAttachedPoliciesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAttachedPoliciesRequest = exports.ListAttachedPoliciesRequest || (exports.ListAttachedPoliciesRequest = {})); +var ListAttachedPoliciesResponse; +(function (ListAttachedPoliciesResponse) { + ListAttachedPoliciesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAttachedPoliciesResponse = exports.ListAttachedPoliciesResponse || (exports.ListAttachedPoliciesResponse = {})); +var ListAuditFindingsRequest; +(function (ListAuditFindingsRequest) { + ListAuditFindingsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuditFindingsRequest = exports.ListAuditFindingsRequest || (exports.ListAuditFindingsRequest = {})); +var ListAuditFindingsResponse; +(function (ListAuditFindingsResponse) { + ListAuditFindingsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuditFindingsResponse = exports.ListAuditFindingsResponse || (exports.ListAuditFindingsResponse = {})); +var ListAuditMitigationActionsExecutionsRequest; +(function (ListAuditMitigationActionsExecutionsRequest) { + ListAuditMitigationActionsExecutionsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuditMitigationActionsExecutionsRequest = exports.ListAuditMitigationActionsExecutionsRequest || (exports.ListAuditMitigationActionsExecutionsRequest = {})); +var ListAuditMitigationActionsExecutionsResponse; +(function (ListAuditMitigationActionsExecutionsResponse) { + ListAuditMitigationActionsExecutionsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuditMitigationActionsExecutionsResponse = exports.ListAuditMitigationActionsExecutionsResponse || (exports.ListAuditMitigationActionsExecutionsResponse = {})); +var ListAuditMitigationActionsTasksRequest; +(function (ListAuditMitigationActionsTasksRequest) { + ListAuditMitigationActionsTasksRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuditMitigationActionsTasksRequest = exports.ListAuditMitigationActionsTasksRequest || (exports.ListAuditMitigationActionsTasksRequest = {})); +var ListAuditMitigationActionsTasksResponse; +(function (ListAuditMitigationActionsTasksResponse) { + ListAuditMitigationActionsTasksResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuditMitigationActionsTasksResponse = exports.ListAuditMitigationActionsTasksResponse || (exports.ListAuditMitigationActionsTasksResponse = {})); +var ListAuditSuppressionsRequest; +(function (ListAuditSuppressionsRequest) { + ListAuditSuppressionsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuditSuppressionsRequest = exports.ListAuditSuppressionsRequest || (exports.ListAuditSuppressionsRequest = {})); +var ListAuditSuppressionsResponse; +(function (ListAuditSuppressionsResponse) { + ListAuditSuppressionsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuditSuppressionsResponse = exports.ListAuditSuppressionsResponse || (exports.ListAuditSuppressionsResponse = {})); +var ListAuditTasksRequest; +(function (ListAuditTasksRequest) { + ListAuditTasksRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuditTasksRequest = exports.ListAuditTasksRequest || (exports.ListAuditTasksRequest = {})); +var ListAuditTasksResponse; +(function (ListAuditTasksResponse) { + ListAuditTasksResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuditTasksResponse = exports.ListAuditTasksResponse || (exports.ListAuditTasksResponse = {})); +var ListAuthorizersRequest; +(function (ListAuthorizersRequest) { + ListAuthorizersRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuthorizersRequest = exports.ListAuthorizersRequest || (exports.ListAuthorizersRequest = {})); +var ListAuthorizersResponse; +(function (ListAuthorizersResponse) { + ListAuthorizersResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAuthorizersResponse = exports.ListAuthorizersResponse || (exports.ListAuthorizersResponse = {})); +var ListBillingGroupsRequest; +(function (ListBillingGroupsRequest) { + ListBillingGroupsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListBillingGroupsRequest = exports.ListBillingGroupsRequest || (exports.ListBillingGroupsRequest = {})); +var ListBillingGroupsResponse; +(function (ListBillingGroupsResponse) { + ListBillingGroupsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListBillingGroupsResponse = exports.ListBillingGroupsResponse || (exports.ListBillingGroupsResponse = {})); +var ListCACertificatesRequest; +(function (ListCACertificatesRequest) { + ListCACertificatesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListCACertificatesRequest = exports.ListCACertificatesRequest || (exports.ListCACertificatesRequest = {})); +var CACertificate; +(function (CACertificate) { + CACertificate.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CACertificate = exports.CACertificate || (exports.CACertificate = {})); +var ListCACertificatesResponse; +(function (ListCACertificatesResponse) { + ListCACertificatesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListCACertificatesResponse = exports.ListCACertificatesResponse || (exports.ListCACertificatesResponse = {})); +var ListCertificatesRequest; +(function (ListCertificatesRequest) { + ListCertificatesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListCertificatesRequest = exports.ListCertificatesRequest || (exports.ListCertificatesRequest = {})); +var Certificate; +(function (Certificate) { + Certificate.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Certificate = exports.Certificate || (exports.Certificate = {})); +var ListCertificatesResponse; +(function (ListCertificatesResponse) { + ListCertificatesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListCertificatesResponse = exports.ListCertificatesResponse || (exports.ListCertificatesResponse = {})); +var ListCertificatesByCARequest; +(function (ListCertificatesByCARequest) { + ListCertificatesByCARequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListCertificatesByCARequest = exports.ListCertificatesByCARequest || (exports.ListCertificatesByCARequest = {})); +var ListCertificatesByCAResponse; +(function (ListCertificatesByCAResponse) { + ListCertificatesByCAResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListCertificatesByCAResponse = exports.ListCertificatesByCAResponse || (exports.ListCertificatesByCAResponse = {})); +var ListDimensionsRequest; +(function (ListDimensionsRequest) { + ListDimensionsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListDimensionsRequest = exports.ListDimensionsRequest || (exports.ListDimensionsRequest = {})); +var ListDimensionsResponse; +(function (ListDimensionsResponse) { + ListDimensionsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListDimensionsResponse = exports.ListDimensionsResponse || (exports.ListDimensionsResponse = {})); +var ListDomainConfigurationsRequest; +(function (ListDomainConfigurationsRequest) { + ListDomainConfigurationsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListDomainConfigurationsRequest = exports.ListDomainConfigurationsRequest || (exports.ListDomainConfigurationsRequest = {})); +var DomainConfigurationSummary; +(function (DomainConfigurationSummary) { + DomainConfigurationSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DomainConfigurationSummary = exports.DomainConfigurationSummary || (exports.DomainConfigurationSummary = {})); +var ListDomainConfigurationsResponse; +(function (ListDomainConfigurationsResponse) { + ListDomainConfigurationsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListDomainConfigurationsResponse = exports.ListDomainConfigurationsResponse || (exports.ListDomainConfigurationsResponse = {})); +var ListIndicesRequest; +(function (ListIndicesRequest) { + ListIndicesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListIndicesRequest = exports.ListIndicesRequest || (exports.ListIndicesRequest = {})); +var ListIndicesResponse; +(function (ListIndicesResponse) { + ListIndicesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListIndicesResponse = exports.ListIndicesResponse || (exports.ListIndicesResponse = {})); +var ListJobExecutionsForJobRequest; +(function (ListJobExecutionsForJobRequest) { + ListJobExecutionsForJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListJobExecutionsForJobRequest = exports.ListJobExecutionsForJobRequest || (exports.ListJobExecutionsForJobRequest = {})); +var JobExecutionSummary; +(function (JobExecutionSummary) { + JobExecutionSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(JobExecutionSummary = exports.JobExecutionSummary || (exports.JobExecutionSummary = {})); +var JobExecutionSummaryForJob; +(function (JobExecutionSummaryForJob) { + JobExecutionSummaryForJob.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(JobExecutionSummaryForJob = exports.JobExecutionSummaryForJob || (exports.JobExecutionSummaryForJob = {})); +var ListJobExecutionsForJobResponse; +(function (ListJobExecutionsForJobResponse) { + ListJobExecutionsForJobResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListJobExecutionsForJobResponse = exports.ListJobExecutionsForJobResponse || (exports.ListJobExecutionsForJobResponse = {})); +var ListJobExecutionsForThingRequest; +(function (ListJobExecutionsForThingRequest) { + ListJobExecutionsForThingRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListJobExecutionsForThingRequest = exports.ListJobExecutionsForThingRequest || (exports.ListJobExecutionsForThingRequest = {})); +var JobExecutionSummaryForThing; +(function (JobExecutionSummaryForThing) { + JobExecutionSummaryForThing.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(JobExecutionSummaryForThing = exports.JobExecutionSummaryForThing || (exports.JobExecutionSummaryForThing = {})); +var ListJobExecutionsForThingResponse; +(function (ListJobExecutionsForThingResponse) { + ListJobExecutionsForThingResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListJobExecutionsForThingResponse = exports.ListJobExecutionsForThingResponse || (exports.ListJobExecutionsForThingResponse = {})); +var ListJobsRequest; +(function (ListJobsRequest) { + ListJobsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListJobsRequest = exports.ListJobsRequest || (exports.ListJobsRequest = {})); +var JobSummary; +(function (JobSummary) { + JobSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(JobSummary = exports.JobSummary || (exports.JobSummary = {})); +var ListJobsResponse; +(function (ListJobsResponse) { + ListJobsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListJobsResponse = exports.ListJobsResponse || (exports.ListJobsResponse = {})); +var ListMitigationActionsRequest; +(function (ListMitigationActionsRequest) { + ListMitigationActionsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListMitigationActionsRequest = exports.ListMitigationActionsRequest || (exports.ListMitigationActionsRequest = {})); +var MitigationActionIdentifier; +(function (MitigationActionIdentifier) { + MitigationActionIdentifier.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MitigationActionIdentifier = exports.MitigationActionIdentifier || (exports.MitigationActionIdentifier = {})); +var ListMitigationActionsResponse; +(function (ListMitigationActionsResponse) { + ListMitigationActionsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListMitigationActionsResponse = exports.ListMitigationActionsResponse || (exports.ListMitigationActionsResponse = {})); +var ListOTAUpdatesRequest; +(function (ListOTAUpdatesRequest) { + ListOTAUpdatesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListOTAUpdatesRequest = exports.ListOTAUpdatesRequest || (exports.ListOTAUpdatesRequest = {})); +var OTAUpdateSummary; +(function (OTAUpdateSummary) { + OTAUpdateSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(OTAUpdateSummary = exports.OTAUpdateSummary || (exports.OTAUpdateSummary = {})); +var ListOTAUpdatesResponse; +(function (ListOTAUpdatesResponse) { + ListOTAUpdatesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListOTAUpdatesResponse = exports.ListOTAUpdatesResponse || (exports.ListOTAUpdatesResponse = {})); +var ListOutgoingCertificatesRequest; +(function (ListOutgoingCertificatesRequest) { + ListOutgoingCertificatesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListOutgoingCertificatesRequest = exports.ListOutgoingCertificatesRequest || (exports.ListOutgoingCertificatesRequest = {})); +var OutgoingCertificate; +(function (OutgoingCertificate) { + OutgoingCertificate.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(OutgoingCertificate = exports.OutgoingCertificate || (exports.OutgoingCertificate = {})); +var ListOutgoingCertificatesResponse; +(function (ListOutgoingCertificatesResponse) { + ListOutgoingCertificatesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListOutgoingCertificatesResponse = exports.ListOutgoingCertificatesResponse || (exports.ListOutgoingCertificatesResponse = {})); +var ListPoliciesRequest; +(function (ListPoliciesRequest) { + ListPoliciesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListPoliciesRequest = exports.ListPoliciesRequest || (exports.ListPoliciesRequest = {})); +var ListPoliciesResponse; +(function (ListPoliciesResponse) { + ListPoliciesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListPoliciesResponse = exports.ListPoliciesResponse || (exports.ListPoliciesResponse = {})); +var ListPolicyPrincipalsRequest; +(function (ListPolicyPrincipalsRequest) { + ListPolicyPrincipalsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListPolicyPrincipalsRequest = exports.ListPolicyPrincipalsRequest || (exports.ListPolicyPrincipalsRequest = {})); +var ListPolicyPrincipalsResponse; +(function (ListPolicyPrincipalsResponse) { + ListPolicyPrincipalsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListPolicyPrincipalsResponse = exports.ListPolicyPrincipalsResponse || (exports.ListPolicyPrincipalsResponse = {})); +var ListPolicyVersionsRequest; +(function (ListPolicyVersionsRequest) { + ListPolicyVersionsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListPolicyVersionsRequest = exports.ListPolicyVersionsRequest || (exports.ListPolicyVersionsRequest = {})); +var PolicyVersion; +(function (PolicyVersion) { + PolicyVersion.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PolicyVersion = exports.PolicyVersion || (exports.PolicyVersion = {})); +var ListPolicyVersionsResponse; +(function (ListPolicyVersionsResponse) { + ListPolicyVersionsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListPolicyVersionsResponse = exports.ListPolicyVersionsResponse || (exports.ListPolicyVersionsResponse = {})); +var ListPrincipalPoliciesRequest; +(function (ListPrincipalPoliciesRequest) { + ListPrincipalPoliciesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListPrincipalPoliciesRequest = exports.ListPrincipalPoliciesRequest || (exports.ListPrincipalPoliciesRequest = {})); +var ListPrincipalPoliciesResponse; +(function (ListPrincipalPoliciesResponse) { + ListPrincipalPoliciesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListPrincipalPoliciesResponse = exports.ListPrincipalPoliciesResponse || (exports.ListPrincipalPoliciesResponse = {})); +var ListPrincipalThingsRequest; +(function (ListPrincipalThingsRequest) { + ListPrincipalThingsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListPrincipalThingsRequest = exports.ListPrincipalThingsRequest || (exports.ListPrincipalThingsRequest = {})); +var ListPrincipalThingsResponse; +(function (ListPrincipalThingsResponse) { + ListPrincipalThingsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListPrincipalThingsResponse = exports.ListPrincipalThingsResponse || (exports.ListPrincipalThingsResponse = {})); +var ListProvisioningTemplatesRequest; +(function (ListProvisioningTemplatesRequest) { + ListProvisioningTemplatesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListProvisioningTemplatesRequest = exports.ListProvisioningTemplatesRequest || (exports.ListProvisioningTemplatesRequest = {})); +var ProvisioningTemplateSummary; +(function (ProvisioningTemplateSummary) { + ProvisioningTemplateSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ProvisioningTemplateSummary = exports.ProvisioningTemplateSummary || (exports.ProvisioningTemplateSummary = {})); +var ListProvisioningTemplatesResponse; +(function (ListProvisioningTemplatesResponse) { + ListProvisioningTemplatesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListProvisioningTemplatesResponse = exports.ListProvisioningTemplatesResponse || (exports.ListProvisioningTemplatesResponse = {})); +var ListProvisioningTemplateVersionsRequest; +(function (ListProvisioningTemplateVersionsRequest) { + ListProvisioningTemplateVersionsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListProvisioningTemplateVersionsRequest = exports.ListProvisioningTemplateVersionsRequest || (exports.ListProvisioningTemplateVersionsRequest = {})); +var ProvisioningTemplateVersionSummary; +(function (ProvisioningTemplateVersionSummary) { + ProvisioningTemplateVersionSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ProvisioningTemplateVersionSummary = exports.ProvisioningTemplateVersionSummary || (exports.ProvisioningTemplateVersionSummary = {})); +var ListProvisioningTemplateVersionsResponse; +(function (ListProvisioningTemplateVersionsResponse) { + ListProvisioningTemplateVersionsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListProvisioningTemplateVersionsResponse = exports.ListProvisioningTemplateVersionsResponse || (exports.ListProvisioningTemplateVersionsResponse = {})); +var ListRoleAliasesRequest; +(function (ListRoleAliasesRequest) { + ListRoleAliasesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListRoleAliasesRequest = exports.ListRoleAliasesRequest || (exports.ListRoleAliasesRequest = {})); +var ListRoleAliasesResponse; +(function (ListRoleAliasesResponse) { + ListRoleAliasesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListRoleAliasesResponse = exports.ListRoleAliasesResponse || (exports.ListRoleAliasesResponse = {})); +var ListScheduledAuditsRequest; +(function (ListScheduledAuditsRequest) { + ListScheduledAuditsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListScheduledAuditsRequest = exports.ListScheduledAuditsRequest || (exports.ListScheduledAuditsRequest = {})); +var ScheduledAuditMetadata; +(function (ScheduledAuditMetadata) { + ScheduledAuditMetadata.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ScheduledAuditMetadata = exports.ScheduledAuditMetadata || (exports.ScheduledAuditMetadata = {})); +var ListScheduledAuditsResponse; +(function (ListScheduledAuditsResponse) { + ListScheduledAuditsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListScheduledAuditsResponse = exports.ListScheduledAuditsResponse || (exports.ListScheduledAuditsResponse = {})); +var ListSecurityProfilesRequest; +(function (ListSecurityProfilesRequest) { + ListSecurityProfilesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListSecurityProfilesRequest = exports.ListSecurityProfilesRequest || (exports.ListSecurityProfilesRequest = {})); +var SecurityProfileIdentifier; +(function (SecurityProfileIdentifier) { + SecurityProfileIdentifier.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SecurityProfileIdentifier = exports.SecurityProfileIdentifier || (exports.SecurityProfileIdentifier = {})); +var ListSecurityProfilesResponse; +(function (ListSecurityProfilesResponse) { + ListSecurityProfilesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListSecurityProfilesResponse = exports.ListSecurityProfilesResponse || (exports.ListSecurityProfilesResponse = {})); +var ListSecurityProfilesForTargetRequest; +(function (ListSecurityProfilesForTargetRequest) { + ListSecurityProfilesForTargetRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListSecurityProfilesForTargetRequest = exports.ListSecurityProfilesForTargetRequest || (exports.ListSecurityProfilesForTargetRequest = {})); +var SecurityProfileTarget; +(function (SecurityProfileTarget) { + SecurityProfileTarget.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SecurityProfileTarget = exports.SecurityProfileTarget || (exports.SecurityProfileTarget = {})); +var SecurityProfileTargetMapping; +(function (SecurityProfileTargetMapping) { + SecurityProfileTargetMapping.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SecurityProfileTargetMapping = exports.SecurityProfileTargetMapping || (exports.SecurityProfileTargetMapping = {})); +var ListSecurityProfilesForTargetResponse; +(function (ListSecurityProfilesForTargetResponse) { + ListSecurityProfilesForTargetResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListSecurityProfilesForTargetResponse = exports.ListSecurityProfilesForTargetResponse || (exports.ListSecurityProfilesForTargetResponse = {})); +var ListStreamsRequest; +(function (ListStreamsRequest) { + ListStreamsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStreamsRequest = exports.ListStreamsRequest || (exports.ListStreamsRequest = {})); +var StreamSummary; +(function (StreamSummary) { + StreamSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StreamSummary = exports.StreamSummary || (exports.StreamSummary = {})); +var ListStreamsResponse; +(function (ListStreamsResponse) { + ListStreamsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListStreamsResponse = exports.ListStreamsResponse || (exports.ListStreamsResponse = {})); +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 ListTargetsForPolicyRequest; +(function (ListTargetsForPolicyRequest) { + ListTargetsForPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTargetsForPolicyRequest = exports.ListTargetsForPolicyRequest || (exports.ListTargetsForPolicyRequest = {})); +var ListTargetsForPolicyResponse; +(function (ListTargetsForPolicyResponse) { + ListTargetsForPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTargetsForPolicyResponse = exports.ListTargetsForPolicyResponse || (exports.ListTargetsForPolicyResponse = {})); +var ListTargetsForSecurityProfileRequest; +(function (ListTargetsForSecurityProfileRequest) { + ListTargetsForSecurityProfileRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTargetsForSecurityProfileRequest = exports.ListTargetsForSecurityProfileRequest || (exports.ListTargetsForSecurityProfileRequest = {})); +var ListTargetsForSecurityProfileResponse; +(function (ListTargetsForSecurityProfileResponse) { + ListTargetsForSecurityProfileResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTargetsForSecurityProfileResponse = exports.ListTargetsForSecurityProfileResponse || (exports.ListTargetsForSecurityProfileResponse = {})); +var ListThingGroupsRequest; +(function (ListThingGroupsRequest) { + ListThingGroupsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingGroupsRequest = exports.ListThingGroupsRequest || (exports.ListThingGroupsRequest = {})); +var ListThingGroupsResponse; +(function (ListThingGroupsResponse) { + ListThingGroupsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingGroupsResponse = exports.ListThingGroupsResponse || (exports.ListThingGroupsResponse = {})); +var ListThingGroupsForThingRequest; +(function (ListThingGroupsForThingRequest) { + ListThingGroupsForThingRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingGroupsForThingRequest = exports.ListThingGroupsForThingRequest || (exports.ListThingGroupsForThingRequest = {})); +var ListThingGroupsForThingResponse; +(function (ListThingGroupsForThingResponse) { + ListThingGroupsForThingResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingGroupsForThingResponse = exports.ListThingGroupsForThingResponse || (exports.ListThingGroupsForThingResponse = {})); +var ListThingPrincipalsRequest; +(function (ListThingPrincipalsRequest) { + ListThingPrincipalsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingPrincipalsRequest = exports.ListThingPrincipalsRequest || (exports.ListThingPrincipalsRequest = {})); +var ListThingPrincipalsResponse; +(function (ListThingPrincipalsResponse) { + ListThingPrincipalsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingPrincipalsResponse = exports.ListThingPrincipalsResponse || (exports.ListThingPrincipalsResponse = {})); +var ReportType; +(function (ReportType) { + ReportType["ERRORS"] = "ERRORS"; + ReportType["RESULTS"] = "RESULTS"; +})(ReportType = exports.ReportType || (exports.ReportType = {})); +var ListThingRegistrationTaskReportsRequest; +(function (ListThingRegistrationTaskReportsRequest) { + ListThingRegistrationTaskReportsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingRegistrationTaskReportsRequest = exports.ListThingRegistrationTaskReportsRequest || (exports.ListThingRegistrationTaskReportsRequest = {})); +var ListThingRegistrationTaskReportsResponse; +(function (ListThingRegistrationTaskReportsResponse) { + ListThingRegistrationTaskReportsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingRegistrationTaskReportsResponse = exports.ListThingRegistrationTaskReportsResponse || (exports.ListThingRegistrationTaskReportsResponse = {})); +var ListThingRegistrationTasksRequest; +(function (ListThingRegistrationTasksRequest) { + ListThingRegistrationTasksRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingRegistrationTasksRequest = exports.ListThingRegistrationTasksRequest || (exports.ListThingRegistrationTasksRequest = {})); +var ListThingRegistrationTasksResponse; +(function (ListThingRegistrationTasksResponse) { + ListThingRegistrationTasksResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingRegistrationTasksResponse = exports.ListThingRegistrationTasksResponse || (exports.ListThingRegistrationTasksResponse = {})); +var ListThingsRequest; +(function (ListThingsRequest) { + ListThingsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingsRequest = exports.ListThingsRequest || (exports.ListThingsRequest = {})); +var ThingAttribute; +(function (ThingAttribute) { + ThingAttribute.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingAttribute = exports.ThingAttribute || (exports.ThingAttribute = {})); +var ListThingsResponse; +(function (ListThingsResponse) { + ListThingsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingsResponse = exports.ListThingsResponse || (exports.ListThingsResponse = {})); +var ListThingsInBillingGroupRequest; +(function (ListThingsInBillingGroupRequest) { + ListThingsInBillingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingsInBillingGroupRequest = exports.ListThingsInBillingGroupRequest || (exports.ListThingsInBillingGroupRequest = {})); +var ListThingsInBillingGroupResponse; +(function (ListThingsInBillingGroupResponse) { + ListThingsInBillingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingsInBillingGroupResponse = exports.ListThingsInBillingGroupResponse || (exports.ListThingsInBillingGroupResponse = {})); +var ListThingsInThingGroupRequest; +(function (ListThingsInThingGroupRequest) { + ListThingsInThingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingsInThingGroupRequest = exports.ListThingsInThingGroupRequest || (exports.ListThingsInThingGroupRequest = {})); +var ListThingsInThingGroupResponse; +(function (ListThingsInThingGroupResponse) { + ListThingsInThingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingsInThingGroupResponse = exports.ListThingsInThingGroupResponse || (exports.ListThingsInThingGroupResponse = {})); +var ListThingTypesRequest; +(function (ListThingTypesRequest) { + ListThingTypesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingTypesRequest = exports.ListThingTypesRequest || (exports.ListThingTypesRequest = {})); +var ThingTypeDefinition; +(function (ThingTypeDefinition) { + ThingTypeDefinition.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingTypeDefinition = exports.ThingTypeDefinition || (exports.ThingTypeDefinition = {})); +var ListThingTypesResponse; +(function (ListThingTypesResponse) { + ListThingTypesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListThingTypesResponse = exports.ListThingTypesResponse || (exports.ListThingTypesResponse = {})); +var ListTopicRuleDestinationsRequest; +(function (ListTopicRuleDestinationsRequest) { + ListTopicRuleDestinationsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTopicRuleDestinationsRequest = exports.ListTopicRuleDestinationsRequest || (exports.ListTopicRuleDestinationsRequest = {})); +var HttpUrlDestinationSummary; +(function (HttpUrlDestinationSummary) { + HttpUrlDestinationSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(HttpUrlDestinationSummary = exports.HttpUrlDestinationSummary || (exports.HttpUrlDestinationSummary = {})); +var TopicRuleDestinationSummary; +(function (TopicRuleDestinationSummary) { + TopicRuleDestinationSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TopicRuleDestinationSummary = exports.TopicRuleDestinationSummary || (exports.TopicRuleDestinationSummary = {})); +var ListTopicRuleDestinationsResponse; +(function (ListTopicRuleDestinationsResponse) { + ListTopicRuleDestinationsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTopicRuleDestinationsResponse = exports.ListTopicRuleDestinationsResponse || (exports.ListTopicRuleDestinationsResponse = {})); +var ListTopicRulesRequest; +(function (ListTopicRulesRequest) { + ListTopicRulesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTopicRulesRequest = exports.ListTopicRulesRequest || (exports.ListTopicRulesRequest = {})); +var TopicRuleListItem; +(function (TopicRuleListItem) { + TopicRuleListItem.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TopicRuleListItem = exports.TopicRuleListItem || (exports.TopicRuleListItem = {})); +var ListTopicRulesResponse; +(function (ListTopicRulesResponse) { + ListTopicRulesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTopicRulesResponse = exports.ListTopicRulesResponse || (exports.ListTopicRulesResponse = {})); +var ListV2LoggingLevelsRequest; +(function (ListV2LoggingLevelsRequest) { + ListV2LoggingLevelsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListV2LoggingLevelsRequest = exports.ListV2LoggingLevelsRequest || (exports.ListV2LoggingLevelsRequest = {})); +var LogTarget; +(function (LogTarget) { + LogTarget.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LogTarget = exports.LogTarget || (exports.LogTarget = {})); +var LogTargetConfiguration; +(function (LogTargetConfiguration) { + LogTargetConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LogTargetConfiguration = exports.LogTargetConfiguration || (exports.LogTargetConfiguration = {})); +var ListV2LoggingLevelsResponse; +(function (ListV2LoggingLevelsResponse) { + ListV2LoggingLevelsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListV2LoggingLevelsResponse = exports.ListV2LoggingLevelsResponse || (exports.ListV2LoggingLevelsResponse = {})); +var ListViolationEventsRequest; +(function (ListViolationEventsRequest) { + ListViolationEventsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListViolationEventsRequest = exports.ListViolationEventsRequest || (exports.ListViolationEventsRequest = {})); +var ViolationEventType; +(function (ViolationEventType) { + ViolationEventType["ALARM_CLEARED"] = "alarm-cleared"; + ViolationEventType["ALARM_INVALIDATED"] = "alarm-invalidated"; + ViolationEventType["IN_ALARM"] = "in-alarm"; +})(ViolationEventType = exports.ViolationEventType || (exports.ViolationEventType = {})); +var ViolationEvent; +(function (ViolationEvent) { + ViolationEvent.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ViolationEvent = exports.ViolationEvent || (exports.ViolationEvent = {})); +var ListViolationEventsResponse; +(function (ListViolationEventsResponse) { + ListViolationEventsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListViolationEventsResponse = exports.ListViolationEventsResponse || (exports.ListViolationEventsResponse = {})); +var RegisterCACertificateRequest; +(function (RegisterCACertificateRequest) { + RegisterCACertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegisterCACertificateRequest = exports.RegisterCACertificateRequest || (exports.RegisterCACertificateRequest = {})); +var RegisterCACertificateResponse; +(function (RegisterCACertificateResponse) { + RegisterCACertificateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegisterCACertificateResponse = exports.RegisterCACertificateResponse || (exports.RegisterCACertificateResponse = {})); +var RegistrationCodeValidationException; +(function (RegistrationCodeValidationException) { + RegistrationCodeValidationException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegistrationCodeValidationException = exports.RegistrationCodeValidationException || (exports.RegistrationCodeValidationException = {})); +var CertificateConflictException; +(function (CertificateConflictException) { + CertificateConflictException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CertificateConflictException = exports.CertificateConflictException || (exports.CertificateConflictException = {})); +var RegisterCertificateRequest; +(function (RegisterCertificateRequest) { + RegisterCertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegisterCertificateRequest = exports.RegisterCertificateRequest || (exports.RegisterCertificateRequest = {})); +var RegisterCertificateResponse; +(function (RegisterCertificateResponse) { + RegisterCertificateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegisterCertificateResponse = exports.RegisterCertificateResponse || (exports.RegisterCertificateResponse = {})); +var RegisterCertificateWithoutCARequest; +(function (RegisterCertificateWithoutCARequest) { + RegisterCertificateWithoutCARequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegisterCertificateWithoutCARequest = exports.RegisterCertificateWithoutCARequest || (exports.RegisterCertificateWithoutCARequest = {})); +var RegisterCertificateWithoutCAResponse; +(function (RegisterCertificateWithoutCAResponse) { + RegisterCertificateWithoutCAResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegisterCertificateWithoutCAResponse = exports.RegisterCertificateWithoutCAResponse || (exports.RegisterCertificateWithoutCAResponse = {})); +var RegisterThingRequest; +(function (RegisterThingRequest) { + RegisterThingRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegisterThingRequest = exports.RegisterThingRequest || (exports.RegisterThingRequest = {})); +var RegisterThingResponse; +(function (RegisterThingResponse) { + RegisterThingResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegisterThingResponse = exports.RegisterThingResponse || (exports.RegisterThingResponse = {})); +var ResourceRegistrationFailureException; +(function (ResourceRegistrationFailureException) { + ResourceRegistrationFailureException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceRegistrationFailureException = exports.ResourceRegistrationFailureException || (exports.ResourceRegistrationFailureException = {})); +var RejectCertificateTransferRequest; +(function (RejectCertificateTransferRequest) { + RejectCertificateTransferRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RejectCertificateTransferRequest = exports.RejectCertificateTransferRequest || (exports.RejectCertificateTransferRequest = {})); +var RemoveThingFromBillingGroupRequest; +(function (RemoveThingFromBillingGroupRequest) { + RemoveThingFromBillingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RemoveThingFromBillingGroupRequest = exports.RemoveThingFromBillingGroupRequest || (exports.RemoveThingFromBillingGroupRequest = {})); +var RemoveThingFromBillingGroupResponse; +(function (RemoveThingFromBillingGroupResponse) { + RemoveThingFromBillingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RemoveThingFromBillingGroupResponse = exports.RemoveThingFromBillingGroupResponse || (exports.RemoveThingFromBillingGroupResponse = {})); +var RemoveThingFromThingGroupRequest; +(function (RemoveThingFromThingGroupRequest) { + RemoveThingFromThingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RemoveThingFromThingGroupRequest = exports.RemoveThingFromThingGroupRequest || (exports.RemoveThingFromThingGroupRequest = {})); +var RemoveThingFromThingGroupResponse; +(function (RemoveThingFromThingGroupResponse) { + RemoveThingFromThingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RemoveThingFromThingGroupResponse = exports.RemoveThingFromThingGroupResponse || (exports.RemoveThingFromThingGroupResponse = {})); +var ReplaceTopicRuleRequest; +(function (ReplaceTopicRuleRequest) { + ReplaceTopicRuleRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReplaceTopicRuleRequest = exports.ReplaceTopicRuleRequest || (exports.ReplaceTopicRuleRequest = {})); +var SearchIndexRequest; +(function (SearchIndexRequest) { + SearchIndexRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SearchIndexRequest = exports.SearchIndexRequest || (exports.SearchIndexRequest = {})); +var ThingGroupDocument; +(function (ThingGroupDocument) { + ThingGroupDocument.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingGroupDocument = exports.ThingGroupDocument || (exports.ThingGroupDocument = {})); +var ThingConnectivity; +(function (ThingConnectivity) { + ThingConnectivity.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingConnectivity = exports.ThingConnectivity || (exports.ThingConnectivity = {})); +var ThingDocument; +(function (ThingDocument) { + ThingDocument.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ThingDocument = exports.ThingDocument || (exports.ThingDocument = {})); +var SearchIndexResponse; +(function (SearchIndexResponse) { + SearchIndexResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SearchIndexResponse = exports.SearchIndexResponse || (exports.SearchIndexResponse = {})); +var SetDefaultAuthorizerRequest; +(function (SetDefaultAuthorizerRequest) { + SetDefaultAuthorizerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetDefaultAuthorizerRequest = exports.SetDefaultAuthorizerRequest || (exports.SetDefaultAuthorizerRequest = {})); +var SetDefaultAuthorizerResponse; +(function (SetDefaultAuthorizerResponse) { + SetDefaultAuthorizerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetDefaultAuthorizerResponse = exports.SetDefaultAuthorizerResponse || (exports.SetDefaultAuthorizerResponse = {})); +var SetDefaultPolicyVersionRequest; +(function (SetDefaultPolicyVersionRequest) { + SetDefaultPolicyVersionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetDefaultPolicyVersionRequest = exports.SetDefaultPolicyVersionRequest || (exports.SetDefaultPolicyVersionRequest = {})); +var LoggingOptionsPayload; +(function (LoggingOptionsPayload) { + LoggingOptionsPayload.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LoggingOptionsPayload = exports.LoggingOptionsPayload || (exports.LoggingOptionsPayload = {})); +var SetLoggingOptionsRequest; +(function (SetLoggingOptionsRequest) { + SetLoggingOptionsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetLoggingOptionsRequest = exports.SetLoggingOptionsRequest || (exports.SetLoggingOptionsRequest = {})); +var SetV2LoggingLevelRequest; +(function (SetV2LoggingLevelRequest) { + SetV2LoggingLevelRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetV2LoggingLevelRequest = exports.SetV2LoggingLevelRequest || (exports.SetV2LoggingLevelRequest = {})); +var SetV2LoggingOptionsRequest; +(function (SetV2LoggingOptionsRequest) { + SetV2LoggingOptionsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetV2LoggingOptionsRequest = exports.SetV2LoggingOptionsRequest || (exports.SetV2LoggingOptionsRequest = {})); +var StartAuditMitigationActionsTaskRequest; +(function (StartAuditMitigationActionsTaskRequest) { + StartAuditMitigationActionsTaskRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartAuditMitigationActionsTaskRequest = exports.StartAuditMitigationActionsTaskRequest || (exports.StartAuditMitigationActionsTaskRequest = {})); +var StartAuditMitigationActionsTaskResponse; +(function (StartAuditMitigationActionsTaskResponse) { + StartAuditMitigationActionsTaskResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartAuditMitigationActionsTaskResponse = exports.StartAuditMitigationActionsTaskResponse || (exports.StartAuditMitigationActionsTaskResponse = {})); +var TaskAlreadyExistsException; +(function (TaskAlreadyExistsException) { + TaskAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TaskAlreadyExistsException = exports.TaskAlreadyExistsException || (exports.TaskAlreadyExistsException = {})); +var StartOnDemandAuditTaskRequest; +(function (StartOnDemandAuditTaskRequest) { + StartOnDemandAuditTaskRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartOnDemandAuditTaskRequest = exports.StartOnDemandAuditTaskRequest || (exports.StartOnDemandAuditTaskRequest = {})); +var StartOnDemandAuditTaskResponse; +(function (StartOnDemandAuditTaskResponse) { + StartOnDemandAuditTaskResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartOnDemandAuditTaskResponse = exports.StartOnDemandAuditTaskResponse || (exports.StartOnDemandAuditTaskResponse = {})); +var StartThingRegistrationTaskRequest; +(function (StartThingRegistrationTaskRequest) { + StartThingRegistrationTaskRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartThingRegistrationTaskRequest = exports.StartThingRegistrationTaskRequest || (exports.StartThingRegistrationTaskRequest = {})); +var StartThingRegistrationTaskResponse; +(function (StartThingRegistrationTaskResponse) { + StartThingRegistrationTaskResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartThingRegistrationTaskResponse = exports.StartThingRegistrationTaskResponse || (exports.StartThingRegistrationTaskResponse = {})); +var StopThingRegistrationTaskRequest; +(function (StopThingRegistrationTaskRequest) { + StopThingRegistrationTaskRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StopThingRegistrationTaskRequest = exports.StopThingRegistrationTaskRequest || (exports.StopThingRegistrationTaskRequest = {})); +var StopThingRegistrationTaskResponse; +(function (StopThingRegistrationTaskResponse) { + StopThingRegistrationTaskResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StopThingRegistrationTaskResponse = exports.StopThingRegistrationTaskResponse || (exports.StopThingRegistrationTaskResponse = {})); +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 TestAuthorizationRequest; +(function (TestAuthorizationRequest) { + TestAuthorizationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TestAuthorizationRequest = exports.TestAuthorizationRequest || (exports.TestAuthorizationRequest = {})); +var TestAuthorizationResponse; +(function (TestAuthorizationResponse) { + TestAuthorizationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TestAuthorizationResponse = exports.TestAuthorizationResponse || (exports.TestAuthorizationResponse = {})); +var InvalidResponseException; +(function (InvalidResponseException) { + InvalidResponseException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidResponseException = exports.InvalidResponseException || (exports.InvalidResponseException = {})); +var HttpContext; +(function (HttpContext) { + HttpContext.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(HttpContext = exports.HttpContext || (exports.HttpContext = {})); +var MqttContext; +(function (MqttContext) { + MqttContext.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MqttContext = exports.MqttContext || (exports.MqttContext = {})); +//# sourceMappingURL=models_1.js.map + +/***/ }), + +/***/ 18560: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ValidateSecurityProfileBehaviorsRequest = exports.UpdateTopicRuleDestinationResponse = exports.UpdateTopicRuleDestinationRequest = exports.UpdateThingGroupsForThingResponse = exports.UpdateThingGroupsForThingRequest = exports.UpdateThingGroupResponse = exports.UpdateThingGroupRequest = exports.UpdateThingResponse = exports.UpdateThingRequest = exports.UpdateStreamResponse = exports.UpdateStreamRequest = exports.UpdateSecurityProfileResponse = exports.UpdateSecurityProfileRequest = exports.UpdateScheduledAuditResponse = exports.UpdateScheduledAuditRequest = exports.UpdateRoleAliasResponse = exports.UpdateRoleAliasRequest = exports.UpdateProvisioningTemplateResponse = exports.UpdateProvisioningTemplateRequest = exports.UpdateMitigationActionResponse = exports.UpdateMitigationActionRequest = exports.UpdateJobRequest = exports.UpdateIndexingConfigurationResponse = exports.UpdateIndexingConfigurationRequest = exports.UpdateEventConfigurationsResponse = exports.UpdateEventConfigurationsRequest = exports.UpdateDynamicThingGroupResponse = exports.UpdateDynamicThingGroupRequest = exports.UpdateDomainConfigurationResponse = exports.UpdateDomainConfigurationRequest = exports.UpdateDimensionResponse = exports.UpdateDimensionRequest = exports.UpdateCertificateRequest = exports.UpdateCACertificateRequest = exports.UpdateBillingGroupResponse = exports.UpdateBillingGroupRequest = exports.UpdateAuthorizerResponse = exports.UpdateAuthorizerRequest = exports.UpdateAuditSuppressionResponse = exports.UpdateAuditSuppressionRequest = exports.UpdateAccountAuditConfigurationResponse = exports.UpdateAccountAuditConfigurationRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TransferConflictException = exports.TransferCertificateResponse = exports.TransferCertificateRequest = exports.TestInvokeAuthorizerResponse = exports.TestInvokeAuthorizerRequest = exports.TlsContext = void 0; +exports.ValidateSecurityProfileBehaviorsResponse = exports.ValidationError = void 0; +var TlsContext; +(function (TlsContext) { + TlsContext.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TlsContext = exports.TlsContext || (exports.TlsContext = {})); +var TestInvokeAuthorizerRequest; +(function (TestInvokeAuthorizerRequest) { + TestInvokeAuthorizerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TestInvokeAuthorizerRequest = exports.TestInvokeAuthorizerRequest || (exports.TestInvokeAuthorizerRequest = {})); +var TestInvokeAuthorizerResponse; +(function (TestInvokeAuthorizerResponse) { + TestInvokeAuthorizerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TestInvokeAuthorizerResponse = exports.TestInvokeAuthorizerResponse || (exports.TestInvokeAuthorizerResponse = {})); +var TransferCertificateRequest; +(function (TransferCertificateRequest) { + TransferCertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TransferCertificateRequest = exports.TransferCertificateRequest || (exports.TransferCertificateRequest = {})); +var TransferCertificateResponse; +(function (TransferCertificateResponse) { + TransferCertificateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TransferCertificateResponse = exports.TransferCertificateResponse || (exports.TransferCertificateResponse = {})); +var TransferConflictException; +(function (TransferConflictException) { + TransferConflictException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TransferConflictException = exports.TransferConflictException || (exports.TransferConflictException = {})); +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 UpdateAccountAuditConfigurationRequest; +(function (UpdateAccountAuditConfigurationRequest) { + UpdateAccountAuditConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateAccountAuditConfigurationRequest = exports.UpdateAccountAuditConfigurationRequest || (exports.UpdateAccountAuditConfigurationRequest = {})); +var UpdateAccountAuditConfigurationResponse; +(function (UpdateAccountAuditConfigurationResponse) { + UpdateAccountAuditConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateAccountAuditConfigurationResponse = exports.UpdateAccountAuditConfigurationResponse || (exports.UpdateAccountAuditConfigurationResponse = {})); +var UpdateAuditSuppressionRequest; +(function (UpdateAuditSuppressionRequest) { + UpdateAuditSuppressionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateAuditSuppressionRequest = exports.UpdateAuditSuppressionRequest || (exports.UpdateAuditSuppressionRequest = {})); +var UpdateAuditSuppressionResponse; +(function (UpdateAuditSuppressionResponse) { + UpdateAuditSuppressionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateAuditSuppressionResponse = exports.UpdateAuditSuppressionResponse || (exports.UpdateAuditSuppressionResponse = {})); +var UpdateAuthorizerRequest; +(function (UpdateAuthorizerRequest) { + UpdateAuthorizerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateAuthorizerRequest = exports.UpdateAuthorizerRequest || (exports.UpdateAuthorizerRequest = {})); +var UpdateAuthorizerResponse; +(function (UpdateAuthorizerResponse) { + UpdateAuthorizerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateAuthorizerResponse = exports.UpdateAuthorizerResponse || (exports.UpdateAuthorizerResponse = {})); +var UpdateBillingGroupRequest; +(function (UpdateBillingGroupRequest) { + UpdateBillingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateBillingGroupRequest = exports.UpdateBillingGroupRequest || (exports.UpdateBillingGroupRequest = {})); +var UpdateBillingGroupResponse; +(function (UpdateBillingGroupResponse) { + UpdateBillingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateBillingGroupResponse = exports.UpdateBillingGroupResponse || (exports.UpdateBillingGroupResponse = {})); +var UpdateCACertificateRequest; +(function (UpdateCACertificateRequest) { + UpdateCACertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateCACertificateRequest = exports.UpdateCACertificateRequest || (exports.UpdateCACertificateRequest = {})); +var UpdateCertificateRequest; +(function (UpdateCertificateRequest) { + UpdateCertificateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateCertificateRequest = exports.UpdateCertificateRequest || (exports.UpdateCertificateRequest = {})); +var UpdateDimensionRequest; +(function (UpdateDimensionRequest) { + UpdateDimensionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateDimensionRequest = exports.UpdateDimensionRequest || (exports.UpdateDimensionRequest = {})); +var UpdateDimensionResponse; +(function (UpdateDimensionResponse) { + UpdateDimensionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateDimensionResponse = exports.UpdateDimensionResponse || (exports.UpdateDimensionResponse = {})); +var UpdateDomainConfigurationRequest; +(function (UpdateDomainConfigurationRequest) { + UpdateDomainConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateDomainConfigurationRequest = exports.UpdateDomainConfigurationRequest || (exports.UpdateDomainConfigurationRequest = {})); +var UpdateDomainConfigurationResponse; +(function (UpdateDomainConfigurationResponse) { + UpdateDomainConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateDomainConfigurationResponse = exports.UpdateDomainConfigurationResponse || (exports.UpdateDomainConfigurationResponse = {})); +var UpdateDynamicThingGroupRequest; +(function (UpdateDynamicThingGroupRequest) { + UpdateDynamicThingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateDynamicThingGroupRequest = exports.UpdateDynamicThingGroupRequest || (exports.UpdateDynamicThingGroupRequest = {})); +var UpdateDynamicThingGroupResponse; +(function (UpdateDynamicThingGroupResponse) { + UpdateDynamicThingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateDynamicThingGroupResponse = exports.UpdateDynamicThingGroupResponse || (exports.UpdateDynamicThingGroupResponse = {})); +var UpdateEventConfigurationsRequest; +(function (UpdateEventConfigurationsRequest) { + UpdateEventConfigurationsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateEventConfigurationsRequest = exports.UpdateEventConfigurationsRequest || (exports.UpdateEventConfigurationsRequest = {})); +var UpdateEventConfigurationsResponse; +(function (UpdateEventConfigurationsResponse) { + UpdateEventConfigurationsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateEventConfigurationsResponse = exports.UpdateEventConfigurationsResponse || (exports.UpdateEventConfigurationsResponse = {})); +var UpdateIndexingConfigurationRequest; +(function (UpdateIndexingConfigurationRequest) { + UpdateIndexingConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateIndexingConfigurationRequest = exports.UpdateIndexingConfigurationRequest || (exports.UpdateIndexingConfigurationRequest = {})); +var UpdateIndexingConfigurationResponse; +(function (UpdateIndexingConfigurationResponse) { + UpdateIndexingConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateIndexingConfigurationResponse = exports.UpdateIndexingConfigurationResponse || (exports.UpdateIndexingConfigurationResponse = {})); +var UpdateJobRequest; +(function (UpdateJobRequest) { + UpdateJobRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateJobRequest = exports.UpdateJobRequest || (exports.UpdateJobRequest = {})); +var UpdateMitigationActionRequest; +(function (UpdateMitigationActionRequest) { + UpdateMitigationActionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateMitigationActionRequest = exports.UpdateMitigationActionRequest || (exports.UpdateMitigationActionRequest = {})); +var UpdateMitigationActionResponse; +(function (UpdateMitigationActionResponse) { + UpdateMitigationActionResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateMitigationActionResponse = exports.UpdateMitigationActionResponse || (exports.UpdateMitigationActionResponse = {})); +var UpdateProvisioningTemplateRequest; +(function (UpdateProvisioningTemplateRequest) { + UpdateProvisioningTemplateRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateProvisioningTemplateRequest = exports.UpdateProvisioningTemplateRequest || (exports.UpdateProvisioningTemplateRequest = {})); +var UpdateProvisioningTemplateResponse; +(function (UpdateProvisioningTemplateResponse) { + UpdateProvisioningTemplateResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateProvisioningTemplateResponse = exports.UpdateProvisioningTemplateResponse || (exports.UpdateProvisioningTemplateResponse = {})); +var UpdateRoleAliasRequest; +(function (UpdateRoleAliasRequest) { + UpdateRoleAliasRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateRoleAliasRequest = exports.UpdateRoleAliasRequest || (exports.UpdateRoleAliasRequest = {})); +var UpdateRoleAliasResponse; +(function (UpdateRoleAliasResponse) { + UpdateRoleAliasResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateRoleAliasResponse = exports.UpdateRoleAliasResponse || (exports.UpdateRoleAliasResponse = {})); +var UpdateScheduledAuditRequest; +(function (UpdateScheduledAuditRequest) { + UpdateScheduledAuditRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateScheduledAuditRequest = exports.UpdateScheduledAuditRequest || (exports.UpdateScheduledAuditRequest = {})); +var UpdateScheduledAuditResponse; +(function (UpdateScheduledAuditResponse) { + UpdateScheduledAuditResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateScheduledAuditResponse = exports.UpdateScheduledAuditResponse || (exports.UpdateScheduledAuditResponse = {})); +var UpdateSecurityProfileRequest; +(function (UpdateSecurityProfileRequest) { + UpdateSecurityProfileRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateSecurityProfileRequest = exports.UpdateSecurityProfileRequest || (exports.UpdateSecurityProfileRequest = {})); +var UpdateSecurityProfileResponse; +(function (UpdateSecurityProfileResponse) { + UpdateSecurityProfileResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateSecurityProfileResponse = exports.UpdateSecurityProfileResponse || (exports.UpdateSecurityProfileResponse = {})); +var UpdateStreamRequest; +(function (UpdateStreamRequest) { + UpdateStreamRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateStreamRequest = exports.UpdateStreamRequest || (exports.UpdateStreamRequest = {})); +var UpdateStreamResponse; +(function (UpdateStreamResponse) { + UpdateStreamResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateStreamResponse = exports.UpdateStreamResponse || (exports.UpdateStreamResponse = {})); +var UpdateThingRequest; +(function (UpdateThingRequest) { + UpdateThingRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateThingRequest = exports.UpdateThingRequest || (exports.UpdateThingRequest = {})); +var UpdateThingResponse; +(function (UpdateThingResponse) { + UpdateThingResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateThingResponse = exports.UpdateThingResponse || (exports.UpdateThingResponse = {})); +var UpdateThingGroupRequest; +(function (UpdateThingGroupRequest) { + UpdateThingGroupRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateThingGroupRequest = exports.UpdateThingGroupRequest || (exports.UpdateThingGroupRequest = {})); +var UpdateThingGroupResponse; +(function (UpdateThingGroupResponse) { + UpdateThingGroupResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateThingGroupResponse = exports.UpdateThingGroupResponse || (exports.UpdateThingGroupResponse = {})); +var UpdateThingGroupsForThingRequest; +(function (UpdateThingGroupsForThingRequest) { + UpdateThingGroupsForThingRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateThingGroupsForThingRequest = exports.UpdateThingGroupsForThingRequest || (exports.UpdateThingGroupsForThingRequest = {})); +var UpdateThingGroupsForThingResponse; +(function (UpdateThingGroupsForThingResponse) { + UpdateThingGroupsForThingResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateThingGroupsForThingResponse = exports.UpdateThingGroupsForThingResponse || (exports.UpdateThingGroupsForThingResponse = {})); +var UpdateTopicRuleDestinationRequest; +(function (UpdateTopicRuleDestinationRequest) { + UpdateTopicRuleDestinationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateTopicRuleDestinationRequest = exports.UpdateTopicRuleDestinationRequest || (exports.UpdateTopicRuleDestinationRequest = {})); +var UpdateTopicRuleDestinationResponse; +(function (UpdateTopicRuleDestinationResponse) { + UpdateTopicRuleDestinationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UpdateTopicRuleDestinationResponse = exports.UpdateTopicRuleDestinationResponse || (exports.UpdateTopicRuleDestinationResponse = {})); +var ValidateSecurityProfileBehaviorsRequest; +(function (ValidateSecurityProfileBehaviorsRequest) { + ValidateSecurityProfileBehaviorsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ValidateSecurityProfileBehaviorsRequest = exports.ValidateSecurityProfileBehaviorsRequest || (exports.ValidateSecurityProfileBehaviorsRequest = {})); +var ValidationError; +(function (ValidationError) { + ValidationError.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ValidationError = exports.ValidationError || (exports.ValidationError = {})); +var ValidateSecurityProfileBehaviorsResponse; +(function (ValidateSecurityProfileBehaviorsResponse) { + ValidateSecurityProfileBehaviorsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ValidateSecurityProfileBehaviorsResponse = exports.ValidateSecurityProfileBehaviorsResponse || (exports.ValidateSecurityProfileBehaviorsResponse = {})); +//# sourceMappingURL=models_2.js.map + +/***/ }), + +/***/ 84794: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=Interfaces.js.map + +/***/ }), + +/***/ 68814: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListActiveViolations = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListActiveViolationsCommand_1 = __nccwpck_require__(90886); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListActiveViolationsCommand_1.ListActiveViolationsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listActiveViolations(input, ...args); +}; +async function* paginateListActiveViolations(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListActiveViolations = paginateListActiveViolations; +//# sourceMappingURL=ListActiveViolationsPaginator.js.map + +/***/ }), + +/***/ 58222: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListAttachedPolicies = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListAttachedPoliciesCommand_1 = __nccwpck_require__(59388); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListAttachedPoliciesCommand_1.ListAttachedPoliciesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listAttachedPolicies(input, ...args); +}; +async function* paginateListAttachedPolicies(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListAttachedPolicies = paginateListAttachedPolicies; +//# sourceMappingURL=ListAttachedPoliciesPaginator.js.map + +/***/ }), + +/***/ 58370: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListAuditFindings = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListAuditFindingsCommand_1 = __nccwpck_require__(55133); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListAuditFindingsCommand_1.ListAuditFindingsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listAuditFindings(input, ...args); +}; +async function* paginateListAuditFindings(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListAuditFindings = paginateListAuditFindings; +//# sourceMappingURL=ListAuditFindingsPaginator.js.map + +/***/ }), + +/***/ 92447: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListAuditMitigationActionsExecutions = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListAuditMitigationActionsExecutionsCommand_1 = __nccwpck_require__(35836); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListAuditMitigationActionsExecutionsCommand_1.ListAuditMitigationActionsExecutionsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listAuditMitigationActionsExecutions(input, ...args); +}; +async function* paginateListAuditMitigationActionsExecutions(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListAuditMitigationActionsExecutions = paginateListAuditMitigationActionsExecutions; +//# sourceMappingURL=ListAuditMitigationActionsExecutionsPaginator.js.map + +/***/ }), + +/***/ 67042: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListAuditMitigationActionsTasks = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListAuditMitigationActionsTasksCommand_1 = __nccwpck_require__(45704); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListAuditMitigationActionsTasksCommand_1.ListAuditMitigationActionsTasksCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listAuditMitigationActionsTasks(input, ...args); +}; +async function* paginateListAuditMitigationActionsTasks(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListAuditMitigationActionsTasks = paginateListAuditMitigationActionsTasks; +//# sourceMappingURL=ListAuditMitigationActionsTasksPaginator.js.map + +/***/ }), + +/***/ 69192: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListAuditSuppressions = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListAuditSuppressionsCommand_1 = __nccwpck_require__(60827); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListAuditSuppressionsCommand_1.ListAuditSuppressionsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listAuditSuppressions(input, ...args); +}; +async function* paginateListAuditSuppressions(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListAuditSuppressions = paginateListAuditSuppressions; +//# sourceMappingURL=ListAuditSuppressionsPaginator.js.map + +/***/ }), + +/***/ 27418: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListAuditTasks = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListAuditTasksCommand_1 = __nccwpck_require__(50108); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListAuditTasksCommand_1.ListAuditTasksCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listAuditTasks(input, ...args); +}; +async function* paginateListAuditTasks(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListAuditTasks = paginateListAuditTasks; +//# sourceMappingURL=ListAuditTasksPaginator.js.map + +/***/ }), + +/***/ 92292: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListAuthorizers = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListAuthorizersCommand_1 = __nccwpck_require__(99389); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListAuthorizersCommand_1.ListAuthorizersCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listAuthorizers(input, ...args); +}; +async function* paginateListAuthorizers(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListAuthorizers = paginateListAuthorizers; +//# sourceMappingURL=ListAuthorizersPaginator.js.map + +/***/ }), + +/***/ 18259: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListBillingGroups = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListBillingGroupsCommand_1 = __nccwpck_require__(13648); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListBillingGroupsCommand_1.ListBillingGroupsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listBillingGroups(input, ...args); +}; +async function* paginateListBillingGroups(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListBillingGroups = paginateListBillingGroups; +//# sourceMappingURL=ListBillingGroupsPaginator.js.map + +/***/ }), + +/***/ 68779: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListCACertificates = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListCACertificatesCommand_1 = __nccwpck_require__(77650); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListCACertificatesCommand_1.ListCACertificatesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listCACertificates(input, ...args); +}; +async function* paginateListCACertificates(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListCACertificates = paginateListCACertificates; +//# sourceMappingURL=ListCACertificatesPaginator.js.map + +/***/ }), + +/***/ 14659: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListCertificatesByCA = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListCertificatesByCACommand_1 = __nccwpck_require__(23163); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListCertificatesByCACommand_1.ListCertificatesByCACommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listCertificatesByCA(input, ...args); +}; +async function* paginateListCertificatesByCA(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListCertificatesByCA = paginateListCertificatesByCA; +//# sourceMappingURL=ListCertificatesByCAPaginator.js.map + +/***/ }), + +/***/ 6910: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListCertificates = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListCertificatesCommand_1 = __nccwpck_require__(14749); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListCertificatesCommand_1.ListCertificatesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listCertificates(input, ...args); +}; +async function* paginateListCertificates(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListCertificates = paginateListCertificates; +//# sourceMappingURL=ListCertificatesPaginator.js.map + +/***/ }), + +/***/ 9723: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListDimensions = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListDimensionsCommand_1 = __nccwpck_require__(74775); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListDimensionsCommand_1.ListDimensionsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listDimensions(input, ...args); +}; +async function* paginateListDimensions(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListDimensions = paginateListDimensions; +//# sourceMappingURL=ListDimensionsPaginator.js.map + +/***/ }), + +/***/ 138: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListDomainConfigurations = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListDomainConfigurationsCommand_1 = __nccwpck_require__(75947); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListDomainConfigurationsCommand_1.ListDomainConfigurationsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listDomainConfigurations(input, ...args); +}; +async function* paginateListDomainConfigurations(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListDomainConfigurations = paginateListDomainConfigurations; +//# sourceMappingURL=ListDomainConfigurationsPaginator.js.map + +/***/ }), + +/***/ 5668: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListIndices = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListIndicesCommand_1 = __nccwpck_require__(36240); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListIndicesCommand_1.ListIndicesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listIndices(input, ...args); +}; +async function* paginateListIndices(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListIndices = paginateListIndices; +//# sourceMappingURL=ListIndicesPaginator.js.map + +/***/ }), + +/***/ 74053: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListJobExecutionsForJob = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListJobExecutionsForJobCommand_1 = __nccwpck_require__(68068); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListJobExecutionsForJobCommand_1.ListJobExecutionsForJobCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listJobExecutionsForJob(input, ...args); +}; +async function* paginateListJobExecutionsForJob(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListJobExecutionsForJob = paginateListJobExecutionsForJob; +//# sourceMappingURL=ListJobExecutionsForJobPaginator.js.map + +/***/ }), + +/***/ 21477: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListJobExecutionsForThing = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListJobExecutionsForThingCommand_1 = __nccwpck_require__(20874); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListJobExecutionsForThingCommand_1.ListJobExecutionsForThingCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listJobExecutionsForThing(input, ...args); +}; +async function* paginateListJobExecutionsForThing(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListJobExecutionsForThing = paginateListJobExecutionsForThing; +//# sourceMappingURL=ListJobExecutionsForThingPaginator.js.map + +/***/ }), + +/***/ 7859: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListJobs = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListJobsCommand_1 = __nccwpck_require__(25341); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListJobsCommand_1.ListJobsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listJobs(input, ...args); +}; +async function* paginateListJobs(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListJobs = paginateListJobs; +//# sourceMappingURL=ListJobsPaginator.js.map + +/***/ }), + +/***/ 57331: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListMitigationActions = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListMitigationActionsCommand_1 = __nccwpck_require__(93159); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListMitigationActionsCommand_1.ListMitigationActionsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listMitigationActions(input, ...args); +}; +async function* paginateListMitigationActions(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListMitigationActions = paginateListMitigationActions; +//# sourceMappingURL=ListMitigationActionsPaginator.js.map + +/***/ }), + +/***/ 41916: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListOTAUpdates = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListOTAUpdatesCommand_1 = __nccwpck_require__(76188); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListOTAUpdatesCommand_1.ListOTAUpdatesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listOTAUpdates(input, ...args); +}; +async function* paginateListOTAUpdates(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListOTAUpdates = paginateListOTAUpdates; +//# sourceMappingURL=ListOTAUpdatesPaginator.js.map + +/***/ }), + +/***/ 92342: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListOutgoingCertificates = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListOutgoingCertificatesCommand_1 = __nccwpck_require__(90321); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListOutgoingCertificatesCommand_1.ListOutgoingCertificatesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listOutgoingCertificates(input, ...args); +}; +async function* paginateListOutgoingCertificates(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListOutgoingCertificates = paginateListOutgoingCertificates; +//# sourceMappingURL=ListOutgoingCertificatesPaginator.js.map + +/***/ }), + +/***/ 37844: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListPolicies = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListPoliciesCommand_1 = __nccwpck_require__(81192); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListPoliciesCommand_1.ListPoliciesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listPolicies(input, ...args); +}; +async function* paginateListPolicies(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListPolicies = paginateListPolicies; +//# sourceMappingURL=ListPoliciesPaginator.js.map + +/***/ }), + +/***/ 57302: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListPolicyPrincipals = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListPolicyPrincipalsCommand_1 = __nccwpck_require__(86657); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListPolicyPrincipalsCommand_1.ListPolicyPrincipalsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listPolicyPrincipals(input, ...args); +}; +async function* paginateListPolicyPrincipals(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListPolicyPrincipals = paginateListPolicyPrincipals; +//# sourceMappingURL=ListPolicyPrincipalsPaginator.js.map + +/***/ }), + +/***/ 42167: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListPrincipalPolicies = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListPrincipalPoliciesCommand_1 = __nccwpck_require__(3702); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListPrincipalPoliciesCommand_1.ListPrincipalPoliciesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listPrincipalPolicies(input, ...args); +}; +async function* paginateListPrincipalPolicies(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListPrincipalPolicies = paginateListPrincipalPolicies; +//# sourceMappingURL=ListPrincipalPoliciesPaginator.js.map + +/***/ }), + +/***/ 24220: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListPrincipalThings = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListPrincipalThingsCommand_1 = __nccwpck_require__(62558); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListPrincipalThingsCommand_1.ListPrincipalThingsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listPrincipalThings(input, ...args); +}; +async function* paginateListPrincipalThings(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListPrincipalThings = paginateListPrincipalThings; +//# sourceMappingURL=ListPrincipalThingsPaginator.js.map + +/***/ }), + +/***/ 54754: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListProvisioningTemplateVersions = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListProvisioningTemplateVersionsCommand_1 = __nccwpck_require__(48529); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListProvisioningTemplateVersionsCommand_1.ListProvisioningTemplateVersionsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listProvisioningTemplateVersions(input, ...args); +}; +async function* paginateListProvisioningTemplateVersions(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListProvisioningTemplateVersions = paginateListProvisioningTemplateVersions; +//# sourceMappingURL=ListProvisioningTemplateVersionsPaginator.js.map + +/***/ }), + +/***/ 14156: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListProvisioningTemplates = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListProvisioningTemplatesCommand_1 = __nccwpck_require__(59524); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListProvisioningTemplatesCommand_1.ListProvisioningTemplatesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listProvisioningTemplates(input, ...args); +}; +async function* paginateListProvisioningTemplates(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListProvisioningTemplates = paginateListProvisioningTemplates; +//# sourceMappingURL=ListProvisioningTemplatesPaginator.js.map + +/***/ }), + +/***/ 9058: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListRoleAliases = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListRoleAliasesCommand_1 = __nccwpck_require__(31543); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListRoleAliasesCommand_1.ListRoleAliasesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listRoleAliases(input, ...args); +}; +async function* paginateListRoleAliases(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListRoleAliases = paginateListRoleAliases; +//# sourceMappingURL=ListRoleAliasesPaginator.js.map + +/***/ }), + +/***/ 47065: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListScheduledAudits = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListScheduledAuditsCommand_1 = __nccwpck_require__(79905); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListScheduledAuditsCommand_1.ListScheduledAuditsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listScheduledAudits(input, ...args); +}; +async function* paginateListScheduledAudits(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListScheduledAudits = paginateListScheduledAudits; +//# sourceMappingURL=ListScheduledAuditsPaginator.js.map + +/***/ }), + +/***/ 99728: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListSecurityProfilesForTarget = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListSecurityProfilesForTargetCommand_1 = __nccwpck_require__(26323); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListSecurityProfilesForTargetCommand_1.ListSecurityProfilesForTargetCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listSecurityProfilesForTarget(input, ...args); +}; +async function* paginateListSecurityProfilesForTarget(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListSecurityProfilesForTarget = paginateListSecurityProfilesForTarget; +//# sourceMappingURL=ListSecurityProfilesForTargetPaginator.js.map + +/***/ }), + +/***/ 70383: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListSecurityProfiles = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListSecurityProfilesCommand_1 = __nccwpck_require__(17473); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListSecurityProfilesCommand_1.ListSecurityProfilesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listSecurityProfiles(input, ...args); +}; +async function* paginateListSecurityProfiles(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListSecurityProfiles = paginateListSecurityProfiles; +//# sourceMappingURL=ListSecurityProfilesPaginator.js.map + +/***/ }), + +/***/ 53265: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListStreams = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListStreamsCommand_1 = __nccwpck_require__(76326); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListStreamsCommand_1.ListStreamsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listStreams(input, ...args); +}; +async function* paginateListStreams(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListStreams = paginateListStreams; +//# sourceMappingURL=ListStreamsPaginator.js.map + +/***/ }), + +/***/ 35733: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListTagsForResource = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListTagsForResourceCommand_1 = __nccwpck_require__(87749); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListTagsForResourceCommand_1.ListTagsForResourceCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listTagsForResource(input, ...args); +}; +async function* paginateListTagsForResource(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListTagsForResource = paginateListTagsForResource; +//# sourceMappingURL=ListTagsForResourcePaginator.js.map + +/***/ }), + +/***/ 12956: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListTargetsForPolicy = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListTargetsForPolicyCommand_1 = __nccwpck_require__(71438); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListTargetsForPolicyCommand_1.ListTargetsForPolicyCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listTargetsForPolicy(input, ...args); +}; +async function* paginateListTargetsForPolicy(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.marker + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.marker = token; + input["pageSize"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextMarker; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListTargetsForPolicy = paginateListTargetsForPolicy; +//# sourceMappingURL=ListTargetsForPolicyPaginator.js.map + +/***/ }), + +/***/ 95814: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListTargetsForSecurityProfile = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListTargetsForSecurityProfileCommand_1 = __nccwpck_require__(47470); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListTargetsForSecurityProfileCommand_1.ListTargetsForSecurityProfileCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listTargetsForSecurityProfile(input, ...args); +}; +async function* paginateListTargetsForSecurityProfile(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListTargetsForSecurityProfile = paginateListTargetsForSecurityProfile; +//# sourceMappingURL=ListTargetsForSecurityProfilePaginator.js.map + +/***/ }), + +/***/ 30363: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListThingGroupsForThing = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListThingGroupsForThingCommand_1 = __nccwpck_require__(532); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListThingGroupsForThingCommand_1.ListThingGroupsForThingCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listThingGroupsForThing(input, ...args); +}; +async function* paginateListThingGroupsForThing(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListThingGroupsForThing = paginateListThingGroupsForThing; +//# sourceMappingURL=ListThingGroupsForThingPaginator.js.map + +/***/ }), + +/***/ 95068: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListThingGroups = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListThingGroupsCommand_1 = __nccwpck_require__(59885); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListThingGroupsCommand_1.ListThingGroupsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listThingGroups(input, ...args); +}; +async function* paginateListThingGroups(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListThingGroups = paginateListThingGroups; +//# sourceMappingURL=ListThingGroupsPaginator.js.map + +/***/ }), + +/***/ 3030: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListThingPrincipals = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListThingPrincipalsCommand_1 = __nccwpck_require__(18466); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListThingPrincipalsCommand_1.ListThingPrincipalsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listThingPrincipals(input, ...args); +}; +async function* paginateListThingPrincipals(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListThingPrincipals = paginateListThingPrincipals; +//# sourceMappingURL=ListThingPrincipalsPaginator.js.map + +/***/ }), + +/***/ 26240: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListThingRegistrationTaskReports = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListThingRegistrationTaskReportsCommand_1 = __nccwpck_require__(31905); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListThingRegistrationTaskReportsCommand_1.ListThingRegistrationTaskReportsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listThingRegistrationTaskReports(input, ...args); +}; +async function* paginateListThingRegistrationTaskReports(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListThingRegistrationTaskReports = paginateListThingRegistrationTaskReports; +//# sourceMappingURL=ListThingRegistrationTaskReportsPaginator.js.map + +/***/ }), + +/***/ 92400: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListThingRegistrationTasks = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListThingRegistrationTasksCommand_1 = __nccwpck_require__(74999); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListThingRegistrationTasksCommand_1.ListThingRegistrationTasksCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listThingRegistrationTasks(input, ...args); +}; +async function* paginateListThingRegistrationTasks(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListThingRegistrationTasks = paginateListThingRegistrationTasks; +//# sourceMappingURL=ListThingRegistrationTasksPaginator.js.map + +/***/ }), + +/***/ 38172: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListThingTypes = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListThingTypesCommand_1 = __nccwpck_require__(28092); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListThingTypesCommand_1.ListThingTypesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listThingTypes(input, ...args); +}; +async function* paginateListThingTypes(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListThingTypes = paginateListThingTypes; +//# sourceMappingURL=ListThingTypesPaginator.js.map + +/***/ }), + +/***/ 70873: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListThingsInBillingGroup = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListThingsInBillingGroupCommand_1 = __nccwpck_require__(51357); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListThingsInBillingGroupCommand_1.ListThingsInBillingGroupCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listThingsInBillingGroup(input, ...args); +}; +async function* paginateListThingsInBillingGroup(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListThingsInBillingGroup = paginateListThingsInBillingGroup; +//# sourceMappingURL=ListThingsInBillingGroupPaginator.js.map + +/***/ }), + +/***/ 90446: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListThingsInThingGroup = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListThingsInThingGroupCommand_1 = __nccwpck_require__(33672); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListThingsInThingGroupCommand_1.ListThingsInThingGroupCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listThingsInThingGroup(input, ...args); +}; +async function* paginateListThingsInThingGroup(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListThingsInThingGroup = paginateListThingsInThingGroup; +//# sourceMappingURL=ListThingsInThingGroupPaginator.js.map + +/***/ }), + +/***/ 36161: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListThings = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListThingsCommand_1 = __nccwpck_require__(1243); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListThingsCommand_1.ListThingsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listThings(input, ...args); +}; +async function* paginateListThings(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListThings = paginateListThings; +//# sourceMappingURL=ListThingsPaginator.js.map + +/***/ }), + +/***/ 90598: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListTopicRuleDestinations = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListTopicRuleDestinationsCommand_1 = __nccwpck_require__(29621); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListTopicRuleDestinationsCommand_1.ListTopicRuleDestinationsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listTopicRuleDestinations(input, ...args); +}; +async function* paginateListTopicRuleDestinations(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListTopicRuleDestinations = paginateListTopicRuleDestinations; +//# sourceMappingURL=ListTopicRuleDestinationsPaginator.js.map + +/***/ }), + +/***/ 21749: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListTopicRules = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListTopicRulesCommand_1 = __nccwpck_require__(2823); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListTopicRulesCommand_1.ListTopicRulesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listTopicRules(input, ...args); +}; +async function* paginateListTopicRules(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListTopicRules = paginateListTopicRules; +//# sourceMappingURL=ListTopicRulesPaginator.js.map + +/***/ }), + +/***/ 56717: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListV2LoggingLevels = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListV2LoggingLevelsCommand_1 = __nccwpck_require__(47492); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListV2LoggingLevelsCommand_1.ListV2LoggingLevelsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listV2LoggingLevels(input, ...args); +}; +async function* paginateListV2LoggingLevels(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListV2LoggingLevels = paginateListV2LoggingLevels; +//# sourceMappingURL=ListV2LoggingLevelsPaginator.js.map + +/***/ }), + +/***/ 72581: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListViolationEvents = void 0; +const IoT_1 = __nccwpck_require__(37811); +const IoTClient_1 = __nccwpck_require__(31450); +const ListViolationEventsCommand_1 = __nccwpck_require__(77560); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListViolationEventsCommand_1.ListViolationEventsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listViolationEvents(input, ...args); +}; +async function* paginateListViolationEvents(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.nextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof IoT_1.IoT) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof IoTClient_1.IoTClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected IoT | IoTClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListViolationEvents = paginateListViolationEvents; +//# sourceMappingURL=ListViolationEventsPaginator.js.map + +/***/ }), + +/***/ 66639: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.serializeAws_restJson1DeleteJobCommand = exports.serializeAws_restJson1DeleteDynamicThingGroupCommand = exports.serializeAws_restJson1DeleteDomainConfigurationCommand = exports.serializeAws_restJson1DeleteDimensionCommand = exports.serializeAws_restJson1DeleteCertificateCommand = exports.serializeAws_restJson1DeleteCACertificateCommand = exports.serializeAws_restJson1DeleteBillingGroupCommand = exports.serializeAws_restJson1DeleteAuthorizerCommand = exports.serializeAws_restJson1DeleteAuditSuppressionCommand = exports.serializeAws_restJson1DeleteAccountAuditConfigurationCommand = exports.serializeAws_restJson1CreateTopicRuleDestinationCommand = exports.serializeAws_restJson1CreateTopicRuleCommand = exports.serializeAws_restJson1CreateThingTypeCommand = exports.serializeAws_restJson1CreateThingGroupCommand = exports.serializeAws_restJson1CreateThingCommand = exports.serializeAws_restJson1CreateStreamCommand = exports.serializeAws_restJson1CreateSecurityProfileCommand = exports.serializeAws_restJson1CreateScheduledAuditCommand = exports.serializeAws_restJson1CreateRoleAliasCommand = exports.serializeAws_restJson1CreateProvisioningTemplateVersionCommand = exports.serializeAws_restJson1CreateProvisioningTemplateCommand = exports.serializeAws_restJson1CreateProvisioningClaimCommand = exports.serializeAws_restJson1CreatePolicyVersionCommand = exports.serializeAws_restJson1CreatePolicyCommand = exports.serializeAws_restJson1CreateOTAUpdateCommand = exports.serializeAws_restJson1CreateMitigationActionCommand = exports.serializeAws_restJson1CreateKeysAndCertificateCommand = exports.serializeAws_restJson1CreateJobCommand = exports.serializeAws_restJson1CreateDynamicThingGroupCommand = exports.serializeAws_restJson1CreateDomainConfigurationCommand = exports.serializeAws_restJson1CreateDimensionCommand = exports.serializeAws_restJson1CreateCertificateFromCsrCommand = exports.serializeAws_restJson1CreateBillingGroupCommand = exports.serializeAws_restJson1CreateAuthorizerCommand = exports.serializeAws_restJson1CreateAuditSuppressionCommand = exports.serializeAws_restJson1ConfirmTopicRuleDestinationCommand = exports.serializeAws_restJson1ClearDefaultAuthorizerCommand = exports.serializeAws_restJson1CancelJobExecutionCommand = exports.serializeAws_restJson1CancelJobCommand = exports.serializeAws_restJson1CancelCertificateTransferCommand = exports.serializeAws_restJson1CancelAuditTaskCommand = exports.serializeAws_restJson1CancelAuditMitigationActionsTaskCommand = exports.serializeAws_restJson1AttachThingPrincipalCommand = exports.serializeAws_restJson1AttachSecurityProfileCommand = exports.serializeAws_restJson1AttachPrincipalPolicyCommand = exports.serializeAws_restJson1AttachPolicyCommand = exports.serializeAws_restJson1AssociateTargetsWithJobCommand = exports.serializeAws_restJson1AddThingToThingGroupCommand = exports.serializeAws_restJson1AddThingToBillingGroupCommand = exports.serializeAws_restJson1AcceptCertificateTransferCommand = void 0; +exports.serializeAws_restJson1DetachSecurityProfileCommand = exports.serializeAws_restJson1DetachPrincipalPolicyCommand = exports.serializeAws_restJson1DetachPolicyCommand = exports.serializeAws_restJson1DescribeThingTypeCommand = exports.serializeAws_restJson1DescribeThingRegistrationTaskCommand = exports.serializeAws_restJson1DescribeThingGroupCommand = exports.serializeAws_restJson1DescribeThingCommand = exports.serializeAws_restJson1DescribeStreamCommand = exports.serializeAws_restJson1DescribeSecurityProfileCommand = exports.serializeAws_restJson1DescribeScheduledAuditCommand = exports.serializeAws_restJson1DescribeRoleAliasCommand = exports.serializeAws_restJson1DescribeProvisioningTemplateVersionCommand = exports.serializeAws_restJson1DescribeProvisioningTemplateCommand = exports.serializeAws_restJson1DescribeMitigationActionCommand = exports.serializeAws_restJson1DescribeJobExecutionCommand = exports.serializeAws_restJson1DescribeJobCommand = exports.serializeAws_restJson1DescribeIndexCommand = exports.serializeAws_restJson1DescribeEventConfigurationsCommand = exports.serializeAws_restJson1DescribeEndpointCommand = exports.serializeAws_restJson1DescribeDomainConfigurationCommand = exports.serializeAws_restJson1DescribeDimensionCommand = exports.serializeAws_restJson1DescribeDefaultAuthorizerCommand = exports.serializeAws_restJson1DescribeCertificateCommand = exports.serializeAws_restJson1DescribeCACertificateCommand = exports.serializeAws_restJson1DescribeBillingGroupCommand = exports.serializeAws_restJson1DescribeAuthorizerCommand = exports.serializeAws_restJson1DescribeAuditTaskCommand = exports.serializeAws_restJson1DescribeAuditSuppressionCommand = exports.serializeAws_restJson1DescribeAuditMitigationActionsTaskCommand = exports.serializeAws_restJson1DescribeAuditFindingCommand = exports.serializeAws_restJson1DescribeAccountAuditConfigurationCommand = exports.serializeAws_restJson1DeprecateThingTypeCommand = exports.serializeAws_restJson1DeleteV2LoggingLevelCommand = exports.serializeAws_restJson1DeleteTopicRuleDestinationCommand = exports.serializeAws_restJson1DeleteTopicRuleCommand = exports.serializeAws_restJson1DeleteThingTypeCommand = exports.serializeAws_restJson1DeleteThingGroupCommand = exports.serializeAws_restJson1DeleteThingCommand = exports.serializeAws_restJson1DeleteStreamCommand = exports.serializeAws_restJson1DeleteSecurityProfileCommand = exports.serializeAws_restJson1DeleteScheduledAuditCommand = exports.serializeAws_restJson1DeleteRoleAliasCommand = exports.serializeAws_restJson1DeleteRegistrationCodeCommand = exports.serializeAws_restJson1DeleteProvisioningTemplateVersionCommand = exports.serializeAws_restJson1DeleteProvisioningTemplateCommand = exports.serializeAws_restJson1DeletePolicyVersionCommand = exports.serializeAws_restJson1DeletePolicyCommand = exports.serializeAws_restJson1DeleteOTAUpdateCommand = exports.serializeAws_restJson1DeleteMitigationActionCommand = exports.serializeAws_restJson1DeleteJobExecutionCommand = void 0; +exports.serializeAws_restJson1ListStreamsCommand = exports.serializeAws_restJson1ListSecurityProfilesForTargetCommand = exports.serializeAws_restJson1ListSecurityProfilesCommand = exports.serializeAws_restJson1ListScheduledAuditsCommand = exports.serializeAws_restJson1ListRoleAliasesCommand = exports.serializeAws_restJson1ListProvisioningTemplateVersionsCommand = exports.serializeAws_restJson1ListProvisioningTemplatesCommand = exports.serializeAws_restJson1ListPrincipalThingsCommand = exports.serializeAws_restJson1ListPrincipalPoliciesCommand = exports.serializeAws_restJson1ListPolicyVersionsCommand = exports.serializeAws_restJson1ListPolicyPrincipalsCommand = exports.serializeAws_restJson1ListPoliciesCommand = exports.serializeAws_restJson1ListOutgoingCertificatesCommand = exports.serializeAws_restJson1ListOTAUpdatesCommand = exports.serializeAws_restJson1ListMitigationActionsCommand = exports.serializeAws_restJson1ListJobsCommand = exports.serializeAws_restJson1ListJobExecutionsForThingCommand = exports.serializeAws_restJson1ListJobExecutionsForJobCommand = exports.serializeAws_restJson1ListIndicesCommand = exports.serializeAws_restJson1ListDomainConfigurationsCommand = exports.serializeAws_restJson1ListDimensionsCommand = exports.serializeAws_restJson1ListCertificatesByCACommand = exports.serializeAws_restJson1ListCertificatesCommand = exports.serializeAws_restJson1ListCACertificatesCommand = exports.serializeAws_restJson1ListBillingGroupsCommand = exports.serializeAws_restJson1ListAuthorizersCommand = exports.serializeAws_restJson1ListAuditTasksCommand = exports.serializeAws_restJson1ListAuditSuppressionsCommand = exports.serializeAws_restJson1ListAuditMitigationActionsTasksCommand = exports.serializeAws_restJson1ListAuditMitigationActionsExecutionsCommand = exports.serializeAws_restJson1ListAuditFindingsCommand = exports.serializeAws_restJson1ListAttachedPoliciesCommand = exports.serializeAws_restJson1ListActiveViolationsCommand = exports.serializeAws_restJson1GetV2LoggingOptionsCommand = exports.serializeAws_restJson1GetTopicRuleDestinationCommand = exports.serializeAws_restJson1GetTopicRuleCommand = exports.serializeAws_restJson1GetStatisticsCommand = exports.serializeAws_restJson1GetRegistrationCodeCommand = exports.serializeAws_restJson1GetPolicyVersionCommand = exports.serializeAws_restJson1GetPolicyCommand = exports.serializeAws_restJson1GetPercentilesCommand = exports.serializeAws_restJson1GetOTAUpdateCommand = exports.serializeAws_restJson1GetLoggingOptionsCommand = exports.serializeAws_restJson1GetJobDocumentCommand = exports.serializeAws_restJson1GetIndexingConfigurationCommand = exports.serializeAws_restJson1GetEffectivePoliciesCommand = exports.serializeAws_restJson1GetCardinalityCommand = exports.serializeAws_restJson1EnableTopicRuleCommand = exports.serializeAws_restJson1DisableTopicRuleCommand = exports.serializeAws_restJson1DetachThingPrincipalCommand = void 0; +exports.serializeAws_restJson1UpdateIndexingConfigurationCommand = exports.serializeAws_restJson1UpdateEventConfigurationsCommand = exports.serializeAws_restJson1UpdateDynamicThingGroupCommand = exports.serializeAws_restJson1UpdateDomainConfigurationCommand = exports.serializeAws_restJson1UpdateDimensionCommand = exports.serializeAws_restJson1UpdateCertificateCommand = exports.serializeAws_restJson1UpdateCACertificateCommand = exports.serializeAws_restJson1UpdateBillingGroupCommand = exports.serializeAws_restJson1UpdateAuthorizerCommand = exports.serializeAws_restJson1UpdateAuditSuppressionCommand = exports.serializeAws_restJson1UpdateAccountAuditConfigurationCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TransferCertificateCommand = exports.serializeAws_restJson1TestInvokeAuthorizerCommand = exports.serializeAws_restJson1TestAuthorizationCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopThingRegistrationTaskCommand = exports.serializeAws_restJson1StartThingRegistrationTaskCommand = exports.serializeAws_restJson1StartOnDemandAuditTaskCommand = exports.serializeAws_restJson1StartAuditMitigationActionsTaskCommand = exports.serializeAws_restJson1SetV2LoggingOptionsCommand = exports.serializeAws_restJson1SetV2LoggingLevelCommand = exports.serializeAws_restJson1SetLoggingOptionsCommand = exports.serializeAws_restJson1SetDefaultPolicyVersionCommand = exports.serializeAws_restJson1SetDefaultAuthorizerCommand = exports.serializeAws_restJson1SearchIndexCommand = exports.serializeAws_restJson1ReplaceTopicRuleCommand = exports.serializeAws_restJson1RemoveThingFromThingGroupCommand = exports.serializeAws_restJson1RemoveThingFromBillingGroupCommand = exports.serializeAws_restJson1RejectCertificateTransferCommand = exports.serializeAws_restJson1RegisterThingCommand = exports.serializeAws_restJson1RegisterCertificateWithoutCACommand = exports.serializeAws_restJson1RegisterCertificateCommand = exports.serializeAws_restJson1RegisterCACertificateCommand = exports.serializeAws_restJson1ListViolationEventsCommand = exports.serializeAws_restJson1ListV2LoggingLevelsCommand = exports.serializeAws_restJson1ListTopicRulesCommand = exports.serializeAws_restJson1ListTopicRuleDestinationsCommand = exports.serializeAws_restJson1ListThingTypesCommand = exports.serializeAws_restJson1ListThingsInThingGroupCommand = exports.serializeAws_restJson1ListThingsInBillingGroupCommand = exports.serializeAws_restJson1ListThingsCommand = exports.serializeAws_restJson1ListThingRegistrationTasksCommand = exports.serializeAws_restJson1ListThingRegistrationTaskReportsCommand = exports.serializeAws_restJson1ListThingPrincipalsCommand = exports.serializeAws_restJson1ListThingGroupsForThingCommand = exports.serializeAws_restJson1ListThingGroupsCommand = exports.serializeAws_restJson1ListTargetsForSecurityProfileCommand = exports.serializeAws_restJson1ListTargetsForPolicyCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = void 0; +exports.deserializeAws_restJson1CreateThingTypeCommand = exports.deserializeAws_restJson1CreateThingGroupCommand = exports.deserializeAws_restJson1CreateThingCommand = exports.deserializeAws_restJson1CreateStreamCommand = exports.deserializeAws_restJson1CreateSecurityProfileCommand = exports.deserializeAws_restJson1CreateScheduledAuditCommand = exports.deserializeAws_restJson1CreateRoleAliasCommand = exports.deserializeAws_restJson1CreateProvisioningTemplateVersionCommand = exports.deserializeAws_restJson1CreateProvisioningTemplateCommand = exports.deserializeAws_restJson1CreateProvisioningClaimCommand = exports.deserializeAws_restJson1CreatePolicyVersionCommand = exports.deserializeAws_restJson1CreatePolicyCommand = exports.deserializeAws_restJson1CreateOTAUpdateCommand = exports.deserializeAws_restJson1CreateMitigationActionCommand = exports.deserializeAws_restJson1CreateKeysAndCertificateCommand = exports.deserializeAws_restJson1CreateJobCommand = exports.deserializeAws_restJson1CreateDynamicThingGroupCommand = exports.deserializeAws_restJson1CreateDomainConfigurationCommand = exports.deserializeAws_restJson1CreateDimensionCommand = exports.deserializeAws_restJson1CreateCertificateFromCsrCommand = exports.deserializeAws_restJson1CreateBillingGroupCommand = exports.deserializeAws_restJson1CreateAuthorizerCommand = exports.deserializeAws_restJson1CreateAuditSuppressionCommand = exports.deserializeAws_restJson1ConfirmTopicRuleDestinationCommand = exports.deserializeAws_restJson1ClearDefaultAuthorizerCommand = exports.deserializeAws_restJson1CancelJobExecutionCommand = exports.deserializeAws_restJson1CancelJobCommand = exports.deserializeAws_restJson1CancelCertificateTransferCommand = exports.deserializeAws_restJson1CancelAuditTaskCommand = exports.deserializeAws_restJson1CancelAuditMitigationActionsTaskCommand = exports.deserializeAws_restJson1AttachThingPrincipalCommand = exports.deserializeAws_restJson1AttachSecurityProfileCommand = exports.deserializeAws_restJson1AttachPrincipalPolicyCommand = exports.deserializeAws_restJson1AttachPolicyCommand = exports.deserializeAws_restJson1AssociateTargetsWithJobCommand = exports.deserializeAws_restJson1AddThingToThingGroupCommand = exports.deserializeAws_restJson1AddThingToBillingGroupCommand = exports.deserializeAws_restJson1AcceptCertificateTransferCommand = exports.serializeAws_restJson1ValidateSecurityProfileBehaviorsCommand = exports.serializeAws_restJson1UpdateTopicRuleDestinationCommand = exports.serializeAws_restJson1UpdateThingGroupsForThingCommand = exports.serializeAws_restJson1UpdateThingGroupCommand = exports.serializeAws_restJson1UpdateThingCommand = exports.serializeAws_restJson1UpdateStreamCommand = exports.serializeAws_restJson1UpdateSecurityProfileCommand = exports.serializeAws_restJson1UpdateScheduledAuditCommand = exports.serializeAws_restJson1UpdateRoleAliasCommand = exports.serializeAws_restJson1UpdateProvisioningTemplateCommand = exports.serializeAws_restJson1UpdateMitigationActionCommand = exports.serializeAws_restJson1UpdateJobCommand = void 0; +exports.deserializeAws_restJson1DescribeProvisioningTemplateCommand = exports.deserializeAws_restJson1DescribeMitigationActionCommand = exports.deserializeAws_restJson1DescribeJobExecutionCommand = exports.deserializeAws_restJson1DescribeJobCommand = exports.deserializeAws_restJson1DescribeIndexCommand = exports.deserializeAws_restJson1DescribeEventConfigurationsCommand = exports.deserializeAws_restJson1DescribeEndpointCommand = exports.deserializeAws_restJson1DescribeDomainConfigurationCommand = exports.deserializeAws_restJson1DescribeDimensionCommand = exports.deserializeAws_restJson1DescribeDefaultAuthorizerCommand = exports.deserializeAws_restJson1DescribeCertificateCommand = exports.deserializeAws_restJson1DescribeCACertificateCommand = exports.deserializeAws_restJson1DescribeBillingGroupCommand = exports.deserializeAws_restJson1DescribeAuthorizerCommand = exports.deserializeAws_restJson1DescribeAuditTaskCommand = exports.deserializeAws_restJson1DescribeAuditSuppressionCommand = exports.deserializeAws_restJson1DescribeAuditMitigationActionsTaskCommand = exports.deserializeAws_restJson1DescribeAuditFindingCommand = exports.deserializeAws_restJson1DescribeAccountAuditConfigurationCommand = exports.deserializeAws_restJson1DeprecateThingTypeCommand = exports.deserializeAws_restJson1DeleteV2LoggingLevelCommand = exports.deserializeAws_restJson1DeleteTopicRuleDestinationCommand = exports.deserializeAws_restJson1DeleteTopicRuleCommand = exports.deserializeAws_restJson1DeleteThingTypeCommand = exports.deserializeAws_restJson1DeleteThingGroupCommand = exports.deserializeAws_restJson1DeleteThingCommand = exports.deserializeAws_restJson1DeleteStreamCommand = exports.deserializeAws_restJson1DeleteSecurityProfileCommand = exports.deserializeAws_restJson1DeleteScheduledAuditCommand = exports.deserializeAws_restJson1DeleteRoleAliasCommand = exports.deserializeAws_restJson1DeleteRegistrationCodeCommand = exports.deserializeAws_restJson1DeleteProvisioningTemplateVersionCommand = exports.deserializeAws_restJson1DeleteProvisioningTemplateCommand = exports.deserializeAws_restJson1DeletePolicyVersionCommand = exports.deserializeAws_restJson1DeletePolicyCommand = exports.deserializeAws_restJson1DeleteOTAUpdateCommand = exports.deserializeAws_restJson1DeleteMitigationActionCommand = exports.deserializeAws_restJson1DeleteJobExecutionCommand = exports.deserializeAws_restJson1DeleteJobCommand = exports.deserializeAws_restJson1DeleteDynamicThingGroupCommand = exports.deserializeAws_restJson1DeleteDomainConfigurationCommand = exports.deserializeAws_restJson1DeleteDimensionCommand = exports.deserializeAws_restJson1DeleteCertificateCommand = exports.deserializeAws_restJson1DeleteCACertificateCommand = exports.deserializeAws_restJson1DeleteBillingGroupCommand = exports.deserializeAws_restJson1DeleteAuthorizerCommand = exports.deserializeAws_restJson1DeleteAuditSuppressionCommand = exports.deserializeAws_restJson1DeleteAccountAuditConfigurationCommand = exports.deserializeAws_restJson1CreateTopicRuleDestinationCommand = exports.deserializeAws_restJson1CreateTopicRuleCommand = void 0; +exports.deserializeAws_restJson1ListOutgoingCertificatesCommand = exports.deserializeAws_restJson1ListOTAUpdatesCommand = exports.deserializeAws_restJson1ListMitigationActionsCommand = exports.deserializeAws_restJson1ListJobsCommand = exports.deserializeAws_restJson1ListJobExecutionsForThingCommand = exports.deserializeAws_restJson1ListJobExecutionsForJobCommand = exports.deserializeAws_restJson1ListIndicesCommand = exports.deserializeAws_restJson1ListDomainConfigurationsCommand = exports.deserializeAws_restJson1ListDimensionsCommand = exports.deserializeAws_restJson1ListCertificatesByCACommand = exports.deserializeAws_restJson1ListCertificatesCommand = exports.deserializeAws_restJson1ListCACertificatesCommand = exports.deserializeAws_restJson1ListBillingGroupsCommand = exports.deserializeAws_restJson1ListAuthorizersCommand = exports.deserializeAws_restJson1ListAuditTasksCommand = exports.deserializeAws_restJson1ListAuditSuppressionsCommand = exports.deserializeAws_restJson1ListAuditMitigationActionsTasksCommand = exports.deserializeAws_restJson1ListAuditMitigationActionsExecutionsCommand = exports.deserializeAws_restJson1ListAuditFindingsCommand = exports.deserializeAws_restJson1ListAttachedPoliciesCommand = exports.deserializeAws_restJson1ListActiveViolationsCommand = exports.deserializeAws_restJson1GetV2LoggingOptionsCommand = exports.deserializeAws_restJson1GetTopicRuleDestinationCommand = exports.deserializeAws_restJson1GetTopicRuleCommand = exports.deserializeAws_restJson1GetStatisticsCommand = exports.deserializeAws_restJson1GetRegistrationCodeCommand = exports.deserializeAws_restJson1GetPolicyVersionCommand = exports.deserializeAws_restJson1GetPolicyCommand = exports.deserializeAws_restJson1GetPercentilesCommand = exports.deserializeAws_restJson1GetOTAUpdateCommand = exports.deserializeAws_restJson1GetLoggingOptionsCommand = exports.deserializeAws_restJson1GetJobDocumentCommand = exports.deserializeAws_restJson1GetIndexingConfigurationCommand = exports.deserializeAws_restJson1GetEffectivePoliciesCommand = exports.deserializeAws_restJson1GetCardinalityCommand = exports.deserializeAws_restJson1EnableTopicRuleCommand = exports.deserializeAws_restJson1DisableTopicRuleCommand = exports.deserializeAws_restJson1DetachThingPrincipalCommand = exports.deserializeAws_restJson1DetachSecurityProfileCommand = exports.deserializeAws_restJson1DetachPrincipalPolicyCommand = exports.deserializeAws_restJson1DetachPolicyCommand = exports.deserializeAws_restJson1DescribeThingTypeCommand = exports.deserializeAws_restJson1DescribeThingRegistrationTaskCommand = exports.deserializeAws_restJson1DescribeThingGroupCommand = exports.deserializeAws_restJson1DescribeThingCommand = exports.deserializeAws_restJson1DescribeStreamCommand = exports.deserializeAws_restJson1DescribeSecurityProfileCommand = exports.deserializeAws_restJson1DescribeScheduledAuditCommand = exports.deserializeAws_restJson1DescribeRoleAliasCommand = exports.deserializeAws_restJson1DescribeProvisioningTemplateVersionCommand = void 0; +exports.deserializeAws_restJson1TransferCertificateCommand = exports.deserializeAws_restJson1TestInvokeAuthorizerCommand = exports.deserializeAws_restJson1TestAuthorizationCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopThingRegistrationTaskCommand = exports.deserializeAws_restJson1StartThingRegistrationTaskCommand = exports.deserializeAws_restJson1StartOnDemandAuditTaskCommand = exports.deserializeAws_restJson1StartAuditMitigationActionsTaskCommand = exports.deserializeAws_restJson1SetV2LoggingOptionsCommand = exports.deserializeAws_restJson1SetV2LoggingLevelCommand = exports.deserializeAws_restJson1SetLoggingOptionsCommand = exports.deserializeAws_restJson1SetDefaultPolicyVersionCommand = exports.deserializeAws_restJson1SetDefaultAuthorizerCommand = exports.deserializeAws_restJson1SearchIndexCommand = exports.deserializeAws_restJson1ReplaceTopicRuleCommand = exports.deserializeAws_restJson1RemoveThingFromThingGroupCommand = exports.deserializeAws_restJson1RemoveThingFromBillingGroupCommand = exports.deserializeAws_restJson1RejectCertificateTransferCommand = exports.deserializeAws_restJson1RegisterThingCommand = exports.deserializeAws_restJson1RegisterCertificateWithoutCACommand = exports.deserializeAws_restJson1RegisterCertificateCommand = exports.deserializeAws_restJson1RegisterCACertificateCommand = exports.deserializeAws_restJson1ListViolationEventsCommand = exports.deserializeAws_restJson1ListV2LoggingLevelsCommand = exports.deserializeAws_restJson1ListTopicRulesCommand = exports.deserializeAws_restJson1ListTopicRuleDestinationsCommand = exports.deserializeAws_restJson1ListThingTypesCommand = exports.deserializeAws_restJson1ListThingsInThingGroupCommand = exports.deserializeAws_restJson1ListThingsInBillingGroupCommand = exports.deserializeAws_restJson1ListThingsCommand = exports.deserializeAws_restJson1ListThingRegistrationTasksCommand = exports.deserializeAws_restJson1ListThingRegistrationTaskReportsCommand = exports.deserializeAws_restJson1ListThingPrincipalsCommand = exports.deserializeAws_restJson1ListThingGroupsForThingCommand = exports.deserializeAws_restJson1ListThingGroupsCommand = exports.deserializeAws_restJson1ListTargetsForSecurityProfileCommand = exports.deserializeAws_restJson1ListTargetsForPolicyCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListStreamsCommand = exports.deserializeAws_restJson1ListSecurityProfilesForTargetCommand = exports.deserializeAws_restJson1ListSecurityProfilesCommand = exports.deserializeAws_restJson1ListScheduledAuditsCommand = exports.deserializeAws_restJson1ListRoleAliasesCommand = exports.deserializeAws_restJson1ListProvisioningTemplateVersionsCommand = exports.deserializeAws_restJson1ListProvisioningTemplatesCommand = exports.deserializeAws_restJson1ListPrincipalThingsCommand = exports.deserializeAws_restJson1ListPrincipalPoliciesCommand = exports.deserializeAws_restJson1ListPolicyVersionsCommand = exports.deserializeAws_restJson1ListPolicyPrincipalsCommand = exports.deserializeAws_restJson1ListPoliciesCommand = void 0; +exports.deserializeAws_restJson1ValidateSecurityProfileBehaviorsCommand = exports.deserializeAws_restJson1UpdateTopicRuleDestinationCommand = exports.deserializeAws_restJson1UpdateThingGroupsForThingCommand = exports.deserializeAws_restJson1UpdateThingGroupCommand = exports.deserializeAws_restJson1UpdateThingCommand = exports.deserializeAws_restJson1UpdateStreamCommand = exports.deserializeAws_restJson1UpdateSecurityProfileCommand = exports.deserializeAws_restJson1UpdateScheduledAuditCommand = exports.deserializeAws_restJson1UpdateRoleAliasCommand = exports.deserializeAws_restJson1UpdateProvisioningTemplateCommand = exports.deserializeAws_restJson1UpdateMitigationActionCommand = exports.deserializeAws_restJson1UpdateJobCommand = exports.deserializeAws_restJson1UpdateIndexingConfigurationCommand = exports.deserializeAws_restJson1UpdateEventConfigurationsCommand = exports.deserializeAws_restJson1UpdateDynamicThingGroupCommand = exports.deserializeAws_restJson1UpdateDomainConfigurationCommand = exports.deserializeAws_restJson1UpdateDimensionCommand = exports.deserializeAws_restJson1UpdateCertificateCommand = exports.deserializeAws_restJson1UpdateCACertificateCommand = exports.deserializeAws_restJson1UpdateBillingGroupCommand = exports.deserializeAws_restJson1UpdateAuthorizerCommand = exports.deserializeAws_restJson1UpdateAuditSuppressionCommand = exports.deserializeAws_restJson1UpdateAccountAuditConfigurationCommand = exports.deserializeAws_restJson1UntagResourceCommand = void 0; +const models_0_1 = __nccwpck_require__(34387); +const protocol_http_1 = __nccwpck_require__(67498); +const smithy_client_1 = __nccwpck_require__(84060); +const uuid_1 = __nccwpck_require__(2155); +const serializeAws_restJson1AcceptCertificateTransferCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/accept-certificate-transfer/{certificateId}"; + if (input.certificateId !== undefined) { + const labelValue = input.certificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: certificateId."); + } + resolvedPath = resolvedPath.replace("{certificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: certificateId."); + } + const query = { + ...(input.setAsActive !== undefined && { setAsActive: input.setAsActive.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1AcceptCertificateTransferCommand = serializeAws_restJson1AcceptCertificateTransferCommand; +const serializeAws_restJson1AddThingToBillingGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/billing-groups/addThingToBillingGroup"; + let body; + body = JSON.stringify({ + ...(input.billingGroupArn !== undefined && + input.billingGroupArn !== null && { billingGroupArn: input.billingGroupArn }), + ...(input.billingGroupName !== undefined && + input.billingGroupName !== null && { billingGroupName: input.billingGroupName }), + ...(input.thingArn !== undefined && input.thingArn !== null && { thingArn: input.thingArn }), + ...(input.thingName !== undefined && input.thingName !== null && { thingName: input.thingName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1AddThingToBillingGroupCommand = serializeAws_restJson1AddThingToBillingGroupCommand; +const serializeAws_restJson1AddThingToThingGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/thing-groups/addThingToThingGroup"; + let body; + body = JSON.stringify({ + ...(input.overrideDynamicGroups !== undefined && + input.overrideDynamicGroups !== null && { overrideDynamicGroups: input.overrideDynamicGroups }), + ...(input.thingArn !== undefined && input.thingArn !== null && { thingArn: input.thingArn }), + ...(input.thingGroupArn !== undefined && input.thingGroupArn !== null && { thingGroupArn: input.thingGroupArn }), + ...(input.thingGroupName !== undefined && + input.thingGroupName !== null && { thingGroupName: input.thingGroupName }), + ...(input.thingName !== undefined && input.thingName !== null && { thingName: input.thingName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1AddThingToThingGroupCommand = serializeAws_restJson1AddThingToThingGroupCommand; +const serializeAws_restJson1AssociateTargetsWithJobCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/jobs/{jobId}/targets"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + const query = { + ...(input.namespaceId !== undefined && { namespaceId: input.namespaceId }), + }; + let body; + body = JSON.stringify({ + ...(input.comment !== undefined && input.comment !== null && { comment: input.comment }), + ...(input.targets !== undefined && + input.targets !== null && { targets: serializeAws_restJson1JobTargets(input.targets, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1AssociateTargetsWithJobCommand = serializeAws_restJson1AssociateTargetsWithJobCommand; +const serializeAws_restJson1AttachPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/target-policies/{policyName}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + let body; + body = JSON.stringify({ + ...(input.target !== undefined && input.target !== null && { target: input.target }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1AttachPolicyCommand = serializeAws_restJson1AttachPolicyCommand; +const serializeAws_restJson1AttachPrincipalPolicyCommand = async (input, context) => { + const headers = { + ...(isSerializableHeaderValue(input.principal) && { "x-amzn-iot-principal": input.principal }), + }; + let resolvedPath = "/principal-policies/{policyName}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1AttachPrincipalPolicyCommand = serializeAws_restJson1AttachPrincipalPolicyCommand; +const serializeAws_restJson1AttachSecurityProfileCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/security-profiles/{securityProfileName}/targets"; + if (input.securityProfileName !== undefined) { + const labelValue = input.securityProfileName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: securityProfileName."); + } + resolvedPath = resolvedPath.replace("{securityProfileName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: securityProfileName."); + } + const query = { + ...(input.securityProfileTargetArn !== undefined && { securityProfileTargetArn: input.securityProfileTargetArn }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1AttachSecurityProfileCommand = serializeAws_restJson1AttachSecurityProfileCommand; +const serializeAws_restJson1AttachThingPrincipalCommand = async (input, context) => { + const headers = { + ...(isSerializableHeaderValue(input.principal) && { "x-amzn-principal": input.principal }), + }; + let resolvedPath = "/things/{thingName}/principals"; + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1AttachThingPrincipalCommand = serializeAws_restJson1AttachThingPrincipalCommand; +const serializeAws_restJson1CancelAuditMitigationActionsTaskCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/mitigationactions/tasks/{taskId}/cancel"; + if (input.taskId !== undefined) { + const labelValue = input.taskId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: taskId."); + } + resolvedPath = resolvedPath.replace("{taskId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: taskId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CancelAuditMitigationActionsTaskCommand = serializeAws_restJson1CancelAuditMitigationActionsTaskCommand; +const serializeAws_restJson1CancelAuditTaskCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/tasks/{taskId}/cancel"; + if (input.taskId !== undefined) { + const labelValue = input.taskId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: taskId."); + } + resolvedPath = resolvedPath.replace("{taskId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: taskId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CancelAuditTaskCommand = serializeAws_restJson1CancelAuditTaskCommand; +const serializeAws_restJson1CancelCertificateTransferCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/cancel-certificate-transfer/{certificateId}"; + if (input.certificateId !== undefined) { + const labelValue = input.certificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: certificateId."); + } + resolvedPath = resolvedPath.replace("{certificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: certificateId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CancelCertificateTransferCommand = serializeAws_restJson1CancelCertificateTransferCommand; +const serializeAws_restJson1CancelJobCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/jobs/{jobId}/cancel"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + const query = { + ...(input.force !== undefined && { force: input.force.toString() }), + }; + let body; + body = JSON.stringify({ + ...(input.comment !== undefined && input.comment !== null && { comment: input.comment }), + ...(input.reasonCode !== undefined && input.reasonCode !== null && { reasonCode: input.reasonCode }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1CancelJobCommand = serializeAws_restJson1CancelJobCommand; +const serializeAws_restJson1CancelJobExecutionCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/things/{thingName}/jobs/{jobId}/cancel"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + const query = { + ...(input.force !== undefined && { force: input.force.toString() }), + }; + let body; + body = JSON.stringify({ + ...(input.expectedVersion !== undefined && + input.expectedVersion !== null && { expectedVersion: input.expectedVersion }), + ...(input.statusDetails !== undefined && + input.statusDetails !== null && { + statusDetails: serializeAws_restJson1DetailsMap(input.statusDetails, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1CancelJobExecutionCommand = serializeAws_restJson1CancelJobExecutionCommand; +const serializeAws_restJson1ClearDefaultAuthorizerCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/default-authorizer"; + let body; + body = ""; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1ClearDefaultAuthorizerCommand = serializeAws_restJson1ClearDefaultAuthorizerCommand; +const serializeAws_restJson1ConfirmTopicRuleDestinationCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/confirmdestination/{confirmationToken+}"; + if (input.confirmationToken !== undefined) { + const labelValue = input.confirmationToken; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: confirmationToken."); + } + resolvedPath = resolvedPath.replace("{confirmationToken+}", labelValue + .split("/") + .map((segment) => smithy_client_1.extendedEncodeURIComponent(segment)) + .join("/")); + } + else { + throw new Error("No value provided for input HTTP label: confirmationToken."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1ConfirmTopicRuleDestinationCommand = serializeAws_restJson1ConfirmTopicRuleDestinationCommand; +const serializeAws_restJson1CreateAuditSuppressionCommand = async (input, context) => { + var _a; + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/suppressions/create"; + let body; + body = JSON.stringify({ + ...(input.checkName !== undefined && input.checkName !== null && { checkName: input.checkName }), + clientRequestToken: (_a = input.clientRequestToken) !== null && _a !== void 0 ? _a : uuid_1.v4(), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.expirationDate !== undefined && + input.expirationDate !== null && { expirationDate: Math.round(input.expirationDate.getTime() / 1000) }), + ...(input.resourceIdentifier !== undefined && + input.resourceIdentifier !== null && { + resourceIdentifier: serializeAws_restJson1ResourceIdentifier(input.resourceIdentifier, context), + }), + ...(input.suppressIndefinitely !== undefined && + input.suppressIndefinitely !== null && { suppressIndefinitely: input.suppressIndefinitely }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateAuditSuppressionCommand = serializeAws_restJson1CreateAuditSuppressionCommand; +const serializeAws_restJson1CreateAuthorizerCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/authorizer/{authorizerName}"; + if (input.authorizerName !== undefined) { + const labelValue = input.authorizerName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: authorizerName."); + } + resolvedPath = resolvedPath.replace("{authorizerName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: authorizerName."); + } + let body; + body = JSON.stringify({ + ...(input.authorizerFunctionArn !== undefined && + input.authorizerFunctionArn !== null && { authorizerFunctionArn: input.authorizerFunctionArn }), + ...(input.signingDisabled !== undefined && + input.signingDisabled !== null && { signingDisabled: input.signingDisabled }), + ...(input.status !== undefined && input.status !== null && { status: input.status }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.tokenKeyName !== undefined && input.tokenKeyName !== null && { tokenKeyName: input.tokenKeyName }), + ...(input.tokenSigningPublicKeys !== undefined && + input.tokenSigningPublicKeys !== null && { + tokenSigningPublicKeys: serializeAws_restJson1PublicKeyMap(input.tokenSigningPublicKeys, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateAuthorizerCommand = serializeAws_restJson1CreateAuthorizerCommand; +const serializeAws_restJson1CreateBillingGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/billing-groups/{billingGroupName}"; + if (input.billingGroupName !== undefined) { + const labelValue = input.billingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: billingGroupName."); + } + resolvedPath = resolvedPath.replace("{billingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: billingGroupName."); + } + let body; + body = JSON.stringify({ + ...(input.billingGroupProperties !== undefined && + input.billingGroupProperties !== null && { + billingGroupProperties: serializeAws_restJson1BillingGroupProperties(input.billingGroupProperties, context), + }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateBillingGroupCommand = serializeAws_restJson1CreateBillingGroupCommand; +const serializeAws_restJson1CreateCertificateFromCsrCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/certificates"; + const query = { + ...(input.setAsActive !== undefined && { setAsActive: input.setAsActive.toString() }), + }; + let body; + body = JSON.stringify({ + ...(input.certificateSigningRequest !== undefined && + input.certificateSigningRequest !== null && { certificateSigningRequest: input.certificateSigningRequest }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1CreateCertificateFromCsrCommand = serializeAws_restJson1CreateCertificateFromCsrCommand; +const serializeAws_restJson1CreateDimensionCommand = async (input, context) => { + var _a; + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/dimensions/{name}"; + if (input.name !== undefined) { + const labelValue = input.name; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: name."); + } + resolvedPath = resolvedPath.replace("{name}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: name."); + } + let body; + body = JSON.stringify({ + clientRequestToken: (_a = input.clientRequestToken) !== null && _a !== void 0 ? _a : uuid_1.v4(), + ...(input.stringValues !== undefined && + input.stringValues !== null && { + stringValues: serializeAws_restJson1DimensionStringValues(input.stringValues, context), + }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.type !== undefined && input.type !== null && { type: input.type }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateDimensionCommand = serializeAws_restJson1CreateDimensionCommand; +const serializeAws_restJson1CreateDomainConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/domainConfigurations/{domainConfigurationName}"; + if (input.domainConfigurationName !== undefined) { + const labelValue = input.domainConfigurationName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: domainConfigurationName."); + } + resolvedPath = resolvedPath.replace("{domainConfigurationName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: domainConfigurationName."); + } + let body; + body = JSON.stringify({ + ...(input.authorizerConfig !== undefined && + input.authorizerConfig !== null && { + authorizerConfig: serializeAws_restJson1AuthorizerConfig(input.authorizerConfig, context), + }), + ...(input.domainName !== undefined && input.domainName !== null && { domainName: input.domainName }), + ...(input.serverCertificateArns !== undefined && + input.serverCertificateArns !== null && { + serverCertificateArns: serializeAws_restJson1ServerCertificateArns(input.serverCertificateArns, context), + }), + ...(input.serviceType !== undefined && input.serviceType !== null && { serviceType: input.serviceType }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.validationCertificateArn !== undefined && + input.validationCertificateArn !== null && { validationCertificateArn: input.validationCertificateArn }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateDomainConfigurationCommand = serializeAws_restJson1CreateDomainConfigurationCommand; +const serializeAws_restJson1CreateDynamicThingGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/dynamic-thing-groups/{thingGroupName}"; + if (input.thingGroupName !== undefined) { + const labelValue = input.thingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingGroupName."); + } + resolvedPath = resolvedPath.replace("{thingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingGroupName."); + } + let body; + body = JSON.stringify({ + ...(input.indexName !== undefined && input.indexName !== null && { indexName: input.indexName }), + ...(input.queryString !== undefined && input.queryString !== null && { queryString: input.queryString }), + ...(input.queryVersion !== undefined && input.queryVersion !== null && { queryVersion: input.queryVersion }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.thingGroupProperties !== undefined && + input.thingGroupProperties !== null && { + thingGroupProperties: serializeAws_restJson1ThingGroupProperties(input.thingGroupProperties, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateDynamicThingGroupCommand = serializeAws_restJson1CreateDynamicThingGroupCommand; +const serializeAws_restJson1CreateJobCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/jobs/{jobId}"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + let body; + body = JSON.stringify({ + ...(input.abortConfig !== undefined && + input.abortConfig !== null && { abortConfig: serializeAws_restJson1AbortConfig(input.abortConfig, context) }), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.document !== undefined && input.document !== null && { document: input.document }), + ...(input.documentSource !== undefined && + input.documentSource !== null && { documentSource: input.documentSource }), + ...(input.jobExecutionsRolloutConfig !== undefined && + input.jobExecutionsRolloutConfig !== null && { + jobExecutionsRolloutConfig: serializeAws_restJson1JobExecutionsRolloutConfig(input.jobExecutionsRolloutConfig, context), + }), + ...(input.namespaceId !== undefined && input.namespaceId !== null && { namespaceId: input.namespaceId }), + ...(input.presignedUrlConfig !== undefined && + input.presignedUrlConfig !== null && { + presignedUrlConfig: serializeAws_restJson1PresignedUrlConfig(input.presignedUrlConfig, context), + }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.targetSelection !== undefined && + input.targetSelection !== null && { targetSelection: input.targetSelection }), + ...(input.targets !== undefined && + input.targets !== null && { targets: serializeAws_restJson1JobTargets(input.targets, context) }), + ...(input.timeoutConfig !== undefined && + input.timeoutConfig !== null && { + timeoutConfig: serializeAws_restJson1TimeoutConfig(input.timeoutConfig, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateJobCommand = serializeAws_restJson1CreateJobCommand; +const serializeAws_restJson1CreateKeysAndCertificateCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/keys-and-certificate"; + const query = { + ...(input.setAsActive !== undefined && { setAsActive: input.setAsActive.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1CreateKeysAndCertificateCommand = serializeAws_restJson1CreateKeysAndCertificateCommand; +const serializeAws_restJson1CreateMitigationActionCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/mitigationactions/actions/{actionName}"; + if (input.actionName !== undefined) { + const labelValue = input.actionName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: actionName."); + } + resolvedPath = resolvedPath.replace("{actionName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: actionName."); + } + let body; + body = JSON.stringify({ + ...(input.actionParams !== undefined && + input.actionParams !== null && { + actionParams: serializeAws_restJson1MitigationActionParams(input.actionParams, context), + }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateMitigationActionCommand = serializeAws_restJson1CreateMitigationActionCommand; +const serializeAws_restJson1CreateOTAUpdateCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/otaUpdates/{otaUpdateId}"; + if (input.otaUpdateId !== undefined) { + const labelValue = input.otaUpdateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: otaUpdateId."); + } + resolvedPath = resolvedPath.replace("{otaUpdateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: otaUpdateId."); + } + let body; + body = JSON.stringify({ + ...(input.additionalParameters !== undefined && + input.additionalParameters !== null && { + additionalParameters: serializeAws_restJson1AdditionalParameterMap(input.additionalParameters, context), + }), + ...(input.awsJobAbortConfig !== undefined && + input.awsJobAbortConfig !== null && { + awsJobAbortConfig: serializeAws_restJson1AwsJobAbortConfig(input.awsJobAbortConfig, context), + }), + ...(input.awsJobExecutionsRolloutConfig !== undefined && + input.awsJobExecutionsRolloutConfig !== null && { + awsJobExecutionsRolloutConfig: serializeAws_restJson1AwsJobExecutionsRolloutConfig(input.awsJobExecutionsRolloutConfig, context), + }), + ...(input.awsJobPresignedUrlConfig !== undefined && + input.awsJobPresignedUrlConfig !== null && { + awsJobPresignedUrlConfig: serializeAws_restJson1AwsJobPresignedUrlConfig(input.awsJobPresignedUrlConfig, context), + }), + ...(input.awsJobTimeoutConfig !== undefined && + input.awsJobTimeoutConfig !== null && { + awsJobTimeoutConfig: serializeAws_restJson1AwsJobTimeoutConfig(input.awsJobTimeoutConfig, context), + }), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.files !== undefined && + input.files !== null && { files: serializeAws_restJson1OTAUpdateFiles(input.files, context) }), + ...(input.protocols !== undefined && + input.protocols !== null && { protocols: serializeAws_restJson1Protocols(input.protocols, context) }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.targetSelection !== undefined && + input.targetSelection !== null && { targetSelection: input.targetSelection }), + ...(input.targets !== undefined && + input.targets !== null && { targets: serializeAws_restJson1Targets(input.targets, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateOTAUpdateCommand = serializeAws_restJson1CreateOTAUpdateCommand; +const serializeAws_restJson1CreatePolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/policies/{policyName}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + let body; + body = JSON.stringify({ + ...(input.policyDocument !== undefined && + input.policyDocument !== null && { policyDocument: input.policyDocument }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreatePolicyCommand = serializeAws_restJson1CreatePolicyCommand; +const serializeAws_restJson1CreatePolicyVersionCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/policies/{policyName}/version"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + const query = { + ...(input.setAsDefault !== undefined && { setAsDefault: input.setAsDefault.toString() }), + }; + let body; + body = JSON.stringify({ + ...(input.policyDocument !== undefined && + input.policyDocument !== null && { policyDocument: input.policyDocument }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1CreatePolicyVersionCommand = serializeAws_restJson1CreatePolicyVersionCommand; +const serializeAws_restJson1CreateProvisioningClaimCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/provisioning-templates/{templateName}/provisioning-claim"; + if (input.templateName !== undefined) { + const labelValue = input.templateName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: templateName."); + } + resolvedPath = resolvedPath.replace("{templateName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: templateName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateProvisioningClaimCommand = serializeAws_restJson1CreateProvisioningClaimCommand; +const serializeAws_restJson1CreateProvisioningTemplateCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/provisioning-templates"; + let body; + body = JSON.stringify({ + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }), + ...(input.preProvisioningHook !== undefined && + input.preProvisioningHook !== null && { + preProvisioningHook: serializeAws_restJson1ProvisioningHook(input.preProvisioningHook, context), + }), + ...(input.provisioningRoleArn !== undefined && + input.provisioningRoleArn !== null && { provisioningRoleArn: input.provisioningRoleArn }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.templateBody !== undefined && input.templateBody !== null && { templateBody: input.templateBody }), + ...(input.templateName !== undefined && input.templateName !== null && { templateName: input.templateName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateProvisioningTemplateCommand = serializeAws_restJson1CreateProvisioningTemplateCommand; +const serializeAws_restJson1CreateProvisioningTemplateVersionCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/provisioning-templates/{templateName}/versions"; + if (input.templateName !== undefined) { + const labelValue = input.templateName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: templateName."); + } + resolvedPath = resolvedPath.replace("{templateName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: templateName."); + } + const query = { + ...(input.setAsDefault !== undefined && { setAsDefault: input.setAsDefault.toString() }), + }; + let body; + body = JSON.stringify({ + ...(input.templateBody !== undefined && input.templateBody !== null && { templateBody: input.templateBody }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1CreateProvisioningTemplateVersionCommand = serializeAws_restJson1CreateProvisioningTemplateVersionCommand; +const serializeAws_restJson1CreateRoleAliasCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/role-aliases/{roleAlias}"; + if (input.roleAlias !== undefined) { + const labelValue = input.roleAlias; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: roleAlias."); + } + resolvedPath = resolvedPath.replace("{roleAlias}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: roleAlias."); + } + let body; + body = JSON.stringify({ + ...(input.credentialDurationSeconds !== undefined && + input.credentialDurationSeconds !== null && { credentialDurationSeconds: input.credentialDurationSeconds }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateRoleAliasCommand = serializeAws_restJson1CreateRoleAliasCommand; +const serializeAws_restJson1CreateScheduledAuditCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/scheduledaudits/{scheduledAuditName}"; + if (input.scheduledAuditName !== undefined) { + const labelValue = input.scheduledAuditName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: scheduledAuditName."); + } + resolvedPath = resolvedPath.replace("{scheduledAuditName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: scheduledAuditName."); + } + let body; + body = JSON.stringify({ + ...(input.dayOfMonth !== undefined && input.dayOfMonth !== null && { dayOfMonth: input.dayOfMonth }), + ...(input.dayOfWeek !== undefined && input.dayOfWeek !== null && { dayOfWeek: input.dayOfWeek }), + ...(input.frequency !== undefined && input.frequency !== null && { frequency: input.frequency }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.targetCheckNames !== undefined && + input.targetCheckNames !== null && { + targetCheckNames: serializeAws_restJson1TargetAuditCheckNames(input.targetCheckNames, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateScheduledAuditCommand = serializeAws_restJson1CreateScheduledAuditCommand; +const serializeAws_restJson1CreateSecurityProfileCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/security-profiles/{securityProfileName}"; + if (input.securityProfileName !== undefined) { + const labelValue = input.securityProfileName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: securityProfileName."); + } + resolvedPath = resolvedPath.replace("{securityProfileName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: securityProfileName."); + } + let body; + body = JSON.stringify({ + ...(input.additionalMetricsToRetain !== undefined && + input.additionalMetricsToRetain !== null && { + additionalMetricsToRetain: serializeAws_restJson1AdditionalMetricsToRetainList(input.additionalMetricsToRetain, context), + }), + ...(input.additionalMetricsToRetainV2 !== undefined && + input.additionalMetricsToRetainV2 !== null && { + additionalMetricsToRetainV2: serializeAws_restJson1AdditionalMetricsToRetainV2List(input.additionalMetricsToRetainV2, context), + }), + ...(input.alertTargets !== undefined && + input.alertTargets !== null && { alertTargets: serializeAws_restJson1AlertTargets(input.alertTargets, context) }), + ...(input.behaviors !== undefined && + input.behaviors !== null && { behaviors: serializeAws_restJson1Behaviors(input.behaviors, context) }), + ...(input.securityProfileDescription !== undefined && + input.securityProfileDescription !== null && { securityProfileDescription: input.securityProfileDescription }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateSecurityProfileCommand = serializeAws_restJson1CreateSecurityProfileCommand; +const serializeAws_restJson1CreateStreamCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/streams/{streamId}"; + if (input.streamId !== undefined) { + const labelValue = input.streamId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: streamId."); + } + resolvedPath = resolvedPath.replace("{streamId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: streamId."); + } + let body; + body = JSON.stringify({ + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.files !== undefined && + input.files !== null && { files: serializeAws_restJson1StreamFiles(input.files, context) }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateStreamCommand = serializeAws_restJson1CreateStreamCommand; +const serializeAws_restJson1CreateThingCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/things/{thingName}"; + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + let body; + body = JSON.stringify({ + ...(input.attributePayload !== undefined && + input.attributePayload !== null && { + attributePayload: serializeAws_restJson1AttributePayload(input.attributePayload, context), + }), + ...(input.billingGroupName !== undefined && + input.billingGroupName !== null && { billingGroupName: input.billingGroupName }), + ...(input.thingTypeName !== undefined && input.thingTypeName !== null && { thingTypeName: input.thingTypeName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateThingCommand = serializeAws_restJson1CreateThingCommand; +const serializeAws_restJson1CreateThingGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/thing-groups/{thingGroupName}"; + if (input.thingGroupName !== undefined) { + const labelValue = input.thingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingGroupName."); + } + resolvedPath = resolvedPath.replace("{thingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingGroupName."); + } + let body; + body = JSON.stringify({ + ...(input.parentGroupName !== undefined && + input.parentGroupName !== null && { parentGroupName: input.parentGroupName }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.thingGroupProperties !== undefined && + input.thingGroupProperties !== null && { + thingGroupProperties: serializeAws_restJson1ThingGroupProperties(input.thingGroupProperties, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateThingGroupCommand = serializeAws_restJson1CreateThingGroupCommand; +const serializeAws_restJson1CreateThingTypeCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/thing-types/{thingTypeName}"; + if (input.thingTypeName !== undefined) { + const labelValue = input.thingTypeName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingTypeName."); + } + resolvedPath = resolvedPath.replace("{thingTypeName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingTypeName."); + } + let body; + body = JSON.stringify({ + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.thingTypeProperties !== undefined && + input.thingTypeProperties !== null && { + thingTypeProperties: serializeAws_restJson1ThingTypeProperties(input.thingTypeProperties, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateThingTypeCommand = serializeAws_restJson1CreateThingTypeCommand; +const serializeAws_restJson1CreateTopicRuleCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + ...(isSerializableHeaderValue(input.tags) && { "x-amz-tagging": input.tags }), + }; + let resolvedPath = "/rules/{ruleName}"; + if (input.ruleName !== undefined) { + const labelValue = input.ruleName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ruleName."); + } + resolvedPath = resolvedPath.replace("{ruleName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: ruleName."); + } + let body; + if (input.topicRulePayload !== undefined) { + body = serializeAws_restJson1TopicRulePayload(input.topicRulePayload, context); + } + if (body === undefined) { + body = {}; + } + body = JSON.stringify(body); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateTopicRuleCommand = serializeAws_restJson1CreateTopicRuleCommand; +const serializeAws_restJson1CreateTopicRuleDestinationCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/destinations"; + let body; + body = JSON.stringify({ + ...(input.destinationConfiguration !== undefined && + input.destinationConfiguration !== null && { + destinationConfiguration: serializeAws_restJson1TopicRuleDestinationConfiguration(input.destinationConfiguration, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1CreateTopicRuleDestinationCommand = serializeAws_restJson1CreateTopicRuleDestinationCommand; +const serializeAws_restJson1DeleteAccountAuditConfigurationCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/configuration"; + const query = { + ...(input.deleteScheduledAudits !== undefined && { deleteScheduledAudits: input.deleteScheduledAudits.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteAccountAuditConfigurationCommand = serializeAws_restJson1DeleteAccountAuditConfigurationCommand; +const serializeAws_restJson1DeleteAuditSuppressionCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/suppressions/delete"; + let body; + body = JSON.stringify({ + ...(input.checkName !== undefined && input.checkName !== null && { checkName: input.checkName }), + ...(input.resourceIdentifier !== undefined && + input.resourceIdentifier !== null && { + resourceIdentifier: serializeAws_restJson1ResourceIdentifier(input.resourceIdentifier, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteAuditSuppressionCommand = serializeAws_restJson1DeleteAuditSuppressionCommand; +const serializeAws_restJson1DeleteAuthorizerCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/authorizer/{authorizerName}"; + if (input.authorizerName !== undefined) { + const labelValue = input.authorizerName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: authorizerName."); + } + resolvedPath = resolvedPath.replace("{authorizerName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: authorizerName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteAuthorizerCommand = serializeAws_restJson1DeleteAuthorizerCommand; +const serializeAws_restJson1DeleteBillingGroupCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/billing-groups/{billingGroupName}"; + if (input.billingGroupName !== undefined) { + const labelValue = input.billingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: billingGroupName."); + } + resolvedPath = resolvedPath.replace("{billingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: billingGroupName."); + } + const query = { + ...(input.expectedVersion !== undefined && { expectedVersion: input.expectedVersion.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteBillingGroupCommand = serializeAws_restJson1DeleteBillingGroupCommand; +const serializeAws_restJson1DeleteCACertificateCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/cacertificate/{certificateId}"; + if (input.certificateId !== undefined) { + const labelValue = input.certificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: certificateId."); + } + resolvedPath = resolvedPath.replace("{certificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: certificateId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteCACertificateCommand = serializeAws_restJson1DeleteCACertificateCommand; +const serializeAws_restJson1DeleteCertificateCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/certificates/{certificateId}"; + if (input.certificateId !== undefined) { + const labelValue = input.certificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: certificateId."); + } + resolvedPath = resolvedPath.replace("{certificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: certificateId."); + } + const query = { + ...(input.forceDelete !== undefined && { forceDelete: input.forceDelete.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteCertificateCommand = serializeAws_restJson1DeleteCertificateCommand; +const serializeAws_restJson1DeleteDimensionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/dimensions/{name}"; + if (input.name !== undefined) { + const labelValue = input.name; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: name."); + } + resolvedPath = resolvedPath.replace("{name}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: name."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteDimensionCommand = serializeAws_restJson1DeleteDimensionCommand; +const serializeAws_restJson1DeleteDomainConfigurationCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/domainConfigurations/{domainConfigurationName}"; + if (input.domainConfigurationName !== undefined) { + const labelValue = input.domainConfigurationName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: domainConfigurationName."); + } + resolvedPath = resolvedPath.replace("{domainConfigurationName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: domainConfigurationName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteDomainConfigurationCommand = serializeAws_restJson1DeleteDomainConfigurationCommand; +const serializeAws_restJson1DeleteDynamicThingGroupCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/dynamic-thing-groups/{thingGroupName}"; + if (input.thingGroupName !== undefined) { + const labelValue = input.thingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingGroupName."); + } + resolvedPath = resolvedPath.replace("{thingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingGroupName."); + } + const query = { + ...(input.expectedVersion !== undefined && { expectedVersion: input.expectedVersion.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteDynamicThingGroupCommand = serializeAws_restJson1DeleteDynamicThingGroupCommand; +const serializeAws_restJson1DeleteJobCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/jobs/{jobId}"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + const query = { + ...(input.force !== undefined && { force: input.force.toString() }), + ...(input.namespaceId !== undefined && { namespaceId: input.namespaceId }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteJobCommand = serializeAws_restJson1DeleteJobCommand; +const serializeAws_restJson1DeleteJobExecutionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/things/{thingName}/jobs/{jobId}/executionNumber/{executionNumber}"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + if (input.executionNumber !== undefined) { + const labelValue = input.executionNumber.toString(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: executionNumber."); + } + resolvedPath = resolvedPath.replace("{executionNumber}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: executionNumber."); + } + const query = { + ...(input.force !== undefined && { force: input.force.toString() }), + ...(input.namespaceId !== undefined && { namespaceId: input.namespaceId }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteJobExecutionCommand = serializeAws_restJson1DeleteJobExecutionCommand; +const serializeAws_restJson1DeleteMitigationActionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/mitigationactions/actions/{actionName}"; + if (input.actionName !== undefined) { + const labelValue = input.actionName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: actionName."); + } + resolvedPath = resolvedPath.replace("{actionName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: actionName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteMitigationActionCommand = serializeAws_restJson1DeleteMitigationActionCommand; +const serializeAws_restJson1DeleteOTAUpdateCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/otaUpdates/{otaUpdateId}"; + if (input.otaUpdateId !== undefined) { + const labelValue = input.otaUpdateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: otaUpdateId."); + } + resolvedPath = resolvedPath.replace("{otaUpdateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: otaUpdateId."); + } + const query = { + ...(input.deleteStream !== undefined && { deleteStream: input.deleteStream.toString() }), + ...(input.forceDeleteAWSJob !== undefined && { forceDeleteAWSJob: input.forceDeleteAWSJob.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteOTAUpdateCommand = serializeAws_restJson1DeleteOTAUpdateCommand; +const serializeAws_restJson1DeletePolicyCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/policies/{policyName}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeletePolicyCommand = serializeAws_restJson1DeletePolicyCommand; +const serializeAws_restJson1DeletePolicyVersionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/policies/{policyName}/version/{policyVersionId}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + if (input.policyVersionId !== undefined) { + const labelValue = input.policyVersionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyVersionId."); + } + resolvedPath = resolvedPath.replace("{policyVersionId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyVersionId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeletePolicyVersionCommand = serializeAws_restJson1DeletePolicyVersionCommand; +const serializeAws_restJson1DeleteProvisioningTemplateCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/provisioning-templates/{templateName}"; + if (input.templateName !== undefined) { + const labelValue = input.templateName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: templateName."); + } + resolvedPath = resolvedPath.replace("{templateName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: templateName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteProvisioningTemplateCommand = serializeAws_restJson1DeleteProvisioningTemplateCommand; +const serializeAws_restJson1DeleteProvisioningTemplateVersionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/provisioning-templates/{templateName}/versions/{versionId}"; + if (input.templateName !== undefined) { + const labelValue = input.templateName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: templateName."); + } + resolvedPath = resolvedPath.replace("{templateName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: templateName."); + } + if (input.versionId !== undefined) { + const labelValue = input.versionId.toString(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: versionId."); + } + resolvedPath = resolvedPath.replace("{versionId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: versionId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteProvisioningTemplateVersionCommand = serializeAws_restJson1DeleteProvisioningTemplateVersionCommand; +const serializeAws_restJson1DeleteRegistrationCodeCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/registrationcode"; + let body; + body = ""; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteRegistrationCodeCommand = serializeAws_restJson1DeleteRegistrationCodeCommand; +const serializeAws_restJson1DeleteRoleAliasCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/role-aliases/{roleAlias}"; + if (input.roleAlias !== undefined) { + const labelValue = input.roleAlias; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: roleAlias."); + } + resolvedPath = resolvedPath.replace("{roleAlias}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: roleAlias."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteRoleAliasCommand = serializeAws_restJson1DeleteRoleAliasCommand; +const serializeAws_restJson1DeleteScheduledAuditCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/scheduledaudits/{scheduledAuditName}"; + if (input.scheduledAuditName !== undefined) { + const labelValue = input.scheduledAuditName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: scheduledAuditName."); + } + resolvedPath = resolvedPath.replace("{scheduledAuditName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: scheduledAuditName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteScheduledAuditCommand = serializeAws_restJson1DeleteScheduledAuditCommand; +const serializeAws_restJson1DeleteSecurityProfileCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/security-profiles/{securityProfileName}"; + if (input.securityProfileName !== undefined) { + const labelValue = input.securityProfileName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: securityProfileName."); + } + resolvedPath = resolvedPath.replace("{securityProfileName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: securityProfileName."); + } + const query = { + ...(input.expectedVersion !== undefined && { expectedVersion: input.expectedVersion.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteSecurityProfileCommand = serializeAws_restJson1DeleteSecurityProfileCommand; +const serializeAws_restJson1DeleteStreamCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/streams/{streamId}"; + if (input.streamId !== undefined) { + const labelValue = input.streamId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: streamId."); + } + resolvedPath = resolvedPath.replace("{streamId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: streamId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteStreamCommand = serializeAws_restJson1DeleteStreamCommand; +const serializeAws_restJson1DeleteThingCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/things/{thingName}"; + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + const query = { + ...(input.expectedVersion !== undefined && { expectedVersion: input.expectedVersion.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteThingCommand = serializeAws_restJson1DeleteThingCommand; +const serializeAws_restJson1DeleteThingGroupCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-groups/{thingGroupName}"; + if (input.thingGroupName !== undefined) { + const labelValue = input.thingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingGroupName."); + } + resolvedPath = resolvedPath.replace("{thingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingGroupName."); + } + const query = { + ...(input.expectedVersion !== undefined && { expectedVersion: input.expectedVersion.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteThingGroupCommand = serializeAws_restJson1DeleteThingGroupCommand; +const serializeAws_restJson1DeleteThingTypeCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-types/{thingTypeName}"; + if (input.thingTypeName !== undefined) { + const labelValue = input.thingTypeName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingTypeName."); + } + resolvedPath = resolvedPath.replace("{thingTypeName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingTypeName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteThingTypeCommand = serializeAws_restJson1DeleteThingTypeCommand; +const serializeAws_restJson1DeleteTopicRuleCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/rules/{ruleName}"; + if (input.ruleName !== undefined) { + const labelValue = input.ruleName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ruleName."); + } + resolvedPath = resolvedPath.replace("{ruleName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: ruleName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteTopicRuleCommand = serializeAws_restJson1DeleteTopicRuleCommand; +const serializeAws_restJson1DeleteTopicRuleDestinationCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/destinations/{arn+}"; + if (input.arn !== undefined) { + const labelValue = input.arn; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: arn."); + } + resolvedPath = resolvedPath.replace("{arn+}", labelValue + .split("/") + .map((segment) => smithy_client_1.extendedEncodeURIComponent(segment)) + .join("/")); + } + else { + throw new Error("No value provided for input HTTP label: arn."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeleteTopicRuleDestinationCommand = serializeAws_restJson1DeleteTopicRuleDestinationCommand; +const serializeAws_restJson1DeleteV2LoggingLevelCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/v2LoggingLevel"; + const query = { + ...(input.targetType !== undefined && { targetType: input.targetType }), + ...(input.targetName !== undefined && { targetName: input.targetName }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DeleteV2LoggingLevelCommand = serializeAws_restJson1DeleteV2LoggingLevelCommand; +const serializeAws_restJson1DeprecateThingTypeCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/thing-types/{thingTypeName}/deprecate"; + if (input.thingTypeName !== undefined) { + const labelValue = input.thingTypeName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingTypeName."); + } + resolvedPath = resolvedPath.replace("{thingTypeName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingTypeName."); + } + let body; + body = JSON.stringify({ + ...(input.undoDeprecate !== undefined && input.undoDeprecate !== null && { undoDeprecate: input.undoDeprecate }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DeprecateThingTypeCommand = serializeAws_restJson1DeprecateThingTypeCommand; +const serializeAws_restJson1DescribeAccountAuditConfigurationCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/configuration"; + let body; + body = ""; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeAccountAuditConfigurationCommand = serializeAws_restJson1DescribeAccountAuditConfigurationCommand; +const serializeAws_restJson1DescribeAuditFindingCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/findings/{findingId}"; + if (input.findingId !== undefined) { + const labelValue = input.findingId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: findingId."); + } + resolvedPath = resolvedPath.replace("{findingId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: findingId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeAuditFindingCommand = serializeAws_restJson1DescribeAuditFindingCommand; +const serializeAws_restJson1DescribeAuditMitigationActionsTaskCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/mitigationactions/tasks/{taskId}"; + if (input.taskId !== undefined) { + const labelValue = input.taskId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: taskId."); + } + resolvedPath = resolvedPath.replace("{taskId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: taskId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeAuditMitigationActionsTaskCommand = serializeAws_restJson1DescribeAuditMitigationActionsTaskCommand; +const serializeAws_restJson1DescribeAuditSuppressionCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/suppressions/describe"; + let body; + body = JSON.stringify({ + ...(input.checkName !== undefined && input.checkName !== null && { checkName: input.checkName }), + ...(input.resourceIdentifier !== undefined && + input.resourceIdentifier !== null && { + resourceIdentifier: serializeAws_restJson1ResourceIdentifier(input.resourceIdentifier, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeAuditSuppressionCommand = serializeAws_restJson1DescribeAuditSuppressionCommand; +const serializeAws_restJson1DescribeAuditTaskCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/tasks/{taskId}"; + if (input.taskId !== undefined) { + const labelValue = input.taskId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: taskId."); + } + resolvedPath = resolvedPath.replace("{taskId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: taskId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeAuditTaskCommand = serializeAws_restJson1DescribeAuditTaskCommand; +const serializeAws_restJson1DescribeAuthorizerCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/authorizer/{authorizerName}"; + if (input.authorizerName !== undefined) { + const labelValue = input.authorizerName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: authorizerName."); + } + resolvedPath = resolvedPath.replace("{authorizerName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: authorizerName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeAuthorizerCommand = serializeAws_restJson1DescribeAuthorizerCommand; +const serializeAws_restJson1DescribeBillingGroupCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/billing-groups/{billingGroupName}"; + if (input.billingGroupName !== undefined) { + const labelValue = input.billingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: billingGroupName."); + } + resolvedPath = resolvedPath.replace("{billingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: billingGroupName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeBillingGroupCommand = serializeAws_restJson1DescribeBillingGroupCommand; +const serializeAws_restJson1DescribeCACertificateCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/cacertificate/{certificateId}"; + if (input.certificateId !== undefined) { + const labelValue = input.certificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: certificateId."); + } + resolvedPath = resolvedPath.replace("{certificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: certificateId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeCACertificateCommand = serializeAws_restJson1DescribeCACertificateCommand; +const serializeAws_restJson1DescribeCertificateCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/certificates/{certificateId}"; + if (input.certificateId !== undefined) { + const labelValue = input.certificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: certificateId."); + } + resolvedPath = resolvedPath.replace("{certificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: certificateId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeCertificateCommand = serializeAws_restJson1DescribeCertificateCommand; +const serializeAws_restJson1DescribeDefaultAuthorizerCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/default-authorizer"; + let body; + body = ""; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeDefaultAuthorizerCommand = serializeAws_restJson1DescribeDefaultAuthorizerCommand; +const serializeAws_restJson1DescribeDimensionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/dimensions/{name}"; + if (input.name !== undefined) { + const labelValue = input.name; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: name."); + } + resolvedPath = resolvedPath.replace("{name}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: name."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeDimensionCommand = serializeAws_restJson1DescribeDimensionCommand; +const serializeAws_restJson1DescribeDomainConfigurationCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/domainConfigurations/{domainConfigurationName}"; + if (input.domainConfigurationName !== undefined) { + const labelValue = input.domainConfigurationName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: domainConfigurationName."); + } + resolvedPath = resolvedPath.replace("{domainConfigurationName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: domainConfigurationName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeDomainConfigurationCommand = serializeAws_restJson1DescribeDomainConfigurationCommand; +const serializeAws_restJson1DescribeEndpointCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/endpoint"; + const query = { + ...(input.endpointType !== undefined && { endpointType: input.endpointType }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DescribeEndpointCommand = serializeAws_restJson1DescribeEndpointCommand; +const serializeAws_restJson1DescribeEventConfigurationsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/event-configurations"; + let body; + body = ""; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeEventConfigurationsCommand = serializeAws_restJson1DescribeEventConfigurationsCommand; +const serializeAws_restJson1DescribeIndexCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/indices/{indexName}"; + if (input.indexName !== undefined) { + const labelValue = input.indexName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: indexName."); + } + resolvedPath = resolvedPath.replace("{indexName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: indexName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeIndexCommand = serializeAws_restJson1DescribeIndexCommand; +const serializeAws_restJson1DescribeJobCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/jobs/{jobId}"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeJobCommand = serializeAws_restJson1DescribeJobCommand; +const serializeAws_restJson1DescribeJobExecutionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/things/{thingName}/jobs/{jobId}"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + const query = { + ...(input.executionNumber !== undefined && { executionNumber: input.executionNumber.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DescribeJobExecutionCommand = serializeAws_restJson1DescribeJobExecutionCommand; +const serializeAws_restJson1DescribeMitigationActionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/mitigationactions/actions/{actionName}"; + if (input.actionName !== undefined) { + const labelValue = input.actionName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: actionName."); + } + resolvedPath = resolvedPath.replace("{actionName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: actionName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeMitigationActionCommand = serializeAws_restJson1DescribeMitigationActionCommand; +const serializeAws_restJson1DescribeProvisioningTemplateCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/provisioning-templates/{templateName}"; + if (input.templateName !== undefined) { + const labelValue = input.templateName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: templateName."); + } + resolvedPath = resolvedPath.replace("{templateName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: templateName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeProvisioningTemplateCommand = serializeAws_restJson1DescribeProvisioningTemplateCommand; +const serializeAws_restJson1DescribeProvisioningTemplateVersionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/provisioning-templates/{templateName}/versions/{versionId}"; + if (input.templateName !== undefined) { + const labelValue = input.templateName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: templateName."); + } + resolvedPath = resolvedPath.replace("{templateName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: templateName."); + } + if (input.versionId !== undefined) { + const labelValue = input.versionId.toString(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: versionId."); + } + resolvedPath = resolvedPath.replace("{versionId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: versionId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeProvisioningTemplateVersionCommand = serializeAws_restJson1DescribeProvisioningTemplateVersionCommand; +const serializeAws_restJson1DescribeRoleAliasCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/role-aliases/{roleAlias}"; + if (input.roleAlias !== undefined) { + const labelValue = input.roleAlias; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: roleAlias."); + } + resolvedPath = resolvedPath.replace("{roleAlias}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: roleAlias."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeRoleAliasCommand = serializeAws_restJson1DescribeRoleAliasCommand; +const serializeAws_restJson1DescribeScheduledAuditCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/scheduledaudits/{scheduledAuditName}"; + if (input.scheduledAuditName !== undefined) { + const labelValue = input.scheduledAuditName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: scheduledAuditName."); + } + resolvedPath = resolvedPath.replace("{scheduledAuditName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: scheduledAuditName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeScheduledAuditCommand = serializeAws_restJson1DescribeScheduledAuditCommand; +const serializeAws_restJson1DescribeSecurityProfileCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/security-profiles/{securityProfileName}"; + if (input.securityProfileName !== undefined) { + const labelValue = input.securityProfileName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: securityProfileName."); + } + resolvedPath = resolvedPath.replace("{securityProfileName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: securityProfileName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeSecurityProfileCommand = serializeAws_restJson1DescribeSecurityProfileCommand; +const serializeAws_restJson1DescribeStreamCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/streams/{streamId}"; + if (input.streamId !== undefined) { + const labelValue = input.streamId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: streamId."); + } + resolvedPath = resolvedPath.replace("{streamId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: streamId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeStreamCommand = serializeAws_restJson1DescribeStreamCommand; +const serializeAws_restJson1DescribeThingCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/things/{thingName}"; + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeThingCommand = serializeAws_restJson1DescribeThingCommand; +const serializeAws_restJson1DescribeThingGroupCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-groups/{thingGroupName}"; + if (input.thingGroupName !== undefined) { + const labelValue = input.thingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingGroupName."); + } + resolvedPath = resolvedPath.replace("{thingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingGroupName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeThingGroupCommand = serializeAws_restJson1DescribeThingGroupCommand; +const serializeAws_restJson1DescribeThingRegistrationTaskCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-registration-tasks/{taskId}"; + if (input.taskId !== undefined) { + const labelValue = input.taskId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: taskId."); + } + resolvedPath = resolvedPath.replace("{taskId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: taskId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeThingRegistrationTaskCommand = serializeAws_restJson1DescribeThingRegistrationTaskCommand; +const serializeAws_restJson1DescribeThingTypeCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-types/{thingTypeName}"; + if (input.thingTypeName !== undefined) { + const labelValue = input.thingTypeName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingTypeName."); + } + resolvedPath = resolvedPath.replace("{thingTypeName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingTypeName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DescribeThingTypeCommand = serializeAws_restJson1DescribeThingTypeCommand; +const serializeAws_restJson1DetachPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/target-policies/{policyName}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + let body; + body = JSON.stringify({ + ...(input.target !== undefined && input.target !== null && { target: input.target }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DetachPolicyCommand = serializeAws_restJson1DetachPolicyCommand; +const serializeAws_restJson1DetachPrincipalPolicyCommand = async (input, context) => { + const headers = { + ...(isSerializableHeaderValue(input.principal) && { "x-amzn-iot-principal": input.principal }), + }; + let resolvedPath = "/principal-policies/{policyName}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DetachPrincipalPolicyCommand = serializeAws_restJson1DetachPrincipalPolicyCommand; +const serializeAws_restJson1DetachSecurityProfileCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/security-profiles/{securityProfileName}/targets"; + if (input.securityProfileName !== undefined) { + const labelValue = input.securityProfileName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: securityProfileName."); + } + resolvedPath = resolvedPath.replace("{securityProfileName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: securityProfileName."); + } + const query = { + ...(input.securityProfileTargetArn !== undefined && { securityProfileTargetArn: input.securityProfileTargetArn }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1DetachSecurityProfileCommand = serializeAws_restJson1DetachSecurityProfileCommand; +const serializeAws_restJson1DetachThingPrincipalCommand = async (input, context) => { + const headers = { + ...(isSerializableHeaderValue(input.principal) && { "x-amzn-principal": input.principal }), + }; + let resolvedPath = "/things/{thingName}/principals"; + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DetachThingPrincipalCommand = serializeAws_restJson1DetachThingPrincipalCommand; +const serializeAws_restJson1DisableTopicRuleCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/rules/{ruleName}/disable"; + if (input.ruleName !== undefined) { + const labelValue = input.ruleName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ruleName."); + } + resolvedPath = resolvedPath.replace("{ruleName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: ruleName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1DisableTopicRuleCommand = serializeAws_restJson1DisableTopicRuleCommand; +const serializeAws_restJson1EnableTopicRuleCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/rules/{ruleName}/enable"; + if (input.ruleName !== undefined) { + const labelValue = input.ruleName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ruleName."); + } + resolvedPath = resolvedPath.replace("{ruleName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: ruleName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1EnableTopicRuleCommand = serializeAws_restJson1EnableTopicRuleCommand; +const serializeAws_restJson1GetCardinalityCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/indices/cardinality"; + let body; + body = JSON.stringify({ + ...(input.aggregationField !== undefined && + input.aggregationField !== null && { aggregationField: input.aggregationField }), + ...(input.indexName !== undefined && input.indexName !== null && { indexName: input.indexName }), + ...(input.queryString !== undefined && input.queryString !== null && { queryString: input.queryString }), + ...(input.queryVersion !== undefined && input.queryVersion !== null && { queryVersion: input.queryVersion }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetCardinalityCommand = serializeAws_restJson1GetCardinalityCommand; +const serializeAws_restJson1GetEffectivePoliciesCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/effective-policies"; + const query = { + ...(input.thingName !== undefined && { thingName: input.thingName }), + }; + let body; + body = JSON.stringify({ + ...(input.cognitoIdentityPoolId !== undefined && + input.cognitoIdentityPoolId !== null && { cognitoIdentityPoolId: input.cognitoIdentityPoolId }), + ...(input.principal !== undefined && input.principal !== null && { principal: input.principal }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1GetEffectivePoliciesCommand = serializeAws_restJson1GetEffectivePoliciesCommand; +const serializeAws_restJson1GetIndexingConfigurationCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/indexing/config"; + let body; + body = ""; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetIndexingConfigurationCommand = serializeAws_restJson1GetIndexingConfigurationCommand; +const serializeAws_restJson1GetJobDocumentCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/jobs/{jobId}/job-document"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetJobDocumentCommand = serializeAws_restJson1GetJobDocumentCommand; +const serializeAws_restJson1GetLoggingOptionsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/loggingOptions"; + let body; + body = ""; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetLoggingOptionsCommand = serializeAws_restJson1GetLoggingOptionsCommand; +const serializeAws_restJson1GetOTAUpdateCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/otaUpdates/{otaUpdateId}"; + if (input.otaUpdateId !== undefined) { + const labelValue = input.otaUpdateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: otaUpdateId."); + } + resolvedPath = resolvedPath.replace("{otaUpdateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: otaUpdateId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetOTAUpdateCommand = serializeAws_restJson1GetOTAUpdateCommand; +const serializeAws_restJson1GetPercentilesCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/indices/percentiles"; + let body; + body = JSON.stringify({ + ...(input.aggregationField !== undefined && + input.aggregationField !== null && { aggregationField: input.aggregationField }), + ...(input.indexName !== undefined && input.indexName !== null && { indexName: input.indexName }), + ...(input.percents !== undefined && + input.percents !== null && { percents: serializeAws_restJson1PercentList(input.percents, context) }), + ...(input.queryString !== undefined && input.queryString !== null && { queryString: input.queryString }), + ...(input.queryVersion !== undefined && input.queryVersion !== null && { queryVersion: input.queryVersion }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetPercentilesCommand = serializeAws_restJson1GetPercentilesCommand; +const serializeAws_restJson1GetPolicyCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/policies/{policyName}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetPolicyCommand = serializeAws_restJson1GetPolicyCommand; +const serializeAws_restJson1GetPolicyVersionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/policies/{policyName}/version/{policyVersionId}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + if (input.policyVersionId !== undefined) { + const labelValue = input.policyVersionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyVersionId."); + } + resolvedPath = resolvedPath.replace("{policyVersionId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyVersionId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetPolicyVersionCommand = serializeAws_restJson1GetPolicyVersionCommand; +const serializeAws_restJson1GetRegistrationCodeCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/registrationcode"; + let body; + body = ""; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetRegistrationCodeCommand = serializeAws_restJson1GetRegistrationCodeCommand; +const serializeAws_restJson1GetStatisticsCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/indices/statistics"; + let body; + body = JSON.stringify({ + ...(input.aggregationField !== undefined && + input.aggregationField !== null && { aggregationField: input.aggregationField }), + ...(input.indexName !== undefined && input.indexName !== null && { indexName: input.indexName }), + ...(input.queryString !== undefined && input.queryString !== null && { queryString: input.queryString }), + ...(input.queryVersion !== undefined && input.queryVersion !== null && { queryVersion: input.queryVersion }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetStatisticsCommand = serializeAws_restJson1GetStatisticsCommand; +const serializeAws_restJson1GetTopicRuleCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/rules/{ruleName}"; + if (input.ruleName !== undefined) { + const labelValue = input.ruleName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ruleName."); + } + resolvedPath = resolvedPath.replace("{ruleName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: ruleName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetTopicRuleCommand = serializeAws_restJson1GetTopicRuleCommand; +const serializeAws_restJson1GetTopicRuleDestinationCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/destinations/{arn+}"; + if (input.arn !== undefined) { + const labelValue = input.arn; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: arn."); + } + resolvedPath = resolvedPath.replace("{arn+}", labelValue + .split("/") + .map((segment) => smithy_client_1.extendedEncodeURIComponent(segment)) + .join("/")); + } + else { + throw new Error("No value provided for input HTTP label: arn."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetTopicRuleDestinationCommand = serializeAws_restJson1GetTopicRuleDestinationCommand; +const serializeAws_restJson1GetV2LoggingOptionsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/v2LoggingOptions"; + let body; + body = ""; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1GetV2LoggingOptionsCommand = serializeAws_restJson1GetV2LoggingOptionsCommand; +const serializeAws_restJson1ListActiveViolationsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/active-violations"; + const query = { + ...(input.thingName !== undefined && { thingName: input.thingName }), + ...(input.securityProfileName !== undefined && { securityProfileName: input.securityProfileName }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListActiveViolationsCommand = serializeAws_restJson1ListActiveViolationsCommand; +const serializeAws_restJson1ListAttachedPoliciesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/attached-policies/{target}"; + if (input.target !== undefined) { + const labelValue = input.target; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: target."); + } + resolvedPath = resolvedPath.replace("{target}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: target."); + } + const query = { + ...(input.recursive !== undefined && { recursive: input.recursive.toString() }), + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListAttachedPoliciesCommand = serializeAws_restJson1ListAttachedPoliciesCommand; +const serializeAws_restJson1ListAuditFindingsCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/findings"; + let body; + body = JSON.stringify({ + ...(input.checkName !== undefined && input.checkName !== null && { checkName: input.checkName }), + ...(input.endTime !== undefined && + input.endTime !== null && { endTime: Math.round(input.endTime.getTime() / 1000) }), + ...(input.listSuppressedFindings !== undefined && + input.listSuppressedFindings !== null && { listSuppressedFindings: input.listSuppressedFindings }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.resourceIdentifier !== undefined && + input.resourceIdentifier !== null && { + resourceIdentifier: serializeAws_restJson1ResourceIdentifier(input.resourceIdentifier, context), + }), + ...(input.startTime !== undefined && + input.startTime !== null && { startTime: Math.round(input.startTime.getTime() / 1000) }), + ...(input.taskId !== undefined && input.taskId !== null && { taskId: input.taskId }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1ListAuditFindingsCommand = serializeAws_restJson1ListAuditFindingsCommand; +const serializeAws_restJson1ListAuditMitigationActionsExecutionsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/mitigationactions/executions"; + const query = { + ...(input.taskId !== undefined && { taskId: input.taskId }), + ...(input.actionStatus !== undefined && { actionStatus: input.actionStatus }), + ...(input.findingId !== undefined && { findingId: input.findingId }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListAuditMitigationActionsExecutionsCommand = serializeAws_restJson1ListAuditMitigationActionsExecutionsCommand; +const serializeAws_restJson1ListAuditMitigationActionsTasksCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/mitigationactions/tasks"; + const query = { + ...(input.auditTaskId !== undefined && { auditTaskId: input.auditTaskId }), + ...(input.findingId !== undefined && { findingId: input.findingId }), + ...(input.taskStatus !== undefined && { taskStatus: input.taskStatus }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.startTime !== undefined && { startTime: (input.startTime.toISOString().split(".")[0] + "Z").toString() }), + ...(input.endTime !== undefined && { endTime: (input.endTime.toISOString().split(".")[0] + "Z").toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListAuditMitigationActionsTasksCommand = serializeAws_restJson1ListAuditMitigationActionsTasksCommand; +const serializeAws_restJson1ListAuditSuppressionsCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/suppressions/list"; + let body; + body = JSON.stringify({ + ...(input.ascendingOrder !== undefined && + input.ascendingOrder !== null && { ascendingOrder: input.ascendingOrder }), + ...(input.checkName !== undefined && input.checkName !== null && { checkName: input.checkName }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.resourceIdentifier !== undefined && + input.resourceIdentifier !== null && { + resourceIdentifier: serializeAws_restJson1ResourceIdentifier(input.resourceIdentifier, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1ListAuditSuppressionsCommand = serializeAws_restJson1ListAuditSuppressionsCommand; +const serializeAws_restJson1ListAuditTasksCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/tasks"; + const query = { + ...(input.startTime !== undefined && { startTime: (input.startTime.toISOString().split(".")[0] + "Z").toString() }), + ...(input.endTime !== undefined && { endTime: (input.endTime.toISOString().split(".")[0] + "Z").toString() }), + ...(input.taskType !== undefined && { taskType: input.taskType }), + ...(input.taskStatus !== undefined && { taskStatus: input.taskStatus }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListAuditTasksCommand = serializeAws_restJson1ListAuditTasksCommand; +const serializeAws_restJson1ListAuthorizersCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/authorizers"; + const query = { + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.ascendingOrder !== undefined && { isAscendingOrder: input.ascendingOrder.toString() }), + ...(input.status !== undefined && { status: input.status }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListAuthorizersCommand = serializeAws_restJson1ListAuthorizersCommand; +const serializeAws_restJson1ListBillingGroupsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/billing-groups"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.namePrefixFilter !== undefined && { namePrefixFilter: input.namePrefixFilter }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListBillingGroupsCommand = serializeAws_restJson1ListBillingGroupsCommand; +const serializeAws_restJson1ListCACertificatesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/cacertificates"; + const query = { + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.ascendingOrder !== undefined && { isAscendingOrder: input.ascendingOrder.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListCACertificatesCommand = serializeAws_restJson1ListCACertificatesCommand; +const serializeAws_restJson1ListCertificatesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/certificates"; + const query = { + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.ascendingOrder !== undefined && { isAscendingOrder: input.ascendingOrder.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListCertificatesCommand = serializeAws_restJson1ListCertificatesCommand; +const serializeAws_restJson1ListCertificatesByCACommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/certificates-by-ca/{caCertificateId}"; + if (input.caCertificateId !== undefined) { + const labelValue = input.caCertificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: caCertificateId."); + } + resolvedPath = resolvedPath.replace("{caCertificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: caCertificateId."); + } + const query = { + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.ascendingOrder !== undefined && { isAscendingOrder: input.ascendingOrder.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListCertificatesByCACommand = serializeAws_restJson1ListCertificatesByCACommand; +const serializeAws_restJson1ListDimensionsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/dimensions"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListDimensionsCommand = serializeAws_restJson1ListDimensionsCommand; +const serializeAws_restJson1ListDomainConfigurationsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/domainConfigurations"; + const query = { + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + ...(input.serviceType !== undefined && { serviceType: input.serviceType }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListDomainConfigurationsCommand = serializeAws_restJson1ListDomainConfigurationsCommand; +const serializeAws_restJson1ListIndicesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/indices"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListIndicesCommand = serializeAws_restJson1ListIndicesCommand; +const serializeAws_restJson1ListJobExecutionsForJobCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/jobs/{jobId}/things"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + const query = { + ...(input.status !== undefined && { status: input.status }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListJobExecutionsForJobCommand = serializeAws_restJson1ListJobExecutionsForJobCommand; +const serializeAws_restJson1ListJobExecutionsForThingCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/things/{thingName}/jobs"; + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + const query = { + ...(input.status !== undefined && { status: input.status }), + ...(input.namespaceId !== undefined && { namespaceId: input.namespaceId }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListJobExecutionsForThingCommand = serializeAws_restJson1ListJobExecutionsForThingCommand; +const serializeAws_restJson1ListJobsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/jobs"; + const query = { + ...(input.status !== undefined && { status: input.status }), + ...(input.targetSelection !== undefined && { targetSelection: input.targetSelection }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.thingGroupName !== undefined && { thingGroupName: input.thingGroupName }), + ...(input.thingGroupId !== undefined && { thingGroupId: input.thingGroupId }), + ...(input.namespaceId !== undefined && { namespaceId: input.namespaceId }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListJobsCommand = serializeAws_restJson1ListJobsCommand; +const serializeAws_restJson1ListMitigationActionsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/mitigationactions/actions"; + const query = { + ...(input.actionType !== undefined && { actionType: input.actionType }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListMitigationActionsCommand = serializeAws_restJson1ListMitigationActionsCommand; +const serializeAws_restJson1ListOTAUpdatesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/otaUpdates"; + const query = { + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.otaUpdateStatus !== undefined && { otaUpdateStatus: input.otaUpdateStatus }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListOTAUpdatesCommand = serializeAws_restJson1ListOTAUpdatesCommand; +const serializeAws_restJson1ListOutgoingCertificatesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/certificates-out-going"; + const query = { + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.ascendingOrder !== undefined && { isAscendingOrder: input.ascendingOrder.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListOutgoingCertificatesCommand = serializeAws_restJson1ListOutgoingCertificatesCommand; +const serializeAws_restJson1ListPoliciesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/policies"; + const query = { + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + ...(input.ascendingOrder !== undefined && { isAscendingOrder: input.ascendingOrder.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListPoliciesCommand = serializeAws_restJson1ListPoliciesCommand; +const serializeAws_restJson1ListPolicyPrincipalsCommand = async (input, context) => { + const headers = { + ...(isSerializableHeaderValue(input.policyName) && { "x-amzn-iot-policy": input.policyName }), + }; + let resolvedPath = "/policy-principals"; + const query = { + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + ...(input.ascendingOrder !== undefined && { isAscendingOrder: input.ascendingOrder.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListPolicyPrincipalsCommand = serializeAws_restJson1ListPolicyPrincipalsCommand; +const serializeAws_restJson1ListPolicyVersionsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/policies/{policyName}/version"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1ListPolicyVersionsCommand = serializeAws_restJson1ListPolicyVersionsCommand; +const serializeAws_restJson1ListPrincipalPoliciesCommand = async (input, context) => { + const headers = { + ...(isSerializableHeaderValue(input.principal) && { "x-amzn-iot-principal": input.principal }), + }; + let resolvedPath = "/principal-policies"; + const query = { + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + ...(input.ascendingOrder !== undefined && { isAscendingOrder: input.ascendingOrder.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListPrincipalPoliciesCommand = serializeAws_restJson1ListPrincipalPoliciesCommand; +const serializeAws_restJson1ListPrincipalThingsCommand = async (input, context) => { + const headers = { + ...(isSerializableHeaderValue(input.principal) && { "x-amzn-principal": input.principal }), + }; + let resolvedPath = "/principals/things"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListPrincipalThingsCommand = serializeAws_restJson1ListPrincipalThingsCommand; +const serializeAws_restJson1ListProvisioningTemplatesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/provisioning-templates"; + const query = { + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListProvisioningTemplatesCommand = serializeAws_restJson1ListProvisioningTemplatesCommand; +const serializeAws_restJson1ListProvisioningTemplateVersionsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/provisioning-templates/{templateName}/versions"; + if (input.templateName !== undefined) { + const labelValue = input.templateName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: templateName."); + } + resolvedPath = resolvedPath.replace("{templateName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: templateName."); + } + const query = { + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListProvisioningTemplateVersionsCommand = serializeAws_restJson1ListProvisioningTemplateVersionsCommand; +const serializeAws_restJson1ListRoleAliasesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/role-aliases"; + const query = { + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.ascendingOrder !== undefined && { isAscendingOrder: input.ascendingOrder.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListRoleAliasesCommand = serializeAws_restJson1ListRoleAliasesCommand; +const serializeAws_restJson1ListScheduledAuditsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/audit/scheduledaudits"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListScheduledAuditsCommand = serializeAws_restJson1ListScheduledAuditsCommand; +const serializeAws_restJson1ListSecurityProfilesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/security-profiles"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.dimensionName !== undefined && { dimensionName: input.dimensionName }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListSecurityProfilesCommand = serializeAws_restJson1ListSecurityProfilesCommand; +const serializeAws_restJson1ListSecurityProfilesForTargetCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/security-profiles-for-target"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.recursive !== undefined && { recursive: input.recursive.toString() }), + ...(input.securityProfileTargetArn !== undefined && { securityProfileTargetArn: input.securityProfileTargetArn }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListSecurityProfilesForTargetCommand = serializeAws_restJson1ListSecurityProfilesForTargetCommand; +const serializeAws_restJson1ListStreamsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/streams"; + const query = { + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.ascendingOrder !== undefined && { isAscendingOrder: input.ascendingOrder.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListStreamsCommand = serializeAws_restJson1ListStreamsCommand; +const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/tags"; + const query = { + ...(input.resourceArn !== undefined && { resourceArn: input.resourceArn }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand; +const serializeAws_restJson1ListTargetsForPolicyCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/policy-targets/{policyName}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + const query = { + ...(input.marker !== undefined && { marker: input.marker }), + ...(input.pageSize !== undefined && { pageSize: input.pageSize.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListTargetsForPolicyCommand = serializeAws_restJson1ListTargetsForPolicyCommand; +const serializeAws_restJson1ListTargetsForSecurityProfileCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/security-profiles/{securityProfileName}/targets"; + if (input.securityProfileName !== undefined) { + const labelValue = input.securityProfileName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: securityProfileName."); + } + resolvedPath = resolvedPath.replace("{securityProfileName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: securityProfileName."); + } + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListTargetsForSecurityProfileCommand = serializeAws_restJson1ListTargetsForSecurityProfileCommand; +const serializeAws_restJson1ListThingGroupsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-groups"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.parentGroup !== undefined && { parentGroup: input.parentGroup }), + ...(input.namePrefixFilter !== undefined && { namePrefixFilter: input.namePrefixFilter }), + ...(input.recursive !== undefined && { recursive: input.recursive.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListThingGroupsCommand = serializeAws_restJson1ListThingGroupsCommand; +const serializeAws_restJson1ListThingGroupsForThingCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/things/{thingName}/thing-groups"; + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListThingGroupsForThingCommand = serializeAws_restJson1ListThingGroupsForThingCommand; +const serializeAws_restJson1ListThingPrincipalsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/things/{thingName}/principals"; + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListThingPrincipalsCommand = serializeAws_restJson1ListThingPrincipalsCommand; +const serializeAws_restJson1ListThingRegistrationTaskReportsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-registration-tasks/{taskId}/reports"; + if (input.taskId !== undefined) { + const labelValue = input.taskId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: taskId."); + } + resolvedPath = resolvedPath.replace("{taskId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: taskId."); + } + const query = { + ...(input.reportType !== undefined && { reportType: input.reportType }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListThingRegistrationTaskReportsCommand = serializeAws_restJson1ListThingRegistrationTaskReportsCommand; +const serializeAws_restJson1ListThingRegistrationTasksCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-registration-tasks"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.status !== undefined && { status: input.status }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListThingRegistrationTasksCommand = serializeAws_restJson1ListThingRegistrationTasksCommand; +const serializeAws_restJson1ListThingsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/things"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.attributeName !== undefined && { attributeName: input.attributeName }), + ...(input.attributeValue !== undefined && { attributeValue: input.attributeValue }), + ...(input.thingTypeName !== undefined && { thingTypeName: input.thingTypeName }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListThingsCommand = serializeAws_restJson1ListThingsCommand; +const serializeAws_restJson1ListThingsInBillingGroupCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/billing-groups/{billingGroupName}/things"; + if (input.billingGroupName !== undefined) { + const labelValue = input.billingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: billingGroupName."); + } + resolvedPath = resolvedPath.replace("{billingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: billingGroupName."); + } + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListThingsInBillingGroupCommand = serializeAws_restJson1ListThingsInBillingGroupCommand; +const serializeAws_restJson1ListThingsInThingGroupCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-groups/{thingGroupName}/things"; + if (input.thingGroupName !== undefined) { + const labelValue = input.thingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingGroupName."); + } + resolvedPath = resolvedPath.replace("{thingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingGroupName."); + } + const query = { + ...(input.recursive !== undefined && { recursive: input.recursive.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListThingsInThingGroupCommand = serializeAws_restJson1ListThingsInThingGroupCommand; +const serializeAws_restJson1ListThingTypesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-types"; + const query = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.thingTypeName !== undefined && { thingTypeName: input.thingTypeName }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListThingTypesCommand = serializeAws_restJson1ListThingTypesCommand; +const serializeAws_restJson1ListTopicRuleDestinationsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/destinations"; + const query = { + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListTopicRuleDestinationsCommand = serializeAws_restJson1ListTopicRuleDestinationsCommand; +const serializeAws_restJson1ListTopicRulesCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/rules"; + const query = { + ...(input.topic !== undefined && { topic: input.topic }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.ruleDisabled !== undefined && { ruleDisabled: input.ruleDisabled.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListTopicRulesCommand = serializeAws_restJson1ListTopicRulesCommand; +const serializeAws_restJson1ListV2LoggingLevelsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/v2LoggingLevel"; + const query = { + ...(input.targetType !== undefined && { targetType: input.targetType }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListV2LoggingLevelsCommand = serializeAws_restJson1ListV2LoggingLevelsCommand; +const serializeAws_restJson1ListViolationEventsCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/violation-events"; + const query = { + ...(input.startTime !== undefined && { startTime: (input.startTime.toISOString().split(".")[0] + "Z").toString() }), + ...(input.endTime !== undefined && { endTime: (input.endTime.toISOString().split(".")[0] + "Z").toString() }), + ...(input.thingName !== undefined && { thingName: input.thingName }), + ...(input.securityProfileName !== undefined && { securityProfileName: input.securityProfileName }), + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListViolationEventsCommand = serializeAws_restJson1ListViolationEventsCommand; +const serializeAws_restJson1RegisterCACertificateCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/cacertificate"; + const query = { + ...(input.setAsActive !== undefined && { setAsActive: input.setAsActive.toString() }), + ...(input.allowAutoRegistration !== undefined && { allowAutoRegistration: input.allowAutoRegistration.toString() }), + }; + let body; + body = JSON.stringify({ + ...(input.caCertificate !== undefined && input.caCertificate !== null && { caCertificate: input.caCertificate }), + ...(input.registrationConfig !== undefined && + input.registrationConfig !== null && { + registrationConfig: serializeAws_restJson1RegistrationConfig(input.registrationConfig, context), + }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + ...(input.verificationCertificate !== undefined && + input.verificationCertificate !== null && { verificationCertificate: input.verificationCertificate }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1RegisterCACertificateCommand = serializeAws_restJson1RegisterCACertificateCommand; +const serializeAws_restJson1RegisterCertificateCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/certificate/register"; + const query = { + ...(input.setAsActive !== undefined && { setAsActive: input.setAsActive.toString() }), + }; + let body; + body = JSON.stringify({ + ...(input.caCertificatePem !== undefined && + input.caCertificatePem !== null && { caCertificatePem: input.caCertificatePem }), + ...(input.certificatePem !== undefined && + input.certificatePem !== null && { certificatePem: input.certificatePem }), + ...(input.status !== undefined && input.status !== null && { status: input.status }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1RegisterCertificateCommand = serializeAws_restJson1RegisterCertificateCommand; +const serializeAws_restJson1RegisterCertificateWithoutCACommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/certificate/register-no-ca"; + let body; + body = JSON.stringify({ + ...(input.certificatePem !== undefined && + input.certificatePem !== null && { certificatePem: input.certificatePem }), + ...(input.status !== undefined && input.status !== null && { status: input.status }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1RegisterCertificateWithoutCACommand = serializeAws_restJson1RegisterCertificateWithoutCACommand; +const serializeAws_restJson1RegisterThingCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/things"; + let body; + body = JSON.stringify({ + ...(input.parameters !== undefined && + input.parameters !== null && { parameters: serializeAws_restJson1Parameters(input.parameters, context) }), + ...(input.templateBody !== undefined && input.templateBody !== null && { templateBody: input.templateBody }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1RegisterThingCommand = serializeAws_restJson1RegisterThingCommand; +const serializeAws_restJson1RejectCertificateTransferCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/reject-certificate-transfer/{certificateId}"; + if (input.certificateId !== undefined) { + const labelValue = input.certificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: certificateId."); + } + resolvedPath = resolvedPath.replace("{certificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: certificateId."); + } + let body; + body = JSON.stringify({ + ...(input.rejectReason !== undefined && input.rejectReason !== null && { rejectReason: input.rejectReason }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1RejectCertificateTransferCommand = serializeAws_restJson1RejectCertificateTransferCommand; +const serializeAws_restJson1RemoveThingFromBillingGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/billing-groups/removeThingFromBillingGroup"; + let body; + body = JSON.stringify({ + ...(input.billingGroupArn !== undefined && + input.billingGroupArn !== null && { billingGroupArn: input.billingGroupArn }), + ...(input.billingGroupName !== undefined && + input.billingGroupName !== null && { billingGroupName: input.billingGroupName }), + ...(input.thingArn !== undefined && input.thingArn !== null && { thingArn: input.thingArn }), + ...(input.thingName !== undefined && input.thingName !== null && { thingName: input.thingName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1RemoveThingFromBillingGroupCommand = serializeAws_restJson1RemoveThingFromBillingGroupCommand; +const serializeAws_restJson1RemoveThingFromThingGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/thing-groups/removeThingFromThingGroup"; + let body; + body = JSON.stringify({ + ...(input.thingArn !== undefined && input.thingArn !== null && { thingArn: input.thingArn }), + ...(input.thingGroupArn !== undefined && input.thingGroupArn !== null && { thingGroupArn: input.thingGroupArn }), + ...(input.thingGroupName !== undefined && + input.thingGroupName !== null && { thingGroupName: input.thingGroupName }), + ...(input.thingName !== undefined && input.thingName !== null && { thingName: input.thingName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1RemoveThingFromThingGroupCommand = serializeAws_restJson1RemoveThingFromThingGroupCommand; +const serializeAws_restJson1ReplaceTopicRuleCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/rules/{ruleName}"; + if (input.ruleName !== undefined) { + const labelValue = input.ruleName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ruleName."); + } + resolvedPath = resolvedPath.replace("{ruleName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: ruleName."); + } + let body; + if (input.topicRulePayload !== undefined) { + body = serializeAws_restJson1TopicRulePayload(input.topicRulePayload, context); + } + if (body === undefined) { + body = {}; + } + body = JSON.stringify(body); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1ReplaceTopicRuleCommand = serializeAws_restJson1ReplaceTopicRuleCommand; +const serializeAws_restJson1SearchIndexCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/indices/search"; + let body; + body = JSON.stringify({ + ...(input.indexName !== undefined && input.indexName !== null && { indexName: input.indexName }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.queryString !== undefined && input.queryString !== null && { queryString: input.queryString }), + ...(input.queryVersion !== undefined && input.queryVersion !== null && { queryVersion: input.queryVersion }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1SearchIndexCommand = serializeAws_restJson1SearchIndexCommand; +const serializeAws_restJson1SetDefaultAuthorizerCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/default-authorizer"; + let body; + body = JSON.stringify({ + ...(input.authorizerName !== undefined && + input.authorizerName !== null && { authorizerName: input.authorizerName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1SetDefaultAuthorizerCommand = serializeAws_restJson1SetDefaultAuthorizerCommand; +const serializeAws_restJson1SetDefaultPolicyVersionCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/policies/{policyName}/version/{policyVersionId}"; + if (input.policyName !== undefined) { + const labelValue = input.policyName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyName."); + } + resolvedPath = resolvedPath.replace("{policyName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyName."); + } + if (input.policyVersionId !== undefined) { + const labelValue = input.policyVersionId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: policyVersionId."); + } + resolvedPath = resolvedPath.replace("{policyVersionId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: policyVersionId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1SetDefaultPolicyVersionCommand = serializeAws_restJson1SetDefaultPolicyVersionCommand; +const serializeAws_restJson1SetLoggingOptionsCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/loggingOptions"; + let body; + if (input.loggingOptionsPayload !== undefined) { + body = serializeAws_restJson1LoggingOptionsPayload(input.loggingOptionsPayload, context); + } + if (body === undefined) { + body = {}; + } + body = JSON.stringify(body); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1SetLoggingOptionsCommand = serializeAws_restJson1SetLoggingOptionsCommand; +const serializeAws_restJson1SetV2LoggingLevelCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/v2LoggingLevel"; + let body; + body = JSON.stringify({ + ...(input.logLevel !== undefined && input.logLevel !== null && { logLevel: input.logLevel }), + ...(input.logTarget !== undefined && + input.logTarget !== null && { logTarget: serializeAws_restJson1LogTarget(input.logTarget, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1SetV2LoggingLevelCommand = serializeAws_restJson1SetV2LoggingLevelCommand; +const serializeAws_restJson1SetV2LoggingOptionsCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/v2LoggingOptions"; + let body; + body = JSON.stringify({ + ...(input.defaultLogLevel !== undefined && + input.defaultLogLevel !== null && { defaultLogLevel: input.defaultLogLevel }), + ...(input.disableAllLogs !== undefined && + input.disableAllLogs !== null && { disableAllLogs: input.disableAllLogs }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1SetV2LoggingOptionsCommand = serializeAws_restJson1SetV2LoggingOptionsCommand; +const serializeAws_restJson1StartAuditMitigationActionsTaskCommand = async (input, context) => { + var _a; + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/mitigationactions/tasks/{taskId}"; + if (input.taskId !== undefined) { + const labelValue = input.taskId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: taskId."); + } + resolvedPath = resolvedPath.replace("{taskId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: taskId."); + } + let body; + body = JSON.stringify({ + ...(input.auditCheckToActionsMapping !== undefined && + input.auditCheckToActionsMapping !== null && { + auditCheckToActionsMapping: serializeAws_restJson1AuditCheckToActionsMapping(input.auditCheckToActionsMapping, context), + }), + clientRequestToken: (_a = input.clientRequestToken) !== null && _a !== void 0 ? _a : uuid_1.v4(), + ...(input.target !== undefined && + input.target !== null && { + target: serializeAws_restJson1AuditMitigationActionsTaskTarget(input.target, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1StartAuditMitigationActionsTaskCommand = serializeAws_restJson1StartAuditMitigationActionsTaskCommand; +const serializeAws_restJson1StartOnDemandAuditTaskCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/tasks"; + let body; + body = JSON.stringify({ + ...(input.targetCheckNames !== undefined && + input.targetCheckNames !== null && { + targetCheckNames: serializeAws_restJson1TargetAuditCheckNames(input.targetCheckNames, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1StartOnDemandAuditTaskCommand = serializeAws_restJson1StartOnDemandAuditTaskCommand; +const serializeAws_restJson1StartThingRegistrationTaskCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/thing-registration-tasks"; + let body; + body = JSON.stringify({ + ...(input.inputFileBucket !== undefined && + input.inputFileBucket !== null && { inputFileBucket: input.inputFileBucket }), + ...(input.inputFileKey !== undefined && input.inputFileKey !== null && { inputFileKey: input.inputFileKey }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.templateBody !== undefined && input.templateBody !== null && { templateBody: input.templateBody }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1StartThingRegistrationTaskCommand = serializeAws_restJson1StartThingRegistrationTaskCommand; +const serializeAws_restJson1StopThingRegistrationTaskCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/thing-registration-tasks/{taskId}/cancel"; + if (input.taskId !== undefined) { + const labelValue = input.taskId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: taskId."); + } + resolvedPath = resolvedPath.replace("{taskId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: taskId."); + } + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1StopThingRegistrationTaskCommand = serializeAws_restJson1StopThingRegistrationTaskCommand; +const serializeAws_restJson1TagResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/tags"; + let body; + body = JSON.stringify({ + ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1TagResourceCommand = serializeAws_restJson1TagResourceCommand; +const serializeAws_restJson1TestAuthorizationCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/test-authorization"; + const query = { + ...(input.clientId !== undefined && { clientId: input.clientId }), + }; + let body; + body = JSON.stringify({ + ...(input.authInfos !== undefined && + input.authInfos !== null && { authInfos: serializeAws_restJson1AuthInfos(input.authInfos, context) }), + ...(input.cognitoIdentityPoolId !== undefined && + input.cognitoIdentityPoolId !== null && { cognitoIdentityPoolId: input.cognitoIdentityPoolId }), + ...(input.policyNamesToAdd !== undefined && + input.policyNamesToAdd !== null && { + policyNamesToAdd: serializeAws_restJson1PolicyNames(input.policyNamesToAdd, context), + }), + ...(input.policyNamesToSkip !== undefined && + input.policyNamesToSkip !== null && { + policyNamesToSkip: serializeAws_restJson1PolicyNames(input.policyNamesToSkip, context), + }), + ...(input.principal !== undefined && input.principal !== null && { principal: input.principal }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1TestAuthorizationCommand = serializeAws_restJson1TestAuthorizationCommand; +const serializeAws_restJson1TestInvokeAuthorizerCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/authorizer/{authorizerName}/test"; + if (input.authorizerName !== undefined) { + const labelValue = input.authorizerName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: authorizerName."); + } + resolvedPath = resolvedPath.replace("{authorizerName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: authorizerName."); + } + let body; + body = JSON.stringify({ + ...(input.httpContext !== undefined && + input.httpContext !== null && { httpContext: serializeAws_restJson1HttpContext(input.httpContext, context) }), + ...(input.mqttContext !== undefined && + input.mqttContext !== null && { mqttContext: serializeAws_restJson1MqttContext(input.mqttContext, context) }), + ...(input.tlsContext !== undefined && + input.tlsContext !== null && { tlsContext: serializeAws_restJson1TlsContext(input.tlsContext, context) }), + ...(input.token !== undefined && input.token !== null && { token: input.token }), + ...(input.tokenSignature !== undefined && + input.tokenSignature !== null && { tokenSignature: input.tokenSignature }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1TestInvokeAuthorizerCommand = serializeAws_restJson1TestInvokeAuthorizerCommand; +const serializeAws_restJson1TransferCertificateCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/transfer-certificate/{certificateId}"; + if (input.certificateId !== undefined) { + const labelValue = input.certificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: certificateId."); + } + resolvedPath = resolvedPath.replace("{certificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: certificateId."); + } + const query = { + ...(input.targetAwsAccount !== undefined && { targetAwsAccount: input.targetAwsAccount }), + }; + let body; + body = JSON.stringify({ + ...(input.transferMessage !== undefined && + input.transferMessage !== null && { transferMessage: input.transferMessage }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1TransferCertificateCommand = serializeAws_restJson1TransferCertificateCommand; +const serializeAws_restJson1UntagResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/untag"; + let body; + body = JSON.stringify({ + ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }), + ...(input.tagKeys !== undefined && + input.tagKeys !== null && { tagKeys: serializeAws_restJson1TagKeyList(input.tagKeys, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand; +const serializeAws_restJson1UpdateAccountAuditConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/configuration"; + let body; + body = JSON.stringify({ + ...(input.auditCheckConfigurations !== undefined && + input.auditCheckConfigurations !== null && { + auditCheckConfigurations: serializeAws_restJson1AuditCheckConfigurations(input.auditCheckConfigurations, context), + }), + ...(input.auditNotificationTargetConfigurations !== undefined && + input.auditNotificationTargetConfigurations !== null && { + auditNotificationTargetConfigurations: serializeAws_restJson1AuditNotificationTargetConfigurations(input.auditNotificationTargetConfigurations, context), + }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateAccountAuditConfigurationCommand = serializeAws_restJson1UpdateAccountAuditConfigurationCommand; +const serializeAws_restJson1UpdateAuditSuppressionCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/suppressions/update"; + let body; + body = JSON.stringify({ + ...(input.checkName !== undefined && input.checkName !== null && { checkName: input.checkName }), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.expirationDate !== undefined && + input.expirationDate !== null && { expirationDate: Math.round(input.expirationDate.getTime() / 1000) }), + ...(input.resourceIdentifier !== undefined && + input.resourceIdentifier !== null && { + resourceIdentifier: serializeAws_restJson1ResourceIdentifier(input.resourceIdentifier, context), + }), + ...(input.suppressIndefinitely !== undefined && + input.suppressIndefinitely !== null && { suppressIndefinitely: input.suppressIndefinitely }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateAuditSuppressionCommand = serializeAws_restJson1UpdateAuditSuppressionCommand; +const serializeAws_restJson1UpdateAuthorizerCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/authorizer/{authorizerName}"; + if (input.authorizerName !== undefined) { + const labelValue = input.authorizerName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: authorizerName."); + } + resolvedPath = resolvedPath.replace("{authorizerName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: authorizerName."); + } + let body; + body = JSON.stringify({ + ...(input.authorizerFunctionArn !== undefined && + input.authorizerFunctionArn !== null && { authorizerFunctionArn: input.authorizerFunctionArn }), + ...(input.status !== undefined && input.status !== null && { status: input.status }), + ...(input.tokenKeyName !== undefined && input.tokenKeyName !== null && { tokenKeyName: input.tokenKeyName }), + ...(input.tokenSigningPublicKeys !== undefined && + input.tokenSigningPublicKeys !== null && { + tokenSigningPublicKeys: serializeAws_restJson1PublicKeyMap(input.tokenSigningPublicKeys, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateAuthorizerCommand = serializeAws_restJson1UpdateAuthorizerCommand; +const serializeAws_restJson1UpdateBillingGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/billing-groups/{billingGroupName}"; + if (input.billingGroupName !== undefined) { + const labelValue = input.billingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: billingGroupName."); + } + resolvedPath = resolvedPath.replace("{billingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: billingGroupName."); + } + let body; + body = JSON.stringify({ + ...(input.billingGroupProperties !== undefined && + input.billingGroupProperties !== null && { + billingGroupProperties: serializeAws_restJson1BillingGroupProperties(input.billingGroupProperties, context), + }), + ...(input.expectedVersion !== undefined && + input.expectedVersion !== null && { expectedVersion: input.expectedVersion }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateBillingGroupCommand = serializeAws_restJson1UpdateBillingGroupCommand; +const serializeAws_restJson1UpdateCACertificateCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/cacertificate/{certificateId}"; + if (input.certificateId !== undefined) { + const labelValue = input.certificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: certificateId."); + } + resolvedPath = resolvedPath.replace("{certificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: certificateId."); + } + const query = { + ...(input.newStatus !== undefined && { newStatus: input.newStatus }), + ...(input.newAutoRegistrationStatus !== undefined && { + newAutoRegistrationStatus: input.newAutoRegistrationStatus, + }), + }; + let body; + body = JSON.stringify({ + ...(input.registrationConfig !== undefined && + input.registrationConfig !== null && { + registrationConfig: serializeAws_restJson1RegistrationConfig(input.registrationConfig, context), + }), + ...(input.removeAutoRegistration !== undefined && + input.removeAutoRegistration !== null && { removeAutoRegistration: input.removeAutoRegistration }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1UpdateCACertificateCommand = serializeAws_restJson1UpdateCACertificateCommand; +const serializeAws_restJson1UpdateCertificateCommand = async (input, context) => { + const headers = {}; + let resolvedPath = "/certificates/{certificateId}"; + if (input.certificateId !== undefined) { + const labelValue = input.certificateId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: certificateId."); + } + resolvedPath = resolvedPath.replace("{certificateId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: certificateId."); + } + const query = { + ...(input.newStatus !== undefined && { newStatus: input.newStatus }), + }; + let body; + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1UpdateCertificateCommand = serializeAws_restJson1UpdateCertificateCommand; +const serializeAws_restJson1UpdateDimensionCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/dimensions/{name}"; + if (input.name !== undefined) { + const labelValue = input.name; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: name."); + } + resolvedPath = resolvedPath.replace("{name}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: name."); + } + let body; + body = JSON.stringify({ + ...(input.stringValues !== undefined && + input.stringValues !== null && { + stringValues: serializeAws_restJson1DimensionStringValues(input.stringValues, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateDimensionCommand = serializeAws_restJson1UpdateDimensionCommand; +const serializeAws_restJson1UpdateDomainConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/domainConfigurations/{domainConfigurationName}"; + if (input.domainConfigurationName !== undefined) { + const labelValue = input.domainConfigurationName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: domainConfigurationName."); + } + resolvedPath = resolvedPath.replace("{domainConfigurationName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: domainConfigurationName."); + } + let body; + body = JSON.stringify({ + ...(input.authorizerConfig !== undefined && + input.authorizerConfig !== null && { + authorizerConfig: serializeAws_restJson1AuthorizerConfig(input.authorizerConfig, context), + }), + ...(input.domainConfigurationStatus !== undefined && + input.domainConfigurationStatus !== null && { domainConfigurationStatus: input.domainConfigurationStatus }), + ...(input.removeAuthorizerConfig !== undefined && + input.removeAuthorizerConfig !== null && { removeAuthorizerConfig: input.removeAuthorizerConfig }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateDomainConfigurationCommand = serializeAws_restJson1UpdateDomainConfigurationCommand; +const serializeAws_restJson1UpdateDynamicThingGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/dynamic-thing-groups/{thingGroupName}"; + if (input.thingGroupName !== undefined) { + const labelValue = input.thingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingGroupName."); + } + resolvedPath = resolvedPath.replace("{thingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingGroupName."); + } + let body; + body = JSON.stringify({ + ...(input.expectedVersion !== undefined && + input.expectedVersion !== null && { expectedVersion: input.expectedVersion }), + ...(input.indexName !== undefined && input.indexName !== null && { indexName: input.indexName }), + ...(input.queryString !== undefined && input.queryString !== null && { queryString: input.queryString }), + ...(input.queryVersion !== undefined && input.queryVersion !== null && { queryVersion: input.queryVersion }), + ...(input.thingGroupProperties !== undefined && + input.thingGroupProperties !== null && { + thingGroupProperties: serializeAws_restJson1ThingGroupProperties(input.thingGroupProperties, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateDynamicThingGroupCommand = serializeAws_restJson1UpdateDynamicThingGroupCommand; +const serializeAws_restJson1UpdateEventConfigurationsCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/event-configurations"; + let body; + body = JSON.stringify({ + ...(input.eventConfigurations !== undefined && + input.eventConfigurations !== null && { + eventConfigurations: serializeAws_restJson1EventConfigurations(input.eventConfigurations, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateEventConfigurationsCommand = serializeAws_restJson1UpdateEventConfigurationsCommand; +const serializeAws_restJson1UpdateIndexingConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/indexing/config"; + let body; + body = JSON.stringify({ + ...(input.thingGroupIndexingConfiguration !== undefined && + input.thingGroupIndexingConfiguration !== null && { + thingGroupIndexingConfiguration: serializeAws_restJson1ThingGroupIndexingConfiguration(input.thingGroupIndexingConfiguration, context), + }), + ...(input.thingIndexingConfiguration !== undefined && + input.thingIndexingConfiguration !== null && { + thingIndexingConfiguration: serializeAws_restJson1ThingIndexingConfiguration(input.thingIndexingConfiguration, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateIndexingConfigurationCommand = serializeAws_restJson1UpdateIndexingConfigurationCommand; +const serializeAws_restJson1UpdateJobCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/jobs/{jobId}"; + if (input.jobId !== undefined) { + const labelValue = input.jobId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: jobId."); + } + resolvedPath = resolvedPath.replace("{jobId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: jobId."); + } + const query = { + ...(input.namespaceId !== undefined && { namespaceId: input.namespaceId }), + }; + let body; + body = JSON.stringify({ + ...(input.abortConfig !== undefined && + input.abortConfig !== null && { abortConfig: serializeAws_restJson1AbortConfig(input.abortConfig, context) }), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.jobExecutionsRolloutConfig !== undefined && + input.jobExecutionsRolloutConfig !== null && { + jobExecutionsRolloutConfig: serializeAws_restJson1JobExecutionsRolloutConfig(input.jobExecutionsRolloutConfig, context), + }), + ...(input.presignedUrlConfig !== undefined && + input.presignedUrlConfig !== null && { + presignedUrlConfig: serializeAws_restJson1PresignedUrlConfig(input.presignedUrlConfig, context), + }), + ...(input.timeoutConfig !== undefined && + input.timeoutConfig !== null && { + timeoutConfig: serializeAws_restJson1TimeoutConfig(input.timeoutConfig, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1UpdateJobCommand = serializeAws_restJson1UpdateJobCommand; +const serializeAws_restJson1UpdateMitigationActionCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/mitigationactions/actions/{actionName}"; + if (input.actionName !== undefined) { + const labelValue = input.actionName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: actionName."); + } + resolvedPath = resolvedPath.replace("{actionName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: actionName."); + } + let body; + body = JSON.stringify({ + ...(input.actionParams !== undefined && + input.actionParams !== null && { + actionParams: serializeAws_restJson1MitigationActionParams(input.actionParams, context), + }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateMitigationActionCommand = serializeAws_restJson1UpdateMitigationActionCommand; +const serializeAws_restJson1UpdateProvisioningTemplateCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/provisioning-templates/{templateName}"; + if (input.templateName !== undefined) { + const labelValue = input.templateName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: templateName."); + } + resolvedPath = resolvedPath.replace("{templateName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: templateName."); + } + let body; + body = JSON.stringify({ + ...(input.defaultVersionId !== undefined && + input.defaultVersionId !== null && { defaultVersionId: input.defaultVersionId }), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }), + ...(input.preProvisioningHook !== undefined && + input.preProvisioningHook !== null && { + preProvisioningHook: serializeAws_restJson1ProvisioningHook(input.preProvisioningHook, context), + }), + ...(input.provisioningRoleArn !== undefined && + input.provisioningRoleArn !== null && { provisioningRoleArn: input.provisioningRoleArn }), + ...(input.removePreProvisioningHook !== undefined && + input.removePreProvisioningHook !== null && { removePreProvisioningHook: input.removePreProvisioningHook }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateProvisioningTemplateCommand = serializeAws_restJson1UpdateProvisioningTemplateCommand; +const serializeAws_restJson1UpdateRoleAliasCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/role-aliases/{roleAlias}"; + if (input.roleAlias !== undefined) { + const labelValue = input.roleAlias; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: roleAlias."); + } + resolvedPath = resolvedPath.replace("{roleAlias}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: roleAlias."); + } + let body; + body = JSON.stringify({ + ...(input.credentialDurationSeconds !== undefined && + input.credentialDurationSeconds !== null && { credentialDurationSeconds: input.credentialDurationSeconds }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateRoleAliasCommand = serializeAws_restJson1UpdateRoleAliasCommand; +const serializeAws_restJson1UpdateScheduledAuditCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/audit/scheduledaudits/{scheduledAuditName}"; + if (input.scheduledAuditName !== undefined) { + const labelValue = input.scheduledAuditName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: scheduledAuditName."); + } + resolvedPath = resolvedPath.replace("{scheduledAuditName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: scheduledAuditName."); + } + let body; + body = JSON.stringify({ + ...(input.dayOfMonth !== undefined && input.dayOfMonth !== null && { dayOfMonth: input.dayOfMonth }), + ...(input.dayOfWeek !== undefined && input.dayOfWeek !== null && { dayOfWeek: input.dayOfWeek }), + ...(input.frequency !== undefined && input.frequency !== null && { frequency: input.frequency }), + ...(input.targetCheckNames !== undefined && + input.targetCheckNames !== null && { + targetCheckNames: serializeAws_restJson1TargetAuditCheckNames(input.targetCheckNames, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateScheduledAuditCommand = serializeAws_restJson1UpdateScheduledAuditCommand; +const serializeAws_restJson1UpdateSecurityProfileCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/security-profiles/{securityProfileName}"; + if (input.securityProfileName !== undefined) { + const labelValue = input.securityProfileName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: securityProfileName."); + } + resolvedPath = resolvedPath.replace("{securityProfileName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: securityProfileName."); + } + const query = { + ...(input.expectedVersion !== undefined && { expectedVersion: input.expectedVersion.toString() }), + }; + let body; + body = JSON.stringify({ + ...(input.additionalMetricsToRetain !== undefined && + input.additionalMetricsToRetain !== null && { + additionalMetricsToRetain: serializeAws_restJson1AdditionalMetricsToRetainList(input.additionalMetricsToRetain, context), + }), + ...(input.additionalMetricsToRetainV2 !== undefined && + input.additionalMetricsToRetainV2 !== null && { + additionalMetricsToRetainV2: serializeAws_restJson1AdditionalMetricsToRetainV2List(input.additionalMetricsToRetainV2, context), + }), + ...(input.alertTargets !== undefined && + input.alertTargets !== null && { alertTargets: serializeAws_restJson1AlertTargets(input.alertTargets, context) }), + ...(input.behaviors !== undefined && + input.behaviors !== null && { behaviors: serializeAws_restJson1Behaviors(input.behaviors, context) }), + ...(input.deleteAdditionalMetricsToRetain !== undefined && + input.deleteAdditionalMetricsToRetain !== null && { + deleteAdditionalMetricsToRetain: input.deleteAdditionalMetricsToRetain, + }), + ...(input.deleteAlertTargets !== undefined && + input.deleteAlertTargets !== null && { deleteAlertTargets: input.deleteAlertTargets }), + ...(input.deleteBehaviors !== undefined && + input.deleteBehaviors !== null && { deleteBehaviors: input.deleteBehaviors }), + ...(input.securityProfileDescription !== undefined && + input.securityProfileDescription !== null && { securityProfileDescription: input.securityProfileDescription }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1UpdateSecurityProfileCommand = serializeAws_restJson1UpdateSecurityProfileCommand; +const serializeAws_restJson1UpdateStreamCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/streams/{streamId}"; + if (input.streamId !== undefined) { + const labelValue = input.streamId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: streamId."); + } + resolvedPath = resolvedPath.replace("{streamId}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: streamId."); + } + let body; + body = JSON.stringify({ + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.files !== undefined && + input.files !== null && { files: serializeAws_restJson1StreamFiles(input.files, context) }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateStreamCommand = serializeAws_restJson1UpdateStreamCommand; +const serializeAws_restJson1UpdateThingCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/things/{thingName}"; + if (input.thingName !== undefined) { + const labelValue = input.thingName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingName."); + } + resolvedPath = resolvedPath.replace("{thingName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingName."); + } + let body; + body = JSON.stringify({ + ...(input.attributePayload !== undefined && + input.attributePayload !== null && { + attributePayload: serializeAws_restJson1AttributePayload(input.attributePayload, context), + }), + ...(input.expectedVersion !== undefined && + input.expectedVersion !== null && { expectedVersion: input.expectedVersion }), + ...(input.removeThingType !== undefined && + input.removeThingType !== null && { removeThingType: input.removeThingType }), + ...(input.thingTypeName !== undefined && input.thingTypeName !== null && { thingTypeName: input.thingTypeName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateThingCommand = serializeAws_restJson1UpdateThingCommand; +const serializeAws_restJson1UpdateThingGroupCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/thing-groups/{thingGroupName}"; + if (input.thingGroupName !== undefined) { + const labelValue = input.thingGroupName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: thingGroupName."); + } + resolvedPath = resolvedPath.replace("{thingGroupName}", smithy_client_1.extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: thingGroupName."); + } + let body; + body = JSON.stringify({ + ...(input.expectedVersion !== undefined && + input.expectedVersion !== null && { expectedVersion: input.expectedVersion }), + ...(input.thingGroupProperties !== undefined && + input.thingGroupProperties !== null && { + thingGroupProperties: serializeAws_restJson1ThingGroupProperties(input.thingGroupProperties, context), + }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateThingGroupCommand = serializeAws_restJson1UpdateThingGroupCommand; +const serializeAws_restJson1UpdateThingGroupsForThingCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/thing-groups/updateThingGroupsForThing"; + let body; + body = JSON.stringify({ + ...(input.overrideDynamicGroups !== undefined && + input.overrideDynamicGroups !== null && { overrideDynamicGroups: input.overrideDynamicGroups }), + ...(input.thingGroupsToAdd !== undefined && + input.thingGroupsToAdd !== null && { + thingGroupsToAdd: serializeAws_restJson1ThingGroupList(input.thingGroupsToAdd, context), + }), + ...(input.thingGroupsToRemove !== undefined && + input.thingGroupsToRemove !== null && { + thingGroupsToRemove: serializeAws_restJson1ThingGroupList(input.thingGroupsToRemove, context), + }), + ...(input.thingName !== undefined && input.thingName !== null && { thingName: input.thingName }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateThingGroupsForThingCommand = serializeAws_restJson1UpdateThingGroupsForThingCommand; +const serializeAws_restJson1UpdateTopicRuleDestinationCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/destinations"; + let body; + body = JSON.stringify({ + ...(input.arn !== undefined && input.arn !== null && { arn: input.arn }), + ...(input.status !== undefined && input.status !== null && { status: input.status }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1UpdateTopicRuleDestinationCommand = serializeAws_restJson1UpdateTopicRuleDestinationCommand; +const serializeAws_restJson1ValidateSecurityProfileBehaviorsCommand = async (input, context) => { + const headers = { + "content-type": "application/json", + }; + let resolvedPath = "/security-profile-behaviors/validate"; + let body; + body = JSON.stringify({ + ...(input.behaviors !== undefined && + input.behaviors !== null && { behaviors: serializeAws_restJson1Behaviors(input.behaviors, context) }), + }); + const { hostname, protocol = "https", port } = await context.endpoint(); + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1ValidateSecurityProfileBehaviorsCommand = serializeAws_restJson1ValidateSecurityProfileBehaviorsCommand; +const deserializeAws_restJson1AcceptCertificateTransferCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AcceptCertificateTransferCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1AcceptCertificateTransferCommand = deserializeAws_restJson1AcceptCertificateTransferCommand; +const deserializeAws_restJson1AcceptCertificateTransferCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TransferAlreadyCompletedException": + case "com.amazonaws.iot#TransferAlreadyCompletedException": + response = { + ...(await deserializeAws_restJson1TransferAlreadyCompletedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1AddThingToBillingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AddThingToBillingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1AddThingToBillingGroupCommand = deserializeAws_restJson1AddThingToBillingGroupCommand; +const deserializeAws_restJson1AddThingToBillingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1AddThingToThingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AddThingToThingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1AddThingToThingGroupCommand = deserializeAws_restJson1AddThingToThingGroupCommand; +const deserializeAws_restJson1AddThingToThingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1AssociateTargetsWithJobCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AssociateTargetsWithJobCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + description: undefined, + jobArn: undefined, + jobId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.description !== undefined && data.description !== null) { + contents.description = data.description; + } + if (data.jobArn !== undefined && data.jobArn !== null) { + contents.jobArn = data.jobArn; + } + if (data.jobId !== undefined && data.jobId !== null) { + contents.jobId = data.jobId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1AssociateTargetsWithJobCommand = deserializeAws_restJson1AssociateTargetsWithJobCommand; +const deserializeAws_restJson1AssociateTargetsWithJobCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1AttachPolicyCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AttachPolicyCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1AttachPolicyCommand = deserializeAws_restJson1AttachPolicyCommand; +const deserializeAws_restJson1AttachPolicyCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1AttachPrincipalPolicyCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AttachPrincipalPolicyCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1AttachPrincipalPolicyCommand = deserializeAws_restJson1AttachPrincipalPolicyCommand; +const deserializeAws_restJson1AttachPrincipalPolicyCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1AttachSecurityProfileCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AttachSecurityProfileCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1AttachSecurityProfileCommand = deserializeAws_restJson1AttachSecurityProfileCommand; +const deserializeAws_restJson1AttachSecurityProfileCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1AttachThingPrincipalCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AttachThingPrincipalCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1AttachThingPrincipalCommand = deserializeAws_restJson1AttachThingPrincipalCommand; +const deserializeAws_restJson1AttachThingPrincipalCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CancelAuditMitigationActionsTaskCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CancelAuditMitigationActionsTaskCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CancelAuditMitigationActionsTaskCommand = deserializeAws_restJson1CancelAuditMitigationActionsTaskCommand; +const deserializeAws_restJson1CancelAuditMitigationActionsTaskCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CancelAuditTaskCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CancelAuditTaskCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CancelAuditTaskCommand = deserializeAws_restJson1CancelAuditTaskCommand; +const deserializeAws_restJson1CancelAuditTaskCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CancelCertificateTransferCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CancelCertificateTransferCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CancelCertificateTransferCommand = deserializeAws_restJson1CancelCertificateTransferCommand; +const deserializeAws_restJson1CancelCertificateTransferCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TransferAlreadyCompletedException": + case "com.amazonaws.iot#TransferAlreadyCompletedException": + response = { + ...(await deserializeAws_restJson1TransferAlreadyCompletedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CancelJobCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CancelJobCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + description: undefined, + jobArn: undefined, + jobId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.description !== undefined && data.description !== null) { + contents.description = data.description; + } + if (data.jobArn !== undefined && data.jobArn !== null) { + contents.jobArn = data.jobArn; + } + if (data.jobId !== undefined && data.jobId !== null) { + contents.jobId = data.jobId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CancelJobCommand = deserializeAws_restJson1CancelJobCommand; +const deserializeAws_restJson1CancelJobCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CancelJobExecutionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CancelJobExecutionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CancelJobExecutionCommand = deserializeAws_restJson1CancelJobExecutionCommand; +const deserializeAws_restJson1CancelJobExecutionCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidStateTransitionException": + case "com.amazonaws.iot#InvalidStateTransitionException": + response = { + ...(await deserializeAws_restJson1InvalidStateTransitionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1ClearDefaultAuthorizerCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ClearDefaultAuthorizerCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ClearDefaultAuthorizerCommand = deserializeAws_restJson1ClearDefaultAuthorizerCommand; +const deserializeAws_restJson1ClearDefaultAuthorizerCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ConfirmTopicRuleDestinationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ConfirmTopicRuleDestinationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ConfirmTopicRuleDestinationCommand = deserializeAws_restJson1ConfirmTopicRuleDestinationCommand; +const deserializeAws_restJson1ConfirmTopicRuleDestinationCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateAuditSuppressionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateAuditSuppressionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateAuditSuppressionCommand = deserializeAws_restJson1CreateAuditSuppressionCommand; +const deserializeAws_restJson1CreateAuditSuppressionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CreateAuthorizerCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateAuthorizerCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + authorizerArn: undefined, + authorizerName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.authorizerArn !== undefined && data.authorizerArn !== null) { + contents.authorizerArn = data.authorizerArn; + } + if (data.authorizerName !== undefined && data.authorizerName !== null) { + contents.authorizerName = data.authorizerName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateAuthorizerCommand = deserializeAws_restJson1CreateAuthorizerCommand; +const deserializeAws_restJson1CreateAuthorizerCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateBillingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateBillingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + billingGroupArn: undefined, + billingGroupId: undefined, + billingGroupName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.billingGroupArn !== undefined && data.billingGroupArn !== null) { + contents.billingGroupArn = data.billingGroupArn; + } + if (data.billingGroupId !== undefined && data.billingGroupId !== null) { + contents.billingGroupId = data.billingGroupId; + } + if (data.billingGroupName !== undefined && data.billingGroupName !== null) { + contents.billingGroupName = data.billingGroupName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateBillingGroupCommand = deserializeAws_restJson1CreateBillingGroupCommand; +const deserializeAws_restJson1CreateBillingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CreateCertificateFromCsrCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateCertificateFromCsrCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificateArn: undefined, + certificateId: undefined, + certificatePem: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificateArn !== undefined && data.certificateArn !== null) { + contents.certificateArn = data.certificateArn; + } + if (data.certificateId !== undefined && data.certificateId !== null) { + contents.certificateId = data.certificateId; + } + if (data.certificatePem !== undefined && data.certificatePem !== null) { + contents.certificatePem = data.certificatePem; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateCertificateFromCsrCommand = deserializeAws_restJson1CreateCertificateFromCsrCommand; +const deserializeAws_restJson1CreateCertificateFromCsrCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateDimensionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateDimensionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + arn: undefined, + name: undefined, + }; + const data = await parseBody(output.body, context); + if (data.arn !== undefined && data.arn !== null) { + contents.arn = data.arn; + } + if (data.name !== undefined && data.name !== null) { + contents.name = data.name; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateDimensionCommand = deserializeAws_restJson1CreateDimensionCommand; +const deserializeAws_restJson1CreateDimensionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CreateDomainConfigurationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateDomainConfigurationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + domainConfigurationArn: undefined, + domainConfigurationName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.domainConfigurationArn !== undefined && data.domainConfigurationArn !== null) { + contents.domainConfigurationArn = data.domainConfigurationArn; + } + if (data.domainConfigurationName !== undefined && data.domainConfigurationName !== null) { + contents.domainConfigurationName = data.domainConfigurationName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateDomainConfigurationCommand = deserializeAws_restJson1CreateDomainConfigurationCommand; +const deserializeAws_restJson1CreateDomainConfigurationCommandError = 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 "CertificateValidationException": + case "com.amazonaws.iot#CertificateValidationException": + response = { + ...(await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateDynamicThingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateDynamicThingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + indexName: undefined, + queryString: undefined, + queryVersion: undefined, + thingGroupArn: undefined, + thingGroupId: undefined, + thingGroupName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.indexName !== undefined && data.indexName !== null) { + contents.indexName = data.indexName; + } + if (data.queryString !== undefined && data.queryString !== null) { + contents.queryString = data.queryString; + } + if (data.queryVersion !== undefined && data.queryVersion !== null) { + contents.queryVersion = data.queryVersion; + } + if (data.thingGroupArn !== undefined && data.thingGroupArn !== null) { + contents.thingGroupArn = data.thingGroupArn; + } + if (data.thingGroupId !== undefined && data.thingGroupId !== null) { + contents.thingGroupId = data.thingGroupId; + } + if (data.thingGroupName !== undefined && data.thingGroupName !== null) { + contents.thingGroupName = data.thingGroupName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateDynamicThingGroupCommand = deserializeAws_restJson1CreateDynamicThingGroupCommand; +const deserializeAws_restJson1CreateDynamicThingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidQueryException": + case "com.amazonaws.iot#InvalidQueryException": + response = { + ...(await deserializeAws_restJson1InvalidQueryExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CreateJobCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateJobCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + description: undefined, + jobArn: undefined, + jobId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.description !== undefined && data.description !== null) { + contents.description = data.description; + } + if (data.jobArn !== undefined && data.jobArn !== null) { + contents.jobArn = data.jobArn; + } + if (data.jobId !== undefined && data.jobId !== null) { + contents.jobId = data.jobId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateJobCommand = deserializeAws_restJson1CreateJobCommand; +const deserializeAws_restJson1CreateJobCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CreateKeysAndCertificateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateKeysAndCertificateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificateArn: undefined, + certificateId: undefined, + certificatePem: undefined, + keyPair: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificateArn !== undefined && data.certificateArn !== null) { + contents.certificateArn = data.certificateArn; + } + if (data.certificateId !== undefined && data.certificateId !== null) { + contents.certificateId = data.certificateId; + } + if (data.certificatePem !== undefined && data.certificatePem !== null) { + contents.certificatePem = data.certificatePem; + } + if (data.keyPair !== undefined && data.keyPair !== null) { + contents.keyPair = deserializeAws_restJson1KeyPair(data.keyPair, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateKeysAndCertificateCommand = deserializeAws_restJson1CreateKeysAndCertificateCommand; +const deserializeAws_restJson1CreateKeysAndCertificateCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateMitigationActionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateMitigationActionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + actionArn: undefined, + actionId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.actionArn !== undefined && data.actionArn !== null) { + contents.actionArn = data.actionArn; + } + if (data.actionId !== undefined && data.actionId !== null) { + contents.actionId = data.actionId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateMitigationActionCommand = deserializeAws_restJson1CreateMitigationActionCommand; +const deserializeAws_restJson1CreateMitigationActionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CreateOTAUpdateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateOTAUpdateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + awsIotJobArn: undefined, + awsIotJobId: undefined, + otaUpdateArn: undefined, + otaUpdateId: undefined, + otaUpdateStatus: undefined, + }; + const data = await parseBody(output.body, context); + if (data.awsIotJobArn !== undefined && data.awsIotJobArn !== null) { + contents.awsIotJobArn = data.awsIotJobArn; + } + if (data.awsIotJobId !== undefined && data.awsIotJobId !== null) { + contents.awsIotJobId = data.awsIotJobId; + } + if (data.otaUpdateArn !== undefined && data.otaUpdateArn !== null) { + contents.otaUpdateArn = data.otaUpdateArn; + } + if (data.otaUpdateId !== undefined && data.otaUpdateId !== null) { + contents.otaUpdateId = data.otaUpdateId; + } + if (data.otaUpdateStatus !== undefined && data.otaUpdateStatus !== null) { + contents.otaUpdateStatus = data.otaUpdateStatus; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateOTAUpdateCommand = deserializeAws_restJson1CreateOTAUpdateCommand; +const deserializeAws_restJson1CreateOTAUpdateCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreatePolicyCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreatePolicyCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + policyArn: undefined, + policyDocument: undefined, + policyName: undefined, + policyVersionId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.policyArn !== undefined && data.policyArn !== null) { + contents.policyArn = data.policyArn; + } + if (data.policyDocument !== undefined && data.policyDocument !== null) { + contents.policyDocument = data.policyDocument; + } + if (data.policyName !== undefined && data.policyName !== null) { + contents.policyName = data.policyName; + } + if (data.policyVersionId !== undefined && data.policyVersionId !== null) { + contents.policyVersionId = data.policyVersionId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreatePolicyCommand = deserializeAws_restJson1CreatePolicyCommand; +const deserializeAws_restJson1CreatePolicyCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "MalformedPolicyException": + case "com.amazonaws.iot#MalformedPolicyException": + response = { + ...(await deserializeAws_restJson1MalformedPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreatePolicyVersionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreatePolicyVersionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + isDefaultVersion: undefined, + policyArn: undefined, + policyDocument: undefined, + policyVersionId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.isDefaultVersion !== undefined && data.isDefaultVersion !== null) { + contents.isDefaultVersion = data.isDefaultVersion; + } + if (data.policyArn !== undefined && data.policyArn !== null) { + contents.policyArn = data.policyArn; + } + if (data.policyDocument !== undefined && data.policyDocument !== null) { + contents.policyDocument = data.policyDocument; + } + if (data.policyVersionId !== undefined && data.policyVersionId !== null) { + contents.policyVersionId = data.policyVersionId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreatePolicyVersionCommand = deserializeAws_restJson1CreatePolicyVersionCommand; +const deserializeAws_restJson1CreatePolicyVersionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "MalformedPolicyException": + case "com.amazonaws.iot#MalformedPolicyException": + response = { + ...(await deserializeAws_restJson1MalformedPolicyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionsLimitExceededException": + case "com.amazonaws.iot#VersionsLimitExceededException": + response = { + ...(await deserializeAws_restJson1VersionsLimitExceededExceptionResponse(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_restJson1CreateProvisioningClaimCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateProvisioningClaimCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificateId: undefined, + certificatePem: undefined, + expiration: undefined, + keyPair: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificateId !== undefined && data.certificateId !== null) { + contents.certificateId = data.certificateId; + } + if (data.certificatePem !== undefined && data.certificatePem !== null) { + contents.certificatePem = data.certificatePem; + } + if (data.expiration !== undefined && data.expiration !== null) { + contents.expiration = new Date(Math.round(data.expiration * 1000)); + } + if (data.keyPair !== undefined && data.keyPair !== null) { + contents.keyPair = deserializeAws_restJson1KeyPair(data.keyPair, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateProvisioningClaimCommand = deserializeAws_restJson1CreateProvisioningClaimCommand; +const deserializeAws_restJson1CreateProvisioningClaimCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateProvisioningTemplateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateProvisioningTemplateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + defaultVersionId: undefined, + templateArn: undefined, + templateName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.defaultVersionId !== undefined && data.defaultVersionId !== null) { + contents.defaultVersionId = data.defaultVersionId; + } + if (data.templateArn !== undefined && data.templateArn !== null) { + contents.templateArn = data.templateArn; + } + if (data.templateName !== undefined && data.templateName !== null) { + contents.templateName = data.templateName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateProvisioningTemplateCommand = deserializeAws_restJson1CreateProvisioningTemplateCommand; +const deserializeAws_restJson1CreateProvisioningTemplateCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateProvisioningTemplateVersionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateProvisioningTemplateVersionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + isDefaultVersion: undefined, + templateArn: undefined, + templateName: undefined, + versionId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.isDefaultVersion !== undefined && data.isDefaultVersion !== null) { + contents.isDefaultVersion = data.isDefaultVersion; + } + if (data.templateArn !== undefined && data.templateArn !== null) { + contents.templateArn = data.templateArn; + } + if (data.templateName !== undefined && data.templateName !== null) { + contents.templateName = data.templateName; + } + if (data.versionId !== undefined && data.versionId !== null) { + contents.versionId = data.versionId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateProvisioningTemplateVersionCommand = deserializeAws_restJson1CreateProvisioningTemplateVersionCommand; +const deserializeAws_restJson1CreateProvisioningTemplateVersionCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionsLimitExceededException": + case "com.amazonaws.iot#VersionsLimitExceededException": + response = { + ...(await deserializeAws_restJson1VersionsLimitExceededExceptionResponse(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_restJson1CreateRoleAliasCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateRoleAliasCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + roleAlias: undefined, + roleAliasArn: undefined, + }; + const data = await parseBody(output.body, context); + if (data.roleAlias !== undefined && data.roleAlias !== null) { + contents.roleAlias = data.roleAlias; + } + if (data.roleAliasArn !== undefined && data.roleAliasArn !== null) { + contents.roleAliasArn = data.roleAliasArn; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateRoleAliasCommand = deserializeAws_restJson1CreateRoleAliasCommand; +const deserializeAws_restJson1CreateRoleAliasCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateScheduledAuditCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateScheduledAuditCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + scheduledAuditArn: undefined, + }; + const data = await parseBody(output.body, context); + if (data.scheduledAuditArn !== undefined && data.scheduledAuditArn !== null) { + contents.scheduledAuditArn = data.scheduledAuditArn; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateScheduledAuditCommand = deserializeAws_restJson1CreateScheduledAuditCommand; +const deserializeAws_restJson1CreateScheduledAuditCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CreateSecurityProfileCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateSecurityProfileCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + securityProfileArn: undefined, + securityProfileName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.securityProfileArn !== undefined && data.securityProfileArn !== null) { + contents.securityProfileArn = data.securityProfileArn; + } + if (data.securityProfileName !== undefined && data.securityProfileName !== null) { + contents.securityProfileName = data.securityProfileName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateSecurityProfileCommand = deserializeAws_restJson1CreateSecurityProfileCommand; +const deserializeAws_restJson1CreateSecurityProfileCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CreateStreamCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateStreamCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + description: undefined, + streamArn: undefined, + streamId: undefined, + streamVersion: undefined, + }; + const data = await parseBody(output.body, context); + if (data.description !== undefined && data.description !== null) { + contents.description = data.description; + } + if (data.streamArn !== undefined && data.streamArn !== null) { + contents.streamArn = data.streamArn; + } + if (data.streamId !== undefined && data.streamId !== null) { + contents.streamId = data.streamId; + } + if (data.streamVersion !== undefined && data.streamVersion !== null) { + contents.streamVersion = data.streamVersion; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateStreamCommand = deserializeAws_restJson1CreateStreamCommand; +const deserializeAws_restJson1CreateStreamCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateThingCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateThingCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + thingArn: undefined, + thingId: undefined, + thingName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.thingArn !== undefined && data.thingArn !== null) { + contents.thingArn = data.thingArn; + } + if (data.thingId !== undefined && data.thingId !== null) { + contents.thingId = data.thingId; + } + if (data.thingName !== undefined && data.thingName !== null) { + contents.thingName = data.thingName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateThingCommand = deserializeAws_restJson1CreateThingCommand; +const deserializeAws_restJson1CreateThingCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateThingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateThingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + thingGroupArn: undefined, + thingGroupId: undefined, + thingGroupName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.thingGroupArn !== undefined && data.thingGroupArn !== null) { + contents.thingGroupArn = data.thingGroupArn; + } + if (data.thingGroupId !== undefined && data.thingGroupId !== null) { + contents.thingGroupId = data.thingGroupId; + } + if (data.thingGroupName !== undefined && data.thingGroupName !== null) { + contents.thingGroupName = data.thingGroupName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateThingGroupCommand = deserializeAws_restJson1CreateThingGroupCommand; +const deserializeAws_restJson1CreateThingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CreateThingTypeCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateThingTypeCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + thingTypeArn: undefined, + thingTypeId: undefined, + thingTypeName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.thingTypeArn !== undefined && data.thingTypeArn !== null) { + contents.thingTypeArn = data.thingTypeArn; + } + if (data.thingTypeId !== undefined && data.thingTypeId !== null) { + contents.thingTypeId = data.thingTypeId; + } + if (data.thingTypeName !== undefined && data.thingTypeName !== null) { + contents.thingTypeName = data.thingTypeName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateThingTypeCommand = deserializeAws_restJson1CreateThingTypeCommand; +const deserializeAws_restJson1CreateThingTypeCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1CreateTopicRuleCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateTopicRuleCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateTopicRuleCommand = deserializeAws_restJson1CreateTopicRuleCommand; +const deserializeAws_restJson1CreateTopicRuleCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "SqlParseException": + case "com.amazonaws.iot#SqlParseException": + response = { + ...(await deserializeAws_restJson1SqlParseExceptionResponse(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_restJson1CreateTopicRuleDestinationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateTopicRuleDestinationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + topicRuleDestination: undefined, + }; + const data = await parseBody(output.body, context); + if (data.topicRuleDestination !== undefined && data.topicRuleDestination !== null) { + contents.topicRuleDestination = deserializeAws_restJson1TopicRuleDestination(data.topicRuleDestination, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1CreateTopicRuleDestinationCommand = deserializeAws_restJson1CreateTopicRuleDestinationCommand; +const deserializeAws_restJson1CreateTopicRuleDestinationCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(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_restJson1DeleteAccountAuditConfigurationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteAccountAuditConfigurationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteAccountAuditConfigurationCommand = deserializeAws_restJson1DeleteAccountAuditConfigurationCommand; +const deserializeAws_restJson1DeleteAccountAuditConfigurationCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DeleteAuditSuppressionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteAuditSuppressionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteAuditSuppressionCommand = deserializeAws_restJson1DeleteAuditSuppressionCommand; +const deserializeAws_restJson1DeleteAuditSuppressionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DeleteAuthorizerCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteAuthorizerCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteAuthorizerCommand = deserializeAws_restJson1DeleteAuthorizerCommand; +const deserializeAws_restJson1DeleteAuthorizerCommandError = 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 "DeleteConflictException": + case "com.amazonaws.iot#DeleteConflictException": + response = { + ...(await deserializeAws_restJson1DeleteConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteBillingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteBillingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteBillingGroupCommand = deserializeAws_restJson1DeleteBillingGroupCommand; +const deserializeAws_restJson1DeleteBillingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1DeleteCACertificateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteCACertificateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteCACertificateCommand = deserializeAws_restJson1DeleteCACertificateCommand; +const deserializeAws_restJson1DeleteCACertificateCommandError = 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 "CertificateStateException": + case "com.amazonaws.iot#CertificateStateException": + response = { + ...(await deserializeAws_restJson1CertificateStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteCertificateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteCertificateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteCertificateCommand = deserializeAws_restJson1DeleteCertificateCommand; +const deserializeAws_restJson1DeleteCertificateCommandError = 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 "CertificateStateException": + case "com.amazonaws.iot#CertificateStateException": + response = { + ...(await deserializeAws_restJson1CertificateStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "DeleteConflictException": + case "com.amazonaws.iot#DeleteConflictException": + response = { + ...(await deserializeAws_restJson1DeleteConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteDimensionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteDimensionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteDimensionCommand = deserializeAws_restJson1DeleteDimensionCommand; +const deserializeAws_restJson1DeleteDimensionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DeleteDomainConfigurationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteDomainConfigurationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteDomainConfigurationCommand = deserializeAws_restJson1DeleteDomainConfigurationCommand; +const deserializeAws_restJson1DeleteDomainConfigurationCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteDynamicThingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteDynamicThingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteDynamicThingGroupCommand = deserializeAws_restJson1DeleteDynamicThingGroupCommand; +const deserializeAws_restJson1DeleteDynamicThingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1DeleteJobCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteJobCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteJobCommand = deserializeAws_restJson1DeleteJobCommand; +const deserializeAws_restJson1DeleteJobCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidStateTransitionException": + case "com.amazonaws.iot#InvalidStateTransitionException": + response = { + ...(await deserializeAws_restJson1InvalidStateTransitionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DeleteJobExecutionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteJobExecutionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteJobExecutionCommand = deserializeAws_restJson1DeleteJobExecutionCommand; +const deserializeAws_restJson1DeleteJobExecutionCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidStateTransitionException": + case "com.amazonaws.iot#InvalidStateTransitionException": + response = { + ...(await deserializeAws_restJson1InvalidStateTransitionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DeleteMitigationActionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteMitigationActionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteMitigationActionCommand = deserializeAws_restJson1DeleteMitigationActionCommand; +const deserializeAws_restJson1DeleteMitigationActionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DeleteOTAUpdateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteOTAUpdateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteOTAUpdateCommand = deserializeAws_restJson1DeleteOTAUpdateCommand; +const deserializeAws_restJson1DeleteOTAUpdateCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1DeletePolicyCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeletePolicyCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeletePolicyCommand = deserializeAws_restJson1DeletePolicyCommand; +const deserializeAws_restJson1DeletePolicyCommandError = 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 "DeleteConflictException": + case "com.amazonaws.iot#DeleteConflictException": + response = { + ...(await deserializeAws_restJson1DeleteConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeletePolicyVersionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeletePolicyVersionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeletePolicyVersionCommand = deserializeAws_restJson1DeletePolicyVersionCommand; +const deserializeAws_restJson1DeletePolicyVersionCommandError = 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 "DeleteConflictException": + case "com.amazonaws.iot#DeleteConflictException": + response = { + ...(await deserializeAws_restJson1DeleteConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteProvisioningTemplateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteProvisioningTemplateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteProvisioningTemplateCommand = deserializeAws_restJson1DeleteProvisioningTemplateCommand; +const deserializeAws_restJson1DeleteProvisioningTemplateCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "DeleteConflictException": + case "com.amazonaws.iot#DeleteConflictException": + response = { + ...(await deserializeAws_restJson1DeleteConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteProvisioningTemplateVersionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteProvisioningTemplateVersionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteProvisioningTemplateVersionCommand = deserializeAws_restJson1DeleteProvisioningTemplateVersionCommand; +const deserializeAws_restJson1DeleteProvisioningTemplateVersionCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "DeleteConflictException": + case "com.amazonaws.iot#DeleteConflictException": + response = { + ...(await deserializeAws_restJson1DeleteConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteRegistrationCodeCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteRegistrationCodeCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteRegistrationCodeCommand = deserializeAws_restJson1DeleteRegistrationCodeCommand; +const deserializeAws_restJson1DeleteRegistrationCodeCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteRoleAliasCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteRoleAliasCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteRoleAliasCommand = deserializeAws_restJson1DeleteRoleAliasCommand; +const deserializeAws_restJson1DeleteRoleAliasCommandError = 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 "DeleteConflictException": + case "com.amazonaws.iot#DeleteConflictException": + response = { + ...(await deserializeAws_restJson1DeleteConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteScheduledAuditCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteScheduledAuditCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteScheduledAuditCommand = deserializeAws_restJson1DeleteScheduledAuditCommand; +const deserializeAws_restJson1DeleteScheduledAuditCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DeleteSecurityProfileCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteSecurityProfileCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteSecurityProfileCommand = deserializeAws_restJson1DeleteSecurityProfileCommand; +const deserializeAws_restJson1DeleteSecurityProfileCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1DeleteStreamCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteStreamCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteStreamCommand = deserializeAws_restJson1DeleteStreamCommand; +const deserializeAws_restJson1DeleteStreamCommandError = 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 "DeleteConflictException": + case "com.amazonaws.iot#DeleteConflictException": + response = { + ...(await deserializeAws_restJson1DeleteConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteThingCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteThingCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteThingCommand = deserializeAws_restJson1DeleteThingCommand; +const deserializeAws_restJson1DeleteThingCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1DeleteThingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteThingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteThingGroupCommand = deserializeAws_restJson1DeleteThingGroupCommand; +const deserializeAws_restJson1DeleteThingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1DeleteThingTypeCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteThingTypeCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteThingTypeCommand = deserializeAws_restJson1DeleteThingTypeCommand; +const deserializeAws_restJson1DeleteThingTypeCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteTopicRuleCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteTopicRuleCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteTopicRuleCommand = deserializeAws_restJson1DeleteTopicRuleCommand; +const deserializeAws_restJson1DeleteTopicRuleCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteTopicRuleDestinationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteTopicRuleDestinationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteTopicRuleDestinationCommand = deserializeAws_restJson1DeleteTopicRuleDestinationCommand; +const deserializeAws_restJson1DeleteTopicRuleDestinationCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DeleteV2LoggingLevelCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteV2LoggingLevelCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeleteV2LoggingLevelCommand = deserializeAws_restJson1DeleteV2LoggingLevelCommand; +const deserializeAws_restJson1DeleteV2LoggingLevelCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(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_restJson1DeprecateThingTypeCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeprecateThingTypeCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DeprecateThingTypeCommand = deserializeAws_restJson1DeprecateThingTypeCommand; +const deserializeAws_restJson1DeprecateThingTypeCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeAccountAuditConfigurationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeAccountAuditConfigurationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + auditCheckConfigurations: undefined, + auditNotificationTargetConfigurations: undefined, + roleArn: undefined, + }; + const data = await parseBody(output.body, context); + if (data.auditCheckConfigurations !== undefined && data.auditCheckConfigurations !== null) { + contents.auditCheckConfigurations = deserializeAws_restJson1AuditCheckConfigurations(data.auditCheckConfigurations, context); + } + if (data.auditNotificationTargetConfigurations !== undefined && data.auditNotificationTargetConfigurations !== null) { + contents.auditNotificationTargetConfigurations = deserializeAws_restJson1AuditNotificationTargetConfigurations(data.auditNotificationTargetConfigurations, context); + } + if (data.roleArn !== undefined && data.roleArn !== null) { + contents.roleArn = data.roleArn; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeAccountAuditConfigurationCommand = deserializeAws_restJson1DescribeAccountAuditConfigurationCommand; +const deserializeAws_restJson1DescribeAccountAuditConfigurationCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeAuditFindingCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeAuditFindingCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + finding: undefined, + }; + const data = await parseBody(output.body, context); + if (data.finding !== undefined && data.finding !== null) { + contents.finding = deserializeAws_restJson1AuditFinding(data.finding, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeAuditFindingCommand = deserializeAws_restJson1DescribeAuditFindingCommand; +const deserializeAws_restJson1DescribeAuditFindingCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeAuditMitigationActionsTaskCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeAuditMitigationActionsTaskCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + actionsDefinition: undefined, + auditCheckToActionsMapping: undefined, + endTime: undefined, + startTime: undefined, + target: undefined, + taskStatistics: undefined, + taskStatus: undefined, + }; + const data = await parseBody(output.body, context); + if (data.actionsDefinition !== undefined && data.actionsDefinition !== null) { + contents.actionsDefinition = deserializeAws_restJson1MitigationActionList(data.actionsDefinition, context); + } + if (data.auditCheckToActionsMapping !== undefined && data.auditCheckToActionsMapping !== null) { + contents.auditCheckToActionsMapping = deserializeAws_restJson1AuditCheckToActionsMapping(data.auditCheckToActionsMapping, context); + } + if (data.endTime !== undefined && data.endTime !== null) { + contents.endTime = new Date(Math.round(data.endTime * 1000)); + } + if (data.startTime !== undefined && data.startTime !== null) { + contents.startTime = new Date(Math.round(data.startTime * 1000)); + } + if (data.target !== undefined && data.target !== null) { + contents.target = deserializeAws_restJson1AuditMitigationActionsTaskTarget(data.target, context); + } + if (data.taskStatistics !== undefined && data.taskStatistics !== null) { + contents.taskStatistics = deserializeAws_restJson1AuditMitigationActionsTaskStatistics(data.taskStatistics, context); + } + if (data.taskStatus !== undefined && data.taskStatus !== null) { + contents.taskStatus = data.taskStatus; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeAuditMitigationActionsTaskCommand = deserializeAws_restJson1DescribeAuditMitigationActionsTaskCommand; +const deserializeAws_restJson1DescribeAuditMitigationActionsTaskCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeAuditSuppressionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeAuditSuppressionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + checkName: undefined, + description: undefined, + expirationDate: undefined, + resourceIdentifier: undefined, + suppressIndefinitely: undefined, + }; + const data = await parseBody(output.body, context); + if (data.checkName !== undefined && data.checkName !== null) { + contents.checkName = data.checkName; + } + if (data.description !== undefined && data.description !== null) { + contents.description = data.description; + } + if (data.expirationDate !== undefined && data.expirationDate !== null) { + contents.expirationDate = new Date(Math.round(data.expirationDate * 1000)); + } + if (data.resourceIdentifier !== undefined && data.resourceIdentifier !== null) { + contents.resourceIdentifier = deserializeAws_restJson1ResourceIdentifier(data.resourceIdentifier, context); + } + if (data.suppressIndefinitely !== undefined && data.suppressIndefinitely !== null) { + contents.suppressIndefinitely = data.suppressIndefinitely; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeAuditSuppressionCommand = deserializeAws_restJson1DescribeAuditSuppressionCommand; +const deserializeAws_restJson1DescribeAuditSuppressionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeAuditTaskCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeAuditTaskCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + auditDetails: undefined, + scheduledAuditName: undefined, + taskStartTime: undefined, + taskStatistics: undefined, + taskStatus: undefined, + taskType: undefined, + }; + const data = await parseBody(output.body, context); + if (data.auditDetails !== undefined && data.auditDetails !== null) { + contents.auditDetails = deserializeAws_restJson1AuditDetails(data.auditDetails, context); + } + if (data.scheduledAuditName !== undefined && data.scheduledAuditName !== null) { + contents.scheduledAuditName = data.scheduledAuditName; + } + if (data.taskStartTime !== undefined && data.taskStartTime !== null) { + contents.taskStartTime = new Date(Math.round(data.taskStartTime * 1000)); + } + if (data.taskStatistics !== undefined && data.taskStatistics !== null) { + contents.taskStatistics = deserializeAws_restJson1TaskStatistics(data.taskStatistics, context); + } + if (data.taskStatus !== undefined && data.taskStatus !== null) { + contents.taskStatus = data.taskStatus; + } + if (data.taskType !== undefined && data.taskType !== null) { + contents.taskType = data.taskType; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeAuditTaskCommand = deserializeAws_restJson1DescribeAuditTaskCommand; +const deserializeAws_restJson1DescribeAuditTaskCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeAuthorizerCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeAuthorizerCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + authorizerDescription: undefined, + }; + const data = await parseBody(output.body, context); + if (data.authorizerDescription !== undefined && data.authorizerDescription !== null) { + contents.authorizerDescription = deserializeAws_restJson1AuthorizerDescription(data.authorizerDescription, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeAuthorizerCommand = deserializeAws_restJson1DescribeAuthorizerCommand; +const deserializeAws_restJson1DescribeAuthorizerCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeBillingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeBillingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + billingGroupArn: undefined, + billingGroupId: undefined, + billingGroupMetadata: undefined, + billingGroupName: undefined, + billingGroupProperties: undefined, + version: undefined, + }; + const data = await parseBody(output.body, context); + if (data.billingGroupArn !== undefined && data.billingGroupArn !== null) { + contents.billingGroupArn = data.billingGroupArn; + } + if (data.billingGroupId !== undefined && data.billingGroupId !== null) { + contents.billingGroupId = data.billingGroupId; + } + if (data.billingGroupMetadata !== undefined && data.billingGroupMetadata !== null) { + contents.billingGroupMetadata = deserializeAws_restJson1BillingGroupMetadata(data.billingGroupMetadata, context); + } + if (data.billingGroupName !== undefined && data.billingGroupName !== null) { + contents.billingGroupName = data.billingGroupName; + } + if (data.billingGroupProperties !== undefined && data.billingGroupProperties !== null) { + contents.billingGroupProperties = deserializeAws_restJson1BillingGroupProperties(data.billingGroupProperties, context); + } + if (data.version !== undefined && data.version !== null) { + contents.version = data.version; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeBillingGroupCommand = deserializeAws_restJson1DescribeBillingGroupCommand; +const deserializeAws_restJson1DescribeBillingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeCACertificateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeCACertificateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificateDescription: undefined, + registrationConfig: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificateDescription !== undefined && data.certificateDescription !== null) { + contents.certificateDescription = deserializeAws_restJson1CACertificateDescription(data.certificateDescription, context); + } + if (data.registrationConfig !== undefined && data.registrationConfig !== null) { + contents.registrationConfig = deserializeAws_restJson1RegistrationConfig(data.registrationConfig, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeCACertificateCommand = deserializeAws_restJson1DescribeCACertificateCommand; +const deserializeAws_restJson1DescribeCACertificateCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeCertificateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeCertificateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificateDescription: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificateDescription !== undefined && data.certificateDescription !== null) { + contents.certificateDescription = deserializeAws_restJson1CertificateDescription(data.certificateDescription, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeCertificateCommand = deserializeAws_restJson1DescribeCertificateCommand; +const deserializeAws_restJson1DescribeCertificateCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeDefaultAuthorizerCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeDefaultAuthorizerCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + authorizerDescription: undefined, + }; + const data = await parseBody(output.body, context); + if (data.authorizerDescription !== undefined && data.authorizerDescription !== null) { + contents.authorizerDescription = deserializeAws_restJson1AuthorizerDescription(data.authorizerDescription, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeDefaultAuthorizerCommand = deserializeAws_restJson1DescribeDefaultAuthorizerCommand; +const deserializeAws_restJson1DescribeDefaultAuthorizerCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeDimensionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeDimensionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + arn: undefined, + creationDate: undefined, + lastModifiedDate: undefined, + name: undefined, + stringValues: undefined, + type: undefined, + }; + const data = await parseBody(output.body, context); + if (data.arn !== undefined && data.arn !== null) { + contents.arn = data.arn; + } + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.lastModifiedDate !== undefined && data.lastModifiedDate !== null) { + contents.lastModifiedDate = new Date(Math.round(data.lastModifiedDate * 1000)); + } + if (data.name !== undefined && data.name !== null) { + contents.name = data.name; + } + if (data.stringValues !== undefined && data.stringValues !== null) { + contents.stringValues = deserializeAws_restJson1DimensionStringValues(data.stringValues, context); + } + if (data.type !== undefined && data.type !== null) { + contents.type = data.type; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeDimensionCommand = deserializeAws_restJson1DescribeDimensionCommand; +const deserializeAws_restJson1DescribeDimensionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeDomainConfigurationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeDomainConfigurationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + authorizerConfig: undefined, + domainConfigurationArn: undefined, + domainConfigurationName: undefined, + domainConfigurationStatus: undefined, + domainName: undefined, + domainType: undefined, + lastStatusChangeDate: undefined, + serverCertificates: undefined, + serviceType: undefined, + }; + const data = await parseBody(output.body, context); + if (data.authorizerConfig !== undefined && data.authorizerConfig !== null) { + contents.authorizerConfig = deserializeAws_restJson1AuthorizerConfig(data.authorizerConfig, context); + } + if (data.domainConfigurationArn !== undefined && data.domainConfigurationArn !== null) { + contents.domainConfigurationArn = data.domainConfigurationArn; + } + if (data.domainConfigurationName !== undefined && data.domainConfigurationName !== null) { + contents.domainConfigurationName = data.domainConfigurationName; + } + if (data.domainConfigurationStatus !== undefined && data.domainConfigurationStatus !== null) { + contents.domainConfigurationStatus = data.domainConfigurationStatus; + } + if (data.domainName !== undefined && data.domainName !== null) { + contents.domainName = data.domainName; + } + if (data.domainType !== undefined && data.domainType !== null) { + contents.domainType = data.domainType; + } + if (data.lastStatusChangeDate !== undefined && data.lastStatusChangeDate !== null) { + contents.lastStatusChangeDate = new Date(Math.round(data.lastStatusChangeDate * 1000)); + } + if (data.serverCertificates !== undefined && data.serverCertificates !== null) { + contents.serverCertificates = deserializeAws_restJson1ServerCertificates(data.serverCertificates, context); + } + if (data.serviceType !== undefined && data.serviceType !== null) { + contents.serviceType = data.serviceType; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeDomainConfigurationCommand = deserializeAws_restJson1DescribeDomainConfigurationCommand; +const deserializeAws_restJson1DescribeDomainConfigurationCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeEndpointCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeEndpointCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + endpointAddress: undefined, + }; + const data = await parseBody(output.body, context); + if (data.endpointAddress !== undefined && data.endpointAddress !== null) { + contents.endpointAddress = data.endpointAddress; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeEndpointCommand = deserializeAws_restJson1DescribeEndpointCommand; +const deserializeAws_restJson1DescribeEndpointCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeEventConfigurationsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeEventConfigurationsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + creationDate: undefined, + eventConfigurations: undefined, + lastModifiedDate: undefined, + }; + const data = await parseBody(output.body, context); + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.eventConfigurations !== undefined && data.eventConfigurations !== null) { + contents.eventConfigurations = deserializeAws_restJson1EventConfigurations(data.eventConfigurations, context); + } + if (data.lastModifiedDate !== undefined && data.lastModifiedDate !== null) { + contents.lastModifiedDate = new Date(Math.round(data.lastModifiedDate * 1000)); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeEventConfigurationsCommand = deserializeAws_restJson1DescribeEventConfigurationsCommand; +const deserializeAws_restJson1DescribeEventConfigurationsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeIndexCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeIndexCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + indexName: undefined, + indexStatus: undefined, + schema: undefined, + }; + const data = await parseBody(output.body, context); + if (data.indexName !== undefined && data.indexName !== null) { + contents.indexName = data.indexName; + } + if (data.indexStatus !== undefined && data.indexStatus !== null) { + contents.indexStatus = data.indexStatus; + } + if (data.schema !== undefined && data.schema !== null) { + contents.schema = data.schema; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeIndexCommand = deserializeAws_restJson1DescribeIndexCommand; +const deserializeAws_restJson1DescribeIndexCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeJobCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeJobCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + documentSource: undefined, + job: undefined, + }; + const data = await parseBody(output.body, context); + if (data.documentSource !== undefined && data.documentSource !== null) { + contents.documentSource = data.documentSource; + } + if (data.job !== undefined && data.job !== null) { + contents.job = deserializeAws_restJson1Job(data.job, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeJobCommand = deserializeAws_restJson1DescribeJobCommand; +const deserializeAws_restJson1DescribeJobCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeJobExecutionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeJobExecutionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + execution: undefined, + }; + const data = await parseBody(output.body, context); + if (data.execution !== undefined && data.execution !== null) { + contents.execution = deserializeAws_restJson1JobExecution(data.execution, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeJobExecutionCommand = deserializeAws_restJson1DescribeJobExecutionCommand; +const deserializeAws_restJson1DescribeJobExecutionCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeMitigationActionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeMitigationActionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + actionArn: undefined, + actionId: undefined, + actionName: undefined, + actionParams: undefined, + actionType: undefined, + creationDate: undefined, + lastModifiedDate: undefined, + roleArn: undefined, + }; + const data = await parseBody(output.body, context); + if (data.actionArn !== undefined && data.actionArn !== null) { + contents.actionArn = data.actionArn; + } + if (data.actionId !== undefined && data.actionId !== null) { + contents.actionId = data.actionId; + } + if (data.actionName !== undefined && data.actionName !== null) { + contents.actionName = data.actionName; + } + if (data.actionParams !== undefined && data.actionParams !== null) { + contents.actionParams = deserializeAws_restJson1MitigationActionParams(data.actionParams, context); + } + if (data.actionType !== undefined && data.actionType !== null) { + contents.actionType = data.actionType; + } + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.lastModifiedDate !== undefined && data.lastModifiedDate !== null) { + contents.lastModifiedDate = new Date(Math.round(data.lastModifiedDate * 1000)); + } + if (data.roleArn !== undefined && data.roleArn !== null) { + contents.roleArn = data.roleArn; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeMitigationActionCommand = deserializeAws_restJson1DescribeMitigationActionCommand; +const deserializeAws_restJson1DescribeMitigationActionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeProvisioningTemplateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeProvisioningTemplateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + creationDate: undefined, + defaultVersionId: undefined, + description: undefined, + enabled: undefined, + lastModifiedDate: undefined, + preProvisioningHook: undefined, + provisioningRoleArn: undefined, + templateArn: undefined, + templateBody: undefined, + templateName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.defaultVersionId !== undefined && data.defaultVersionId !== null) { + contents.defaultVersionId = data.defaultVersionId; + } + if (data.description !== undefined && data.description !== null) { + contents.description = data.description; + } + if (data.enabled !== undefined && data.enabled !== null) { + contents.enabled = data.enabled; + } + if (data.lastModifiedDate !== undefined && data.lastModifiedDate !== null) { + contents.lastModifiedDate = new Date(Math.round(data.lastModifiedDate * 1000)); + } + if (data.preProvisioningHook !== undefined && data.preProvisioningHook !== null) { + contents.preProvisioningHook = deserializeAws_restJson1ProvisioningHook(data.preProvisioningHook, context); + } + if (data.provisioningRoleArn !== undefined && data.provisioningRoleArn !== null) { + contents.provisioningRoleArn = data.provisioningRoleArn; + } + if (data.templateArn !== undefined && data.templateArn !== null) { + contents.templateArn = data.templateArn; + } + if (data.templateBody !== undefined && data.templateBody !== null) { + contents.templateBody = data.templateBody; + } + if (data.templateName !== undefined && data.templateName !== null) { + contents.templateName = data.templateName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeProvisioningTemplateCommand = deserializeAws_restJson1DescribeProvisioningTemplateCommand; +const deserializeAws_restJson1DescribeProvisioningTemplateCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeProvisioningTemplateVersionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeProvisioningTemplateVersionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + creationDate: undefined, + isDefaultVersion: undefined, + templateBody: undefined, + versionId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.isDefaultVersion !== undefined && data.isDefaultVersion !== null) { + contents.isDefaultVersion = data.isDefaultVersion; + } + if (data.templateBody !== undefined && data.templateBody !== null) { + contents.templateBody = data.templateBody; + } + if (data.versionId !== undefined && data.versionId !== null) { + contents.versionId = data.versionId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeProvisioningTemplateVersionCommand = deserializeAws_restJson1DescribeProvisioningTemplateVersionCommand; +const deserializeAws_restJson1DescribeProvisioningTemplateVersionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeRoleAliasCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeRoleAliasCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + roleAliasDescription: undefined, + }; + const data = await parseBody(output.body, context); + if (data.roleAliasDescription !== undefined && data.roleAliasDescription !== null) { + contents.roleAliasDescription = deserializeAws_restJson1RoleAliasDescription(data.roleAliasDescription, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeRoleAliasCommand = deserializeAws_restJson1DescribeRoleAliasCommand; +const deserializeAws_restJson1DescribeRoleAliasCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeScheduledAuditCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeScheduledAuditCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + dayOfMonth: undefined, + dayOfWeek: undefined, + frequency: undefined, + scheduledAuditArn: undefined, + scheduledAuditName: undefined, + targetCheckNames: undefined, + }; + const data = await parseBody(output.body, context); + if (data.dayOfMonth !== undefined && data.dayOfMonth !== null) { + contents.dayOfMonth = data.dayOfMonth; + } + if (data.dayOfWeek !== undefined && data.dayOfWeek !== null) { + contents.dayOfWeek = data.dayOfWeek; + } + if (data.frequency !== undefined && data.frequency !== null) { + contents.frequency = data.frequency; + } + if (data.scheduledAuditArn !== undefined && data.scheduledAuditArn !== null) { + contents.scheduledAuditArn = data.scheduledAuditArn; + } + if (data.scheduledAuditName !== undefined && data.scheduledAuditName !== null) { + contents.scheduledAuditName = data.scheduledAuditName; + } + if (data.targetCheckNames !== undefined && data.targetCheckNames !== null) { + contents.targetCheckNames = deserializeAws_restJson1TargetAuditCheckNames(data.targetCheckNames, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeScheduledAuditCommand = deserializeAws_restJson1DescribeScheduledAuditCommand; +const deserializeAws_restJson1DescribeScheduledAuditCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeSecurityProfileCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeSecurityProfileCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + additionalMetricsToRetain: undefined, + additionalMetricsToRetainV2: undefined, + alertTargets: undefined, + behaviors: undefined, + creationDate: undefined, + lastModifiedDate: undefined, + securityProfileArn: undefined, + securityProfileDescription: undefined, + securityProfileName: undefined, + version: undefined, + }; + const data = await parseBody(output.body, context); + if (data.additionalMetricsToRetain !== undefined && data.additionalMetricsToRetain !== null) { + contents.additionalMetricsToRetain = deserializeAws_restJson1AdditionalMetricsToRetainList(data.additionalMetricsToRetain, context); + } + if (data.additionalMetricsToRetainV2 !== undefined && data.additionalMetricsToRetainV2 !== null) { + contents.additionalMetricsToRetainV2 = deserializeAws_restJson1AdditionalMetricsToRetainV2List(data.additionalMetricsToRetainV2, context); + } + if (data.alertTargets !== undefined && data.alertTargets !== null) { + contents.alertTargets = deserializeAws_restJson1AlertTargets(data.alertTargets, context); + } + if (data.behaviors !== undefined && data.behaviors !== null) { + contents.behaviors = deserializeAws_restJson1Behaviors(data.behaviors, context); + } + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.lastModifiedDate !== undefined && data.lastModifiedDate !== null) { + contents.lastModifiedDate = new Date(Math.round(data.lastModifiedDate * 1000)); + } + if (data.securityProfileArn !== undefined && data.securityProfileArn !== null) { + contents.securityProfileArn = data.securityProfileArn; + } + if (data.securityProfileDescription !== undefined && data.securityProfileDescription !== null) { + contents.securityProfileDescription = data.securityProfileDescription; + } + if (data.securityProfileName !== undefined && data.securityProfileName !== null) { + contents.securityProfileName = data.securityProfileName; + } + if (data.version !== undefined && data.version !== null) { + contents.version = data.version; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeSecurityProfileCommand = deserializeAws_restJson1DescribeSecurityProfileCommand; +const deserializeAws_restJson1DescribeSecurityProfileCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeStreamCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeStreamCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + streamInfo: undefined, + }; + const data = await parseBody(output.body, context); + if (data.streamInfo !== undefined && data.streamInfo !== null) { + contents.streamInfo = deserializeAws_restJson1StreamInfo(data.streamInfo, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeStreamCommand = deserializeAws_restJson1DescribeStreamCommand; +const deserializeAws_restJson1DescribeStreamCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeThingCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeThingCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + attributes: undefined, + billingGroupName: undefined, + defaultClientId: undefined, + thingArn: undefined, + thingId: undefined, + thingName: undefined, + thingTypeName: undefined, + version: undefined, + }; + const data = await parseBody(output.body, context); + if (data.attributes !== undefined && data.attributes !== null) { + contents.attributes = deserializeAws_restJson1Attributes(data.attributes, context); + } + if (data.billingGroupName !== undefined && data.billingGroupName !== null) { + contents.billingGroupName = data.billingGroupName; + } + if (data.defaultClientId !== undefined && data.defaultClientId !== null) { + contents.defaultClientId = data.defaultClientId; + } + if (data.thingArn !== undefined && data.thingArn !== null) { + contents.thingArn = data.thingArn; + } + if (data.thingId !== undefined && data.thingId !== null) { + contents.thingId = data.thingId; + } + if (data.thingName !== undefined && data.thingName !== null) { + contents.thingName = data.thingName; + } + if (data.thingTypeName !== undefined && data.thingTypeName !== null) { + contents.thingTypeName = data.thingTypeName; + } + if (data.version !== undefined && data.version !== null) { + contents.version = data.version; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeThingCommand = deserializeAws_restJson1DescribeThingCommand; +const deserializeAws_restJson1DescribeThingCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeThingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeThingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + indexName: undefined, + queryString: undefined, + queryVersion: undefined, + status: undefined, + thingGroupArn: undefined, + thingGroupId: undefined, + thingGroupMetadata: undefined, + thingGroupName: undefined, + thingGroupProperties: undefined, + version: undefined, + }; + const data = await parseBody(output.body, context); + if (data.indexName !== undefined && data.indexName !== null) { + contents.indexName = data.indexName; + } + if (data.queryString !== undefined && data.queryString !== null) { + contents.queryString = data.queryString; + } + if (data.queryVersion !== undefined && data.queryVersion !== null) { + contents.queryVersion = data.queryVersion; + } + if (data.status !== undefined && data.status !== null) { + contents.status = data.status; + } + if (data.thingGroupArn !== undefined && data.thingGroupArn !== null) { + contents.thingGroupArn = data.thingGroupArn; + } + if (data.thingGroupId !== undefined && data.thingGroupId !== null) { + contents.thingGroupId = data.thingGroupId; + } + if (data.thingGroupMetadata !== undefined && data.thingGroupMetadata !== null) { + contents.thingGroupMetadata = deserializeAws_restJson1ThingGroupMetadata(data.thingGroupMetadata, context); + } + if (data.thingGroupName !== undefined && data.thingGroupName !== null) { + contents.thingGroupName = data.thingGroupName; + } + if (data.thingGroupProperties !== undefined && data.thingGroupProperties !== null) { + contents.thingGroupProperties = deserializeAws_restJson1ThingGroupProperties(data.thingGroupProperties, context); + } + if (data.version !== undefined && data.version !== null) { + contents.version = data.version; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeThingGroupCommand = deserializeAws_restJson1DescribeThingGroupCommand; +const deserializeAws_restJson1DescribeThingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DescribeThingRegistrationTaskCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeThingRegistrationTaskCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + creationDate: undefined, + failureCount: undefined, + inputFileBucket: undefined, + inputFileKey: undefined, + lastModifiedDate: undefined, + message: undefined, + percentageProgress: undefined, + roleArn: undefined, + status: undefined, + successCount: undefined, + taskId: undefined, + templateBody: undefined, + }; + const data = await parseBody(output.body, context); + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.failureCount !== undefined && data.failureCount !== null) { + contents.failureCount = data.failureCount; + } + if (data.inputFileBucket !== undefined && data.inputFileBucket !== null) { + contents.inputFileBucket = data.inputFileBucket; + } + if (data.inputFileKey !== undefined && data.inputFileKey !== null) { + contents.inputFileKey = data.inputFileKey; + } + if (data.lastModifiedDate !== undefined && data.lastModifiedDate !== null) { + contents.lastModifiedDate = new Date(Math.round(data.lastModifiedDate * 1000)); + } + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + if (data.percentageProgress !== undefined && data.percentageProgress !== null) { + contents.percentageProgress = data.percentageProgress; + } + if (data.roleArn !== undefined && data.roleArn !== null) { + contents.roleArn = data.roleArn; + } + if (data.status !== undefined && data.status !== null) { + contents.status = data.status; + } + if (data.successCount !== undefined && data.successCount !== null) { + contents.successCount = data.successCount; + } + if (data.taskId !== undefined && data.taskId !== null) { + contents.taskId = data.taskId; + } + if (data.templateBody !== undefined && data.templateBody !== null) { + contents.templateBody = data.templateBody; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeThingRegistrationTaskCommand = deserializeAws_restJson1DescribeThingRegistrationTaskCommand; +const deserializeAws_restJson1DescribeThingRegistrationTaskCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DescribeThingTypeCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeThingTypeCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + thingTypeArn: undefined, + thingTypeId: undefined, + thingTypeMetadata: undefined, + thingTypeName: undefined, + thingTypeProperties: undefined, + }; + const data = await parseBody(output.body, context); + if (data.thingTypeArn !== undefined && data.thingTypeArn !== null) { + contents.thingTypeArn = data.thingTypeArn; + } + if (data.thingTypeId !== undefined && data.thingTypeId !== null) { + contents.thingTypeId = data.thingTypeId; + } + if (data.thingTypeMetadata !== undefined && data.thingTypeMetadata !== null) { + contents.thingTypeMetadata = deserializeAws_restJson1ThingTypeMetadata(data.thingTypeMetadata, context); + } + if (data.thingTypeName !== undefined && data.thingTypeName !== null) { + contents.thingTypeName = data.thingTypeName; + } + if (data.thingTypeProperties !== undefined && data.thingTypeProperties !== null) { + contents.thingTypeProperties = deserializeAws_restJson1ThingTypeProperties(data.thingTypeProperties, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DescribeThingTypeCommand = deserializeAws_restJson1DescribeThingTypeCommand; +const deserializeAws_restJson1DescribeThingTypeCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DetachPolicyCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DetachPolicyCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DetachPolicyCommand = deserializeAws_restJson1DetachPolicyCommand; +const deserializeAws_restJson1DetachPolicyCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DetachPrincipalPolicyCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DetachPrincipalPolicyCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DetachPrincipalPolicyCommand = deserializeAws_restJson1DetachPrincipalPolicyCommand; +const deserializeAws_restJson1DetachPrincipalPolicyCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DetachSecurityProfileCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DetachSecurityProfileCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DetachSecurityProfileCommand = deserializeAws_restJson1DetachSecurityProfileCommand; +const deserializeAws_restJson1DetachSecurityProfileCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1DetachThingPrincipalCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DetachThingPrincipalCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DetachThingPrincipalCommand = deserializeAws_restJson1DetachThingPrincipalCommand; +const deserializeAws_restJson1DetachThingPrincipalCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1DisableTopicRuleCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DisableTopicRuleCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1DisableTopicRuleCommand = deserializeAws_restJson1DisableTopicRuleCommand; +const deserializeAws_restJson1DisableTopicRuleCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1EnableTopicRuleCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1EnableTopicRuleCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1EnableTopicRuleCommand = deserializeAws_restJson1EnableTopicRuleCommand; +const deserializeAws_restJson1EnableTopicRuleCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetCardinalityCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetCardinalityCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + cardinality: undefined, + }; + const data = await parseBody(output.body, context); + if (data.cardinality !== undefined && data.cardinality !== null) { + contents.cardinality = data.cardinality; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetCardinalityCommand = deserializeAws_restJson1GetCardinalityCommand; +const deserializeAws_restJson1GetCardinalityCommandError = 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 "IndexNotReadyException": + case "com.amazonaws.iot#IndexNotReadyException": + response = { + ...(await deserializeAws_restJson1IndexNotReadyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidAggregationException": + case "com.amazonaws.iot#InvalidAggregationException": + response = { + ...(await deserializeAws_restJson1InvalidAggregationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidQueryException": + case "com.amazonaws.iot#InvalidQueryException": + response = { + ...(await deserializeAws_restJson1InvalidQueryExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetEffectivePoliciesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetEffectivePoliciesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + effectivePolicies: undefined, + }; + const data = await parseBody(output.body, context); + if (data.effectivePolicies !== undefined && data.effectivePolicies !== null) { + contents.effectivePolicies = deserializeAws_restJson1EffectivePolicies(data.effectivePolicies, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetEffectivePoliciesCommand = deserializeAws_restJson1GetEffectivePoliciesCommand; +const deserializeAws_restJson1GetEffectivePoliciesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetIndexingConfigurationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetIndexingConfigurationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + thingGroupIndexingConfiguration: undefined, + thingIndexingConfiguration: undefined, + }; + const data = await parseBody(output.body, context); + if (data.thingGroupIndexingConfiguration !== undefined && data.thingGroupIndexingConfiguration !== null) { + contents.thingGroupIndexingConfiguration = deserializeAws_restJson1ThingGroupIndexingConfiguration(data.thingGroupIndexingConfiguration, context); + } + if (data.thingIndexingConfiguration !== undefined && data.thingIndexingConfiguration !== null) { + contents.thingIndexingConfiguration = deserializeAws_restJson1ThingIndexingConfiguration(data.thingIndexingConfiguration, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetIndexingConfigurationCommand = deserializeAws_restJson1GetIndexingConfigurationCommand; +const deserializeAws_restJson1GetIndexingConfigurationCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetJobDocumentCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetJobDocumentCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + document: undefined, + }; + const data = await parseBody(output.body, context); + if (data.document !== undefined && data.document !== null) { + contents.document = data.document; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetJobDocumentCommand = deserializeAws_restJson1GetJobDocumentCommand; +const deserializeAws_restJson1GetJobDocumentCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1GetLoggingOptionsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetLoggingOptionsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + logLevel: undefined, + roleArn: undefined, + }; + const data = await parseBody(output.body, context); + if (data.logLevel !== undefined && data.logLevel !== null) { + contents.logLevel = data.logLevel; + } + if (data.roleArn !== undefined && data.roleArn !== null) { + contents.roleArn = data.roleArn; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetLoggingOptionsCommand = deserializeAws_restJson1GetLoggingOptionsCommand; +const deserializeAws_restJson1GetLoggingOptionsCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(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_restJson1GetOTAUpdateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetOTAUpdateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + otaUpdateInfo: undefined, + }; + const data = await parseBody(output.body, context); + if (data.otaUpdateInfo !== undefined && data.otaUpdateInfo !== null) { + contents.otaUpdateInfo = deserializeAws_restJson1OTAUpdateInfo(data.otaUpdateInfo, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetOTAUpdateCommand = deserializeAws_restJson1GetOTAUpdateCommand; +const deserializeAws_restJson1GetOTAUpdateCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetPercentilesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetPercentilesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + percentiles: undefined, + }; + const data = await parseBody(output.body, context); + if (data.percentiles !== undefined && data.percentiles !== null) { + contents.percentiles = deserializeAws_restJson1Percentiles(data.percentiles, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetPercentilesCommand = deserializeAws_restJson1GetPercentilesCommand; +const deserializeAws_restJson1GetPercentilesCommandError = 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 "IndexNotReadyException": + case "com.amazonaws.iot#IndexNotReadyException": + response = { + ...(await deserializeAws_restJson1IndexNotReadyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidAggregationException": + case "com.amazonaws.iot#InvalidAggregationException": + response = { + ...(await deserializeAws_restJson1InvalidAggregationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidQueryException": + case "com.amazonaws.iot#InvalidQueryException": + response = { + ...(await deserializeAws_restJson1InvalidQueryExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetPolicyCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetPolicyCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + creationDate: undefined, + defaultVersionId: undefined, + generationId: undefined, + lastModifiedDate: undefined, + policyArn: undefined, + policyDocument: undefined, + policyName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.defaultVersionId !== undefined && data.defaultVersionId !== null) { + contents.defaultVersionId = data.defaultVersionId; + } + if (data.generationId !== undefined && data.generationId !== null) { + contents.generationId = data.generationId; + } + if (data.lastModifiedDate !== undefined && data.lastModifiedDate !== null) { + contents.lastModifiedDate = new Date(Math.round(data.lastModifiedDate * 1000)); + } + if (data.policyArn !== undefined && data.policyArn !== null) { + contents.policyArn = data.policyArn; + } + if (data.policyDocument !== undefined && data.policyDocument !== null) { + contents.policyDocument = data.policyDocument; + } + if (data.policyName !== undefined && data.policyName !== null) { + contents.policyName = data.policyName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetPolicyCommand = deserializeAws_restJson1GetPolicyCommand; +const deserializeAws_restJson1GetPolicyCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetPolicyVersionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetPolicyVersionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + creationDate: undefined, + generationId: undefined, + isDefaultVersion: undefined, + lastModifiedDate: undefined, + policyArn: undefined, + policyDocument: undefined, + policyName: undefined, + policyVersionId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.generationId !== undefined && data.generationId !== null) { + contents.generationId = data.generationId; + } + if (data.isDefaultVersion !== undefined && data.isDefaultVersion !== null) { + contents.isDefaultVersion = data.isDefaultVersion; + } + if (data.lastModifiedDate !== undefined && data.lastModifiedDate !== null) { + contents.lastModifiedDate = new Date(Math.round(data.lastModifiedDate * 1000)); + } + if (data.policyArn !== undefined && data.policyArn !== null) { + contents.policyArn = data.policyArn; + } + if (data.policyDocument !== undefined && data.policyDocument !== null) { + contents.policyDocument = data.policyDocument; + } + if (data.policyName !== undefined && data.policyName !== null) { + contents.policyName = data.policyName; + } + if (data.policyVersionId !== undefined && data.policyVersionId !== null) { + contents.policyVersionId = data.policyVersionId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetPolicyVersionCommand = deserializeAws_restJson1GetPolicyVersionCommand; +const deserializeAws_restJson1GetPolicyVersionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetRegistrationCodeCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetRegistrationCodeCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + registrationCode: undefined, + }; + const data = await parseBody(output.body, context); + if (data.registrationCode !== undefined && data.registrationCode !== null) { + contents.registrationCode = data.registrationCode; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetRegistrationCodeCommand = deserializeAws_restJson1GetRegistrationCodeCommand; +const deserializeAws_restJson1GetRegistrationCodeCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetStatisticsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetStatisticsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + statistics: undefined, + }; + const data = await parseBody(output.body, context); + if (data.statistics !== undefined && data.statistics !== null) { + contents.statistics = deserializeAws_restJson1Statistics(data.statistics, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetStatisticsCommand = deserializeAws_restJson1GetStatisticsCommand; +const deserializeAws_restJson1GetStatisticsCommandError = 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 "IndexNotReadyException": + case "com.amazonaws.iot#IndexNotReadyException": + response = { + ...(await deserializeAws_restJson1IndexNotReadyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidAggregationException": + case "com.amazonaws.iot#InvalidAggregationException": + response = { + ...(await deserializeAws_restJson1InvalidAggregationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidQueryException": + case "com.amazonaws.iot#InvalidQueryException": + response = { + ...(await deserializeAws_restJson1InvalidQueryExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetTopicRuleCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetTopicRuleCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + rule: undefined, + ruleArn: undefined, + }; + const data = await parseBody(output.body, context); + if (data.rule !== undefined && data.rule !== null) { + contents.rule = deserializeAws_restJson1TopicRule(data.rule, context); + } + if (data.ruleArn !== undefined && data.ruleArn !== null) { + contents.ruleArn = data.ruleArn; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetTopicRuleCommand = deserializeAws_restJson1GetTopicRuleCommand; +const deserializeAws_restJson1GetTopicRuleCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetTopicRuleDestinationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetTopicRuleDestinationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + topicRuleDestination: undefined, + }; + const data = await parseBody(output.body, context); + if (data.topicRuleDestination !== undefined && data.topicRuleDestination !== null) { + contents.topicRuleDestination = deserializeAws_restJson1TopicRuleDestination(data.topicRuleDestination, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetTopicRuleDestinationCommand = deserializeAws_restJson1GetTopicRuleDestinationCommand; +const deserializeAws_restJson1GetTopicRuleDestinationCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1GetV2LoggingOptionsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetV2LoggingOptionsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + defaultLogLevel: undefined, + disableAllLogs: undefined, + roleArn: undefined, + }; + const data = await parseBody(output.body, context); + if (data.defaultLogLevel !== undefined && data.defaultLogLevel !== null) { + contents.defaultLogLevel = data.defaultLogLevel; + } + if (data.disableAllLogs !== undefined && data.disableAllLogs !== null) { + contents.disableAllLogs = data.disableAllLogs; + } + if (data.roleArn !== undefined && data.roleArn !== null) { + contents.roleArn = data.roleArn; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetV2LoggingOptionsCommand = deserializeAws_restJson1GetV2LoggingOptionsCommand; +const deserializeAws_restJson1GetV2LoggingOptionsCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotConfiguredException": + case "com.amazonaws.iot#NotConfiguredException": + response = { + ...(await deserializeAws_restJson1NotConfiguredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(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_restJson1ListActiveViolationsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListActiveViolationsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + activeViolations: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.activeViolations !== undefined && data.activeViolations !== null) { + contents.activeViolations = deserializeAws_restJson1ActiveViolations(data.activeViolations, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListActiveViolationsCommand = deserializeAws_restJson1ListActiveViolationsCommand; +const deserializeAws_restJson1ListActiveViolationsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListAttachedPoliciesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAttachedPoliciesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextMarker: undefined, + policies: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + if (data.policies !== undefined && data.policies !== null) { + contents.policies = deserializeAws_restJson1Policies(data.policies, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListAttachedPoliciesCommand = deserializeAws_restJson1ListAttachedPoliciesCommand; +const deserializeAws_restJson1ListAttachedPoliciesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListAuditFindingsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAuditFindingsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + findings: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.findings !== undefined && data.findings !== null) { + contents.findings = deserializeAws_restJson1AuditFindings(data.findings, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListAuditFindingsCommand = deserializeAws_restJson1ListAuditFindingsCommand; +const deserializeAws_restJson1ListAuditFindingsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListAuditMitigationActionsExecutionsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAuditMitigationActionsExecutionsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + actionsExecutions: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.actionsExecutions !== undefined && data.actionsExecutions !== null) { + contents.actionsExecutions = deserializeAws_restJson1AuditMitigationActionExecutionMetadataList(data.actionsExecutions, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListAuditMitigationActionsExecutionsCommand = deserializeAws_restJson1ListAuditMitigationActionsExecutionsCommand; +const deserializeAws_restJson1ListAuditMitigationActionsExecutionsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListAuditMitigationActionsTasksCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAuditMitigationActionsTasksCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + tasks: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.tasks !== undefined && data.tasks !== null) { + contents.tasks = deserializeAws_restJson1AuditMitigationActionsTaskMetadataList(data.tasks, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListAuditMitigationActionsTasksCommand = deserializeAws_restJson1ListAuditMitigationActionsTasksCommand; +const deserializeAws_restJson1ListAuditMitigationActionsTasksCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListAuditSuppressionsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAuditSuppressionsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + suppressions: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.suppressions !== undefined && data.suppressions !== null) { + contents.suppressions = deserializeAws_restJson1AuditSuppressionList(data.suppressions, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListAuditSuppressionsCommand = deserializeAws_restJson1ListAuditSuppressionsCommand; +const deserializeAws_restJson1ListAuditSuppressionsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListAuditTasksCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAuditTasksCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + tasks: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.tasks !== undefined && data.tasks !== null) { + contents.tasks = deserializeAws_restJson1AuditTaskMetadataList(data.tasks, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListAuditTasksCommand = deserializeAws_restJson1ListAuditTasksCommand; +const deserializeAws_restJson1ListAuditTasksCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListAuthorizersCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAuthorizersCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + authorizers: undefined, + nextMarker: undefined, + }; + const data = await parseBody(output.body, context); + if (data.authorizers !== undefined && data.authorizers !== null) { + contents.authorizers = deserializeAws_restJson1Authorizers(data.authorizers, context); + } + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListAuthorizersCommand = deserializeAws_restJson1ListAuthorizersCommand; +const deserializeAws_restJson1ListAuthorizersCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListBillingGroupsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListBillingGroupsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + billingGroups: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.billingGroups !== undefined && data.billingGroups !== null) { + contents.billingGroups = deserializeAws_restJson1BillingGroupNameAndArnList(data.billingGroups, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListBillingGroupsCommand = deserializeAws_restJson1ListBillingGroupsCommand; +const deserializeAws_restJson1ListBillingGroupsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListCACertificatesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListCACertificatesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificates: undefined, + nextMarker: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificates !== undefined && data.certificates !== null) { + contents.certificates = deserializeAws_restJson1CACertificates(data.certificates, context); + } + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListCACertificatesCommand = deserializeAws_restJson1ListCACertificatesCommand; +const deserializeAws_restJson1ListCACertificatesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListCertificatesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListCertificatesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificates: undefined, + nextMarker: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificates !== undefined && data.certificates !== null) { + contents.certificates = deserializeAws_restJson1Certificates(data.certificates, context); + } + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListCertificatesCommand = deserializeAws_restJson1ListCertificatesCommand; +const deserializeAws_restJson1ListCertificatesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListCertificatesByCACommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListCertificatesByCACommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificates: undefined, + nextMarker: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificates !== undefined && data.certificates !== null) { + contents.certificates = deserializeAws_restJson1Certificates(data.certificates, context); + } + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListCertificatesByCACommand = deserializeAws_restJson1ListCertificatesByCACommand; +const deserializeAws_restJson1ListCertificatesByCACommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListDimensionsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListDimensionsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + dimensionNames: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.dimensionNames !== undefined && data.dimensionNames !== null) { + contents.dimensionNames = deserializeAws_restJson1DimensionNames(data.dimensionNames, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListDimensionsCommand = deserializeAws_restJson1ListDimensionsCommand; +const deserializeAws_restJson1ListDimensionsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListDomainConfigurationsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListDomainConfigurationsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + domainConfigurations: undefined, + nextMarker: undefined, + }; + const data = await parseBody(output.body, context); + if (data.domainConfigurations !== undefined && data.domainConfigurations !== null) { + contents.domainConfigurations = deserializeAws_restJson1DomainConfigurations(data.domainConfigurations, context); + } + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListDomainConfigurationsCommand = deserializeAws_restJson1ListDomainConfigurationsCommand; +const deserializeAws_restJson1ListDomainConfigurationsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListIndicesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListIndicesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + indexNames: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.indexNames !== undefined && data.indexNames !== null) { + contents.indexNames = deserializeAws_restJson1IndexNamesList(data.indexNames, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListIndicesCommand = deserializeAws_restJson1ListIndicesCommand; +const deserializeAws_restJson1ListIndicesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListJobExecutionsForJobCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListJobExecutionsForJobCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + executionSummaries: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.executionSummaries !== undefined && data.executionSummaries !== null) { + contents.executionSummaries = deserializeAws_restJson1JobExecutionSummaryForJobList(data.executionSummaries, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListJobExecutionsForJobCommand = deserializeAws_restJson1ListJobExecutionsForJobCommand; +const deserializeAws_restJson1ListJobExecutionsForJobCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListJobExecutionsForThingCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListJobExecutionsForThingCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + executionSummaries: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.executionSummaries !== undefined && data.executionSummaries !== null) { + contents.executionSummaries = deserializeAws_restJson1JobExecutionSummaryForThingList(data.executionSummaries, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListJobExecutionsForThingCommand = deserializeAws_restJson1ListJobExecutionsForThingCommand; +const deserializeAws_restJson1ListJobExecutionsForThingCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListJobsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListJobsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + jobs: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.jobs !== undefined && data.jobs !== null) { + contents.jobs = deserializeAws_restJson1JobSummaryList(data.jobs, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListJobsCommand = deserializeAws_restJson1ListJobsCommand; +const deserializeAws_restJson1ListJobsCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListMitigationActionsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListMitigationActionsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + actionIdentifiers: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.actionIdentifiers !== undefined && data.actionIdentifiers !== null) { + contents.actionIdentifiers = deserializeAws_restJson1MitigationActionIdentifierList(data.actionIdentifiers, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListMitigationActionsCommand = deserializeAws_restJson1ListMitigationActionsCommand; +const deserializeAws_restJson1ListMitigationActionsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListOTAUpdatesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListOTAUpdatesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + otaUpdates: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.otaUpdates !== undefined && data.otaUpdates !== null) { + contents.otaUpdates = deserializeAws_restJson1OTAUpdatesSummary(data.otaUpdates, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListOTAUpdatesCommand = deserializeAws_restJson1ListOTAUpdatesCommand; +const deserializeAws_restJson1ListOTAUpdatesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListOutgoingCertificatesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListOutgoingCertificatesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextMarker: undefined, + outgoingCertificates: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + if (data.outgoingCertificates !== undefined && data.outgoingCertificates !== null) { + contents.outgoingCertificates = deserializeAws_restJson1OutgoingCertificates(data.outgoingCertificates, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListOutgoingCertificatesCommand = deserializeAws_restJson1ListOutgoingCertificatesCommand; +const deserializeAws_restJson1ListOutgoingCertificatesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListPoliciesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListPoliciesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextMarker: undefined, + policies: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + if (data.policies !== undefined && data.policies !== null) { + contents.policies = deserializeAws_restJson1Policies(data.policies, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListPoliciesCommand = deserializeAws_restJson1ListPoliciesCommand; +const deserializeAws_restJson1ListPoliciesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListPolicyPrincipalsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListPolicyPrincipalsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextMarker: undefined, + principals: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + if (data.principals !== undefined && data.principals !== null) { + contents.principals = deserializeAws_restJson1Principals(data.principals, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListPolicyPrincipalsCommand = deserializeAws_restJson1ListPolicyPrincipalsCommand; +const deserializeAws_restJson1ListPolicyPrincipalsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListPolicyVersionsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListPolicyVersionsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + policyVersions: undefined, + }; + const data = await parseBody(output.body, context); + if (data.policyVersions !== undefined && data.policyVersions !== null) { + contents.policyVersions = deserializeAws_restJson1PolicyVersions(data.policyVersions, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListPolicyVersionsCommand = deserializeAws_restJson1ListPolicyVersionsCommand; +const deserializeAws_restJson1ListPolicyVersionsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListPrincipalPoliciesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListPrincipalPoliciesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextMarker: undefined, + policies: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + if (data.policies !== undefined && data.policies !== null) { + contents.policies = deserializeAws_restJson1Policies(data.policies, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListPrincipalPoliciesCommand = deserializeAws_restJson1ListPrincipalPoliciesCommand; +const deserializeAws_restJson1ListPrincipalPoliciesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListPrincipalThingsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListPrincipalThingsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + things: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.things !== undefined && data.things !== null) { + contents.things = deserializeAws_restJson1ThingNameList(data.things, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListPrincipalThingsCommand = deserializeAws_restJson1ListPrincipalThingsCommand; +const deserializeAws_restJson1ListPrincipalThingsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListProvisioningTemplatesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListProvisioningTemplatesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + templates: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.templates !== undefined && data.templates !== null) { + contents.templates = deserializeAws_restJson1ProvisioningTemplateListing(data.templates, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListProvisioningTemplatesCommand = deserializeAws_restJson1ListProvisioningTemplatesCommand; +const deserializeAws_restJson1ListProvisioningTemplatesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListProvisioningTemplateVersionsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListProvisioningTemplateVersionsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + versions: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.versions !== undefined && data.versions !== null) { + contents.versions = deserializeAws_restJson1ProvisioningTemplateVersionListing(data.versions, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListProvisioningTemplateVersionsCommand = deserializeAws_restJson1ListProvisioningTemplateVersionsCommand; +const deserializeAws_restJson1ListProvisioningTemplateVersionsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListRoleAliasesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListRoleAliasesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextMarker: undefined, + roleAliases: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + if (data.roleAliases !== undefined && data.roleAliases !== null) { + contents.roleAliases = deserializeAws_restJson1RoleAliases(data.roleAliases, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListRoleAliasesCommand = deserializeAws_restJson1ListRoleAliasesCommand; +const deserializeAws_restJson1ListRoleAliasesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListScheduledAuditsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListScheduledAuditsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + scheduledAudits: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.scheduledAudits !== undefined && data.scheduledAudits !== null) { + contents.scheduledAudits = deserializeAws_restJson1ScheduledAuditMetadataList(data.scheduledAudits, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListScheduledAuditsCommand = deserializeAws_restJson1ListScheduledAuditsCommand; +const deserializeAws_restJson1ListScheduledAuditsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListSecurityProfilesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListSecurityProfilesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + securityProfileIdentifiers: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.securityProfileIdentifiers !== undefined && data.securityProfileIdentifiers !== null) { + contents.securityProfileIdentifiers = deserializeAws_restJson1SecurityProfileIdentifiers(data.securityProfileIdentifiers, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListSecurityProfilesCommand = deserializeAws_restJson1ListSecurityProfilesCommand; +const deserializeAws_restJson1ListSecurityProfilesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListSecurityProfilesForTargetCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListSecurityProfilesForTargetCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + securityProfileTargetMappings: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.securityProfileTargetMappings !== undefined && data.securityProfileTargetMappings !== null) { + contents.securityProfileTargetMappings = deserializeAws_restJson1SecurityProfileTargetMappings(data.securityProfileTargetMappings, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListSecurityProfilesForTargetCommand = deserializeAws_restJson1ListSecurityProfilesForTargetCommand; +const deserializeAws_restJson1ListSecurityProfilesForTargetCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListStreamsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListStreamsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + streams: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.streams !== undefined && data.streams !== null) { + contents.streams = deserializeAws_restJson1StreamsSummary(data.streams, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListStreamsCommand = deserializeAws_restJson1ListStreamsCommand; +const deserializeAws_restJson1ListStreamsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListTagsForResourceCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListTagsForResourceCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + tags: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1TagList(data.tags, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand; +const deserializeAws_restJson1ListTagsForResourceCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListTargetsForPolicyCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListTargetsForPolicyCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextMarker: undefined, + targets: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextMarker !== undefined && data.nextMarker !== null) { + contents.nextMarker = data.nextMarker; + } + if (data.targets !== undefined && data.targets !== null) { + contents.targets = deserializeAws_restJson1PolicyTargets(data.targets, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListTargetsForPolicyCommand = deserializeAws_restJson1ListTargetsForPolicyCommand; +const deserializeAws_restJson1ListTargetsForPolicyCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListTargetsForSecurityProfileCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListTargetsForSecurityProfileCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + securityProfileTargets: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.securityProfileTargets !== undefined && data.securityProfileTargets !== null) { + contents.securityProfileTargets = deserializeAws_restJson1SecurityProfileTargets(data.securityProfileTargets, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListTargetsForSecurityProfileCommand = deserializeAws_restJson1ListTargetsForSecurityProfileCommand; +const deserializeAws_restJson1ListTargetsForSecurityProfileCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListThingGroupsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListThingGroupsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + thingGroups: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.thingGroups !== undefined && data.thingGroups !== null) { + contents.thingGroups = deserializeAws_restJson1ThingGroupNameAndArnList(data.thingGroups, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListThingGroupsCommand = deserializeAws_restJson1ListThingGroupsCommand; +const deserializeAws_restJson1ListThingGroupsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListThingGroupsForThingCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListThingGroupsForThingCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + thingGroups: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.thingGroups !== undefined && data.thingGroups !== null) { + contents.thingGroups = deserializeAws_restJson1ThingGroupNameAndArnList(data.thingGroups, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListThingGroupsForThingCommand = deserializeAws_restJson1ListThingGroupsForThingCommand; +const deserializeAws_restJson1ListThingGroupsForThingCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListThingPrincipalsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListThingPrincipalsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + principals: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.principals !== undefined && data.principals !== null) { + contents.principals = deserializeAws_restJson1Principals(data.principals, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListThingPrincipalsCommand = deserializeAws_restJson1ListThingPrincipalsCommand; +const deserializeAws_restJson1ListThingPrincipalsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListThingRegistrationTaskReportsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListThingRegistrationTaskReportsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + reportType: undefined, + resourceLinks: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.reportType !== undefined && data.reportType !== null) { + contents.reportType = data.reportType; + } + if (data.resourceLinks !== undefined && data.resourceLinks !== null) { + contents.resourceLinks = deserializeAws_restJson1S3FileUrlList(data.resourceLinks, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListThingRegistrationTaskReportsCommand = deserializeAws_restJson1ListThingRegistrationTaskReportsCommand; +const deserializeAws_restJson1ListThingRegistrationTaskReportsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListThingRegistrationTasksCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListThingRegistrationTasksCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + taskIds: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.taskIds !== undefined && data.taskIds !== null) { + contents.taskIds = deserializeAws_restJson1TaskIdList(data.taskIds, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListThingRegistrationTasksCommand = deserializeAws_restJson1ListThingRegistrationTasksCommand; +const deserializeAws_restJson1ListThingRegistrationTasksCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListThingsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListThingsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + things: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.things !== undefined && data.things !== null) { + contents.things = deserializeAws_restJson1ThingAttributeList(data.things, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListThingsCommand = deserializeAws_restJson1ListThingsCommand; +const deserializeAws_restJson1ListThingsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListThingsInBillingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListThingsInBillingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + things: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.things !== undefined && data.things !== null) { + contents.things = deserializeAws_restJson1ThingNameList(data.things, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListThingsInBillingGroupCommand = deserializeAws_restJson1ListThingsInBillingGroupCommand; +const deserializeAws_restJson1ListThingsInBillingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListThingsInThingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListThingsInThingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + things: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.things !== undefined && data.things !== null) { + contents.things = deserializeAws_restJson1ThingNameList(data.things, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListThingsInThingGroupCommand = deserializeAws_restJson1ListThingsInThingGroupCommand; +const deserializeAws_restJson1ListThingsInThingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ListThingTypesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListThingTypesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + thingTypes: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.thingTypes !== undefined && data.thingTypes !== null) { + contents.thingTypes = deserializeAws_restJson1ThingTypeList(data.thingTypes, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListThingTypesCommand = deserializeAws_restJson1ListThingTypesCommand; +const deserializeAws_restJson1ListThingTypesCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListTopicRuleDestinationsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListTopicRuleDestinationsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + destinationSummaries: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.destinationSummaries !== undefined && data.destinationSummaries !== null) { + contents.destinationSummaries = deserializeAws_restJson1TopicRuleDestinationSummaries(data.destinationSummaries, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListTopicRuleDestinationsCommand = deserializeAws_restJson1ListTopicRuleDestinationsCommand; +const deserializeAws_restJson1ListTopicRuleDestinationsCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ListTopicRulesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListTopicRulesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + rules: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.rules !== undefined && data.rules !== null) { + contents.rules = deserializeAws_restJson1TopicRuleList(data.rules, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListTopicRulesCommand = deserializeAws_restJson1ListTopicRulesCommand; +const deserializeAws_restJson1ListTopicRulesCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(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_restJson1ListV2LoggingLevelsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListV2LoggingLevelsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + logTargetConfigurations: undefined, + nextToken: undefined, + }; + const data = await parseBody(output.body, context); + if (data.logTargetConfigurations !== undefined && data.logTargetConfigurations !== null) { + contents.logTargetConfigurations = deserializeAws_restJson1LogTargetConfigurations(data.logTargetConfigurations, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListV2LoggingLevelsCommand = deserializeAws_restJson1ListV2LoggingLevelsCommand; +const deserializeAws_restJson1ListV2LoggingLevelsCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotConfiguredException": + case "com.amazonaws.iot#NotConfiguredException": + response = { + ...(await deserializeAws_restJson1NotConfiguredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(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_restJson1ListViolationEventsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListViolationEventsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + violationEvents: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.violationEvents !== undefined && data.violationEvents !== null) { + contents.violationEvents = deserializeAws_restJson1ViolationEvents(data.violationEvents, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListViolationEventsCommand = deserializeAws_restJson1ListViolationEventsCommand; +const deserializeAws_restJson1ListViolationEventsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1RegisterCACertificateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1RegisterCACertificateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificateArn: undefined, + certificateId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificateArn !== undefined && data.certificateArn !== null) { + contents.certificateArn = data.certificateArn; + } + if (data.certificateId !== undefined && data.certificateId !== null) { + contents.certificateId = data.certificateId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1RegisterCACertificateCommand = deserializeAws_restJson1RegisterCACertificateCommand; +const deserializeAws_restJson1RegisterCACertificateCommandError = 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 "CertificateValidationException": + case "com.amazonaws.iot#CertificateValidationException": + response = { + ...(await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegistrationCodeValidationException": + case "com.amazonaws.iot#RegistrationCodeValidationException": + response = { + ...(await deserializeAws_restJson1RegistrationCodeValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1RegisterCertificateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1RegisterCertificateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificateArn: undefined, + certificateId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificateArn !== undefined && data.certificateArn !== null) { + contents.certificateArn = data.certificateArn; + } + if (data.certificateId !== undefined && data.certificateId !== null) { + contents.certificateId = data.certificateId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1RegisterCertificateCommand = deserializeAws_restJson1RegisterCertificateCommand; +const deserializeAws_restJson1RegisterCertificateCommandError = 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 "CertificateConflictException": + case "com.amazonaws.iot#CertificateConflictException": + response = { + ...(await deserializeAws_restJson1CertificateConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "CertificateStateException": + case "com.amazonaws.iot#CertificateStateException": + response = { + ...(await deserializeAws_restJson1CertificateStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "CertificateValidationException": + case "com.amazonaws.iot#CertificateValidationException": + response = { + ...(await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1RegisterCertificateWithoutCACommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1RegisterCertificateWithoutCACommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificateArn: undefined, + certificateId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificateArn !== undefined && data.certificateArn !== null) { + contents.certificateArn = data.certificateArn; + } + if (data.certificateId !== undefined && data.certificateId !== null) { + contents.certificateId = data.certificateId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1RegisterCertificateWithoutCACommand = deserializeAws_restJson1RegisterCertificateWithoutCACommand; +const deserializeAws_restJson1RegisterCertificateWithoutCACommandError = 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 "CertificateStateException": + case "com.amazonaws.iot#CertificateStateException": + response = { + ...(await deserializeAws_restJson1CertificateStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "CertificateValidationException": + case "com.amazonaws.iot#CertificateValidationException": + response = { + ...(await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1RegisterThingCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1RegisterThingCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + certificatePem: undefined, + resourceArns: undefined, + }; + const data = await parseBody(output.body, context); + if (data.certificatePem !== undefined && data.certificatePem !== null) { + contents.certificatePem = data.certificatePem; + } + if (data.resourceArns !== undefined && data.resourceArns !== null) { + contents.resourceArns = deserializeAws_restJson1ResourceArns(data.resourceArns, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1RegisterThingCommand = deserializeAws_restJson1RegisterThingCommand; +const deserializeAws_restJson1RegisterThingCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceRegistrationFailureException": + case "com.amazonaws.iot#ResourceRegistrationFailureException": + response = { + ...(await deserializeAws_restJson1ResourceRegistrationFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1RejectCertificateTransferCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1RejectCertificateTransferCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1RejectCertificateTransferCommand = deserializeAws_restJson1RejectCertificateTransferCommand; +const deserializeAws_restJson1RejectCertificateTransferCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TransferAlreadyCompletedException": + case "com.amazonaws.iot#TransferAlreadyCompletedException": + response = { + ...(await deserializeAws_restJson1TransferAlreadyCompletedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1RemoveThingFromBillingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1RemoveThingFromBillingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1RemoveThingFromBillingGroupCommand = deserializeAws_restJson1RemoveThingFromBillingGroupCommand; +const deserializeAws_restJson1RemoveThingFromBillingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1RemoveThingFromThingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1RemoveThingFromThingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1RemoveThingFromThingGroupCommand = deserializeAws_restJson1RemoveThingFromThingGroupCommand; +const deserializeAws_restJson1RemoveThingFromThingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1ReplaceTopicRuleCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ReplaceTopicRuleCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ReplaceTopicRuleCommand = deserializeAws_restJson1ReplaceTopicRuleCommand; +const deserializeAws_restJson1ReplaceTopicRuleCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "SqlParseException": + case "com.amazonaws.iot#SqlParseException": + response = { + ...(await deserializeAws_restJson1SqlParseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1SearchIndexCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1SearchIndexCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + thingGroups: undefined, + things: undefined, + }; + const data = await parseBody(output.body, context); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = data.nextToken; + } + if (data.thingGroups !== undefined && data.thingGroups !== null) { + contents.thingGroups = deserializeAws_restJson1ThingGroupDocumentList(data.thingGroups, context); + } + if (data.things !== undefined && data.things !== null) { + contents.things = deserializeAws_restJson1ThingDocumentList(data.things, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1SearchIndexCommand = deserializeAws_restJson1SearchIndexCommand; +const deserializeAws_restJson1SearchIndexCommandError = 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 "IndexNotReadyException": + case "com.amazonaws.iot#IndexNotReadyException": + response = { + ...(await deserializeAws_restJson1IndexNotReadyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidQueryException": + case "com.amazonaws.iot#InvalidQueryException": + response = { + ...(await deserializeAws_restJson1InvalidQueryExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1SetDefaultAuthorizerCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1SetDefaultAuthorizerCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + authorizerArn: undefined, + authorizerName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.authorizerArn !== undefined && data.authorizerArn !== null) { + contents.authorizerArn = data.authorizerArn; + } + if (data.authorizerName !== undefined && data.authorizerName !== null) { + contents.authorizerName = data.authorizerName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1SetDefaultAuthorizerCommand = deserializeAws_restJson1SetDefaultAuthorizerCommand; +const deserializeAws_restJson1SetDefaultAuthorizerCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.iot#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1SetDefaultPolicyVersionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1SetDefaultPolicyVersionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1SetDefaultPolicyVersionCommand = deserializeAws_restJson1SetDefaultPolicyVersionCommand; +const deserializeAws_restJson1SetDefaultPolicyVersionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1SetLoggingOptionsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1SetLoggingOptionsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1SetLoggingOptionsCommand = deserializeAws_restJson1SetLoggingOptionsCommand; +const deserializeAws_restJson1SetLoggingOptionsCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(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_restJson1SetV2LoggingLevelCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1SetV2LoggingLevelCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1SetV2LoggingLevelCommand = deserializeAws_restJson1SetV2LoggingLevelCommand; +const deserializeAws_restJson1SetV2LoggingLevelCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotConfiguredException": + case "com.amazonaws.iot#NotConfiguredException": + response = { + ...(await deserializeAws_restJson1NotConfiguredExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(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_restJson1SetV2LoggingOptionsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1SetV2LoggingOptionsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1SetV2LoggingOptionsCommand = deserializeAws_restJson1SetV2LoggingOptionsCommand; +const deserializeAws_restJson1SetV2LoggingOptionsCommandError = 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 "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(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_restJson1StartAuditMitigationActionsTaskCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartAuditMitigationActionsTaskCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + taskId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.taskId !== undefined && data.taskId !== null) { + contents.taskId = data.taskId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1StartAuditMitigationActionsTaskCommand = deserializeAws_restJson1StartAuditMitigationActionsTaskCommand; +const deserializeAws_restJson1StartAuditMitigationActionsTaskCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TaskAlreadyExistsException": + case "com.amazonaws.iot#TaskAlreadyExistsException": + response = { + ...(await deserializeAws_restJson1TaskAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1StartOnDemandAuditTaskCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartOnDemandAuditTaskCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + taskId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.taskId !== undefined && data.taskId !== null) { + contents.taskId = data.taskId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1StartOnDemandAuditTaskCommand = deserializeAws_restJson1StartOnDemandAuditTaskCommand; +const deserializeAws_restJson1StartOnDemandAuditTaskCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1StartThingRegistrationTaskCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartThingRegistrationTaskCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + taskId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.taskId !== undefined && data.taskId !== null) { + contents.taskId = data.taskId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1StartThingRegistrationTaskCommand = deserializeAws_restJson1StartThingRegistrationTaskCommand; +const deserializeAws_restJson1StartThingRegistrationTaskCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1StopThingRegistrationTaskCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StopThingRegistrationTaskCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1StopThingRegistrationTaskCommand = deserializeAws_restJson1StopThingRegistrationTaskCommand; +const deserializeAws_restJson1StopThingRegistrationTaskCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1TagResourceCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1TagResourceCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand; +const deserializeAws_restJson1TagResourceCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1TestAuthorizationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1TestAuthorizationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + authResults: undefined, + }; + const data = await parseBody(output.body, context); + if (data.authResults !== undefined && data.authResults !== null) { + contents.authResults = deserializeAws_restJson1AuthResults(data.authResults, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1TestAuthorizationCommand = deserializeAws_restJson1TestAuthorizationCommand; +const deserializeAws_restJson1TestAuthorizationCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1TestInvokeAuthorizerCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1TestInvokeAuthorizerCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + disconnectAfterInSeconds: undefined, + isAuthenticated: undefined, + policyDocuments: undefined, + principalId: undefined, + refreshAfterInSeconds: undefined, + }; + const data = await parseBody(output.body, context); + if (data.disconnectAfterInSeconds !== undefined && data.disconnectAfterInSeconds !== null) { + contents.disconnectAfterInSeconds = data.disconnectAfterInSeconds; + } + if (data.isAuthenticated !== undefined && data.isAuthenticated !== null) { + contents.isAuthenticated = data.isAuthenticated; + } + if (data.policyDocuments !== undefined && data.policyDocuments !== null) { + contents.policyDocuments = deserializeAws_restJson1PolicyDocuments(data.policyDocuments, context); + } + if (data.principalId !== undefined && data.principalId !== null) { + contents.principalId = data.principalId; + } + if (data.refreshAfterInSeconds !== undefined && data.refreshAfterInSeconds !== null) { + contents.refreshAfterInSeconds = data.refreshAfterInSeconds; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1TestInvokeAuthorizerCommand = deserializeAws_restJson1TestInvokeAuthorizerCommand; +const deserializeAws_restJson1TestInvokeAuthorizerCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidResponseException": + case "com.amazonaws.iot#InvalidResponseException": + response = { + ...(await deserializeAws_restJson1InvalidResponseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1TransferCertificateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1TransferCertificateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + transferredCertificateArn: undefined, + }; + const data = await parseBody(output.body, context); + if (data.transferredCertificateArn !== undefined && data.transferredCertificateArn !== null) { + contents.transferredCertificateArn = data.transferredCertificateArn; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1TransferCertificateCommand = deserializeAws_restJson1TransferCertificateCommand; +const deserializeAws_restJson1TransferCertificateCommandError = 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 "CertificateStateException": + case "com.amazonaws.iot#CertificateStateException": + response = { + ...(await deserializeAws_restJson1CertificateStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TransferConflictException": + case "com.amazonaws.iot#TransferConflictException": + response = { + ...(await deserializeAws_restJson1TransferConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1UntagResourceCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UntagResourceCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand; +const deserializeAws_restJson1UntagResourceCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1UpdateAccountAuditConfigurationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateAccountAuditConfigurationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateAccountAuditConfigurationCommand = deserializeAws_restJson1UpdateAccountAuditConfigurationCommand; +const deserializeAws_restJson1UpdateAccountAuditConfigurationCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1UpdateAuditSuppressionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateAuditSuppressionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateAuditSuppressionCommand = deserializeAws_restJson1UpdateAuditSuppressionCommand; +const deserializeAws_restJson1UpdateAuditSuppressionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1UpdateAuthorizerCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateAuthorizerCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + authorizerArn: undefined, + authorizerName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.authorizerArn !== undefined && data.authorizerArn !== null) { + contents.authorizerArn = data.authorizerArn; + } + if (data.authorizerName !== undefined && data.authorizerName !== null) { + contents.authorizerName = data.authorizerName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateAuthorizerCommand = deserializeAws_restJson1UpdateAuthorizerCommand; +const deserializeAws_restJson1UpdateAuthorizerCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.iot#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1UpdateBillingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateBillingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + version: undefined, + }; + const data = await parseBody(output.body, context); + if (data.version !== undefined && data.version !== null) { + contents.version = data.version; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateBillingGroupCommand = deserializeAws_restJson1UpdateBillingGroupCommand; +const deserializeAws_restJson1UpdateBillingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1UpdateCACertificateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateCACertificateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateCACertificateCommand = deserializeAws_restJson1UpdateCACertificateCommand; +const deserializeAws_restJson1UpdateCACertificateCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1UpdateCertificateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateCertificateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateCertificateCommand = deserializeAws_restJson1UpdateCertificateCommand; +const deserializeAws_restJson1UpdateCertificateCommandError = 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 "CertificateStateException": + case "com.amazonaws.iot#CertificateStateException": + response = { + ...(await deserializeAws_restJson1CertificateStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1UpdateDimensionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateDimensionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + arn: undefined, + creationDate: undefined, + lastModifiedDate: undefined, + name: undefined, + stringValues: undefined, + type: undefined, + }; + const data = await parseBody(output.body, context); + if (data.arn !== undefined && data.arn !== null) { + contents.arn = data.arn; + } + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.lastModifiedDate !== undefined && data.lastModifiedDate !== null) { + contents.lastModifiedDate = new Date(Math.round(data.lastModifiedDate * 1000)); + } + if (data.name !== undefined && data.name !== null) { + contents.name = data.name; + } + if (data.stringValues !== undefined && data.stringValues !== null) { + contents.stringValues = deserializeAws_restJson1DimensionStringValues(data.stringValues, context); + } + if (data.type !== undefined && data.type !== null) { + contents.type = data.type; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateDimensionCommand = deserializeAws_restJson1UpdateDimensionCommand; +const deserializeAws_restJson1UpdateDimensionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1UpdateDomainConfigurationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateDomainConfigurationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + domainConfigurationArn: undefined, + domainConfigurationName: undefined, + }; + const data = await parseBody(output.body, context); + if (data.domainConfigurationArn !== undefined && data.domainConfigurationArn !== null) { + contents.domainConfigurationArn = data.domainConfigurationArn; + } + if (data.domainConfigurationName !== undefined && data.domainConfigurationName !== null) { + contents.domainConfigurationName = data.domainConfigurationName; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateDomainConfigurationCommand = deserializeAws_restJson1UpdateDomainConfigurationCommand; +const deserializeAws_restJson1UpdateDomainConfigurationCommandError = 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 "CertificateValidationException": + case "com.amazonaws.iot#CertificateValidationException": + response = { + ...(await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1UpdateDynamicThingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateDynamicThingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + version: undefined, + }; + const data = await parseBody(output.body, context); + if (data.version !== undefined && data.version !== null) { + contents.version = data.version; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateDynamicThingGroupCommand = deserializeAws_restJson1UpdateDynamicThingGroupCommand; +const deserializeAws_restJson1UpdateDynamicThingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidQueryException": + case "com.amazonaws.iot#InvalidQueryException": + response = { + ...(await deserializeAws_restJson1InvalidQueryExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1UpdateEventConfigurationsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateEventConfigurationsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateEventConfigurationsCommand = deserializeAws_restJson1UpdateEventConfigurationsCommand; +const deserializeAws_restJson1UpdateEventConfigurationsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1UpdateIndexingConfigurationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateIndexingConfigurationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateIndexingConfigurationCommand = deserializeAws_restJson1UpdateIndexingConfigurationCommand; +const deserializeAws_restJson1UpdateIndexingConfigurationCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1UpdateJobCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateJobCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateJobCommand = deserializeAws_restJson1UpdateJobCommand; +const deserializeAws_restJson1UpdateJobCommandError = 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.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1UpdateMitigationActionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateMitigationActionCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + actionArn: undefined, + actionId: undefined, + }; + const data = await parseBody(output.body, context); + if (data.actionArn !== undefined && data.actionArn !== null) { + contents.actionArn = data.actionArn; + } + if (data.actionId !== undefined && data.actionId !== null) { + contents.actionId = data.actionId; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateMitigationActionCommand = deserializeAws_restJson1UpdateMitigationActionCommand; +const deserializeAws_restJson1UpdateMitigationActionCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1UpdateProvisioningTemplateCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateProvisioningTemplateCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateProvisioningTemplateCommand = deserializeAws_restJson1UpdateProvisioningTemplateCommand; +const deserializeAws_restJson1UpdateProvisioningTemplateCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1UpdateRoleAliasCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateRoleAliasCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + roleAlias: undefined, + roleAliasArn: undefined, + }; + const data = await parseBody(output.body, context); + if (data.roleAlias !== undefined && data.roleAlias !== null) { + contents.roleAlias = data.roleAlias; + } + if (data.roleAliasArn !== undefined && data.roleAliasArn !== null) { + contents.roleAliasArn = data.roleAliasArn; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateRoleAliasCommand = deserializeAws_restJson1UpdateRoleAliasCommand; +const deserializeAws_restJson1UpdateRoleAliasCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1UpdateScheduledAuditCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateScheduledAuditCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + scheduledAuditArn: undefined, + }; + const data = await parseBody(output.body, context); + if (data.scheduledAuditArn !== undefined && data.scheduledAuditArn !== null) { + contents.scheduledAuditArn = data.scheduledAuditArn; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateScheduledAuditCommand = deserializeAws_restJson1UpdateScheduledAuditCommand; +const deserializeAws_restJson1UpdateScheduledAuditCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1UpdateSecurityProfileCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateSecurityProfileCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + additionalMetricsToRetain: undefined, + additionalMetricsToRetainV2: undefined, + alertTargets: undefined, + behaviors: undefined, + creationDate: undefined, + lastModifiedDate: undefined, + securityProfileArn: undefined, + securityProfileDescription: undefined, + securityProfileName: undefined, + version: undefined, + }; + const data = await parseBody(output.body, context); + if (data.additionalMetricsToRetain !== undefined && data.additionalMetricsToRetain !== null) { + contents.additionalMetricsToRetain = deserializeAws_restJson1AdditionalMetricsToRetainList(data.additionalMetricsToRetain, context); + } + if (data.additionalMetricsToRetainV2 !== undefined && data.additionalMetricsToRetainV2 !== null) { + contents.additionalMetricsToRetainV2 = deserializeAws_restJson1AdditionalMetricsToRetainV2List(data.additionalMetricsToRetainV2, context); + } + if (data.alertTargets !== undefined && data.alertTargets !== null) { + contents.alertTargets = deserializeAws_restJson1AlertTargets(data.alertTargets, context); + } + if (data.behaviors !== undefined && data.behaviors !== null) { + contents.behaviors = deserializeAws_restJson1Behaviors(data.behaviors, context); + } + if (data.creationDate !== undefined && data.creationDate !== null) { + contents.creationDate = new Date(Math.round(data.creationDate * 1000)); + } + if (data.lastModifiedDate !== undefined && data.lastModifiedDate !== null) { + contents.lastModifiedDate = new Date(Math.round(data.lastModifiedDate * 1000)); + } + if (data.securityProfileArn !== undefined && data.securityProfileArn !== null) { + contents.securityProfileArn = data.securityProfileArn; + } + if (data.securityProfileDescription !== undefined && data.securityProfileDescription !== null) { + contents.securityProfileDescription = data.securityProfileDescription; + } + if (data.securityProfileName !== undefined && data.securityProfileName !== null) { + contents.securityProfileName = data.securityProfileName; + } + if (data.version !== undefined && data.version !== null) { + contents.version = data.version; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateSecurityProfileCommand = deserializeAws_restJson1UpdateSecurityProfileCommand; +const deserializeAws_restJson1UpdateSecurityProfileCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1UpdateStreamCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateStreamCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + description: undefined, + streamArn: undefined, + streamId: undefined, + streamVersion: undefined, + }; + const data = await parseBody(output.body, context); + if (data.description !== undefined && data.description !== null) { + contents.description = data.description; + } + if (data.streamArn !== undefined && data.streamArn !== null) { + contents.streamArn = data.streamArn; + } + if (data.streamId !== undefined && data.streamId !== null) { + contents.streamId = data.streamId; + } + if (data.streamVersion !== undefined && data.streamVersion !== null) { + contents.streamVersion = data.streamVersion; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateStreamCommand = deserializeAws_restJson1UpdateStreamCommand; +const deserializeAws_restJson1UpdateStreamCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1UpdateThingCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateThingCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateThingCommand = deserializeAws_restJson1UpdateThingCommand; +const deserializeAws_restJson1UpdateThingCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1UpdateThingGroupCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateThingGroupCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + version: undefined, + }; + const data = await parseBody(output.body, context); + if (data.version !== undefined && data.version !== null) { + contents.version = data.version; + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateThingGroupCommand = deserializeAws_restJson1UpdateThingGroupCommand; +const deserializeAws_restJson1UpdateThingGroupCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "VersionConflictException": + case "com.amazonaws.iot#VersionConflictException": + response = { + ...(await deserializeAws_restJson1VersionConflictExceptionResponse(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_restJson1UpdateThingGroupsForThingCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateThingGroupsForThingCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateThingGroupsForThingCommand = deserializeAws_restJson1UpdateThingGroupsForThingCommand; +const deserializeAws_restJson1UpdateThingGroupsForThingCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iot#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1UpdateTopicRuleDestinationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateTopicRuleDestinationCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1UpdateTopicRuleDestinationCommand = deserializeAws_restJson1UpdateTopicRuleDestinationCommand; +const deserializeAws_restJson1UpdateTopicRuleDestinationCommandError = 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 "ConflictingResourceUpdateException": + case "com.amazonaws.iot#ConflictingResourceUpdateException": + response = { + ...(await deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalException": + case "com.amazonaws.iot#InternalException": + response = { + ...(await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.iot#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.iot#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_restJson1ValidateSecurityProfileBehaviorsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ValidateSecurityProfileBehaviorsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + valid: undefined, + validationErrors: undefined, + }; + const data = await parseBody(output.body, context); + if (data.valid !== undefined && data.valid !== null) { + contents.valid = data.valid; + } + if (data.validationErrors !== undefined && data.validationErrors !== null) { + contents.validationErrors = deserializeAws_restJson1ValidationErrors(data.validationErrors, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ValidateSecurityProfileBehaviorsCommand = deserializeAws_restJson1ValidateSecurityProfileBehaviorsCommand; +const deserializeAws_restJson1ValidateSecurityProfileBehaviorsCommandError = 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 "InternalFailureException": + case "com.amazonaws.iot#InternalFailureException": + response = { + ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.iot#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iot#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(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_restJson1CertificateConflictExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "CertificateConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1CertificateStateExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "CertificateStateException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1CertificateValidationExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "CertificateValidationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1ConflictingResourceUpdateExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "ConflictingResourceUpdateException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1DeleteConflictExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "DeleteConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1IndexNotReadyExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "IndexNotReadyException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1InternalExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "InternalException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1InternalFailureExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "InternalFailureException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1InvalidAggregationExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "InvalidAggregationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1InvalidQueryExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "InvalidQueryException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +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 = data.message; + } + return contents; +}; +const deserializeAws_restJson1InvalidResponseExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "InvalidResponseException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1InvalidStateTransitionExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "InvalidStateTransitionException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "LimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1MalformedPolicyExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "MalformedPolicyException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1NotConfiguredExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "NotConfiguredException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1RegistrationCodeValidationExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "RegistrationCodeValidationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "ResourceAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + resourceArn: undefined, + resourceId: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + if (data.resourceArn !== undefined && data.resourceArn !== null) { + contents.resourceArn = data.resourceArn; + } + if (data.resourceId !== undefined && data.resourceId !== null) { + contents.resourceId = data.resourceId; + } + 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 = data.message; + } + return contents; +}; +const deserializeAws_restJson1ResourceRegistrationFailureExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "ResourceRegistrationFailureException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "ServiceUnavailableException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1SqlParseExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "SqlParseException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1TaskAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "TaskAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "ThrottlingException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1TransferAlreadyCompletedExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "TransferAlreadyCompletedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1TransferConflictExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "TransferConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = 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 = data.message; + } + return contents; +}; +const deserializeAws_restJson1VersionConflictExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "VersionConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const deserializeAws_restJson1VersionsLimitExceededExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "VersionsLimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = data.message; + } + return contents; +}; +const serializeAws_restJson1AbortConfig = (input, context) => { + return { + ...(input.criteriaList !== undefined && + input.criteriaList !== null && { + criteriaList: serializeAws_restJson1AbortCriteriaList(input.criteriaList, context), + }), + }; +}; +const serializeAws_restJson1AbortCriteria = (input, context) => { + return { + ...(input.action !== undefined && input.action !== null && { action: input.action }), + ...(input.failureType !== undefined && input.failureType !== null && { failureType: input.failureType }), + ...(input.minNumberOfExecutedThings !== undefined && + input.minNumberOfExecutedThings !== null && { minNumberOfExecutedThings: input.minNumberOfExecutedThings }), + ...(input.thresholdPercentage !== undefined && + input.thresholdPercentage !== null && { thresholdPercentage: input.thresholdPercentage }), + }; +}; +const serializeAws_restJson1AbortCriteriaList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1AbortCriteria(entry, context); + }); +}; +const serializeAws_restJson1Action = (input, context) => { + return { + ...(input.cloudwatchAlarm !== undefined && + input.cloudwatchAlarm !== null && { + cloudwatchAlarm: serializeAws_restJson1CloudwatchAlarmAction(input.cloudwatchAlarm, context), + }), + ...(input.cloudwatchLogs !== undefined && + input.cloudwatchLogs !== null && { + cloudwatchLogs: serializeAws_restJson1CloudwatchLogsAction(input.cloudwatchLogs, context), + }), + ...(input.cloudwatchMetric !== undefined && + input.cloudwatchMetric !== null && { + cloudwatchMetric: serializeAws_restJson1CloudwatchMetricAction(input.cloudwatchMetric, context), + }), + ...(input.dynamoDB !== undefined && + input.dynamoDB !== null && { dynamoDB: serializeAws_restJson1DynamoDBAction(input.dynamoDB, context) }), + ...(input.dynamoDBv2 !== undefined && + input.dynamoDBv2 !== null && { dynamoDBv2: serializeAws_restJson1DynamoDBv2Action(input.dynamoDBv2, context) }), + ...(input.elasticsearch !== undefined && + input.elasticsearch !== null && { + elasticsearch: serializeAws_restJson1ElasticsearchAction(input.elasticsearch, context), + }), + ...(input.firehose !== undefined && + input.firehose !== null && { firehose: serializeAws_restJson1FirehoseAction(input.firehose, context) }), + ...(input.http !== undefined && + input.http !== null && { http: serializeAws_restJson1HttpAction(input.http, context) }), + ...(input.iotAnalytics !== undefined && + input.iotAnalytics !== null && { + iotAnalytics: serializeAws_restJson1IotAnalyticsAction(input.iotAnalytics, context), + }), + ...(input.iotEvents !== undefined && + input.iotEvents !== null && { iotEvents: serializeAws_restJson1IotEventsAction(input.iotEvents, context) }), + ...(input.iotSiteWise !== undefined && + input.iotSiteWise !== null && { + iotSiteWise: serializeAws_restJson1IotSiteWiseAction(input.iotSiteWise, context), + }), + ...(input.kinesis !== undefined && + input.kinesis !== null && { kinesis: serializeAws_restJson1KinesisAction(input.kinesis, context) }), + ...(input.lambda !== undefined && + input.lambda !== null && { lambda: serializeAws_restJson1LambdaAction(input.lambda, context) }), + ...(input.republish !== undefined && + input.republish !== null && { republish: serializeAws_restJson1RepublishAction(input.republish, context) }), + ...(input.s3 !== undefined && input.s3 !== null && { s3: serializeAws_restJson1S3Action(input.s3, context) }), + ...(input.salesforce !== undefined && + input.salesforce !== null && { salesforce: serializeAws_restJson1SalesforceAction(input.salesforce, context) }), + ...(input.sns !== undefined && input.sns !== null && { sns: serializeAws_restJson1SnsAction(input.sns, context) }), + ...(input.sqs !== undefined && input.sqs !== null && { sqs: serializeAws_restJson1SqsAction(input.sqs, context) }), + ...(input.stepFunctions !== undefined && + input.stepFunctions !== null && { + stepFunctions: serializeAws_restJson1StepFunctionsAction(input.stepFunctions, context), + }), + ...(input.timestream !== undefined && + input.timestream !== null && { timestream: serializeAws_restJson1TimestreamAction(input.timestream, context) }), + }; +}; +const serializeAws_restJson1ActionList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1Action(entry, context); + }); +}; +const serializeAws_restJson1AdditionalMetricsToRetainList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1AdditionalMetricsToRetainV2List = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1MetricToRetain(entry, context); + }); +}; +const serializeAws_restJson1AdditionalParameterMap = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_restJson1AddThingsToThingGroupParams = (input, context) => { + return { + ...(input.overrideDynamicGroups !== undefined && + input.overrideDynamicGroups !== null && { overrideDynamicGroups: input.overrideDynamicGroups }), + ...(input.thingGroupNames !== undefined && + input.thingGroupNames !== null && { + thingGroupNames: serializeAws_restJson1ThingGroupNames(input.thingGroupNames, context), + }), + }; +}; +const serializeAws_restJson1AlertTarget = (input, context) => { + return { + ...(input.alertTargetArn !== undefined && + input.alertTargetArn !== null && { alertTargetArn: input.alertTargetArn }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }; +}; +const serializeAws_restJson1AlertTargets = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: serializeAws_restJson1AlertTarget(value, context), + }; + }, {}); +}; +const serializeAws_restJson1AssetPropertyTimestamp = (input, context) => { + return { + ...(input.offsetInNanos !== undefined && input.offsetInNanos !== null && { offsetInNanos: input.offsetInNanos }), + ...(input.timeInSeconds !== undefined && input.timeInSeconds !== null && { timeInSeconds: input.timeInSeconds }), + }; +}; +const serializeAws_restJson1AssetPropertyValue = (input, context) => { + return { + ...(input.quality !== undefined && input.quality !== null && { quality: input.quality }), + ...(input.timestamp !== undefined && + input.timestamp !== null && { + timestamp: serializeAws_restJson1AssetPropertyTimestamp(input.timestamp, context), + }), + ...(input.value !== undefined && + input.value !== null && { value: serializeAws_restJson1AssetPropertyVariant(input.value, context) }), + }; +}; +const serializeAws_restJson1AssetPropertyValueList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1AssetPropertyValue(entry, context); + }); +}; +const serializeAws_restJson1AssetPropertyVariant = (input, context) => { + return models_0_1.AssetPropertyVariant.visit(input, { + booleanValue: (value) => ({ booleanValue: value }), + doubleValue: (value) => ({ doubleValue: value }), + integerValue: (value) => ({ integerValue: value }), + stringValue: (value) => ({ stringValue: value }), + _: (name, value) => ({ name: value }), + }); +}; +const serializeAws_restJson1AttributePayload = (input, context) => { + return { + ...(input.attributes !== undefined && + input.attributes !== null && { attributes: serializeAws_restJson1Attributes(input.attributes, context) }), + ...(input.merge !== undefined && input.merge !== null && { merge: input.merge }), + }; +}; +const serializeAws_restJson1Attributes = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_restJson1AttributesMap = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_restJson1AuditCheckConfiguration = (input, context) => { + return { + ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }), + }; +}; +const serializeAws_restJson1AuditCheckConfigurations = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: serializeAws_restJson1AuditCheckConfiguration(value, context), + }; + }, {}); +}; +const serializeAws_restJson1AuditCheckToActionsMapping = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: serializeAws_restJson1MitigationActionNameList(value, context), + }; + }, {}); +}; +const serializeAws_restJson1AuditCheckToReasonCodeFilter = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: serializeAws_restJson1ReasonForNonComplianceCodes(value, context), + }; + }, {}); +}; +const serializeAws_restJson1AuditMitigationActionsTaskTarget = (input, context) => { + return { + ...(input.auditCheckToReasonCodeFilter !== undefined && + input.auditCheckToReasonCodeFilter !== null && { + auditCheckToReasonCodeFilter: serializeAws_restJson1AuditCheckToReasonCodeFilter(input.auditCheckToReasonCodeFilter, context), + }), + ...(input.auditTaskId !== undefined && input.auditTaskId !== null && { auditTaskId: input.auditTaskId }), + ...(input.findingIds !== undefined && + input.findingIds !== null && { findingIds: serializeAws_restJson1FindingIds(input.findingIds, context) }), + }; +}; +const serializeAws_restJson1AuditNotificationTarget = (input, context) => { + return { + ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.targetArn !== undefined && input.targetArn !== null && { targetArn: input.targetArn }), + }; +}; +const serializeAws_restJson1AuditNotificationTargetConfigurations = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: serializeAws_restJson1AuditNotificationTarget(value, context), + }; + }, {}); +}; +const serializeAws_restJson1AuthInfo = (input, context) => { + return { + ...(input.actionType !== undefined && input.actionType !== null && { actionType: input.actionType }), + ...(input.resources !== undefined && + input.resources !== null && { resources: serializeAws_restJson1Resources(input.resources, context) }), + }; +}; +const serializeAws_restJson1AuthInfos = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1AuthInfo(entry, context); + }); +}; +const serializeAws_restJson1AuthorizerConfig = (input, context) => { + return { + ...(input.allowAuthorizerOverride !== undefined && + input.allowAuthorizerOverride !== null && { allowAuthorizerOverride: input.allowAuthorizerOverride }), + ...(input.defaultAuthorizerName !== undefined && + input.defaultAuthorizerName !== null && { defaultAuthorizerName: input.defaultAuthorizerName }), + }; +}; +const serializeAws_restJson1AwsJobAbortConfig = (input, context) => { + return { + ...(input.abortCriteriaList !== undefined && + input.abortCriteriaList !== null && { + abortCriteriaList: serializeAws_restJson1AwsJobAbortCriteriaList(input.abortCriteriaList, context), + }), + }; +}; +const serializeAws_restJson1AwsJobAbortCriteria = (input, context) => { + return { + ...(input.action !== undefined && input.action !== null && { action: input.action }), + ...(input.failureType !== undefined && input.failureType !== null && { failureType: input.failureType }), + ...(input.minNumberOfExecutedThings !== undefined && + input.minNumberOfExecutedThings !== null && { minNumberOfExecutedThings: input.minNumberOfExecutedThings }), + ...(input.thresholdPercentage !== undefined && + input.thresholdPercentage !== null && { thresholdPercentage: input.thresholdPercentage }), + }; +}; +const serializeAws_restJson1AwsJobAbortCriteriaList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1AwsJobAbortCriteria(entry, context); + }); +}; +const serializeAws_restJson1AwsJobExecutionsRolloutConfig = (input, context) => { + return { + ...(input.exponentialRate !== undefined && + input.exponentialRate !== null && { + exponentialRate: serializeAws_restJson1AwsJobExponentialRolloutRate(input.exponentialRate, context), + }), + ...(input.maximumPerMinute !== undefined && + input.maximumPerMinute !== null && { maximumPerMinute: input.maximumPerMinute }), + }; +}; +const serializeAws_restJson1AwsJobExponentialRolloutRate = (input, context) => { + return { + ...(input.baseRatePerMinute !== undefined && + input.baseRatePerMinute !== null && { baseRatePerMinute: input.baseRatePerMinute }), + ...(input.incrementFactor !== undefined && + input.incrementFactor !== null && { incrementFactor: input.incrementFactor }), + ...(input.rateIncreaseCriteria !== undefined && + input.rateIncreaseCriteria !== null && { + rateIncreaseCriteria: serializeAws_restJson1AwsJobRateIncreaseCriteria(input.rateIncreaseCriteria, context), + }), + }; +}; +const serializeAws_restJson1AwsJobPresignedUrlConfig = (input, context) => { + return { + ...(input.expiresInSec !== undefined && input.expiresInSec !== null && { expiresInSec: input.expiresInSec }), + }; +}; +const serializeAws_restJson1AwsJobRateIncreaseCriteria = (input, context) => { + return { + ...(input.numberOfNotifiedThings !== undefined && + input.numberOfNotifiedThings !== null && { numberOfNotifiedThings: input.numberOfNotifiedThings }), + ...(input.numberOfSucceededThings !== undefined && + input.numberOfSucceededThings !== null && { numberOfSucceededThings: input.numberOfSucceededThings }), + }; +}; +const serializeAws_restJson1AwsJobTimeoutConfig = (input, context) => { + return { + ...(input.inProgressTimeoutInMinutes !== undefined && + input.inProgressTimeoutInMinutes !== null && { inProgressTimeoutInMinutes: input.inProgressTimeoutInMinutes }), + }; +}; +const serializeAws_restJson1Behavior = (input, context) => { + return { + ...(input.criteria !== undefined && + input.criteria !== null && { criteria: serializeAws_restJson1BehaviorCriteria(input.criteria, context) }), + ...(input.metric !== undefined && input.metric !== null && { metric: input.metric }), + ...(input.metricDimension !== undefined && + input.metricDimension !== null && { + metricDimension: serializeAws_restJson1MetricDimension(input.metricDimension, context), + }), + ...(input.name !== undefined && input.name !== null && { name: input.name }), + }; +}; +const serializeAws_restJson1BehaviorCriteria = (input, context) => { + return { + ...(input.comparisonOperator !== undefined && + input.comparisonOperator !== null && { comparisonOperator: input.comparisonOperator }), + ...(input.consecutiveDatapointsToAlarm !== undefined && + input.consecutiveDatapointsToAlarm !== null && { + consecutiveDatapointsToAlarm: input.consecutiveDatapointsToAlarm, + }), + ...(input.consecutiveDatapointsToClear !== undefined && + input.consecutiveDatapointsToClear !== null && { + consecutiveDatapointsToClear: input.consecutiveDatapointsToClear, + }), + ...(input.durationSeconds !== undefined && + input.durationSeconds !== null && { durationSeconds: input.durationSeconds }), + ...(input.statisticalThreshold !== undefined && + input.statisticalThreshold !== null && { + statisticalThreshold: serializeAws_restJson1StatisticalThreshold(input.statisticalThreshold, context), + }), + ...(input.value !== undefined && + input.value !== null && { value: serializeAws_restJson1MetricValue(input.value, context) }), + }; +}; +const serializeAws_restJson1Behaviors = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1Behavior(entry, context); + }); +}; +const serializeAws_restJson1BillingGroupProperties = (input, context) => { + return { + ...(input.billingGroupDescription !== undefined && + input.billingGroupDescription !== null && { billingGroupDescription: input.billingGroupDescription }), + }; +}; +const serializeAws_restJson1Cidrs = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1CloudwatchAlarmAction = (input, context) => { + return { + ...(input.alarmName !== undefined && input.alarmName !== null && { alarmName: input.alarmName }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.stateReason !== undefined && input.stateReason !== null && { stateReason: input.stateReason }), + ...(input.stateValue !== undefined && input.stateValue !== null && { stateValue: input.stateValue }), + }; +}; +const serializeAws_restJson1CloudwatchLogsAction = (input, context) => { + return { + ...(input.logGroupName !== undefined && input.logGroupName !== null && { logGroupName: input.logGroupName }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }; +}; +const serializeAws_restJson1CloudwatchMetricAction = (input, context) => { + return { + ...(input.metricName !== undefined && input.metricName !== null && { metricName: input.metricName }), + ...(input.metricNamespace !== undefined && + input.metricNamespace !== null && { metricNamespace: input.metricNamespace }), + ...(input.metricTimestamp !== undefined && + input.metricTimestamp !== null && { metricTimestamp: input.metricTimestamp }), + ...(input.metricUnit !== undefined && input.metricUnit !== null && { metricUnit: input.metricUnit }), + ...(input.metricValue !== undefined && input.metricValue !== null && { metricValue: input.metricValue }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }; +}; +const serializeAws_restJson1CodeSigning = (input, context) => { + return { + ...(input.awsSignerJobId !== undefined && + input.awsSignerJobId !== null && { awsSignerJobId: input.awsSignerJobId }), + ...(input.customCodeSigning !== undefined && + input.customCodeSigning !== null && { + customCodeSigning: serializeAws_restJson1CustomCodeSigning(input.customCodeSigning, context), + }), + ...(input.startSigningJobParameter !== undefined && + input.startSigningJobParameter !== null && { + startSigningJobParameter: serializeAws_restJson1StartSigningJobParameter(input.startSigningJobParameter, context), + }), + }; +}; +const serializeAws_restJson1CodeSigningCertificateChain = (input, context) => { + return { + ...(input.certificateName !== undefined && + input.certificateName !== null && { certificateName: input.certificateName }), + ...(input.inlineDocument !== undefined && + input.inlineDocument !== null && { inlineDocument: input.inlineDocument }), + }; +}; +const serializeAws_restJson1CodeSigningSignature = (input, context) => { + return { + ...(input.inlineDocument !== undefined && + input.inlineDocument !== null && { inlineDocument: context.base64Encoder(input.inlineDocument) }), + }; +}; +const serializeAws_restJson1Configuration = (input, context) => { + return { + ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }), + }; +}; +const serializeAws_restJson1CustomCodeSigning = (input, context) => { + return { + ...(input.certificateChain !== undefined && + input.certificateChain !== null && { + certificateChain: serializeAws_restJson1CodeSigningCertificateChain(input.certificateChain, context), + }), + ...(input.hashAlgorithm !== undefined && input.hashAlgorithm !== null && { hashAlgorithm: input.hashAlgorithm }), + ...(input.signature !== undefined && + input.signature !== null && { signature: serializeAws_restJson1CodeSigningSignature(input.signature, context) }), + ...(input.signatureAlgorithm !== undefined && + input.signatureAlgorithm !== null && { signatureAlgorithm: input.signatureAlgorithm }), + }; +}; +const serializeAws_restJson1Destination = (input, context) => { + return { + ...(input.s3Destination !== undefined && + input.s3Destination !== null && { + s3Destination: serializeAws_restJson1S3Destination(input.s3Destination, context), + }), + }; +}; +const serializeAws_restJson1DetailsMap = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_restJson1DimensionStringValues = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1DynamoDBAction = (input, context) => { + return { + ...(input.hashKeyField !== undefined && input.hashKeyField !== null && { hashKeyField: input.hashKeyField }), + ...(input.hashKeyType !== undefined && input.hashKeyType !== null && { hashKeyType: input.hashKeyType }), + ...(input.hashKeyValue !== undefined && input.hashKeyValue !== null && { hashKeyValue: input.hashKeyValue }), + ...(input.operation !== undefined && input.operation !== null && { operation: input.operation }), + ...(input.payloadField !== undefined && input.payloadField !== null && { payloadField: input.payloadField }), + ...(input.rangeKeyField !== undefined && input.rangeKeyField !== null && { rangeKeyField: input.rangeKeyField }), + ...(input.rangeKeyType !== undefined && input.rangeKeyType !== null && { rangeKeyType: input.rangeKeyType }), + ...(input.rangeKeyValue !== undefined && input.rangeKeyValue !== null && { rangeKeyValue: input.rangeKeyValue }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }), + }; +}; +const serializeAws_restJson1DynamoDBv2Action = (input, context) => { + return { + ...(input.putItem !== undefined && + input.putItem !== null && { putItem: serializeAws_restJson1PutItemInput(input.putItem, context) }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }; +}; +const serializeAws_restJson1ElasticsearchAction = (input, context) => { + return { + ...(input.endpoint !== undefined && input.endpoint !== null && { endpoint: input.endpoint }), + ...(input.id !== undefined && input.id !== null && { id: input.id }), + ...(input.index !== undefined && input.index !== null && { index: input.index }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.type !== undefined && input.type !== null && { type: input.type }), + }; +}; +const serializeAws_restJson1EnableIoTLoggingParams = (input, context) => { + return { + ...(input.logLevel !== undefined && input.logLevel !== null && { logLevel: input.logLevel }), + ...(input.roleArnForLogging !== undefined && + input.roleArnForLogging !== null && { roleArnForLogging: input.roleArnForLogging }), + }; +}; +const serializeAws_restJson1EventConfigurations = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: serializeAws_restJson1Configuration(value, context), + }; + }, {}); +}; +const serializeAws_restJson1ExponentialRolloutRate = (input, context) => { + return { + ...(input.baseRatePerMinute !== undefined && + input.baseRatePerMinute !== null && { baseRatePerMinute: input.baseRatePerMinute }), + ...(input.incrementFactor !== undefined && + input.incrementFactor !== null && { incrementFactor: input.incrementFactor }), + ...(input.rateIncreaseCriteria !== undefined && + input.rateIncreaseCriteria !== null && { + rateIncreaseCriteria: serializeAws_restJson1RateIncreaseCriteria(input.rateIncreaseCriteria, context), + }), + }; +}; +const serializeAws_restJson1Field = (input, context) => { + return { + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.type !== undefined && input.type !== null && { type: input.type }), + }; +}; +const serializeAws_restJson1Fields = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1Field(entry, context); + }); +}; +const serializeAws_restJson1FileLocation = (input, context) => { + return { + ...(input.s3Location !== undefined && + input.s3Location !== null && { s3Location: serializeAws_restJson1S3Location(input.s3Location, context) }), + ...(input.stream !== undefined && + input.stream !== null && { stream: serializeAws_restJson1_Stream(input.stream, context) }), + }; +}; +const serializeAws_restJson1FindingIds = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1FirehoseAction = (input, context) => { + return { + ...(input.batchMode !== undefined && input.batchMode !== null && { batchMode: input.batchMode }), + ...(input.deliveryStreamName !== undefined && + input.deliveryStreamName !== null && { deliveryStreamName: input.deliveryStreamName }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.separator !== undefined && input.separator !== null && { separator: input.separator }), + }; +}; +const serializeAws_restJson1HeaderList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1HttpActionHeader(entry, context); + }); +}; +const serializeAws_restJson1HttpAction = (input, context) => { + return { + ...(input.auth !== undefined && + input.auth !== null && { auth: serializeAws_restJson1HttpAuthorization(input.auth, context) }), + ...(input.confirmationUrl !== undefined && + input.confirmationUrl !== null && { confirmationUrl: input.confirmationUrl }), + ...(input.headers !== undefined && + input.headers !== null && { headers: serializeAws_restJson1HeaderList(input.headers, context) }), + ...(input.url !== undefined && input.url !== null && { url: input.url }), + }; +}; +const serializeAws_restJson1HttpActionHeader = (input, context) => { + return { + ...(input.key !== undefined && input.key !== null && { key: input.key }), + ...(input.value !== undefined && input.value !== null && { value: input.value }), + }; +}; +const serializeAws_restJson1HttpAuthorization = (input, context) => { + return { + ...(input.sigv4 !== undefined && + input.sigv4 !== null && { sigv4: serializeAws_restJson1SigV4Authorization(input.sigv4, context) }), + }; +}; +const serializeAws_restJson1HttpContext = (input, context) => { + return { + ...(input.headers !== undefined && + input.headers !== null && { headers: serializeAws_restJson1HttpHeaders(input.headers, context) }), + ...(input.queryString !== undefined && input.queryString !== null && { queryString: input.queryString }), + }; +}; +const serializeAws_restJson1HttpHeaders = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_restJson1HttpUrlDestinationConfiguration = (input, context) => { + return { + ...(input.confirmationUrl !== undefined && + input.confirmationUrl !== null && { confirmationUrl: input.confirmationUrl }), + }; +}; +const serializeAws_restJson1IotAnalyticsAction = (input, context) => { + return { + ...(input.batchMode !== undefined && input.batchMode !== null && { batchMode: input.batchMode }), + ...(input.channelArn !== undefined && input.channelArn !== null && { channelArn: input.channelArn }), + ...(input.channelName !== undefined && input.channelName !== null && { channelName: input.channelName }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }; +}; +const serializeAws_restJson1IotEventsAction = (input, context) => { + return { + ...(input.batchMode !== undefined && input.batchMode !== null && { batchMode: input.batchMode }), + ...(input.inputName !== undefined && input.inputName !== null && { inputName: input.inputName }), + ...(input.messageId !== undefined && input.messageId !== null && { messageId: input.messageId }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }; +}; +const serializeAws_restJson1IotSiteWiseAction = (input, context) => { + return { + ...(input.putAssetPropertyValueEntries !== undefined && + input.putAssetPropertyValueEntries !== null && { + putAssetPropertyValueEntries: serializeAws_restJson1PutAssetPropertyValueEntryList(input.putAssetPropertyValueEntries, context), + }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }; +}; +const serializeAws_restJson1JobExecutionsRolloutConfig = (input, context) => { + return { + ...(input.exponentialRate !== undefined && + input.exponentialRate !== null && { + exponentialRate: serializeAws_restJson1ExponentialRolloutRate(input.exponentialRate, context), + }), + ...(input.maximumPerMinute !== undefined && + input.maximumPerMinute !== null && { maximumPerMinute: input.maximumPerMinute }), + }; +}; +const serializeAws_restJson1JobTargets = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1KinesisAction = (input, context) => { + return { + ...(input.partitionKey !== undefined && input.partitionKey !== null && { partitionKey: input.partitionKey }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.streamName !== undefined && input.streamName !== null && { streamName: input.streamName }), + }; +}; +const serializeAws_restJson1LambdaAction = (input, context) => { + return { + ...(input.functionArn !== undefined && input.functionArn !== null && { functionArn: input.functionArn }), + }; +}; +const serializeAws_restJson1LoggingOptionsPayload = (input, context) => { + return { + ...(input.logLevel !== undefined && input.logLevel !== null && { logLevel: input.logLevel }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }; +}; +const serializeAws_restJson1LogTarget = (input, context) => { + return { + ...(input.targetName !== undefined && input.targetName !== null && { targetName: input.targetName }), + ...(input.targetType !== undefined && input.targetType !== null && { targetType: input.targetType }), + }; +}; +const serializeAws_restJson1MetricDimension = (input, context) => { + return { + ...(input.dimensionName !== undefined && input.dimensionName !== null && { dimensionName: input.dimensionName }), + ...(input.operator !== undefined && input.operator !== null && { operator: input.operator }), + }; +}; +const serializeAws_restJson1MetricToRetain = (input, context) => { + return { + ...(input.metric !== undefined && input.metric !== null && { metric: input.metric }), + ...(input.metricDimension !== undefined && + input.metricDimension !== null && { + metricDimension: serializeAws_restJson1MetricDimension(input.metricDimension, context), + }), + }; +}; +const serializeAws_restJson1MetricValue = (input, context) => { + return { + ...(input.cidrs !== undefined && + input.cidrs !== null && { cidrs: serializeAws_restJson1Cidrs(input.cidrs, context) }), + ...(input.count !== undefined && input.count !== null && { count: input.count }), + ...(input.ports !== undefined && + input.ports !== null && { ports: serializeAws_restJson1Ports(input.ports, context) }), + }; +}; +const serializeAws_restJson1MitigationActionNameList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1MitigationActionParams = (input, context) => { + return { + ...(input.addThingsToThingGroupParams !== undefined && + input.addThingsToThingGroupParams !== null && { + addThingsToThingGroupParams: serializeAws_restJson1AddThingsToThingGroupParams(input.addThingsToThingGroupParams, context), + }), + ...(input.enableIoTLoggingParams !== undefined && + input.enableIoTLoggingParams !== null && { + enableIoTLoggingParams: serializeAws_restJson1EnableIoTLoggingParams(input.enableIoTLoggingParams, context), + }), + ...(input.publishFindingToSnsParams !== undefined && + input.publishFindingToSnsParams !== null && { + publishFindingToSnsParams: serializeAws_restJson1PublishFindingToSnsParams(input.publishFindingToSnsParams, context), + }), + ...(input.replaceDefaultPolicyVersionParams !== undefined && + input.replaceDefaultPolicyVersionParams !== null && { + replaceDefaultPolicyVersionParams: serializeAws_restJson1ReplaceDefaultPolicyVersionParams(input.replaceDefaultPolicyVersionParams, context), + }), + ...(input.updateCACertificateParams !== undefined && + input.updateCACertificateParams !== null && { + updateCACertificateParams: serializeAws_restJson1UpdateCACertificateParams(input.updateCACertificateParams, context), + }), + ...(input.updateDeviceCertificateParams !== undefined && + input.updateDeviceCertificateParams !== null && { + updateDeviceCertificateParams: serializeAws_restJson1UpdateDeviceCertificateParams(input.updateDeviceCertificateParams, context), + }), + }; +}; +const serializeAws_restJson1MqttContext = (input, context) => { + return { + ...(input.clientId !== undefined && input.clientId !== null && { clientId: input.clientId }), + ...(input.password !== undefined && input.password !== null && { password: context.base64Encoder(input.password) }), + ...(input.username !== undefined && input.username !== null && { username: input.username }), + }; +}; +const serializeAws_restJson1OTAUpdateFile = (input, context) => { + return { + ...(input.attributes !== undefined && + input.attributes !== null && { attributes: serializeAws_restJson1AttributesMap(input.attributes, context) }), + ...(input.codeSigning !== undefined && + input.codeSigning !== null && { codeSigning: serializeAws_restJson1CodeSigning(input.codeSigning, context) }), + ...(input.fileLocation !== undefined && + input.fileLocation !== null && { fileLocation: serializeAws_restJson1FileLocation(input.fileLocation, context) }), + ...(input.fileName !== undefined && input.fileName !== null && { fileName: input.fileName }), + ...(input.fileType !== undefined && input.fileType !== null && { fileType: input.fileType }), + ...(input.fileVersion !== undefined && input.fileVersion !== null && { fileVersion: input.fileVersion }), + }; +}; +const serializeAws_restJson1OTAUpdateFiles = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1OTAUpdateFile(entry, context); + }); +}; +const serializeAws_restJson1Parameters = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_restJson1PercentList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1PolicyNames = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1PolicyVersionIdentifier = (input, context) => { + return { + ...(input.policyName !== undefined && input.policyName !== null && { policyName: input.policyName }), + ...(input.policyVersionId !== undefined && + input.policyVersionId !== null && { policyVersionId: input.policyVersionId }), + }; +}; +const serializeAws_restJson1Ports = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1PresignedUrlConfig = (input, context) => { + return { + ...(input.expiresInSec !== undefined && input.expiresInSec !== null && { expiresInSec: input.expiresInSec }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }; +}; +const serializeAws_restJson1Protocols = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1ProvisioningHook = (input, context) => { + return { + ...(input.payloadVersion !== undefined && + input.payloadVersion !== null && { payloadVersion: input.payloadVersion }), + ...(input.targetArn !== undefined && input.targetArn !== null && { targetArn: input.targetArn }), + }; +}; +const serializeAws_restJson1PublicKeyMap = (input, context) => { + return Object.entries(input).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const serializeAws_restJson1PublishFindingToSnsParams = (input, context) => { + return { + ...(input.topicArn !== undefined && input.topicArn !== null && { topicArn: input.topicArn }), + }; +}; +const serializeAws_restJson1PutAssetPropertyValueEntry = (input, context) => { + return { + ...(input.assetId !== undefined && input.assetId !== null && { assetId: input.assetId }), + ...(input.entryId !== undefined && input.entryId !== null && { entryId: input.entryId }), + ...(input.propertyAlias !== undefined && input.propertyAlias !== null && { propertyAlias: input.propertyAlias }), + ...(input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId }), + ...(input.propertyValues !== undefined && + input.propertyValues !== null && { + propertyValues: serializeAws_restJson1AssetPropertyValueList(input.propertyValues, context), + }), + }; +}; +const serializeAws_restJson1PutAssetPropertyValueEntryList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1PutAssetPropertyValueEntry(entry, context); + }); +}; +const serializeAws_restJson1PutItemInput = (input, context) => { + return { + ...(input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }), + }; +}; +const serializeAws_restJson1RateIncreaseCriteria = (input, context) => { + return { + ...(input.numberOfNotifiedThings !== undefined && + input.numberOfNotifiedThings !== null && { numberOfNotifiedThings: input.numberOfNotifiedThings }), + ...(input.numberOfSucceededThings !== undefined && + input.numberOfSucceededThings !== null && { numberOfSucceededThings: input.numberOfSucceededThings }), + }; +}; +const serializeAws_restJson1ReasonForNonComplianceCodes = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1RegistrationConfig = (input, context) => { + return { + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.templateBody !== undefined && input.templateBody !== null && { templateBody: input.templateBody }), + }; +}; +const serializeAws_restJson1ReplaceDefaultPolicyVersionParams = (input, context) => { + return { + ...(input.templateName !== undefined && input.templateName !== null && { templateName: input.templateName }), + }; +}; +const serializeAws_restJson1RepublishAction = (input, context) => { + return { + ...(input.qos !== undefined && input.qos !== null && { qos: input.qos }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.topic !== undefined && input.topic !== null && { topic: input.topic }), + }; +}; +const serializeAws_restJson1ResourceIdentifier = (input, context) => { + return { + ...(input.account !== undefined && input.account !== null && { account: input.account }), + ...(input.caCertificateId !== undefined && + input.caCertificateId !== null && { caCertificateId: input.caCertificateId }), + ...(input.clientId !== undefined && input.clientId !== null && { clientId: input.clientId }), + ...(input.cognitoIdentityPoolId !== undefined && + input.cognitoIdentityPoolId !== null && { cognitoIdentityPoolId: input.cognitoIdentityPoolId }), + ...(input.deviceCertificateId !== undefined && + input.deviceCertificateId !== null && { deviceCertificateId: input.deviceCertificateId }), + ...(input.iamRoleArn !== undefined && input.iamRoleArn !== null && { iamRoleArn: input.iamRoleArn }), + ...(input.policyVersionIdentifier !== undefined && + input.policyVersionIdentifier !== null && { + policyVersionIdentifier: serializeAws_restJson1PolicyVersionIdentifier(input.policyVersionIdentifier, context), + }), + ...(input.roleAliasArn !== undefined && input.roleAliasArn !== null && { roleAliasArn: input.roleAliasArn }), + }; +}; +const serializeAws_restJson1Resources = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1S3Action = (input, context) => { + return { + ...(input.bucketName !== undefined && input.bucketName !== null && { bucketName: input.bucketName }), + ...(input.cannedAcl !== undefined && input.cannedAcl !== null && { cannedAcl: input.cannedAcl }), + ...(input.key !== undefined && input.key !== null && { key: input.key }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + }; +}; +const serializeAws_restJson1S3Destination = (input, context) => { + return { + ...(input.bucket !== undefined && input.bucket !== null && { bucket: input.bucket }), + ...(input.prefix !== undefined && input.prefix !== null && { prefix: input.prefix }), + }; +}; +const serializeAws_restJson1S3Location = (input, context) => { + return { + ...(input.bucket !== undefined && input.bucket !== null && { bucket: input.bucket }), + ...(input.key !== undefined && input.key !== null && { key: input.key }), + ...(input.version !== undefined && input.version !== null && { version: input.version }), + }; +}; +const serializeAws_restJson1SalesforceAction = (input, context) => { + return { + ...(input.token !== undefined && input.token !== null && { token: input.token }), + ...(input.url !== undefined && input.url !== null && { url: input.url }), + }; +}; +const serializeAws_restJson1SearchableAttributes = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1ServerCertificateArns = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1SigningProfileParameter = (input, context) => { + return { + ...(input.certificateArn !== undefined && + input.certificateArn !== null && { certificateArn: input.certificateArn }), + ...(input.certificatePathOnDevice !== undefined && + input.certificatePathOnDevice !== null && { certificatePathOnDevice: input.certificatePathOnDevice }), + ...(input.platform !== undefined && input.platform !== null && { platform: input.platform }), + }; +}; +const serializeAws_restJson1SigV4Authorization = (input, context) => { + return { + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.serviceName !== undefined && input.serviceName !== null && { serviceName: input.serviceName }), + ...(input.signingRegion !== undefined && input.signingRegion !== null && { signingRegion: input.signingRegion }), + }; +}; +const serializeAws_restJson1SnsAction = (input, context) => { + return { + ...(input.messageFormat !== undefined && input.messageFormat !== null && { messageFormat: input.messageFormat }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.targetArn !== undefined && input.targetArn !== null && { targetArn: input.targetArn }), + }; +}; +const serializeAws_restJson1SqsAction = (input, context) => { + return { + ...(input.queueUrl !== undefined && input.queueUrl !== null && { queueUrl: input.queueUrl }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.useBase64 !== undefined && input.useBase64 !== null && { useBase64: input.useBase64 }), + }; +}; +const serializeAws_restJson1StartSigningJobParameter = (input, context) => { + return { + ...(input.destination !== undefined && + input.destination !== null && { destination: serializeAws_restJson1Destination(input.destination, context) }), + ...(input.signingProfileName !== undefined && + input.signingProfileName !== null && { signingProfileName: input.signingProfileName }), + ...(input.signingProfileParameter !== undefined && + input.signingProfileParameter !== null && { + signingProfileParameter: serializeAws_restJson1SigningProfileParameter(input.signingProfileParameter, context), + }), + }; +}; +const serializeAws_restJson1StatisticalThreshold = (input, context) => { + return { + ...(input.statistic !== undefined && input.statistic !== null && { statistic: input.statistic }), + }; +}; +const serializeAws_restJson1StepFunctionsAction = (input, context) => { + return { + ...(input.executionNamePrefix !== undefined && + input.executionNamePrefix !== null && { executionNamePrefix: input.executionNamePrefix }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.stateMachineName !== undefined && + input.stateMachineName !== null && { stateMachineName: input.stateMachineName }), + }; +}; +const serializeAws_restJson1_Stream = (input, context) => { + return { + ...(input.fileId !== undefined && input.fileId !== null && { fileId: input.fileId }), + ...(input.streamId !== undefined && input.streamId !== null && { streamId: input.streamId }), + }; +}; +const serializeAws_restJson1StreamFile = (input, context) => { + return { + ...(input.fileId !== undefined && input.fileId !== null && { fileId: input.fileId }), + ...(input.s3Location !== undefined && + input.s3Location !== null && { s3Location: serializeAws_restJson1S3Location(input.s3Location, context) }), + }; +}; +const serializeAws_restJson1StreamFiles = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1StreamFile(entry, context); + }); +}; +const serializeAws_restJson1Tag = (input, context) => { + return { + ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }), + ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }), + }; +}; +const serializeAws_restJson1TagKeyList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1TagList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1Tag(entry, context); + }); +}; +const serializeAws_restJson1TargetAuditCheckNames = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1Targets = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1ThingGroupIndexingConfiguration = (input, context) => { + return { + ...(input.customFields !== undefined && + input.customFields !== null && { customFields: serializeAws_restJson1Fields(input.customFields, context) }), + ...(input.managedFields !== undefined && + input.managedFields !== null && { managedFields: serializeAws_restJson1Fields(input.managedFields, context) }), + ...(input.thingGroupIndexingMode !== undefined && + input.thingGroupIndexingMode !== null && { thingGroupIndexingMode: input.thingGroupIndexingMode }), + }; +}; +const serializeAws_restJson1ThingGroupList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1ThingGroupNames = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_restJson1ThingGroupProperties = (input, context) => { + return { + ...(input.attributePayload !== undefined && + input.attributePayload !== null && { + attributePayload: serializeAws_restJson1AttributePayload(input.attributePayload, context), + }), + ...(input.thingGroupDescription !== undefined && + input.thingGroupDescription !== null && { thingGroupDescription: input.thingGroupDescription }), + }; +}; +const serializeAws_restJson1ThingIndexingConfiguration = (input, context) => { + return { + ...(input.customFields !== undefined && + input.customFields !== null && { customFields: serializeAws_restJson1Fields(input.customFields, context) }), + ...(input.managedFields !== undefined && + input.managedFields !== null && { managedFields: serializeAws_restJson1Fields(input.managedFields, context) }), + ...(input.thingConnectivityIndexingMode !== undefined && + input.thingConnectivityIndexingMode !== null && { + thingConnectivityIndexingMode: input.thingConnectivityIndexingMode, + }), + ...(input.thingIndexingMode !== undefined && + input.thingIndexingMode !== null && { thingIndexingMode: input.thingIndexingMode }), + }; +}; +const serializeAws_restJson1ThingTypeProperties = (input, context) => { + return { + ...(input.searchableAttributes !== undefined && + input.searchableAttributes !== null && { + searchableAttributes: serializeAws_restJson1SearchableAttributes(input.searchableAttributes, context), + }), + ...(input.thingTypeDescription !== undefined && + input.thingTypeDescription !== null && { thingTypeDescription: input.thingTypeDescription }), + }; +}; +const serializeAws_restJson1TimeoutConfig = (input, context) => { + return { + ...(input.inProgressTimeoutInMinutes !== undefined && + input.inProgressTimeoutInMinutes !== null && { inProgressTimeoutInMinutes: input.inProgressTimeoutInMinutes }), + }; +}; +const serializeAws_restJson1TimestreamAction = (input, context) => { + return { + ...(input.databaseName !== undefined && input.databaseName !== null && { databaseName: input.databaseName }), + ...(input.dimensions !== undefined && + input.dimensions !== null && { + dimensions: serializeAws_restJson1TimestreamDimensionList(input.dimensions, context), + }), + ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }), + ...(input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }), + ...(input.timestamp !== undefined && + input.timestamp !== null && { timestamp: serializeAws_restJson1TimestreamTimestamp(input.timestamp, context) }), + }; +}; +const serializeAws_restJson1TimestreamDimension = (input, context) => { + return { + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.value !== undefined && input.value !== null && { value: input.value }), + }; +}; +const serializeAws_restJson1TimestreamDimensionList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_restJson1TimestreamDimension(entry, context); + }); +}; +const serializeAws_restJson1TimestreamTimestamp = (input, context) => { + return { + ...(input.unit !== undefined && input.unit !== null && { unit: input.unit }), + ...(input.value !== undefined && input.value !== null && { value: input.value }), + }; +}; +const serializeAws_restJson1TlsContext = (input, context) => { + return { + ...(input.serverName !== undefined && input.serverName !== null && { serverName: input.serverName }), + }; +}; +const serializeAws_restJson1TopicRuleDestinationConfiguration = (input, context) => { + return { + ...(input.httpUrlConfiguration !== undefined && + input.httpUrlConfiguration !== null && { + httpUrlConfiguration: serializeAws_restJson1HttpUrlDestinationConfiguration(input.httpUrlConfiguration, context), + }), + }; +}; +const serializeAws_restJson1TopicRulePayload = (input, context) => { + return { + ...(input.actions !== undefined && + input.actions !== null && { actions: serializeAws_restJson1ActionList(input.actions, context) }), + ...(input.awsIotSqlVersion !== undefined && + input.awsIotSqlVersion !== null && { awsIotSqlVersion: input.awsIotSqlVersion }), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.errorAction !== undefined && + input.errorAction !== null && { errorAction: serializeAws_restJson1Action(input.errorAction, context) }), + ...(input.ruleDisabled !== undefined && input.ruleDisabled !== null && { ruleDisabled: input.ruleDisabled }), + ...(input.sql !== undefined && input.sql !== null && { sql: input.sql }), + }; +}; +const serializeAws_restJson1UpdateCACertificateParams = (input, context) => { + return { + ...(input.action !== undefined && input.action !== null && { action: input.action }), + }; +}; +const serializeAws_restJson1UpdateDeviceCertificateParams = (input, context) => { + return { + ...(input.action !== undefined && input.action !== null && { action: input.action }), + }; +}; +const deserializeAws_restJson1AbortConfig = (output, context) => { + return { + criteriaList: output.criteriaList !== undefined && output.criteriaList !== null + ? deserializeAws_restJson1AbortCriteriaList(output.criteriaList, context) + : undefined, + }; +}; +const deserializeAws_restJson1AbortCriteria = (output, context) => { + return { + action: output.action !== undefined && output.action !== null ? output.action : undefined, + failureType: output.failureType !== undefined && output.failureType !== null ? output.failureType : undefined, + minNumberOfExecutedThings: output.minNumberOfExecutedThings !== undefined && output.minNumberOfExecutedThings !== null + ? output.minNumberOfExecutedThings + : undefined, + thresholdPercentage: output.thresholdPercentage !== undefined && output.thresholdPercentage !== null + ? output.thresholdPercentage + : undefined, + }; +}; +const deserializeAws_restJson1AbortCriteriaList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1AbortCriteria(entry, context); + }); +}; +const deserializeAws_restJson1Action = (output, context) => { + return { + cloudwatchAlarm: output.cloudwatchAlarm !== undefined && output.cloudwatchAlarm !== null + ? deserializeAws_restJson1CloudwatchAlarmAction(output.cloudwatchAlarm, context) + : undefined, + cloudwatchLogs: output.cloudwatchLogs !== undefined && output.cloudwatchLogs !== null + ? deserializeAws_restJson1CloudwatchLogsAction(output.cloudwatchLogs, context) + : undefined, + cloudwatchMetric: output.cloudwatchMetric !== undefined && output.cloudwatchMetric !== null + ? deserializeAws_restJson1CloudwatchMetricAction(output.cloudwatchMetric, context) + : undefined, + dynamoDB: output.dynamoDB !== undefined && output.dynamoDB !== null + ? deserializeAws_restJson1DynamoDBAction(output.dynamoDB, context) + : undefined, + dynamoDBv2: output.dynamoDBv2 !== undefined && output.dynamoDBv2 !== null + ? deserializeAws_restJson1DynamoDBv2Action(output.dynamoDBv2, context) + : undefined, + elasticsearch: output.elasticsearch !== undefined && output.elasticsearch !== null + ? deserializeAws_restJson1ElasticsearchAction(output.elasticsearch, context) + : undefined, + firehose: output.firehose !== undefined && output.firehose !== null + ? deserializeAws_restJson1FirehoseAction(output.firehose, context) + : undefined, + http: output.http !== undefined && output.http !== null + ? deserializeAws_restJson1HttpAction(output.http, context) + : undefined, + iotAnalytics: output.iotAnalytics !== undefined && output.iotAnalytics !== null + ? deserializeAws_restJson1IotAnalyticsAction(output.iotAnalytics, context) + : undefined, + iotEvents: output.iotEvents !== undefined && output.iotEvents !== null + ? deserializeAws_restJson1IotEventsAction(output.iotEvents, context) + : undefined, + iotSiteWise: output.iotSiteWise !== undefined && output.iotSiteWise !== null + ? deserializeAws_restJson1IotSiteWiseAction(output.iotSiteWise, context) + : undefined, + kinesis: output.kinesis !== undefined && output.kinesis !== null + ? deserializeAws_restJson1KinesisAction(output.kinesis, context) + : undefined, + lambda: output.lambda !== undefined && output.lambda !== null + ? deserializeAws_restJson1LambdaAction(output.lambda, context) + : undefined, + republish: output.republish !== undefined && output.republish !== null + ? deserializeAws_restJson1RepublishAction(output.republish, context) + : undefined, + s3: output.s3 !== undefined && output.s3 !== null ? deserializeAws_restJson1S3Action(output.s3, context) : undefined, + salesforce: output.salesforce !== undefined && output.salesforce !== null + ? deserializeAws_restJson1SalesforceAction(output.salesforce, context) + : undefined, + sns: output.sns !== undefined && output.sns !== null + ? deserializeAws_restJson1SnsAction(output.sns, context) + : undefined, + sqs: output.sqs !== undefined && output.sqs !== null + ? deserializeAws_restJson1SqsAction(output.sqs, context) + : undefined, + stepFunctions: output.stepFunctions !== undefined && output.stepFunctions !== null + ? deserializeAws_restJson1StepFunctionsAction(output.stepFunctions, context) + : undefined, + timestream: output.timestream !== undefined && output.timestream !== null + ? deserializeAws_restJson1TimestreamAction(output.timestream, context) + : undefined, + }; +}; +const deserializeAws_restJson1ActionList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1Action(entry, context); + }); +}; +const deserializeAws_restJson1ActiveViolation = (output, context) => { + return { + behavior: output.behavior !== undefined && output.behavior !== null + ? deserializeAws_restJson1Behavior(output.behavior, context) + : undefined, + lastViolationTime: output.lastViolationTime !== undefined && output.lastViolationTime !== null + ? new Date(Math.round(output.lastViolationTime * 1000)) + : undefined, + lastViolationValue: output.lastViolationValue !== undefined && output.lastViolationValue !== null + ? deserializeAws_restJson1MetricValue(output.lastViolationValue, context) + : undefined, + securityProfileName: output.securityProfileName !== undefined && output.securityProfileName !== null + ? output.securityProfileName + : undefined, + thingName: output.thingName !== undefined && output.thingName !== null ? output.thingName : undefined, + violationId: output.violationId !== undefined && output.violationId !== null ? output.violationId : undefined, + violationStartTime: output.violationStartTime !== undefined && output.violationStartTime !== null + ? new Date(Math.round(output.violationStartTime * 1000)) + : undefined, + }; +}; +const deserializeAws_restJson1ActiveViolations = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ActiveViolation(entry, context); + }); +}; +const deserializeAws_restJson1AdditionalMetricsToRetainList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1AdditionalMetricsToRetainV2List = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1MetricToRetain(entry, context); + }); +}; +const deserializeAws_restJson1AdditionalParameterMap = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_restJson1AddThingsToThingGroupParams = (output, context) => { + return { + overrideDynamicGroups: output.overrideDynamicGroups !== undefined && output.overrideDynamicGroups !== null + ? output.overrideDynamicGroups + : undefined, + thingGroupNames: output.thingGroupNames !== undefined && output.thingGroupNames !== null + ? deserializeAws_restJson1ThingGroupNames(output.thingGroupNames, context) + : undefined, + }; +}; +const deserializeAws_restJson1AlertTarget = (output, context) => { + return { + alertTargetArn: output.alertTargetArn !== undefined && output.alertTargetArn !== null ? output.alertTargetArn : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1AlertTargets = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_restJson1AlertTarget(value, context), + }; + }, {}); +}; +const deserializeAws_restJson1Allowed = (output, context) => { + return { + policies: output.policies !== undefined && output.policies !== null + ? deserializeAws_restJson1Policies(output.policies, context) + : undefined, + }; +}; +const deserializeAws_restJson1AssetPropertyTimestamp = (output, context) => { + return { + offsetInNanos: output.offsetInNanos !== undefined && output.offsetInNanos !== null ? output.offsetInNanos : undefined, + timeInSeconds: output.timeInSeconds !== undefined && output.timeInSeconds !== null ? output.timeInSeconds : undefined, + }; +}; +const deserializeAws_restJson1AssetPropertyValue = (output, context) => { + return { + quality: output.quality !== undefined && output.quality !== null ? output.quality : undefined, + timestamp: output.timestamp !== undefined && output.timestamp !== null + ? deserializeAws_restJson1AssetPropertyTimestamp(output.timestamp, context) + : undefined, + value: output.value !== undefined && output.value !== null + ? deserializeAws_restJson1AssetPropertyVariant(output.value, context) + : undefined, + }; +}; +const deserializeAws_restJson1AssetPropertyValueList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1AssetPropertyValue(entry, context); + }); +}; +const deserializeAws_restJson1AssetPropertyVariant = (output, context) => { + if (output.booleanValue !== undefined && output.booleanValue !== null) { + return { + booleanValue: output.booleanValue, + }; + } + if (output.doubleValue !== undefined && output.doubleValue !== null) { + return { + doubleValue: output.doubleValue, + }; + } + if (output.integerValue !== undefined && output.integerValue !== null) { + return { + integerValue: output.integerValue, + }; + } + if (output.stringValue !== undefined && output.stringValue !== null) { + return { + stringValue: output.stringValue, + }; + } + return { $unknown: Object.entries(output)[0] }; +}; +const deserializeAws_restJson1AttributePayload = (output, context) => { + return { + attributes: output.attributes !== undefined && output.attributes !== null + ? deserializeAws_restJson1Attributes(output.attributes, context) + : undefined, + merge: output.merge !== undefined && output.merge !== null ? output.merge : undefined, + }; +}; +const deserializeAws_restJson1Attributes = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_restJson1AttributesMap = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_restJson1AuditCheckConfiguration = (output, context) => { + return { + enabled: output.enabled !== undefined && output.enabled !== null ? output.enabled : undefined, + }; +}; +const deserializeAws_restJson1AuditCheckConfigurations = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_restJson1AuditCheckConfiguration(value, context), + }; + }, {}); +}; +const deserializeAws_restJson1AuditCheckDetails = (output, context) => { + return { + checkCompliant: output.checkCompliant !== undefined && output.checkCompliant !== null ? output.checkCompliant : undefined, + checkRunStatus: output.checkRunStatus !== undefined && output.checkRunStatus !== null ? output.checkRunStatus : undefined, + errorCode: output.errorCode !== undefined && output.errorCode !== null ? output.errorCode : undefined, + message: output.message !== undefined && output.message !== null ? output.message : undefined, + nonCompliantResourcesCount: output.nonCompliantResourcesCount !== undefined && output.nonCompliantResourcesCount !== null + ? output.nonCompliantResourcesCount + : undefined, + suppressedNonCompliantResourcesCount: output.suppressedNonCompliantResourcesCount !== undefined && output.suppressedNonCompliantResourcesCount !== null + ? output.suppressedNonCompliantResourcesCount + : undefined, + totalResourcesCount: output.totalResourcesCount !== undefined && output.totalResourcesCount !== null + ? output.totalResourcesCount + : undefined, + }; +}; +const deserializeAws_restJson1AuditCheckToActionsMapping = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_restJson1MitigationActionNameList(value, context), + }; + }, {}); +}; +const deserializeAws_restJson1AuditCheckToReasonCodeFilter = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_restJson1ReasonForNonComplianceCodes(value, context), + }; + }, {}); +}; +const deserializeAws_restJson1AuditDetails = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_restJson1AuditCheckDetails(value, context), + }; + }, {}); +}; +const deserializeAws_restJson1AuditFinding = (output, context) => { + return { + checkName: output.checkName !== undefined && output.checkName !== null ? output.checkName : undefined, + findingId: output.findingId !== undefined && output.findingId !== null ? output.findingId : undefined, + findingTime: output.findingTime !== undefined && output.findingTime !== null + ? new Date(Math.round(output.findingTime * 1000)) + : undefined, + isSuppressed: output.isSuppressed !== undefined && output.isSuppressed !== null ? output.isSuppressed : undefined, + nonCompliantResource: output.nonCompliantResource !== undefined && output.nonCompliantResource !== null + ? deserializeAws_restJson1NonCompliantResource(output.nonCompliantResource, context) + : undefined, + reasonForNonCompliance: output.reasonForNonCompliance !== undefined && output.reasonForNonCompliance !== null + ? output.reasonForNonCompliance + : undefined, + reasonForNonComplianceCode: output.reasonForNonComplianceCode !== undefined && output.reasonForNonComplianceCode !== null + ? output.reasonForNonComplianceCode + : undefined, + relatedResources: output.relatedResources !== undefined && output.relatedResources !== null + ? deserializeAws_restJson1RelatedResources(output.relatedResources, context) + : undefined, + severity: output.severity !== undefined && output.severity !== null ? output.severity : undefined, + taskId: output.taskId !== undefined && output.taskId !== null ? output.taskId : undefined, + taskStartTime: output.taskStartTime !== undefined && output.taskStartTime !== null + ? new Date(Math.round(output.taskStartTime * 1000)) + : undefined, + }; +}; +const deserializeAws_restJson1AuditFindings = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1AuditFinding(entry, context); + }); +}; +const deserializeAws_restJson1AuditMitigationActionExecutionMetadata = (output, context) => { + return { + actionId: output.actionId !== undefined && output.actionId !== null ? output.actionId : undefined, + actionName: output.actionName !== undefined && output.actionName !== null ? output.actionName : undefined, + endTime: output.endTime !== undefined && output.endTime !== null ? new Date(Math.round(output.endTime * 1000)) : undefined, + errorCode: output.errorCode !== undefined && output.errorCode !== null ? output.errorCode : undefined, + findingId: output.findingId !== undefined && output.findingId !== null ? output.findingId : undefined, + message: output.message !== undefined && output.message !== null ? output.message : undefined, + startTime: output.startTime !== undefined && output.startTime !== null + ? new Date(Math.round(output.startTime * 1000)) + : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + taskId: output.taskId !== undefined && output.taskId !== null ? output.taskId : undefined, + }; +}; +const deserializeAws_restJson1AuditMitigationActionExecutionMetadataList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1AuditMitigationActionExecutionMetadata(entry, context); + }); +}; +const deserializeAws_restJson1AuditMitigationActionsTaskMetadata = (output, context) => { + return { + startTime: output.startTime !== undefined && output.startTime !== null + ? new Date(Math.round(output.startTime * 1000)) + : undefined, + taskId: output.taskId !== undefined && output.taskId !== null ? output.taskId : undefined, + taskStatus: output.taskStatus !== undefined && output.taskStatus !== null ? output.taskStatus : undefined, + }; +}; +const deserializeAws_restJson1AuditMitigationActionsTaskMetadataList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1AuditMitigationActionsTaskMetadata(entry, context); + }); +}; +const deserializeAws_restJson1AuditMitigationActionsTaskStatistics = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_restJson1TaskStatisticsForAuditCheck(value, context), + }; + }, {}); +}; +const deserializeAws_restJson1AuditMitigationActionsTaskTarget = (output, context) => { + return { + auditCheckToReasonCodeFilter: output.auditCheckToReasonCodeFilter !== undefined && output.auditCheckToReasonCodeFilter !== null + ? deserializeAws_restJson1AuditCheckToReasonCodeFilter(output.auditCheckToReasonCodeFilter, context) + : undefined, + auditTaskId: output.auditTaskId !== undefined && output.auditTaskId !== null ? output.auditTaskId : undefined, + findingIds: output.findingIds !== undefined && output.findingIds !== null + ? deserializeAws_restJson1FindingIds(output.findingIds, context) + : undefined, + }; +}; +const deserializeAws_restJson1AuditNotificationTarget = (output, context) => { + return { + enabled: output.enabled !== undefined && output.enabled !== null ? output.enabled : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + targetArn: output.targetArn !== undefined && output.targetArn !== null ? output.targetArn : undefined, + }; +}; +const deserializeAws_restJson1AuditNotificationTargetConfigurations = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_restJson1AuditNotificationTarget(value, context), + }; + }, {}); +}; +const deserializeAws_restJson1AuditSuppression = (output, context) => { + return { + checkName: output.checkName !== undefined && output.checkName !== null ? output.checkName : undefined, + description: output.description !== undefined && output.description !== null ? output.description : undefined, + expirationDate: output.expirationDate !== undefined && output.expirationDate !== null + ? new Date(Math.round(output.expirationDate * 1000)) + : undefined, + resourceIdentifier: output.resourceIdentifier !== undefined && output.resourceIdentifier !== null + ? deserializeAws_restJson1ResourceIdentifier(output.resourceIdentifier, context) + : undefined, + suppressIndefinitely: output.suppressIndefinitely !== undefined && output.suppressIndefinitely !== null + ? output.suppressIndefinitely + : undefined, + }; +}; +const deserializeAws_restJson1AuditSuppressionList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1AuditSuppression(entry, context); + }); +}; +const deserializeAws_restJson1AuditTaskMetadata = (output, context) => { + return { + taskId: output.taskId !== undefined && output.taskId !== null ? output.taskId : undefined, + taskStatus: output.taskStatus !== undefined && output.taskStatus !== null ? output.taskStatus : undefined, + taskType: output.taskType !== undefined && output.taskType !== null ? output.taskType : undefined, + }; +}; +const deserializeAws_restJson1AuditTaskMetadataList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1AuditTaskMetadata(entry, context); + }); +}; +const deserializeAws_restJson1AuthInfo = (output, context) => { + return { + actionType: output.actionType !== undefined && output.actionType !== null ? output.actionType : undefined, + resources: output.resources !== undefined && output.resources !== null + ? deserializeAws_restJson1Resources(output.resources, context) + : undefined, + }; +}; +const deserializeAws_restJson1AuthorizerConfig = (output, context) => { + return { + allowAuthorizerOverride: output.allowAuthorizerOverride !== undefined && output.allowAuthorizerOverride !== null + ? output.allowAuthorizerOverride + : undefined, + defaultAuthorizerName: output.defaultAuthorizerName !== undefined && output.defaultAuthorizerName !== null + ? output.defaultAuthorizerName + : undefined, + }; +}; +const deserializeAws_restJson1AuthorizerDescription = (output, context) => { + return { + authorizerArn: output.authorizerArn !== undefined && output.authorizerArn !== null ? output.authorizerArn : undefined, + authorizerFunctionArn: output.authorizerFunctionArn !== undefined && output.authorizerFunctionArn !== null + ? output.authorizerFunctionArn + : undefined, + authorizerName: output.authorizerName !== undefined && output.authorizerName !== null ? output.authorizerName : undefined, + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + lastModifiedDate: output.lastModifiedDate !== undefined && output.lastModifiedDate !== null + ? new Date(Math.round(output.lastModifiedDate * 1000)) + : undefined, + signingDisabled: output.signingDisabled !== undefined && output.signingDisabled !== null ? output.signingDisabled : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + tokenKeyName: output.tokenKeyName !== undefined && output.tokenKeyName !== null ? output.tokenKeyName : undefined, + tokenSigningPublicKeys: output.tokenSigningPublicKeys !== undefined && output.tokenSigningPublicKeys !== null + ? deserializeAws_restJson1PublicKeyMap(output.tokenSigningPublicKeys, context) + : undefined, + }; +}; +const deserializeAws_restJson1Authorizers = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1AuthorizerSummary(entry, context); + }); +}; +const deserializeAws_restJson1AuthorizerSummary = (output, context) => { + return { + authorizerArn: output.authorizerArn !== undefined && output.authorizerArn !== null ? output.authorizerArn : undefined, + authorizerName: output.authorizerName !== undefined && output.authorizerName !== null ? output.authorizerName : undefined, + }; +}; +const deserializeAws_restJson1AuthResult = (output, context) => { + return { + allowed: output.allowed !== undefined && output.allowed !== null + ? deserializeAws_restJson1Allowed(output.allowed, context) + : undefined, + authDecision: output.authDecision !== undefined && output.authDecision !== null ? output.authDecision : undefined, + authInfo: output.authInfo !== undefined && output.authInfo !== null + ? deserializeAws_restJson1AuthInfo(output.authInfo, context) + : undefined, + denied: output.denied !== undefined && output.denied !== null + ? deserializeAws_restJson1Denied(output.denied, context) + : undefined, + missingContextValues: output.missingContextValues !== undefined && output.missingContextValues !== null + ? deserializeAws_restJson1MissingContextValues(output.missingContextValues, context) + : undefined, + }; +}; +const deserializeAws_restJson1AuthResults = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1AuthResult(entry, context); + }); +}; +const deserializeAws_restJson1AwsJobExecutionsRolloutConfig = (output, context) => { + return { + exponentialRate: output.exponentialRate !== undefined && output.exponentialRate !== null + ? deserializeAws_restJson1AwsJobExponentialRolloutRate(output.exponentialRate, context) + : undefined, + maximumPerMinute: output.maximumPerMinute !== undefined && output.maximumPerMinute !== null ? output.maximumPerMinute : undefined, + }; +}; +const deserializeAws_restJson1AwsJobExponentialRolloutRate = (output, context) => { + return { + baseRatePerMinute: output.baseRatePerMinute !== undefined && output.baseRatePerMinute !== null + ? output.baseRatePerMinute + : undefined, + incrementFactor: output.incrementFactor !== undefined && output.incrementFactor !== null ? output.incrementFactor : undefined, + rateIncreaseCriteria: output.rateIncreaseCriteria !== undefined && output.rateIncreaseCriteria !== null + ? deserializeAws_restJson1AwsJobRateIncreaseCriteria(output.rateIncreaseCriteria, context) + : undefined, + }; +}; +const deserializeAws_restJson1AwsJobPresignedUrlConfig = (output, context) => { + return { + expiresInSec: output.expiresInSec !== undefined && output.expiresInSec !== null ? output.expiresInSec : undefined, + }; +}; +const deserializeAws_restJson1AwsJobRateIncreaseCriteria = (output, context) => { + return { + numberOfNotifiedThings: output.numberOfNotifiedThings !== undefined && output.numberOfNotifiedThings !== null + ? output.numberOfNotifiedThings + : undefined, + numberOfSucceededThings: output.numberOfSucceededThings !== undefined && output.numberOfSucceededThings !== null + ? output.numberOfSucceededThings + : undefined, + }; +}; +const deserializeAws_restJson1Behavior = (output, context) => { + return { + criteria: output.criteria !== undefined && output.criteria !== null + ? deserializeAws_restJson1BehaviorCriteria(output.criteria, context) + : undefined, + metric: output.metric !== undefined && output.metric !== null ? output.metric : undefined, + metricDimension: output.metricDimension !== undefined && output.metricDimension !== null + ? deserializeAws_restJson1MetricDimension(output.metricDimension, context) + : undefined, + name: output.name !== undefined && output.name !== null ? output.name : undefined, + }; +}; +const deserializeAws_restJson1BehaviorCriteria = (output, context) => { + return { + comparisonOperator: output.comparisonOperator !== undefined && output.comparisonOperator !== null + ? output.comparisonOperator + : undefined, + consecutiveDatapointsToAlarm: output.consecutiveDatapointsToAlarm !== undefined && output.consecutiveDatapointsToAlarm !== null + ? output.consecutiveDatapointsToAlarm + : undefined, + consecutiveDatapointsToClear: output.consecutiveDatapointsToClear !== undefined && output.consecutiveDatapointsToClear !== null + ? output.consecutiveDatapointsToClear + : undefined, + durationSeconds: output.durationSeconds !== undefined && output.durationSeconds !== null ? output.durationSeconds : undefined, + statisticalThreshold: output.statisticalThreshold !== undefined && output.statisticalThreshold !== null + ? deserializeAws_restJson1StatisticalThreshold(output.statisticalThreshold, context) + : undefined, + value: output.value !== undefined && output.value !== null + ? deserializeAws_restJson1MetricValue(output.value, context) + : undefined, + }; +}; +const deserializeAws_restJson1Behaviors = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1Behavior(entry, context); + }); +}; +const deserializeAws_restJson1BillingGroupMetadata = (output, context) => { + return { + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + }; +}; +const deserializeAws_restJson1BillingGroupNameAndArnList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1GroupNameAndArn(entry, context); + }); +}; +const deserializeAws_restJson1BillingGroupProperties = (output, context) => { + return { + billingGroupDescription: output.billingGroupDescription !== undefined && output.billingGroupDescription !== null + ? output.billingGroupDescription + : undefined, + }; +}; +const deserializeAws_restJson1CACertificate = (output, context) => { + return { + certificateArn: output.certificateArn !== undefined && output.certificateArn !== null ? output.certificateArn : undefined, + certificateId: output.certificateId !== undefined && output.certificateId !== null ? output.certificateId : undefined, + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + }; +}; +const deserializeAws_restJson1CACertificateDescription = (output, context) => { + return { + autoRegistrationStatus: output.autoRegistrationStatus !== undefined && output.autoRegistrationStatus !== null + ? output.autoRegistrationStatus + : undefined, + certificateArn: output.certificateArn !== undefined && output.certificateArn !== null ? output.certificateArn : undefined, + certificateId: output.certificateId !== undefined && output.certificateId !== null ? output.certificateId : undefined, + certificatePem: output.certificatePem !== undefined && output.certificatePem !== null ? output.certificatePem : undefined, + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + customerVersion: output.customerVersion !== undefined && output.customerVersion !== null ? output.customerVersion : undefined, + generationId: output.generationId !== undefined && output.generationId !== null ? output.generationId : undefined, + lastModifiedDate: output.lastModifiedDate !== undefined && output.lastModifiedDate !== null + ? new Date(Math.round(output.lastModifiedDate * 1000)) + : undefined, + ownedBy: output.ownedBy !== undefined && output.ownedBy !== null ? output.ownedBy : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + validity: output.validity !== undefined && output.validity !== null + ? deserializeAws_restJson1CertificateValidity(output.validity, context) + : undefined, + }; +}; +const deserializeAws_restJson1CACertificates = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1CACertificate(entry, context); + }); +}; +const deserializeAws_restJson1Certificate = (output, context) => { + return { + certificateArn: output.certificateArn !== undefined && output.certificateArn !== null ? output.certificateArn : undefined, + certificateId: output.certificateId !== undefined && output.certificateId !== null ? output.certificateId : undefined, + certificateMode: output.certificateMode !== undefined && output.certificateMode !== null ? output.certificateMode : undefined, + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + }; +}; +const deserializeAws_restJson1CertificateDescription = (output, context) => { + return { + caCertificateId: output.caCertificateId !== undefined && output.caCertificateId !== null ? output.caCertificateId : undefined, + certificateArn: output.certificateArn !== undefined && output.certificateArn !== null ? output.certificateArn : undefined, + certificateId: output.certificateId !== undefined && output.certificateId !== null ? output.certificateId : undefined, + certificateMode: output.certificateMode !== undefined && output.certificateMode !== null ? output.certificateMode : undefined, + certificatePem: output.certificatePem !== undefined && output.certificatePem !== null ? output.certificatePem : undefined, + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + customerVersion: output.customerVersion !== undefined && output.customerVersion !== null ? output.customerVersion : undefined, + generationId: output.generationId !== undefined && output.generationId !== null ? output.generationId : undefined, + lastModifiedDate: output.lastModifiedDate !== undefined && output.lastModifiedDate !== null + ? new Date(Math.round(output.lastModifiedDate * 1000)) + : undefined, + ownedBy: output.ownedBy !== undefined && output.ownedBy !== null ? output.ownedBy : undefined, + previousOwnedBy: output.previousOwnedBy !== undefined && output.previousOwnedBy !== null ? output.previousOwnedBy : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + transferData: output.transferData !== undefined && output.transferData !== null + ? deserializeAws_restJson1TransferData(output.transferData, context) + : undefined, + validity: output.validity !== undefined && output.validity !== null + ? deserializeAws_restJson1CertificateValidity(output.validity, context) + : undefined, + }; +}; +const deserializeAws_restJson1Certificates = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1Certificate(entry, context); + }); +}; +const deserializeAws_restJson1CertificateValidity = (output, context) => { + return { + notAfter: output.notAfter !== undefined && output.notAfter !== null + ? new Date(Math.round(output.notAfter * 1000)) + : undefined, + notBefore: output.notBefore !== undefined && output.notBefore !== null + ? new Date(Math.round(output.notBefore * 1000)) + : undefined, + }; +}; +const deserializeAws_restJson1Cidrs = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1CloudwatchAlarmAction = (output, context) => { + return { + alarmName: output.alarmName !== undefined && output.alarmName !== null ? output.alarmName : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + stateReason: output.stateReason !== undefined && output.stateReason !== null ? output.stateReason : undefined, + stateValue: output.stateValue !== undefined && output.stateValue !== null ? output.stateValue : undefined, + }; +}; +const deserializeAws_restJson1CloudwatchLogsAction = (output, context) => { + return { + logGroupName: output.logGroupName !== undefined && output.logGroupName !== null ? output.logGroupName : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1CloudwatchMetricAction = (output, context) => { + return { + metricName: output.metricName !== undefined && output.metricName !== null ? output.metricName : undefined, + metricNamespace: output.metricNamespace !== undefined && output.metricNamespace !== null ? output.metricNamespace : undefined, + metricTimestamp: output.metricTimestamp !== undefined && output.metricTimestamp !== null ? output.metricTimestamp : undefined, + metricUnit: output.metricUnit !== undefined && output.metricUnit !== null ? output.metricUnit : undefined, + metricValue: output.metricValue !== undefined && output.metricValue !== null ? output.metricValue : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1CodeSigning = (output, context) => { + return { + awsSignerJobId: output.awsSignerJobId !== undefined && output.awsSignerJobId !== null ? output.awsSignerJobId : undefined, + customCodeSigning: output.customCodeSigning !== undefined && output.customCodeSigning !== null + ? deserializeAws_restJson1CustomCodeSigning(output.customCodeSigning, context) + : undefined, + startSigningJobParameter: output.startSigningJobParameter !== undefined && output.startSigningJobParameter !== null + ? deserializeAws_restJson1StartSigningJobParameter(output.startSigningJobParameter, context) + : undefined, + }; +}; +const deserializeAws_restJson1CodeSigningCertificateChain = (output, context) => { + return { + certificateName: output.certificateName !== undefined && output.certificateName !== null ? output.certificateName : undefined, + inlineDocument: output.inlineDocument !== undefined && output.inlineDocument !== null ? output.inlineDocument : undefined, + }; +}; +const deserializeAws_restJson1CodeSigningSignature = (output, context) => { + return { + inlineDocument: output.inlineDocument !== undefined && output.inlineDocument !== null + ? context.base64Decoder(output.inlineDocument) + : undefined, + }; +}; +const deserializeAws_restJson1Configuration = (output, context) => { + return { + Enabled: output.Enabled !== undefined && output.Enabled !== null ? output.Enabled : undefined, + }; +}; +const deserializeAws_restJson1CustomCodeSigning = (output, context) => { + return { + certificateChain: output.certificateChain !== undefined && output.certificateChain !== null + ? deserializeAws_restJson1CodeSigningCertificateChain(output.certificateChain, context) + : undefined, + hashAlgorithm: output.hashAlgorithm !== undefined && output.hashAlgorithm !== null ? output.hashAlgorithm : undefined, + signature: output.signature !== undefined && output.signature !== null + ? deserializeAws_restJson1CodeSigningSignature(output.signature, context) + : undefined, + signatureAlgorithm: output.signatureAlgorithm !== undefined && output.signatureAlgorithm !== null + ? output.signatureAlgorithm + : undefined, + }; +}; +const deserializeAws_restJson1Denied = (output, context) => { + return { + explicitDeny: output.explicitDeny !== undefined && output.explicitDeny !== null + ? deserializeAws_restJson1ExplicitDeny(output.explicitDeny, context) + : undefined, + implicitDeny: output.implicitDeny !== undefined && output.implicitDeny !== null + ? deserializeAws_restJson1ImplicitDeny(output.implicitDeny, context) + : undefined, + }; +}; +const deserializeAws_restJson1Destination = (output, context) => { + return { + s3Destination: output.s3Destination !== undefined && output.s3Destination !== null + ? deserializeAws_restJson1S3Destination(output.s3Destination, context) + : undefined, + }; +}; +const deserializeAws_restJson1DetailsMap = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_restJson1DimensionNames = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1DimensionStringValues = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1DomainConfigurations = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1DomainConfigurationSummary(entry, context); + }); +}; +const deserializeAws_restJson1DomainConfigurationSummary = (output, context) => { + return { + domainConfigurationArn: output.domainConfigurationArn !== undefined && output.domainConfigurationArn !== null + ? output.domainConfigurationArn + : undefined, + domainConfigurationName: output.domainConfigurationName !== undefined && output.domainConfigurationName !== null + ? output.domainConfigurationName + : undefined, + serviceType: output.serviceType !== undefined && output.serviceType !== null ? output.serviceType : undefined, + }; +}; +const deserializeAws_restJson1DynamoDBAction = (output, context) => { + return { + hashKeyField: output.hashKeyField !== undefined && output.hashKeyField !== null ? output.hashKeyField : undefined, + hashKeyType: output.hashKeyType !== undefined && output.hashKeyType !== null ? output.hashKeyType : undefined, + hashKeyValue: output.hashKeyValue !== undefined && output.hashKeyValue !== null ? output.hashKeyValue : undefined, + operation: output.operation !== undefined && output.operation !== null ? output.operation : undefined, + payloadField: output.payloadField !== undefined && output.payloadField !== null ? output.payloadField : undefined, + rangeKeyField: output.rangeKeyField !== undefined && output.rangeKeyField !== null ? output.rangeKeyField : undefined, + rangeKeyType: output.rangeKeyType !== undefined && output.rangeKeyType !== null ? output.rangeKeyType : undefined, + rangeKeyValue: output.rangeKeyValue !== undefined && output.rangeKeyValue !== null ? output.rangeKeyValue : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + tableName: output.tableName !== undefined && output.tableName !== null ? output.tableName : undefined, + }; +}; +const deserializeAws_restJson1DynamoDBv2Action = (output, context) => { + return { + putItem: output.putItem !== undefined && output.putItem !== null + ? deserializeAws_restJson1PutItemInput(output.putItem, context) + : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1EffectivePolicies = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1EffectivePolicy(entry, context); + }); +}; +const deserializeAws_restJson1EffectivePolicy = (output, context) => { + return { + policyArn: output.policyArn !== undefined && output.policyArn !== null ? output.policyArn : undefined, + policyDocument: output.policyDocument !== undefined && output.policyDocument !== null ? output.policyDocument : undefined, + policyName: output.policyName !== undefined && output.policyName !== null ? output.policyName : undefined, + }; +}; +const deserializeAws_restJson1ElasticsearchAction = (output, context) => { + return { + endpoint: output.endpoint !== undefined && output.endpoint !== null ? output.endpoint : undefined, + id: output.id !== undefined && output.id !== null ? output.id : undefined, + index: output.index !== undefined && output.index !== null ? output.index : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + type: output.type !== undefined && output.type !== null ? output.type : undefined, + }; +}; +const deserializeAws_restJson1EnableIoTLoggingParams = (output, context) => { + return { + logLevel: output.logLevel !== undefined && output.logLevel !== null ? output.logLevel : undefined, + roleArnForLogging: output.roleArnForLogging !== undefined && output.roleArnForLogging !== null + ? output.roleArnForLogging + : undefined, + }; +}; +const deserializeAws_restJson1ErrorInfo = (output, context) => { + return { + code: output.code !== undefined && output.code !== null ? output.code : undefined, + message: output.message !== undefined && output.message !== null ? output.message : undefined, + }; +}; +const deserializeAws_restJson1EventConfigurations = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_restJson1Configuration(value, context), + }; + }, {}); +}; +const deserializeAws_restJson1ExplicitDeny = (output, context) => { + return { + policies: output.policies !== undefined && output.policies !== null + ? deserializeAws_restJson1Policies(output.policies, context) + : undefined, + }; +}; +const deserializeAws_restJson1ExponentialRolloutRate = (output, context) => { + return { + baseRatePerMinute: output.baseRatePerMinute !== undefined && output.baseRatePerMinute !== null + ? output.baseRatePerMinute + : undefined, + incrementFactor: output.incrementFactor !== undefined && output.incrementFactor !== null ? output.incrementFactor : undefined, + rateIncreaseCriteria: output.rateIncreaseCriteria !== undefined && output.rateIncreaseCriteria !== null + ? deserializeAws_restJson1RateIncreaseCriteria(output.rateIncreaseCriteria, context) + : undefined, + }; +}; +const deserializeAws_restJson1Field = (output, context) => { + return { + name: output.name !== undefined && output.name !== null ? output.name : undefined, + type: output.type !== undefined && output.type !== null ? output.type : undefined, + }; +}; +const deserializeAws_restJson1Fields = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1Field(entry, context); + }); +}; +const deserializeAws_restJson1FileLocation = (output, context) => { + return { + s3Location: output.s3Location !== undefined && output.s3Location !== null + ? deserializeAws_restJson1S3Location(output.s3Location, context) + : undefined, + stream: output.stream !== undefined && output.stream !== null + ? deserializeAws_restJson1_Stream(output.stream, context) + : undefined, + }; +}; +const deserializeAws_restJson1FindingIds = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1FirehoseAction = (output, context) => { + return { + batchMode: output.batchMode !== undefined && output.batchMode !== null ? output.batchMode : undefined, + deliveryStreamName: output.deliveryStreamName !== undefined && output.deliveryStreamName !== null + ? output.deliveryStreamName + : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + separator: output.separator !== undefined && output.separator !== null ? output.separator : undefined, + }; +}; +const deserializeAws_restJson1GroupNameAndArn = (output, context) => { + return { + groupArn: output.groupArn !== undefined && output.groupArn !== null ? output.groupArn : undefined, + groupName: output.groupName !== undefined && output.groupName !== null ? output.groupName : undefined, + }; +}; +const deserializeAws_restJson1HeaderList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1HttpActionHeader(entry, context); + }); +}; +const deserializeAws_restJson1HttpAction = (output, context) => { + return { + auth: output.auth !== undefined && output.auth !== null + ? deserializeAws_restJson1HttpAuthorization(output.auth, context) + : undefined, + confirmationUrl: output.confirmationUrl !== undefined && output.confirmationUrl !== null ? output.confirmationUrl : undefined, + headers: output.headers !== undefined && output.headers !== null + ? deserializeAws_restJson1HeaderList(output.headers, context) + : undefined, + url: output.url !== undefined && output.url !== null ? output.url : undefined, + }; +}; +const deserializeAws_restJson1HttpActionHeader = (output, context) => { + return { + key: output.key !== undefined && output.key !== null ? output.key : undefined, + value: output.value !== undefined && output.value !== null ? output.value : undefined, + }; +}; +const deserializeAws_restJson1HttpAuthorization = (output, context) => { + return { + sigv4: output.sigv4 !== undefined && output.sigv4 !== null + ? deserializeAws_restJson1SigV4Authorization(output.sigv4, context) + : undefined, + }; +}; +const deserializeAws_restJson1HttpUrlDestinationProperties = (output, context) => { + return { + confirmationUrl: output.confirmationUrl !== undefined && output.confirmationUrl !== null ? output.confirmationUrl : undefined, + }; +}; +const deserializeAws_restJson1HttpUrlDestinationSummary = (output, context) => { + return { + confirmationUrl: output.confirmationUrl !== undefined && output.confirmationUrl !== null ? output.confirmationUrl : undefined, + }; +}; +const deserializeAws_restJson1ImplicitDeny = (output, context) => { + return { + policies: output.policies !== undefined && output.policies !== null + ? deserializeAws_restJson1Policies(output.policies, context) + : undefined, + }; +}; +const deserializeAws_restJson1IndexNamesList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1IotAnalyticsAction = (output, context) => { + return { + batchMode: output.batchMode !== undefined && output.batchMode !== null ? output.batchMode : undefined, + channelArn: output.channelArn !== undefined && output.channelArn !== null ? output.channelArn : undefined, + channelName: output.channelName !== undefined && output.channelName !== null ? output.channelName : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1IotEventsAction = (output, context) => { + return { + batchMode: output.batchMode !== undefined && output.batchMode !== null ? output.batchMode : undefined, + inputName: output.inputName !== undefined && output.inputName !== null ? output.inputName : undefined, + messageId: output.messageId !== undefined && output.messageId !== null ? output.messageId : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1IotSiteWiseAction = (output, context) => { + return { + putAssetPropertyValueEntries: output.putAssetPropertyValueEntries !== undefined && output.putAssetPropertyValueEntries !== null + ? deserializeAws_restJson1PutAssetPropertyValueEntryList(output.putAssetPropertyValueEntries, context) + : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1Job = (output, context) => { + return { + abortConfig: output.abortConfig !== undefined && output.abortConfig !== null + ? deserializeAws_restJson1AbortConfig(output.abortConfig, context) + : undefined, + comment: output.comment !== undefined && output.comment !== null ? output.comment : undefined, + completedAt: output.completedAt !== undefined && output.completedAt !== null + ? new Date(Math.round(output.completedAt * 1000)) + : undefined, + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? new Date(Math.round(output.createdAt * 1000)) + : undefined, + description: output.description !== undefined && output.description !== null ? output.description : undefined, + forceCanceled: output.forceCanceled !== undefined && output.forceCanceled !== null ? output.forceCanceled : undefined, + jobArn: output.jobArn !== undefined && output.jobArn !== null ? output.jobArn : undefined, + jobExecutionsRolloutConfig: output.jobExecutionsRolloutConfig !== undefined && output.jobExecutionsRolloutConfig !== null + ? deserializeAws_restJson1JobExecutionsRolloutConfig(output.jobExecutionsRolloutConfig, context) + : undefined, + jobId: output.jobId !== undefined && output.jobId !== null ? output.jobId : undefined, + jobProcessDetails: output.jobProcessDetails !== undefined && output.jobProcessDetails !== null + ? deserializeAws_restJson1JobProcessDetails(output.jobProcessDetails, context) + : undefined, + lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null + ? new Date(Math.round(output.lastUpdatedAt * 1000)) + : undefined, + namespaceId: output.namespaceId !== undefined && output.namespaceId !== null ? output.namespaceId : undefined, + presignedUrlConfig: output.presignedUrlConfig !== undefined && output.presignedUrlConfig !== null + ? deserializeAws_restJson1PresignedUrlConfig(output.presignedUrlConfig, context) + : undefined, + reasonCode: output.reasonCode !== undefined && output.reasonCode !== null ? output.reasonCode : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + targetSelection: output.targetSelection !== undefined && output.targetSelection !== null ? output.targetSelection : undefined, + targets: output.targets !== undefined && output.targets !== null + ? deserializeAws_restJson1JobTargets(output.targets, context) + : undefined, + timeoutConfig: output.timeoutConfig !== undefined && output.timeoutConfig !== null + ? deserializeAws_restJson1TimeoutConfig(output.timeoutConfig, context) + : undefined, + }; +}; +const deserializeAws_restJson1JobExecution = (output, context) => { + return { + approximateSecondsBeforeTimedOut: output.approximateSecondsBeforeTimedOut !== undefined && output.approximateSecondsBeforeTimedOut !== null + ? output.approximateSecondsBeforeTimedOut + : undefined, + executionNumber: output.executionNumber !== undefined && output.executionNumber !== null ? output.executionNumber : undefined, + forceCanceled: output.forceCanceled !== undefined && output.forceCanceled !== null ? output.forceCanceled : undefined, + jobId: output.jobId !== undefined && output.jobId !== null ? output.jobId : undefined, + lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null + ? new Date(Math.round(output.lastUpdatedAt * 1000)) + : undefined, + queuedAt: output.queuedAt !== undefined && output.queuedAt !== null + ? new Date(Math.round(output.queuedAt * 1000)) + : undefined, + startedAt: output.startedAt !== undefined && output.startedAt !== null + ? new Date(Math.round(output.startedAt * 1000)) + : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + statusDetails: output.statusDetails !== undefined && output.statusDetails !== null + ? deserializeAws_restJson1JobExecutionStatusDetails(output.statusDetails, context) + : undefined, + thingArn: output.thingArn !== undefined && output.thingArn !== null ? output.thingArn : undefined, + versionNumber: output.versionNumber !== undefined && output.versionNumber !== null ? output.versionNumber : undefined, + }; +}; +const deserializeAws_restJson1JobExecutionsRolloutConfig = (output, context) => { + return { + exponentialRate: output.exponentialRate !== undefined && output.exponentialRate !== null + ? deserializeAws_restJson1ExponentialRolloutRate(output.exponentialRate, context) + : undefined, + maximumPerMinute: output.maximumPerMinute !== undefined && output.maximumPerMinute !== null ? output.maximumPerMinute : undefined, + }; +}; +const deserializeAws_restJson1JobExecutionStatusDetails = (output, context) => { + return { + detailsMap: output.detailsMap !== undefined && output.detailsMap !== null + ? deserializeAws_restJson1DetailsMap(output.detailsMap, context) + : undefined, + }; +}; +const deserializeAws_restJson1JobExecutionSummary = (output, context) => { + return { + executionNumber: output.executionNumber !== undefined && output.executionNumber !== null ? output.executionNumber : undefined, + lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null + ? new Date(Math.round(output.lastUpdatedAt * 1000)) + : undefined, + queuedAt: output.queuedAt !== undefined && output.queuedAt !== null + ? new Date(Math.round(output.queuedAt * 1000)) + : undefined, + startedAt: output.startedAt !== undefined && output.startedAt !== null + ? new Date(Math.round(output.startedAt * 1000)) + : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + }; +}; +const deserializeAws_restJson1JobExecutionSummaryForJob = (output, context) => { + return { + jobExecutionSummary: output.jobExecutionSummary !== undefined && output.jobExecutionSummary !== null + ? deserializeAws_restJson1JobExecutionSummary(output.jobExecutionSummary, context) + : undefined, + thingArn: output.thingArn !== undefined && output.thingArn !== null ? output.thingArn : undefined, + }; +}; +const deserializeAws_restJson1JobExecutionSummaryForJobList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1JobExecutionSummaryForJob(entry, context); + }); +}; +const deserializeAws_restJson1JobExecutionSummaryForThing = (output, context) => { + return { + jobExecutionSummary: output.jobExecutionSummary !== undefined && output.jobExecutionSummary !== null + ? deserializeAws_restJson1JobExecutionSummary(output.jobExecutionSummary, context) + : undefined, + jobId: output.jobId !== undefined && output.jobId !== null ? output.jobId : undefined, + }; +}; +const deserializeAws_restJson1JobExecutionSummaryForThingList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1JobExecutionSummaryForThing(entry, context); + }); +}; +const deserializeAws_restJson1JobProcessDetails = (output, context) => { + return { + numberOfCanceledThings: output.numberOfCanceledThings !== undefined && output.numberOfCanceledThings !== null + ? output.numberOfCanceledThings + : undefined, + numberOfFailedThings: output.numberOfFailedThings !== undefined && output.numberOfFailedThings !== null + ? output.numberOfFailedThings + : undefined, + numberOfInProgressThings: output.numberOfInProgressThings !== undefined && output.numberOfInProgressThings !== null + ? output.numberOfInProgressThings + : undefined, + numberOfQueuedThings: output.numberOfQueuedThings !== undefined && output.numberOfQueuedThings !== null + ? output.numberOfQueuedThings + : undefined, + numberOfRejectedThings: output.numberOfRejectedThings !== undefined && output.numberOfRejectedThings !== null + ? output.numberOfRejectedThings + : undefined, + numberOfRemovedThings: output.numberOfRemovedThings !== undefined && output.numberOfRemovedThings !== null + ? output.numberOfRemovedThings + : undefined, + numberOfSucceededThings: output.numberOfSucceededThings !== undefined && output.numberOfSucceededThings !== null + ? output.numberOfSucceededThings + : undefined, + numberOfTimedOutThings: output.numberOfTimedOutThings !== undefined && output.numberOfTimedOutThings !== null + ? output.numberOfTimedOutThings + : undefined, + processingTargets: output.processingTargets !== undefined && output.processingTargets !== null + ? deserializeAws_restJson1ProcessingTargetNameList(output.processingTargets, context) + : undefined, + }; +}; +const deserializeAws_restJson1JobSummary = (output, context) => { + return { + completedAt: output.completedAt !== undefined && output.completedAt !== null + ? new Date(Math.round(output.completedAt * 1000)) + : undefined, + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? new Date(Math.round(output.createdAt * 1000)) + : undefined, + jobArn: output.jobArn !== undefined && output.jobArn !== null ? output.jobArn : undefined, + jobId: output.jobId !== undefined && output.jobId !== null ? output.jobId : undefined, + lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null + ? new Date(Math.round(output.lastUpdatedAt * 1000)) + : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + targetSelection: output.targetSelection !== undefined && output.targetSelection !== null ? output.targetSelection : undefined, + thingGroupId: output.thingGroupId !== undefined && output.thingGroupId !== null ? output.thingGroupId : undefined, + }; +}; +const deserializeAws_restJson1JobSummaryList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1JobSummary(entry, context); + }); +}; +const deserializeAws_restJson1JobTargets = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1KeyPair = (output, context) => { + return { + PrivateKey: output.PrivateKey !== undefined && output.PrivateKey !== null ? output.PrivateKey : undefined, + PublicKey: output.PublicKey !== undefined && output.PublicKey !== null ? output.PublicKey : undefined, + }; +}; +const deserializeAws_restJson1KinesisAction = (output, context) => { + return { + partitionKey: output.partitionKey !== undefined && output.partitionKey !== null ? output.partitionKey : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + streamName: output.streamName !== undefined && output.streamName !== null ? output.streamName : undefined, + }; +}; +const deserializeAws_restJson1LambdaAction = (output, context) => { + return { + functionArn: output.functionArn !== undefined && output.functionArn !== null ? output.functionArn : undefined, + }; +}; +const deserializeAws_restJson1LogTarget = (output, context) => { + return { + targetName: output.targetName !== undefined && output.targetName !== null ? output.targetName : undefined, + targetType: output.targetType !== undefined && output.targetType !== null ? output.targetType : undefined, + }; +}; +const deserializeAws_restJson1LogTargetConfiguration = (output, context) => { + return { + logLevel: output.logLevel !== undefined && output.logLevel !== null ? output.logLevel : undefined, + logTarget: output.logTarget !== undefined && output.logTarget !== null + ? deserializeAws_restJson1LogTarget(output.logTarget, context) + : undefined, + }; +}; +const deserializeAws_restJson1LogTargetConfigurations = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1LogTargetConfiguration(entry, context); + }); +}; +const deserializeAws_restJson1MetricDimension = (output, context) => { + return { + dimensionName: output.dimensionName !== undefined && output.dimensionName !== null ? output.dimensionName : undefined, + operator: output.operator !== undefined && output.operator !== null ? output.operator : undefined, + }; +}; +const deserializeAws_restJson1MetricToRetain = (output, context) => { + return { + metric: output.metric !== undefined && output.metric !== null ? output.metric : undefined, + metricDimension: output.metricDimension !== undefined && output.metricDimension !== null + ? deserializeAws_restJson1MetricDimension(output.metricDimension, context) + : undefined, + }; +}; +const deserializeAws_restJson1MetricValue = (output, context) => { + return { + cidrs: output.cidrs !== undefined && output.cidrs !== null + ? deserializeAws_restJson1Cidrs(output.cidrs, context) + : undefined, + count: output.count !== undefined && output.count !== null ? output.count : undefined, + ports: output.ports !== undefined && output.ports !== null + ? deserializeAws_restJson1Ports(output.ports, context) + : undefined, + }; +}; +const deserializeAws_restJson1MissingContextValues = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1MitigationAction = (output, context) => { + return { + actionParams: output.actionParams !== undefined && output.actionParams !== null + ? deserializeAws_restJson1MitigationActionParams(output.actionParams, context) + : undefined, + id: output.id !== undefined && output.id !== null ? output.id : undefined, + name: output.name !== undefined && output.name !== null ? output.name : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1MitigationActionIdentifier = (output, context) => { + return { + actionArn: output.actionArn !== undefined && output.actionArn !== null ? output.actionArn : undefined, + actionName: output.actionName !== undefined && output.actionName !== null ? output.actionName : undefined, + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + }; +}; +const deserializeAws_restJson1MitigationActionIdentifierList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1MitigationActionIdentifier(entry, context); + }); +}; +const deserializeAws_restJson1MitigationActionList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1MitigationAction(entry, context); + }); +}; +const deserializeAws_restJson1MitigationActionNameList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1MitigationActionParams = (output, context) => { + return { + addThingsToThingGroupParams: output.addThingsToThingGroupParams !== undefined && output.addThingsToThingGroupParams !== null + ? deserializeAws_restJson1AddThingsToThingGroupParams(output.addThingsToThingGroupParams, context) + : undefined, + enableIoTLoggingParams: output.enableIoTLoggingParams !== undefined && output.enableIoTLoggingParams !== null + ? deserializeAws_restJson1EnableIoTLoggingParams(output.enableIoTLoggingParams, context) + : undefined, + publishFindingToSnsParams: output.publishFindingToSnsParams !== undefined && output.publishFindingToSnsParams !== null + ? deserializeAws_restJson1PublishFindingToSnsParams(output.publishFindingToSnsParams, context) + : undefined, + replaceDefaultPolicyVersionParams: output.replaceDefaultPolicyVersionParams !== undefined && output.replaceDefaultPolicyVersionParams !== null + ? deserializeAws_restJson1ReplaceDefaultPolicyVersionParams(output.replaceDefaultPolicyVersionParams, context) + : undefined, + updateCACertificateParams: output.updateCACertificateParams !== undefined && output.updateCACertificateParams !== null + ? deserializeAws_restJson1UpdateCACertificateParams(output.updateCACertificateParams, context) + : undefined, + updateDeviceCertificateParams: output.updateDeviceCertificateParams !== undefined && output.updateDeviceCertificateParams !== null + ? deserializeAws_restJson1UpdateDeviceCertificateParams(output.updateDeviceCertificateParams, context) + : undefined, + }; +}; +const deserializeAws_restJson1NonCompliantResource = (output, context) => { + return { + additionalInfo: output.additionalInfo !== undefined && output.additionalInfo !== null + ? deserializeAws_restJson1StringMap(output.additionalInfo, context) + : undefined, + resourceIdentifier: output.resourceIdentifier !== undefined && output.resourceIdentifier !== null + ? deserializeAws_restJson1ResourceIdentifier(output.resourceIdentifier, context) + : undefined, + resourceType: output.resourceType !== undefined && output.resourceType !== null ? output.resourceType : undefined, + }; +}; +const deserializeAws_restJson1OTAUpdateFile = (output, context) => { + return { + attributes: output.attributes !== undefined && output.attributes !== null + ? deserializeAws_restJson1AttributesMap(output.attributes, context) + : undefined, + codeSigning: output.codeSigning !== undefined && output.codeSigning !== null + ? deserializeAws_restJson1CodeSigning(output.codeSigning, context) + : undefined, + fileLocation: output.fileLocation !== undefined && output.fileLocation !== null + ? deserializeAws_restJson1FileLocation(output.fileLocation, context) + : undefined, + fileName: output.fileName !== undefined && output.fileName !== null ? output.fileName : undefined, + fileType: output.fileType !== undefined && output.fileType !== null ? output.fileType : undefined, + fileVersion: output.fileVersion !== undefined && output.fileVersion !== null ? output.fileVersion : undefined, + }; +}; +const deserializeAws_restJson1OTAUpdateFiles = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1OTAUpdateFile(entry, context); + }); +}; +const deserializeAws_restJson1OTAUpdateInfo = (output, context) => { + return { + additionalParameters: output.additionalParameters !== undefined && output.additionalParameters !== null + ? deserializeAws_restJson1AdditionalParameterMap(output.additionalParameters, context) + : undefined, + awsIotJobArn: output.awsIotJobArn !== undefined && output.awsIotJobArn !== null ? output.awsIotJobArn : undefined, + awsIotJobId: output.awsIotJobId !== undefined && output.awsIotJobId !== null ? output.awsIotJobId : undefined, + awsJobExecutionsRolloutConfig: output.awsJobExecutionsRolloutConfig !== undefined && output.awsJobExecutionsRolloutConfig !== null + ? deserializeAws_restJson1AwsJobExecutionsRolloutConfig(output.awsJobExecutionsRolloutConfig, context) + : undefined, + awsJobPresignedUrlConfig: output.awsJobPresignedUrlConfig !== undefined && output.awsJobPresignedUrlConfig !== null + ? deserializeAws_restJson1AwsJobPresignedUrlConfig(output.awsJobPresignedUrlConfig, context) + : undefined, + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + description: output.description !== undefined && output.description !== null ? output.description : undefined, + errorInfo: output.errorInfo !== undefined && output.errorInfo !== null + ? deserializeAws_restJson1ErrorInfo(output.errorInfo, context) + : undefined, + lastModifiedDate: output.lastModifiedDate !== undefined && output.lastModifiedDate !== null + ? new Date(Math.round(output.lastModifiedDate * 1000)) + : undefined, + otaUpdateArn: output.otaUpdateArn !== undefined && output.otaUpdateArn !== null ? output.otaUpdateArn : undefined, + otaUpdateFiles: output.otaUpdateFiles !== undefined && output.otaUpdateFiles !== null + ? deserializeAws_restJson1OTAUpdateFiles(output.otaUpdateFiles, context) + : undefined, + otaUpdateId: output.otaUpdateId !== undefined && output.otaUpdateId !== null ? output.otaUpdateId : undefined, + otaUpdateStatus: output.otaUpdateStatus !== undefined && output.otaUpdateStatus !== null ? output.otaUpdateStatus : undefined, + protocols: output.protocols !== undefined && output.protocols !== null + ? deserializeAws_restJson1Protocols(output.protocols, context) + : undefined, + targetSelection: output.targetSelection !== undefined && output.targetSelection !== null ? output.targetSelection : undefined, + targets: output.targets !== undefined && output.targets !== null + ? deserializeAws_restJson1Targets(output.targets, context) + : undefined, + }; +}; +const deserializeAws_restJson1OTAUpdatesSummary = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1OTAUpdateSummary(entry, context); + }); +}; +const deserializeAws_restJson1OTAUpdateSummary = (output, context) => { + return { + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + otaUpdateArn: output.otaUpdateArn !== undefined && output.otaUpdateArn !== null ? output.otaUpdateArn : undefined, + otaUpdateId: output.otaUpdateId !== undefined && output.otaUpdateId !== null ? output.otaUpdateId : undefined, + }; +}; +const deserializeAws_restJson1OutgoingCertificate = (output, context) => { + return { + certificateArn: output.certificateArn !== undefined && output.certificateArn !== null ? output.certificateArn : undefined, + certificateId: output.certificateId !== undefined && output.certificateId !== null ? output.certificateId : undefined, + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + transferDate: output.transferDate !== undefined && output.transferDate !== null + ? new Date(Math.round(output.transferDate * 1000)) + : undefined, + transferMessage: output.transferMessage !== undefined && output.transferMessage !== null ? output.transferMessage : undefined, + transferredTo: output.transferredTo !== undefined && output.transferredTo !== null ? output.transferredTo : undefined, + }; +}; +const deserializeAws_restJson1OutgoingCertificates = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1OutgoingCertificate(entry, context); + }); +}; +const deserializeAws_restJson1Percentiles = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1PercentPair(entry, context); + }); +}; +const deserializeAws_restJson1PercentPair = (output, context) => { + return { + percent: output.percent !== undefined && output.percent !== null ? output.percent : undefined, + value: output.value !== undefined && output.value !== null ? output.value : undefined, + }; +}; +const deserializeAws_restJson1Policies = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1Policy(entry, context); + }); +}; +const deserializeAws_restJson1Policy = (output, context) => { + return { + policyArn: output.policyArn !== undefined && output.policyArn !== null ? output.policyArn : undefined, + policyName: output.policyName !== undefined && output.policyName !== null ? output.policyName : undefined, + }; +}; +const deserializeAws_restJson1PolicyDocuments = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1PolicyTargets = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1PolicyVersion = (output, context) => { + return { + createDate: output.createDate !== undefined && output.createDate !== null + ? new Date(Math.round(output.createDate * 1000)) + : undefined, + isDefaultVersion: output.isDefaultVersion !== undefined && output.isDefaultVersion !== null ? output.isDefaultVersion : undefined, + versionId: output.versionId !== undefined && output.versionId !== null ? output.versionId : undefined, + }; +}; +const deserializeAws_restJson1PolicyVersionIdentifier = (output, context) => { + return { + policyName: output.policyName !== undefined && output.policyName !== null ? output.policyName : undefined, + policyVersionId: output.policyVersionId !== undefined && output.policyVersionId !== null ? output.policyVersionId : undefined, + }; +}; +const deserializeAws_restJson1PolicyVersions = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1PolicyVersion(entry, context); + }); +}; +const deserializeAws_restJson1Ports = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1PresignedUrlConfig = (output, context) => { + return { + expiresInSec: output.expiresInSec !== undefined && output.expiresInSec !== null ? output.expiresInSec : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1Principals = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1ProcessingTargetNameList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1Protocols = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1ProvisioningHook = (output, context) => { + return { + payloadVersion: output.payloadVersion !== undefined && output.payloadVersion !== null ? output.payloadVersion : undefined, + targetArn: output.targetArn !== undefined && output.targetArn !== null ? output.targetArn : undefined, + }; +}; +const deserializeAws_restJson1ProvisioningTemplateListing = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ProvisioningTemplateSummary(entry, context); + }); +}; +const deserializeAws_restJson1ProvisioningTemplateSummary = (output, context) => { + return { + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + description: output.description !== undefined && output.description !== null ? output.description : undefined, + enabled: output.enabled !== undefined && output.enabled !== null ? output.enabled : undefined, + lastModifiedDate: output.lastModifiedDate !== undefined && output.lastModifiedDate !== null + ? new Date(Math.round(output.lastModifiedDate * 1000)) + : undefined, + templateArn: output.templateArn !== undefined && output.templateArn !== null ? output.templateArn : undefined, + templateName: output.templateName !== undefined && output.templateName !== null ? output.templateName : undefined, + }; +}; +const deserializeAws_restJson1ProvisioningTemplateVersionListing = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ProvisioningTemplateVersionSummary(entry, context); + }); +}; +const deserializeAws_restJson1ProvisioningTemplateVersionSummary = (output, context) => { + return { + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + isDefaultVersion: output.isDefaultVersion !== undefined && output.isDefaultVersion !== null ? output.isDefaultVersion : undefined, + versionId: output.versionId !== undefined && output.versionId !== null ? output.versionId : undefined, + }; +}; +const deserializeAws_restJson1PublicKeyMap = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_restJson1PublishFindingToSnsParams = (output, context) => { + return { + topicArn: output.topicArn !== undefined && output.topicArn !== null ? output.topicArn : undefined, + }; +}; +const deserializeAws_restJson1PutAssetPropertyValueEntry = (output, context) => { + return { + assetId: output.assetId !== undefined && output.assetId !== null ? output.assetId : undefined, + entryId: output.entryId !== undefined && output.entryId !== null ? output.entryId : undefined, + propertyAlias: output.propertyAlias !== undefined && output.propertyAlias !== null ? output.propertyAlias : undefined, + propertyId: output.propertyId !== undefined && output.propertyId !== null ? output.propertyId : undefined, + propertyValues: output.propertyValues !== undefined && output.propertyValues !== null + ? deserializeAws_restJson1AssetPropertyValueList(output.propertyValues, context) + : undefined, + }; +}; +const deserializeAws_restJson1PutAssetPropertyValueEntryList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1PutAssetPropertyValueEntry(entry, context); + }); +}; +const deserializeAws_restJson1PutItemInput = (output, context) => { + return { + tableName: output.tableName !== undefined && output.tableName !== null ? output.tableName : undefined, + }; +}; +const deserializeAws_restJson1RateIncreaseCriteria = (output, context) => { + return { + numberOfNotifiedThings: output.numberOfNotifiedThings !== undefined && output.numberOfNotifiedThings !== null + ? output.numberOfNotifiedThings + : undefined, + numberOfSucceededThings: output.numberOfSucceededThings !== undefined && output.numberOfSucceededThings !== null + ? output.numberOfSucceededThings + : undefined, + }; +}; +const deserializeAws_restJson1ReasonForNonComplianceCodes = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1RegistrationConfig = (output, context) => { + return { + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + templateBody: output.templateBody !== undefined && output.templateBody !== null ? output.templateBody : undefined, + }; +}; +const deserializeAws_restJson1RelatedResource = (output, context) => { + return { + additionalInfo: output.additionalInfo !== undefined && output.additionalInfo !== null + ? deserializeAws_restJson1StringMap(output.additionalInfo, context) + : undefined, + resourceIdentifier: output.resourceIdentifier !== undefined && output.resourceIdentifier !== null + ? deserializeAws_restJson1ResourceIdentifier(output.resourceIdentifier, context) + : undefined, + resourceType: output.resourceType !== undefined && output.resourceType !== null ? output.resourceType : undefined, + }; +}; +const deserializeAws_restJson1RelatedResources = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1RelatedResource(entry, context); + }); +}; +const deserializeAws_restJson1ReplaceDefaultPolicyVersionParams = (output, context) => { + return { + templateName: output.templateName !== undefined && output.templateName !== null ? output.templateName : undefined, + }; +}; +const deserializeAws_restJson1RepublishAction = (output, context) => { + return { + qos: output.qos !== undefined && output.qos !== null ? output.qos : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + topic: output.topic !== undefined && output.topic !== null ? output.topic : undefined, + }; +}; +const deserializeAws_restJson1ResourceArns = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_restJson1ResourceIdentifier = (output, context) => { + return { + account: output.account !== undefined && output.account !== null ? output.account : undefined, + caCertificateId: output.caCertificateId !== undefined && output.caCertificateId !== null ? output.caCertificateId : undefined, + clientId: output.clientId !== undefined && output.clientId !== null ? output.clientId : undefined, + cognitoIdentityPoolId: output.cognitoIdentityPoolId !== undefined && output.cognitoIdentityPoolId !== null + ? output.cognitoIdentityPoolId + : undefined, + deviceCertificateId: output.deviceCertificateId !== undefined && output.deviceCertificateId !== null + ? output.deviceCertificateId + : undefined, + iamRoleArn: output.iamRoleArn !== undefined && output.iamRoleArn !== null ? output.iamRoleArn : undefined, + policyVersionIdentifier: output.policyVersionIdentifier !== undefined && output.policyVersionIdentifier !== null + ? deserializeAws_restJson1PolicyVersionIdentifier(output.policyVersionIdentifier, context) + : undefined, + roleAliasArn: output.roleAliasArn !== undefined && output.roleAliasArn !== null ? output.roleAliasArn : undefined, + }; +}; +const deserializeAws_restJson1Resources = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1RoleAliasDescription = (output, context) => { + return { + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + credentialDurationSeconds: output.credentialDurationSeconds !== undefined && output.credentialDurationSeconds !== null + ? output.credentialDurationSeconds + : undefined, + lastModifiedDate: output.lastModifiedDate !== undefined && output.lastModifiedDate !== null + ? new Date(Math.round(output.lastModifiedDate * 1000)) + : undefined, + owner: output.owner !== undefined && output.owner !== null ? output.owner : undefined, + roleAlias: output.roleAlias !== undefined && output.roleAlias !== null ? output.roleAlias : undefined, + roleAliasArn: output.roleAliasArn !== undefined && output.roleAliasArn !== null ? output.roleAliasArn : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1RoleAliases = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1S3Action = (output, context) => { + return { + bucketName: output.bucketName !== undefined && output.bucketName !== null ? output.bucketName : undefined, + cannedAcl: output.cannedAcl !== undefined && output.cannedAcl !== null ? output.cannedAcl : undefined, + key: output.key !== undefined && output.key !== null ? output.key : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + }; +}; +const deserializeAws_restJson1S3Destination = (output, context) => { + return { + bucket: output.bucket !== undefined && output.bucket !== null ? output.bucket : undefined, + prefix: output.prefix !== undefined && output.prefix !== null ? output.prefix : undefined, + }; +}; +const deserializeAws_restJson1S3FileUrlList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1S3Location = (output, context) => { + return { + bucket: output.bucket !== undefined && output.bucket !== null ? output.bucket : undefined, + key: output.key !== undefined && output.key !== null ? output.key : undefined, + version: output.version !== undefined && output.version !== null ? output.version : undefined, + }; +}; +const deserializeAws_restJson1SalesforceAction = (output, context) => { + return { + token: output.token !== undefined && output.token !== null ? output.token : undefined, + url: output.url !== undefined && output.url !== null ? output.url : undefined, + }; +}; +const deserializeAws_restJson1ScheduledAuditMetadata = (output, context) => { + return { + dayOfMonth: output.dayOfMonth !== undefined && output.dayOfMonth !== null ? output.dayOfMonth : undefined, + dayOfWeek: output.dayOfWeek !== undefined && output.dayOfWeek !== null ? output.dayOfWeek : undefined, + frequency: output.frequency !== undefined && output.frequency !== null ? output.frequency : undefined, + scheduledAuditArn: output.scheduledAuditArn !== undefined && output.scheduledAuditArn !== null + ? output.scheduledAuditArn + : undefined, + scheduledAuditName: output.scheduledAuditName !== undefined && output.scheduledAuditName !== null + ? output.scheduledAuditName + : undefined, + }; +}; +const deserializeAws_restJson1ScheduledAuditMetadataList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ScheduledAuditMetadata(entry, context); + }); +}; +const deserializeAws_restJson1SearchableAttributes = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1SecurityProfileIdentifier = (output, context) => { + return { + arn: output.arn !== undefined && output.arn !== null ? output.arn : undefined, + name: output.name !== undefined && output.name !== null ? output.name : undefined, + }; +}; +const deserializeAws_restJson1SecurityProfileIdentifiers = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1SecurityProfileIdentifier(entry, context); + }); +}; +const deserializeAws_restJson1SecurityProfileTarget = (output, context) => { + return { + arn: output.arn !== undefined && output.arn !== null ? output.arn : undefined, + }; +}; +const deserializeAws_restJson1SecurityProfileTargetMapping = (output, context) => { + return { + securityProfileIdentifier: output.securityProfileIdentifier !== undefined && output.securityProfileIdentifier !== null + ? deserializeAws_restJson1SecurityProfileIdentifier(output.securityProfileIdentifier, context) + : undefined, + target: output.target !== undefined && output.target !== null + ? deserializeAws_restJson1SecurityProfileTarget(output.target, context) + : undefined, + }; +}; +const deserializeAws_restJson1SecurityProfileTargetMappings = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1SecurityProfileTargetMapping(entry, context); + }); +}; +const deserializeAws_restJson1SecurityProfileTargets = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1SecurityProfileTarget(entry, context); + }); +}; +const deserializeAws_restJson1ServerCertificates = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ServerCertificateSummary(entry, context); + }); +}; +const deserializeAws_restJson1ServerCertificateSummary = (output, context) => { + return { + serverCertificateArn: output.serverCertificateArn !== undefined && output.serverCertificateArn !== null + ? output.serverCertificateArn + : undefined, + serverCertificateStatus: output.serverCertificateStatus !== undefined && output.serverCertificateStatus !== null + ? output.serverCertificateStatus + : undefined, + serverCertificateStatusDetail: output.serverCertificateStatusDetail !== undefined && output.serverCertificateStatusDetail !== null + ? output.serverCertificateStatusDetail + : undefined, + }; +}; +const deserializeAws_restJson1SigningProfileParameter = (output, context) => { + return { + certificateArn: output.certificateArn !== undefined && output.certificateArn !== null ? output.certificateArn : undefined, + certificatePathOnDevice: output.certificatePathOnDevice !== undefined && output.certificatePathOnDevice !== null + ? output.certificatePathOnDevice + : undefined, + platform: output.platform !== undefined && output.platform !== null ? output.platform : undefined, + }; +}; +const deserializeAws_restJson1SigV4Authorization = (output, context) => { + return { + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + serviceName: output.serviceName !== undefined && output.serviceName !== null ? output.serviceName : undefined, + signingRegion: output.signingRegion !== undefined && output.signingRegion !== null ? output.signingRegion : undefined, + }; +}; +const deserializeAws_restJson1SnsAction = (output, context) => { + return { + messageFormat: output.messageFormat !== undefined && output.messageFormat !== null ? output.messageFormat : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + targetArn: output.targetArn !== undefined && output.targetArn !== null ? output.targetArn : undefined, + }; +}; +const deserializeAws_restJson1SqsAction = (output, context) => { + return { + queueUrl: output.queueUrl !== undefined && output.queueUrl !== null ? output.queueUrl : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + useBase64: output.useBase64 !== undefined && output.useBase64 !== null ? output.useBase64 : undefined, + }; +}; +const deserializeAws_restJson1StartSigningJobParameter = (output, context) => { + return { + destination: output.destination !== undefined && output.destination !== null + ? deserializeAws_restJson1Destination(output.destination, context) + : undefined, + signingProfileName: output.signingProfileName !== undefined && output.signingProfileName !== null + ? output.signingProfileName + : undefined, + signingProfileParameter: output.signingProfileParameter !== undefined && output.signingProfileParameter !== null + ? deserializeAws_restJson1SigningProfileParameter(output.signingProfileParameter, context) + : undefined, + }; +}; +const deserializeAws_restJson1StatisticalThreshold = (output, context) => { + return { + statistic: output.statistic !== undefined && output.statistic !== null ? output.statistic : undefined, + }; +}; +const deserializeAws_restJson1Statistics = (output, context) => { + return { + average: output.average !== undefined && output.average !== null ? output.average : undefined, + count: output.count !== undefined && output.count !== null ? output.count : undefined, + maximum: output.maximum !== undefined && output.maximum !== null ? output.maximum : undefined, + minimum: output.minimum !== undefined && output.minimum !== null ? output.minimum : undefined, + stdDeviation: output.stdDeviation !== undefined && output.stdDeviation !== null ? output.stdDeviation : undefined, + sum: output.sum !== undefined && output.sum !== null ? output.sum : undefined, + sumOfSquares: output.sumOfSquares !== undefined && output.sumOfSquares !== null ? output.sumOfSquares : undefined, + variance: output.variance !== undefined && output.variance !== null ? output.variance : undefined, + }; +}; +const deserializeAws_restJson1StepFunctionsAction = (output, context) => { + return { + executionNamePrefix: output.executionNamePrefix !== undefined && output.executionNamePrefix !== null + ? output.executionNamePrefix + : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + stateMachineName: output.stateMachineName !== undefined && output.stateMachineName !== null ? output.stateMachineName : undefined, + }; +}; +const deserializeAws_restJson1_Stream = (output, context) => { + return { + fileId: output.fileId !== undefined && output.fileId !== null ? output.fileId : undefined, + streamId: output.streamId !== undefined && output.streamId !== null ? output.streamId : undefined, + }; +}; +const deserializeAws_restJson1StreamFile = (output, context) => { + return { + fileId: output.fileId !== undefined && output.fileId !== null ? output.fileId : undefined, + s3Location: output.s3Location !== undefined && output.s3Location !== null + ? deserializeAws_restJson1S3Location(output.s3Location, context) + : undefined, + }; +}; +const deserializeAws_restJson1StreamFiles = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1StreamFile(entry, context); + }); +}; +const deserializeAws_restJson1StreamInfo = (output, context) => { + return { + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? new Date(Math.round(output.createdAt * 1000)) + : undefined, + description: output.description !== undefined && output.description !== null ? output.description : undefined, + files: output.files !== undefined && output.files !== null + ? deserializeAws_restJson1StreamFiles(output.files, context) + : undefined, + lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null + ? new Date(Math.round(output.lastUpdatedAt * 1000)) + : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + streamArn: output.streamArn !== undefined && output.streamArn !== null ? output.streamArn : undefined, + streamId: output.streamId !== undefined && output.streamId !== null ? output.streamId : undefined, + streamVersion: output.streamVersion !== undefined && output.streamVersion !== null ? output.streamVersion : undefined, + }; +}; +const deserializeAws_restJson1StreamsSummary = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1StreamSummary(entry, context); + }); +}; +const deserializeAws_restJson1StreamSummary = (output, context) => { + return { + description: output.description !== undefined && output.description !== null ? output.description : undefined, + streamArn: output.streamArn !== undefined && output.streamArn !== null ? output.streamArn : undefined, + streamId: output.streamId !== undefined && output.streamId !== null ? output.streamId : undefined, + streamVersion: output.streamVersion !== undefined && output.streamVersion !== null ? output.streamVersion : undefined, + }; +}; +const deserializeAws_restJson1StringMap = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; +const deserializeAws_restJson1Tag = (output, context) => { + return { + Key: output.Key !== undefined && output.Key !== null ? output.Key : undefined, + Value: output.Value !== undefined && output.Value !== null ? output.Value : undefined, + }; +}; +const deserializeAws_restJson1TagList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1Tag(entry, context); + }); +}; +const deserializeAws_restJson1TargetAuditCheckNames = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1Targets = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1TaskIdList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1TaskStatistics = (output, context) => { + return { + canceledChecks: output.canceledChecks !== undefined && output.canceledChecks !== null ? output.canceledChecks : undefined, + compliantChecks: output.compliantChecks !== undefined && output.compliantChecks !== null ? output.compliantChecks : undefined, + failedChecks: output.failedChecks !== undefined && output.failedChecks !== null ? output.failedChecks : undefined, + inProgressChecks: output.inProgressChecks !== undefined && output.inProgressChecks !== null ? output.inProgressChecks : undefined, + nonCompliantChecks: output.nonCompliantChecks !== undefined && output.nonCompliantChecks !== null + ? output.nonCompliantChecks + : undefined, + totalChecks: output.totalChecks !== undefined && output.totalChecks !== null ? output.totalChecks : undefined, + waitingForDataCollectionChecks: output.waitingForDataCollectionChecks !== undefined && output.waitingForDataCollectionChecks !== null + ? output.waitingForDataCollectionChecks + : undefined, + }; +}; +const deserializeAws_restJson1TaskStatisticsForAuditCheck = (output, context) => { + return { + canceledFindingsCount: output.canceledFindingsCount !== undefined && output.canceledFindingsCount !== null + ? output.canceledFindingsCount + : undefined, + failedFindingsCount: output.failedFindingsCount !== undefined && output.failedFindingsCount !== null + ? output.failedFindingsCount + : undefined, + skippedFindingsCount: output.skippedFindingsCount !== undefined && output.skippedFindingsCount !== null + ? output.skippedFindingsCount + : undefined, + succeededFindingsCount: output.succeededFindingsCount !== undefined && output.succeededFindingsCount !== null + ? output.succeededFindingsCount + : undefined, + totalFindingsCount: output.totalFindingsCount !== undefined && output.totalFindingsCount !== null + ? output.totalFindingsCount + : undefined, + }; +}; +const deserializeAws_restJson1ThingAttribute = (output, context) => { + return { + attributes: output.attributes !== undefined && output.attributes !== null + ? deserializeAws_restJson1Attributes(output.attributes, context) + : undefined, + thingArn: output.thingArn !== undefined && output.thingArn !== null ? output.thingArn : undefined, + thingName: output.thingName !== undefined && output.thingName !== null ? output.thingName : undefined, + thingTypeName: output.thingTypeName !== undefined && output.thingTypeName !== null ? output.thingTypeName : undefined, + version: output.version !== undefined && output.version !== null ? output.version : undefined, + }; +}; +const deserializeAws_restJson1ThingAttributeList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ThingAttribute(entry, context); + }); +}; +const deserializeAws_restJson1ThingConnectivity = (output, context) => { + return { + connected: output.connected !== undefined && output.connected !== null ? output.connected : undefined, + timestamp: output.timestamp !== undefined && output.timestamp !== null ? output.timestamp : undefined, + }; +}; +const deserializeAws_restJson1ThingDocument = (output, context) => { + return { + attributes: output.attributes !== undefined && output.attributes !== null + ? deserializeAws_restJson1Attributes(output.attributes, context) + : undefined, + connectivity: output.connectivity !== undefined && output.connectivity !== null + ? deserializeAws_restJson1ThingConnectivity(output.connectivity, context) + : undefined, + shadow: output.shadow !== undefined && output.shadow !== null ? output.shadow : undefined, + thingGroupNames: output.thingGroupNames !== undefined && output.thingGroupNames !== null + ? deserializeAws_restJson1ThingGroupNameList(output.thingGroupNames, context) + : undefined, + thingId: output.thingId !== undefined && output.thingId !== null ? output.thingId : undefined, + thingName: output.thingName !== undefined && output.thingName !== null ? output.thingName : undefined, + thingTypeName: output.thingTypeName !== undefined && output.thingTypeName !== null ? output.thingTypeName : undefined, + }; +}; +const deserializeAws_restJson1ThingDocumentList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ThingDocument(entry, context); + }); +}; +const deserializeAws_restJson1ThingGroupDocument = (output, context) => { + return { + attributes: output.attributes !== undefined && output.attributes !== null + ? deserializeAws_restJson1Attributes(output.attributes, context) + : undefined, + parentGroupNames: output.parentGroupNames !== undefined && output.parentGroupNames !== null + ? deserializeAws_restJson1ThingGroupNameList(output.parentGroupNames, context) + : undefined, + thingGroupDescription: output.thingGroupDescription !== undefined && output.thingGroupDescription !== null + ? output.thingGroupDescription + : undefined, + thingGroupId: output.thingGroupId !== undefined && output.thingGroupId !== null ? output.thingGroupId : undefined, + thingGroupName: output.thingGroupName !== undefined && output.thingGroupName !== null ? output.thingGroupName : undefined, + }; +}; +const deserializeAws_restJson1ThingGroupDocumentList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ThingGroupDocument(entry, context); + }); +}; +const deserializeAws_restJson1ThingGroupIndexingConfiguration = (output, context) => { + return { + customFields: output.customFields !== undefined && output.customFields !== null + ? deserializeAws_restJson1Fields(output.customFields, context) + : undefined, + managedFields: output.managedFields !== undefined && output.managedFields !== null + ? deserializeAws_restJson1Fields(output.managedFields, context) + : undefined, + thingGroupIndexingMode: output.thingGroupIndexingMode !== undefined && output.thingGroupIndexingMode !== null + ? output.thingGroupIndexingMode + : undefined, + }; +}; +const deserializeAws_restJson1ThingGroupMetadata = (output, context) => { + return { + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + parentGroupName: output.parentGroupName !== undefined && output.parentGroupName !== null ? output.parentGroupName : undefined, + rootToParentThingGroups: output.rootToParentThingGroups !== undefined && output.rootToParentThingGroups !== null + ? deserializeAws_restJson1ThingGroupNameAndArnList(output.rootToParentThingGroups, context) + : undefined, + }; +}; +const deserializeAws_restJson1ThingGroupNameAndArnList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1GroupNameAndArn(entry, context); + }); +}; +const deserializeAws_restJson1ThingGroupNameList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1ThingGroupNames = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1ThingGroupProperties = (output, context) => { + return { + attributePayload: output.attributePayload !== undefined && output.attributePayload !== null + ? deserializeAws_restJson1AttributePayload(output.attributePayload, context) + : undefined, + thingGroupDescription: output.thingGroupDescription !== undefined && output.thingGroupDescription !== null + ? output.thingGroupDescription + : undefined, + }; +}; +const deserializeAws_restJson1ThingIndexingConfiguration = (output, context) => { + return { + customFields: output.customFields !== undefined && output.customFields !== null + ? deserializeAws_restJson1Fields(output.customFields, context) + : undefined, + managedFields: output.managedFields !== undefined && output.managedFields !== null + ? deserializeAws_restJson1Fields(output.managedFields, context) + : undefined, + thingConnectivityIndexingMode: output.thingConnectivityIndexingMode !== undefined && output.thingConnectivityIndexingMode !== null + ? output.thingConnectivityIndexingMode + : undefined, + thingIndexingMode: output.thingIndexingMode !== undefined && output.thingIndexingMode !== null + ? output.thingIndexingMode + : undefined, + }; +}; +const deserializeAws_restJson1ThingNameList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_restJson1ThingTypeDefinition = (output, context) => { + return { + thingTypeArn: output.thingTypeArn !== undefined && output.thingTypeArn !== null ? output.thingTypeArn : undefined, + thingTypeMetadata: output.thingTypeMetadata !== undefined && output.thingTypeMetadata !== null + ? deserializeAws_restJson1ThingTypeMetadata(output.thingTypeMetadata, context) + : undefined, + thingTypeName: output.thingTypeName !== undefined && output.thingTypeName !== null ? output.thingTypeName : undefined, + thingTypeProperties: output.thingTypeProperties !== undefined && output.thingTypeProperties !== null + ? deserializeAws_restJson1ThingTypeProperties(output.thingTypeProperties, context) + : undefined, + }; +}; +const deserializeAws_restJson1ThingTypeList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ThingTypeDefinition(entry, context); + }); +}; +const deserializeAws_restJson1ThingTypeMetadata = (output, context) => { + return { + creationDate: output.creationDate !== undefined && output.creationDate !== null + ? new Date(Math.round(output.creationDate * 1000)) + : undefined, + deprecated: output.deprecated !== undefined && output.deprecated !== null ? output.deprecated : undefined, + deprecationDate: output.deprecationDate !== undefined && output.deprecationDate !== null + ? new Date(Math.round(output.deprecationDate * 1000)) + : undefined, + }; +}; +const deserializeAws_restJson1ThingTypeProperties = (output, context) => { + return { + searchableAttributes: output.searchableAttributes !== undefined && output.searchableAttributes !== null + ? deserializeAws_restJson1SearchableAttributes(output.searchableAttributes, context) + : undefined, + thingTypeDescription: output.thingTypeDescription !== undefined && output.thingTypeDescription !== null + ? output.thingTypeDescription + : undefined, + }; +}; +const deserializeAws_restJson1TimeoutConfig = (output, context) => { + return { + inProgressTimeoutInMinutes: output.inProgressTimeoutInMinutes !== undefined && output.inProgressTimeoutInMinutes !== null + ? output.inProgressTimeoutInMinutes + : undefined, + }; +}; +const deserializeAws_restJson1TimestreamAction = (output, context) => { + return { + databaseName: output.databaseName !== undefined && output.databaseName !== null ? output.databaseName : undefined, + dimensions: output.dimensions !== undefined && output.dimensions !== null + ? deserializeAws_restJson1TimestreamDimensionList(output.dimensions, context) + : undefined, + roleArn: output.roleArn !== undefined && output.roleArn !== null ? output.roleArn : undefined, + tableName: output.tableName !== undefined && output.tableName !== null ? output.tableName : undefined, + timestamp: output.timestamp !== undefined && output.timestamp !== null + ? deserializeAws_restJson1TimestreamTimestamp(output.timestamp, context) + : undefined, + }; +}; +const deserializeAws_restJson1TimestreamDimension = (output, context) => { + return { + name: output.name !== undefined && output.name !== null ? output.name : undefined, + value: output.value !== undefined && output.value !== null ? output.value : undefined, + }; +}; +const deserializeAws_restJson1TimestreamDimensionList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1TimestreamDimension(entry, context); + }); +}; +const deserializeAws_restJson1TimestreamTimestamp = (output, context) => { + return { + unit: output.unit !== undefined && output.unit !== null ? output.unit : undefined, + value: output.value !== undefined && output.value !== null ? output.value : undefined, + }; +}; +const deserializeAws_restJson1TopicRule = (output, context) => { + return { + actions: output.actions !== undefined && output.actions !== null + ? deserializeAws_restJson1ActionList(output.actions, context) + : undefined, + awsIotSqlVersion: output.awsIotSqlVersion !== undefined && output.awsIotSqlVersion !== null ? output.awsIotSqlVersion : undefined, + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? new Date(Math.round(output.createdAt * 1000)) + : undefined, + description: output.description !== undefined && output.description !== null ? output.description : undefined, + errorAction: output.errorAction !== undefined && output.errorAction !== null + ? deserializeAws_restJson1Action(output.errorAction, context) + : undefined, + ruleDisabled: output.ruleDisabled !== undefined && output.ruleDisabled !== null ? output.ruleDisabled : undefined, + ruleName: output.ruleName !== undefined && output.ruleName !== null ? output.ruleName : undefined, + sql: output.sql !== undefined && output.sql !== null ? output.sql : undefined, + }; +}; +const deserializeAws_restJson1TopicRuleDestination = (output, context) => { + return { + arn: output.arn !== undefined && output.arn !== null ? output.arn : undefined, + httpUrlProperties: output.httpUrlProperties !== undefined && output.httpUrlProperties !== null + ? deserializeAws_restJson1HttpUrlDestinationProperties(output.httpUrlProperties, context) + : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + statusReason: output.statusReason !== undefined && output.statusReason !== null ? output.statusReason : undefined, + }; +}; +const deserializeAws_restJson1TopicRuleDestinationSummaries = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1TopicRuleDestinationSummary(entry, context); + }); +}; +const deserializeAws_restJson1TopicRuleDestinationSummary = (output, context) => { + return { + arn: output.arn !== undefined && output.arn !== null ? output.arn : undefined, + httpUrlSummary: output.httpUrlSummary !== undefined && output.httpUrlSummary !== null + ? deserializeAws_restJson1HttpUrlDestinationSummary(output.httpUrlSummary, context) + : undefined, + status: output.status !== undefined && output.status !== null ? output.status : undefined, + statusReason: output.statusReason !== undefined && output.statusReason !== null ? output.statusReason : undefined, + }; +}; +const deserializeAws_restJson1TopicRuleList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1TopicRuleListItem(entry, context); + }); +}; +const deserializeAws_restJson1TopicRuleListItem = (output, context) => { + return { + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? new Date(Math.round(output.createdAt * 1000)) + : undefined, + ruleArn: output.ruleArn !== undefined && output.ruleArn !== null ? output.ruleArn : undefined, + ruleDisabled: output.ruleDisabled !== undefined && output.ruleDisabled !== null ? output.ruleDisabled : undefined, + ruleName: output.ruleName !== undefined && output.ruleName !== null ? output.ruleName : undefined, + topicPattern: output.topicPattern !== undefined && output.topicPattern !== null ? output.topicPattern : undefined, + }; +}; +const deserializeAws_restJson1TransferData = (output, context) => { + return { + acceptDate: output.acceptDate !== undefined && output.acceptDate !== null + ? new Date(Math.round(output.acceptDate * 1000)) + : undefined, + rejectDate: output.rejectDate !== undefined && output.rejectDate !== null + ? new Date(Math.round(output.rejectDate * 1000)) + : undefined, + rejectReason: output.rejectReason !== undefined && output.rejectReason !== null ? output.rejectReason : undefined, + transferDate: output.transferDate !== undefined && output.transferDate !== null + ? new Date(Math.round(output.transferDate * 1000)) + : undefined, + transferMessage: output.transferMessage !== undefined && output.transferMessage !== null ? output.transferMessage : undefined, + }; +}; +const deserializeAws_restJson1UpdateCACertificateParams = (output, context) => { + return { + action: output.action !== undefined && output.action !== null ? output.action : undefined, + }; +}; +const deserializeAws_restJson1UpdateDeviceCertificateParams = (output, context) => { + return { + action: output.action !== undefined && output.action !== null ? output.action : undefined, + }; +}; +const deserializeAws_restJson1ValidationError = (output, context) => { + return { + errorMessage: output.errorMessage !== undefined && output.errorMessage !== null ? output.errorMessage : undefined, + }; +}; +const deserializeAws_restJson1ValidationErrors = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ValidationError(entry, context); + }); +}; +const deserializeAws_restJson1ViolationEvent = (output, context) => { + return { + behavior: output.behavior !== undefined && output.behavior !== null + ? deserializeAws_restJson1Behavior(output.behavior, context) + : undefined, + metricValue: output.metricValue !== undefined && output.metricValue !== null + ? deserializeAws_restJson1MetricValue(output.metricValue, context) + : undefined, + securityProfileName: output.securityProfileName !== undefined && output.securityProfileName !== null + ? output.securityProfileName + : undefined, + thingName: output.thingName !== undefined && output.thingName !== null ? output.thingName : undefined, + violationEventTime: output.violationEventTime !== undefined && output.violationEventTime !== null + ? new Date(Math.round(output.violationEventTime * 1000)) + : undefined, + violationEventType: output.violationEventType !== undefined && output.violationEventType !== null + ? output.violationEventType + : undefined, + violationId: output.violationId !== undefined && output.violationId !== null ? output.violationId : undefined, + }; +}; +const deserializeAws_restJson1ViolationEvents = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1ViolationEvent(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"], + }); +}; +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; +// Encode Uint8Array data into string with utf-8. +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 {}; +}); +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +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 ""; +}; +//# sourceMappingURL=Aws_restJson1.js.map + +/***/ }), + +/***/ 67490: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientDefaultValues = void 0; +const tslib_1 = __nccwpck_require__(3153); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(57111)); +const config_resolver_1 = __nccwpck_require__(87229); +const credential_provider_node_1 = __nccwpck_require__(98030); +const hash_node_1 = __nccwpck_require__(90791); +const middleware_retry_1 = __nccwpck_require__(7000); +const node_config_provider_1 = __nccwpck_require__(71124); +const node_http_handler_1 = __nccwpck_require__(15168); +const util_base64_node_1 = __nccwpck_require__(2091); +const util_body_length_node_1 = __nccwpck_require__(40286); +const util_user_agent_node_1 = __nccwpck_require__(64717); +const util_utf8_node_1 = __nccwpck_require__(85227); +const runtimeConfig_shared_1 = __nccwpck_require__(96571); +/** + * @internal + */ +exports.ClientDefaultValues = { + ...runtimeConfig_shared_1.ClientSharedValues, + runtime: "node", + base64Decoder: util_base64_node_1.fromBase64, + base64Encoder: util_base64_node_1.toBase64, + bodyLengthChecker: util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: util_user_agent_node_1.defaultUserAgent({ + serviceId: runtimeConfig_shared_1.ClientSharedValues.serviceId, + clientVersion: package_json_1.default.version, + }), + maxAttempts: node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: new node_http_handler_1.NodeHttpHandler(), + sha256: hash_node_1.Hash.bind(null, "sha256"), + streamCollector: node_http_handler_1.streamCollector, + utf8Decoder: util_utf8_node_1.fromUtf8, + utf8Encoder: util_utf8_node_1.toUtf8, +}; +//# sourceMappingURL=runtimeConfig.js.map + +/***/ }), + +/***/ 96571: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientSharedValues = void 0; +const endpoints_1 = __nccwpck_require__(37987); +const url_parser_1 = __nccwpck_require__(99427); +/** + * @internal + */ +exports.ClientSharedValues = { + apiVersion: "2015-05-28", + disableHostPrefix: false, + logger: {}, + regionInfoProvider: endpoints_1.defaultRegionInfoProvider, + serviceId: "IoT", + urlParser: url_parser_1.parseUrl, +}; +//# sourceMappingURL=runtimeConfig.shared.js.map + +/***/ }), + +/***/ 3153: +/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +__nccwpck_require__.r(__webpack_exports__); +/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { +/* harmony export */ "__extends": () => /* binding */ __extends, +/* harmony export */ "__assign": () => /* binding */ __assign, +/* harmony export */ "__rest": () => /* binding */ __rest, +/* harmony export */ "__decorate": () => /* binding */ __decorate, +/* harmony export */ "__param": () => /* binding */ __param, +/* harmony export */ "__metadata": () => /* binding */ __metadata, +/* harmony export */ "__awaiter": () => /* binding */ __awaiter, +/* harmony export */ "__generator": () => /* binding */ __generator, +/* harmony export */ "__createBinding": () => /* binding */ __createBinding, +/* harmony export */ "__exportStar": () => /* binding */ __exportStar, +/* harmony export */ "__values": () => /* binding */ __values, +/* harmony export */ "__read": () => /* binding */ __read, +/* harmony export */ "__spread": () => /* binding */ __spread, +/* harmony export */ "__spreadArrays": () => /* binding */ __spreadArrays, +/* harmony export */ "__spreadArray": () => /* binding */ __spreadArray, +/* harmony export */ "__await": () => /* binding */ __await, +/* harmony export */ "__asyncGenerator": () => /* binding */ __asyncGenerator, +/* harmony export */ "__asyncDelegator": () => /* binding */ __asyncDelegator, +/* harmony export */ "__asyncValues": () => /* binding */ __asyncValues, +/* harmony export */ "__makeTemplateObject": () => /* binding */ __makeTemplateObject, +/* harmony export */ "__importStar": () => /* binding */ __importStar, +/* harmony export */ "__importDefault": () => /* binding */ __importDefault, +/* harmony export */ "__classPrivateFieldGet": () => /* binding */ __classPrivateFieldGet, +/* harmony export */ "__classPrivateFieldSet": () => /* binding */ __classPrivateFieldSet +/* harmony export */ }); +/*! ***************************************************************************** +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 Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + 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 }; + } +} + +var __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]; +}); + +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function __spreadArray(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, 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]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function __importStar(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; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} + + +/***/ }), + +/***/ 44221: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SQS = void 0; +const SQSClient_1 = __nccwpck_require__(81509); +const AddPermissionCommand_1 = __nccwpck_require__(26913); +const ChangeMessageVisibilityBatchCommand_1 = __nccwpck_require__(22597); +const ChangeMessageVisibilityCommand_1 = __nccwpck_require__(87760); +const CreateQueueCommand_1 = __nccwpck_require__(11412); +const DeleteMessageBatchCommand_1 = __nccwpck_require__(66794); +const DeleteMessageCommand_1 = __nccwpck_require__(5675); +const DeleteQueueCommand_1 = __nccwpck_require__(29855); +const GetQueueAttributesCommand_1 = __nccwpck_require__(42025); +const GetQueueUrlCommand_1 = __nccwpck_require__(56125); +const ListDeadLetterSourceQueuesCommand_1 = __nccwpck_require__(66167); +const ListQueueTagsCommand_1 = __nccwpck_require__(79354); +const ListQueuesCommand_1 = __nccwpck_require__(41816); +const PurgeQueueCommand_1 = __nccwpck_require__(39702); +const ReceiveMessageCommand_1 = __nccwpck_require__(93954); +const RemovePermissionCommand_1 = __nccwpck_require__(60281); +const SendMessageBatchCommand_1 = __nccwpck_require__(49149); +const SendMessageCommand_1 = __nccwpck_require__(34021); +const SetQueueAttributesCommand_1 = __nccwpck_require__(65618); +const TagQueueCommand_1 = __nccwpck_require__(68409); +const UntagQueueCommand_1 = __nccwpck_require__(79769); +/** + *

Welcome to the Amazon Simple Queue Service API Reference.

+ *

Amazon Simple Queue Service (Amazon SQS) is a reliable, highly-scalable hosted queue for storing messages as they travel between applications or microservices. Amazon SQS moves data between distributed application components and helps you decouple these components.

+ *

For information on the permissions you need to use this API, see + * Identity and + * access management in the Amazon Simple Queue Service Developer Guide. + *

+ *

You can use AWS SDKs to access Amazon SQS using your favorite programming language. The SDKs perform tasks such as the following automatically:

+ * + * + *

+ * Additional Information + *

+ * + */ +class SQS extends SQSClient_1.SQSClient { + addPermission(args, optionsOrCb, cb) { + const command = new AddPermissionCommand_1.AddPermissionCommand(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); + } + } + changeMessageVisibility(args, optionsOrCb, cb) { + const command = new ChangeMessageVisibilityCommand_1.ChangeMessageVisibilityCommand(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); + } + } + changeMessageVisibilityBatch(args, optionsOrCb, cb) { + const command = new ChangeMessageVisibilityBatchCommand_1.ChangeMessageVisibilityBatchCommand(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); + } + } + createQueue(args, optionsOrCb, cb) { + const command = new CreateQueueCommand_1.CreateQueueCommand(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); + } + } + deleteMessage(args, optionsOrCb, cb) { + const command = new DeleteMessageCommand_1.DeleteMessageCommand(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); + } + } + deleteMessageBatch(args, optionsOrCb, cb) { + const command = new DeleteMessageBatchCommand_1.DeleteMessageBatchCommand(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); + } + } + deleteQueue(args, optionsOrCb, cb) { + const command = new DeleteQueueCommand_1.DeleteQueueCommand(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); + } + } + getQueueAttributes(args, optionsOrCb, cb) { + const command = new GetQueueAttributesCommand_1.GetQueueAttributesCommand(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); + } + } + getQueueUrl(args, optionsOrCb, cb) { + const command = new GetQueueUrlCommand_1.GetQueueUrlCommand(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); + } + } + listDeadLetterSourceQueues(args, optionsOrCb, cb) { + const command = new ListDeadLetterSourceQueuesCommand_1.ListDeadLetterSourceQueuesCommand(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); + } + } + listQueues(args, optionsOrCb, cb) { + const command = new ListQueuesCommand_1.ListQueuesCommand(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); + } + } + listQueueTags(args, optionsOrCb, cb) { + const command = new ListQueueTagsCommand_1.ListQueueTagsCommand(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); + } + } + purgeQueue(args, optionsOrCb, cb) { + const command = new PurgeQueueCommand_1.PurgeQueueCommand(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); + } + } + receiveMessage(args, optionsOrCb, cb) { + const command = new ReceiveMessageCommand_1.ReceiveMessageCommand(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); + } + } + removePermission(args, optionsOrCb, cb) { + const command = new RemovePermissionCommand_1.RemovePermissionCommand(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); + } + } + sendMessage(args, optionsOrCb, cb) { + const command = new SendMessageCommand_1.SendMessageCommand(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); + } + } + sendMessageBatch(args, optionsOrCb, cb) { + const command = new SendMessageBatchCommand_1.SendMessageBatchCommand(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); + } + } + setQueueAttributes(args, optionsOrCb, cb) { + const command = new SetQueueAttributesCommand_1.SetQueueAttributesCommand(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); + } + } + tagQueue(args, optionsOrCb, cb) { + const command = new TagQueueCommand_1.TagQueueCommand(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); + } + } + untagQueue(args, optionsOrCb, cb) { + const command = new UntagQueueCommand_1.UntagQueueCommand(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.SQS = SQS; +//# sourceMappingURL=SQS.js.map + +/***/ }), + +/***/ 81509: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SQSClient = void 0; +const runtimeConfig_1 = __nccwpck_require__(43294); +const config_resolver_1 = __nccwpck_require__(87229); +const middleware_content_length_1 = __nccwpck_require__(69323); +const middleware_host_header_1 = __nccwpck_require__(58645); +const middleware_logger_1 = __nccwpck_require__(98685); +const middleware_retry_1 = __nccwpck_require__(7000); +const middleware_signing_1 = __nccwpck_require__(82487); +const middleware_user_agent_1 = __nccwpck_require__(55976); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Welcome to the Amazon Simple Queue Service API Reference.

+ *

Amazon Simple Queue Service (Amazon SQS) is a reliable, highly-scalable hosted queue for storing messages as they travel between applications or microservices. Amazon SQS moves data between distributed application components and helps you decouple these components.

+ *

For information on the permissions you need to use this API, see + * Identity and + * access management in the Amazon Simple Queue Service Developer Guide. + *

+ *

You can use AWS SDKs to access Amazon SQS using your favorite programming language. The SDKs perform tasks such as the following automatically:

+ * + * + *

+ * Additional Information + *

+ * + */ +class SQSClient extends smithy_client_1.Client { + constructor(configuration) { + let _config_0 = { + ...runtimeConfig_1.ClientDefaultValues, + ...configuration, + }; + let _config_1 = config_resolver_1.resolveRegionConfig(_config_0); + let _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1); + let _config_3 = middleware_signing_1.resolveAwsAuthConfig(_config_2); + let _config_4 = middleware_retry_1.resolveRetryConfig(_config_3); + let _config_5 = middleware_host_header_1.resolveHostHeaderConfig(_config_4); + let _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(this.config)); + 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.SQSClient = SQSClient; +//# sourceMappingURL=SQSClient.js.map + +/***/ }), + +/***/ 26913: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AddPermissionCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Adds a permission to a queue for a specific + * principal. + * This allows sharing access to the queue.

+ *

When you create a queue, you have full control access rights for the queue. + * Only you, the owner of the queue, can grant or deny permissions to the queue. + * For more information about these permissions, see + * Allow + * Developers to Write Messages to a Shared Queue in the Amazon Simple Queue Service Developer Guide.

+ * + * + * + *

Some actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:

+ *

+ * &AttributeName.1=first + *

+ *

+ * &AttributeName.2=second + *

+ * + *

Cross-account permissions don't apply to this action. For more information, see Grant Cross-Account Permissions to a Role and a User Name in the Amazon Simple Queue Service Developer Guide.

+ *
+ */ +class AddPermissionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "AddPermissionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AddPermissionRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryAddPermissionCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryAddPermissionCommand(output, context); + } +} +exports.AddPermissionCommand = AddPermissionCommand; +//# sourceMappingURL=AddPermissionCommand.js.map + +/***/ }), + +/***/ 22597: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ChangeMessageVisibilityBatchCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Changes the visibility timeout of multiple messages. This is a batch version of + * ChangeMessageVisibility. The result of the action on each message is reported individually in the response. + * You can send up to 10 + * ChangeMessageVisibility + * requests with each ChangeMessageVisibilityBatch action.

+ * + *

Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

+ *
+ *

Some actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:

+ *

+ * &AttributeName.1=first + *

+ *

+ * &AttributeName.2=second + *

+ */ +class ChangeMessageVisibilityBatchCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "ChangeMessageVisibilityBatchCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ChangeMessageVisibilityBatchRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ChangeMessageVisibilityBatchResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryChangeMessageVisibilityBatchCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryChangeMessageVisibilityBatchCommand(output, context); + } +} +exports.ChangeMessageVisibilityBatchCommand = ChangeMessageVisibilityBatchCommand; +//# sourceMappingURL=ChangeMessageVisibilityBatchCommand.js.map + +/***/ }), + +/***/ 87760: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ChangeMessageVisibilityCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Changes the visibility timeout of a specified message in a queue to a new value. The + * default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The + * maximum is 12 hours. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide.

+ *

For example, you have a message with a visibility timeout of 5 minutes. After 3 + * minutes, you call ChangeMessageVisibility with a timeout of 10 minutes. You + * can continue to call ChangeMessageVisibility to extend the visibility + * timeout to the maximum allowed time. If you try to extend the visibility timeout beyond + * the maximum, your request is rejected.

+ *

An Amazon SQS message has three basic states:

+ *
    + *
  1. + *

    Sent to a queue by a producer.

    + *
  2. + *
  3. + *

    Received from the queue by a consumer.

    + *
  4. + *
  5. + *

    Deleted from the queue.

    + *
  6. + *
+ *

A message is considered to be stored after it is sent to a queue by a producer, but not yet received from the queue by a consumer (that is, between states 1 and 2). There is no limit to the number of stored messages. + * A message is considered to be in flight after it is received from a queue by a consumer, but not yet deleted from the queue (that is, between states 2 and 3). There is a limit to the number of inflight messages.

+ *

Limits that apply to inflight messages are unrelated to the unlimited number of stored messages.

+ *

For most standard queues (depending on queue traffic and message backlog), there can be a maximum of approximately 120,000 inflight messages (received from a queue by a consumer, but not yet deleted from the queue). + * If you reach this limit, Amazon SQS returns the OverLimit error message. + * To avoid reaching the limit, you should delete messages from the queue after they're processed. You can also increase the number of queues you use to process your messages. + * To request a limit increase, file a support request.

+ *

For FIFO queues, there can be a maximum of 20,000 inflight messages (received from a queue by a consumer, but not yet deleted from the queue). If you reach this limit, Amazon SQS returns no error messages.

+ * + * + *

If you attempt to set the VisibilityTimeout to a value greater than the maximum time left, Amazon SQS returns an error. Amazon SQS doesn't automatically recalculate and increase the timeout to the maximum remaining time.

+ *

Unlike with a queue, when you change the visibility timeout for a specific message the timeout value is applied immediately but isn't saved in memory for that message. If you don't delete a message after it is received, the visibility timeout + * for the message reverts to the original timeout value (not to the value you set using the ChangeMessageVisibility action) the next time the message is received.

+ *
+ */ +class ChangeMessageVisibilityCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "ChangeMessageVisibilityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ChangeMessageVisibilityRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryChangeMessageVisibilityCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryChangeMessageVisibilityCommand(output, context); + } +} +exports.ChangeMessageVisibilityCommand = ChangeMessageVisibilityCommand; +//# sourceMappingURL=ChangeMessageVisibilityCommand.js.map + +/***/ }), + +/***/ 11412: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateQueueCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Creates a new standard or FIFO queue. You can pass one or more attributes in + * the request. Keep the following in mind:

+ * + * + *

To successfully create a new queue, you must provide a queue name that adheres to the limits related to queues and is unique within the scope of your queues.

+ * + *

After you create a queue, you must wait at least one second after the queue is + * created to be able to use the queue.

+ *
+ *

To get the queue URL, use the + * GetQueueUrl + * action. + * GetQueueUrl + * requires only the QueueName parameter. + * be aware of existing queue names:

+ * + *

Some actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:

+ *

+ * &AttributeName.1=first + *

+ *

+ * &AttributeName.2=second + *

+ * + *

Cross-account permissions don't apply to this action. For more information, see Grant Cross-Account Permissions to a Role and a User Name in the Amazon Simple Queue Service Developer Guide.

+ *
+ */ +class CreateQueueCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "CreateQueueCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateQueueRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateQueueResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryCreateQueueCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryCreateQueueCommand(output, context); + } +} +exports.CreateQueueCommand = CreateQueueCommand; +//# sourceMappingURL=CreateQueueCommand.js.map + +/***/ }), + +/***/ 66794: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteMessageBatchCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes up to ten messages from the specified queue. This is a batch version of + * DeleteMessage. The result of the action on each message is reported individually in the response.

+ * + *

Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

+ *
+ *

Some actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:

+ *

+ * &AttributeName.1=first + *

+ *

+ * &AttributeName.2=second + *

+ */ +class DeleteMessageBatchCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "DeleteMessageBatchCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteMessageBatchRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteMessageBatchResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDeleteMessageBatchCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDeleteMessageBatchCommand(output, context); + } +} +exports.DeleteMessageBatchCommand = DeleteMessageBatchCommand; +//# sourceMappingURL=DeleteMessageBatchCommand.js.map + +/***/ }), + +/***/ 5675: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteMessageCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the specified message from the specified queue. To select the message to + * delete, use the ReceiptHandle of the message (not the + * MessageId which you receive when you send the message). Amazon SQS can + * delete a message from a queue even if a visibility timeout setting causes the message to + * be locked by another consumer. Amazon SQS automatically deletes messages left in a queue + * longer than the retention period configured for the queue.

+ * + *

The ReceiptHandle is associated with a specific + * instance of receiving a message. If you receive a message more than + * once, the ReceiptHandle is different each time you receive a message. + * When you use the DeleteMessage action, you must provide the most + * recently received ReceiptHandle for the message (otherwise, the request + * succeeds, but the message might not be deleted).

+ *

For standard queues, it is possible to receive a message even after you + * delete it. This might happen on rare occasions if one of the servers which stores a + * copy of the message is unavailable when you send the request to delete the message. + * The copy remains on the server and might be returned to you during a subsequent + * receive request. You should ensure that your application is idempotent, so that + * receiving a message more than once does not cause issues.

+ *
+ */ +class DeleteMessageCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "DeleteMessageCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteMessageRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDeleteMessageCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDeleteMessageCommand(output, context); + } +} +exports.DeleteMessageCommand = DeleteMessageCommand; +//# sourceMappingURL=DeleteMessageCommand.js.map + +/***/ }), + +/***/ 29855: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteQueueCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the queue specified by the QueueUrl, regardless of the queue's contents.

+ * + *

Be careful with the DeleteQueue action: When you delete a queue, any messages in the queue are no longer available. + *

+ *
+ *

When you delete a queue, the deletion process takes up to 60 seconds. Requests you send involving that queue during the 60 seconds might succeed. For example, a + * + * SendMessage + * request might succeed, but after 60 seconds the queue and the message you sent no longer exist.

+ *

When you delete a queue, you must wait at least 60 seconds before creating a queue with the same name.

+ * + *

Cross-account permissions don't apply to this action. For more information, see Grant Cross-Account Permissions to a Role and a User Name in the Amazon Simple Queue Service Developer Guide.

+ *
+ */ +class DeleteQueueCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "DeleteQueueCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteQueueRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDeleteQueueCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDeleteQueueCommand(output, context); + } +} +exports.DeleteQueueCommand = DeleteQueueCommand; +//# sourceMappingURL=DeleteQueueCommand.js.map + +/***/ }), + +/***/ 42025: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetQueueAttributesCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Gets attributes for the specified queue.

+ * + *

To determine whether a queue is FIFO, you can check whether QueueName ends with the .fifo suffix.

+ *
+ */ +class GetQueueAttributesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "GetQueueAttributesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetQueueAttributesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetQueueAttributesResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryGetQueueAttributesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryGetQueueAttributesCommand(output, context); + } +} +exports.GetQueueAttributesCommand = GetQueueAttributesCommand; +//# sourceMappingURL=GetQueueAttributesCommand.js.map + +/***/ }), + +/***/ 56125: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetQueueUrlCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the URL of an existing Amazon SQS queue.

+ *

To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId parameter to specify the account ID of the queue's owner. The queue's owner must grant you permission to access the queue. + * For more information about shared queue access, see + * AddPermission + * or see Allow Developers to Write Messages to a Shared Queue in the Amazon Simple Queue Service Developer Guide. + *

+ */ +class GetQueueUrlCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "GetQueueUrlCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetQueueUrlRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetQueueUrlResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryGetQueueUrlCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryGetQueueUrlCommand(output, context); + } +} +exports.GetQueueUrlCommand = GetQueueUrlCommand; +//# sourceMappingURL=GetQueueUrlCommand.js.map + +/***/ }), + +/***/ 66167: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListDeadLetterSourceQueuesCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a list of your queues that have the RedrivePolicy queue attribute configured with a dead-letter queue.

+ *

The ListDeadLetterSourceQueues methods supports + * pagination. Set parameter MaxResults in the request to specify the maximum number of + * results to be returned in the response. If you do not set MaxResults, + * the response includes a maximum of 1,000 results. If you set MaxResults and there are additional results to + * display, the response includes a value for NextToken. Use + * NextToken as a parameter in your next request to + * ListDeadLetterSourceQueues to receive the next page of results.

+ * + *

For more information about using dead-letter queues, see Using Amazon SQS Dead-Letter Queues + * in the Amazon Simple Queue Service Developer Guide.

+ */ +class ListDeadLetterSourceQueuesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "ListDeadLetterSourceQueuesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListDeadLetterSourceQueuesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListDeadLetterSourceQueuesResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListDeadLetterSourceQueuesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListDeadLetterSourceQueuesCommand(output, context); + } +} +exports.ListDeadLetterSourceQueuesCommand = ListDeadLetterSourceQueuesCommand; +//# sourceMappingURL=ListDeadLetterSourceQueuesCommand.js.map + +/***/ }), + +/***/ 79354: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListQueueTagsCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

List all cost allocation tags added to the specified Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon Simple Queue Service Developer Guide.

+ * + *

Cross-account permissions don't apply to this action. For more information, see Grant Cross-Account Permissions to a Role and a User Name in the Amazon Simple Queue Service Developer Guide.

+ *
+ */ +class ListQueueTagsCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "ListQueueTagsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListQueueTagsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListQueueTagsResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListQueueTagsCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListQueueTagsCommand(output, context); + } +} +exports.ListQueueTagsCommand = ListQueueTagsCommand; +//# sourceMappingURL=ListQueueTagsCommand.js.map + +/***/ }), + +/***/ 41816: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListQueuesCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a list of your queues in the current region. The response includes a maximum of 1,000 results. If you specify a value for the optional + * QueueNamePrefix parameter, only queues with a name that begins with the specified value are returned.

+ *

The listQueues methods supports + * pagination. Set parameter MaxResults in the request to specify the maximum number of + * results to be returned in the response. If you do not set MaxResults, + * the response includes a maximum of 1,000 results. If you set MaxResults and there are additional results to + * display, the response includes a value for NextToken. Use + * NextToken as a parameter in your next request to + * listQueues to receive the next page of results.

+ * + *

Cross-account permissions don't apply to this action. For more information, see Grant Cross-Account Permissions to a Role and a User Name in the Amazon Simple Queue Service Developer Guide.

+ *
+ */ +class ListQueuesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "ListQueuesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListQueuesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListQueuesResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryListQueuesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryListQueuesCommand(output, context); + } +} +exports.ListQueuesCommand = ListQueuesCommand; +//# sourceMappingURL=ListQueuesCommand.js.map + +/***/ }), + +/***/ 39702: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PurgeQueueCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Deletes the messages in a queue specified by the QueueURL + * parameter.

+ * + * + *

When you use the PurgeQueue action, you can't retrieve any messages + * deleted from a queue.

+ *

The message deletion process takes up to 60 seconds. We recommend waiting for + * 60 seconds regardless of your queue's size.

+ *
+ *

Messages sent to the queue before you call + * PurgeQueue might be received but are deleted within the next + * minute.

+ *

Messages sent to the queue after you call + * PurgeQueue might be deleted while the queue is being purged.

+ */ +class PurgeQueueCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "PurgeQueueCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PurgeQueueRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryPurgeQueueCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryPurgeQueueCommand(output, context); + } +} +exports.PurgeQueueCommand = PurgeQueueCommand; +//# sourceMappingURL=PurgeQueueCommand.js.map + +/***/ }), + +/***/ 93954: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ReceiveMessageCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_sdk_sqs_1 = __nccwpck_require__(27995); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Retrieves one or more messages (up to 10), from the specified queue. Using the WaitTimeSeconds parameter enables long-poll support. + * For more information, see Amazon SQS Long Polling in the Amazon Simple Queue Service Developer Guide. + *

+ *

Short poll is the default behavior where a weighted random set of machines is sampled on a ReceiveMessage call. Thus, only the messages on the sampled machines are returned. + * If the number of messages in the queue is small (fewer than 1,000), you most likely get fewer messages than you requested per ReceiveMessage call. If the number of messages in the queue is extremely small, + * you might not receive any messages in a particular ReceiveMessage response. If this happens, repeat the request. + *

+ *

For each message returned, the response includes the following:

+ * + *

The receipt handle is the identifier you must provide when deleting the message. For more information, see Queue + * and Message Identifiers in the Amazon Simple Queue Service Developer Guide.

+ *

You can provide the VisibilityTimeout parameter in your request. The parameter is applied to the messages that Amazon SQS returns in the response. If you don't include the parameter, the overall visibility timeout for the queue + * is used for the returned messages. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide.

+ *

A message that isn't deleted or a message whose visibility isn't extended before the visibility timeout expires counts as a failed receive. Depending on the configuration of the queue, the message might be sent to the dead-letter queue.

+ * + *

In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

+ *
+ */ +class ReceiveMessageCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_sdk_sqs_1.getReceiveMessagePlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "ReceiveMessageCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ReceiveMessageRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ReceiveMessageResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryReceiveMessageCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryReceiveMessageCommand(output, context); + } +} +exports.ReceiveMessageCommand = ReceiveMessageCommand; +//# sourceMappingURL=ReceiveMessageCommand.js.map + +/***/ }), + +/***/ 60281: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RemovePermissionCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Revokes any permissions in the queue policy that matches the specified Label parameter.

+ * + * + * + */ +class RemovePermissionCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "RemovePermissionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.RemovePermissionRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryRemovePermissionCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryRemovePermissionCommand(output, context); + } +} +exports.RemovePermissionCommand = RemovePermissionCommand; +//# sourceMappingURL=RemovePermissionCommand.js.map + +/***/ }), + +/***/ 49149: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SendMessageBatchCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_sdk_sqs_1 = __nccwpck_require__(27995); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Delivers up to ten messages to the specified queue. This is a batch version of + * SendMessage. For a FIFO queue, multiple messages within a single batch are enqueued in the order they are sent.

+ *

The result of sending each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

+ *

The maximum allowed individual message size and the maximum total payload size (the sum of the individual lengths of all of the batched messages) are both 256 KB (262,144 bytes).

+ * + *

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

+ *

+ * #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF + *

+ *

Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

+ *
+ *

If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses the default value for the queue.

+ *

Some actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:

+ *

+ * &AttributeName.1=first + *

+ *

+ * &AttributeName.2=second + *

+ */ +class SendMessageBatchCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_sdk_sqs_1.getSendMessageBatchPlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "SendMessageBatchCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SendMessageBatchRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SendMessageBatchResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_querySendMessageBatchCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_querySendMessageBatchCommand(output, context); + } +} +exports.SendMessageBatchCommand = SendMessageBatchCommand; +//# sourceMappingURL=SendMessageBatchCommand.js.map + +/***/ }), + +/***/ 34021: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SendMessageCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_sdk_sqs_1 = __nccwpck_require__(27995); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Delivers a message to the specified queue.

+ * + *

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

+ *

+ * #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF + *

+ *

Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

+ *
+ */ +class SendMessageCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_sdk_sqs_1.getSendMessagePlugin(configuration)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "SendMessageCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SendMessageRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SendMessageResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_querySendMessageCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_querySendMessageCommand(output, context); + } +} +exports.SendMessageCommand = SendMessageCommand; +//# sourceMappingURL=SendMessageCommand.js.map + +/***/ }), + +/***/ 65618: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetQueueAttributesCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Sets the value of one or more queue attributes. When you change a queue's attributes, the change can take up to 60 seconds for most of the attributes to propagate throughout the Amazon SQS system. + * Changes made to the MessageRetentionPeriod attribute can take up to 15 minutes.

+ * + * + * + */ +class SetQueueAttributesCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "SetQueueAttributesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetQueueAttributesRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_querySetQueueAttributesCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_querySetQueueAttributesCommand(output, context); + } +} +exports.SetQueueAttributesCommand = SetQueueAttributesCommand; +//# sourceMappingURL=SetQueueAttributesCommand.js.map + +/***/ }), + +/***/ 68409: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TagQueueCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Add cost allocation tags to the specified Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon Simple Queue Service Developer Guide.

+ * + *

When you use queue tags, keep the following guidelines in mind:

+ * + *

For a full list of tag restrictions, see Limits Related to Queues in the Amazon Simple Queue Service Developer Guide.

+ * + *

Cross-account permissions don't apply to this action. For more information, see Grant Cross-Account Permissions to a Role and a User Name in the Amazon Simple Queue Service Developer Guide.

+ *
+ */ +class TagQueueCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "TagQueueCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.TagQueueRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryTagQueueCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryTagQueueCommand(output, context); + } +} +exports.TagQueueCommand = TagQueueCommand; +//# sourceMappingURL=TagQueueCommand.js.map + +/***/ }), + +/***/ 79769: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UntagQueueCommand = void 0; +const models_0_1 = __nccwpck_require__(12183); +const Aws_query_1 = __nccwpck_require__(47377); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Remove cost allocation tags from the specified Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon Simple Queue Service Developer Guide.

+ * + *

Cross-account permissions don't apply to this action. For more information, see Grant Cross-Account Permissions to a Role and a User Name in the Amazon Simple Queue Service Developer Guide.

+ *
+ */ +class UntagQueueCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SQSClient"; + const commandName = "UntagQueueCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UntagQueueRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryUntagQueueCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryUntagQueueCommand(output, context); + } +} +exports.UntagQueueCommand = UntagQueueCommand; +//# sourceMappingURL=UntagQueueCommand.js.map + +/***/ }), + +/***/ 86883: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRegionInfoProvider = void 0; +// Partition default templates +const AWS_TEMPLATE = "sqs.{region}.amazonaws.com"; +const AWS_CN_TEMPLATE = "sqs.{region}.amazonaws.com.cn"; +const AWS_ISO_TEMPLATE = "sqs.{region}.c2s.ic.gov"; +const AWS_ISO_B_TEMPLATE = "sqs.{region}.sc2s.sgov.gov"; +const AWS_US_GOV_TEMPLATE = "sqs.{region}.amazonaws.com"; +// Partition regions +const AWS_REGIONS = new Set([ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "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", +]); +const AWS_CN_REGIONS = new Set(["cn-north-1", "cn-northwest-1"]); +const AWS_ISO_REGIONS = new Set(["us-iso-east-1"]); +const AWS_ISO_B_REGIONS = new Set(["us-isob-east-1"]); +const AWS_US_GOV_REGIONS = new Set(["us-gov-east-1", "us-gov-west-1"]); +const defaultRegionInfoProvider = (region, options) => { + let regionInfo = undefined; + switch (region) { + // First, try to match exact region names. + case "af-south-1": + regionInfo = { + hostname: "sqs.af-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-east-1": + regionInfo = { + hostname: "sqs.ap-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-northeast-1": + regionInfo = { + hostname: "sqs.ap-northeast-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-northeast-2": + regionInfo = { + hostname: "sqs.ap-northeast-2.amazonaws.com", + partition: "aws", + }; + break; + case "ap-south-1": + regionInfo = { + hostname: "sqs.ap-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-southeast-1": + regionInfo = { + hostname: "sqs.ap-southeast-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-southeast-2": + regionInfo = { + hostname: "sqs.ap-southeast-2.amazonaws.com", + partition: "aws", + }; + break; + case "ca-central-1": + regionInfo = { + hostname: "sqs.ca-central-1.amazonaws.com", + partition: "aws", + }; + break; + case "cn-north-1": + regionInfo = { + hostname: "sqs.cn-north-1.amazonaws.com.cn", + partition: "aws-cn", + }; + break; + case "cn-northwest-1": + regionInfo = { + hostname: "sqs.cn-northwest-1.amazonaws.com.cn", + partition: "aws-cn", + }; + break; + case "eu-central-1": + regionInfo = { + hostname: "sqs.eu-central-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-north-1": + regionInfo = { + hostname: "sqs.eu-north-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-south-1": + regionInfo = { + hostname: "sqs.eu-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-1": + regionInfo = { + hostname: "sqs.eu-west-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-2": + regionInfo = { + hostname: "sqs.eu-west-2.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-3": + regionInfo = { + hostname: "sqs.eu-west-3.amazonaws.com", + partition: "aws", + }; + break; + case "fips-us-east-1": + regionInfo = { + hostname: "sqs-fips.us-east-1.amazonaws.com", + partition: "aws", + signingRegion: "us-east-1", + }; + break; + case "fips-us-east-2": + regionInfo = { + hostname: "sqs-fips.us-east-2.amazonaws.com", + partition: "aws", + signingRegion: "us-east-2", + }; + break; + case "fips-us-west-1": + regionInfo = { + hostname: "sqs-fips.us-west-1.amazonaws.com", + partition: "aws", + signingRegion: "us-west-1", + }; + break; + case "fips-us-west-2": + regionInfo = { + hostname: "sqs-fips.us-west-2.amazonaws.com", + partition: "aws", + signingRegion: "us-west-2", + }; + break; + case "me-south-1": + regionInfo = { + hostname: "sqs.me-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "sa-east-1": + regionInfo = { + hostname: "sqs.sa-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-1": + regionInfo = { + hostname: "sqs.us-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-2": + regionInfo = { + hostname: "sqs.us-east-2.amazonaws.com", + partition: "aws", + }; + break; + case "us-gov-east-1": + regionInfo = { + hostname: "sqs.us-gov-east-1.amazonaws.com", + partition: "aws-us-gov", + signingRegion: "us-gov-east-1", + }; + break; + case "us-gov-west-1": + regionInfo = { + hostname: "sqs.us-gov-west-1.amazonaws.com", + partition: "aws-us-gov", + signingRegion: "us-gov-west-1", + }; + break; + case "us-iso-east-1": + regionInfo = { + hostname: "sqs.us-iso-east-1.c2s.ic.gov", + partition: "aws-iso", + }; + break; + case "us-isob-east-1": + regionInfo = { + hostname: "sqs.us-isob-east-1.sc2s.sgov.gov", + partition: "aws-iso-b", + }; + break; + case "us-west-1": + regionInfo = { + hostname: "sqs.us-west-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-west-2": + regionInfo = { + hostname: "sqs.us-west-2.amazonaws.com", + partition: "aws", + }; + break; + // Next, try to match partition endpoints. + default: + if (AWS_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + }; + } + if (AWS_CN_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_CN_TEMPLATE.replace("{region}", region), + partition: "aws-cn", + }; + } + if (AWS_ISO_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_TEMPLATE.replace("{region}", region), + partition: "aws-iso", + }; + } + if (AWS_ISO_B_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_B_TEMPLATE.replace("{region}", region), + partition: "aws-iso-b", + }; + } + if (AWS_US_GOV_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_US_GOV_TEMPLATE.replace("{region}", region), + partition: "aws-us-gov", + }; + } + // Finally, assume it's an AWS partition endpoint. + if (regionInfo === undefined) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + }; + } + } + return Promise.resolve({ signingService: "sqs", ...regionInfo }); +}; +exports.defaultRegionInfoProvider = defaultRegionInfoProvider; +//# sourceMappingURL=endpoints.js.map + +/***/ }), + +/***/ 83062: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(27542); +tslib_1.__exportStar(__nccwpck_require__(81509), exports); +tslib_1.__exportStar(__nccwpck_require__(44221), exports); +tslib_1.__exportStar(__nccwpck_require__(26913), exports); +tslib_1.__exportStar(__nccwpck_require__(87760), exports); +tslib_1.__exportStar(__nccwpck_require__(22597), exports); +tslib_1.__exportStar(__nccwpck_require__(11412), exports); +tslib_1.__exportStar(__nccwpck_require__(5675), exports); +tslib_1.__exportStar(__nccwpck_require__(66794), exports); +tslib_1.__exportStar(__nccwpck_require__(29855), exports); +tslib_1.__exportStar(__nccwpck_require__(42025), exports); +tslib_1.__exportStar(__nccwpck_require__(56125), exports); +tslib_1.__exportStar(__nccwpck_require__(66167), exports); +tslib_1.__exportStar(__nccwpck_require__(90249), exports); +tslib_1.__exportStar(__nccwpck_require__(41816), exports); +tslib_1.__exportStar(__nccwpck_require__(84169), exports); +tslib_1.__exportStar(__nccwpck_require__(79354), exports); +tslib_1.__exportStar(__nccwpck_require__(39702), exports); +tslib_1.__exportStar(__nccwpck_require__(93954), exports); +tslib_1.__exportStar(__nccwpck_require__(60281), exports); +tslib_1.__exportStar(__nccwpck_require__(34021), exports); +tslib_1.__exportStar(__nccwpck_require__(49149), exports); +tslib_1.__exportStar(__nccwpck_require__(65618), exports); +tslib_1.__exportStar(__nccwpck_require__(68409), exports); +tslib_1.__exportStar(__nccwpck_require__(79769), exports); +tslib_1.__exportStar(__nccwpck_require__(57090), exports); +tslib_1.__exportStar(__nccwpck_require__(24577), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 24577: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(27542); +tslib_1.__exportStar(__nccwpck_require__(12183), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 12183: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchRequestTooLong = exports.UnsupportedOperation = exports.SendMessageResult = exports.SendMessageRequest = exports.MessageSystemAttributeValue = exports.InvalidMessageContents = exports.RemovePermissionRequest = exports.ReceiveMessageResult = exports.Message = exports.MessageAttributeValue = exports.ReceiveMessageRequest = exports.PurgeQueueRequest = exports.PurgeQueueInProgress = exports.ListQueueTagsResult = exports.ListQueueTagsRequest = exports.ListQueuesResult = exports.ListQueuesRequest = exports.ListDeadLetterSourceQueuesResult = exports.ListDeadLetterSourceQueuesRequest = exports.QueueDoesNotExist = exports.GetQueueUrlResult = exports.GetQueueUrlRequest = exports.InvalidAttributeName = exports.GetQueueAttributesResult = exports.GetQueueAttributesRequest = exports.DeleteQueueRequest = exports.DeleteMessageBatchResult = exports.DeleteMessageBatchResultEntry = exports.DeleteMessageBatchRequest = exports.DeleteMessageBatchRequestEntry = exports.InvalidIdFormat = exports.DeleteMessageRequest = exports.QueueNameExists = exports.QueueDeletedRecently = exports.CreateQueueResult = exports.CreateQueueRequest = exports.TooManyEntriesInBatchRequest = exports.InvalidBatchEntryId = exports.EmptyBatchRequest = exports.ChangeMessageVisibilityBatchResult = exports.ChangeMessageVisibilityBatchResultEntry = exports.BatchResultErrorEntry = exports.ChangeMessageVisibilityBatchRequest = exports.ChangeMessageVisibilityBatchRequestEntry = exports.BatchEntryIdsNotDistinct = exports.ReceiptHandleIsInvalid = exports.MessageNotInflight = exports.ChangeMessageVisibilityRequest = exports.OverLimit = exports.AddPermissionRequest = void 0; +exports.UntagQueueRequest = exports.TagQueueRequest = exports.SetQueueAttributesRequest = exports.SendMessageBatchResult = exports.SendMessageBatchResultEntry = exports.SendMessageBatchRequest = exports.SendMessageBatchRequestEntry = void 0; +var AddPermissionRequest; +(function (AddPermissionRequest) { + AddPermissionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AddPermissionRequest = exports.AddPermissionRequest || (exports.AddPermissionRequest = {})); +var OverLimit; +(function (OverLimit) { + OverLimit.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(OverLimit = exports.OverLimit || (exports.OverLimit = {})); +var ChangeMessageVisibilityRequest; +(function (ChangeMessageVisibilityRequest) { + ChangeMessageVisibilityRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ChangeMessageVisibilityRequest = exports.ChangeMessageVisibilityRequest || (exports.ChangeMessageVisibilityRequest = {})); +var MessageNotInflight; +(function (MessageNotInflight) { + MessageNotInflight.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MessageNotInflight = exports.MessageNotInflight || (exports.MessageNotInflight = {})); +var ReceiptHandleIsInvalid; +(function (ReceiptHandleIsInvalid) { + ReceiptHandleIsInvalid.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReceiptHandleIsInvalid = exports.ReceiptHandleIsInvalid || (exports.ReceiptHandleIsInvalid = {})); +var BatchEntryIdsNotDistinct; +(function (BatchEntryIdsNotDistinct) { + BatchEntryIdsNotDistinct.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchEntryIdsNotDistinct = exports.BatchEntryIdsNotDistinct || (exports.BatchEntryIdsNotDistinct = {})); +var ChangeMessageVisibilityBatchRequestEntry; +(function (ChangeMessageVisibilityBatchRequestEntry) { + ChangeMessageVisibilityBatchRequestEntry.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ChangeMessageVisibilityBatchRequestEntry = exports.ChangeMessageVisibilityBatchRequestEntry || (exports.ChangeMessageVisibilityBatchRequestEntry = {})); +var ChangeMessageVisibilityBatchRequest; +(function (ChangeMessageVisibilityBatchRequest) { + ChangeMessageVisibilityBatchRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ChangeMessageVisibilityBatchRequest = exports.ChangeMessageVisibilityBatchRequest || (exports.ChangeMessageVisibilityBatchRequest = {})); +var BatchResultErrorEntry; +(function (BatchResultErrorEntry) { + BatchResultErrorEntry.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchResultErrorEntry = exports.BatchResultErrorEntry || (exports.BatchResultErrorEntry = {})); +var ChangeMessageVisibilityBatchResultEntry; +(function (ChangeMessageVisibilityBatchResultEntry) { + ChangeMessageVisibilityBatchResultEntry.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ChangeMessageVisibilityBatchResultEntry = exports.ChangeMessageVisibilityBatchResultEntry || (exports.ChangeMessageVisibilityBatchResultEntry = {})); +var ChangeMessageVisibilityBatchResult; +(function (ChangeMessageVisibilityBatchResult) { + ChangeMessageVisibilityBatchResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ChangeMessageVisibilityBatchResult = exports.ChangeMessageVisibilityBatchResult || (exports.ChangeMessageVisibilityBatchResult = {})); +var EmptyBatchRequest; +(function (EmptyBatchRequest) { + EmptyBatchRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EmptyBatchRequest = exports.EmptyBatchRequest || (exports.EmptyBatchRequest = {})); +var InvalidBatchEntryId; +(function (InvalidBatchEntryId) { + InvalidBatchEntryId.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidBatchEntryId = exports.InvalidBatchEntryId || (exports.InvalidBatchEntryId = {})); +var TooManyEntriesInBatchRequest; +(function (TooManyEntriesInBatchRequest) { + TooManyEntriesInBatchRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TooManyEntriesInBatchRequest = exports.TooManyEntriesInBatchRequest || (exports.TooManyEntriesInBatchRequest = {})); +var CreateQueueRequest; +(function (CreateQueueRequest) { + CreateQueueRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateQueueRequest = exports.CreateQueueRequest || (exports.CreateQueueRequest = {})); +var CreateQueueResult; +(function (CreateQueueResult) { + CreateQueueResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateQueueResult = exports.CreateQueueResult || (exports.CreateQueueResult = {})); +var QueueDeletedRecently; +(function (QueueDeletedRecently) { + QueueDeletedRecently.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(QueueDeletedRecently = exports.QueueDeletedRecently || (exports.QueueDeletedRecently = {})); +var QueueNameExists; +(function (QueueNameExists) { + QueueNameExists.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(QueueNameExists = exports.QueueNameExists || (exports.QueueNameExists = {})); +var DeleteMessageRequest; +(function (DeleteMessageRequest) { + DeleteMessageRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteMessageRequest = exports.DeleteMessageRequest || (exports.DeleteMessageRequest = {})); +var InvalidIdFormat; +(function (InvalidIdFormat) { + InvalidIdFormat.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidIdFormat = exports.InvalidIdFormat || (exports.InvalidIdFormat = {})); +var DeleteMessageBatchRequestEntry; +(function (DeleteMessageBatchRequestEntry) { + DeleteMessageBatchRequestEntry.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteMessageBatchRequestEntry = exports.DeleteMessageBatchRequestEntry || (exports.DeleteMessageBatchRequestEntry = {})); +var DeleteMessageBatchRequest; +(function (DeleteMessageBatchRequest) { + DeleteMessageBatchRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteMessageBatchRequest = exports.DeleteMessageBatchRequest || (exports.DeleteMessageBatchRequest = {})); +var DeleteMessageBatchResultEntry; +(function (DeleteMessageBatchResultEntry) { + DeleteMessageBatchResultEntry.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteMessageBatchResultEntry = exports.DeleteMessageBatchResultEntry || (exports.DeleteMessageBatchResultEntry = {})); +var DeleteMessageBatchResult; +(function (DeleteMessageBatchResult) { + DeleteMessageBatchResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteMessageBatchResult = exports.DeleteMessageBatchResult || (exports.DeleteMessageBatchResult = {})); +var DeleteQueueRequest; +(function (DeleteQueueRequest) { + DeleteQueueRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteQueueRequest = exports.DeleteQueueRequest || (exports.DeleteQueueRequest = {})); +var GetQueueAttributesRequest; +(function (GetQueueAttributesRequest) { + GetQueueAttributesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetQueueAttributesRequest = exports.GetQueueAttributesRequest || (exports.GetQueueAttributesRequest = {})); +var GetQueueAttributesResult; +(function (GetQueueAttributesResult) { + GetQueueAttributesResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetQueueAttributesResult = exports.GetQueueAttributesResult || (exports.GetQueueAttributesResult = {})); +var InvalidAttributeName; +(function (InvalidAttributeName) { + InvalidAttributeName.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidAttributeName = exports.InvalidAttributeName || (exports.InvalidAttributeName = {})); +var GetQueueUrlRequest; +(function (GetQueueUrlRequest) { + GetQueueUrlRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetQueueUrlRequest = exports.GetQueueUrlRequest || (exports.GetQueueUrlRequest = {})); +var GetQueueUrlResult; +(function (GetQueueUrlResult) { + GetQueueUrlResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetQueueUrlResult = exports.GetQueueUrlResult || (exports.GetQueueUrlResult = {})); +var QueueDoesNotExist; +(function (QueueDoesNotExist) { + QueueDoesNotExist.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(QueueDoesNotExist = exports.QueueDoesNotExist || (exports.QueueDoesNotExist = {})); +var ListDeadLetterSourceQueuesRequest; +(function (ListDeadLetterSourceQueuesRequest) { + ListDeadLetterSourceQueuesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListDeadLetterSourceQueuesRequest = exports.ListDeadLetterSourceQueuesRequest || (exports.ListDeadLetterSourceQueuesRequest = {})); +var ListDeadLetterSourceQueuesResult; +(function (ListDeadLetterSourceQueuesResult) { + ListDeadLetterSourceQueuesResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListDeadLetterSourceQueuesResult = exports.ListDeadLetterSourceQueuesResult || (exports.ListDeadLetterSourceQueuesResult = {})); +var ListQueuesRequest; +(function (ListQueuesRequest) { + ListQueuesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListQueuesRequest = exports.ListQueuesRequest || (exports.ListQueuesRequest = {})); +var ListQueuesResult; +(function (ListQueuesResult) { + ListQueuesResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListQueuesResult = exports.ListQueuesResult || (exports.ListQueuesResult = {})); +var ListQueueTagsRequest; +(function (ListQueueTagsRequest) { + ListQueueTagsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListQueueTagsRequest = exports.ListQueueTagsRequest || (exports.ListQueueTagsRequest = {})); +var ListQueueTagsResult; +(function (ListQueueTagsResult) { + ListQueueTagsResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListQueueTagsResult = exports.ListQueueTagsResult || (exports.ListQueueTagsResult = {})); +var PurgeQueueInProgress; +(function (PurgeQueueInProgress) { + PurgeQueueInProgress.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PurgeQueueInProgress = exports.PurgeQueueInProgress || (exports.PurgeQueueInProgress = {})); +var PurgeQueueRequest; +(function (PurgeQueueRequest) { + PurgeQueueRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PurgeQueueRequest = exports.PurgeQueueRequest || (exports.PurgeQueueRequest = {})); +var ReceiveMessageRequest; +(function (ReceiveMessageRequest) { + ReceiveMessageRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReceiveMessageRequest = exports.ReceiveMessageRequest || (exports.ReceiveMessageRequest = {})); +var MessageAttributeValue; +(function (MessageAttributeValue) { + MessageAttributeValue.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MessageAttributeValue = exports.MessageAttributeValue || (exports.MessageAttributeValue = {})); +var Message; +(function (Message) { + Message.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Message = exports.Message || (exports.Message = {})); +var ReceiveMessageResult; +(function (ReceiveMessageResult) { + ReceiveMessageResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReceiveMessageResult = exports.ReceiveMessageResult || (exports.ReceiveMessageResult = {})); +var RemovePermissionRequest; +(function (RemovePermissionRequest) { + RemovePermissionRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RemovePermissionRequest = exports.RemovePermissionRequest || (exports.RemovePermissionRequest = {})); +var InvalidMessageContents; +(function (InvalidMessageContents) { + InvalidMessageContents.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidMessageContents = exports.InvalidMessageContents || (exports.InvalidMessageContents = {})); +var MessageSystemAttributeValue; +(function (MessageSystemAttributeValue) { + MessageSystemAttributeValue.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MessageSystemAttributeValue = exports.MessageSystemAttributeValue || (exports.MessageSystemAttributeValue = {})); +var SendMessageRequest; +(function (SendMessageRequest) { + SendMessageRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SendMessageRequest = exports.SendMessageRequest || (exports.SendMessageRequest = {})); +var SendMessageResult; +(function (SendMessageResult) { + SendMessageResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SendMessageResult = exports.SendMessageResult || (exports.SendMessageResult = {})); +var UnsupportedOperation; +(function (UnsupportedOperation) { + UnsupportedOperation.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnsupportedOperation = exports.UnsupportedOperation || (exports.UnsupportedOperation = {})); +var BatchRequestTooLong; +(function (BatchRequestTooLong) { + BatchRequestTooLong.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchRequestTooLong = exports.BatchRequestTooLong || (exports.BatchRequestTooLong = {})); +var SendMessageBatchRequestEntry; +(function (SendMessageBatchRequestEntry) { + SendMessageBatchRequestEntry.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SendMessageBatchRequestEntry = exports.SendMessageBatchRequestEntry || (exports.SendMessageBatchRequestEntry = {})); +var SendMessageBatchRequest; +(function (SendMessageBatchRequest) { + SendMessageBatchRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SendMessageBatchRequest = exports.SendMessageBatchRequest || (exports.SendMessageBatchRequest = {})); +var SendMessageBatchResultEntry; +(function (SendMessageBatchResultEntry) { + SendMessageBatchResultEntry.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SendMessageBatchResultEntry = exports.SendMessageBatchResultEntry || (exports.SendMessageBatchResultEntry = {})); +var SendMessageBatchResult; +(function (SendMessageBatchResult) { + SendMessageBatchResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SendMessageBatchResult = exports.SendMessageBatchResult || (exports.SendMessageBatchResult = {})); +var SetQueueAttributesRequest; +(function (SetQueueAttributesRequest) { + SetQueueAttributesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetQueueAttributesRequest = exports.SetQueueAttributesRequest || (exports.SetQueueAttributesRequest = {})); +var TagQueueRequest; +(function (TagQueueRequest) { + TagQueueRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TagQueueRequest = exports.TagQueueRequest || (exports.TagQueueRequest = {})); +var UntagQueueRequest; +(function (UntagQueueRequest) { + UntagQueueRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UntagQueueRequest = exports.UntagQueueRequest || (exports.UntagQueueRequest = {})); +//# sourceMappingURL=models_0.js.map + +/***/ }), + +/***/ 57090: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=Interfaces.js.map + +/***/ }), + +/***/ 90249: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListDeadLetterSourceQueues = void 0; +const SQS_1 = __nccwpck_require__(44221); +const SQSClient_1 = __nccwpck_require__(81509); +const ListDeadLetterSourceQueuesCommand_1 = __nccwpck_require__(66167); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListDeadLetterSourceQueuesCommand_1.ListDeadLetterSourceQueuesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listDeadLetterSourceQueues(input, ...args); +}; +async function* paginateListDeadLetterSourceQueues(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof SQS_1.SQS) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof SQSClient_1.SQSClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected SQS | SQSClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListDeadLetterSourceQueues = paginateListDeadLetterSourceQueues; +//# sourceMappingURL=ListDeadLetterSourceQueuesPaginator.js.map + +/***/ }), + +/***/ 84169: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListQueues = void 0; +const SQS_1 = __nccwpck_require__(44221); +const SQSClient_1 = __nccwpck_require__(81509); +const ListQueuesCommand_1 = __nccwpck_require__(41816); +/** + * @private + */ +const makePagedClientRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.send(new ListQueuesCommand_1.ListQueuesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async (client, input, ...args) => { + // @ts-ignore + return await client.listQueues(input, ...args); +}; +async function* paginateListQueues(config, input, ...additionalArguments) { + // ToDo: replace with actual type instead of typeof input.NextToken + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof SQS_1.SQS) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof SQSClient_1.SQSClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected SQS | SQSClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} +exports.paginateListQueues = paginateListQueues; +//# sourceMappingURL=ListQueuesPaginator.js.map + +/***/ }), + +/***/ 47377: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deserializeAws_queryUntagQueueCommand = exports.deserializeAws_queryTagQueueCommand = exports.deserializeAws_querySetQueueAttributesCommand = exports.deserializeAws_querySendMessageBatchCommand = exports.deserializeAws_querySendMessageCommand = exports.deserializeAws_queryRemovePermissionCommand = exports.deserializeAws_queryReceiveMessageCommand = exports.deserializeAws_queryPurgeQueueCommand = exports.deserializeAws_queryListQueueTagsCommand = exports.deserializeAws_queryListQueuesCommand = exports.deserializeAws_queryListDeadLetterSourceQueuesCommand = exports.deserializeAws_queryGetQueueUrlCommand = exports.deserializeAws_queryGetQueueAttributesCommand = exports.deserializeAws_queryDeleteQueueCommand = exports.deserializeAws_queryDeleteMessageBatchCommand = exports.deserializeAws_queryDeleteMessageCommand = exports.deserializeAws_queryCreateQueueCommand = exports.deserializeAws_queryChangeMessageVisibilityBatchCommand = exports.deserializeAws_queryChangeMessageVisibilityCommand = exports.deserializeAws_queryAddPermissionCommand = exports.serializeAws_queryUntagQueueCommand = exports.serializeAws_queryTagQueueCommand = exports.serializeAws_querySetQueueAttributesCommand = exports.serializeAws_querySendMessageBatchCommand = exports.serializeAws_querySendMessageCommand = exports.serializeAws_queryRemovePermissionCommand = exports.serializeAws_queryReceiveMessageCommand = exports.serializeAws_queryPurgeQueueCommand = exports.serializeAws_queryListQueueTagsCommand = exports.serializeAws_queryListQueuesCommand = exports.serializeAws_queryListDeadLetterSourceQueuesCommand = exports.serializeAws_queryGetQueueUrlCommand = exports.serializeAws_queryGetQueueAttributesCommand = exports.serializeAws_queryDeleteQueueCommand = exports.serializeAws_queryDeleteMessageBatchCommand = exports.serializeAws_queryDeleteMessageCommand = exports.serializeAws_queryCreateQueueCommand = exports.serializeAws_queryChangeMessageVisibilityBatchCommand = exports.serializeAws_queryChangeMessageVisibilityCommand = exports.serializeAws_queryAddPermissionCommand = void 0; +const protocol_http_1 = __nccwpck_require__(67498); +const smithy_client_1 = __nccwpck_require__(84060); +const fast_xml_parser_1 = __nccwpck_require__(27448); +const serializeAws_queryAddPermissionCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryAddPermissionRequest(input, context), + Action: "AddPermission", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryAddPermissionCommand = serializeAws_queryAddPermissionCommand; +const serializeAws_queryChangeMessageVisibilityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryChangeMessageVisibilityRequest(input, context), + Action: "ChangeMessageVisibility", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryChangeMessageVisibilityCommand = serializeAws_queryChangeMessageVisibilityCommand; +const serializeAws_queryChangeMessageVisibilityBatchCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryChangeMessageVisibilityBatchRequest(input, context), + Action: "ChangeMessageVisibilityBatch", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryChangeMessageVisibilityBatchCommand = serializeAws_queryChangeMessageVisibilityBatchCommand; +const serializeAws_queryCreateQueueCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryCreateQueueRequest(input, context), + Action: "CreateQueue", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryCreateQueueCommand = serializeAws_queryCreateQueueCommand; +const serializeAws_queryDeleteMessageCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDeleteMessageRequest(input, context), + Action: "DeleteMessage", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDeleteMessageCommand = serializeAws_queryDeleteMessageCommand; +const serializeAws_queryDeleteMessageBatchCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDeleteMessageBatchRequest(input, context), + Action: "DeleteMessageBatch", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDeleteMessageBatchCommand = serializeAws_queryDeleteMessageBatchCommand; +const serializeAws_queryDeleteQueueCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDeleteQueueRequest(input, context), + Action: "DeleteQueue", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDeleteQueueCommand = serializeAws_queryDeleteQueueCommand; +const serializeAws_queryGetQueueAttributesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryGetQueueAttributesRequest(input, context), + Action: "GetQueueAttributes", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryGetQueueAttributesCommand = serializeAws_queryGetQueueAttributesCommand; +const serializeAws_queryGetQueueUrlCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryGetQueueUrlRequest(input, context), + Action: "GetQueueUrl", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryGetQueueUrlCommand = serializeAws_queryGetQueueUrlCommand; +const serializeAws_queryListDeadLetterSourceQueuesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListDeadLetterSourceQueuesRequest(input, context), + Action: "ListDeadLetterSourceQueues", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListDeadLetterSourceQueuesCommand = serializeAws_queryListDeadLetterSourceQueuesCommand; +const serializeAws_queryListQueuesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListQueuesRequest(input, context), + Action: "ListQueues", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListQueuesCommand = serializeAws_queryListQueuesCommand; +const serializeAws_queryListQueueTagsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryListQueueTagsRequest(input, context), + Action: "ListQueueTags", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryListQueueTagsCommand = serializeAws_queryListQueueTagsCommand; +const serializeAws_queryPurgeQueueCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryPurgeQueueRequest(input, context), + Action: "PurgeQueue", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryPurgeQueueCommand = serializeAws_queryPurgeQueueCommand; +const serializeAws_queryReceiveMessageCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryReceiveMessageRequest(input, context), + Action: "ReceiveMessage", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryReceiveMessageCommand = serializeAws_queryReceiveMessageCommand; +const serializeAws_queryRemovePermissionCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryRemovePermissionRequest(input, context), + Action: "RemovePermission", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryRemovePermissionCommand = serializeAws_queryRemovePermissionCommand; +const serializeAws_querySendMessageCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_querySendMessageRequest(input, context), + Action: "SendMessage", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_querySendMessageCommand = serializeAws_querySendMessageCommand; +const serializeAws_querySendMessageBatchCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_querySendMessageBatchRequest(input, context), + Action: "SendMessageBatch", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_querySendMessageBatchCommand = serializeAws_querySendMessageBatchCommand; +const serializeAws_querySetQueueAttributesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_querySetQueueAttributesRequest(input, context), + Action: "SetQueueAttributes", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_querySetQueueAttributesCommand = serializeAws_querySetQueueAttributesCommand; +const serializeAws_queryTagQueueCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryTagQueueRequest(input, context), + Action: "TagQueue", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryTagQueueCommand = serializeAws_queryTagQueueCommand; +const serializeAws_queryUntagQueueCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryUntagQueueRequest(input, context), + Action: "UntagQueue", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryUntagQueueCommand = serializeAws_queryUntagQueueCommand; +const deserializeAws_queryAddPermissionCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryAddPermissionCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryAddPermissionCommand = deserializeAws_queryAddPermissionCommand; +const deserializeAws_queryAddPermissionCommandError = 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 "OverLimit": + case "com.amazonaws.sqs#OverLimit": + response = { + ...(await deserializeAws_queryOverLimitResponse(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_queryChangeMessageVisibilityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryChangeMessageVisibilityCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryChangeMessageVisibilityCommand = deserializeAws_queryChangeMessageVisibilityCommand; +const deserializeAws_queryChangeMessageVisibilityCommandError = 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 "MessageNotInflight": + case "com.amazonaws.sqs#MessageNotInflight": + response = { + ...(await deserializeAws_queryMessageNotInflightResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ReceiptHandleIsInvalid": + case "com.amazonaws.sqs#ReceiptHandleIsInvalid": + response = { + ...(await deserializeAws_queryReceiptHandleIsInvalidResponse(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_queryChangeMessageVisibilityBatchCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryChangeMessageVisibilityBatchCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryChangeMessageVisibilityBatchResult(data.ChangeMessageVisibilityBatchResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryChangeMessageVisibilityBatchCommand = deserializeAws_queryChangeMessageVisibilityBatchCommand; +const deserializeAws_queryChangeMessageVisibilityBatchCommandError = 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 "BatchEntryIdsNotDistinct": + case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": + response = { + ...(await deserializeAws_queryBatchEntryIdsNotDistinctResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "EmptyBatchRequest": + case "com.amazonaws.sqs#EmptyBatchRequest": + response = { + ...(await deserializeAws_queryEmptyBatchRequestResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidBatchEntryId": + case "com.amazonaws.sqs#InvalidBatchEntryId": + response = { + ...(await deserializeAws_queryInvalidBatchEntryIdResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyEntriesInBatchRequest": + case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": + response = { + ...(await deserializeAws_queryTooManyEntriesInBatchRequestResponse(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_queryCreateQueueCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryCreateQueueCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryCreateQueueResult(data.CreateQueueResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryCreateQueueCommand = deserializeAws_queryCreateQueueCommand; +const deserializeAws_queryCreateQueueCommandError = 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 "QueueDeletedRecently": + case "com.amazonaws.sqs#QueueDeletedRecently": + response = { + ...(await deserializeAws_queryQueueDeletedRecentlyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "QueueNameExists": + case "com.amazonaws.sqs#QueueNameExists": + response = { + ...(await deserializeAws_queryQueueNameExistsResponse(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_queryDeleteMessageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDeleteMessageCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDeleteMessageCommand = deserializeAws_queryDeleteMessageCommand; +const deserializeAws_queryDeleteMessageCommandError = 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 "InvalidIdFormat": + case "com.amazonaws.sqs#InvalidIdFormat": + response = { + ...(await deserializeAws_queryInvalidIdFormatResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ReceiptHandleIsInvalid": + case "com.amazonaws.sqs#ReceiptHandleIsInvalid": + response = { + ...(await deserializeAws_queryReceiptHandleIsInvalidResponse(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_queryDeleteMessageBatchCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDeleteMessageBatchCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDeleteMessageBatchResult(data.DeleteMessageBatchResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDeleteMessageBatchCommand = deserializeAws_queryDeleteMessageBatchCommand; +const deserializeAws_queryDeleteMessageBatchCommandError = 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 "BatchEntryIdsNotDistinct": + case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": + response = { + ...(await deserializeAws_queryBatchEntryIdsNotDistinctResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "EmptyBatchRequest": + case "com.amazonaws.sqs#EmptyBatchRequest": + response = { + ...(await deserializeAws_queryEmptyBatchRequestResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidBatchEntryId": + case "com.amazonaws.sqs#InvalidBatchEntryId": + response = { + ...(await deserializeAws_queryInvalidBatchEntryIdResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyEntriesInBatchRequest": + case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": + response = { + ...(await deserializeAws_queryTooManyEntriesInBatchRequestResponse(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_queryDeleteQueueCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDeleteQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDeleteQueueCommand = deserializeAws_queryDeleteQueueCommand; +const deserializeAws_queryDeleteQueueCommandError = 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_queryGetQueueAttributesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryGetQueueAttributesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryGetQueueAttributesResult(data.GetQueueAttributesResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryGetQueueAttributesCommand = deserializeAws_queryGetQueueAttributesCommand; +const deserializeAws_queryGetQueueAttributesCommandError = 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 "InvalidAttributeName": + case "com.amazonaws.sqs#InvalidAttributeName": + response = { + ...(await deserializeAws_queryInvalidAttributeNameResponse(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_queryGetQueueUrlCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryGetQueueUrlCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryGetQueueUrlResult(data.GetQueueUrlResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryGetQueueUrlCommand = deserializeAws_queryGetQueueUrlCommand; +const deserializeAws_queryGetQueueUrlCommandError = 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 "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + response = { + ...(await deserializeAws_queryQueueDoesNotExistResponse(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_queryListDeadLetterSourceQueuesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListDeadLetterSourceQueuesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListDeadLetterSourceQueuesResult(data.ListDeadLetterSourceQueuesResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListDeadLetterSourceQueuesCommand = deserializeAws_queryListDeadLetterSourceQueuesCommand; +const deserializeAws_queryListDeadLetterSourceQueuesCommandError = 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 "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + response = { + ...(await deserializeAws_queryQueueDoesNotExistResponse(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_queryListQueuesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListQueuesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListQueuesResult(data.ListQueuesResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListQueuesCommand = deserializeAws_queryListQueuesCommand; +const deserializeAws_queryListQueuesCommandError = 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_queryListQueueTagsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryListQueueTagsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryListQueueTagsResult(data.ListQueueTagsResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryListQueueTagsCommand = deserializeAws_queryListQueueTagsCommand; +const deserializeAws_queryListQueueTagsCommandError = 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_queryPurgeQueueCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryPurgeQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryPurgeQueueCommand = deserializeAws_queryPurgeQueueCommand; +const deserializeAws_queryPurgeQueueCommandError = 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 "PurgeQueueInProgress": + case "com.amazonaws.sqs#PurgeQueueInProgress": + response = { + ...(await deserializeAws_queryPurgeQueueInProgressResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + response = { + ...(await deserializeAws_queryQueueDoesNotExistResponse(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_queryReceiveMessageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryReceiveMessageCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryReceiveMessageResult(data.ReceiveMessageResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryReceiveMessageCommand = deserializeAws_queryReceiveMessageCommand; +const deserializeAws_queryReceiveMessageCommandError = 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 "OverLimit": + case "com.amazonaws.sqs#OverLimit": + response = { + ...(await deserializeAws_queryOverLimitResponse(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_queryRemovePermissionCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryRemovePermissionCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryRemovePermissionCommand = deserializeAws_queryRemovePermissionCommand; +const deserializeAws_queryRemovePermissionCommandError = 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_querySendMessageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_querySendMessageCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_querySendMessageResult(data.SendMessageResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_querySendMessageCommand = deserializeAws_querySendMessageCommand; +const deserializeAws_querySendMessageCommandError = 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 "InvalidMessageContents": + case "com.amazonaws.sqs#InvalidMessageContents": + response = { + ...(await deserializeAws_queryInvalidMessageContentsResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + response = { + ...(await deserializeAws_queryUnsupportedOperationResponse(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_querySendMessageBatchCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_querySendMessageBatchCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_querySendMessageBatchResult(data.SendMessageBatchResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_querySendMessageBatchCommand = deserializeAws_querySendMessageBatchCommand; +const deserializeAws_querySendMessageBatchCommandError = 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 "BatchEntryIdsNotDistinct": + case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": + response = { + ...(await deserializeAws_queryBatchEntryIdsNotDistinctResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "BatchRequestTooLong": + case "com.amazonaws.sqs#BatchRequestTooLong": + response = { + ...(await deserializeAws_queryBatchRequestTooLongResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "EmptyBatchRequest": + case "com.amazonaws.sqs#EmptyBatchRequest": + response = { + ...(await deserializeAws_queryEmptyBatchRequestResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidBatchEntryId": + case "com.amazonaws.sqs#InvalidBatchEntryId": + response = { + ...(await deserializeAws_queryInvalidBatchEntryIdResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyEntriesInBatchRequest": + case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": + response = { + ...(await deserializeAws_queryTooManyEntriesInBatchRequestResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + response = { + ...(await deserializeAws_queryUnsupportedOperationResponse(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_querySetQueueAttributesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_querySetQueueAttributesCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_querySetQueueAttributesCommand = deserializeAws_querySetQueueAttributesCommand; +const deserializeAws_querySetQueueAttributesCommandError = 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 "InvalidAttributeName": + case "com.amazonaws.sqs#InvalidAttributeName": + response = { + ...(await deserializeAws_queryInvalidAttributeNameResponse(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_queryTagQueueCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryTagQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryTagQueueCommand = deserializeAws_queryTagQueueCommand; +const deserializeAws_queryTagQueueCommandError = 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_queryUntagQueueCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryUntagQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryUntagQueueCommand = deserializeAws_queryUntagQueueCommand; +const deserializeAws_queryUntagQueueCommandError = 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_queryBatchEntryIdsNotDistinctResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryBatchEntryIdsNotDistinct(body.Error, context); + const contents = { + name: "BatchEntryIdsNotDistinct", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryBatchRequestTooLongResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryBatchRequestTooLong(body.Error, context); + const contents = { + name: "BatchRequestTooLong", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryEmptyBatchRequestResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryEmptyBatchRequest(body.Error, context); + const contents = { + name: "EmptyBatchRequest", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryInvalidAttributeNameResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryInvalidAttributeName(body.Error, context); + const contents = { + name: "InvalidAttributeName", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryInvalidBatchEntryIdResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryInvalidBatchEntryId(body.Error, context); + const contents = { + name: "InvalidBatchEntryId", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryInvalidIdFormatResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryInvalidIdFormat(body.Error, context); + const contents = { + name: "InvalidIdFormat", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryInvalidMessageContentsResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryInvalidMessageContents(body.Error, context); + const contents = { + name: "InvalidMessageContents", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryMessageNotInflightResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryMessageNotInflight(body.Error, context); + const contents = { + name: "MessageNotInflight", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryOverLimitResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryOverLimit(body.Error, context); + const contents = { + name: "OverLimit", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryPurgeQueueInProgressResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryPurgeQueueInProgress(body.Error, context); + const contents = { + name: "PurgeQueueInProgress", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryQueueDeletedRecentlyResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryQueueDeletedRecently(body.Error, context); + const contents = { + name: "QueueDeletedRecently", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryQueueDoesNotExistResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryQueueDoesNotExist(body.Error, context); + const contents = { + name: "QueueDoesNotExist", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryQueueNameExistsResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryQueueNameExists(body.Error, context); + const contents = { + name: "QueueNameExists", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryReceiptHandleIsInvalidResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryReceiptHandleIsInvalid(body.Error, context); + const contents = { + name: "ReceiptHandleIsInvalid", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryTooManyEntriesInBatchRequestResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryTooManyEntriesInBatchRequest(body.Error, context); + const contents = { + name: "TooManyEntriesInBatchRequest", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryUnsupportedOperationResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryUnsupportedOperation(body.Error, context); + const contents = { + name: "UnsupportedOperation", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const serializeAws_queryActionNameList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryAddPermissionRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Label !== undefined && input.Label !== null) { + entries["Label"] = input.Label; + } + if (input.AWSAccountIds !== undefined && input.AWSAccountIds !== null) { + const memberEntries = serializeAws_queryAWSAccountIdList(input.AWSAccountIds, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `AWSAccountId.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.Actions !== undefined && input.Actions !== null) { + const memberEntries = serializeAws_queryActionNameList(input.Actions, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ActionName.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryAttributeNameList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryAWSAccountIdList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryBinaryList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`BinaryListValue.${counter}`] = context.base64Encoder(entry); + counter++; + } + return entries; +}; +const serializeAws_queryChangeMessageVisibilityBatchRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Entries !== undefined && input.Entries !== null) { + const memberEntries = serializeAws_queryChangeMessageVisibilityBatchRequestEntryList(input.Entries, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ChangeMessageVisibilityBatchRequestEntry.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryChangeMessageVisibilityBatchRequestEntry = (input, context) => { + const entries = {}; + if (input.Id !== undefined && input.Id !== null) { + entries["Id"] = input.Id; + } + if (input.ReceiptHandle !== undefined && input.ReceiptHandle !== null) { + entries["ReceiptHandle"] = input.ReceiptHandle; + } + if (input.VisibilityTimeout !== undefined && input.VisibilityTimeout !== null) { + entries["VisibilityTimeout"] = input.VisibilityTimeout; + } + return entries; +}; +const serializeAws_queryChangeMessageVisibilityBatchRequestEntryList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + const memberEntries = serializeAws_queryChangeMessageVisibilityBatchRequestEntry(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const serializeAws_queryChangeMessageVisibilityRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.ReceiptHandle !== undefined && input.ReceiptHandle !== null) { + entries["ReceiptHandle"] = input.ReceiptHandle; + } + if (input.VisibilityTimeout !== undefined && input.VisibilityTimeout !== null) { + entries["VisibilityTimeout"] = input.VisibilityTimeout; + } + return entries; +}; +const serializeAws_queryCreateQueueRequest = (input, context) => { + const entries = {}; + if (input.QueueName !== undefined && input.QueueName !== null) { + entries["QueueName"] = input.QueueName; + } + if (input.tags !== undefined && input.tags !== null) { + const memberEntries = serializeAws_queryTagMap(input.tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tag.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.Attributes !== undefined && input.Attributes !== null) { + const memberEntries = serializeAws_queryQueueAttributeMap(input.Attributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Attribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryDeleteMessageBatchRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Entries !== undefined && input.Entries !== null) { + const memberEntries = serializeAws_queryDeleteMessageBatchRequestEntryList(input.Entries, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `DeleteMessageBatchRequestEntry.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryDeleteMessageBatchRequestEntry = (input, context) => { + const entries = {}; + if (input.Id !== undefined && input.Id !== null) { + entries["Id"] = input.Id; + } + if (input.ReceiptHandle !== undefined && input.ReceiptHandle !== null) { + entries["ReceiptHandle"] = input.ReceiptHandle; + } + return entries; +}; +const serializeAws_queryDeleteMessageBatchRequestEntryList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + const memberEntries = serializeAws_queryDeleteMessageBatchRequestEntry(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const serializeAws_queryDeleteMessageRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.ReceiptHandle !== undefined && input.ReceiptHandle !== null) { + entries["ReceiptHandle"] = input.ReceiptHandle; + } + return entries; +}; +const serializeAws_queryDeleteQueueRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + return entries; +}; +const serializeAws_queryGetQueueAttributesRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.AttributeNames !== undefined && input.AttributeNames !== null) { + const memberEntries = serializeAws_queryAttributeNameList(input.AttributeNames, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `AttributeName.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryGetQueueUrlRequest = (input, context) => { + const entries = {}; + if (input.QueueName !== undefined && input.QueueName !== null) { + entries["QueueName"] = input.QueueName; + } + if (input.QueueOwnerAWSAccountId !== undefined && input.QueueOwnerAWSAccountId !== null) { + entries["QueueOwnerAWSAccountId"] = input.QueueOwnerAWSAccountId; + } + return entries; +}; +const serializeAws_queryListDeadLetterSourceQueuesRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + if (input.MaxResults !== undefined && input.MaxResults !== null) { + entries["MaxResults"] = input.MaxResults; + } + return entries; +}; +const serializeAws_queryListQueuesRequest = (input, context) => { + const entries = {}; + if (input.QueueNamePrefix !== undefined && input.QueueNamePrefix !== null) { + entries["QueueNamePrefix"] = input.QueueNamePrefix; + } + if (input.NextToken !== undefined && input.NextToken !== null) { + entries["NextToken"] = input.NextToken; + } + if (input.MaxResults !== undefined && input.MaxResults !== null) { + entries["MaxResults"] = input.MaxResults; + } + return entries; +}; +const serializeAws_queryListQueueTagsRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + return entries; +}; +const serializeAws_queryMessageAttributeNameList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryMessageAttributeValue = (input, context) => { + const entries = {}; + if (input.StringValue !== undefined && input.StringValue !== null) { + entries["StringValue"] = input.StringValue; + } + if (input.BinaryValue !== undefined && input.BinaryValue !== null) { + entries["BinaryValue"] = context.base64Encoder(input.BinaryValue); + } + if (input.StringListValues !== undefined && input.StringListValues !== null) { + const memberEntries = serializeAws_queryStringList(input.StringListValues, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `StringListValue.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.BinaryListValues !== undefined && input.BinaryListValues !== null) { + const memberEntries = serializeAws_queryBinaryList(input.BinaryListValues, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `BinaryListValue.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.DataType !== undefined && input.DataType !== null) { + entries["DataType"] = input.DataType; + } + return entries; +}; +const serializeAws_queryMessageBodyAttributeMap = (input, context) => { + const entries = {}; + let counter = 1; + Object.keys(input) + .filter((key) => input[key] != null) + .forEach((key) => { + entries[`entry.${counter}.Name`] = key; + const memberEntries = serializeAws_queryMessageAttributeValue(input[key], context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`entry.${counter}.Value.${key}`] = value; + }); + counter++; + }); + return entries; +}; +const serializeAws_queryMessageBodySystemAttributeMap = (input, context) => { + const entries = {}; + let counter = 1; + Object.keys(input) + .filter((key) => input[key] != null) + .forEach((key) => { + entries[`entry.${counter}.Name`] = key; + const memberEntries = serializeAws_queryMessageSystemAttributeValue(input[key], context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`entry.${counter}.Value.${key}`] = value; + }); + counter++; + }); + return entries; +}; +const serializeAws_queryMessageSystemAttributeValue = (input, context) => { + const entries = {}; + if (input.StringValue !== undefined && input.StringValue !== null) { + entries["StringValue"] = input.StringValue; + } + if (input.BinaryValue !== undefined && input.BinaryValue !== null) { + entries["BinaryValue"] = context.base64Encoder(input.BinaryValue); + } + if (input.StringListValues !== undefined && input.StringListValues !== null) { + const memberEntries = serializeAws_queryStringList(input.StringListValues, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `StringListValue.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.BinaryListValues !== undefined && input.BinaryListValues !== null) { + const memberEntries = serializeAws_queryBinaryList(input.BinaryListValues, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `BinaryListValue.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.DataType !== undefined && input.DataType !== null) { + entries["DataType"] = input.DataType; + } + return entries; +}; +const serializeAws_queryPurgeQueueRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + return entries; +}; +const serializeAws_queryQueueAttributeMap = (input, context) => { + const entries = {}; + let counter = 1; + Object.keys(input) + .filter((key) => input[key] != null) + .forEach((key) => { + entries[`entry.${counter}.Name`] = key; + entries[`entry.${counter}.Value`] = input[key]; + counter++; + }); + return entries; +}; +const serializeAws_queryReceiveMessageRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.AttributeNames !== undefined && input.AttributeNames !== null) { + const memberEntries = serializeAws_queryAttributeNameList(input.AttributeNames, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `AttributeName.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MessageAttributeNames !== undefined && input.MessageAttributeNames !== null) { + const memberEntries = serializeAws_queryMessageAttributeNameList(input.MessageAttributeNames, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageAttributeName.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MaxNumberOfMessages !== undefined && input.MaxNumberOfMessages !== null) { + entries["MaxNumberOfMessages"] = input.MaxNumberOfMessages; + } + if (input.VisibilityTimeout !== undefined && input.VisibilityTimeout !== null) { + entries["VisibilityTimeout"] = input.VisibilityTimeout; + } + if (input.WaitTimeSeconds !== undefined && input.WaitTimeSeconds !== null) { + entries["WaitTimeSeconds"] = input.WaitTimeSeconds; + } + if (input.ReceiveRequestAttemptId !== undefined && input.ReceiveRequestAttemptId !== null) { + entries["ReceiveRequestAttemptId"] = input.ReceiveRequestAttemptId; + } + return entries; +}; +const serializeAws_queryRemovePermissionRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Label !== undefined && input.Label !== null) { + entries["Label"] = input.Label; + } + return entries; +}; +const serializeAws_querySendMessageBatchRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Entries !== undefined && input.Entries !== null) { + const memberEntries = serializeAws_querySendMessageBatchRequestEntryList(input.Entries, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `SendMessageBatchRequestEntry.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_querySendMessageBatchRequestEntry = (input, context) => { + const entries = {}; + if (input.Id !== undefined && input.Id !== null) { + entries["Id"] = input.Id; + } + if (input.MessageBody !== undefined && input.MessageBody !== null) { + entries["MessageBody"] = input.MessageBody; + } + if (input.DelaySeconds !== undefined && input.DelaySeconds !== null) { + entries["DelaySeconds"] = input.DelaySeconds; + } + if (input.MessageAttributes !== undefined && input.MessageAttributes !== null) { + const memberEntries = serializeAws_queryMessageBodyAttributeMap(input.MessageAttributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageAttribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MessageSystemAttributes !== undefined && input.MessageSystemAttributes !== null) { + const memberEntries = serializeAws_queryMessageBodySystemAttributeMap(input.MessageSystemAttributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageSystemAttribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MessageDeduplicationId !== undefined && input.MessageDeduplicationId !== null) { + entries["MessageDeduplicationId"] = input.MessageDeduplicationId; + } + if (input.MessageGroupId !== undefined && input.MessageGroupId !== null) { + entries["MessageGroupId"] = input.MessageGroupId; + } + return entries; +}; +const serializeAws_querySendMessageBatchRequestEntryList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + const memberEntries = serializeAws_querySendMessageBatchRequestEntry(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const serializeAws_querySendMessageRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.MessageBody !== undefined && input.MessageBody !== null) { + entries["MessageBody"] = input.MessageBody; + } + if (input.DelaySeconds !== undefined && input.DelaySeconds !== null) { + entries["DelaySeconds"] = input.DelaySeconds; + } + if (input.MessageAttributes !== undefined && input.MessageAttributes !== null) { + const memberEntries = serializeAws_queryMessageBodyAttributeMap(input.MessageAttributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageAttribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MessageSystemAttributes !== undefined && input.MessageSystemAttributes !== null) { + const memberEntries = serializeAws_queryMessageBodySystemAttributeMap(input.MessageSystemAttributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageSystemAttribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MessageDeduplicationId !== undefined && input.MessageDeduplicationId !== null) { + entries["MessageDeduplicationId"] = input.MessageDeduplicationId; + } + if (input.MessageGroupId !== undefined && input.MessageGroupId !== null) { + entries["MessageGroupId"] = input.MessageGroupId; + } + return entries; +}; +const serializeAws_querySetQueueAttributesRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Attributes !== undefined && input.Attributes !== null) { + const memberEntries = serializeAws_queryQueueAttributeMap(input.Attributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Attribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryStringList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`StringListValue.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryTagKeyList = (input, context) => { + const entries = {}; + let counter = 1; + for (let entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_queryTagMap = (input, context) => { + const entries = {}; + let counter = 1; + Object.keys(input) + .filter((key) => input[key] != null) + .forEach((key) => { + entries[`entry.${counter}.Key`] = key; + entries[`entry.${counter}.Value`] = input[key]; + counter++; + }); + return entries; +}; +const serializeAws_queryTagQueueRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Tags !== undefined && input.Tags !== null) { + const memberEntries = serializeAws_queryTagMap(input.Tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tag.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryUntagQueueRequest = (input, context) => { + const entries = {}; + if (input.QueueUrl !== undefined && input.QueueUrl !== null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.TagKeys !== undefined && input.TagKeys !== null) { + const memberEntries = serializeAws_queryTagKeyList(input.TagKeys, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TagKey.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; +const deserializeAws_queryBatchEntryIdsNotDistinct = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryBatchRequestTooLong = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryBatchResultErrorEntry = (output, context) => { + let contents = { + Id: undefined, + SenderFault: undefined, + Code: undefined, + Message: undefined, + }; + if (output["Id"] !== undefined) { + contents.Id = output["Id"]; + } + if (output["SenderFault"] !== undefined) { + contents.SenderFault = output["SenderFault"] == "true"; + } + if (output["Code"] !== undefined) { + contents.Code = output["Code"]; + } + if (output["Message"] !== undefined) { + contents.Message = output["Message"]; + } + return contents; +}; +const deserializeAws_queryBatchResultErrorEntryList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryBatchResultErrorEntry(entry, context); + }); +}; +const deserializeAws_queryBinaryList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return context.base64Decoder(entry); + }); +}; +const deserializeAws_queryChangeMessageVisibilityBatchResult = (output, context) => { + let contents = { + Successful: undefined, + Failed: undefined, + }; + if (output.ChangeMessageVisibilityBatchResultEntry === "") { + contents.Successful = []; + } + if (output["ChangeMessageVisibilityBatchResultEntry"] !== undefined) { + contents.Successful = deserializeAws_queryChangeMessageVisibilityBatchResultEntryList(smithy_client_1.getArrayIfSingleItem(output["ChangeMessageVisibilityBatchResultEntry"]), context); + } + if (output.BatchResultErrorEntry === "") { + contents.Failed = []; + } + if (output["BatchResultErrorEntry"] !== undefined) { + contents.Failed = deserializeAws_queryBatchResultErrorEntryList(smithy_client_1.getArrayIfSingleItem(output["BatchResultErrorEntry"]), context); + } + return contents; +}; +const deserializeAws_queryChangeMessageVisibilityBatchResultEntry = (output, context) => { + let contents = { + Id: undefined, + }; + if (output["Id"] !== undefined) { + contents.Id = output["Id"]; + } + return contents; +}; +const deserializeAws_queryChangeMessageVisibilityBatchResultEntryList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryChangeMessageVisibilityBatchResultEntry(entry, context); + }); +}; +const deserializeAws_queryCreateQueueResult = (output, context) => { + let contents = { + QueueUrl: undefined, + }; + if (output["QueueUrl"] !== undefined) { + contents.QueueUrl = output["QueueUrl"]; + } + return contents; +}; +const deserializeAws_queryDeleteMessageBatchResult = (output, context) => { + let contents = { + Successful: undefined, + Failed: undefined, + }; + if (output.DeleteMessageBatchResultEntry === "") { + contents.Successful = []; + } + if (output["DeleteMessageBatchResultEntry"] !== undefined) { + contents.Successful = deserializeAws_queryDeleteMessageBatchResultEntryList(smithy_client_1.getArrayIfSingleItem(output["DeleteMessageBatchResultEntry"]), context); + } + if (output.BatchResultErrorEntry === "") { + contents.Failed = []; + } + if (output["BatchResultErrorEntry"] !== undefined) { + contents.Failed = deserializeAws_queryBatchResultErrorEntryList(smithy_client_1.getArrayIfSingleItem(output["BatchResultErrorEntry"]), context); + } + return contents; +}; +const deserializeAws_queryDeleteMessageBatchResultEntry = (output, context) => { + let contents = { + Id: undefined, + }; + if (output["Id"] !== undefined) { + contents.Id = output["Id"]; + } + return contents; +}; +const deserializeAws_queryDeleteMessageBatchResultEntryList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryDeleteMessageBatchResultEntry(entry, context); + }); +}; +const deserializeAws_queryEmptyBatchRequest = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryGetQueueAttributesResult = (output, context) => { + let contents = { + Attributes: undefined, + }; + if (output.Attribute === "") { + contents.Attributes = {}; + } + if (output["Attribute"] !== undefined) { + contents.Attributes = deserializeAws_queryQueueAttributeMap(smithy_client_1.getArrayIfSingleItem(output["Attribute"]), context); + } + return contents; +}; +const deserializeAws_queryGetQueueUrlResult = (output, context) => { + let contents = { + QueueUrl: undefined, + }; + if (output["QueueUrl"] !== undefined) { + contents.QueueUrl = output["QueueUrl"]; + } + return contents; +}; +const deserializeAws_queryInvalidAttributeName = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryInvalidBatchEntryId = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryInvalidIdFormat = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryInvalidMessageContents = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryListDeadLetterSourceQueuesResult = (output, context) => { + let contents = { + queueUrls: undefined, + NextToken: undefined, + }; + if (output.QueueUrl === "") { + contents.queueUrls = []; + } + if (output["QueueUrl"] !== undefined) { + contents.queueUrls = deserializeAws_queryQueueUrlList(smithy_client_1.getArrayIfSingleItem(output["QueueUrl"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + return contents; +}; +const deserializeAws_queryListQueuesResult = (output, context) => { + let contents = { + NextToken: undefined, + QueueUrls: undefined, + }; + if (output["NextToken"] !== undefined) { + contents.NextToken = output["NextToken"]; + } + if (output.QueueUrl === "") { + contents.QueueUrls = []; + } + if (output["QueueUrl"] !== undefined) { + contents.QueueUrls = deserializeAws_queryQueueUrlList(smithy_client_1.getArrayIfSingleItem(output["QueueUrl"]), context); + } + return contents; +}; +const deserializeAws_queryListQueueTagsResult = (output, context) => { + let contents = { + Tags: undefined, + }; + if (output.Tag === "") { + contents.Tags = {}; + } + if (output["Tag"] !== undefined) { + contents.Tags = deserializeAws_queryTagMap(smithy_client_1.getArrayIfSingleItem(output["Tag"]), context); + } + return contents; +}; +const deserializeAws_queryMessage = (output, context) => { + let contents = { + MessageId: undefined, + ReceiptHandle: undefined, + MD5OfBody: undefined, + Body: undefined, + Attributes: undefined, + MD5OfMessageAttributes: undefined, + MessageAttributes: undefined, + }; + if (output["MessageId"] !== undefined) { + contents.MessageId = output["MessageId"]; + } + if (output["ReceiptHandle"] !== undefined) { + contents.ReceiptHandle = output["ReceiptHandle"]; + } + if (output["MD5OfBody"] !== undefined) { + contents.MD5OfBody = output["MD5OfBody"]; + } + if (output["Body"] !== undefined) { + contents.Body = output["Body"]; + } + if (output.Attribute === "") { + contents.Attributes = {}; + } + if (output["Attribute"] !== undefined) { + contents.Attributes = deserializeAws_queryMessageSystemAttributeMap(smithy_client_1.getArrayIfSingleItem(output["Attribute"]), context); + } + if (output["MD5OfMessageAttributes"] !== undefined) { + contents.MD5OfMessageAttributes = output["MD5OfMessageAttributes"]; + } + if (output.MessageAttribute === "") { + contents.MessageAttributes = {}; + } + if (output["MessageAttribute"] !== undefined) { + contents.MessageAttributes = deserializeAws_queryMessageBodyAttributeMap(smithy_client_1.getArrayIfSingleItem(output["MessageAttribute"]), context); + } + return contents; +}; +const deserializeAws_queryMessageAttributeValue = (output, context) => { + let contents = { + StringValue: undefined, + BinaryValue: undefined, + StringListValues: undefined, + BinaryListValues: undefined, + DataType: undefined, + }; + if (output["StringValue"] !== undefined) { + contents.StringValue = output["StringValue"]; + } + if (output["BinaryValue"] !== undefined) { + contents.BinaryValue = context.base64Decoder(output["BinaryValue"]); + } + if (output.StringListValue === "") { + contents.StringListValues = []; + } + if (output["StringListValue"] !== undefined) { + contents.StringListValues = deserializeAws_queryStringList(smithy_client_1.getArrayIfSingleItem(output["StringListValue"]), context); + } + if (output.BinaryListValue === "") { + contents.BinaryListValues = []; + } + if (output["BinaryListValue"] !== undefined) { + contents.BinaryListValues = deserializeAws_queryBinaryList(smithy_client_1.getArrayIfSingleItem(output["BinaryListValue"]), context); + } + if (output["DataType"] !== undefined) { + contents.DataType = output["DataType"]; + } + return contents; +}; +const deserializeAws_queryMessageBodyAttributeMap = (output, context) => { + return output.reduce((acc, pair) => { + if (pair["Value"] === null) { + return acc; + } + return { + ...acc, + [pair["Name"]]: deserializeAws_queryMessageAttributeValue(pair["Value"], context), + }; + }, {}); +}; +const deserializeAws_queryMessageList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_queryMessage(entry, context); + }); +}; +const deserializeAws_queryMessageNotInflight = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryMessageSystemAttributeMap = (output, context) => { + return output.reduce((acc, pair) => { + if (pair["Value"] === null) { + return acc; + } + return { + ...acc, + [pair["Name"]]: pair["Value"], + }; + }, {}); +}; +const deserializeAws_queryOverLimit = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryPurgeQueueInProgress = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryQueueAttributeMap = (output, context) => { + return output.reduce((acc, pair) => { + if (pair["Value"] === null) { + return acc; + } + return { + ...acc, + [pair["Name"]]: pair["Value"], + }; + }, {}); +}; +const deserializeAws_queryQueueDeletedRecently = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryQueueDoesNotExist = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryQueueNameExists = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryQueueUrlList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryReceiptHandleIsInvalid = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryReceiveMessageResult = (output, context) => { + let contents = { + Messages: undefined, + }; + if (output.Message === "") { + contents.Messages = []; + } + if (output["Message"] !== undefined) { + contents.Messages = deserializeAws_queryMessageList(smithy_client_1.getArrayIfSingleItem(output["Message"]), context); + } + return contents; +}; +const deserializeAws_querySendMessageBatchResult = (output, context) => { + let contents = { + Successful: undefined, + Failed: undefined, + }; + if (output.SendMessageBatchResultEntry === "") { + contents.Successful = []; + } + if (output["SendMessageBatchResultEntry"] !== undefined) { + contents.Successful = deserializeAws_querySendMessageBatchResultEntryList(smithy_client_1.getArrayIfSingleItem(output["SendMessageBatchResultEntry"]), context); + } + if (output.BatchResultErrorEntry === "") { + contents.Failed = []; + } + if (output["BatchResultErrorEntry"] !== undefined) { + contents.Failed = deserializeAws_queryBatchResultErrorEntryList(smithy_client_1.getArrayIfSingleItem(output["BatchResultErrorEntry"]), context); + } + return contents; +}; +const deserializeAws_querySendMessageBatchResultEntry = (output, context) => { + let contents = { + Id: undefined, + MessageId: undefined, + MD5OfMessageBody: undefined, + MD5OfMessageAttributes: undefined, + MD5OfMessageSystemAttributes: undefined, + SequenceNumber: undefined, + }; + if (output["Id"] !== undefined) { + contents.Id = output["Id"]; + } + if (output["MessageId"] !== undefined) { + contents.MessageId = output["MessageId"]; + } + if (output["MD5OfMessageBody"] !== undefined) { + contents.MD5OfMessageBody = output["MD5OfMessageBody"]; + } + if (output["MD5OfMessageAttributes"] !== undefined) { + contents.MD5OfMessageAttributes = output["MD5OfMessageAttributes"]; + } + if (output["MD5OfMessageSystemAttributes"] !== undefined) { + contents.MD5OfMessageSystemAttributes = output["MD5OfMessageSystemAttributes"]; + } + if (output["SequenceNumber"] !== undefined) { + contents.SequenceNumber = output["SequenceNumber"]; + } + return contents; +}; +const deserializeAws_querySendMessageBatchResultEntryList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_querySendMessageBatchResultEntry(entry, context); + }); +}; +const deserializeAws_querySendMessageResult = (output, context) => { + let contents = { + MD5OfMessageBody: undefined, + MD5OfMessageAttributes: undefined, + MD5OfMessageSystemAttributes: undefined, + MessageId: undefined, + SequenceNumber: undefined, + }; + if (output["MD5OfMessageBody"] !== undefined) { + contents.MD5OfMessageBody = output["MD5OfMessageBody"]; + } + if (output["MD5OfMessageAttributes"] !== undefined) { + contents.MD5OfMessageAttributes = output["MD5OfMessageAttributes"]; + } + if (output["MD5OfMessageSystemAttributes"] !== undefined) { + contents.MD5OfMessageSystemAttributes = output["MD5OfMessageSystemAttributes"]; + } + if (output["MessageId"] !== undefined) { + contents.MessageId = output["MessageId"]; + } + if (output["SequenceNumber"] !== undefined) { + contents.SequenceNumber = output["SequenceNumber"]; + } + return contents; +}; +const deserializeAws_queryStringList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const deserializeAws_queryTagMap = (output, context) => { + return output.reduce((acc, pair) => { + if (pair["Value"] === null) { + return acc; + } + return { + ...acc, + [pair["Key"]]: pair["Value"], + }; + }, {}); +}; +const deserializeAws_queryTooManyEntriesInBatchRequest = (output, context) => { + let contents = {}; + return contents; +}; +const deserializeAws_queryUnsupportedOperation = (output, context) => { + let contents = {}; + 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"], + }); +}; +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; +// Encode Uint8Array data into string with utf-8. +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 } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new protocol_http_1.HttpRequest(contents); +}; +const decodeEscapedXML = (str) => str + .replace(/&/g, "&") + .replace(/'/g, "'") + .replace(/"/g, '"') + .replace(/>/g, ">") + .replace(/</g, "<"); +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, + tagValueProcessor: (val, tagName) => decodeEscapedXML(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 ""; +}; +//# sourceMappingURL=Aws_query.js.map + +/***/ }), + +/***/ 43294: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientDefaultValues = void 0; +const tslib_1 = __nccwpck_require__(27542); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(73021)); +const config_resolver_1 = __nccwpck_require__(87229); +const credential_provider_node_1 = __nccwpck_require__(98030); +const hash_node_1 = __nccwpck_require__(90791); +const middleware_retry_1 = __nccwpck_require__(7000); +const node_config_provider_1 = __nccwpck_require__(71124); +const node_http_handler_1 = __nccwpck_require__(15168); +const util_base64_node_1 = __nccwpck_require__(2091); +const util_body_length_node_1 = __nccwpck_require__(40286); +const util_user_agent_node_1 = __nccwpck_require__(64717); +const util_utf8_node_1 = __nccwpck_require__(85227); +const runtimeConfig_shared_1 = __nccwpck_require__(2885); +/** + * @internal + */ +exports.ClientDefaultValues = { + ...runtimeConfig_shared_1.ClientSharedValues, + runtime: "node", + base64Decoder: util_base64_node_1.fromBase64, + base64Encoder: util_base64_node_1.toBase64, + bodyLengthChecker: util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: util_user_agent_node_1.defaultUserAgent({ + serviceId: runtimeConfig_shared_1.ClientSharedValues.serviceId, + clientVersion: package_json_1.default.version, + }), + maxAttempts: node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + md5: hash_node_1.Hash.bind(null, "md5"), + region: node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: new node_http_handler_1.NodeHttpHandler(), + sha256: hash_node_1.Hash.bind(null, "sha256"), + streamCollector: node_http_handler_1.streamCollector, + utf8Decoder: util_utf8_node_1.fromUtf8, + utf8Encoder: util_utf8_node_1.toUtf8, +}; +//# sourceMappingURL=runtimeConfig.js.map + +/***/ }), + +/***/ 2885: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientSharedValues = void 0; +const endpoints_1 = __nccwpck_require__(86883); +const url_parser_1 = __nccwpck_require__(99427); +/** + * @internal + */ +exports.ClientSharedValues = { + apiVersion: "2012-11-05", + disableHostPrefix: false, + logger: {}, + regionInfoProvider: endpoints_1.defaultRegionInfoProvider, + serviceId: "SQS", + urlParser: url_parser_1.parseUrl, +}; +//# sourceMappingURL=runtimeConfig.shared.js.map + +/***/ }), + +/***/ 27542: +/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +__nccwpck_require__.r(__webpack_exports__); +/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { +/* harmony export */ "__extends": () => /* binding */ __extends, +/* harmony export */ "__assign": () => /* binding */ __assign, +/* harmony export */ "__rest": () => /* binding */ __rest, +/* harmony export */ "__decorate": () => /* binding */ __decorate, +/* harmony export */ "__param": () => /* binding */ __param, +/* harmony export */ "__metadata": () => /* binding */ __metadata, +/* harmony export */ "__awaiter": () => /* binding */ __awaiter, +/* harmony export */ "__generator": () => /* binding */ __generator, +/* harmony export */ "__createBinding": () => /* binding */ __createBinding, +/* harmony export */ "__exportStar": () => /* binding */ __exportStar, +/* harmony export */ "__values": () => /* binding */ __values, +/* harmony export */ "__read": () => /* binding */ __read, +/* harmony export */ "__spread": () => /* binding */ __spread, +/* harmony export */ "__spreadArrays": () => /* binding */ __spreadArrays, +/* harmony export */ "__spreadArray": () => /* binding */ __spreadArray, +/* harmony export */ "__await": () => /* binding */ __await, +/* harmony export */ "__asyncGenerator": () => /* binding */ __asyncGenerator, +/* harmony export */ "__asyncDelegator": () => /* binding */ __asyncDelegator, +/* harmony export */ "__asyncValues": () => /* binding */ __asyncValues, +/* harmony export */ "__makeTemplateObject": () => /* binding */ __makeTemplateObject, +/* harmony export */ "__importStar": () => /* binding */ __importStar, +/* harmony export */ "__importDefault": () => /* binding */ __importDefault, +/* harmony export */ "__classPrivateFieldGet": () => /* binding */ __classPrivateFieldGet, +/* harmony export */ "__classPrivateFieldSet": () => /* binding */ __classPrivateFieldSet +/* harmony export */ }); +/*! ***************************************************************************** +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 Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + 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 }; + } +} + +var __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]; +}); + +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function __spreadArray(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, 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]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function __importStar(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; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} + + +/***/ }), + +/***/ 53853: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.STS = void 0; +const STSClient_1 = __nccwpck_require__(22316); +const AssumeRoleCommand_1 = __nccwpck_require__(83638); +const AssumeRoleWithSAMLCommand_1 = __nccwpck_require__(80550); +const AssumeRoleWithWebIdentityCommand_1 = __nccwpck_require__(51733); +const DecodeAuthorizationMessageCommand_1 = __nccwpck_require__(99448); +const GetAccessKeyInfoCommand_1 = __nccwpck_require__(64317); +const GetCallerIdentityCommand_1 = __nccwpck_require__(47515); +const GetFederationTokenCommand_1 = __nccwpck_require__(35239); +const GetSessionTokenCommand_1 = __nccwpck_require__(26499); +/** + * AWS Security Token Service + *

AWS Security Token Service (STS) enables you to request temporary, limited-privilege + * credentials for AWS Identity and Access Management (IAM) users or for users that you + * authenticate (federated users). This guide provides descriptions of the STS API. For + * more information about using this service, see Temporary Security Credentials.

+ */ +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; +//# sourceMappingURL=STS.js.map + +/***/ }), + +/***/ 22316: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.STSClient = void 0; +const runtimeConfig_1 = __nccwpck_require__(4675); +const config_resolver_1 = __nccwpck_require__(87229); +const middleware_content_length_1 = __nccwpck_require__(69323); +const middleware_host_header_1 = __nccwpck_require__(58645); +const middleware_logger_1 = __nccwpck_require__(98685); +const middleware_retry_1 = __nccwpck_require__(7000); +const middleware_signing_1 = __nccwpck_require__(82487); +const middleware_user_agent_1 = __nccwpck_require__(55976); +const smithy_client_1 = __nccwpck_require__(84060); +/** + * AWS Security Token Service + *

AWS Security Token Service (STS) enables you to request temporary, limited-privilege + * credentials for AWS Identity and Access Management (IAM) users or for users that you + * authenticate (federated users). This guide provides descriptions of the STS API. For + * more information about using this service, see Temporary Security Credentials.

+ */ +class STSClient extends smithy_client_1.Client { + constructor(configuration) { + let _config_0 = { + ...runtimeConfig_1.ClientDefaultValues, + ...configuration, + }; + let _config_1 = config_resolver_1.resolveRegionConfig(_config_0); + let _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1); + let _config_3 = middleware_signing_1.resolveAwsAuthConfig(_config_2); + let _config_4 = middleware_retry_1.resolveRetryConfig(_config_3); + let _config_5 = middleware_host_header_1.resolveHostHeaderConfig(_config_4); + let _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; +//# sourceMappingURL=STSClient.js.map + +/***/ }), + +/***/ 83638: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssumeRoleCommand = void 0; +const models_0_1 = __nccwpck_require__(536); +const Aws_query_1 = __nccwpck_require__(6528); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a set of temporary security credentials that you can use to access AWS + * resources that you might not normally have access to. These temporary credentials consist + * of an access key ID, a secret access key, and a security token. Typically, you use + * AssumeRole within your account or for cross-account access. For a + * comparison of AssumeRole with other API operations that produce temporary + * credentials, see Requesting Temporary Security + * Credentials and Comparing the + * AWS STS API operations in the IAM User Guide.

+ * + *

You cannot use AWS account root user credentials to call AssumeRole. + * You must use credentials for an IAM user or an IAM role to call + * AssumeRole.

+ *
+ *

For cross-account access, imagine that you own multiple accounts and need to access + * resources in each account. You could create long-term credentials in each account to access + * those resources. However, managing all those credentials and remembering which one can + * access which account can be time consuming. Instead, you can create one set of long-term + * credentials in one account. Then use temporary security credentials to access all the other + * accounts by assuming roles in those accounts. For more information about roles, see IAM Roles in the + * IAM User Guide.

+ *

+ * Session Duration + *

+ *

By default, the temporary security credentials created by AssumeRole last + * for one hour. However, you can use the optional DurationSeconds parameter to + * specify the duration of your session. You can provide a value from 900 seconds (15 minutes) + * up to the maximum session duration setting for the role. This setting can have a value from + * 1 hour to 12 hours. To learn how to view the maximum value for your role, see View the + * Maximum Session Duration Setting for a Role in the + * IAM User Guide. The maximum session duration limit applies when + * you use the AssumeRole* API operations or the assume-role* CLI + * commands. However the limit does not apply when you use those operations to create a + * console URL. For more information, see Using IAM Roles in the + * IAM User Guide.

+ *

+ * Permissions + *

+ *

The temporary security credentials created by AssumeRole can be used to + * make API calls to any AWS service with the following exception: You cannot call the + * AWS STS GetFederationToken or GetSessionToken API + * operations.

+ *

(Optional) You can pass inline or managed session policies to + * this operation. You can pass a single JSON policy document to use as an inline session + * policy. You can also specify up to 10 managed policies to use as managed session policies. + * The plain text that you use for both inline and managed session policies can't exceed 2,048 + * characters. Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent AWS API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ *

To assume a role from a different account, your AWS account must be trusted by the + * role. The trust relationship is defined in the role's trust policy when the role is + * created. That trust policy states which accounts are allowed to delegate that access to + * users in the account.

+ *

A user who wants to access a role in a different account must also have permissions that + * are delegated from the user account administrator. The administrator must attach a policy + * that allows the user to call AssumeRole for the ARN of the role in the other + * account. If the user is in the same account as the role, then you can do either of the + * following:

+ * + *

In this case, the trust policy acts as an IAM resource-based policy. Users in the same + * account as the role do not need explicit permission to assume the role. For more + * information about trust policies and resource-based policies, see IAM Policies in + * the IAM User Guide.

+ *

+ * Tags + *

+ *

(Optional) You can pass tag key-value pairs to your session. These tags are called + * session tags. For more information about session tags, see Passing Session Tags in STS in the + * IAM User Guide.

+ *

An administrator must grant you the permissions necessary to pass session tags. The + * administrator can also create granular permissions to allow you to pass only specific + * session tags. For more information, see Tutorial: Using Tags + * for Attribute-Based Access Control in the + * IAM User Guide.

+ *

You can set the session tags as transitive. Transitive tags persist during role + * chaining. For more information, see Chaining Roles + * with Session Tags in the IAM User Guide.

+ *

+ * Using MFA with AssumeRole + *

+ *

(Optional) You can include multi-factor authentication (MFA) information when you call + * AssumeRole. This is useful for cross-account scenarios to ensure that the + * user that assumes the role has been authenticated with an AWS MFA device. In that + * scenario, the trust policy of the role being assumed includes a condition that tests for + * MFA authentication. If the caller does not include valid MFA information, the request to + * assume the role is denied. The condition in a trust policy that tests for MFA + * authentication might look like the following example.

+ *

+ * "Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}} + *

+ *

For more information, see Configuring MFA-Protected API Access + * in the IAM User Guide guide.

+ *

To use MFA with AssumeRole, you pass values for the + * SerialNumber and TokenCode parameters. The + * SerialNumber value identifies the user's hardware or virtual MFA device. + * The TokenCode is the time-based one-time password (TOTP) that the MFA device + * produces.

+ */ +class AssumeRoleCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + 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; +//# sourceMappingURL=AssumeRoleCommand.js.map + +/***/ }), + +/***/ 80550: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssumeRoleWithSAMLCommand = void 0; +const models_0_1 = __nccwpck_require__(536); +const Aws_query_1 = __nccwpck_require__(6528); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a set of temporary security credentials for users who have been authenticated + * via a SAML authentication response. This operation provides a mechanism for tying an + * enterprise identity store or directory to role-based AWS access without user-specific + * credentials or configuration. For a comparison of AssumeRoleWithSAML with the + * other API operations that produce temporary credentials, see Requesting Temporary Security + * Credentials and Comparing the + * AWS STS API operations in the IAM User Guide.

+ *

The temporary security credentials returned by this operation consist of an access key + * ID, a secret access key, and a security token. Applications can use these temporary + * security credentials to sign calls to AWS services.

+ *

+ * Session Duration + *

+ *

By default, the temporary security credentials created by + * AssumeRoleWithSAML last for one hour. However, you can use the optional + * DurationSeconds parameter to specify the duration of your session. Your + * role session lasts for the duration that you specify, or until the time specified in the + * SAML authentication response's SessionNotOnOrAfter value, whichever is + * shorter. You can provide a DurationSeconds value from 900 seconds (15 minutes) + * up to the maximum session duration setting for the role. This setting can have a value from + * 1 hour to 12 hours. To learn how to view the maximum value for your role, see View the + * Maximum Session Duration Setting for a Role in the + * IAM User Guide. The maximum session duration limit applies when + * you use the AssumeRole* API operations or the assume-role* CLI + * commands. However the limit does not apply when you use those operations to create a + * console URL. For more information, see Using IAM Roles in the + * IAM User Guide.

+ *

+ * Permissions + *

+ *

The temporary security credentials created by AssumeRoleWithSAML can be + * used to make API calls to any AWS service with the following exception: you cannot call + * the STS GetFederationToken or GetSessionToken API + * operations.

+ *

(Optional) You can pass inline or managed session policies to + * this operation. You can pass a single JSON policy document to use as an inline session + * policy. You can also specify up to 10 managed policies to use as managed session policies. + * The plain text that you use for both inline and managed session policies can't exceed 2,048 + * characters. Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent AWS API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ *

Calling AssumeRoleWithSAML does not require the use of AWS security + * credentials. The identity of the caller is validated by using keys in the metadata document + * that is uploaded for the SAML provider entity for your identity provider.

+ * + *

Calling AssumeRoleWithSAML can result in an entry in your AWS CloudTrail logs. + * The entry includes the value in the NameID element of the SAML assertion. + * We recommend that you use a NameIDType that is not associated with any + * personally identifiable information (PII). For example, you could instead use the + * persistent identifier + * (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).

+ *
+ *

+ * Tags + *

+ *

(Optional) You can configure your IdP to pass attributes into your SAML assertion as + * session tags. Each session tag consists of a key name and an associated value. For more + * information about session tags, see Passing Session Tags in STS in the + * IAM User Guide.

+ *

You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 + * characters and the values can’t exceed 256 characters. For these and additional limits, see + * IAM + * and STS Character Limits in the IAM User Guide.

+ * + * + *

An AWS conversion compresses the passed session policies and session tags into a + * packed binary format that has a separate limit. Your request can fail for this limit + * even if your plain text meets the other requirements. The PackedPolicySize + * response element indicates by percentage how close the policies and tags for your + * request are to the upper size limit. + *

+ *
+ * + *

You can pass a session tag with the same key as a tag that is attached to the role. When + * you do, session tags override the role's tags with the same key.

+ *

An administrator must grant you the permissions necessary to pass session tags. The + * administrator can also create granular permissions to allow you to pass only specific + * session tags. For more information, see Tutorial: Using Tags + * for Attribute-Based Access Control in the + * IAM User Guide.

+ *

You can set the session tags as transitive. Transitive tags persist during role + * chaining. For more information, see Chaining Roles + * with Session Tags in the IAM User Guide.

+ *

+ * SAML Configuration + *

+ *

Before your application can call AssumeRoleWithSAML, you must configure + * your SAML identity provider (IdP) to issue the claims required by AWS. Additionally, you + * must use AWS Identity and Access Management (IAM) to create a SAML provider entity in your AWS account that + * represents your identity provider. You must also create an IAM role that specifies this + * SAML provider in its trust policy.

+ *

For more information, see the following resources:

+ * + */ +class AssumeRoleWithSAMLCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + 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; +//# sourceMappingURL=AssumeRoleWithSAMLCommand.js.map + +/***/ }), + +/***/ 51733: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssumeRoleWithWebIdentityCommand = void 0; +const models_0_1 = __nccwpck_require__(536); +const Aws_query_1 = __nccwpck_require__(6528); +const middleware_serde_1 = __nccwpck_require__(86142); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a set of temporary security credentials for users who have been authenticated in + * a mobile or web application with a web identity provider. Example providers include Amazon Cognito, + * Login with Amazon, Facebook, Google, or any OpenID Connect-compatible identity + * provider.

+ * + *

For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the + * AWS SDK for iOS Developer Guide and the AWS SDK for Android Developer Guide to uniquely + * identify a user. You can also supply the user with a consistent identity throughout the + * lifetime of an application.

+ *

To learn more about Amazon Cognito, see Amazon Cognito Overview in + * AWS SDK for Android Developer Guide and Amazon Cognito Overview in the + * AWS SDK for iOS Developer Guide.

+ *
+ *

Calling AssumeRoleWithWebIdentity does not require the use of AWS + * security credentials. Therefore, you can distribute an application (for example, on mobile + * devices) that requests temporary security credentials without including long-term AWS + * credentials in the application. You also don't need to deploy server-based proxy services + * that use long-term AWS credentials. Instead, the identity of the caller is validated by + * using a token from the web identity provider. For a comparison of + * AssumeRoleWithWebIdentity with the other API operations that produce + * temporary credentials, see Requesting Temporary Security + * Credentials and Comparing the + * AWS STS API operations in the IAM User Guide.

+ *

The temporary security credentials returned by this API consist of an access key ID, a + * secret access key, and a security token. Applications can use these temporary security + * credentials to sign calls to AWS service API operations.

+ *

+ * Session Duration + *

+ *

By default, the temporary security credentials created by + * AssumeRoleWithWebIdentity last for one hour. However, you can use the + * optional DurationSeconds parameter to specify the duration of your session. + * You can provide a value from 900 seconds (15 minutes) up to the maximum session duration + * setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how + * to view the maximum value for your role, see View the + * Maximum Session Duration Setting for a Role in the + * IAM User Guide. The maximum session duration limit applies when + * you use the AssumeRole* API operations or the assume-role* CLI + * commands. However the limit does not apply when you use those operations to create a + * console URL. For more information, see Using IAM Roles in the + * IAM User Guide.

+ *

+ * Permissions + *

+ *

The temporary security credentials created by AssumeRoleWithWebIdentity can + * be used to make API calls to any AWS service with the following exception: you cannot + * call the STS GetFederationToken or GetSessionToken API + * operations.

+ *

(Optional) You can pass inline or managed session policies to + * this operation. You can pass a single JSON policy document to use as an inline session + * policy. You can also specify up to 10 managed policies to use as managed session policies. + * The plain text that you use for both inline and managed session policies can't exceed 2,048 + * characters. Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent AWS API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ *

+ * Tags + *

+ *

(Optional) You can configure your IdP to pass attributes into your web identity token as + * session tags. Each session tag consists of a key name and an associated value. For more + * information about session tags, see Passing Session Tags in STS in the + * IAM User Guide.

+ *

You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 + * characters and the values can’t exceed 256 characters. For these and additional limits, see + * IAM + * and STS Character Limits in the IAM User Guide.

+ * + * + *

An AWS conversion compresses the passed session policies and session tags into a + * packed binary format that has a separate limit. Your request can fail for this limit + * even if your plain text meets the other requirements. The PackedPolicySize + * response element indicates by percentage how close the policies and tags for your + * request are to the upper size limit. + *

+ *
+ * + *

You can pass a session tag with the same key as a tag that is attached to the role. When + * you do, the session tag overrides the role tag with the same key.

+ *

An administrator must grant you the permissions necessary to pass session tags. The + * administrator can also create granular permissions to allow you to pass only specific + * session tags. For more information, see Tutorial: Using Tags + * for Attribute-Based Access Control in the + * IAM User Guide.

+ *

You can set the session tags as transitive. Transitive tags persist during role + * chaining. For more information, see Chaining Roles + * with Session Tags in the IAM User Guide.

+ *

+ * Identities + *

+ *

Before your application can call AssumeRoleWithWebIdentity, you must have + * an identity token from a supported identity provider and create a role that the application + * can assume. The role that your application assumes must trust the identity provider that is + * associated with the identity token. In other words, the identity provider must be specified + * in the role's trust policy.

+ * + *

Calling AssumeRoleWithWebIdentity can result in an entry in your + * AWS CloudTrail logs. The entry includes the Subject of + * the provided Web Identity Token. We recommend that you avoid using any personally + * identifiable information (PII) in this field. For example, you could instead use a GUID + * or a pairwise identifier, as suggested + * in the OIDC specification.

+ *
+ *

For more information about how to use web identity federation and the + * AssumeRoleWithWebIdentity API, see the following resources:

+ * + */ +class AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.resolved = true; + } + 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; +//# sourceMappingURL=AssumeRoleWithWebIdentityCommand.js.map + +/***/ }), + +/***/ 99448: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DecodeAuthorizationMessageCommand = void 0; +const models_0_1 = __nccwpck_require__(536); +const Aws_query_1 = __nccwpck_require__(6528); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Decodes additional information about the authorization status of a request from an + * encoded message returned in response to an AWS request.

+ *

For example, if a user is not authorized to perform an operation that he or she has + * requested, the request returns a Client.UnauthorizedOperation response (an + * HTTP 403 response). Some AWS operations additionally return an encoded message that can + * provide details about this authorization failure.

+ * + *

Only certain AWS operations return an encoded authorization message. The + * documentation for an individual operation indicates whether that operation returns an + * encoded message in addition to returning an HTTP code.

+ *
+ *

The message is encoded because the details of the authorization status can constitute + * privileged information that the user who requested the operation should not see. To decode + * an authorization status message, a user must be granted permissions via an IAM policy to + * request the DecodeAuthorizationMessage + * (sts:DecodeAuthorizationMessage) action.

+ *

The decoded message includes the following type of information:

+ * + */ +class DecodeAuthorizationMessageCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + 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; +//# sourceMappingURL=DecodeAuthorizationMessageCommand.js.map + +/***/ }), + +/***/ 64317: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetAccessKeyInfoCommand = void 0; +const models_0_1 = __nccwpck_require__(536); +const Aws_query_1 = __nccwpck_require__(6528); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns the account identifier for the specified access key ID.

+ *

Access keys consist of two parts: an access key ID (for example, + * AKIAIOSFODNN7EXAMPLE) and a secret access key (for example, + * wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). For more information about + * access keys, see Managing Access Keys for IAM + * Users in the IAM User Guide.

+ *

When you pass an access key ID to this operation, it returns the ID of the AWS account + * to which the keys belong. Access key IDs beginning with AKIA are long-term + * credentials for an IAM user or the AWS account root user. Access key IDs beginning with + * ASIA are temporary credentials that are created using STS operations. If + * the account in the response belongs to you, you can sign in as the root user and review + * your root user access keys. Then, you can pull a credentials report to + * learn which IAM user owns the keys. To learn who requested the temporary credentials for + * an ASIA access key, view the STS events in your CloudTrail logs in the + * IAM User Guide.

+ *

This operation does not indicate the state of the access key. The key might be active, + * inactive, or deleted. Active keys might not have permissions to perform an operation. + * Providing a deleted access key might return an error that the key doesn't exist.

+ */ +class GetAccessKeyInfoCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + 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; +//# sourceMappingURL=GetAccessKeyInfoCommand.js.map + +/***/ }), + +/***/ 47515: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetCallerIdentityCommand = void 0; +const models_0_1 = __nccwpck_require__(536); +const Aws_query_1 = __nccwpck_require__(6528); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns details about the IAM user or role whose credentials are used to call the + * operation.

+ * + *

No permissions are required to perform this operation. If an administrator adds a + * policy to your IAM user or role that explicitly denies access to the + * sts:GetCallerIdentity action, you can still perform this operation. + * Permissions are not required because the same information is returned when an IAM user + * or role is denied access. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the + * IAM User Guide.

+ *
+ */ +class GetCallerIdentityCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + 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; +//# sourceMappingURL=GetCallerIdentityCommand.js.map + +/***/ }), + +/***/ 35239: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetFederationTokenCommand = void 0; +const models_0_1 = __nccwpck_require__(536); +const Aws_query_1 = __nccwpck_require__(6528); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a set of temporary security credentials (consisting of an access key ID, a + * secret access key, and a security token) for a federated user. A typical use is in a proxy + * application that gets temporary security credentials on behalf of distributed applications + * inside a corporate network. You must call the GetFederationToken operation + * using the long-term security credentials of an IAM user. As a result, this call is + * appropriate in contexts where those credentials can be safely stored, usually in a + * server-based application. For a comparison of GetFederationToken with the + * other API operations that produce temporary credentials, see Requesting Temporary Security + * Credentials and Comparing the + * AWS STS API operations in the IAM User Guide.

+ * + *

You can create a mobile-based or browser-based app that can authenticate users using + * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID + * Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or + * AssumeRoleWithWebIdentity. For more information, see Federation Through a Web-based Identity Provider in the + * IAM User Guide.

+ *
+ *

You can also call GetFederationToken using the security credentials of an + * AWS account root user, but we do not recommend it. Instead, we recommend that you create + * an IAM user for the purpose of the proxy application. Then attach a policy to the IAM + * user that limits federated users to only the actions and resources that they need to + * access. For more information, see IAM Best Practices in the + * IAM User Guide.

+ *

+ * Session duration + *

+ *

The temporary credentials are valid for the specified duration, from 900 seconds (15 + * minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is + * 43,200 seconds (12 hours). Temporary credentials that are obtained by using AWS account + * root user credentials have a maximum duration of 3,600 seconds (1 hour).

+ *

+ * Permissions + *

+ *

You can use the temporary credentials created by GetFederationToken in any + * AWS service except the following:

+ * + *

You must pass an inline or managed session policy to + * this operation. You can pass a single JSON policy document to use as an inline session + * policy. You can also specify up to 10 managed policies to use as managed session policies. + * The plain text that you use for both inline and managed session policies can't exceed 2,048 + * characters.

+ *

Though the session policy parameters are optional, if you do not pass a policy, then the + * resulting federated user session has no permissions. When you pass session policies, the + * session permissions are the intersection of the IAM user policies and the session + * policies that you pass. This gives you a way to further restrict the permissions for a + * federated user. You cannot use session policies to grant more permissions than those that + * are defined in the permissions policy of the IAM user. For more information, see Session + * Policies in the IAM User Guide. For information about + * using GetFederationToken to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.

+ *

You can use the credentials to access a resource that has a resource-based policy. If + * that policy specifically references the federated user session in the + * Principal element of the policy, the session has the permissions allowed by + * the policy. These permissions are granted in addition to the permissions granted by the + * session policies.

+ *

+ * Tags + *

+ *

(Optional) You can pass tag key-value pairs to your session. These are called session + * tags. For more information about session tags, see Passing Session Tags in STS in the + * IAM User Guide.

+ *

An administrator must grant you the permissions necessary to pass session tags. The + * administrator can also create granular permissions to allow you to pass only specific + * session tags. For more information, see Tutorial: Using Tags + * for Attribute-Based Access Control in the + * IAM User Guide.

+ *

Tag key–value pairs are not case sensitive, but case is preserved. This means that you + * cannot have separate Department and department tag keys. Assume + * that the user that you are federating has the + * Department=Marketing tag and you pass the + * department=engineering session tag. Department + * and department are not saved as separate tags, and the session tag passed in + * the request takes precedence over the user tag.

+ */ +class GetFederationTokenCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + 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; +//# sourceMappingURL=GetFederationTokenCommand.js.map + +/***/ }), + +/***/ 26499: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetSessionTokenCommand = void 0; +const models_0_1 = __nccwpck_require__(536); +const Aws_query_1 = __nccwpck_require__(6528); +const middleware_serde_1 = __nccwpck_require__(86142); +const middleware_signing_1 = __nccwpck_require__(82487); +const smithy_client_1 = __nccwpck_require__(84060); +/** + *

Returns a set of temporary credentials for an AWS account or IAM user. The + * credentials consist of an access key ID, a secret access key, and a security token. + * Typically, you use GetSessionToken if you want to use MFA to protect + * programmatic calls to specific AWS API operations like Amazon EC2 StopInstances. + * MFA-enabled IAM users would need to call GetSessionToken and submit an MFA + * code that is associated with their MFA device. Using the temporary security credentials + * that are returned from the call, IAM users can then make programmatic calls to API + * operations that require MFA authentication. If you do not supply a correct MFA code, then + * the API returns an access denied error. For a comparison of GetSessionToken + * with the other API operations that produce temporary credentials, see Requesting + * Temporary Security Credentials and Comparing the + * AWS STS API operations in the IAM User Guide.

+ *

+ * Session Duration + *

+ *

The GetSessionToken operation must be called by using the long-term AWS + * security credentials of the AWS account root user or an IAM user. Credentials that are + * created by IAM users are valid for the duration that you specify. This duration can range + * from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default + * of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900 + * seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.

+ *

+ * Permissions + *

+ *

The temporary security credentials created by GetSessionToken can be used + * to make API calls to any AWS service with the following exceptions:

+ * + * + *

We recommend that you do not call GetSessionToken with AWS account + * root user credentials. Instead, follow our best practices by + * creating one or more IAM users, giving them the necessary permissions, and using IAM + * users for everyday interaction with AWS.

+ *
+ *

The credentials that are returned by GetSessionToken are based on + * permissions associated with the user whose credentials were used to call the operation. If + * GetSessionToken is called using AWS account root user credentials, the + * temporary credentials have root user permissions. Similarly, if + * GetSessionToken is called using the credentials of an IAM user, the + * temporary credentials have the same permissions as the IAM user.

+ *

For more information about using GetSessionToken to create temporary + * credentials, go to Temporary + * Credentials for Users in Untrusted Environments in the + * IAM User Guide.

+ */ +class GetSessionTokenCommand extends smithy_client_1.Command { + // Start section: command_properties + // End section: command_properties + constructor(input) { + // Start section: command_constructor + super(); + this.input = input; + this.resolved = false; + // End section: command_constructor + } + /** + * @internal + */ + resolveMiddleware(clientStack, configuration, options) { + if (!this.resolved) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + this.resolved = true; + } + 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; +//# sourceMappingURL=GetSessionTokenCommand.js.map + +/***/ }), + +/***/ 2798: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRegionInfoProvider = void 0; +// Partition default templates +const AWS_TEMPLATE = "sts.{region}.amazonaws.com"; +const AWS_CN_TEMPLATE = "sts.{region}.amazonaws.com.cn"; +const AWS_ISO_TEMPLATE = "sts.{region}.c2s.ic.gov"; +const AWS_ISO_B_TEMPLATE = "sts.{region}.sc2s.sgov.gov"; +const AWS_US_GOV_TEMPLATE = "sts.{region}.amazonaws.com"; +// Partition regions +const AWS_REGIONS = new Set([ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "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", +]); +const AWS_CN_REGIONS = new Set(["cn-north-1", "cn-northwest-1"]); +const AWS_ISO_REGIONS = new Set(["us-iso-east-1"]); +const AWS_ISO_B_REGIONS = new Set(["us-isob-east-1"]); +const AWS_US_GOV_REGIONS = new Set(["us-gov-east-1", "us-gov-west-1"]); +const defaultRegionInfoProvider = (region, options) => { + let regionInfo = undefined; + switch (region) { + // First, try to match exact region names. + case "af-south-1": + regionInfo = { + hostname: "sts.af-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-east-1": + regionInfo = { + hostname: "sts.ap-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-northeast-1": + regionInfo = { + hostname: "sts.ap-northeast-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-northeast-2": + regionInfo = { + hostname: "sts.ap-northeast-2.amazonaws.com", + partition: "aws", + }; + break; + case "ap-south-1": + regionInfo = { + hostname: "sts.ap-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-southeast-1": + regionInfo = { + hostname: "sts.ap-southeast-1.amazonaws.com", + partition: "aws", + }; + break; + case "ap-southeast-2": + regionInfo = { + hostname: "sts.ap-southeast-2.amazonaws.com", + partition: "aws", + }; + break; + case "aws-global": + regionInfo = { + hostname: "sts.amazonaws.com", + partition: "aws", + signingRegion: "us-east-1", + }; + break; + case "ca-central-1": + regionInfo = { + hostname: "sts.ca-central-1.amazonaws.com", + partition: "aws", + }; + break; + case "cn-north-1": + regionInfo = { + hostname: "sts.cn-north-1.amazonaws.com.cn", + partition: "aws-cn", + }; + break; + case "cn-northwest-1": + regionInfo = { + hostname: "sts.cn-northwest-1.amazonaws.com.cn", + partition: "aws-cn", + }; + break; + case "eu-central-1": + regionInfo = { + hostname: "sts.eu-central-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-north-1": + regionInfo = { + hostname: "sts.eu-north-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-south-1": + regionInfo = { + hostname: "sts.eu-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-1": + regionInfo = { + hostname: "sts.eu-west-1.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-2": + regionInfo = { + hostname: "sts.eu-west-2.amazonaws.com", + partition: "aws", + }; + break; + case "eu-west-3": + regionInfo = { + hostname: "sts.eu-west-3.amazonaws.com", + partition: "aws", + }; + break; + case "me-south-1": + regionInfo = { + hostname: "sts.me-south-1.amazonaws.com", + partition: "aws", + }; + break; + case "sa-east-1": + regionInfo = { + hostname: "sts.sa-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-1": + regionInfo = { + hostname: "sts.us-east-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-1-fips": + regionInfo = { + hostname: "sts-fips.us-east-1.amazonaws.com", + partition: "aws", + signingRegion: "us-east-1", + }; + break; + case "us-east-2": + regionInfo = { + hostname: "sts.us-east-2.amazonaws.com", + partition: "aws", + }; + break; + case "us-east-2-fips": + regionInfo = { + hostname: "sts-fips.us-east-2.amazonaws.com", + partition: "aws", + signingRegion: "us-east-2", + }; + break; + case "us-gov-east-1": + regionInfo = { + hostname: "sts.us-gov-east-1.amazonaws.com", + partition: "aws-us-gov", + }; + break; + case "us-gov-east-1-fips": + regionInfo = { + hostname: "sts.us-gov-east-1.amazonaws.com", + partition: "aws-us-gov", + signingRegion: "us-gov-east-1", + }; + break; + case "us-gov-west-1": + regionInfo = { + hostname: "sts.us-gov-west-1.amazonaws.com", + partition: "aws-us-gov", + }; + break; + case "us-gov-west-1-fips": + regionInfo = { + hostname: "sts.us-gov-west-1.amazonaws.com", + partition: "aws-us-gov", + signingRegion: "us-gov-west-1", + }; + break; + case "us-iso-east-1": + regionInfo = { + hostname: "sts.us-iso-east-1.c2s.ic.gov", + partition: "aws-iso", + }; + break; + case "us-isob-east-1": + regionInfo = { + hostname: "sts.us-isob-east-1.sc2s.sgov.gov", + partition: "aws-iso-b", + }; + break; + case "us-west-1": + regionInfo = { + hostname: "sts.us-west-1.amazonaws.com", + partition: "aws", + }; + break; + case "us-west-1-fips": + regionInfo = { + hostname: "sts-fips.us-west-1.amazonaws.com", + partition: "aws", + signingRegion: "us-west-1", + }; + break; + case "us-west-2": + regionInfo = { + hostname: "sts.us-west-2.amazonaws.com", + partition: "aws", + }; + break; + case "us-west-2-fips": + regionInfo = { + hostname: "sts-fips.us-west-2.amazonaws.com", + partition: "aws", + signingRegion: "us-west-2", + }; + break; + // Next, try to match partition endpoints. + default: + if (AWS_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + }; + } + if (AWS_CN_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_CN_TEMPLATE.replace("{region}", region), + partition: "aws-cn", + }; + } + if (AWS_ISO_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_TEMPLATE.replace("{region}", region), + partition: "aws-iso", + }; + } + if (AWS_ISO_B_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_B_TEMPLATE.replace("{region}", region), + partition: "aws-iso-b", + }; + } + if (AWS_US_GOV_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_US_GOV_TEMPLATE.replace("{region}", region), + partition: "aws-us-gov", + }; + } + // Finally, assume it's an AWS partition endpoint. + if (regionInfo === undefined) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + partition: "aws", + }; + } + } + return Promise.resolve({ signingService: "sts", ...regionInfo }); +}; +exports.defaultRegionInfoProvider = defaultRegionInfoProvider; +//# sourceMappingURL=endpoints.js.map + +/***/ }), + +/***/ 23285: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(76759); +tslib_1.__exportStar(__nccwpck_require__(22316), exports); +tslib_1.__exportStar(__nccwpck_require__(53853), exports); +tslib_1.__exportStar(__nccwpck_require__(83638), exports); +tslib_1.__exportStar(__nccwpck_require__(80550), exports); +tslib_1.__exportStar(__nccwpck_require__(51733), exports); +tslib_1.__exportStar(__nccwpck_require__(99448), exports); +tslib_1.__exportStar(__nccwpck_require__(64317), exports); +tslib_1.__exportStar(__nccwpck_require__(47515), exports); +tslib_1.__exportStar(__nccwpck_require__(35239), exports); +tslib_1.__exportStar(__nccwpck_require__(26499), exports); +tslib_1.__exportStar(__nccwpck_require__(5231), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 5231: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(76759); +tslib_1.__exportStar(__nccwpck_require__(536), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 536: +/***/ ((__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 = {})); +//# sourceMappingURL=models_0.js.map + +/***/ }), + +/***/ 6528: +/***/ ((__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__(67498); +const smithy_client_1 = __nccwpck_require__(84060); +const fast_xml_parser_1 = __nccwpck_require__(27448); +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; + } + 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 (let 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 (let 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 (let 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) => { + let contents = { + AssumedRoleId: undefined, + Arn: undefined, + }; + if (output["AssumedRoleId"] !== undefined) { + contents.AssumedRoleId = output["AssumedRoleId"]; + } + if (output["Arn"] !== undefined) { + contents.Arn = output["Arn"]; + } + return contents; +}; +const deserializeAws_queryAssumeRoleResponse = (output, context) => { + let contents = { + Credentials: undefined, + AssumedRoleUser: undefined, + PackedPolicySize: 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 = parseInt(output["PackedPolicySize"]); + } + return contents; +}; +const deserializeAws_queryAssumeRoleWithSAMLResponse = (output, context) => { + let contents = { + Credentials: undefined, + AssumedRoleUser: undefined, + PackedPolicySize: undefined, + Subject: undefined, + SubjectType: undefined, + Issuer: undefined, + Audience: undefined, + NameQualifier: 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 = parseInt(output["PackedPolicySize"]); + } + if (output["Subject"] !== undefined) { + contents.Subject = output["Subject"]; + } + if (output["SubjectType"] !== undefined) { + contents.SubjectType = output["SubjectType"]; + } + if (output["Issuer"] !== undefined) { + contents.Issuer = output["Issuer"]; + } + if (output["Audience"] !== undefined) { + contents.Audience = output["Audience"]; + } + if (output["NameQualifier"] !== undefined) { + contents.NameQualifier = output["NameQualifier"]; + } + return contents; +}; +const deserializeAws_queryAssumeRoleWithWebIdentityResponse = (output, context) => { + let contents = { + Credentials: undefined, + SubjectFromWebIdentityToken: undefined, + AssumedRoleUser: undefined, + PackedPolicySize: undefined, + Provider: undefined, + Audience: undefined, + }; + if (output["Credentials"] !== undefined) { + contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); + } + if (output["SubjectFromWebIdentityToken"] !== undefined) { + contents.SubjectFromWebIdentityToken = output["SubjectFromWebIdentityToken"]; + } + if (output["AssumedRoleUser"] !== undefined) { + contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context); + } + if (output["PackedPolicySize"] !== undefined) { + contents.PackedPolicySize = parseInt(output["PackedPolicySize"]); + } + if (output["Provider"] !== undefined) { + contents.Provider = output["Provider"]; + } + if (output["Audience"] !== undefined) { + contents.Audience = output["Audience"]; + } + return contents; +}; +const deserializeAws_queryCredentials = (output, context) => { + let contents = { + AccessKeyId: undefined, + SecretAccessKey: undefined, + SessionToken: undefined, + Expiration: undefined, + }; + if (output["AccessKeyId"] !== undefined) { + contents.AccessKeyId = output["AccessKeyId"]; + } + if (output["SecretAccessKey"] !== undefined) { + contents.SecretAccessKey = output["SecretAccessKey"]; + } + if (output["SessionToken"] !== undefined) { + contents.SessionToken = output["SessionToken"]; + } + if (output["Expiration"] !== undefined) { + contents.Expiration = new Date(output["Expiration"]); + } + return contents; +}; +const deserializeAws_queryDecodeAuthorizationMessageResponse = (output, context) => { + let contents = { + DecodedMessage: undefined, + }; + if (output["DecodedMessage"] !== undefined) { + contents.DecodedMessage = output["DecodedMessage"]; + } + return contents; +}; +const deserializeAws_queryExpiredTokenException = (output, context) => { + let contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = output["message"]; + } + return contents; +}; +const deserializeAws_queryFederatedUser = (output, context) => { + let contents = { + FederatedUserId: undefined, + Arn: undefined, + }; + if (output["FederatedUserId"] !== undefined) { + contents.FederatedUserId = output["FederatedUserId"]; + } + if (output["Arn"] !== undefined) { + contents.Arn = output["Arn"]; + } + return contents; +}; +const deserializeAws_queryGetAccessKeyInfoResponse = (output, context) => { + let contents = { + Account: undefined, + }; + if (output["Account"] !== undefined) { + contents.Account = output["Account"]; + } + return contents; +}; +const deserializeAws_queryGetCallerIdentityResponse = (output, context) => { + let contents = { + UserId: undefined, + Account: undefined, + Arn: undefined, + }; + if (output["UserId"] !== undefined) { + contents.UserId = output["UserId"]; + } + if (output["Account"] !== undefined) { + contents.Account = output["Account"]; + } + if (output["Arn"] !== undefined) { + contents.Arn = output["Arn"]; + } + return contents; +}; +const deserializeAws_queryGetFederationTokenResponse = (output, context) => { + let 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 = parseInt(output["PackedPolicySize"]); + } + return contents; +}; +const deserializeAws_queryGetSessionTokenResponse = (output, context) => { + let contents = { + Credentials: undefined, + }; + if (output["Credentials"] !== undefined) { + contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); + } + return contents; +}; +const deserializeAws_queryIDPCommunicationErrorException = (output, context) => { + let contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = output["message"]; + } + return contents; +}; +const deserializeAws_queryIDPRejectedClaimException = (output, context) => { + let contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = output["message"]; + } + return contents; +}; +const deserializeAws_queryInvalidAuthorizationMessageException = (output, context) => { + let contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = output["message"]; + } + return contents; +}; +const deserializeAws_queryInvalidIdentityTokenException = (output, context) => { + let contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = output["message"]; + } + return contents; +}; +const deserializeAws_queryMalformedPolicyDocumentException = (output, context) => { + let contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = output["message"]; + } + return contents; +}; +const deserializeAws_queryPackedPolicyTooLargeException = (output, context) => { + let contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = output["message"]; + } + return contents; +}; +const deserializeAws_queryRegionDisabledException = (output, context) => { + let contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = 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"], + }); +}; +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; +// Encode Uint8Array data into string with utf-8. +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 } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new protocol_http_1.HttpRequest(contents); +}; +const decodeEscapedXML = (str) => str + .replace(/&/g, "&") + .replace(/'/g, "'") + .replace(/"/g, '"') + .replace(/>/g, ">") + .replace(/</g, "<"); +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, + tagValueProcessor: (val, tagName) => decodeEscapedXML(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 ""; +}; +//# sourceMappingURL=Aws_query.js.map + +/***/ }), + +/***/ 4675: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientDefaultValues = void 0; +const tslib_1 = __nccwpck_require__(76759); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(51508)); +const config_resolver_1 = __nccwpck_require__(87229); +const credential_provider_node_1 = __nccwpck_require__(98030); +const hash_node_1 = __nccwpck_require__(90791); +const middleware_retry_1 = __nccwpck_require__(7000); +const node_config_provider_1 = __nccwpck_require__(71124); +const node_http_handler_1 = __nccwpck_require__(15168); +const util_base64_node_1 = __nccwpck_require__(2091); +const util_body_length_node_1 = __nccwpck_require__(40286); +const util_user_agent_node_1 = __nccwpck_require__(64717); +const util_utf8_node_1 = __nccwpck_require__(85227); +const runtimeConfig_shared_1 = __nccwpck_require__(8137); +/** + * @internal + */ +exports.ClientDefaultValues = { + ...runtimeConfig_shared_1.ClientSharedValues, + runtime: "node", + base64Decoder: util_base64_node_1.fromBase64, + base64Encoder: util_base64_node_1.toBase64, + bodyLengthChecker: util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: util_user_agent_node_1.defaultUserAgent({ + serviceId: runtimeConfig_shared_1.ClientSharedValues.serviceId, + clientVersion: package_json_1.default.version, + }), + maxAttempts: node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: new node_http_handler_1.NodeHttpHandler(), + sha256: hash_node_1.Hash.bind(null, "sha256"), + streamCollector: node_http_handler_1.streamCollector, + utf8Decoder: util_utf8_node_1.fromUtf8, + utf8Encoder: util_utf8_node_1.toUtf8, +}; +//# sourceMappingURL=runtimeConfig.js.map + +/***/ }), + +/***/ 8137: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ClientSharedValues = void 0; +const endpoints_1 = __nccwpck_require__(2798); +const url_parser_1 = __nccwpck_require__(99427); +/** + * @internal + */ +exports.ClientSharedValues = { + apiVersion: "2011-06-15", + disableHostPrefix: false, + logger: {}, + regionInfoProvider: endpoints_1.defaultRegionInfoProvider, + serviceId: "STS", + urlParser: url_parser_1.parseUrl, +}; +//# sourceMappingURL=runtimeConfig.shared.js.map + +/***/ }), + +/***/ 76759: +/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +__nccwpck_require__.r(__webpack_exports__); +/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { +/* harmony export */ "__extends": () => /* binding */ __extends, +/* harmony export */ "__assign": () => /* binding */ __assign, +/* harmony export */ "__rest": () => /* binding */ __rest, +/* harmony export */ "__decorate": () => /* binding */ __decorate, +/* harmony export */ "__param": () => /* binding */ __param, +/* harmony export */ "__metadata": () => /* binding */ __metadata, +/* harmony export */ "__awaiter": () => /* binding */ __awaiter, +/* harmony export */ "__generator": () => /* binding */ __generator, +/* harmony export */ "__createBinding": () => /* binding */ __createBinding, +/* harmony export */ "__exportStar": () => /* binding */ __exportStar, +/* harmony export */ "__values": () => /* binding */ __values, +/* harmony export */ "__read": () => /* binding */ __read, +/* harmony export */ "__spread": () => /* binding */ __spread, +/* harmony export */ "__spreadArrays": () => /* binding */ __spreadArrays, +/* harmony export */ "__spreadArray": () => /* binding */ __spreadArray, +/* harmony export */ "__await": () => /* binding */ __await, +/* harmony export */ "__asyncGenerator": () => /* binding */ __asyncGenerator, +/* harmony export */ "__asyncDelegator": () => /* binding */ __asyncDelegator, +/* harmony export */ "__asyncValues": () => /* binding */ __asyncValues, +/* harmony export */ "__makeTemplateObject": () => /* binding */ __makeTemplateObject, +/* harmony export */ "__importStar": () => /* binding */ __importStar, +/* harmony export */ "__importDefault": () => /* binding */ __importDefault, +/* harmony export */ "__classPrivateFieldGet": () => /* binding */ __classPrivateFieldGet, +/* harmony export */ "__classPrivateFieldSet": () => /* binding */ __classPrivateFieldSet +/* harmony export */ }); +/*! ***************************************************************************** +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 Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + 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 }; + } +} + +var __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]; +}); + +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function __spreadArray(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, 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]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function __importStar(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; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} + + +/***/ }), + +/***/ 445: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveEndpointsConfig = void 0; +const resolveEndpointsConfig = (input) => { + var _a; + return ({ + ...input, + tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true, + endpoint: input.endpoint ? normalizeEndpoint(input) : () => getEndPointFromRegion(input), + isCustomEndpoint: input.endpoint ? true : false, + }); +}; +exports.resolveEndpointsConfig = resolveEndpointsConfig; +const normalizeEndpoint = (input) => { + const { endpoint, urlParser } = input; + 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; +}; +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 { hostname } = (_a = (await input.regionInfoProvider(region))) !== null && _a !== void 0 ? _a : {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW5kcG9pbnRzQ29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0VuZHBvaW50c0NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUF5Qk8sTUFBTSxzQkFBc0IsR0FBRyxDQUNwQyxLQUFvRCxFQUN2QixFQUFFOztJQUFDLE9BQUEsQ0FBQztRQUNqQyxHQUFHLEtBQUs7UUFDUixHQUFHLFFBQUUsS0FBSyxDQUFDLEdBQUcsbUNBQUksSUFBSTtRQUN0QixRQUFRLEVBQUUsS0FBSyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsaUJBQWlCLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsRUFBRSxDQUFDLHFCQUFxQixDQUFDLEtBQUssQ0FBQztRQUN4RixnQkFBZ0IsRUFBRSxLQUFLLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLEtBQUs7S0FDaEQsQ0FBQyxDQUFBO0NBQUEsQ0FBQztBQVBVLFFBQUEsc0JBQXNCLDBCQU9oQztBQUVILE1BQU0saUJBQWlCLEdBQUcsQ0FBQyxLQUFnRCxFQUFzQixFQUFFO0lBQ2pHLE1BQU0sRUFBRSxRQUFRLEVBQUUsU0FBUyxFQUFFLEdBQUcsS0FBSyxDQUFDO0lBQ3RDLElBQUksT0FBTyxRQUFRLEtBQUssUUFBUSxFQUFFO1FBQ2hDLE1BQU0sV0FBVyxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUMsU0FBUyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7UUFDekQsT0FBTyxHQUFHLEVBQUUsQ0FBQyxXQUFXLENBQUM7S0FDMUI7U0FBTSxJQUFJLE9BQU8sUUFBUSxLQUFLLFFBQVEsRUFBRTtRQUN2QyxNQUFNLFdBQVcsR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO1FBQzlDLE9BQU8sR0FBRyxFQUFFLENBQUMsV0FBVyxDQUFDO0tBQzFCO0lBQ0QsT0FBTyxRQUFTLENBQUM7QUFDbkIsQ0FBQyxDQUFDO0FBRUYsTUFBTSxxQkFBcUIsR0FBRyxLQUFLLEVBQUUsS0FBZ0QsRUFBRSxFQUFFOztJQUN2RixNQUFNLEVBQUUsR0FBRyxHQUFHLElBQUksRUFBRSxHQUFHLEtBQUssQ0FBQztJQUM3QixNQUFNLE1BQU0sR0FBRyxNQUFNLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQztJQUVwQyxNQUFNLFlBQVksR0FBRyxJQUFJLE1BQU0sQ0FBQywwREFBMEQsQ0FBQyxDQUFDO0lBQzVGLElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxFQUFFO1FBQzlCLE1BQU0sSUFBSSxLQUFLLENBQUMsaUNBQWlDLENBQUMsQ0FBQztLQUNwRDtJQUVELE1BQU0sRUFBRSxRQUFRLEVBQUUsU0FBRyxDQUFDLE1BQU0sS0FBSyxDQUFDLGtCQUFrQixDQUFDLE1BQU0sQ0FBQyxDQUFDLG1DQUFJLEVBQUUsQ0FBQztJQUNwRSxJQUFJLENBQUMsUUFBUSxFQUFFO1FBQ2IsTUFBTSxJQUFJLEtBQUssQ0FBQyw0Q0FBNEMsQ0FBQyxDQUFDO0tBQy9EO0lBRUQsT0FBTyxLQUFLLENBQUMsU0FBUyxDQUFDLEdBQUcsR0FBRyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDLE9BQU8sS0FBSyxRQUFRLEVBQUUsQ0FBQyxDQUFDO0FBQ3JFLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEVuZHBvaW50LCBQcm92aWRlciwgUmVnaW9uSW5mb1Byb3ZpZGVyLCBVcmxQYXJzZXIgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGludGVyZmFjZSBFbmRwb2ludHNJbnB1dENvbmZpZyB7XG4gIC8qKlxuICAgKiBUaGUgZnVsbHkgcXVhbGlmaWVkIGVuZHBvaW50IG9mIHRoZSB3ZWJzZXJ2aWNlLiBUaGlzIGlzIG9ubHkgcmVxdWlyZWQgd2hlbiB1c2luZyBhIGN1c3RvbSBlbmRwb2ludCAoZm9yIGV4YW1wbGUsIHdoZW4gdXNpbmcgYSBsb2NhbCB2ZXJzaW9uIG9mIFMzKS5cbiAgICovXG4gIGVuZHBvaW50Pzogc3RyaW5nIHwgRW5kcG9pbnQgfCBQcm92aWRlcjxFbmRwb2ludD47XG5cbiAgLyoqXG4gICAqIFdoZXRoZXIgVExTIGlzIGVuYWJsZWQgZm9yIHJlcXVlc3RzLlxuICAgKi9cbiAgdGxzPzogYm9vbGVhbjtcbn1cblxuaW50ZXJmYWNlIFByZXZpb3VzbHlSZXNvbHZlZCB7XG4gIHJlZ2lvbkluZm9Qcm92aWRlcjogUmVnaW9uSW5mb1Byb3ZpZGVyO1xuICB1cmxQYXJzZXI6IFVybFBhcnNlcjtcbiAgcmVnaW9uOiBQcm92aWRlcjxzdHJpbmc+O1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIEVuZHBvaW50c1Jlc29sdmVkQ29uZmlnIGV4dGVuZHMgUmVxdWlyZWQ8RW5kcG9pbnRzSW5wdXRDb25maWc+IHtcbiAgZW5kcG9pbnQ6IFByb3ZpZGVyPEVuZHBvaW50PjtcbiAgaXNDdXN0b21FbmRwb2ludDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IHJlc29sdmVFbmRwb2ludHNDb25maWcgPSA8VD4oXG4gIGlucHV0OiBUICYgRW5kcG9pbnRzSW5wdXRDb25maWcgJiBQcmV2aW91c2x5UmVzb2x2ZWRcbik6IFQgJiBFbmRwb2ludHNSZXNvbHZlZENvbmZpZyA9PiAoe1xuICAuLi5pbnB1dCxcbiAgdGxzOiBpbnB1dC50bHMgPz8gdHJ1ZSxcbiAgZW5kcG9pbnQ6IGlucHV0LmVuZHBvaW50ID8gbm9ybWFsaXplRW5kcG9pbnQoaW5wdXQpIDogKCkgPT4gZ2V0RW5kUG9pbnRGcm9tUmVnaW9uKGlucHV0KSxcbiAgaXNDdXN0b21FbmRwb2ludDogaW5wdXQuZW5kcG9pbnQgPyB0cnVlIDogZmFsc2UsXG59KTtcblxuY29uc3Qgbm9ybWFsaXplRW5kcG9pbnQgPSAoaW5wdXQ6IEVuZHBvaW50c0lucHV0Q29uZmlnICYgUHJldmlvdXNseVJlc29sdmVkKTogUHJvdmlkZXI8RW5kcG9pbnQ+ID0+IHtcbiAgY29uc3QgeyBlbmRwb2ludCwgdXJsUGFyc2VyIH0gPSBpbnB1dDtcbiAgaWYgKHR5cGVvZiBlbmRwb2ludCA9PT0gXCJzdHJpbmdcIikge1xuICAgIGNvbnN0IHByb21pc2lmaWVkID0gUHJvbWlzZS5yZXNvbHZlKHVybFBhcnNlcihlbmRwb2ludCkpO1xuICAgIHJldHVybiAoKSA9PiBwcm9taXNpZmllZDtcbiAgfSBlbHNlIGlmICh0eXBlb2YgZW5kcG9pbnQgPT09IFwib2JqZWN0XCIpIHtcbiAgICBjb25zdCBwcm9taXNpZmllZCA9IFByb21pc2UucmVzb2x2ZShlbmRwb2ludCk7XG4gICAgcmV0dXJuICgpID0+IHByb21pc2lmaWVkO1xuICB9XG4gIHJldHVybiBlbmRwb2ludCE7XG59O1xuXG5jb25zdCBnZXRFbmRQb2ludEZyb21SZWdpb24gPSBhc3luYyAoaW5wdXQ6IEVuZHBvaW50c0lucHV0Q29uZmlnICYgUHJldmlvdXNseVJlc29sdmVkKSA9PiB7XG4gIGNvbnN0IHsgdGxzID0gdHJ1ZSB9ID0gaW5wdXQ7XG4gIGNvbnN0IHJlZ2lvbiA9IGF3YWl0IGlucHV0LnJlZ2lvbigpO1xuXG4gIGNvbnN0IGRuc0hvc3RSZWdleCA9IG5ldyBSZWdFeHAoL14oW2EtekEtWjAtOV18W2EtekEtWjAtOV1bYS16QS1aMC05LV17MCw2MX1bYS16QS1aMC05XSkkLyk7XG4gIGlmICghZG5zSG9zdFJlZ2V4LnRlc3QocmVnaW9uKSkge1xuICAgIHRocm93IG5ldyBFcnJvcihcIkludmFsaWQgcmVnaW9uIGluIGNsaWVudCBjb25maWdcIik7XG4gIH1cblxuICBjb25zdCB7IGhvc3RuYW1lIH0gPSAoYXdhaXQgaW5wdXQucmVnaW9uSW5mb1Byb3ZpZGVyKHJlZ2lvbikpID8/IHt9O1xuICBpZiAoIWhvc3RuYW1lKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiQ2Fubm90IHJlc29sdmUgaG9zdG5hbWUgZnJvbSBjbGllbnQgY29uZmlnXCIpO1xuICB9XG5cbiAgcmV0dXJuIGlucHV0LnVybFBhcnNlcihgJHt0bHMgPyBcImh0dHBzOlwiIDogXCJodHRwOlwifS8vJHtob3N0bmFtZX1gKTtcbn07XG4iXX0= + +/***/ }), + +/***/ 1977: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveRegionConfig = 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", +}; +const resolveRegionConfig = (input) => { + if (!input.region) { + throw new Error("Region is missing"); + } + return { + ...input, + region: normalizeRegion(input.region), + }; +}; +exports.resolveRegionConfig = resolveRegionConfig; +const normalizeRegion = (region) => { + if (typeof region === "string") { + const promisified = Promise.resolve(region); + return () => promisified; + } + return region; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaW9uQ29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL1JlZ2lvbkNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFHYSxRQUFBLGVBQWUsR0FBRyxZQUFZLENBQUM7QUFDL0IsUUFBQSxlQUFlLEdBQUcsUUFBUSxDQUFDO0FBRTNCLFFBQUEsMEJBQTBCLEdBQWtDO0lBQ3ZFLDJCQUEyQixFQUFFLENBQUMsR0FBRyxFQUFFLEVBQUUsQ0FBQyxHQUFHLENBQUMsdUJBQWUsQ0FBQztJQUMxRCxrQkFBa0IsRUFBRSxDQUFDLE9BQU8sRUFBRSxFQUFFLENBQUMsT0FBTyxDQUFDLHVCQUFlLENBQUM7SUFDekQsT0FBTyxFQUFFLEdBQUcsRUFBRTtRQUNaLE1BQU0sSUFBSSxLQUFLLENBQUMsbUJBQW1CLENBQUMsQ0FBQztJQUN2QyxDQUFDO0NBQ0YsQ0FBQztBQUVXLFFBQUEsK0JBQStCLEdBQXVCO0lBQ2pFLGFBQWEsRUFBRSxhQUFhO0NBQzdCLENBQUM7QUFlSyxNQUFNLG1CQUFtQixHQUFHLENBQUksS0FBaUQsRUFBNEIsRUFBRTtJQUNwSCxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sRUFBRTtRQUNqQixNQUFNLElBQUksS0FBSyxDQUFDLG1CQUFtQixDQUFDLENBQUM7S0FDdEM7SUFDRCxPQUFPO1FBQ0wsR0FBRyxLQUFLO1FBQ1IsTUFBTSxFQUFFLGVBQWUsQ0FBQyxLQUFLLENBQUMsTUFBTyxDQUFDO0tBQ3ZDLENBQUM7QUFDSixDQUFDLENBQUM7QUFSVyxRQUFBLG1CQUFtQix1QkFROUI7QUFFRixNQUFNLGVBQWUsR0FBRyxDQUFDLE1BQWlDLEVBQW9CLEVBQUU7SUFDOUUsSUFBSSxPQUFPLE1BQU0sS0FBSyxRQUFRLEVBQUU7UUFDOUIsTUFBTSxXQUFXLEdBQUcsT0FBTyxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUM1QyxPQUFPLEdBQUcsRUFBRSxDQUFDLFdBQVcsQ0FBQztLQUMxQjtJQUNELE9BQU8sTUFBMEIsQ0FBQztBQUNwQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBMb2FkZWRDb25maWdTZWxlY3RvcnMsIExvY2FsQ29uZmlnT3B0aW9ucyB9IGZyb20gXCJAYXdzLXNkay9ub2RlLWNvbmZpZy1wcm92aWRlclwiO1xuaW1wb3J0IHsgUHJvdmlkZXIgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGNvbnN0IFJFR0lPTl9FTlZfTkFNRSA9IFwiQVdTX1JFR0lPTlwiO1xuZXhwb3J0IGNvbnN0IFJFR0lPTl9JTklfTkFNRSA9IFwicmVnaW9uXCI7XG5cbmV4cG9ydCBjb25zdCBOT0RFX1JFR0lPTl9DT05GSUdfT1BUSU9OUzogTG9hZGVkQ29uZmlnU2VsZWN0b3JzPHN0cmluZz4gPSB7XG4gIGVudmlyb25tZW50VmFyaWFibGVTZWxlY3RvcjogKGVudikgPT4gZW52W1JFR0lPTl9FTlZfTkFNRV0sXG4gIGNvbmZpZ0ZpbGVTZWxlY3RvcjogKHByb2ZpbGUpID0+IHByb2ZpbGVbUkVHSU9OX0lOSV9OQU1FXSxcbiAgZGVmYXVsdDogKCkgPT4ge1xuICAgIHRocm93IG5ldyBFcnJvcihcIlJlZ2lvbiBpcyBtaXNzaW5nXCIpO1xuICB9LFxufTtcblxuZXhwb3J0IGNvbnN0IE5PREVfUkVHSU9OX0NPTkZJR19GSUxFX09QVElPTlM6IExvY2FsQ29uZmlnT3B0aW9ucyA9IHtcbiAgcHJlZmVycmVkRmlsZTogXCJjcmVkZW50aWFsc1wiLFxufTtcblxuZXhwb3J0IGludGVyZmFjZSBSZWdpb25JbnB1dENvbmZpZyB7XG4gIC8qKlxuICAgKiBUaGUgQVdTIHJlZ2lvbiB0byB3aGljaCB0aGlzIGNsaWVudCB3aWxsIHNlbmQgcmVxdWVzdHNcbiAgICovXG4gIHJlZ2lvbj86IHN0cmluZyB8IFByb3ZpZGVyPHN0cmluZz47XG59XG5cbmludGVyZmFjZSBQcmV2aW91c2x5UmVzb2x2ZWQge31cblxuZXhwb3J0IGludGVyZmFjZSBSZWdpb25SZXNvbHZlZENvbmZpZyB7XG4gIHJlZ2lvbjogUHJvdmlkZXI8c3RyaW5nPjtcbn1cblxuZXhwb3J0IGNvbnN0IHJlc29sdmVSZWdpb25Db25maWcgPSA8VD4oaW5wdXQ6IFQgJiBSZWdpb25JbnB1dENvbmZpZyAmIFByZXZpb3VzbHlSZXNvbHZlZCk6IFQgJiBSZWdpb25SZXNvbHZlZENvbmZpZyA9PiB7XG4gIGlmICghaW5wdXQucmVnaW9uKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiUmVnaW9uIGlzIG1pc3NpbmdcIik7XG4gIH1cbiAgcmV0dXJuIHtcbiAgICAuLi5pbnB1dCxcbiAgICByZWdpb246IG5vcm1hbGl6ZVJlZ2lvbihpbnB1dC5yZWdpb24hKSxcbiAgfTtcbn07XG5cbmNvbnN0IG5vcm1hbGl6ZVJlZ2lvbiA9IChyZWdpb246IHN0cmluZyB8IFByb3ZpZGVyPHN0cmluZz4pOiBQcm92aWRlcjxzdHJpbmc+ID0+IHtcbiAgaWYgKHR5cGVvZiByZWdpb24gPT09IFwic3RyaW5nXCIpIHtcbiAgICBjb25zdCBwcm9taXNpZmllZCA9IFByb21pc2UucmVzb2x2ZShyZWdpb24pO1xuICAgIHJldHVybiAoKSA9PiBwcm9taXNpZmllZDtcbiAgfVxuICByZXR1cm4gcmVnaW9uIGFzIFByb3ZpZGVyPHN0cmluZz47XG59O1xuIl19 + +/***/ }), + +/***/ 87229: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(445), exports); +tslib_1.__exportStar(__nccwpck_require__(1977), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNERBQWtDO0FBQ2xDLHlEQUErQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL0VuZHBvaW50c0NvbmZpZ1wiO1xuZXhwb3J0ICogZnJvbSBcIi4vUmVnaW9uQ29uZmlnXCI7XG4iXX0= + +/***/ }), + +/***/ 55886: +/***/ ((__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__(1014); +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"; +/** + * Source AWS credentials from known environment variables. If either the + * `AWS_ACCESS_KEY_ID` or `AWS_SECRET_ACCESS_KEY` environment variable is not + * set in this process, the provider will return a rejected promise. + */ +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.ProviderError("Unable to find environment variable credentials.")); + }; +} +exports.fromEnv = fromEnv; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQTJEO0FBRzlDLFFBQUEsT0FBTyxHQUFHLG1CQUFtQixDQUFDO0FBQzlCLFFBQUEsVUFBVSxHQUFHLHVCQUF1QixDQUFDO0FBQ3JDLFFBQUEsV0FBVyxHQUFHLG1CQUFtQixDQUFDO0FBQ2xDLFFBQUEsY0FBYyxHQUFHLDJCQUEyQixDQUFDO0FBRTFEOzs7O0dBSUc7QUFDSCxTQUFnQixPQUFPO0lBQ3JCLE9BQU8sR0FBRyxFQUFFO1FBQ1YsTUFBTSxXQUFXLEdBQXVCLE9BQU8sQ0FBQyxHQUFHLENBQUMsZUFBTyxDQUFDLENBQUM7UUFDN0QsTUFBTSxlQUFlLEdBQXVCLE9BQU8sQ0FBQyxHQUFHLENBQUMsa0JBQVUsQ0FBQyxDQUFDO1FBQ3BFLE1BQU0sTUFBTSxHQUF1QixPQUFPLENBQUMsR0FBRyxDQUFDLHNCQUFjLENBQUMsQ0FBQztRQUMvRCxJQUFJLFdBQVcsSUFBSSxlQUFlLEVBQUU7WUFDbEMsT0FBTyxPQUFPLENBQUMsT0FBTyxDQUFDO2dCQUNyQixXQUFXO2dCQUNYLGVBQWU7Z0JBQ2YsWUFBWSxFQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUMsbUJBQVcsQ0FBQztnQkFDdEMsVUFBVSxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUMsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLFNBQVM7YUFDbEQsQ0FBQyxDQUFDO1NBQ0o7UUFFRCxPQUFPLE9BQU8sQ0FBQyxNQUFNLENBQUMsSUFBSSxpQ0FBYSxDQUFDLGtEQUFrRCxDQUFDLENBQUMsQ0FBQztJQUMvRixDQUFDLENBQUM7QUFDSixDQUFDO0FBaEJELDBCQWdCQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFByb3ZpZGVyRXJyb3IgfSBmcm9tIFwiQGF3cy1zZGsvcHJvcGVydHktcHJvdmlkZXJcIjtcbmltcG9ydCB7IENyZWRlbnRpYWxQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgY29uc3QgRU5WX0tFWSA9IFwiQVdTX0FDQ0VTU19LRVlfSURcIjtcbmV4cG9ydCBjb25zdCBFTlZfU0VDUkVUID0gXCJBV1NfU0VDUkVUX0FDQ0VTU19LRVlcIjtcbmV4cG9ydCBjb25zdCBFTlZfU0VTU0lPTiA9IFwiQVdTX1NFU1NJT05fVE9LRU5cIjtcbmV4cG9ydCBjb25zdCBFTlZfRVhQSVJBVElPTiA9IFwiQVdTX0NSRURFTlRJQUxfRVhQSVJBVElPTlwiO1xuXG4vKipcbiAqIFNvdXJjZSBBV1MgY3JlZGVudGlhbHMgZnJvbSBrbm93biBlbnZpcm9ubWVudCB2YXJpYWJsZXMuIElmIGVpdGhlciB0aGVcbiAqIGBBV1NfQUNDRVNTX0tFWV9JRGAgb3IgYEFXU19TRUNSRVRfQUNDRVNTX0tFWWAgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90XG4gKiBzZXQgaW4gdGhpcyBwcm9jZXNzLCB0aGUgcHJvdmlkZXIgd2lsbCByZXR1cm4gYSByZWplY3RlZCBwcm9taXNlLlxuICovXG5leHBvcnQgZnVuY3Rpb24gZnJvbUVudigpOiBDcmVkZW50aWFsUHJvdmlkZXIge1xuICByZXR1cm4gKCkgPT4ge1xuICAgIGNvbnN0IGFjY2Vzc0tleUlkOiBzdHJpbmcgfCB1bmRlZmluZWQgPSBwcm9jZXNzLmVudltFTlZfS0VZXTtcbiAgICBjb25zdCBzZWNyZXRBY2Nlc3NLZXk6IHN0cmluZyB8IHVuZGVmaW5lZCA9IHByb2Nlc3MuZW52W0VOVl9TRUNSRVRdO1xuICAgIGNvbnN0IGV4cGlyeTogc3RyaW5nIHwgdW5kZWZpbmVkID0gcHJvY2Vzcy5lbnZbRU5WX0VYUElSQVRJT05dO1xuICAgIGlmIChhY2Nlc3NLZXlJZCAmJiBzZWNyZXRBY2Nlc3NLZXkpIHtcbiAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUoe1xuICAgICAgICBhY2Nlc3NLZXlJZCxcbiAgICAgICAgc2VjcmV0QWNjZXNzS2V5LFxuICAgICAgICBzZXNzaW9uVG9rZW46IHByb2Nlc3MuZW52W0VOVl9TRVNTSU9OXSxcbiAgICAgICAgZXhwaXJhdGlvbjogZXhwaXJ5ID8gbmV3IERhdGUoZXhwaXJ5KSA6IHVuZGVmaW5lZCxcbiAgICAgIH0pO1xuICAgIH1cblxuICAgIHJldHVybiBQcm9taXNlLnJlamVjdChuZXcgUHJvdmlkZXJFcnJvcihcIlVuYWJsZSB0byBmaW5kIGVudmlyb25tZW50IHZhcmlhYmxlIGNyZWRlbnRpYWxzLlwiKSk7XG4gIH07XG59XG4iXX0= + +/***/ }), + +/***/ 42262: +/***/ ((__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__(1014); +const url_1 = __nccwpck_require__(78835); +const httpRequest_1 = __nccwpck_require__(3593); +const ImdsCredentials_1 = __nccwpck_require__(75751); +const RemoteProviderInit_1 = __nccwpck_require__(29856); +const retry_1 = __nccwpck_require__(45724); +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"; +/** + * Creates a credential provider that will source credentials from the ECS + * Container Metadata Service + */ +function fromContainerMetadata(init = {}) { + const { timeout, maxRetries } = RemoteProviderInit_1.providerConfigFromInit(init); + return () => { + return getCmdsUri().then((url) => retry_1.retry(async () => { + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, url)); + if (!ImdsCredentials_1.isImdsCredentials(credsResponse)) { + throw new property_provider_1.ProviderError("Invalid response received from instance metadata service."); + } + return ImdsCredentials_1.fromImdsCredentials(credsResponse); + }, maxRetries)); + }; +} +exports.fromContainerMetadata = fromContainerMetadata; +function requestFromEcsImds(timeout, options) { + if (process.env[exports.ENV_CMDS_AUTH_TOKEN]) { + const { headers = {} } = options; + headers.Authorization = process.env[exports.ENV_CMDS_AUTH_TOKEN]; + options.headers = headers; + } + return httpRequest_1.httpRequest({ + ...options, + timeout, + }).then((buffer) => 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, +}; +function getCmdsUri() { + if (process.env[exports.ENV_CMDS_RELATIVE_URI]) { + return Promise.resolve({ + 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)) { + return Promise.reject(new property_provider_1.ProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, false)); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + return Promise.reject(new property_provider_1.ProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, false)); + } + return Promise.resolve({ + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : undefined, + }); + } + return Promise.reject(new property_provider_1.ProviderError("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)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUNvbnRhaW5lck1ldGFkYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Zyb21Db250YWluZXJNZXRhZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxrRUFBMkQ7QUFHM0QsNkJBQTRCO0FBRTVCLDhEQUEyRDtBQUMzRCxzRUFBMEY7QUFDMUYsNEVBQWlHO0FBQ2pHLGtEQUErQztBQUVsQyxRQUFBLGlCQUFpQixHQUFHLG9DQUFvQyxDQUFDO0FBQ3pELFFBQUEscUJBQXFCLEdBQUcsd0NBQXdDLENBQUM7QUFDakUsUUFBQSxtQkFBbUIsR0FBRyxtQ0FBbUMsQ0FBQztBQUV2RTs7O0dBR0c7QUFDSCxTQUFnQixxQkFBcUIsQ0FBQyxPQUEyQixFQUFFO0lBQ2pFLE1BQU0sRUFBRSxPQUFPLEVBQUUsVUFBVSxFQUFFLEdBQUcsMkNBQXNCLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDN0QsT0FBTyxHQUFHLEVBQUU7UUFDVixPQUFPLFVBQVUsRUFBRSxDQUFDLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxFQUFFLENBQy9CLGFBQUssQ0FBQyxLQUFLLElBQUksRUFBRTtZQUNmLE1BQU0sYUFBYSxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxrQkFBa0IsQ0FBQyxPQUFPLEVBQUUsR0FBRyxDQUFDLENBQUMsQ0FBQztZQUN6RSxJQUFJLENBQUMsbUNBQWlCLENBQUMsYUFBYSxDQUFDLEVBQUU7Z0JBQ3JDLE1BQU0sSUFBSSxpQ0FBYSxDQUFDLDJEQUEyRCxDQUFDLENBQUM7YUFDdEY7WUFFRCxPQUFPLHFDQUFtQixDQUFDLGFBQWEsQ0FBQyxDQUFDO1FBQzVDLENBQUMsRUFBRSxVQUFVLENBQUMsQ0FDZixDQUFDO0lBQ0osQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQWRELHNEQWNDO0FBRUQsU0FBUyxrQkFBa0IsQ0FBQyxPQUFlLEVBQUUsT0FBdUI7SUFDbEUsSUFBSSxPQUFPLENBQUMsR0FBRyxDQUFDLDJCQUFtQixDQUFDLEVBQUU7UUFDcEMsTUFBTSxFQUFFLE9BQU8sR0FBRyxFQUFFLEVBQUUsR0FBRyxPQUFPLENBQUM7UUFDakMsT0FBTyxDQUFDLGFBQWEsR0FBRyxPQUFPLENBQUMsR0FBRyxDQUFDLDJCQUFtQixDQUFDLENBQUM7UUFDekQsT0FBTyxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUM7S0FDM0I7SUFFRCxPQUFPLHlCQUFXLENBQUM7UUFDakIsR0FBRyxPQUFPO1FBQ1YsT0FBTztLQUNSLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxNQUFNLEVBQUUsRUFBRSxDQUFDLE1BQU0sQ0FBQyxRQUFRLEVBQUUsQ0FBQyxDQUFDO0FBQ3pDLENBQUM7QUFFRCxNQUFNLE9BQU8sR0FBRyxlQUFlLENBQUM7QUFDaEMsTUFBTSxnQkFBZ0IsR0FBRztJQUN2QixTQUFTLEVBQUUsSUFBSTtJQUNmLFdBQVcsRUFBRSxJQUFJO0NBQ2xCLENBQUM7QUFDRixNQUFNLG9CQUFvQixHQUFHO0lBQzNCLE9BQU8sRUFBRSxJQUFJO0lBQ2IsUUFBUSxFQUFFLElBQUk7Q0FDZixDQUFDO0FBRUYsU0FBUyxVQUFVO0lBQ2pCLElBQUksT0FBTyxDQUFDLEdBQUcsQ0FBQyw2QkFBcUIsQ0FBQyxFQUFFO1FBQ3RDLE9BQU8sT0FBTyxDQUFDLE9BQU8sQ0FBQztZQUNyQixRQUFRLEVBQUUsT0FBTztZQUNqQixJQUFJLEVBQUUsT0FBTyxDQUFDLEdBQUcsQ0FBQyw2QkFBcUIsQ0FBQztTQUN6QyxDQUFDLENBQUM7S0FDSjtJQUVELElBQUksT0FBTyxDQUFDLEdBQUcsQ0FBQyx5QkFBaUIsQ0FBQyxFQUFFO1FBQ2xDLE1BQU0sTUFBTSxHQUFHLFdBQUssQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLHlCQUFpQixDQUFFLENBQUMsQ0FBQztRQUN0RCxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsSUFBSSxDQUFDLENBQUMsTUFBTSxDQUFDLFFBQVEsSUFBSSxnQkFBZ0IsQ0FBQyxFQUFFO1lBQzlELE9BQU8sT0FBTyxDQUFDLE1BQU0sQ0FDbkIsSUFBSSxpQ0FBYSxDQUFDLEdBQUcsTUFBTSxDQUFDLFFBQVEscURBQXFELEVBQUUsS0FBSyxDQUFDLENBQ2xHLENBQUM7U0FDSDtRQUVELElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxJQUFJLENBQUMsQ0FBQyxNQUFNLENBQUMsUUFBUSxJQUFJLG9CQUFvQixDQUFDLEVBQUU7WUFDbEUsT0FBTyxPQUFPLENBQUMsTUFBTSxDQUNuQixJQUFJLGlDQUFhLENBQUMsR0FBRyxNQUFNLENBQUMsUUFBUSxxREFBcUQsRUFBRSxLQUFLLENBQUMsQ0FDbEcsQ0FBQztTQUNIO1FBRUQsT0FBTyxPQUFPLENBQUMsT0FBTyxDQUFDO1lBQ3JCLEdBQUcsTUFBTTtZQUNULElBQUksRUFBRSxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUztTQUMxRCxDQUFDLENBQUM7S0FDSjtJQUVELE9BQU8sT0FBTyxDQUFDLE1BQU0sQ0FDbkIsSUFBSSxpQ0FBYSxDQUNmLGtFQUFrRTtRQUNoRSxRQUFRLDZCQUFxQixPQUFPLHlCQUFpQixjQUFjO1FBQ25FLGtCQUFrQixFQUNwQixLQUFLLENBQ04sQ0FDRixDQUFDO0FBQ0osQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFByb3ZpZGVyRXJyb3IgfSBmcm9tIFwiQGF3cy1zZGsvcHJvcGVydHktcHJvdmlkZXJcIjtcbmltcG9ydCB7IENyZWRlbnRpYWxQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgUmVxdWVzdE9wdGlvbnMgfSBmcm9tIFwiaHR0cFwiO1xuaW1wb3J0IHsgcGFyc2UgfSBmcm9tIFwidXJsXCI7XG5cbmltcG9ydCB7IGh0dHBSZXF1ZXN0IH0gZnJvbSBcIi4vcmVtb3RlUHJvdmlkZXIvaHR0cFJlcXVlc3RcIjtcbmltcG9ydCB7IGZyb21JbWRzQ3JlZGVudGlhbHMsIGlzSW1kc0NyZWRlbnRpYWxzIH0gZnJvbSBcIi4vcmVtb3RlUHJvdmlkZXIvSW1kc0NyZWRlbnRpYWxzXCI7XG5pbXBvcnQgeyBwcm92aWRlckNvbmZpZ0Zyb21Jbml0LCBSZW1vdGVQcm92aWRlckluaXQgfSBmcm9tIFwiLi9yZW1vdGVQcm92aWRlci9SZW1vdGVQcm92aWRlckluaXRcIjtcbmltcG9ydCB7IHJldHJ5IH0gZnJvbSBcIi4vcmVtb3RlUHJvdmlkZXIvcmV0cnlcIjtcblxuZXhwb3J0IGNvbnN0IEVOVl9DTURTX0ZVTExfVVJJID0gXCJBV1NfQ09OVEFJTkVSX0NSRURFTlRJQUxTX0ZVTExfVVJJXCI7XG5leHBvcnQgY29uc3QgRU5WX0NNRFNfUkVMQVRJVkVfVVJJID0gXCJBV1NfQ09OVEFJTkVSX0NSRURFTlRJQUxTX1JFTEFUSVZFX1VSSVwiO1xuZXhwb3J0IGNvbnN0IEVOVl9DTURTX0FVVEhfVE9LRU4gPSBcIkFXU19DT05UQUlORVJfQVVUSE9SSVpBVElPTl9UT0tFTlwiO1xuXG4vKipcbiAqIENyZWF0ZXMgYSBjcmVkZW50aWFsIHByb3ZpZGVyIHRoYXQgd2lsbCBzb3VyY2UgY3JlZGVudGlhbHMgZnJvbSB0aGUgRUNTXG4gKiBDb250YWluZXIgTWV0YWRhdGEgU2VydmljZVxuICovXG5leHBvcnQgZnVuY3Rpb24gZnJvbUNvbnRhaW5lck1ldGFkYXRhKGluaXQ6IFJlbW90ZVByb3ZpZGVySW5pdCA9IHt9KTogQ3JlZGVudGlhbFByb3ZpZGVyIHtcbiAgY29uc3QgeyB0aW1lb3V0LCBtYXhSZXRyaWVzIH0gPSBwcm92aWRlckNvbmZpZ0Zyb21Jbml0KGluaXQpO1xuICByZXR1cm4gKCkgPT4ge1xuICAgIHJldHVybiBnZXRDbWRzVXJpKCkudGhlbigodXJsKSA9PlxuICAgICAgcmV0cnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBjb25zdCBjcmVkc1Jlc3BvbnNlID0gSlNPTi5wYXJzZShhd2FpdCByZXF1ZXN0RnJvbUVjc0ltZHModGltZW91dCwgdXJsKSk7XG4gICAgICAgIGlmICghaXNJbWRzQ3JlZGVudGlhbHMoY3JlZHNSZXNwb25zZSkpIHtcbiAgICAgICAgICB0aHJvdyBuZXcgUHJvdmlkZXJFcnJvcihcIkludmFsaWQgcmVzcG9uc2UgcmVjZWl2ZWQgZnJvbSBpbnN0YW5jZSBtZXRhZGF0YSBzZXJ2aWNlLlwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBmcm9tSW1kc0NyZWRlbnRpYWxzKGNyZWRzUmVzcG9uc2UpO1xuICAgICAgfSwgbWF4UmV0cmllcylcbiAgICApO1xuICB9O1xufVxuXG5mdW5jdGlvbiByZXF1ZXN0RnJvbUVjc0ltZHModGltZW91dDogbnVtYmVyLCBvcHRpb25zOiBSZXF1ZXN0T3B0aW9ucyk6IFByb21pc2U8c3RyaW5nPiB7XG4gIGlmIChwcm9jZXNzLmVudltFTlZfQ01EU19BVVRIX1RPS0VOXSkge1xuICAgIGNvbnN0IHsgaGVhZGVycyA9IHt9IH0gPSBvcHRpb25zO1xuICAgIGhlYWRlcnMuQXV0aG9yaXphdGlvbiA9IHByb2Nlc3MuZW52W0VOVl9DTURTX0FVVEhfVE9LRU5dO1xuICAgIG9wdGlvbnMuaGVhZGVycyA9IGhlYWRlcnM7XG4gIH1cblxuICByZXR1cm4gaHR0cFJlcXVlc3Qoe1xuICAgIC4uLm9wdGlvbnMsXG4gICAgdGltZW91dCxcbiAgfSkudGhlbigoYnVmZmVyKSA9PiBidWZmZXIudG9TdHJpbmcoKSk7XG59XG5cbmNvbnN0IENNRFNfSVAgPSBcIjE2OS4yNTQuMTcwLjJcIjtcbmNvbnN0IEdSRUVOR1JBU1NfSE9TVFMgPSB7XG4gIGxvY2FsaG9zdDogdHJ1ZSxcbiAgXCIxMjcuMC4wLjFcIjogdHJ1ZSxcbn07XG5jb25zdCBHUkVFTkdSQVNTX1BST1RPQ09MUyA9IHtcbiAgXCJodHRwOlwiOiB0cnVlLFxuICBcImh0dHBzOlwiOiB0cnVlLFxufTtcblxuZnVuY3Rpb24gZ2V0Q21kc1VyaSgpOiBQcm9taXNlPFJlcXVlc3RPcHRpb25zPiB7XG4gIGlmIChwcm9jZXNzLmVudltFTlZfQ01EU19SRUxBVElWRV9VUkldKSB7XG4gICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZSh7XG4gICAgICBob3N0bmFtZTogQ01EU19JUCxcbiAgICAgIHBhdGg6IHByb2Nlc3MuZW52W0VOVl9DTURTX1JFTEFUSVZFX1VSSV0sXG4gICAgfSk7XG4gIH1cblxuICBpZiAocHJvY2Vzcy5lbnZbRU5WX0NNRFNfRlVMTF9VUkldKSB7XG4gICAgY29uc3QgcGFyc2VkID0gcGFyc2UocHJvY2Vzcy5lbnZbRU5WX0NNRFNfRlVMTF9VUkldISk7XG4gICAgaWYgKCFwYXJzZWQuaG9zdG5hbWUgfHwgIShwYXJzZWQuaG9zdG5hbWUgaW4gR1JFRU5HUkFTU19IT1NUUykpIHtcbiAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChcbiAgICAgICAgbmV3IFByb3ZpZGVyRXJyb3IoYCR7cGFyc2VkLmhvc3RuYW1lfSBpcyBub3QgYSB2YWxpZCBjb250YWluZXIgbWV0YWRhdGEgc2VydmljZSBob3N0bmFtZWAsIGZhbHNlKVxuICAgICAgKTtcbiAgICB9XG5cbiAgICBpZiAoIXBhcnNlZC5wcm90b2NvbCB8fCAhKHBhcnNlZC5wcm90b2NvbCBpbiBHUkVFTkdSQVNTX1BST1RPQ09MUykpIHtcbiAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChcbiAgICAgICAgbmV3IFByb3ZpZGVyRXJyb3IoYCR7cGFyc2VkLnByb3RvY29sfSBpcyBub3QgYSB2YWxpZCBjb250YWluZXIgbWV0YWRhdGEgc2VydmljZSBwcm90b2NvbGAsIGZhbHNlKVxuICAgICAgKTtcbiAgICB9XG5cbiAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKHtcbiAgICAgIC4uLnBhcnNlZCxcbiAgICAgIHBvcnQ6IHBhcnNlZC5wb3J0ID8gcGFyc2VJbnQocGFyc2VkLnBvcnQsIDEwKSA6IHVuZGVmaW5lZCxcbiAgICB9KTtcbiAgfVxuXG4gIHJldHVybiBQcm9taXNlLnJlamVjdChcbiAgICBuZXcgUHJvdmlkZXJFcnJvcihcbiAgICAgIFwiVGhlIGNvbnRhaW5lciBtZXRhZGF0YSBjcmVkZW50aWFsIHByb3ZpZGVyIGNhbm5vdCBiZSB1c2VkIHVubGVzc1wiICtcbiAgICAgICAgYCB0aGUgJHtFTlZfQ01EU19SRUxBVElWRV9VUkl9IG9yICR7RU5WX0NNRFNfRlVMTF9VUkl9IGVudmlyb25tZW50YCArXG4gICAgICAgIFwiIHZhcmlhYmxlIGlzIHNldFwiLFxuICAgICAgZmFsc2VcbiAgICApXG4gICk7XG59XG4iXX0= + +/***/ }), + +/***/ 73695: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromInstanceMetadata = void 0; +const property_provider_1 = __nccwpck_require__(1014); +const httpRequest_1 = __nccwpck_require__(3593); +const ImdsCredentials_1 = __nccwpck_require__(75751); +const RemoteProviderInit_1 = __nccwpck_require__(29856); +const retry_1 = __nccwpck_require__(45724); +const IMDS_IP = "169.254.169.254"; +const IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; +const IMDS_TOKEN_PATH = "/latest/api/token"; +/** + * Creates a credential provider that will source credentials from the EC2 + * Instance Metadata Service + */ +const fromInstanceMetadata = (init = {}) => { + // when set to true, metadata service will not fetch token + 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 () => { + if (disableFetchToken) { + return getCredentials(maxRetries, { timeout }); + } + else { + let token; + try { + token = (await getMetadataToken({ 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, { timeout }); + } + return getCredentials(maxRetries, { + timeout, + headers: { + "x-aws-ec2-metadata-token": token, + }, + }); + } + }; +}; +exports.fromInstanceMetadata = fromInstanceMetadata; +const getMetadataToken = async (options) => httpRequest_1.httpRequest({ + ...options, + host: IMDS_IP, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600", + }, +}); +const getProfile = async (options) => (await httpRequest_1.httpRequest({ ...options, host: IMDS_IP, path: IMDS_PATH })).toString(); +const getCredentialsFromProfile = async (profile, options) => { + const credsResponse = JSON.parse((await httpRequest_1.httpRequest({ + ...options, + host: IMDS_IP, + path: IMDS_PATH + profile, + })).toString()); + if (!ImdsCredentials_1.isImdsCredentials(credsResponse)) { + throw new property_provider_1.ProviderError("Invalid response received from instance metadata service."); + } + return ImdsCredentials_1.fromImdsCredentials(credsResponse); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUluc3RhbmNlTWV0YWRhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZnJvbUluc3RhbmNlTWV0YWRhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQTJEO0FBSTNELDhEQUEyRDtBQUMzRCxzRUFBMEY7QUFDMUYsNEVBQWlHO0FBQ2pHLGtEQUErQztBQUUvQyxNQUFNLE9BQU8sR0FBRyxpQkFBaUIsQ0FBQztBQUNsQyxNQUFNLFNBQVMsR0FBRyw2Q0FBNkMsQ0FBQztBQUNoRSxNQUFNLGVBQWUsR0FBRyxtQkFBbUIsQ0FBQztBQUU1Qzs7O0dBR0c7QUFDSSxNQUFNLG9CQUFvQixHQUFHLENBQUMsT0FBMkIsRUFBRSxFQUFzQixFQUFFO0lBQ3hGLDBEQUEwRDtJQUMxRCxJQUFJLGlCQUFpQixHQUFHLEtBQUssQ0FBQztJQUM5QixNQUFNLEVBQUUsT0FBTyxFQUFFLFVBQVUsRUFBRSxHQUFHLDJDQUFzQixDQUFDLElBQUksQ0FBQyxDQUFDO0lBRTdELE1BQU0sY0FBYyxHQUFHLEtBQUssRUFBRSxVQUFrQixFQUFFLE9BQXVCLEVBQUUsRUFBRTtRQUMzRSxNQUFNLE9BQU8sR0FBRyxDQUNkLE1BQU0sYUFBSyxDQUFTLEtBQUssSUFBSSxFQUFFO1lBQzdCLElBQUksT0FBZSxDQUFDO1lBQ3BCLElBQUk7Z0JBQ0YsT0FBTyxHQUFHLE1BQU0sVUFBVSxDQUFDLE9BQU8sQ0FBQyxDQUFDO2FBQ3JDO1lBQUMsT0FBTyxHQUFHLEVBQUU7Z0JBQ1osSUFBSSxHQUFHLENBQUMsVUFBVSxLQUFLLEdBQUcsRUFBRTtvQkFDMUIsaUJBQWlCLEdBQUcsS0FBSyxDQUFDO2lCQUMzQjtnQkFDRCxNQUFNLEdBQUcsQ0FBQzthQUNYO1lBQ0QsT0FBTyxPQUFPLENBQUM7UUFDakIsQ0FBQyxFQUFFLFVBQVUsQ0FBQyxDQUNmLENBQUMsSUFBSSxFQUFFLENBQUM7UUFFVCxPQUFPLGFBQUssQ0FBQyxLQUFLLElBQUksRUFBRTtZQUN0QixJQUFJLEtBQWtCLENBQUM7WUFDdkIsSUFBSTtnQkFDRixLQUFLLEdBQUcsTUFBTSx5QkFBeUIsQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7YUFDM0Q7WUFBQyxPQUFPLEdBQUcsRUFBRTtnQkFDWixJQUFJLEdBQUcsQ0FBQyxVQUFVLEtBQUssR0FBRyxFQUFFO29CQUMxQixpQkFBaUIsR0FBRyxLQUFLLENBQUM7aUJBQzNCO2dCQUNELE1BQU0sR0FBRyxDQUFDO2FBQ1g7WUFDRCxPQUFPLEtBQUssQ0FBQztRQUNmLENBQUMsRUFBRSxVQUFVLENBQUMsQ0FBQztJQUNqQixDQUFDLENBQUM7SUFFRixPQUFPLEtBQUssSUFBSSxFQUFFO1FBQ2hCLElBQUksaUJBQWlCLEVBQUU7WUFDckIsT0FBTyxjQUFjLENBQUMsVUFBVSxFQUFFLEVBQUUsT0FBTyxFQUFFLENBQUMsQ0FBQztTQUNoRDthQUFNO1lBQ0wsSUFBSSxLQUFhLENBQUM7WUFDbEIsSUFBSTtnQkFDRixLQUFLLEdBQUcsQ0FBQyxNQUFNLGdCQUFnQixDQUFDLEVBQUUsT0FBTyxFQUFFLENBQUMsQ0FBQyxDQUFDLFFBQVEsRUFBRSxDQUFDO2FBQzFEO1lBQUMsT0FBTyxLQUFLLEVBQUU7Z0JBQ2QsSUFBSSxDQUFBLEtBQUssYUFBTCxLQUFLLHVCQUFMLEtBQUssQ0FBRSxVQUFVLE1BQUssR0FBRyxFQUFFO29CQUM3QixNQUFNLE1BQU0sQ0FBQyxNQUFNLENBQUMsS0FBSyxFQUFFO3dCQUN6QixPQUFPLEVBQUUsMkNBQTJDO3FCQUNyRCxDQUFDLENBQUM7aUJBQ0o7cUJBQU0sSUFBSSxLQUFLLENBQUMsT0FBTyxLQUFLLGNBQWMsSUFBSSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsRUFBRTtvQkFDekYsaUJBQWlCLEdBQUcsSUFBSSxDQUFDO2lCQUMxQjtnQkFDRCxPQUFPLGNBQWMsQ0FBQyxVQUFVLEVBQUUsRUFBRSxPQUFPLEVBQUUsQ0FBQyxDQUFDO2FBQ2hEO1lBQ0QsT0FBTyxjQUFjLENBQUMsVUFBVSxFQUFFO2dCQUNoQyxPQUFPO2dCQUNQLE9BQU8sRUFBRTtvQkFDUCwwQkFBMEIsRUFBRSxLQUFLO2lCQUNsQzthQUNGLENBQUMsQ0FBQztTQUNKO0lBQ0gsQ0FBQyxDQUFDO0FBQ0osQ0FBQyxDQUFDO0FBNURXLFFBQUEsb0JBQW9CLHdCQTREL0I7QUFFRixNQUFNLGdCQUFnQixHQUFHLEtBQUssRUFBRSxPQUF1QixFQUFFLEVBQUUsQ0FDekQseUJBQVcsQ0FBQztJQUNWLEdBQUcsT0FBTztJQUNWLElBQUksRUFBRSxPQUFPO0lBQ2IsSUFBSSxFQUFFLGVBQWU7SUFDckIsTUFBTSxFQUFFLEtBQUs7SUFDYixPQUFPLEVBQUU7UUFDUCxzQ0FBc0MsRUFBRSxPQUFPO0tBQ2hEO0NBQ0YsQ0FBQyxDQUFDO0FBRUwsTUFBTSxVQUFVLEdBQUcsS0FBSyxFQUFFLE9BQXVCLEVBQUUsRUFBRSxDQUNuRCxDQUFDLE1BQU0seUJBQVcsQ0FBQyxFQUFFLEdBQUcsT0FBTyxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLFNBQVMsRUFBRSxDQUFDLENBQUMsQ0FBQyxRQUFRLEVBQUUsQ0FBQztBQUVqRixNQUFNLHlCQUF5QixHQUFHLEtBQUssRUFBRSxPQUFlLEVBQUUsT0FBdUIsRUFBRSxFQUFFO0lBQ25GLE1BQU0sYUFBYSxHQUFHLElBQUksQ0FBQyxLQUFLLENBQzlCLENBQ0UsTUFBTSx5QkFBVyxDQUFDO1FBQ2hCLEdBQUcsT0FBTztRQUNWLElBQUksRUFBRSxPQUFPO1FBQ2IsSUFBSSxFQUFFLFNBQVMsR0FBRyxPQUFPO0tBQzFCLENBQUMsQ0FDSCxDQUFDLFFBQVEsRUFBRSxDQUNiLENBQUM7SUFFRixJQUFJLENBQUMsbUNBQWlCLENBQUMsYUFBYSxDQUFDLEVBQUU7UUFDckMsTUFBTSxJQUFJLGlDQUFhLENBQUMsMkRBQTJELENBQUMsQ0FBQztLQUN0RjtJQUVELE9BQU8scUNBQW1CLENBQUMsYUFBYSxDQUFDLENBQUM7QUFDNUMsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUHJvdmlkZXJFcnJvciB9IGZyb20gXCJAYXdzLXNkay9wcm9wZXJ0eS1wcm92aWRlclwiO1xuaW1wb3J0IHsgQ3JlZGVudGlhbFByb3ZpZGVyLCBDcmVkZW50aWFscyB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgUmVxdWVzdE9wdGlvbnMgfSBmcm9tIFwiaHR0cFwiO1xuXG5pbXBvcnQgeyBodHRwUmVxdWVzdCB9IGZyb20gXCIuL3JlbW90ZVByb3ZpZGVyL2h0dHBSZXF1ZXN0XCI7XG5pbXBvcnQgeyBmcm9tSW1kc0NyZWRlbnRpYWxzLCBpc0ltZHNDcmVkZW50aWFscyB9IGZyb20gXCIuL3JlbW90ZVByb3ZpZGVyL0ltZHNDcmVkZW50aWFsc1wiO1xuaW1wb3J0IHsgcHJvdmlkZXJDb25maWdGcm9tSW5pdCwgUmVtb3RlUHJvdmlkZXJJbml0IH0gZnJvbSBcIi4vcmVtb3RlUHJvdmlkZXIvUmVtb3RlUHJvdmlkZXJJbml0XCI7XG5pbXBvcnQgeyByZXRyeSB9IGZyb20gXCIuL3JlbW90ZVByb3ZpZGVyL3JldHJ5XCI7XG5cbmNvbnN0IElNRFNfSVAgPSBcIjE2OS4yNTQuMTY5LjI1NFwiO1xuY29uc3QgSU1EU19QQVRIID0gXCIvbGF0ZXN0L21ldGEtZGF0YS9pYW0vc2VjdXJpdHktY3JlZGVudGlhbHMvXCI7XG5jb25zdCBJTURTX1RPS0VOX1BBVEggPSBcIi9sYXRlc3QvYXBpL3Rva2VuXCI7XG5cbi8qKlxuICogQ3JlYXRlcyBhIGNyZWRlbnRpYWwgcHJvdmlkZXIgdGhhdCB3aWxsIHNvdXJjZSBjcmVkZW50aWFscyBmcm9tIHRoZSBFQzJcbiAqIEluc3RhbmNlIE1ldGFkYXRhIFNlcnZpY2VcbiAqL1xuZXhwb3J0IGNvbnN0IGZyb21JbnN0YW5jZU1ldGFkYXRhID0gKGluaXQ6IFJlbW90ZVByb3ZpZGVySW5pdCA9IHt9KTogQ3JlZGVudGlhbFByb3ZpZGVyID0+IHtcbiAgLy8gd2hlbiBzZXQgdG8gdHJ1ZSwgbWV0YWRhdGEgc2VydmljZSB3aWxsIG5vdCBmZXRjaCB0b2tlblxuICBsZXQgZGlzYWJsZUZldGNoVG9rZW4gPSBmYWxzZTtcbiAgY29uc3QgeyB0aW1lb3V0LCBtYXhSZXRyaWVzIH0gPSBwcm92aWRlckNvbmZpZ0Zyb21Jbml0KGluaXQpO1xuXG4gIGNvbnN0IGdldENyZWRlbnRpYWxzID0gYXN5bmMgKG1heFJldHJpZXM6IG51bWJlciwgb3B0aW9uczogUmVxdWVzdE9wdGlvbnMpID0+IHtcbiAgICBjb25zdCBwcm9maWxlID0gKFxuICAgICAgYXdhaXQgcmV0cnk8c3RyaW5nPihhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBwcm9maWxlOiBzdHJpbmc7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcHJvZmlsZSA9IGF3YWl0IGdldFByb2ZpbGUob3B0aW9ucyk7XG4gICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgIGlmIChlcnIuc3RhdHVzQ29kZSA9PT0gNDAxKSB7XG4gICAgICAgICAgICBkaXNhYmxlRmV0Y2hUb2tlbiA9IGZhbHNlO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHByb2ZpbGU7XG4gICAgICB9LCBtYXhSZXRyaWVzKVxuICAgICkudHJpbSgpO1xuXG4gICAgcmV0dXJuIHJldHJ5KGFzeW5jICgpID0+IHtcbiAgICAgIGxldCBjcmVkczogQ3JlZGVudGlhbHM7XG4gICAgICB0cnkge1xuICAgICAgICBjcmVkcyA9IGF3YWl0IGdldENyZWRlbnRpYWxzRnJvbVByb2ZpbGUocHJvZmlsZSwgb3B0aW9ucyk7XG4gICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgaWYgKGVyci5zdGF0dXNDb2RlID09PSA0MDEpIHtcbiAgICAgICAgICBkaXNhYmxlRmV0Y2hUb2tlbiA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHRocm93IGVycjtcbiAgICAgIH1cbiAgICAgIHJldHVybiBjcmVkcztcbiAgICB9LCBtYXhSZXRyaWVzKTtcbiAgfTtcblxuICByZXR1cm4gYXN5bmMgKCkgPT4ge1xuICAgIGlmIChkaXNhYmxlRmV0Y2hUb2tlbikge1xuICAgICAgcmV0dXJuIGdldENyZWRlbnRpYWxzKG1heFJldHJpZXMsIHsgdGltZW91dCB9KTtcbiAgICB9IGVsc2Uge1xuICAgICAgbGV0IHRva2VuOiBzdHJpbmc7XG4gICAgICB0cnkge1xuICAgICAgICB0b2tlbiA9IChhd2FpdCBnZXRNZXRhZGF0YVRva2VuKHsgdGltZW91dCB9KSkudG9TdHJpbmcoKTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgIGlmIChlcnJvcj8uc3RhdHVzQ29kZSA9PT0gNDAwKSB7XG4gICAgICAgICAgdGhyb3cgT2JqZWN0LmFzc2lnbihlcnJvciwge1xuICAgICAgICAgICAgbWVzc2FnZTogXCJFQzIgTWV0YWRhdGEgdG9rZW4gcmVxdWVzdCByZXR1cm5lZCBlcnJvclwiLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2UgaWYgKGVycm9yLm1lc3NhZ2UgPT09IFwiVGltZW91dEVycm9yXCIgfHwgWzQwMywgNDA0LCA0MDVdLmluY2x1ZGVzKGVycm9yLnN0YXR1c0NvZGUpKSB7XG4gICAgICAgICAgZGlzYWJsZUZldGNoVG9rZW4gPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBnZXRDcmVkZW50aWFscyhtYXhSZXRyaWVzLCB7IHRpbWVvdXQgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gZ2V0Q3JlZGVudGlhbHMobWF4UmV0cmllcywge1xuICAgICAgICB0aW1lb3V0LFxuICAgICAgICBoZWFkZXJzOiB7XG4gICAgICAgICAgXCJ4LWF3cy1lYzItbWV0YWRhdGEtdG9rZW5cIjogdG9rZW4sXG4gICAgICAgIH0sXG4gICAgICB9KTtcbiAgICB9XG4gIH07XG59O1xuXG5jb25zdCBnZXRNZXRhZGF0YVRva2VuID0gYXN5bmMgKG9wdGlvbnM6IFJlcXVlc3RPcHRpb25zKSA9PlxuICBodHRwUmVxdWVzdCh7XG4gICAgLi4ub3B0aW9ucyxcbiAgICBob3N0OiBJTURTX0lQLFxuICAgIHBhdGg6IElNRFNfVE9LRU5fUEFUSCxcbiAgICBtZXRob2Q6IFwiUFVUXCIsXG4gICAgaGVhZGVyczoge1xuICAgICAgXCJ4LWF3cy1lYzItbWV0YWRhdGEtdG9rZW4tdHRsLXNlY29uZHNcIjogXCIyMTYwMFwiLFxuICAgIH0sXG4gIH0pO1xuXG5jb25zdCBnZXRQcm9maWxlID0gYXN5bmMgKG9wdGlvbnM6IFJlcXVlc3RPcHRpb25zKSA9PlxuICAoYXdhaXQgaHR0cFJlcXVlc3QoeyAuLi5vcHRpb25zLCBob3N0OiBJTURTX0lQLCBwYXRoOiBJTURTX1BBVEggfSkpLnRvU3RyaW5nKCk7XG5cbmNvbnN0IGdldENyZWRlbnRpYWxzRnJvbVByb2ZpbGUgPSBhc3luYyAocHJvZmlsZTogc3RyaW5nLCBvcHRpb25zOiBSZXF1ZXN0T3B0aW9ucykgPT4ge1xuICBjb25zdCBjcmVkc1Jlc3BvbnNlID0gSlNPTi5wYXJzZShcbiAgICAoXG4gICAgICBhd2FpdCBodHRwUmVxdWVzdCh7XG4gICAgICAgIC4uLm9wdGlvbnMsXG4gICAgICAgIGhvc3Q6IElNRFNfSVAsXG4gICAgICAgIHBhdGg6IElNRFNfUEFUSCArIHByb2ZpbGUsXG4gICAgICB9KVxuICAgICkudG9TdHJpbmcoKVxuICApO1xuXG4gIGlmICghaXNJbWRzQ3JlZGVudGlhbHMoY3JlZHNSZXNwb25zZSkpIHtcbiAgICB0aHJvdyBuZXcgUHJvdmlkZXJFcnJvcihcIkludmFsaWQgcmVzcG9uc2UgcmVjZWl2ZWQgZnJvbSBpbnN0YW5jZSBtZXRhZGF0YSBzZXJ2aWNlLlwiKTtcbiAgfVxuXG4gIHJldHVybiBmcm9tSW1kc0NyZWRlbnRpYWxzKGNyZWRzUmVzcG9uc2UpO1xufTtcbiJdfQ== + +/***/ }), + +/***/ 21732: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(42262), exports); +tslib_1.__exportStar(__nccwpck_require__(73695), exports); +tslib_1.__exportStar(__nccwpck_require__(29856), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQXdDO0FBQ3hDLGlFQUF1QztBQUN2Qyw4RUFBb0QiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9mcm9tQ29udGFpbmVyTWV0YWRhdGFcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2Zyb21JbnN0YW5jZU1ldGFkYXRhXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9yZW1vdGVQcm92aWRlci9SZW1vdGVQcm92aWRlckluaXRcIjtcbiJdfQ== + +/***/ }), + +/***/ 75751: +/***/ ((__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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW1kc0NyZWRlbnRpYWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3JlbW90ZVByb3ZpZGVyL0ltZHNDcmVkZW50aWFscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFTTyxNQUFNLGlCQUFpQixHQUFHLENBQUMsR0FBUSxFQUEwQixFQUFFLENBQ3BFLE9BQU8sQ0FBQyxHQUFHLENBQUM7SUFDWixPQUFPLEdBQUcsS0FBSyxRQUFRO0lBQ3ZCLE9BQU8sR0FBRyxDQUFDLFdBQVcsS0FBSyxRQUFRO0lBQ25DLE9BQU8sR0FBRyxDQUFDLGVBQWUsS0FBSyxRQUFRO0lBQ3ZDLE9BQU8sR0FBRyxDQUFDLEtBQUssS0FBSyxRQUFRO0lBQzdCLE9BQU8sR0FBRyxDQUFDLFVBQVUsS0FBSyxRQUFRLENBQUM7QUFOeEIsUUFBQSxpQkFBaUIscUJBTU87QUFFOUIsTUFBTSxtQkFBbUIsR0FBRyxDQUFDLEtBQXNCLEVBQWUsRUFBRSxDQUFDLENBQUM7SUFDM0UsV0FBVyxFQUFFLEtBQUssQ0FBQyxXQUFXO0lBQzlCLGVBQWUsRUFBRSxLQUFLLENBQUMsZUFBZTtJQUN0QyxZQUFZLEVBQUUsS0FBSyxDQUFDLEtBQUs7SUFDekIsVUFBVSxFQUFFLElBQUksSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUM7Q0FDdkMsQ0FBQyxDQUFDO0FBTFUsUUFBQSxtQkFBbUIsdUJBSzdCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ3JlZGVudGlhbHMgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGludGVyZmFjZSBJbWRzQ3JlZGVudGlhbHMge1xuICBBY2Nlc3NLZXlJZDogc3RyaW5nO1xuICBTZWNyZXRBY2Nlc3NLZXk6IHN0cmluZztcbiAgVG9rZW46IHN0cmluZztcbiAgRXhwaXJhdGlvbjogc3RyaW5nO1xufVxuXG5leHBvcnQgY29uc3QgaXNJbWRzQ3JlZGVudGlhbHMgPSAoYXJnOiBhbnkpOiBhcmcgaXMgSW1kc0NyZWRlbnRpYWxzID0+XG4gIEJvb2xlYW4oYXJnKSAmJlxuICB0eXBlb2YgYXJnID09PSBcIm9iamVjdFwiICYmXG4gIHR5cGVvZiBhcmcuQWNjZXNzS2V5SWQgPT09IFwic3RyaW5nXCIgJiZcbiAgdHlwZW9mIGFyZy5TZWNyZXRBY2Nlc3NLZXkgPT09IFwic3RyaW5nXCIgJiZcbiAgdHlwZW9mIGFyZy5Ub2tlbiA9PT0gXCJzdHJpbmdcIiAmJlxuICB0eXBlb2YgYXJnLkV4cGlyYXRpb24gPT09IFwic3RyaW5nXCI7XG5cbmV4cG9ydCBjb25zdCBmcm9tSW1kc0NyZWRlbnRpYWxzID0gKGNyZWRzOiBJbWRzQ3JlZGVudGlhbHMpOiBDcmVkZW50aWFscyA9PiAoe1xuICBhY2Nlc3NLZXlJZDogY3JlZHMuQWNjZXNzS2V5SWQsXG4gIHNlY3JldEFjY2Vzc0tleTogY3JlZHMuU2VjcmV0QWNjZXNzS2V5LFxuICBzZXNzaW9uVG9rZW46IGNyZWRzLlRva2VuLFxuICBleHBpcmF0aW9uOiBuZXcgRGF0ZShjcmVkcy5FeHBpcmF0aW9uKSxcbn0pO1xuIl19 + +/***/ }), + +/***/ 29856: +/***/ ((__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; +// The default in AWS SDK for Python and CLI (botocore) is no retry or one attempt +// https://github.com/boto/botocore/blob/646c61a7065933e75bab545b785e6098bc94c081/botocore/utils.py#L273 +exports.DEFAULT_MAX_RETRIES = 0; +const providerConfigFromInit = ({ maxRetries = exports.DEFAULT_MAX_RETRIES, timeout = exports.DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout }); +exports.providerConfigFromInit = providerConfigFromInit; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVtb3RlUHJvdmlkZXJJbml0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3JlbW90ZVByb3ZpZGVyL1JlbW90ZVByb3ZpZGVySW5pdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLGVBQWUsR0FBRyxJQUFJLENBQUM7QUFFcEMsa0ZBQWtGO0FBQ2xGLHdHQUF3RztBQUMzRixRQUFBLG1CQUFtQixHQUFHLENBQUMsQ0FBQztBQWdCOUIsTUFBTSxzQkFBc0IsR0FBRyxDQUFDLEVBQ3JDLFVBQVUsR0FBRywyQkFBbUIsRUFDaEMsT0FBTyxHQUFHLHVCQUFlLEdBQ04sRUFBd0IsRUFBRSxDQUFDLENBQUMsRUFBRSxVQUFVLEVBQUUsT0FBTyxFQUFFLENBQUMsQ0FBQztBQUg3RCxRQUFBLHNCQUFzQiwwQkFHdUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgREVGQVVMVF9USU1FT1VUID0gMTAwMDtcblxuLy8gVGhlIGRlZmF1bHQgaW4gQVdTIFNESyBmb3IgUHl0aG9uIGFuZCBDTEkgKGJvdG9jb3JlKSBpcyBubyByZXRyeSBvciBvbmUgYXR0ZW1wdFxuLy8gaHR0cHM6Ly9naXRodWIuY29tL2JvdG8vYm90b2NvcmUvYmxvYi82NDZjNjFhNzA2NTkzM2U3NWJhYjU0NWI3ODVlNjA5OGJjOTRjMDgxL2JvdG9jb3JlL3V0aWxzLnB5I0wyNzNcbmV4cG9ydCBjb25zdCBERUZBVUxUX01BWF9SRVRSSUVTID0gMDtcblxuZXhwb3J0IGludGVyZmFjZSBSZW1vdGVQcm92aWRlckNvbmZpZyB7XG4gIC8qKlxuICAgKiBUaGUgY29ubmVjdGlvbiB0aW1lb3V0IChpbiBtaWxsaXNlY29uZHMpXG4gICAqL1xuICB0aW1lb3V0OiBudW1iZXI7XG5cbiAgLyoqXG4gICAqIFRoZSBtYXhpbXVtIG51bWJlciBvZiB0aW1lcyB0aGUgSFRUUCBjb25uZWN0aW9uIHNob3VsZCBiZSByZXRyaWVkXG4gICAqL1xuICBtYXhSZXRyaWVzOiBudW1iZXI7XG59XG5cbmV4cG9ydCB0eXBlIFJlbW90ZVByb3ZpZGVySW5pdCA9IFBhcnRpYWw8UmVtb3RlUHJvdmlkZXJDb25maWc+O1xuXG5leHBvcnQgY29uc3QgcHJvdmlkZXJDb25maWdGcm9tSW5pdCA9ICh7XG4gIG1heFJldHJpZXMgPSBERUZBVUxUX01BWF9SRVRSSUVTLFxuICB0aW1lb3V0ID0gREVGQVVMVF9USU1FT1VULFxufTogUmVtb3RlUHJvdmlkZXJJbml0KTogUmVtb3RlUHJvdmlkZXJDb25maWcgPT4gKHsgbWF4UmV0cmllcywgdGltZW91dCB9KTtcbiJdfQ== + +/***/ }), + +/***/ 3593: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.httpRequest = void 0; +const property_provider_1 = __nccwpck_require__(1014); +const buffer_1 = __nccwpck_require__(64293); +const http_1 = __nccwpck_require__(98605); +/** + * @internal + */ +function httpRequest(options) { + return new Promise((resolve, reject) => { + const req = http_1.request({ method: "GET", ...options }); + req.on("error", (err) => { + reject(Object.assign(new property_provider_1.ProviderError("Unable to connect to instance metadata service"), err)); + }); + req.on("timeout", () => { + reject(new Error("TimeoutError")); + }); + 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 })); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(buffer_1.Buffer.concat(chunks)); + }); + }); + req.end(); + }); +} +exports.httpRequest = httpRequest; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cFJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcmVtb3RlUHJvdmlkZXIvaHR0cFJlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQTJEO0FBQzNELG1DQUFnQztBQUNoQywrQkFBZ0U7QUFFaEU7O0dBRUc7QUFDSCxTQUFnQixXQUFXLENBQUMsT0FBdUI7SUFDakQsT0FBTyxJQUFJLE9BQU8sQ0FBQyxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsRUFBRTtRQUNyQyxNQUFNLEdBQUcsR0FBRyxjQUFPLENBQUMsRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLEdBQUcsT0FBTyxFQUFFLENBQUMsQ0FBQztRQUVuRCxHQUFHLENBQUMsRUFBRSxDQUFDLE9BQU8sRUFBRSxDQUFDLEdBQUcsRUFBRSxFQUFFO1lBQ3RCLE1BQU0sQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLElBQUksaUNBQWEsQ0FBQyxnREFBZ0QsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFDLENBQUM7UUFDbEcsQ0FBQyxDQUFDLENBQUM7UUFFSCxHQUFHLENBQUMsRUFBRSxDQUFDLFNBQVMsRUFBRSxHQUFHLEVBQUU7WUFDckIsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLGNBQWMsQ0FBQyxDQUFDLENBQUM7UUFDcEMsQ0FBQyxDQUFDLENBQUM7UUFFSCxHQUFHLENBQUMsRUFBRSxDQUFDLFVBQVUsRUFBRSxDQUFDLEdBQW9CLEVBQUUsRUFBRTtZQUMxQyxNQUFNLEVBQUUsVUFBVSxHQUFHLEdBQUcsRUFBRSxHQUFHLEdBQUcsQ0FBQztZQUNqQyxJQUFJLFVBQVUsR0FBRyxHQUFHLElBQUksR0FBRyxJQUFJLFVBQVUsRUFBRTtnQkFDekMsTUFBTSxDQUNKLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxpQ0FBYSxDQUFDLHdEQUF3RCxDQUFDLEVBQUUsRUFBRSxVQUFVLEVBQUUsQ0FBQyxDQUMzRyxDQUFDO2FBQ0g7WUFFRCxNQUFNLE1BQU0sR0FBa0IsRUFBRSxDQUFDO1lBQ2pDLEdBQUcsQ0FBQyxFQUFFLENBQUMsTUFBTSxFQUFFLENBQUMsS0FBSyxFQUFFLEVBQUU7Z0JBQ3ZCLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBZSxDQUFDLENBQUM7WUFDL0IsQ0FBQyxDQUFDLENBQUM7WUFDSCxHQUFHLENBQUMsRUFBRSxDQUFDLEtBQUssRUFBRSxHQUFHLEVBQUU7Z0JBQ2pCLE9BQU8sQ0FBQyxlQUFNLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDakMsQ0FBQyxDQUFDLENBQUM7UUFDTCxDQUFDLENBQUMsQ0FBQztRQUVILEdBQUcsQ0FBQyxHQUFHLEVBQUUsQ0FBQztJQUNaLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQS9CRCxrQ0ErQkMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQcm92aWRlckVycm9yIH0gZnJvbSBcIkBhd3Mtc2RrL3Byb3BlcnR5LXByb3ZpZGVyXCI7XG5pbXBvcnQgeyBCdWZmZXIgfSBmcm9tIFwiYnVmZmVyXCI7XG5pbXBvcnQgeyBJbmNvbWluZ01lc3NhZ2UsIHJlcXVlc3QsIFJlcXVlc3RPcHRpb25zIH0gZnJvbSBcImh0dHBcIjtcblxuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGh0dHBSZXF1ZXN0KG9wdGlvbnM6IFJlcXVlc3RPcHRpb25zKTogUHJvbWlzZTxCdWZmZXI+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICBjb25zdCByZXEgPSByZXF1ZXN0KHsgbWV0aG9kOiBcIkdFVFwiLCAuLi5vcHRpb25zIH0pO1xuXG4gICAgcmVxLm9uKFwiZXJyb3JcIiwgKGVycikgPT4ge1xuICAgICAgcmVqZWN0KE9iamVjdC5hc3NpZ24obmV3IFByb3ZpZGVyRXJyb3IoXCJVbmFibGUgdG8gY29ubmVjdCB0byBpbnN0YW5jZSBtZXRhZGF0YSBzZXJ2aWNlXCIpLCBlcnIpKTtcbiAgICB9KTtcblxuICAgIHJlcS5vbihcInRpbWVvdXRcIiwgKCkgPT4ge1xuICAgICAgcmVqZWN0KG5ldyBFcnJvcihcIlRpbWVvdXRFcnJvclwiKSk7XG4gICAgfSk7XG5cbiAgICByZXEub24oXCJyZXNwb25zZVwiLCAocmVzOiBJbmNvbWluZ01lc3NhZ2UpID0+IHtcbiAgICAgIGNvbnN0IHsgc3RhdHVzQ29kZSA9IDQwMCB9ID0gcmVzO1xuICAgICAgaWYgKHN0YXR1c0NvZGUgPCAyMDAgfHwgMzAwIDw9IHN0YXR1c0NvZGUpIHtcbiAgICAgICAgcmVqZWN0KFxuICAgICAgICAgIE9iamVjdC5hc3NpZ24obmV3IFByb3ZpZGVyRXJyb3IoXCJFcnJvciByZXNwb25zZSByZWNlaXZlZCBmcm9tIGluc3RhbmNlIG1ldGFkYXRhIHNlcnZpY2VcIiksIHsgc3RhdHVzQ29kZSB9KVxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjaHVua3M6IEFycmF5PEJ1ZmZlcj4gPSBbXTtcbiAgICAgIHJlcy5vbihcImRhdGFcIiwgKGNodW5rKSA9PiB7XG4gICAgICAgIGNodW5rcy5wdXNoKGNodW5rIGFzIEJ1ZmZlcik7XG4gICAgICB9KTtcbiAgICAgIHJlcy5vbihcImVuZFwiLCAoKSA9PiB7XG4gICAgICAgIHJlc29sdmUoQnVmZmVyLmNvbmNhdChjaHVua3MpKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgcmVxLmVuZCgpO1xuICB9KTtcbn1cbiJdfQ== + +/***/ }), + +/***/ 45724: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.retry = void 0; +/** + * @internal + */ +const retry = (toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0; i < maxRetries; i++) { + promise = promise.catch(toRetry); + } + return promise; +}; +exports.retry = retry; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV0cnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcmVtb3RlUHJvdmlkZXIvcmV0cnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBSUE7O0dBRUc7QUFDSSxNQUFNLEtBQUssR0FBRyxDQUFJLE9BQTZCLEVBQUUsVUFBa0IsRUFBYyxFQUFFO0lBQ3hGLElBQUksT0FBTyxHQUFHLE9BQU8sRUFBRSxDQUFDO0lBQ3hCLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxVQUFVLEVBQUUsQ0FBQyxFQUFFLEVBQUU7UUFDbkMsT0FBTyxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM7S0FDbEM7SUFFRCxPQUFPLE9BQU8sQ0FBQztBQUNqQixDQUFDLENBQUM7QUFQVyxRQUFBLEtBQUssU0FPaEIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIFJldHJ5YWJsZVByb3ZpZGVyPFQ+IHtcbiAgKCk6IFByb21pc2U8VD47XG59XG5cbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCByZXRyeSA9IDxUPih0b1JldHJ5OiBSZXRyeWFibGVQcm92aWRlcjxUPiwgbWF4UmV0cmllczogbnVtYmVyKTogUHJvbWlzZTxUPiA9PiB7XG4gIGxldCBwcm9taXNlID0gdG9SZXRyeSgpO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IG1heFJldHJpZXM7IGkrKykge1xuICAgIHByb21pc2UgPSBwcm9taXNlLmNhdGNoKHRvUmV0cnkpO1xuICB9XG5cbiAgcmV0dXJuIHByb21pc2U7XG59O1xuIl19 + +/***/ }), + +/***/ 92975: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseKnownFiles = exports.getMasterProfileName = exports.fromIni = exports.ENV_PROFILE = void 0; +const property_provider_1 = __nccwpck_require__(1014); +const shared_ini_file_loader_1 = __nccwpck_require__(4847); +const DEFAULT_PROFILE = "default"; +exports.ENV_PROFILE = "AWS_PROFILE"; +function isStaticCredsProfile(arg) { + return (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); +} +function isAssumeRoleProfile(arg) { + return (Boolean(arg) && + typeof arg === "object" && + typeof arg.role_arn === "string" && + typeof arg.source_profile === "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); +} +/** + * Creates a credential provider that will read from ini files and supports + * role assumption and multi-factor authentication. + */ +function fromIni(init = {}) { + return () => parseKnownFiles(init).then((profiles) => resolveProfileData(getMasterProfileName(init), profiles, init)); +} +exports.fromIni = fromIni; +function getMasterProfileName(init) { + return init.profile || process.env[exports.ENV_PROFILE] || DEFAULT_PROFILE; +} +exports.getMasterProfileName = getMasterProfileName; +async function resolveProfileData(profileName, profiles, options, visitedProfiles = {}) { + const data = profiles[profileName]; + // If this is not the first profile visited, static credentials should be + // preferred over role assumption metadata. This special treatment of + // second and subsequent hops is to ensure compatibility with the AWS CLI. + if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { + return resolveStaticCredentials(data); + } + // If this is the first profile visited, role assumption keys should be + // given precedence over static credentials. + if (isAssumeRoleProfile(data)) { + const { external_id: ExternalId, mfa_serial, role_arn: RoleArn, role_session_name: RoleSessionName = "aws-sdk-js-" + Date.now(), source_profile, } = data; + if (!options.roleAssumer) { + throw new property_provider_1.ProviderError(`Profile ${profileName} requires a role to be assumed, but no` + ` role assumption callback was provided.`, false); + } + if (source_profile in visitedProfiles) { + throw new property_provider_1.ProviderError(`Detected a cycle attempting to resolve credentials for profile` + + ` ${getMasterProfileName(options)}. Profiles visited: ` + + Object.keys(visitedProfiles).join(", "), false); + } + const sourceCreds = resolveProfileData(source_profile, profiles, options, { + ...visitedProfiles, + [source_profile]: true, + }); + const params = { RoleArn, RoleSessionName, ExternalId }; + if (mfa_serial) { + if (!options.mfaCodeProvider) { + throw new property_provider_1.ProviderError(`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 no role assumption metadata is present, attempt to load static + // credentials from the selected profile. + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data); + } + // If the profile cannot be parsed or contains neither static credentials + // nor role assumption metadata, throw an error. This should be considered a + // terminal resolution error if a profile has been specified by the user + // (whether via a parameter, an environment variable, or another profile's + // `source_profile` key). + throw new property_provider_1.ProviderError(`Profile ${profileName} could not be found or parsed in shared` + ` credentials file.`); +} +function parseKnownFiles(init) { + const { loadedConfig = shared_ini_file_loader_1.loadSharedConfigFiles(init) } = init; + return loadedConfig.then((parsedFiles) => { + const { configFile, credentialsFile } = parsedFiles; + return { + ...configFile, + ...credentialsFile, + }; + }); +} +exports.parseKnownFiles = parseKnownFiles; +function resolveStaticCredentials(profile) { + return Promise.resolve({ + accessKeyId: profile.aws_access_key_id, + secretAccessKey: profile.aws_secret_access_key, + sessionToken: profile.aws_session_token, + }); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQTJEO0FBQzNELDRFQU15QztBQUd6QyxNQUFNLGVBQWUsR0FBRyxTQUFTLENBQUM7QUFDckIsUUFBQSxXQUFXLEdBQUcsYUFBYSxDQUFDO0FBeUV6QyxTQUFTLG9CQUFvQixDQUFDLEdBQVE7SUFDcEMsT0FBTyxDQUNMLE9BQU8sQ0FBQyxHQUFHLENBQUM7UUFDWixPQUFPLEdBQUcsS0FBSyxRQUFRO1FBQ3ZCLE9BQU8sR0FBRyxDQUFDLGlCQUFpQixLQUFLLFFBQVE7UUFDekMsT0FBTyxHQUFHLENBQUMscUJBQXFCLEtBQUssUUFBUTtRQUM3QyxDQUFDLFdBQVcsRUFBRSxRQUFRLENBQUMsQ0FBQyxPQUFPLENBQUMsT0FBTyxHQUFHLENBQUMsaUJBQWlCLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FDbkUsQ0FBQztBQUNKLENBQUM7QUFPRCxTQUFTLG1CQUFtQixDQUFDLEdBQVE7SUFDbkMsT0FBTyxDQUNMLE9BQU8sQ0FBQyxHQUFHLENBQUM7UUFDWixPQUFPLEdBQUcsS0FBSyxRQUFRO1FBQ3ZCLE9BQU8sR0FBRyxDQUFDLFFBQVEsS0FBSyxRQUFRO1FBQ2hDLE9BQU8sR0FBRyxDQUFDLGNBQWMsS0FBSyxRQUFRO1FBQ3RDLENBQUMsV0FBVyxFQUFFLFFBQVEsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxPQUFPLEdBQUcsQ0FBQyxpQkFBaUIsQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUNsRSxDQUFDLFdBQVcsRUFBRSxRQUFRLENBQUMsQ0FBQyxPQUFPLENBQUMsT0FBTyxHQUFHLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQzVELENBQUMsV0FBVyxFQUFFLFFBQVEsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxPQUFPLEdBQUcsQ0FBQyxVQUFVLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FDNUQsQ0FBQztBQUNKLENBQUM7QUFFRDs7O0dBR0c7QUFDSCxTQUFnQixPQUFPLENBQUMsT0FBb0IsRUFBRTtJQUM1QyxPQUFPLEdBQUcsRUFBRSxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxRQUFRLEVBQUUsRUFBRSxDQUFDLGtCQUFrQixDQUFDLG9CQUFvQixDQUFDLElBQUksQ0FBQyxFQUFFLFFBQVEsRUFBRSxJQUFJLENBQUMsQ0FBQyxDQUFDO0FBQ3hILENBQUM7QUFGRCwwQkFFQztBQUVELFNBQWdCLG9CQUFvQixDQUFDLElBQWlCO0lBQ3BELE9BQU8sSUFBSSxDQUFDLE9BQU8sSUFBSSxPQUFPLENBQUMsR0FBRyxDQUFDLG1CQUFXLENBQUMsSUFBSSxlQUFlLENBQUM7QUFDckUsQ0FBQztBQUZELG9EQUVDO0FBRUQsS0FBSyxVQUFVLGtCQUFrQixDQUMvQixXQUFtQixFQUNuQixRQUF1QixFQUN2QixPQUFvQixFQUNwQixrQkFBbUQsRUFBRTtJQUVyRCxNQUFNLElBQUksR0FBRyxRQUFRLENBQUMsV0FBVyxDQUFDLENBQUM7SUFFbkMseUVBQXlFO0lBQ3pFLHFFQUFxRTtJQUNyRSwwRUFBMEU7SUFDMUUsSUFBSSxNQUFNLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxDQUFDLE1BQU0sR0FBRyxDQUFDLElBQUksb0JBQW9CLENBQUMsSUFBSSxDQUFDLEVBQUU7UUFDekUsT0FBTyx3QkFBd0IsQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN2QztJQUVELHVFQUF1RTtJQUN2RSw0Q0FBNEM7SUFDNUMsSUFBSSxtQkFBbUIsQ0FBQyxJQUFJLENBQUMsRUFBRTtRQUM3QixNQUFNLEVBQ0osV0FBVyxFQUFFLFVBQVUsRUFDdkIsVUFBVSxFQUNWLFFBQVEsRUFBRSxPQUFPLEVBQ2pCLGlCQUFpQixFQUFFLGVBQWUsR0FBRyxhQUFhLEdBQUcsSUFBSSxDQUFDLEdBQUcsRUFBRSxFQUMvRCxjQUFjLEdBQ2YsR0FBRyxJQUFJLENBQUM7UUFFVCxJQUFJLENBQUMsT0FBTyxDQUFDLFdBQVcsRUFBRTtZQUN4QixNQUFNLElBQUksaUNBQWEsQ0FDckIsV0FBVyxXQUFXLHdDQUF3QyxHQUFHLHlDQUF5QyxFQUMxRyxLQUFLLENBQ04sQ0FBQztTQUNIO1FBRUQsSUFBSSxjQUFjLElBQUksZUFBZSxFQUFFO1lBQ3JDLE1BQU0sSUFBSSxpQ0FBYSxDQUNyQixnRUFBZ0U7Z0JBQzlELElBQUksb0JBQW9CLENBQUMsT0FBTyxDQUFDLHNCQUFzQjtnQkFDdkQsTUFBTSxDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQ3pDLEtBQUssQ0FDTixDQUFDO1NBQ0g7UUFFRCxNQUFNLFdBQVcsR0FBRyxrQkFBa0IsQ0FBQyxjQUFjLEVBQUUsUUFBUSxFQUFFLE9BQU8sRUFBRTtZQUN4RSxHQUFHLGVBQWU7WUFDbEIsQ0FBQyxjQUFjLENBQUMsRUFBRSxJQUFJO1NBQ3ZCLENBQUMsQ0FBQztRQUNILE1BQU0sTUFBTSxHQUFxQixFQUFFLE9BQU8sRUFBRSxlQUFlLEVBQUUsVUFBVSxFQUFFLENBQUM7UUFDMUUsSUFBSSxVQUFVLEVBQUU7WUFDZCxJQUFJLENBQUMsT0FBTyxDQUFDLGVBQWUsRUFBRTtnQkFDNUIsTUFBTSxJQUFJLGlDQUFhLENBQ3JCLFdBQVcsV0FBVyx3Q0FBd0MsR0FBRyx5Q0FBeUMsRUFDMUcsS0FBSyxDQUNOLENBQUM7YUFDSDtZQUNELE1BQU0sQ0FBQyxZQUFZLEdBQUcsVUFBVSxDQUFDO1lBQ2pDLE1BQU0sQ0FBQyxTQUFTLEdBQUcsTUFBTSxPQUFPLENBQUMsZUFBZSxDQUFDLFVBQVUsQ0FBQyxDQUFDO1NBQzlEO1FBRUQsT0FBTyxPQUFPLENBQUMsV0FBVyxDQUFDLE1BQU0sV0FBVyxFQUFFLE1BQU0sQ0FBQyxDQUFDO0tBQ3ZEO0lBRUQsb0VBQW9FO0lBQ3BFLHlDQUF5QztJQUN6QyxJQUFJLG9CQUFvQixDQUFDLElBQUksQ0FBQyxFQUFFO1FBQzlCLE9BQU8sd0JBQXdCLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDdkM7SUFFRCx5RUFBeUU7SUFDekUsNEVBQTRFO0lBQzVFLHdFQUF3RTtJQUN4RSwwRUFBMEU7SUFDMUUseUJBQXlCO0lBQ3pCLE1BQU0sSUFBSSxpQ0FBYSxDQUFDLFdBQVcsV0FBVyx5Q0FBeUMsR0FBRyxvQkFBb0IsQ0FBQyxDQUFDO0FBQ2xILENBQUM7QUFFRCxTQUFnQixlQUFlLENBQUMsSUFBaUI7SUFDL0MsTUFBTSxFQUFFLFlBQVksR0FBRyw4Q0FBcUIsQ0FBQyxJQUFJLENBQUMsRUFBRSxHQUFHLElBQUksQ0FBQztJQUU1RCxPQUFPLFlBQVksQ0FBQyxJQUFJLENBQUMsQ0FBQyxXQUFXLEVBQUUsRUFBRTtRQUN2QyxNQUFNLEVBQUUsVUFBVSxFQUFFLGVBQWUsRUFBRSxHQUFHLFdBQVcsQ0FBQztRQUNwRCxPQUFPO1lBQ0wsR0FBRyxVQUFVO1lBQ2IsR0FBRyxlQUFlO1NBQ25CLENBQUM7SUFDSixDQUFDLENBQUMsQ0FBQztBQUNMLENBQUM7QUFWRCwwQ0FVQztBQUVELFNBQVMsd0JBQXdCLENBQUMsT0FBMkI7SUFDM0QsT0FBTyxPQUFPLENBQUMsT0FBTyxDQUFDO1FBQ3JCLFdBQVcsRUFBRSxPQUFPLENBQUMsaUJBQWlCO1FBQ3RDLGVBQWUsRUFBRSxPQUFPLENBQUMscUJBQXFCO1FBQzlDLFlBQVksRUFBRSxPQUFPLENBQUMsaUJBQWlCO0tBQ3hDLENBQUMsQ0FBQztBQUNMLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQcm92aWRlckVycm9yIH0gZnJvbSBcIkBhd3Mtc2RrL3Byb3BlcnR5LXByb3ZpZGVyXCI7XG5pbXBvcnQge1xuICBsb2FkU2hhcmVkQ29uZmlnRmlsZXMsXG4gIFBhcnNlZEluaURhdGEsXG4gIFByb2ZpbGUsXG4gIFNoYXJlZENvbmZpZ0ZpbGVzLFxuICBTaGFyZWRDb25maWdJbml0LFxufSBmcm9tIFwiQGF3cy1zZGsvc2hhcmVkLWluaS1maWxlLWxvYWRlclwiO1xuaW1wb3J0IHsgQ3JlZGVudGlhbFByb3ZpZGVyLCBDcmVkZW50aWFscyB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5jb25zdCBERUZBVUxUX1BST0ZJTEUgPSBcImRlZmF1bHRcIjtcbmV4cG9ydCBjb25zdCBFTlZfUFJPRklMRSA9IFwiQVdTX1BST0ZJTEVcIjtcblxuLyoqXG4gKiBAc2VlIGh0dHA6Ly9kb2NzLmF3cy5hbWF6b24uY29tL0FXU0phdmFTY3JpcHRTREsvbGF0ZXN0L0FXUy9TVFMuaHRtbCNhc3N1bWVSb2xlLXByb3BlcnR5XG4gKiBUT0RPIHVwZGF0ZSB0aGUgYWJvdmUgdG8gbGluayB0byBWMyBkb2NzXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgQXNzdW1lUm9sZVBhcmFtcyB7XG4gIC8qKlxuICAgKiBUaGUgaWRlbnRpZmllciBvZiB0aGUgcm9sZSB0byBiZSBhc3N1bWVkLlxuICAgKi9cbiAgUm9sZUFybjogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBBIG5hbWUgZm9yIHRoZSBhc3N1bWVkIHJvbGUgc2Vzc2lvbi5cbiAgICovXG4gIFJvbGVTZXNzaW9uTmFtZTogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBBIHVuaXF1ZSBpZGVudGlmaWVyIHRoYXQgaXMgdXNlZCBieSB0aGlyZCBwYXJ0aWVzIHdoZW4gYXNzdW1pbmcgcm9sZXMgaW5cbiAgICogdGhlaXIgY3VzdG9tZXJzJyBhY2NvdW50cy5cbiAgICovXG4gIEV4dGVybmFsSWQ/OiBzdHJpbmc7XG5cbiAgLyoqXG4gICAqIFRoZSBpZGVudGlmaWNhdGlvbiBudW1iZXIgb2YgdGhlIE1GQSBkZXZpY2UgdGhhdCBpcyBhc3NvY2lhdGVkIHdpdGggdGhlXG4gICAqIHVzZXIgd2hvIGlzIG1ha2luZyB0aGUgYEFzc3VtZVJvbGVgIGNhbGwuXG4gICAqL1xuICBTZXJpYWxOdW1iZXI/OiBzdHJpbmc7XG5cbiAgLyoqXG4gICAqIFRoZSB2YWx1ZSBwcm92aWRlZCBieSB0aGUgTUZBIGRldmljZS5cbiAgICovXG4gIFRva2VuQ29kZT86IHN0cmluZztcbn1cblxuZXhwb3J0IGludGVyZmFjZSBGcm9tSW5pSW5pdCBleHRlbmRzIFNoYXJlZENvbmZpZ0luaXQge1xuICAvKipcbiAgICogVGhlIGNvbmZpZ3VyYXRpb24gcHJvZmlsZSB0byB1c2UuXG4gICAqL1xuICBwcm9maWxlPzogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBBIHByb21pc2UgdGhhdCB3aWxsIGJlIHJlc29sdmVkIHdpdGggbG9hZGVkIGFuZCBwYXJzZWQgY3JlZGVudGlhbHMgZmlsZXMuXG4gICAqIFVzZWQgdG8gYXZvaWQgbG9hZGluZyBzaGFyZWQgY29uZmlnIGZpbGVzIG11bHRpcGxlIHRpbWVzLlxuICAgKi9cbiAgbG9hZGVkQ29uZmlnPzogUHJvbWlzZTxTaGFyZWRDb25maWdGaWxlcz47XG5cbiAgLyoqXG4gICAqIEEgZnVuY3Rpb24gdGhhdCByZXR1cm5hIGEgcHJvbWlzZSBmdWxmaWxsZWQgd2l0aCBhbiBNRkEgdG9rZW4gY29kZSBmb3JcbiAgICogdGhlIHByb3ZpZGVkIE1GQSBTZXJpYWwgY29kZS4gSWYgYSBwcm9maWxlIHJlcXVpcmVzIGFuIE1GQSBjb2RlIGFuZFxuICAgKiBgbWZhQ29kZVByb3ZpZGVyYCBpcyBub3QgYSB2YWxpZCBmdW5jdGlvbiwgdGhlIGNyZWRlbnRpYWwgcHJvdmlkZXJcbiAgICogcHJvbWlzZSB3aWxsIGJlIHJlamVjdGVkLlxuICAgKlxuICAgKiBAcGFyYW0gbWZhU2VyaWFsIFRoZSBzZXJpYWwgY29kZSBvZiB0aGUgTUZBIGRldmljZSBzcGVjaWZpZWQuXG4gICAqL1xuICBtZmFDb2RlUHJvdmlkZXI/OiAobWZhU2VyaWFsOiBzdHJpbmcpID0+IFByb21pc2U8c3RyaW5nPjtcblxuICAvKipcbiAgICogQSBmdW5jdGlvbiB0aGF0IGFzc3VtZXMgYSByb2xlIGFuZCByZXR1cm5zIGEgcHJvbWlzZSBmdWxmaWxsZWQgd2l0aFxuICAgKiBjcmVkZW50aWFscyBmb3IgdGhlIGFzc3VtZWQgcm9sZS5cbiAgICpcbiAgICogQHBhcmFtIHNvdXJjZUNyZWRzIFRoZSBjcmVkZW50aWFscyB3aXRoIHdoaWNoIHRvIGFzc3VtZSBhIHJvbGUuXG4gICAqIEBwYXJhbSBwYXJhbXNcbiAgICovXG4gIHJvbGVBc3N1bWVyPzogKHNvdXJjZUNyZWRzOiBDcmVkZW50aWFscywgcGFyYW1zOiBBc3N1bWVSb2xlUGFyYW1zKSA9PiBQcm9taXNlPENyZWRlbnRpYWxzPjtcbn1cblxuaW50ZXJmYWNlIFN0YXRpY0NyZWRzUHJvZmlsZSBleHRlbmRzIFByb2ZpbGUge1xuICBhd3NfYWNjZXNzX2tleV9pZDogc3RyaW5nO1xuICBhd3Nfc2VjcmV0X2FjY2Vzc19rZXk6IHN0cmluZztcbiAgYXdzX3Nlc3Npb25fdG9rZW4/OiBzdHJpbmc7XG59XG5cbmZ1bmN0aW9uIGlzU3RhdGljQ3JlZHNQcm9maWxlKGFyZzogYW55KTogYXJnIGlzIFN0YXRpY0NyZWRzUHJvZmlsZSB7XG4gIHJldHVybiAoXG4gICAgQm9vbGVhbihhcmcpICYmXG4gICAgdHlwZW9mIGFyZyA9PT0gXCJvYmplY3RcIiAmJlxuICAgIHR5cGVvZiBhcmcuYXdzX2FjY2Vzc19rZXlfaWQgPT09IFwic3RyaW5nXCIgJiZcbiAgICB0eXBlb2YgYXJnLmF3c19zZWNyZXRfYWNjZXNzX2tleSA9PT0gXCJzdHJpbmdcIiAmJlxuICAgIFtcInVuZGVmaW5lZFwiLCBcInN0cmluZ1wiXS5pbmRleE9mKHR5cGVvZiBhcmcuYXdzX3Nlc3Npb25fdG9rZW4pID4gLTFcbiAgKTtcbn1cblxuaW50ZXJmYWNlIEFzc3VtZVJvbGVQcm9maWxlIGV4dGVuZHMgUHJvZmlsZSB7XG4gIHJvbGVfYXJuOiBzdHJpbmc7XG4gIHNvdXJjZV9wcm9maWxlOiBzdHJpbmc7XG59XG5cbmZ1bmN0aW9uIGlzQXNzdW1lUm9sZVByb2ZpbGUoYXJnOiBhbnkpOiBhcmcgaXMgQXNzdW1lUm9sZVByb2ZpbGUge1xuICByZXR1cm4gKFxuICAgIEJvb2xlYW4oYXJnKSAmJlxuICAgIHR5cGVvZiBhcmcgPT09IFwib2JqZWN0XCIgJiZcbiAgICB0eXBlb2YgYXJnLnJvbGVfYXJuID09PSBcInN0cmluZ1wiICYmXG4gICAgdHlwZW9mIGFyZy5zb3VyY2VfcHJvZmlsZSA9PT0gXCJzdHJpbmdcIiAmJlxuICAgIFtcInVuZGVmaW5lZFwiLCBcInN0cmluZ1wiXS5pbmRleE9mKHR5cGVvZiBhcmcucm9sZV9zZXNzaW9uX25hbWUpID4gLTEgJiZcbiAgICBbXCJ1bmRlZmluZWRcIiwgXCJzdHJpbmdcIl0uaW5kZXhPZih0eXBlb2YgYXJnLmV4dGVybmFsX2lkKSA+IC0xICYmXG4gICAgW1widW5kZWZpbmVkXCIsIFwic3RyaW5nXCJdLmluZGV4T2YodHlwZW9mIGFyZy5tZmFfc2VyaWFsKSA+IC0xXG4gICk7XG59XG5cbi8qKlxuICogQ3JlYXRlcyBhIGNyZWRlbnRpYWwgcHJvdmlkZXIgdGhhdCB3aWxsIHJlYWQgZnJvbSBpbmkgZmlsZXMgYW5kIHN1cHBvcnRzXG4gKiByb2xlIGFzc3VtcHRpb24gYW5kIG11bHRpLWZhY3RvciBhdXRoZW50aWNhdGlvbi5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGZyb21JbmkoaW5pdDogRnJvbUluaUluaXQgPSB7fSk6IENyZWRlbnRpYWxQcm92aWRlciB7XG4gIHJldHVybiAoKSA9PiBwYXJzZUtub3duRmlsZXMoaW5pdCkudGhlbigocHJvZmlsZXMpID0+IHJlc29sdmVQcm9maWxlRGF0YShnZXRNYXN0ZXJQcm9maWxlTmFtZShpbml0KSwgcHJvZmlsZXMsIGluaXQpKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGdldE1hc3RlclByb2ZpbGVOYW1lKGluaXQ6IEZyb21JbmlJbml0KTogc3RyaW5nIHtcbiAgcmV0dXJuIGluaXQucHJvZmlsZSB8fCBwcm9jZXNzLmVudltFTlZfUFJPRklMRV0gfHwgREVGQVVMVF9QUk9GSUxFO1xufVxuXG5hc3luYyBmdW5jdGlvbiByZXNvbHZlUHJvZmlsZURhdGEoXG4gIHByb2ZpbGVOYW1lOiBzdHJpbmcsXG4gIHByb2ZpbGVzOiBQYXJzZWRJbmlEYXRhLFxuICBvcHRpb25zOiBGcm9tSW5pSW5pdCxcbiAgdmlzaXRlZFByb2ZpbGVzOiB7IFtwcm9maWxlTmFtZTogc3RyaW5nXTogdHJ1ZSB9ID0ge31cbik6IFByb21pc2U8Q3JlZGVudGlhbHM+IHtcbiAgY29uc3QgZGF0YSA9IHByb2ZpbGVzW3Byb2ZpbGVOYW1lXTtcblxuICAvLyBJZiB0aGlzIGlzIG5vdCB0aGUgZmlyc3QgcHJvZmlsZSB2aXNpdGVkLCBzdGF0aWMgY3JlZGVudGlhbHMgc2hvdWxkIGJlXG4gIC8vIHByZWZlcnJlZCBvdmVyIHJvbGUgYXNzdW1wdGlvbiBtZXRhZGF0YS4gVGhpcyBzcGVjaWFsIHRyZWF0bWVudCBvZlxuICAvLyBzZWNvbmQgYW5kIHN1YnNlcXVlbnQgaG9wcyBpcyB0byBlbnN1cmUgY29tcGF0aWJpbGl0eSB3aXRoIHRoZSBBV1MgQ0xJLlxuICBpZiAoT2JqZWN0LmtleXModmlzaXRlZFByb2ZpbGVzKS5sZW5ndGggPiAwICYmIGlzU3RhdGljQ3JlZHNQcm9maWxlKGRhdGEpKSB7XG4gICAgcmV0dXJuIHJlc29sdmVTdGF0aWNDcmVkZW50aWFscyhkYXRhKTtcbiAgfVxuXG4gIC8vIElmIHRoaXMgaXMgdGhlIGZpcnN0IHByb2ZpbGUgdmlzaXRlZCwgcm9sZSBhc3N1bXB0aW9uIGtleXMgc2hvdWxkIGJlXG4gIC8vIGdpdmVuIHByZWNlZGVuY2Ugb3ZlciBzdGF0aWMgY3JlZGVudGlhbHMuXG4gIGlmIChpc0Fzc3VtZVJvbGVQcm9maWxlKGRhdGEpKSB7XG4gICAgY29uc3Qge1xuICAgICAgZXh0ZXJuYWxfaWQ6IEV4dGVybmFsSWQsXG4gICAgICBtZmFfc2VyaWFsLFxuICAgICAgcm9sZV9hcm46IFJvbGVBcm4sXG4gICAgICByb2xlX3Nlc3Npb25fbmFtZTogUm9sZVNlc3Npb25OYW1lID0gXCJhd3Mtc2RrLWpzLVwiICsgRGF0ZS5ub3coKSxcbiAgICAgIHNvdXJjZV9wcm9maWxlLFxuICAgIH0gPSBkYXRhO1xuXG4gICAgaWYgKCFvcHRpb25zLnJvbGVBc3N1bWVyKSB7XG4gICAgICB0aHJvdyBuZXcgUHJvdmlkZXJFcnJvcihcbiAgICAgICAgYFByb2ZpbGUgJHtwcm9maWxlTmFtZX0gcmVxdWlyZXMgYSByb2xlIHRvIGJlIGFzc3VtZWQsIGJ1dCBub2AgKyBgIHJvbGUgYXNzdW1wdGlvbiBjYWxsYmFjayB3YXMgcHJvdmlkZWQuYCxcbiAgICAgICAgZmFsc2VcbiAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKHNvdXJjZV9wcm9maWxlIGluIHZpc2l0ZWRQcm9maWxlcykge1xuICAgICAgdGhyb3cgbmV3IFByb3ZpZGVyRXJyb3IoXG4gICAgICAgIGBEZXRlY3RlZCBhIGN5Y2xlIGF0dGVtcHRpbmcgdG8gcmVzb2x2ZSBjcmVkZW50aWFscyBmb3IgcHJvZmlsZWAgK1xuICAgICAgICAgIGAgJHtnZXRNYXN0ZXJQcm9maWxlTmFtZShvcHRpb25zKX0uIFByb2ZpbGVzIHZpc2l0ZWQ6IGAgK1xuICAgICAgICAgIE9iamVjdC5rZXlzKHZpc2l0ZWRQcm9maWxlcykuam9pbihcIiwgXCIpLFxuICAgICAgICBmYWxzZVxuICAgICAgKTtcbiAgICB9XG5cbiAgICBjb25zdCBzb3VyY2VDcmVkcyA9IHJlc29sdmVQcm9maWxlRGF0YShzb3VyY2VfcHJvZmlsZSwgcHJvZmlsZXMsIG9wdGlvbnMsIHtcbiAgICAgIC4uLnZpc2l0ZWRQcm9maWxlcyxcbiAgICAgIFtzb3VyY2VfcHJvZmlsZV06IHRydWUsXG4gICAgfSk7XG4gICAgY29uc3QgcGFyYW1zOiBBc3N1bWVSb2xlUGFyYW1zID0geyBSb2xlQXJuLCBSb2xlU2Vzc2lvbk5hbWUsIEV4dGVybmFsSWQgfTtcbiAgICBpZiAobWZhX3NlcmlhbCkge1xuICAgICAgaWYgKCFvcHRpb25zLm1mYUNvZGVQcm92aWRlcikge1xuICAgICAgICB0aHJvdyBuZXcgUHJvdmlkZXJFcnJvcihcbiAgICAgICAgICBgUHJvZmlsZSAke3Byb2ZpbGVOYW1lfSByZXF1aXJlcyBtdWx0aS1mYWN0b3IgYXV0aGVudGljYXRpb24sYCArIGAgYnV0IG5vIE1GQSBjb2RlIGNhbGxiYWNrIHdhcyBwcm92aWRlZC5gLFxuICAgICAgICAgIGZhbHNlXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBwYXJhbXMuU2VyaWFsTnVtYmVyID0gbWZhX3NlcmlhbDtcbiAgICAgIHBhcmFtcy5Ub2tlbkNvZGUgPSBhd2FpdCBvcHRpb25zLm1mYUNvZGVQcm92aWRlcihtZmFfc2VyaWFsKTtcbiAgICB9XG5cbiAgICByZXR1cm4gb3B0aW9ucy5yb2xlQXNzdW1lcihhd2FpdCBzb3VyY2VDcmVkcywgcGFyYW1zKTtcbiAgfVxuXG4gIC8vIElmIG5vIHJvbGUgYXNzdW1wdGlvbiBtZXRhZGF0YSBpcyBwcmVzZW50LCBhdHRlbXB0IHRvIGxvYWQgc3RhdGljXG4gIC8vIGNyZWRlbnRpYWxzIGZyb20gdGhlIHNlbGVjdGVkIHByb2ZpbGUuXG4gIGlmIChpc1N0YXRpY0NyZWRzUHJvZmlsZShkYXRhKSkge1xuICAgIHJldHVybiByZXNvbHZlU3RhdGljQ3JlZGVudGlhbHMoZGF0YSk7XG4gIH1cblxuICAvLyBJZiB0aGUgcHJvZmlsZSBjYW5ub3QgYmUgcGFyc2VkIG9yIGNvbnRhaW5zIG5laXRoZXIgc3RhdGljIGNyZWRlbnRpYWxzXG4gIC8vIG5vciByb2xlIGFzc3VtcHRpb24gbWV0YWRhdGEsIHRocm93IGFuIGVycm9yLiBUaGlzIHNob3VsZCBiZSBjb25zaWRlcmVkIGFcbiAgLy8gdGVybWluYWwgcmVzb2x1dGlvbiBlcnJvciBpZiBhIHByb2ZpbGUgaGFzIGJlZW4gc3BlY2lmaWVkIGJ5IHRoZSB1c2VyXG4gIC8vICh3aGV0aGVyIHZpYSBhIHBhcmFtZXRlciwgYW4gZW52aXJvbm1lbnQgdmFyaWFibGUsIG9yIGFub3RoZXIgcHJvZmlsZSdzXG4gIC8vIGBzb3VyY2VfcHJvZmlsZWAga2V5KS5cbiAgdGhyb3cgbmV3IFByb3ZpZGVyRXJyb3IoYFByb2ZpbGUgJHtwcm9maWxlTmFtZX0gY291bGQgbm90IGJlIGZvdW5kIG9yIHBhcnNlZCBpbiBzaGFyZWRgICsgYCBjcmVkZW50aWFscyBmaWxlLmApO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gcGFyc2VLbm93bkZpbGVzKGluaXQ6IEZyb21JbmlJbml0KTogUHJvbWlzZTxQYXJzZWRJbmlEYXRhPiB7XG4gIGNvbnN0IHsgbG9hZGVkQ29uZmlnID0gbG9hZFNoYXJlZENvbmZpZ0ZpbGVzKGluaXQpIH0gPSBpbml0O1xuXG4gIHJldHVybiBsb2FkZWRDb25maWcudGhlbigocGFyc2VkRmlsZXMpID0+IHtcbiAgICBjb25zdCB7IGNvbmZpZ0ZpbGUsIGNyZWRlbnRpYWxzRmlsZSB9ID0gcGFyc2VkRmlsZXM7XG4gICAgcmV0dXJuIHtcbiAgICAgIC4uLmNvbmZpZ0ZpbGUsXG4gICAgICAuLi5jcmVkZW50aWFsc0ZpbGUsXG4gICAgfTtcbiAgfSk7XG59XG5cbmZ1bmN0aW9uIHJlc29sdmVTdGF0aWNDcmVkZW50aWFscyhwcm9maWxlOiBTdGF0aWNDcmVkc1Byb2ZpbGUpOiBQcm9taXNlPENyZWRlbnRpYWxzPiB7XG4gIHJldHVybiBQcm9taXNlLnJlc29sdmUoe1xuICAgIGFjY2Vzc0tleUlkOiBwcm9maWxlLmF3c19hY2Nlc3Nfa2V5X2lkLFxuICAgIHNlY3JldEFjY2Vzc0tleTogcHJvZmlsZS5hd3Nfc2VjcmV0X2FjY2Vzc19rZXksXG4gICAgc2Vzc2lvblRva2VuOiBwcm9maWxlLmF3c19zZXNzaW9uX3Rva2VuLFxuICB9KTtcbn1cbiJdfQ== + +/***/ }), + +/***/ 98030: +/***/ ((__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__(55886); +const credential_provider_imds_1 = __nccwpck_require__(21732); +const credential_provider_ini_1 = __nccwpck_require__(92975); +const credential_provider_process_1 = __nccwpck_require__(40693); +const property_provider_1 = __nccwpck_require__(1014); +exports.ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +/** + * Creates a credential provider that will attempt to find credentials from the + * following sources (listed in order of precedence): + * * Environment variables exposed via `process.env` + * * Shared credentials and config ini files + * * The EC2/ECS Instance Metadata Service + * + * The default credential provider will invoke one provider at a time and only + * continue to the next if no credentials have been located. For example, if + * the process finds values defined via the `AWS_ACCESS_KEY_ID` and + * `AWS_SECRET_ACCESS_KEY` environment variables, the files at + * `~/.aws/credentials` and `~/.aws/config` will not be read, nor will any + * messages be sent to the Instance Metadata Service. + * + * @param init Configuration that is passed to each individual + * provider + * + * @see fromEnv The function used to source credentials from + * environment variables + * @see fromIni The function used to source credentials from INI + * files + * @see fromProcess The functino used to sources credentials from + * credential_process in INI files + * @see fromInstanceMetadata The function used to source credentials from the + * EC2 Instance Metadata Service + * @see fromContainerMetadata The function used to source credentials from the + * ECS Container Metadata Service + */ +function defaultProvider(init = {}) { + const { profile = process.env[credential_provider_ini_1.ENV_PROFILE] } = init; + const providerChain = profile + ? property_provider_1.chain(credential_provider_ini_1.fromIni(init), credential_provider_process_1.fromProcess(init)) + : property_provider_1.chain(credential_provider_env_1.fromEnv(), credential_provider_ini_1.fromIni(init), credential_provider_process_1.fromProcess(init), remoteProvider(init)); + return property_provider_1.memoize(providerChain, (credentials) => credentials.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000, (credentials) => credentials.expiration !== undefined); +} +exports.defaultProvider = defaultProvider; +function 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.ProviderError("EC2 Instance Metadata Service access disabled")); + } + return credential_provider_imds_1.fromInstanceMetadata(init); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOEVBQTJEO0FBQzNELGdGQU0yQztBQUMzQyw4RUFBcUY7QUFDckYsc0ZBQW9GO0FBQ3BGLGtFQUEyRTtBQUc5RCxRQUFBLGlCQUFpQixHQUFHLDJCQUEyQixDQUFDO0FBRTdEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0EyQkc7QUFDSCxTQUFnQixlQUFlLENBQUMsT0FBMkQsRUFBRTtJQUMzRixNQUFNLEVBQUUsT0FBTyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMscUNBQVcsQ0FBQyxFQUFFLEdBQUcsSUFBSSxDQUFDO0lBQ3BELE1BQU0sYUFBYSxHQUFHLE9BQU87UUFDM0IsQ0FBQyxDQUFDLHlCQUFLLENBQUMsaUNBQU8sQ0FBQyxJQUFJLENBQUMsRUFBRSx5Q0FBVyxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ3pDLENBQUMsQ0FBQyx5QkFBSyxDQUFDLGlDQUFPLEVBQUUsRUFBRSxpQ0FBTyxDQUFDLElBQUksQ0FBQyxFQUFFLHlDQUFXLENBQUMsSUFBSSxDQUFDLEVBQUUsY0FBYyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7SUFFN0UsT0FBTywyQkFBTyxDQUNaLGFBQWEsRUFDYixDQUFDLFdBQVcsRUFBRSxFQUFFLENBQUMsV0FBVyxDQUFDLFVBQVUsS0FBSyxTQUFTLElBQUksV0FBVyxDQUFDLFVBQVUsQ0FBQyxPQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsR0FBRyxFQUFFLEdBQUcsTUFBTSxFQUMvRyxDQUFDLFdBQVcsRUFBRSxFQUFFLENBQUMsV0FBVyxDQUFDLFVBQVUsS0FBSyxTQUFTLENBQ3RELENBQUM7QUFDSixDQUFDO0FBWEQsMENBV0M7QUFFRCxTQUFTLGNBQWMsQ0FBQyxJQUF3QjtJQUM5QyxJQUFJLE9BQU8sQ0FBQyxHQUFHLENBQUMsZ0RBQXFCLENBQUMsSUFBSSxPQUFPLENBQUMsR0FBRyxDQUFDLDRDQUFpQixDQUFDLEVBQUU7UUFDeEUsT0FBTyxnREFBcUIsQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUNwQztJQUVELElBQUksT0FBTyxDQUFDLEdBQUcsQ0FBQyx5QkFBaUIsQ0FBQyxFQUFFO1FBQ2xDLE9BQU8sR0FBRyxFQUFFLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxJQUFJLGlDQUFhLENBQUMsK0NBQStDLENBQUMsQ0FBQyxDQUFDO0tBQ2pHO0lBRUQsT0FBTywrQ0FBb0IsQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNwQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZnJvbUVudiB9IGZyb20gXCJAYXdzLXNkay9jcmVkZW50aWFsLXByb3ZpZGVyLWVudlwiO1xuaW1wb3J0IHtcbiAgRU5WX0NNRFNfRlVMTF9VUkksXG4gIEVOVl9DTURTX1JFTEFUSVZFX1VSSSxcbiAgZnJvbUNvbnRhaW5lck1ldGFkYXRhLFxuICBmcm9tSW5zdGFuY2VNZXRhZGF0YSxcbiAgUmVtb3RlUHJvdmlkZXJJbml0LFxufSBmcm9tIFwiQGF3cy1zZGsvY3JlZGVudGlhbC1wcm92aWRlci1pbWRzXCI7XG5pbXBvcnQgeyBFTlZfUFJPRklMRSwgZnJvbUluaSwgRnJvbUluaUluaXQgfSBmcm9tIFwiQGF3cy1zZGsvY3JlZGVudGlhbC1wcm92aWRlci1pbmlcIjtcbmltcG9ydCB7IGZyb21Qcm9jZXNzLCBGcm9tUHJvY2Vzc0luaXQgfSBmcm9tIFwiQGF3cy1zZGsvY3JlZGVudGlhbC1wcm92aWRlci1wcm9jZXNzXCI7XG5pbXBvcnQgeyBjaGFpbiwgbWVtb2l6ZSwgUHJvdmlkZXJFcnJvciB9IGZyb20gXCJAYXdzLXNkay9wcm9wZXJ0eS1wcm92aWRlclwiO1xuaW1wb3J0IHsgQ3JlZGVudGlhbFByb3ZpZGVyIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmV4cG9ydCBjb25zdCBFTlZfSU1EU19ESVNBQkxFRCA9IFwiQVdTX0VDMl9NRVRBREFUQV9ESVNBQkxFRFwiO1xuXG4vKipcbiAqIENyZWF0ZXMgYSBjcmVkZW50aWFsIHByb3ZpZGVyIHRoYXQgd2lsbCBhdHRlbXB0IHRvIGZpbmQgY3JlZGVudGlhbHMgZnJvbSB0aGVcbiAqIGZvbGxvd2luZyBzb3VyY2VzIChsaXN0ZWQgaW4gb3JkZXIgb2YgcHJlY2VkZW5jZSk6XG4gKiAgICogRW52aXJvbm1lbnQgdmFyaWFibGVzIGV4cG9zZWQgdmlhIGBwcm9jZXNzLmVudmBcbiAqICAgKiBTaGFyZWQgY3JlZGVudGlhbHMgYW5kIGNvbmZpZyBpbmkgZmlsZXNcbiAqICAgKiBUaGUgRUMyL0VDUyBJbnN0YW5jZSBNZXRhZGF0YSBTZXJ2aWNlXG4gKlxuICogVGhlIGRlZmF1bHQgY3JlZGVudGlhbCBwcm92aWRlciB3aWxsIGludm9rZSBvbmUgcHJvdmlkZXIgYXQgYSB0aW1lIGFuZCBvbmx5XG4gKiBjb250aW51ZSB0byB0aGUgbmV4dCBpZiBubyBjcmVkZW50aWFscyBoYXZlIGJlZW4gbG9jYXRlZC4gRm9yIGV4YW1wbGUsIGlmXG4gKiB0aGUgcHJvY2VzcyBmaW5kcyB2YWx1ZXMgZGVmaW5lZCB2aWEgdGhlIGBBV1NfQUNDRVNTX0tFWV9JRGAgYW5kXG4gKiBgQVdTX1NFQ1JFVF9BQ0NFU1NfS0VZYCBlbnZpcm9ubWVudCB2YXJpYWJsZXMsIHRoZSBmaWxlcyBhdFxuICogYH4vLmF3cy9jcmVkZW50aWFsc2AgYW5kIGB+Ly5hd3MvY29uZmlnYCB3aWxsIG5vdCBiZSByZWFkLCBub3Igd2lsbCBhbnlcbiAqIG1lc3NhZ2VzIGJlIHNlbnQgdG8gdGhlIEluc3RhbmNlIE1ldGFkYXRhIFNlcnZpY2UuXG4gKlxuICogQHBhcmFtIGluaXQgICAgICAgICAgICAgICAgICBDb25maWd1cmF0aW9uIHRoYXQgaXMgcGFzc2VkIHRvIGVhY2ggaW5kaXZpZHVhbFxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlclxuICpcbiAqIEBzZWUgZnJvbUVudiAgICAgICAgICAgICAgICAgVGhlIGZ1bmN0aW9uIHVzZWQgdG8gc291cmNlIGNyZWRlbnRpYWxzIGZyb21cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW52aXJvbm1lbnQgdmFyaWFibGVzXG4gKiBAc2VlIGZyb21JbmkgICAgICAgICAgICAgICAgIFRoZSBmdW5jdGlvbiB1c2VkIHRvIHNvdXJjZSBjcmVkZW50aWFscyBmcm9tIElOSVxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlc1xuICogQHNlZSBmcm9tUHJvY2VzcyAgICAgICAgICAgICBUaGUgZnVuY3Rpbm8gdXNlZCB0byBzb3VyY2VzIGNyZWRlbnRpYWxzIGZyb21cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlZGVudGlhbF9wcm9jZXNzIGluIElOSSBmaWxlc1xuICogQHNlZSBmcm9tSW5zdGFuY2VNZXRhZGF0YSAgICBUaGUgZnVuY3Rpb24gdXNlZCB0byBzb3VyY2UgY3JlZGVudGlhbHMgZnJvbSB0aGVcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRUMyIEluc3RhbmNlIE1ldGFkYXRhIFNlcnZpY2VcbiAqIEBzZWUgZnJvbUNvbnRhaW5lck1ldGFkYXRhICAgVGhlIGZ1bmN0aW9uIHVzZWQgdG8gc291cmNlIGNyZWRlbnRpYWxzIGZyb20gdGhlXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVDUyBDb250YWluZXIgTWV0YWRhdGEgU2VydmljZVxuICovXG5leHBvcnQgZnVuY3Rpb24gZGVmYXVsdFByb3ZpZGVyKGluaXQ6IEZyb21JbmlJbml0ICYgUmVtb3RlUHJvdmlkZXJJbml0ICYgRnJvbVByb2Nlc3NJbml0ID0ge30pOiBDcmVkZW50aWFsUHJvdmlkZXIge1xuICBjb25zdCB7IHByb2ZpbGUgPSBwcm9jZXNzLmVudltFTlZfUFJPRklMRV0gfSA9IGluaXQ7XG4gIGNvbnN0IHByb3ZpZGVyQ2hhaW4gPSBwcm9maWxlXG4gICAgPyBjaGFpbihmcm9tSW5pKGluaXQpLCBmcm9tUHJvY2Vzcyhpbml0KSlcbiAgICA6IGNoYWluKGZyb21FbnYoKSwgZnJvbUluaShpbml0KSwgZnJvbVByb2Nlc3MoaW5pdCksIHJlbW90ZVByb3ZpZGVyKGluaXQpKTtcblxuICByZXR1cm4gbWVtb2l6ZShcbiAgICBwcm92aWRlckNoYWluLFxuICAgIChjcmVkZW50aWFscykgPT4gY3JlZGVudGlhbHMuZXhwaXJhdGlvbiAhPT0gdW5kZWZpbmVkICYmIGNyZWRlbnRpYWxzLmV4cGlyYXRpb24uZ2V0VGltZSgpIC0gRGF0ZS5ub3coKSA8IDMwMDAwMCxcbiAgICAoY3JlZGVudGlhbHMpID0+IGNyZWRlbnRpYWxzLmV4cGlyYXRpb24gIT09IHVuZGVmaW5lZFxuICApO1xufVxuXG5mdW5jdGlvbiByZW1vdGVQcm92aWRlcihpbml0OiBSZW1vdGVQcm92aWRlckluaXQpOiBDcmVkZW50aWFsUHJvdmlkZXIge1xuICBpZiAocHJvY2Vzcy5lbnZbRU5WX0NNRFNfUkVMQVRJVkVfVVJJXSB8fCBwcm9jZXNzLmVudltFTlZfQ01EU19GVUxMX1VSSV0pIHtcbiAgICByZXR1cm4gZnJvbUNvbnRhaW5lck1ldGFkYXRhKGluaXQpO1xuICB9XG5cbiAgaWYgKHByb2Nlc3MuZW52W0VOVl9JTURTX0RJU0FCTEVEXSkge1xuICAgIHJldHVybiAoKSA9PiBQcm9taXNlLnJlamVjdChuZXcgUHJvdmlkZXJFcnJvcihcIkVDMiBJbnN0YW5jZSBNZXRhZGF0YSBTZXJ2aWNlIGFjY2VzcyBkaXNhYmxlZFwiKSk7XG4gIH1cblxuICByZXR1cm4gZnJvbUluc3RhbmNlTWV0YWRhdGEoaW5pdCk7XG59XG4iXX0= + +/***/ }), + +/***/ 40693: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromProcess = exports.ENV_PROFILE = void 0; +const credential_provider_ini_1 = __nccwpck_require__(92975); +const property_provider_1 = __nccwpck_require__(1014); +const child_process_1 = __nccwpck_require__(63129); +exports.ENV_PROFILE = "AWS_PROFILE"; +/** + * Creates a credential provider that will read from a credential_process specified + * in ini files. + */ +function fromProcess(init = {}) { + return () => credential_provider_ini_1.parseKnownFiles(init).then((profiles) => resolveProcessCredentials(credential_provider_ini_1.getMasterProfileName(init), profiles, init)); +} +exports.fromProcess = fromProcess; +async function resolveProcessCredentials(profileName, profiles, +// eslint-disable-next-line @typescript-eslint/no-unused-vars +options) { + 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.ProviderError(error.message); + }); + } + else { + throw new property_provider_1.ProviderError(`Profile ${profileName} did not contain credential_process.`); + } + } + else { + // If the profile cannot be parsed or does not contain the default or + // specified profile throw an error. This should be considered a terminal + // resolution error if a profile has been specified by the user (whether via + // a parameter, anenvironment variable, or another profile's `source_profile` key). + throw new property_provider_1.ProviderError(`Profile ${profileName} could not be found in shared credentials file.`); + } +} +function execPromise(command) { + return new Promise(function (resolve, reject) { + child_process_1.exec(command, (error, stdout) => { + if (error) { + reject(error); + return; + } + resolve(stdout.trim()); + }); + }); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOEVBQXlGO0FBQ3pGLGtFQUEyRDtBQUczRCxpREFBcUM7QUFFeEIsUUFBQSxXQUFXLEdBQUcsYUFBYSxDQUFDO0FBZXpDOzs7R0FHRztBQUNILFNBQWdCLFdBQVcsQ0FBQyxPQUF3QixFQUFFO0lBQ3BELE9BQU8sR0FBRyxFQUFFLENBQ1YseUNBQWUsQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxRQUFRLEVBQUUsRUFBRSxDQUFDLHlCQUF5QixDQUFDLDhDQUFvQixDQUFDLElBQUksQ0FBQyxFQUFFLFFBQVEsRUFBRSxJQUFJLENBQUMsQ0FBQyxDQUFDO0FBQ3BILENBQUM7QUFIRCxrQ0FHQztBQUVELEtBQUssVUFBVSx5QkFBeUIsQ0FDdEMsV0FBbUIsRUFDbkIsUUFBdUI7QUFDdkIsNkRBQTZEO0FBQzdELE9BQXdCO0lBRXhCLE1BQU0sT0FBTyxHQUFHLFFBQVEsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUV0QyxJQUFJLFFBQVEsQ0FBQyxXQUFXLENBQUMsRUFBRTtRQUN6QixNQUFNLGlCQUFpQixHQUFHLE9BQU8sQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO1FBQ3hELElBQUksaUJBQWlCLEtBQUssU0FBUyxFQUFFO1lBQ25DLE9BQU8sTUFBTSxXQUFXLENBQUMsaUJBQWlCLENBQUM7aUJBQ3hDLElBQUksQ0FBQyxDQUFDLGFBQWtCLEVBQUUsRUFBRTtnQkFDM0IsSUFBSSxJQUFJLENBQUM7Z0JBQ1QsSUFBSTtvQkFDRixJQUFJLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxhQUFhLENBQUMsQ0FBQztpQkFDbEM7Z0JBQUMsV0FBTTtvQkFDTixNQUFNLEtBQUssQ0FBQyxXQUFXLFdBQVcsNENBQTRDLENBQUMsQ0FBQztpQkFDakY7Z0JBRUQsTUFBTSxFQUNKLE9BQU8sRUFBRSxPQUFPLEVBQ2hCLFdBQVcsRUFBRSxXQUFXLEVBQ3hCLGVBQWUsRUFBRSxlQUFlLEVBQ2hDLFlBQVksRUFBRSxZQUFZLEVBQzFCLFVBQVUsRUFBRSxVQUFVLEdBQ3ZCLEdBQUcsSUFBSSxDQUFDO2dCQUVULElBQUksT0FBTyxLQUFLLENBQUMsRUFBRTtvQkFDakIsTUFBTSxLQUFLLENBQUMsV0FBVyxXQUFXLCtDQUErQyxDQUFDLENBQUM7aUJBQ3BGO2dCQUVELElBQUksV0FBVyxLQUFLLFNBQVMsSUFBSSxlQUFlLEtBQUssU0FBUyxFQUFFO29CQUM5RCxNQUFNLEtBQUssQ0FBQyxXQUFXLFdBQVcsbURBQW1ELENBQUMsQ0FBQztpQkFDeEY7Z0JBRUQsSUFBSSxjQUFjLENBQUM7Z0JBRW5CLElBQUksVUFBVSxFQUFFO29CQUNkLE1BQU0sV0FBVyxHQUFHLElBQUksSUFBSSxFQUFFLENBQUM7b0JBQy9CLE1BQU0sVUFBVSxHQUFHLElBQUksSUFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFDO29CQUN4QyxJQUFJLFVBQVUsR0FBRyxXQUFXLEVBQUU7d0JBQzVCLE1BQU0sS0FBSyxDQUFDLFdBQVcsV0FBVyxtREFBbUQsQ0FBQyxDQUFDO3FCQUN4RjtvQkFDRCxjQUFjLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQyxPQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsQ0FBQztpQkFDcEU7Z0JBRUQsT0FBTztvQkFDTCxXQUFXO29CQUNYLGVBQWU7b0JBQ2YsWUFBWTtvQkFDWixjQUFjO2lCQUNmLENBQUM7WUFDSixDQUFDLENBQUM7aUJBQ0QsS0FBSyxDQUFDLENBQUMsS0FBWSxFQUFFLEVBQUU7Z0JBQ3RCLE1BQU0sSUFBSSxpQ0FBYSxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztZQUN6QyxDQUFDLENBQUMsQ0FBQztTQUNOO2FBQU07WUFDTCxNQUFNLElBQUksaUNBQWEsQ0FBQyxXQUFXLFdBQVcsc0NBQXNDLENBQUMsQ0FBQztTQUN2RjtLQUNGO1NBQU07UUFDTCxxRUFBcUU7UUFDckUseUVBQXlFO1FBQ3pFLDRFQUE0RTtRQUM1RSxtRkFBbUY7UUFDbkYsTUFBTSxJQUFJLGlDQUFhLENBQUMsV0FBVyxXQUFXLGlEQUFpRCxDQUFDLENBQUM7S0FDbEc7QUFDSCxDQUFDO0FBRUQsU0FBUyxXQUFXLENBQUMsT0FBZTtJQUNsQyxPQUFPLElBQUksT0FBTyxDQUFDLFVBQVUsT0FBTyxFQUFFLE1BQU07UUFDMUMsb0JBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLEVBQUU7WUFDOUIsSUFBSSxLQUFLLEVBQUU7Z0JBQ1QsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDO2dCQUNkLE9BQU87YUFDUjtZQUVELE9BQU8sQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQztRQUN6QixDQUFDLENBQUMsQ0FBQztJQUNMLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGdldE1hc3RlclByb2ZpbGVOYW1lLCBwYXJzZUtub3duRmlsZXMgfSBmcm9tIFwiQGF3cy1zZGsvY3JlZGVudGlhbC1wcm92aWRlci1pbmlcIjtcbmltcG9ydCB7IFByb3ZpZGVyRXJyb3IgfSBmcm9tIFwiQGF3cy1zZGsvcHJvcGVydHktcHJvdmlkZXJcIjtcbmltcG9ydCB7IFBhcnNlZEluaURhdGEsIFNoYXJlZENvbmZpZ0ZpbGVzLCBTaGFyZWRDb25maWdJbml0IH0gZnJvbSBcIkBhd3Mtc2RrL3NoYXJlZC1pbmktZmlsZS1sb2FkZXJcIjtcbmltcG9ydCB7IENyZWRlbnRpYWxQcm92aWRlciwgQ3JlZGVudGlhbHMgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcbmltcG9ydCB7IGV4ZWMgfSBmcm9tIFwiY2hpbGRfcHJvY2Vzc1wiO1xuXG5leHBvcnQgY29uc3QgRU5WX1BST0ZJTEUgPSBcIkFXU19QUk9GSUxFXCI7XG5cbmV4cG9ydCBpbnRlcmZhY2UgRnJvbVByb2Nlc3NJbml0IGV4dGVuZHMgU2hhcmVkQ29uZmlnSW5pdCB7XG4gIC8qKlxuICAgKiBUaGUgY29uZmlndXJhdGlvbiBwcm9maWxlIHRvIHVzZS5cbiAgICovXG4gIHByb2ZpbGU/OiBzdHJpbmc7XG5cbiAgLyoqXG4gICAqIEEgcHJvbWlzZSB0aGF0IHdpbGwgYmUgcmVzb2x2ZWQgd2l0aCBsb2FkZWQgYW5kIHBhcnNlZCBjcmVkZW50aWFscyBmaWxlcy5cbiAgICogVXNlZCB0byBhdm9pZCBsb2FkaW5nIHNoYXJlZCBjb25maWcgZmlsZXMgbXVsdGlwbGUgdGltZXMuXG4gICAqL1xuICBsb2FkZWRDb25maWc/OiBQcm9taXNlPFNoYXJlZENvbmZpZ0ZpbGVzPjtcbn1cblxuLyoqXG4gKiBDcmVhdGVzIGEgY3JlZGVudGlhbCBwcm92aWRlciB0aGF0IHdpbGwgcmVhZCBmcm9tIGEgY3JlZGVudGlhbF9wcm9jZXNzIHNwZWNpZmllZFxuICogaW4gaW5pIGZpbGVzLlxuICovXG5leHBvcnQgZnVuY3Rpb24gZnJvbVByb2Nlc3MoaW5pdDogRnJvbVByb2Nlc3NJbml0ID0ge30pOiBDcmVkZW50aWFsUHJvdmlkZXIge1xuICByZXR1cm4gKCkgPT5cbiAgICBwYXJzZUtub3duRmlsZXMoaW5pdCkudGhlbigocHJvZmlsZXMpID0+IHJlc29sdmVQcm9jZXNzQ3JlZGVudGlhbHMoZ2V0TWFzdGVyUHJvZmlsZU5hbWUoaW5pdCksIHByb2ZpbGVzLCBpbml0KSk7XG59XG5cbmFzeW5jIGZ1bmN0aW9uIHJlc29sdmVQcm9jZXNzQ3JlZGVudGlhbHMoXG4gIHByb2ZpbGVOYW1lOiBzdHJpbmcsXG4gIHByb2ZpbGVzOiBQYXJzZWRJbmlEYXRhLFxuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzXG4gIG9wdGlvbnM6IEZyb21Qcm9jZXNzSW5pdFxuKTogUHJvbWlzZTxDcmVkZW50aWFscz4ge1xuICBjb25zdCBwcm9maWxlID0gcHJvZmlsZXNbcHJvZmlsZU5hbWVdO1xuXG4gIGlmIChwcm9maWxlc1twcm9maWxlTmFtZV0pIHtcbiAgICBjb25zdCBjcmVkZW50aWFsUHJvY2VzcyA9IHByb2ZpbGVbXCJjcmVkZW50aWFsX3Byb2Nlc3NcIl07XG4gICAgaWYgKGNyZWRlbnRpYWxQcm9jZXNzICE9PSB1bmRlZmluZWQpIHtcbiAgICAgIHJldHVybiBhd2FpdCBleGVjUHJvbWlzZShjcmVkZW50aWFsUHJvY2VzcylcbiAgICAgICAgLnRoZW4oKHByb2Nlc3NSZXN1bHQ6IGFueSkgPT4ge1xuICAgICAgICAgIGxldCBkYXRhO1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBkYXRhID0gSlNPTi5wYXJzZShwcm9jZXNzUmVzdWx0KTtcbiAgICAgICAgICB9IGNhdGNoIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKGBQcm9maWxlICR7cHJvZmlsZU5hbWV9IGNyZWRlbnRpYWxfcHJvY2VzcyByZXR1cm5lZCBpbnZhbGlkIEpTT04uYCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgVmVyc2lvbjogdmVyc2lvbixcbiAgICAgICAgICAgIEFjY2Vzc0tleUlkOiBhY2Nlc3NLZXlJZCxcbiAgICAgICAgICAgIFNlY3JldEFjY2Vzc0tleTogc2VjcmV0QWNjZXNzS2V5LFxuICAgICAgICAgICAgU2Vzc2lvblRva2VuOiBzZXNzaW9uVG9rZW4sXG4gICAgICAgICAgICBFeHBpcmF0aW9uOiBleHBpcmF0aW9uLFxuICAgICAgICAgIH0gPSBkYXRhO1xuXG4gICAgICAgICAgaWYgKHZlcnNpb24gIT09IDEpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKGBQcm9maWxlICR7cHJvZmlsZU5hbWV9IGNyZWRlbnRpYWxfcHJvY2VzcyBkaWQgbm90IHJldHVybiBWZXJzaW9uIDEuYCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGFjY2Vzc0tleUlkID09PSB1bmRlZmluZWQgfHwgc2VjcmV0QWNjZXNzS2V5ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKGBQcm9maWxlICR7cHJvZmlsZU5hbWV9IGNyZWRlbnRpYWxfcHJvY2VzcyByZXR1cm5lZCBpbnZhbGlkIGNyZWRlbnRpYWxzLmApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGxldCBleHBpcmF0aW9uVW5peDtcblxuICAgICAgICAgIGlmIChleHBpcmF0aW9uKSB7XG4gICAgICAgICAgICBjb25zdCBjdXJyZW50VGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICBjb25zdCBleHBpcmVUaW1lID0gbmV3IERhdGUoZXhwaXJhdGlvbik7XG4gICAgICAgICAgICBpZiAoZXhwaXJlVGltZSA8IGN1cnJlbnRUaW1lKSB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKGBQcm9maWxlICR7cHJvZmlsZU5hbWV9IGNyZWRlbnRpYWxfcHJvY2VzcyByZXR1cm5lZCBleHBpcmVkIGNyZWRlbnRpYWxzLmApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXhwaXJhdGlvblVuaXggPSBNYXRoLmZsb29yKG5ldyBEYXRlKGV4cGlyYXRpb24pLnZhbHVlT2YoKSAvIDEwMDApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBhY2Nlc3NLZXlJZCxcbiAgICAgICAgICAgIHNlY3JldEFjY2Vzc0tleSxcbiAgICAgICAgICAgIHNlc3Npb25Ub2tlbixcbiAgICAgICAgICAgIGV4cGlyYXRpb25Vbml4LFxuICAgICAgICAgIH07XG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaCgoZXJyb3I6IEVycm9yKSA9PiB7XG4gICAgICAgICAgdGhyb3cgbmV3IFByb3ZpZGVyRXJyb3IoZXJyb3IubWVzc2FnZSk7XG4gICAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aHJvdyBuZXcgUHJvdmlkZXJFcnJvcihgUHJvZmlsZSAke3Byb2ZpbGVOYW1lfSBkaWQgbm90IGNvbnRhaW4gY3JlZGVudGlhbF9wcm9jZXNzLmApO1xuICAgIH1cbiAgfSBlbHNlIHtcbiAgICAvLyBJZiB0aGUgcHJvZmlsZSBjYW5ub3QgYmUgcGFyc2VkIG9yIGRvZXMgbm90IGNvbnRhaW4gdGhlIGRlZmF1bHQgb3JcbiAgICAvLyBzcGVjaWZpZWQgcHJvZmlsZSB0aHJvdyBhbiBlcnJvci4gVGhpcyBzaG91bGQgYmUgY29uc2lkZXJlZCBhIHRlcm1pbmFsXG4gICAgLy8gcmVzb2x1dGlvbiBlcnJvciBpZiBhIHByb2ZpbGUgaGFzIGJlZW4gc3BlY2lmaWVkIGJ5IHRoZSB1c2VyICh3aGV0aGVyIHZpYVxuICAgIC8vIGEgcGFyYW1ldGVyLCBhbmVudmlyb25tZW50IHZhcmlhYmxlLCBvciBhbm90aGVyIHByb2ZpbGUncyBgc291cmNlX3Byb2ZpbGVgIGtleSkuXG4gICAgdGhyb3cgbmV3IFByb3ZpZGVyRXJyb3IoYFByb2ZpbGUgJHtwcm9maWxlTmFtZX0gY291bGQgbm90IGJlIGZvdW5kIGluIHNoYXJlZCBjcmVkZW50aWFscyBmaWxlLmApO1xuICB9XG59XG5cbmZ1bmN0aW9uIGV4ZWNQcm9taXNlKGNvbW1hbmQ6IHN0cmluZykge1xuICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24gKHJlc29sdmUsIHJlamVjdCkge1xuICAgIGV4ZWMoY29tbWFuZCwgKGVycm9yLCBzdGRvdXQpID0+IHtcbiAgICAgIGlmIChlcnJvcikge1xuICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHJlc29sdmUoc3Rkb3V0LnRyaW0oKSk7XG4gICAgfSk7XG4gIH0pO1xufVxuIl19 + +/***/ }), + +/***/ 90791: +/***/ ((__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__(38577); +const buffer_1 = __nccwpck_require__(64293); +const crypto_1 = __nccwpck_require__(76417); +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); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsZ0VBQXdGO0FBQ3hGLG1DQUFnQztBQUNoQyxtQ0FBd0U7QUFFeEUsTUFBYSxJQUFJO0lBR2YsWUFBWSxtQkFBMkIsRUFBRSxNQUFtQjtRQUMxRCxJQUFJLENBQUMsSUFBSSxHQUFHLE1BQU0sQ0FBQyxDQUFDLENBQUMsbUJBQVUsQ0FBQyxtQkFBbUIsRUFBRSxjQUFjLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsbUJBQVUsQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDO0lBQ2pILENBQUM7SUFFRCxNQUFNLENBQUMsTUFBa0IsRUFBRSxRQUFzQztRQUMvRCxJQUFJLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxjQUFjLENBQUMsTUFBTSxFQUFFLFFBQVEsQ0FBQyxDQUFDLENBQUM7SUFDckQsQ0FBQztJQUVELE1BQU07UUFDSixPQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDO0lBQzdDLENBQUM7Q0FDRjtBQWRELG9CQWNDO0FBRUQsU0FBUyxjQUFjLENBQUMsTUFBa0IsRUFBRSxRQUF5QjtJQUNuRSxJQUFJLGVBQU0sQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLEVBQUU7UUFDM0IsT0FBTyxNQUFNLENBQUM7S0FDZjtJQUVELElBQUksT0FBTyxNQUFNLEtBQUssUUFBUSxFQUFFO1FBQzlCLE9BQU8sNkJBQVUsQ0FBQyxNQUFNLEVBQUUsUUFBUSxDQUFDLENBQUM7S0FDckM7SUFFRCxJQUFJLFdBQVcsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLEVBQUU7UUFDOUIsT0FBTyxrQ0FBZSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLFVBQVUsRUFBRSxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUM7S0FDN0U7SUFFRCxPQUFPLGtDQUFlLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDakMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEhhc2ggYXMgSUhhc2gsIFNvdXJjZURhdGEgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcbmltcG9ydCB7IGZyb21BcnJheUJ1ZmZlciwgZnJvbVN0cmluZywgU3RyaW5nRW5jb2RpbmcgfSBmcm9tIFwiQGF3cy1zZGsvdXRpbC1idWZmZXItZnJvbVwiO1xuaW1wb3J0IHsgQnVmZmVyIH0gZnJvbSBcImJ1ZmZlclwiO1xuaW1wb3J0IHsgY3JlYXRlSGFzaCwgY3JlYXRlSG1hYywgSGFzaCBhcyBOb2RlSGFzaCwgSG1hYyB9IGZyb20gXCJjcnlwdG9cIjtcblxuZXhwb3J0IGNsYXNzIEhhc2ggaW1wbGVtZW50cyBJSGFzaCB7XG4gIHByaXZhdGUgcmVhZG9ubHkgaGFzaDogTm9kZUhhc2ggfCBIbWFjO1xuXG4gIGNvbnN0cnVjdG9yKGFsZ29yaXRobUlkZW50aWZpZXI6IHN0cmluZywgc2VjcmV0PzogU291cmNlRGF0YSkge1xuICAgIHRoaXMuaGFzaCA9IHNlY3JldCA/IGNyZWF0ZUhtYWMoYWxnb3JpdGhtSWRlbnRpZmllciwgY2FzdFNvdXJjZURhdGEoc2VjcmV0KSkgOiBjcmVhdGVIYXNoKGFsZ29yaXRobUlkZW50aWZpZXIpO1xuICB9XG5cbiAgdXBkYXRlKHRvSGFzaDogU291cmNlRGF0YSwgZW5jb2Rpbmc/OiBcInV0ZjhcIiB8IFwiYXNjaWlcIiB8IFwibGF0aW4xXCIpOiB2b2lkIHtcbiAgICB0aGlzLmhhc2gudXBkYXRlKGNhc3RTb3VyY2VEYXRhKHRvSGFzaCwgZW5jb2RpbmcpKTtcbiAgfVxuXG4gIGRpZ2VzdCgpOiBQcm9taXNlPFVpbnQ4QXJyYXk+IHtcbiAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKHRoaXMuaGFzaC5kaWdlc3QoKSk7XG4gIH1cbn1cblxuZnVuY3Rpb24gY2FzdFNvdXJjZURhdGEodG9DYXN0OiBTb3VyY2VEYXRhLCBlbmNvZGluZz86IFN0cmluZ0VuY29kaW5nKTogQnVmZmVyIHtcbiAgaWYgKEJ1ZmZlci5pc0J1ZmZlcih0b0Nhc3QpKSB7XG4gICAgcmV0dXJuIHRvQ2FzdDtcbiAgfVxuXG4gIGlmICh0eXBlb2YgdG9DYXN0ID09PSBcInN0cmluZ1wiKSB7XG4gICAgcmV0dXJuIGZyb21TdHJpbmcodG9DYXN0LCBlbmNvZGluZyk7XG4gIH1cblxuICBpZiAoQXJyYXlCdWZmZXIuaXNWaWV3KHRvQ2FzdCkpIHtcbiAgICByZXR1cm4gZnJvbUFycmF5QnVmZmVyKHRvQ2FzdC5idWZmZXIsIHRvQ2FzdC5ieXRlT2Zmc2V0LCB0b0Nhc3QuYnl0ZUxlbmd0aCk7XG4gIH1cblxuICByZXR1cm4gZnJvbUFycmF5QnVmZmVyKHRvQ2FzdCk7XG59XG4iXX0= + +/***/ }), + +/***/ 30694: +/***/ ((__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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQU8sTUFBTSxhQUFhLEdBQUcsQ0FBQyxHQUFRLEVBQXNCLEVBQUUsQ0FDNUQsQ0FBQyxPQUFPLFdBQVcsS0FBSyxVQUFVLElBQUksR0FBRyxZQUFZLFdBQVcsQ0FBQztJQUNqRSxNQUFNLENBQUMsU0FBUyxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssc0JBQXNCLENBQUM7QUFGcEQsUUFBQSxhQUFhLGlCQUV1QyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBpc0FycmF5QnVmZmVyID0gKGFyZzogYW55KTogYXJnIGlzIEFycmF5QnVmZmVyID0+XG4gICh0eXBlb2YgQXJyYXlCdWZmZXIgPT09IFwiZnVuY3Rpb25cIiAmJiBhcmcgaW5zdGFuY2VvZiBBcnJheUJ1ZmZlcikgfHxcbiAgT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKGFyZykgPT09IFwiW29iamVjdCBBcnJheUJ1ZmZlcl1cIjtcbiJdfQ== + +/***/ }), + +/***/ 69323: +/***/ ((__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__(67498); +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", +}; +const getContentLengthPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), exports.contentLengthMiddlewareOptions); + }, +}); +exports.getContentLengthPlugin = getContentLengthPlugin; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQXFEO0FBWXJELE1BQU0scUJBQXFCLEdBQUcsZ0JBQWdCLENBQUM7QUFFL0MsU0FBZ0IsdUJBQXVCLENBQUMsaUJBQXVDO0lBQzdFLE9BQU8sQ0FBZ0MsSUFBK0IsRUFBNkIsRUFBRSxDQUFDLEtBQUssRUFDekcsSUFBZ0MsRUFDSyxFQUFFO1FBQ3ZDLE1BQU0sT0FBTyxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUM7UUFDN0IsSUFBSSwyQkFBVyxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUMsRUFBRTtZQUNuQyxNQUFNLEVBQUUsSUFBSSxFQUFFLE9BQU8sRUFBRSxHQUFHLE9BQU8sQ0FBQztZQUNsQyxJQUNFLElBQUk7Z0JBQ0osTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUM7cUJBQ2pCLEdBQUcsQ0FBQyxDQUFDLEdBQUcsRUFBRSxFQUFFLENBQUMsR0FBRyxDQUFDLFdBQVcsRUFBRSxDQUFDO3FCQUMvQixPQUFPLENBQUMscUJBQXFCLENBQUMsS0FBSyxDQUFDLENBQUMsRUFDeEM7Z0JBQ0EsTUFBTSxNQUFNLEdBQUcsaUJBQWlCLENBQUMsSUFBSSxDQUFDLENBQUM7Z0JBQ3ZDLElBQUksTUFBTSxLQUFLLFNBQVMsRUFBRTtvQkFDeEIsT0FBTyxDQUFDLE9BQU8sR0FBRzt3QkFDaEIsR0FBRyxPQUFPLENBQUMsT0FBTzt3QkFDbEIsQ0FBQyxxQkFBcUIsQ0FBQyxFQUFFLE1BQU0sQ0FBQyxNQUFNLENBQUM7cUJBQ3hDLENBQUM7aUJBQ0g7YUFDRjtTQUNGO1FBRUQsT0FBTyxJQUFJLENBQUM7WUFDVixHQUFHLElBQUk7WUFDUCxPQUFPO1NBQ1IsQ0FBQyxDQUFDO0lBQ0wsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQTVCRCwwREE0QkM7QUFFWSxRQUFBLDhCQUE4QixHQUF3QjtJQUNqRSxJQUFJLEVBQUUsT0FBTztJQUNiLElBQUksRUFBRSxDQUFDLG9CQUFvQixFQUFFLGdCQUFnQixDQUFDO0lBQzlDLElBQUksRUFBRSx5QkFBeUI7Q0FDaEMsQ0FBQztBQUVLLE1BQU0sc0JBQXNCLEdBQUcsQ0FBQyxPQUFvRCxFQUF1QixFQUFFLENBQUMsQ0FBQztJQUNwSCxZQUFZLEVBQUUsQ0FBQyxXQUFXLEVBQUUsRUFBRTtRQUM1QixXQUFXLENBQUMsR0FBRyxDQUFDLHVCQUF1QixDQUFDLE9BQU8sQ0FBQyxpQkFBaUIsQ0FBQyxFQUFFLHNDQUE4QixDQUFDLENBQUM7SUFDdEcsQ0FBQztDQUNGLENBQUMsQ0FBQztBQUpVLFFBQUEsc0JBQXNCLDBCQUloQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEh0dHBSZXF1ZXN0IH0gZnJvbSBcIkBhd3Mtc2RrL3Byb3RvY29sLWh0dHBcIjtcbmltcG9ydCB7XG4gIEJvZHlMZW5ndGhDYWxjdWxhdG9yLFxuICBCdWlsZEhhbmRsZXIsXG4gIEJ1aWxkSGFuZGxlckFyZ3VtZW50cyxcbiAgQnVpbGRIYW5kbGVyT3B0aW9ucyxcbiAgQnVpbGRIYW5kbGVyT3V0cHV0LFxuICBCdWlsZE1pZGRsZXdhcmUsXG4gIE1ldGFkYXRhQmVhcmVyLFxuICBQbHVnZ2FibGUsXG59IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5jb25zdCBDT05URU5UX0xFTkdUSF9IRUFERVIgPSBcImNvbnRlbnQtbGVuZ3RoXCI7XG5cbmV4cG9ydCBmdW5jdGlvbiBjb250ZW50TGVuZ3RoTWlkZGxld2FyZShib2R5TGVuZ3RoQ2hlY2tlcjogQm9keUxlbmd0aENhbGN1bGF0b3IpOiBCdWlsZE1pZGRsZXdhcmU8YW55LCBhbnk+IHtcbiAgcmV0dXJuIDxPdXRwdXQgZXh0ZW5kcyBNZXRhZGF0YUJlYXJlcj4obmV4dDogQnVpbGRIYW5kbGVyPGFueSwgT3V0cHV0Pik6IEJ1aWxkSGFuZGxlcjxhbnksIE91dHB1dD4gPT4gYXN5bmMgKFxuICAgIGFyZ3M6IEJ1aWxkSGFuZGxlckFyZ3VtZW50czxhbnk+XG4gICk6IFByb21pc2U8QnVpbGRIYW5kbGVyT3V0cHV0PE91dHB1dD4+ID0+IHtcbiAgICBjb25zdCByZXF1ZXN0ID0gYXJncy5yZXF1ZXN0O1xuICAgIGlmIChIdHRwUmVxdWVzdC5pc0luc3RhbmNlKHJlcXVlc3QpKSB7XG4gICAgICBjb25zdCB7IGJvZHksIGhlYWRlcnMgfSA9IHJlcXVlc3Q7XG4gICAgICBpZiAoXG4gICAgICAgIGJvZHkgJiZcbiAgICAgICAgT2JqZWN0LmtleXMoaGVhZGVycylcbiAgICAgICAgICAubWFwKChzdHIpID0+IHN0ci50b0xvd2VyQ2FzZSgpKVxuICAgICAgICAgIC5pbmRleE9mKENPTlRFTlRfTEVOR1RIX0hFQURFUikgPT09IC0xXG4gICAgICApIHtcbiAgICAgICAgY29uc3QgbGVuZ3RoID0gYm9keUxlbmd0aENoZWNrZXIoYm9keSk7XG4gICAgICAgIGlmIChsZW5ndGggIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHJlcXVlc3QuaGVhZGVycyA9IHtcbiAgICAgICAgICAgIC4uLnJlcXVlc3QuaGVhZGVycyxcbiAgICAgICAgICAgIFtDT05URU5UX0xFTkdUSF9IRUFERVJdOiBTdHJpbmcobGVuZ3RoKSxcbiAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG5leHQoe1xuICAgICAgLi4uYXJncyxcbiAgICAgIHJlcXVlc3QsXG4gICAgfSk7XG4gIH07XG59XG5cbmV4cG9ydCBjb25zdCBjb250ZW50TGVuZ3RoTWlkZGxld2FyZU9wdGlvbnM6IEJ1aWxkSGFuZGxlck9wdGlvbnMgPSB7XG4gIHN0ZXA6IFwiYnVpbGRcIixcbiAgdGFnczogW1wiU0VUX0NPTlRFTlRfTEVOR1RIXCIsIFwiQ09OVEVOVF9MRU5HVEhcIl0sXG4gIG5hbWU6IFwiY29udGVudExlbmd0aE1pZGRsZXdhcmVcIixcbn07XG5cbmV4cG9ydCBjb25zdCBnZXRDb250ZW50TGVuZ3RoUGx1Z2luID0gKG9wdGlvbnM6IHsgYm9keUxlbmd0aENoZWNrZXI6IEJvZHlMZW5ndGhDYWxjdWxhdG9yIH0pOiBQbHVnZ2FibGU8YW55LCBhbnk+ID0+ICh7XG4gIGFwcGx5VG9TdGFjazogKGNsaWVudFN0YWNrKSA9PiB7XG4gICAgY2xpZW50U3RhY2suYWRkKGNvbnRlbnRMZW5ndGhNaWRkbGV3YXJlKG9wdGlvbnMuYm9keUxlbmd0aENoZWNrZXIpLCBjb250ZW50TGVuZ3RoTWlkZGxld2FyZU9wdGlvbnMpO1xuICB9LFxufSk7XG4iXX0= + +/***/ }), + +/***/ 58645: +/***/ ((__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__(67498); +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 || {}; + //For H2 request, remove 'host' header and use ':authority' header instead + //reference: https://nodejs.org/dist/latest-v13.x/docs/api/errors.html#ERR_HTTP2_INVALID_CONNECTION_HEADERS + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = ""; + //non-H2 request and 'host' header is not set, set the 'host' header to request's hostname. + } + 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"], +}; +const getHostHeaderPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(exports.hostHeaderMiddleware(options), exports.hostHeaderMiddlewareOptions); + }, +}); +exports.getHostHeaderPlugin = getHostHeaderPlugin; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQXFEO0FBVXJELFNBQWdCLHVCQUF1QixDQUNyQyxLQUFxRDtJQUVyRCxPQUFPLEtBQUssQ0FBQztBQUNmLENBQUM7QUFKRCwwREFJQztBQUVNLE1BQU0sb0JBQW9CLEdBQUcsQ0FDbEMsT0FBaUMsRUFDRCxFQUFFLENBQUMsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLEtBQUssRUFBRSxJQUFJLEVBQUUsRUFBRTtJQUM1RCxJQUFJLENBQUMsMkJBQVcsQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQztRQUFFLE9BQU8sSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQzdELE1BQU0sRUFBRSxPQUFPLEVBQUUsR0FBRyxJQUFJLENBQUM7SUFDekIsTUFBTSxFQUFFLGVBQWUsR0FBRyxFQUFFLEVBQUUsR0FBRyxPQUFPLENBQUMsY0FBYyxDQUFDLFFBQVEsSUFBSSxFQUFFLENBQUM7SUFDdkUsMEVBQTBFO0lBQzFFLDJHQUEyRztJQUMzRyxJQUFJLGVBQWUsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLE9BQU8sQ0FBQyxZQUFZLENBQUMsRUFBRTtRQUN4RSxPQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDL0IsT0FBTyxDQUFDLE9BQU8sQ0FBQyxZQUFZLENBQUMsR0FBRyxFQUFFLENBQUM7UUFDbkMsMkZBQTJGO0tBQzVGO1NBQU0sSUFBSSxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLEVBQUU7UUFDbkMsT0FBTyxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDO0tBQzVDO0lBQ0QsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDcEIsQ0FBQyxDQUFDO0FBaEJXLFFBQUEsb0JBQW9CLHdCQWdCL0I7QUFFVyxRQUFBLDJCQUEyQixHQUEyQztJQUNqRixJQUFJLEVBQUUsc0JBQXNCO0lBQzVCLElBQUksRUFBRSxPQUFPO0lBQ2IsUUFBUSxFQUFFLEtBQUs7SUFDZixJQUFJLEVBQUUsQ0FBQyxNQUFNLENBQUM7Q0FDZixDQUFDO0FBRUssTUFBTSxtQkFBbUIsR0FBRyxDQUFDLE9BQWlDLEVBQXVCLEVBQUUsQ0FBQyxDQUFDO0lBQzlGLFlBQVksRUFBRSxDQUFDLFdBQVcsRUFBRSxFQUFFO1FBQzVCLFdBQVcsQ0FBQyxHQUFHLENBQUMsNEJBQW9CLENBQUMsT0FBTyxDQUFDLEVBQUUsbUNBQTJCLENBQUMsQ0FBQztJQUM5RSxDQUFDO0NBQ0YsQ0FBQyxDQUFDO0FBSlUsUUFBQSxtQkFBbUIsdUJBSTdCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSHR0cFJlcXVlc3QgfSBmcm9tIFwiQGF3cy1zZGsvcHJvdG9jb2wtaHR0cFwiO1xuaW1wb3J0IHsgQWJzb2x1dGVMb2NhdGlvbiwgQnVpbGRIYW5kbGVyT3B0aW9ucywgQnVpbGRNaWRkbGV3YXJlLCBQbHVnZ2FibGUsIFJlcXVlc3RIYW5kbGVyIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmV4cG9ydCBpbnRlcmZhY2UgSG9zdEhlYWRlcklucHV0Q29uZmlnIHt9XG5pbnRlcmZhY2UgUHJldmlvdXNseVJlc29sdmVkIHtcbiAgcmVxdWVzdEhhbmRsZXI6IFJlcXVlc3RIYW5kbGVyPGFueSwgYW55Pjtcbn1cbmV4cG9ydCBpbnRlcmZhY2UgSG9zdEhlYWRlclJlc29sdmVkQ29uZmlnIHtcbiAgcmVxdWVzdEhhbmRsZXI6IFJlcXVlc3RIYW5kbGVyPGFueSwgYW55Pjtcbn1cbmV4cG9ydCBmdW5jdGlvbiByZXNvbHZlSG9zdEhlYWRlckNvbmZpZzxUPihcbiAgaW5wdXQ6IFQgJiBQcmV2aW91c2x5UmVzb2x2ZWQgJiBIb3N0SGVhZGVySW5wdXRDb25maWdcbik6IFQgJiBIb3N0SGVhZGVyUmVzb2x2ZWRDb25maWcge1xuICByZXR1cm4gaW5wdXQ7XG59XG5cbmV4cG9ydCBjb25zdCBob3N0SGVhZGVyTWlkZGxld2FyZSA9IDxJbnB1dCBleHRlbmRzIG9iamVjdCwgT3V0cHV0IGV4dGVuZHMgb2JqZWN0PihcbiAgb3B0aW9uczogSG9zdEhlYWRlclJlc29sdmVkQ29uZmlnXG4pOiBCdWlsZE1pZGRsZXdhcmU8SW5wdXQsIE91dHB1dD4gPT4gKG5leHQpID0+IGFzeW5jIChhcmdzKSA9PiB7XG4gIGlmICghSHR0cFJlcXVlc3QuaXNJbnN0YW5jZShhcmdzLnJlcXVlc3QpKSByZXR1cm4gbmV4dChhcmdzKTtcbiAgY29uc3QgeyByZXF1ZXN0IH0gPSBhcmdzO1xuICBjb25zdCB7IGhhbmRsZXJQcm90b2NvbCA9IFwiXCIgfSA9IG9wdGlvbnMucmVxdWVzdEhhbmRsZXIubWV0YWRhdGEgfHwge307XG4gIC8vRm9yIEgyIHJlcXVlc3QsIHJlbW92ZSAnaG9zdCcgaGVhZGVyIGFuZCB1c2UgJzphdXRob3JpdHknIGhlYWRlciBpbnN0ZWFkXG4gIC8vcmVmZXJlbmNlOiBodHRwczovL25vZGVqcy5vcmcvZGlzdC9sYXRlc3QtdjEzLngvZG9jcy9hcGkvZXJyb3JzLmh0bWwjRVJSX0hUVFAyX0lOVkFMSURfQ09OTkVDVElPTl9IRUFERVJTXG4gIGlmIChoYW5kbGVyUHJvdG9jb2wuaW5kZXhPZihcImgyXCIpID49IDAgJiYgIXJlcXVlc3QuaGVhZGVyc1tcIjphdXRob3JpdHlcIl0pIHtcbiAgICBkZWxldGUgcmVxdWVzdC5oZWFkZXJzW1wiaG9zdFwiXTtcbiAgICByZXF1ZXN0LmhlYWRlcnNbXCI6YXV0aG9yaXR5XCJdID0gXCJcIjtcbiAgICAvL25vbi1IMiByZXF1ZXN0IGFuZCAnaG9zdCcgaGVhZGVyIGlzIG5vdCBzZXQsIHNldCB0aGUgJ2hvc3QnIGhlYWRlciB0byByZXF1ZXN0J3MgaG9zdG5hbWUuXG4gIH0gZWxzZSBpZiAoIXJlcXVlc3QuaGVhZGVyc1tcImhvc3RcIl0pIHtcbiAgICByZXF1ZXN0LmhlYWRlcnNbXCJob3N0XCJdID0gcmVxdWVzdC5ob3N0bmFtZTtcbiAgfVxuICByZXR1cm4gbmV4dChhcmdzKTtcbn07XG5cbmV4cG9ydCBjb25zdCBob3N0SGVhZGVyTWlkZGxld2FyZU9wdGlvbnM6IEJ1aWxkSGFuZGxlck9wdGlvbnMgJiBBYnNvbHV0ZUxvY2F0aW9uID0ge1xuICBuYW1lOiBcImhvc3RIZWFkZXJNaWRkbGV3YXJlXCIsXG4gIHN0ZXA6IFwiYnVpbGRcIixcbiAgcHJpb3JpdHk6IFwibG93XCIsXG4gIHRhZ3M6IFtcIkhPU1RcIl0sXG59O1xuXG5leHBvcnQgY29uc3QgZ2V0SG9zdEhlYWRlclBsdWdpbiA9IChvcHRpb25zOiBIb3N0SGVhZGVyUmVzb2x2ZWRDb25maWcpOiBQbHVnZ2FibGU8YW55LCBhbnk+ID0+ICh7XG4gIGFwcGx5VG9TdGFjazogKGNsaWVudFN0YWNrKSA9PiB7XG4gICAgY2xpZW50U3RhY2suYWRkKGhvc3RIZWFkZXJNaWRkbGV3YXJlKG9wdGlvbnMpLCBob3N0SGVhZGVyTWlkZGxld2FyZU9wdGlvbnMpO1xuICB9LFxufSk7XG4iXX0= + +/***/ }), + +/***/ 98685: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(63712), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNkRBQW1DIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vbG9nZ2VyTWlkZGxld2FyZVwiO1xuIl19 + +/***/ }), + +/***/ 63712: +/***/ ((__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", +}; +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const getLoggerPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(exports.loggerMiddleware(), exports.loggerMiddlewareOptions); + }, +}); +exports.getLoggerPlugin = getLoggerPlugin; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyTWlkZGxld2FyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXJNaWRkbGV3YXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQVlPLE1BQU0sZ0JBQWdCLEdBQUcsR0FBRyxFQUFFLENBQUMsQ0FDcEMsSUFBb0MsRUFDcEMsT0FBZ0MsRUFDQSxFQUFFLENBQUMsS0FBSyxFQUN4QyxJQUFxQyxFQUNLLEVBQUU7SUFDNUMsTUFBTSxFQUFFLFVBQVUsRUFBRSxXQUFXLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSxFQUFFLHdCQUF3QixFQUFFLEdBQUcsT0FBTyxDQUFDO0lBRXZHLE1BQU0sUUFBUSxHQUFHLE1BQU0sSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBRWxDLElBQUksQ0FBQyxNQUFNLEVBQUU7UUFDWCxPQUFPLFFBQVEsQ0FBQztLQUNqQjtJQUVELElBQUksT0FBTyxNQUFNLENBQUMsSUFBSSxLQUFLLFVBQVUsRUFBRTtRQUNyQyxNQUFNLEVBQUUsU0FBUyxFQUFFLEdBQUcscUJBQXFCLEVBQUUsR0FBRyxRQUFRLENBQUMsTUFBTSxDQUFDO1FBQ2hFLE1BQU0sQ0FBQyxJQUFJLENBQUM7WUFDVixVQUFVO1lBQ1YsV0FBVztZQUNYLEtBQUssRUFBRSx1QkFBdUIsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDO1lBQzFDLE1BQU0sRUFBRSx3QkFBd0IsQ0FBQyxxQkFBcUIsQ0FBQztZQUN2RCxRQUFRLEVBQUUsU0FBUztTQUNwQixDQUFDLENBQUM7S0FDSjtJQUVELE9BQU8sUUFBUSxDQUFDO0FBQ2xCLENBQUMsQ0FBQztBQTFCVyxRQUFBLGdCQUFnQixvQkEwQjNCO0FBRVcsUUFBQSx1QkFBdUIsR0FBZ0Q7SUFDbEYsSUFBSSxFQUFFLGtCQUFrQjtJQUN4QixJQUFJLEVBQUUsQ0FBQyxRQUFRLENBQUM7SUFDaEIsSUFBSSxFQUFFLFlBQVk7Q0FDbkIsQ0FBQztBQUVGLDZEQUE2RDtBQUN0RCxNQUFNLGVBQWUsR0FBRyxDQUFDLE9BQVksRUFBdUIsRUFBRSxDQUFDLENBQUM7SUFDckUsWUFBWSxFQUFFLENBQUMsV0FBVyxFQUFFLEVBQUU7UUFDNUIsV0FBVyxDQUFDLEdBQUcsQ0FBQyx3QkFBZ0IsRUFBRSxFQUFFLCtCQUF1QixDQUFDLENBQUM7SUFDL0QsQ0FBQztDQUNGLENBQUMsQ0FBQztBQUpVLFFBQUEsZUFBZSxtQkFJekIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIdHRwUmVzcG9uc2UgfSBmcm9tIFwiQGF3cy1zZGsvcHJvdG9jb2wtaHR0cFwiO1xuaW1wb3J0IHtcbiAgQWJzb2x1dGVMb2NhdGlvbixcbiAgSGFuZGxlckV4ZWN1dGlvbkNvbnRleHQsXG4gIEluaXRpYWxpemVIYW5kbGVyLFxuICBJbml0aWFsaXplSGFuZGxlckFyZ3VtZW50cyxcbiAgSW5pdGlhbGl6ZUhhbmRsZXJPcHRpb25zLFxuICBJbml0aWFsaXplSGFuZGxlck91dHB1dCxcbiAgTWV0YWRhdGFCZWFyZXIsXG4gIFBsdWdnYWJsZSxcbn0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmV4cG9ydCBjb25zdCBsb2dnZXJNaWRkbGV3YXJlID0gKCkgPT4gPE91dHB1dCBleHRlbmRzIE1ldGFkYXRhQmVhcmVyID0gTWV0YWRhdGFCZWFyZXI+KFxuICBuZXh0OiBJbml0aWFsaXplSGFuZGxlcjxhbnksIE91dHB1dD4sXG4gIGNvbnRleHQ6IEhhbmRsZXJFeGVjdXRpb25Db250ZXh0XG4pOiBJbml0aWFsaXplSGFuZGxlcjxhbnksIE91dHB1dD4gPT4gYXN5bmMgKFxuICBhcmdzOiBJbml0aWFsaXplSGFuZGxlckFyZ3VtZW50czxhbnk+XG4pOiBQcm9taXNlPEluaXRpYWxpemVIYW5kbGVyT3V0cHV0PE91dHB1dD4+ID0+IHtcbiAgY29uc3QgeyBjbGllbnROYW1lLCBjb21tYW5kTmFtZSwgaW5wdXRGaWx0ZXJTZW5zaXRpdmVMb2csIGxvZ2dlciwgb3V0cHV0RmlsdGVyU2Vuc2l0aXZlTG9nIH0gPSBjb250ZXh0O1xuXG4gIGNvbnN0IHJlc3BvbnNlID0gYXdhaXQgbmV4dChhcmdzKTtcblxuICBpZiAoIWxvZ2dlcikge1xuICAgIHJldHVybiByZXNwb25zZTtcbiAgfVxuXG4gIGlmICh0eXBlb2YgbG9nZ2VyLmluZm8gPT09IFwiZnVuY3Rpb25cIikge1xuICAgIGNvbnN0IHsgJG1ldGFkYXRhLCAuLi5vdXRwdXRXaXRob3V0TWV0YWRhdGEgfSA9IHJlc3BvbnNlLm91dHB1dDtcbiAgICBsb2dnZXIuaW5mbyh7XG4gICAgICBjbGllbnROYW1lLFxuICAgICAgY29tbWFuZE5hbWUsXG4gICAgICBpbnB1dDogaW5wdXRGaWx0ZXJTZW5zaXRpdmVMb2coYXJncy5pbnB1dCksXG4gICAgICBvdXRwdXQ6IG91dHB1dEZpbHRlclNlbnNpdGl2ZUxvZyhvdXRwdXRXaXRob3V0TWV0YWRhdGEpLFxuICAgICAgbWV0YWRhdGE6ICRtZXRhZGF0YSxcbiAgICB9KTtcbiAgfVxuXG4gIHJldHVybiByZXNwb25zZTtcbn07XG5cbmV4cG9ydCBjb25zdCBsb2dnZXJNaWRkbGV3YXJlT3B0aW9uczogSW5pdGlhbGl6ZUhhbmRsZXJPcHRpb25zICYgQWJzb2x1dGVMb2NhdGlvbiA9IHtcbiAgbmFtZTogXCJsb2dnZXJNaWRkbGV3YXJlXCIsXG4gIHRhZ3M6IFtcIkxPR0dFUlwiXSxcbiAgc3RlcDogXCJpbml0aWFsaXplXCIsXG59O1xuXG4vLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzXG5leHBvcnQgY29uc3QgZ2V0TG9nZ2VyUGx1Z2luID0gKG9wdGlvbnM6IGFueSk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQobG9nZ2VyTWlkZGxld2FyZSgpLCBsb2dnZXJNaWRkbGV3YXJlT3B0aW9ucyk7XG4gIH0sXG59KTtcbiJdfQ== + +/***/ }), + +/***/ 49083: +/***/ ((__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 defaultStrategy_1 = __nccwpck_require__(85857); +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: defaultStrategy_1.DEFAULT_MAX_ATTEMPTS, +}; +const resolveRetryConfig = (input) => { + const maxAttempts = normalizeMaxAttempts(input.maxAttempts); + return { + ...input, + maxAttempts, + retryStrategy: input.retryStrategy || new defaultStrategy_1.StandardRetryStrategy(maxAttempts), + }; +}; +exports.resolveRetryConfig = resolveRetryConfig; +const normalizeMaxAttempts = (maxAttempts = defaultStrategy_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: defaultStrategy_1.DEFAULT_RETRY_MODE, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsdURBQW9HO0FBRXZGLFFBQUEsZ0JBQWdCLEdBQUcsa0JBQWtCLENBQUM7QUFDdEMsUUFBQSxtQkFBbUIsR0FBRyxjQUFjLENBQUM7QUFFckMsUUFBQSwrQkFBK0IsR0FBa0M7SUFDNUUsMkJBQTJCLEVBQUUsQ0FBQyxHQUFHLEVBQUUsRUFBRTtRQUNuQyxNQUFNLEtBQUssR0FBRyxHQUFHLENBQUMsd0JBQWdCLENBQUMsQ0FBQztRQUNwQyxJQUFJLENBQUMsS0FBSztZQUFFLE9BQU8sU0FBUyxDQUFDO1FBQzdCLE1BQU0sVUFBVSxHQUFHLFFBQVEsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUNuQyxJQUFJLE1BQU0sQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLEVBQUU7WUFDNUIsTUFBTSxJQUFJLEtBQUssQ0FBQyx3QkFBd0Isd0JBQWdCLDJCQUEyQixLQUFLLEdBQUcsQ0FBQyxDQUFDO1NBQzlGO1FBQ0QsT0FBTyxVQUFVLENBQUM7SUFDcEIsQ0FBQztJQUNELGtCQUFrQixFQUFFLENBQUMsT0FBTyxFQUFFLEVBQUU7UUFDOUIsTUFBTSxLQUFLLEdBQUcsT0FBTyxDQUFDLDJCQUFtQixDQUFDLENBQUM7UUFDM0MsSUFBSSxDQUFDLEtBQUs7WUFBRSxPQUFPLFNBQVMsQ0FBQztRQUM3QixNQUFNLFVBQVUsR0FBRyxRQUFRLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDbkMsSUFBSSxNQUFNLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxFQUFFO1lBQzVCLE1BQU0sSUFBSSxLQUFLLENBQUMsNEJBQTRCLDJCQUFtQiwyQkFBMkIsS0FBSyxHQUFHLENBQUMsQ0FBQztTQUNyRztRQUNELE9BQU8sVUFBVSxDQUFDO0lBQ3BCLENBQUM7SUFDRCxPQUFPLEVBQUUsc0NBQW9CO0NBQzlCLENBQUM7QUFtQkssTUFBTSxrQkFBa0IsR0FBRyxDQUFJLEtBQWdELEVBQTJCLEVBQUU7SUFDakgsTUFBTSxXQUFXLEdBQUcsb0JBQW9CLENBQUMsS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQzVELE9BQU87UUFDTCxHQUFHLEtBQUs7UUFDUixXQUFXO1FBQ1gsYUFBYSxFQUFFLEtBQUssQ0FBQyxhQUFhLElBQUksSUFBSSx1Q0FBcUIsQ0FBQyxXQUFXLENBQUM7S0FDN0UsQ0FBQztBQUNKLENBQUMsQ0FBQztBQVBXLFFBQUEsa0JBQWtCLHNCQU83QjtBQUVGLE1BQU0sb0JBQW9CLEdBQUcsQ0FBQyxjQUF5QyxzQ0FBb0IsRUFBb0IsRUFBRTtJQUMvRyxJQUFJLE9BQU8sV0FBVyxLQUFLLFFBQVEsRUFBRTtRQUNuQyxNQUFNLFdBQVcsR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBQ2pELE9BQU8sR0FBRyxFQUFFLENBQUMsV0FBVyxDQUFDO0tBQzFCO0lBQ0QsT0FBTyxXQUFXLENBQUM7QUFDckIsQ0FBQyxDQUFDO0FBRVcsUUFBQSxjQUFjLEdBQUcsZ0JBQWdCLENBQUM7QUFDbEMsUUFBQSxpQkFBaUIsR0FBRyxZQUFZLENBQUM7QUFFakMsUUFBQSw4QkFBOEIsR0FBa0M7SUFDM0UsMkJBQTJCLEVBQUUsQ0FBQyxHQUFHLEVBQUUsRUFBRSxDQUFDLEdBQUcsQ0FBQyxzQkFBYyxDQUFDO0lBQ3pELGtCQUFrQixFQUFFLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxPQUFPLENBQUMseUJBQWlCLENBQUM7SUFDM0QsT0FBTyxFQUFFLG9DQUFrQjtDQUM1QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTG9hZGVkQ29uZmlnU2VsZWN0b3JzIH0gZnJvbSBcIkBhd3Mtc2RrL25vZGUtY29uZmlnLXByb3ZpZGVyXCI7XG5pbXBvcnQgeyBQcm92aWRlciwgUmV0cnlTdHJhdGVneSB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5pbXBvcnQgeyBERUZBVUxUX01BWF9BVFRFTVBUUywgREVGQVVMVF9SRVRSWV9NT0RFLCBTdGFuZGFyZFJldHJ5U3RyYXRlZ3kgfSBmcm9tIFwiLi9kZWZhdWx0U3RyYXRlZ3lcIjtcblxuZXhwb3J0IGNvbnN0IEVOVl9NQVhfQVRURU1QVFMgPSBcIkFXU19NQVhfQVRURU1QVFNcIjtcbmV4cG9ydCBjb25zdCBDT05GSUdfTUFYX0FUVEVNUFRTID0gXCJtYXhfYXR0ZW1wdHNcIjtcblxuZXhwb3J0IGNvbnN0IE5PREVfTUFYX0FUVEVNUFRfQ09ORklHX09QVElPTlM6IExvYWRlZENvbmZpZ1NlbGVjdG9yczxudW1iZXI+ID0ge1xuICBlbnZpcm9ubWVudFZhcmlhYmxlU2VsZWN0b3I6IChlbnYpID0+IHtcbiAgICBjb25zdCB2YWx1ZSA9IGVudltFTlZfTUFYX0FUVEVNUFRTXTtcbiAgICBpZiAoIXZhbHVlKSByZXR1cm4gdW5kZWZpbmVkO1xuICAgIGNvbnN0IG1heEF0dGVtcHQgPSBwYXJzZUludCh2YWx1ZSk7XG4gICAgaWYgKE51bWJlci5pc05hTihtYXhBdHRlbXB0KSkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKGBFbnZpcm9ubWVudCB2YXJpYWJsZSAke0VOVl9NQVhfQVRURU1QVFN9IG1hc3QgYmUgYSBudW1iZXIsIGdvdCBcIiR7dmFsdWV9XCJgKTtcbiAgICB9XG4gICAgcmV0dXJuIG1heEF0dGVtcHQ7XG4gIH0sXG4gIGNvbmZpZ0ZpbGVTZWxlY3RvcjogKHByb2ZpbGUpID0+IHtcbiAgICBjb25zdCB2YWx1ZSA9IHByb2ZpbGVbQ09ORklHX01BWF9BVFRFTVBUU107XG4gICAgaWYgKCF2YWx1ZSkgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICBjb25zdCBtYXhBdHRlbXB0ID0gcGFyc2VJbnQodmFsdWUpO1xuICAgIGlmIChOdW1iZXIuaXNOYU4obWF4QXR0ZW1wdCkpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgU2hhcmVkIGNvbmZpZyBmaWxlIGVudHJ5ICR7Q09ORklHX01BWF9BVFRFTVBUU30gbWFzdCBiZSBhIG51bWJlciwgZ290IFwiJHt2YWx1ZX1cImApO1xuICAgIH1cbiAgICByZXR1cm4gbWF4QXR0ZW1wdDtcbiAgfSxcbiAgZGVmYXVsdDogREVGQVVMVF9NQVhfQVRURU1QVFMsXG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIFJldHJ5SW5wdXRDb25maWcge1xuICAvKipcbiAgICogVGhlIG1heGltdW0gbnVtYmVyIG9mIHRpbWVzIHJlcXVlc3RzIHRoYXQgZW5jb3VudGVyIHJldHJ5YWJsZSBmYWlsdXJlcyBzaG91bGQgYmUgYXR0ZW1wdGVkLlxuICAgKi9cbiAgbWF4QXR0ZW1wdHM/OiBudW1iZXIgfCBQcm92aWRlcjxudW1iZXI+O1xuICAvKipcbiAgICogVGhlIHN0cmF0ZWd5IHRvIHJldHJ5IHRoZSByZXF1ZXN0LiBVc2luZyBidWlsdC1pbiBleHBvbmVudGlhbCBiYWNrb2ZmIHN0cmF0ZWd5IGJ5IGRlZmF1bHQuXG4gICAqL1xuICByZXRyeVN0cmF0ZWd5PzogUmV0cnlTdHJhdGVneTtcbn1cblxuaW50ZXJmYWNlIFByZXZpb3VzbHlSZXNvbHZlZCB7fVxuZXhwb3J0IGludGVyZmFjZSBSZXRyeVJlc29sdmVkQ29uZmlnIHtcbiAgbWF4QXR0ZW1wdHM6IFByb3ZpZGVyPG51bWJlcj47XG4gIHJldHJ5U3RyYXRlZ3k6IFJldHJ5U3RyYXRlZ3k7XG59XG5cbmV4cG9ydCBjb25zdCByZXNvbHZlUmV0cnlDb25maWcgPSA8VD4oaW5wdXQ6IFQgJiBQcmV2aW91c2x5UmVzb2x2ZWQgJiBSZXRyeUlucHV0Q29uZmlnKTogVCAmIFJldHJ5UmVzb2x2ZWRDb25maWcgPT4ge1xuICBjb25zdCBtYXhBdHRlbXB0cyA9IG5vcm1hbGl6ZU1heEF0dGVtcHRzKGlucHV0Lm1heEF0dGVtcHRzKTtcbiAgcmV0dXJuIHtcbiAgICAuLi5pbnB1dCxcbiAgICBtYXhBdHRlbXB0cyxcbiAgICByZXRyeVN0cmF0ZWd5OiBpbnB1dC5yZXRyeVN0cmF0ZWd5IHx8IG5ldyBTdGFuZGFyZFJldHJ5U3RyYXRlZ3kobWF4QXR0ZW1wdHMpLFxuICB9O1xufTtcblxuY29uc3Qgbm9ybWFsaXplTWF4QXR0ZW1wdHMgPSAobWF4QXR0ZW1wdHM6IG51bWJlciB8IFByb3ZpZGVyPG51bWJlcj4gPSBERUZBVUxUX01BWF9BVFRFTVBUUyk6IFByb3ZpZGVyPG51bWJlcj4gPT4ge1xuICBpZiAodHlwZW9mIG1heEF0dGVtcHRzID09PSBcIm51bWJlclwiKSB7XG4gICAgY29uc3QgcHJvbWlzaWZpZWQgPSBQcm9taXNlLnJlc29sdmUobWF4QXR0ZW1wdHMpO1xuICAgIHJldHVybiAoKSA9PiBwcm9taXNpZmllZDtcbiAgfVxuICByZXR1cm4gbWF4QXR0ZW1wdHM7XG59O1xuXG5leHBvcnQgY29uc3QgRU5WX1JFVFJZX01PREUgPSBcIkFXU19SRVRSWV9NT0RFXCI7XG5leHBvcnQgY29uc3QgQ09ORklHX1JFVFJZX01PREUgPSBcInJldHJ5X21vZGVcIjtcblxuZXhwb3J0IGNvbnN0IE5PREVfUkVUUllfTU9ERV9DT05GSUdfT1BUSU9OUzogTG9hZGVkQ29uZmlnU2VsZWN0b3JzPHN0cmluZz4gPSB7XG4gIGVudmlyb25tZW50VmFyaWFibGVTZWxlY3RvcjogKGVudikgPT4gZW52W0VOVl9SRVRSWV9NT0RFXSxcbiAgY29uZmlnRmlsZVNlbGVjdG9yOiAocHJvZmlsZSkgPT4gcHJvZmlsZVtDT05GSUdfUkVUUllfTU9ERV0sXG4gIGRlZmF1bHQ6IERFRkFVTFRfUkVUUllfTU9ERSxcbn07XG4iXX0= + +/***/ }), + +/***/ 91285: +/***/ ((__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; +/** + * The base number of milliseconds to use in calculating a suitable cool-down + * time when a retryable error is encountered. + */ +exports.DEFAULT_RETRY_DELAY_BASE = 100; +/** + * The maximum amount of time (in milliseconds) that will be used as a delay + * between retry attempts. + */ +exports.MAXIMUM_RETRY_DELAY = 20 * 1000; +/** + * The retry delay base (in milliseconds) to use when a throttling error is + * encountered. + */ +exports.THROTTLING_RETRY_DELAY_BASE = 500; +/** + * Initial number of retry tokens in Retry Quota + */ +exports.INITIAL_RETRY_TOKENS = 500; +/** + * The total amount of retry tokens to be decremented from retry token balance. + */ +exports.RETRY_COST = 5; +/** + * The total amount of retry tokens to be decremented from retry token balance + * when a throttling error is encountered. + */ +exports.TIMEOUT_RETRY_COST = 10; +/** + * The total amount of retry token to be incremented from retry token balance + * if an SDK operation invocation succeeds without requiring a retry request. + */ +exports.NO_RETRY_INCREMENT = 1; +/** + * Header name for SDK invocation ID + */ +exports.INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; +/** + * Header name for request retry information. + */ +exports.REQUEST_HEADER = "amz-sdk-request"; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7O0dBR0c7QUFDVSxRQUFBLHdCQUF3QixHQUFHLEdBQUcsQ0FBQztBQUU1Qzs7O0dBR0c7QUFDVSxRQUFBLG1CQUFtQixHQUFHLEVBQUUsR0FBRyxJQUFJLENBQUM7QUFFN0M7OztHQUdHO0FBQ1UsUUFBQSwyQkFBMkIsR0FBRyxHQUFHLENBQUM7QUFFL0M7O0dBRUc7QUFDVSxRQUFBLG9CQUFvQixHQUFHLEdBQUcsQ0FBQztBQUV4Qzs7R0FFRztBQUNVLFFBQUEsVUFBVSxHQUFHLENBQUMsQ0FBQztBQUU1Qjs7O0dBR0c7QUFDVSxRQUFBLGtCQUFrQixHQUFHLEVBQUUsQ0FBQztBQUVyQzs7O0dBR0c7QUFDVSxRQUFBLGtCQUFrQixHQUFHLENBQUMsQ0FBQztBQUVwQzs7R0FFRztBQUNVLFFBQUEsb0JBQW9CLEdBQUcsdUJBQXVCLENBQUM7QUFFNUQ7O0dBRUc7QUFDVSxRQUFBLGNBQWMsR0FBRyxpQkFBaUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogVGhlIGJhc2UgbnVtYmVyIG9mIG1pbGxpc2Vjb25kcyB0byB1c2UgaW4gY2FsY3VsYXRpbmcgYSBzdWl0YWJsZSBjb29sLWRvd25cbiAqIHRpbWUgd2hlbiBhIHJldHJ5YWJsZSBlcnJvciBpcyBlbmNvdW50ZXJlZC5cbiAqL1xuZXhwb3J0IGNvbnN0IERFRkFVTFRfUkVUUllfREVMQVlfQkFTRSA9IDEwMDtcblxuLyoqXG4gKiBUaGUgbWF4aW11bSBhbW91bnQgb2YgdGltZSAoaW4gbWlsbGlzZWNvbmRzKSB0aGF0IHdpbGwgYmUgdXNlZCBhcyBhIGRlbGF5XG4gKiBiZXR3ZWVuIHJldHJ5IGF0dGVtcHRzLlxuICovXG5leHBvcnQgY29uc3QgTUFYSU1VTV9SRVRSWV9ERUxBWSA9IDIwICogMTAwMDtcblxuLyoqXG4gKiBUaGUgcmV0cnkgZGVsYXkgYmFzZSAoaW4gbWlsbGlzZWNvbmRzKSB0byB1c2Ugd2hlbiBhIHRocm90dGxpbmcgZXJyb3IgaXNcbiAqIGVuY291bnRlcmVkLlxuICovXG5leHBvcnQgY29uc3QgVEhST1RUTElOR19SRVRSWV9ERUxBWV9CQVNFID0gNTAwO1xuXG4vKipcbiAqIEluaXRpYWwgbnVtYmVyIG9mIHJldHJ5IHRva2VucyBpbiBSZXRyeSBRdW90YVxuICovXG5leHBvcnQgY29uc3QgSU5JVElBTF9SRVRSWV9UT0tFTlMgPSA1MDA7XG5cbi8qKlxuICogVGhlIHRvdGFsIGFtb3VudCBvZiByZXRyeSB0b2tlbnMgdG8gYmUgZGVjcmVtZW50ZWQgZnJvbSByZXRyeSB0b2tlbiBiYWxhbmNlLlxuICovXG5leHBvcnQgY29uc3QgUkVUUllfQ09TVCA9IDU7XG5cbi8qKlxuICogVGhlIHRvdGFsIGFtb3VudCBvZiByZXRyeSB0b2tlbnMgdG8gYmUgZGVjcmVtZW50ZWQgZnJvbSByZXRyeSB0b2tlbiBiYWxhbmNlXG4gKiB3aGVuIGEgdGhyb3R0bGluZyBlcnJvciBpcyBlbmNvdW50ZXJlZC5cbiAqL1xuZXhwb3J0IGNvbnN0IFRJTUVPVVRfUkVUUllfQ09TVCA9IDEwO1xuXG4vKipcbiAqIFRoZSB0b3RhbCBhbW91bnQgb2YgcmV0cnkgdG9rZW4gdG8gYmUgaW5jcmVtZW50ZWQgZnJvbSByZXRyeSB0b2tlbiBiYWxhbmNlXG4gKiBpZiBhbiBTREsgb3BlcmF0aW9uIGludm9jYXRpb24gc3VjY2VlZHMgd2l0aG91dCByZXF1aXJpbmcgYSByZXRyeSByZXF1ZXN0LlxuICovXG5leHBvcnQgY29uc3QgTk9fUkVUUllfSU5DUkVNRU5UID0gMTtcblxuLyoqXG4gKiBIZWFkZXIgbmFtZSBmb3IgU0RLIGludm9jYXRpb24gSURcbiAqL1xuZXhwb3J0IGNvbnN0IElOVk9DQVRJT05fSURfSEVBREVSID0gXCJhbXotc2RrLWludm9jYXRpb24taWRcIjtcblxuLyoqXG4gKiBIZWFkZXIgbmFtZSBmb3IgcmVxdWVzdCByZXRyeSBpbmZvcm1hdGlvbi5cbiAqL1xuZXhwb3J0IGNvbnN0IFJFUVVFU1RfSEVBREVSID0gXCJhbXotc2RrLXJlcXVlc3RcIjtcbiJdfQ== + +/***/ }), + +/***/ 6814: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getDefaultRetryQuota = void 0; +const constants_1 = __nccwpck_require__(91285); +const getDefaultRetryQuota = (initialRetryTokens) => { + const MAX_CAPACITY = initialRetryTokens; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = (error) => (error.name === "TimeoutError" ? constants_1.TIMEOUT_RETRY_COST : constants_1.RETRY_COST); + const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity; + const retrieveRetryTokens = (error) => { + if (!hasRetryTokens(error)) { + // retryStrategy should stop retrying, and return last 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 : constants_1.NO_RETRY_INCREMENT; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }; + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens, + }); +}; +exports.getDefaultRetryQuota = getDefaultRetryQuota; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdFJldHJ5UXVvdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGVmYXVsdFJldHJ5UXVvdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsMkNBQWlGO0FBRzFFLE1BQU0sb0JBQW9CLEdBQUcsQ0FBQyxrQkFBMEIsRUFBYyxFQUFFO0lBQzdFLE1BQU0sWUFBWSxHQUFHLGtCQUFrQixDQUFDO0lBQ3hDLElBQUksaUJBQWlCLEdBQUcsa0JBQWtCLENBQUM7SUFFM0MsTUFBTSxpQkFBaUIsR0FBRyxDQUFDLEtBQWUsRUFBRSxFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsSUFBSSxLQUFLLGNBQWMsQ0FBQyxDQUFDLENBQUMsOEJBQWtCLENBQUMsQ0FBQyxDQUFDLHNCQUFVLENBQUMsQ0FBQztJQUVqSCxNQUFNLGNBQWMsR0FBRyxDQUFDLEtBQWUsRUFBRSxFQUFFLENBQUMsaUJBQWlCLENBQUMsS0FBSyxDQUFDLElBQUksaUJBQWlCLENBQUM7SUFFMUYsTUFBTSxtQkFBbUIsR0FBRyxDQUFDLEtBQWUsRUFBRSxFQUFFO1FBQzlDLElBQUksQ0FBQyxjQUFjLENBQUMsS0FBSyxDQUFDLEVBQUU7WUFDMUIsNERBQTREO1lBQzVELE1BQU0sSUFBSSxLQUFLLENBQUMsMEJBQTBCLENBQUMsQ0FBQztTQUM3QztRQUNELE1BQU0sY0FBYyxHQUFHLGlCQUFpQixDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ2hELGlCQUFpQixJQUFJLGNBQWMsQ0FBQztRQUNwQyxPQUFPLGNBQWMsQ0FBQztJQUN4QixDQUFDLENBQUM7SUFFRixNQUFNLGtCQUFrQixHQUFHLENBQUMscUJBQThCLEVBQUUsRUFBRTtRQUM1RCxpQkFBaUIsSUFBSSxxQkFBcUIsYUFBckIscUJBQXFCLGNBQXJCLHFCQUFxQixHQUFJLDhCQUFrQixDQUFDO1FBQ2pFLGlCQUFpQixHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsaUJBQWlCLEVBQUUsWUFBWSxDQUFDLENBQUM7SUFDaEUsQ0FBQyxDQUFDO0lBRUYsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUFDO1FBQ25CLGNBQWM7UUFDZCxtQkFBbUI7UUFDbkIsa0JBQWtCO0tBQ25CLENBQUMsQ0FBQztBQUNMLENBQUMsQ0FBQztBQTVCVyxRQUFBLG9CQUFvQix3QkE0Qi9CIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU2RrRXJyb3IgfSBmcm9tIFwiQGF3cy1zZGsvc21pdGh5LWNsaWVudFwiO1xuXG5pbXBvcnQgeyBOT19SRVRSWV9JTkNSRU1FTlQsIFJFVFJZX0NPU1QsIFRJTUVPVVRfUkVUUllfQ09TVCB9IGZyb20gXCIuL2NvbnN0YW50c1wiO1xuaW1wb3J0IHsgUmV0cnlRdW90YSB9IGZyb20gXCIuL2RlZmF1bHRTdHJhdGVneVwiO1xuXG5leHBvcnQgY29uc3QgZ2V0RGVmYXVsdFJldHJ5UXVvdGEgPSAoaW5pdGlhbFJldHJ5VG9rZW5zOiBudW1iZXIpOiBSZXRyeVF1b3RhID0+IHtcbiAgY29uc3QgTUFYX0NBUEFDSVRZID0gaW5pdGlhbFJldHJ5VG9rZW5zO1xuICBsZXQgYXZhaWxhYmxlQ2FwYWNpdHkgPSBpbml0aWFsUmV0cnlUb2tlbnM7XG5cbiAgY29uc3QgZ2V0Q2FwYWNpdHlBbW91bnQgPSAoZXJyb3I6IFNka0Vycm9yKSA9PiAoZXJyb3IubmFtZSA9PT0gXCJUaW1lb3V0RXJyb3JcIiA/IFRJTUVPVVRfUkVUUllfQ09TVCA6IFJFVFJZX0NPU1QpO1xuXG4gIGNvbnN0IGhhc1JldHJ5VG9rZW5zID0gKGVycm9yOiBTZGtFcnJvcikgPT4gZ2V0Q2FwYWNpdHlBbW91bnQoZXJyb3IpIDw9IGF2YWlsYWJsZUNhcGFjaXR5O1xuXG4gIGNvbnN0IHJldHJpZXZlUmV0cnlUb2tlbnMgPSAoZXJyb3I6IFNka0Vycm9yKSA9PiB7XG4gICAgaWYgKCFoYXNSZXRyeVRva2VucyhlcnJvcikpIHtcbiAgICAgIC8vIHJldHJ5U3RyYXRlZ3kgc2hvdWxkIHN0b3AgcmV0cnlpbmcsIGFuZCByZXR1cm4gbGFzdCBlcnJvclxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiTm8gcmV0cnkgdG9rZW4gYXZhaWxhYmxlXCIpO1xuICAgIH1cbiAgICBjb25zdCBjYXBhY2l0eUFtb3VudCA9IGdldENhcGFjaXR5QW1vdW50KGVycm9yKTtcbiAgICBhdmFpbGFibGVDYXBhY2l0eSAtPSBjYXBhY2l0eUFtb3VudDtcbiAgICByZXR1cm4gY2FwYWNpdHlBbW91bnQ7XG4gIH07XG5cbiAgY29uc3QgcmVsZWFzZVJldHJ5VG9rZW5zID0gKGNhcGFjaXR5UmVsZWFzZUFtb3VudD86IG51bWJlcikgPT4ge1xuICAgIGF2YWlsYWJsZUNhcGFjaXR5ICs9IGNhcGFjaXR5UmVsZWFzZUFtb3VudCA/PyBOT19SRVRSWV9JTkNSRU1FTlQ7XG4gICAgYXZhaWxhYmxlQ2FwYWNpdHkgPSBNYXRoLm1pbihhdmFpbGFibGVDYXBhY2l0eSwgTUFYX0NBUEFDSVRZKTtcbiAgfTtcblxuICByZXR1cm4gT2JqZWN0LmZyZWV6ZSh7XG4gICAgaGFzUmV0cnlUb2tlbnMsXG4gICAgcmV0cmlldmVSZXRyeVRva2VucyxcbiAgICByZWxlYXNlUmV0cnlUb2tlbnMsXG4gIH0pO1xufTtcbiJdfQ== + +/***/ }), + +/***/ 85857: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StandardRetryStrategy = exports.DEFAULT_RETRY_MODE = exports.DEFAULT_MAX_ATTEMPTS = void 0; +const protocol_http_1 = __nccwpck_require__(67498); +const service_error_classification_1 = __nccwpck_require__(14011); +const uuid_1 = __nccwpck_require__(2155); +const constants_1 = __nccwpck_require__(91285); +const defaultRetryQuota_1 = __nccwpck_require__(6814); +const delayDecider_1 = __nccwpck_require__(7659); +const retryDecider_1 = __nccwpck_require__(26553); +/** + * The default value for how many HTTP requests an SDK should make for a + * single SDK operation invocation before giving up + */ +exports.DEFAULT_MAX_ATTEMPTS = 3; +/** + * The default retry algorithm to use. + */ +exports.DEFAULT_RETRY_MODE = "standard"; +class StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + var _a, _b, _c; + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = exports.DEFAULT_RETRY_MODE; + 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 = exports.DEFAULT_MAX_ATTEMPTS; + } + return maxAttempts; + } + async retry(next, args) { + 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}`; + } + const { response, output } = await next(args); + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } + catch (err) { + 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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdFN0cmF0ZWd5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlZmF1bHRTdHJhdGVneS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwREFBcUQ7QUFDckQsd0ZBQTBFO0FBRzFFLCtCQUEwQjtBQUUxQiwyQ0FNcUI7QUFDckIsMkRBQTJEO0FBQzNELGlEQUFxRDtBQUNyRCxpREFBcUQ7QUFFckQ7OztHQUdHO0FBQ1UsUUFBQSxvQkFBb0IsR0FBRyxDQUFDLENBQUM7QUFFdEM7O0dBRUc7QUFDVSxRQUFBLGtCQUFrQixHQUFHLFVBQVUsQ0FBQztBQW9EN0MsTUFBYSxxQkFBcUI7SUFNaEMsWUFBNkIsbUJBQXFDLEVBQUUsT0FBc0M7O1FBQTdFLHdCQUFtQixHQUFuQixtQkFBbUIsQ0FBa0I7UUFGbEQsU0FBSSxHQUFHLDBCQUFrQixDQUFDO1FBR3hDLElBQUksQ0FBQyxZQUFZLFNBQUcsT0FBTyxhQUFQLE9BQU8sdUJBQVAsT0FBTyxDQUFFLFlBQVksbUNBQUksa0NBQW1CLENBQUM7UUFDakUsSUFBSSxDQUFDLFlBQVksU0FBRyxPQUFPLGFBQVAsT0FBTyx1QkFBUCxPQUFPLENBQUUsWUFBWSxtQ0FBSSxrQ0FBbUIsQ0FBQztRQUNqRSxJQUFJLENBQUMsVUFBVSxTQUFHLE9BQU8sYUFBUCxPQUFPLHVCQUFQLE9BQU8sQ0FBRSxVQUFVLG1DQUFJLHdDQUFvQixDQUFDLGdDQUFvQixDQUFDLENBQUM7SUFDdEYsQ0FBQztJQUVPLFdBQVcsQ0FBQyxLQUFlLEVBQUUsUUFBZ0IsRUFBRSxXQUFtQjtRQUN4RSxPQUFPLFFBQVEsR0FBRyxXQUFXLElBQUksSUFBSSxDQUFDLFlBQVksQ0FBQyxLQUFLLENBQUMsSUFBSSxJQUFJLENBQUMsVUFBVSxDQUFDLGNBQWMsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUNyRyxDQUFDO0lBRU8sS0FBSyxDQUFDLGNBQWM7UUFDMUIsSUFBSSxXQUFtQixDQUFDO1FBQ3hCLElBQUk7WUFDRixXQUFXLEdBQUcsTUFBTSxJQUFJLENBQUMsbUJBQW1CLEVBQUUsQ0FBQztTQUNoRDtRQUFDLE9BQU8sS0FBSyxFQUFFO1lBQ2QsV0FBVyxHQUFHLDRCQUFvQixDQUFDO1NBQ3BDO1FBQ0QsT0FBTyxXQUFXLENBQUM7SUFDckIsQ0FBQztJQUVELEtBQUssQ0FBQyxLQUFLLENBQ1QsSUFBbUMsRUFDbkMsSUFBcUM7UUFFckMsSUFBSSxnQkFBZ0IsQ0FBQztRQUNyQixJQUFJLFFBQVEsR0FBRyxDQUFDLENBQUM7UUFDakIsSUFBSSxVQUFVLEdBQUcsQ0FBQyxDQUFDO1FBRW5CLE1BQU0sV0FBVyxHQUFHLE1BQU0sSUFBSSxDQUFDLGNBQWMsRUFBRSxDQUFDO1FBRWhELE1BQU0sRUFBRSxPQUFPLEVBQUUsR0FBRyxJQUFJLENBQUM7UUFDekIsSUFBSSwyQkFBVyxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUMsRUFBRTtZQUNuQyxPQUFPLENBQUMsT0FBTyxDQUFDLGdDQUFvQixDQUFDLEdBQUcsU0FBRSxFQUFFLENBQUM7U0FDOUM7UUFFRCxPQUFPLElBQUksRUFBRTtZQUNYLElBQUk7Z0JBQ0YsSUFBSSwyQkFBVyxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUMsRUFBRTtvQkFDbkMsT0FBTyxDQUFDLE9BQU8sQ0FBQywwQkFBYyxDQUFDLEdBQUcsV0FBVyxRQUFRLEdBQUcsQ0FBQyxTQUFTLFdBQVcsRUFBRSxDQUFDO2lCQUNqRjtnQkFDRCxNQUFNLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxHQUFHLE1BQU0sSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO2dCQUU5QyxJQUFJLENBQUMsVUFBVSxDQUFDLGtCQUFrQixDQUFDLGdCQUFnQixDQUFDLENBQUM7Z0JBQ3JELE1BQU0sQ0FBQyxTQUFTLENBQUMsUUFBUSxHQUFHLFFBQVEsR0FBRyxDQUFDLENBQUM7Z0JBQ3pDLE1BQU0sQ0FBQyxTQUFTLENBQUMsZUFBZSxHQUFHLFVBQVUsQ0FBQztnQkFFOUMsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUUsQ0FBQzthQUM3QjtZQUFDLE9BQU8sR0FBRyxFQUFFO2dCQUNaLFFBQVEsRUFBRSxDQUFDO2dCQUNYLElBQUksSUFBSSxDQUFDLFdBQVcsQ0FBQyxHQUFlLEVBQUUsUUFBUSxFQUFFLFdBQVcsQ0FBQyxFQUFFO29CQUM1RCxnQkFBZ0IsR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFDLG1CQUFtQixDQUFDLEdBQUcsQ0FBQyxDQUFDO29CQUM1RCxNQUFNLEtBQUssR0FBRyxJQUFJLENBQUMsWUFBWSxDQUM3QixnREFBaUIsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsdUNBQTJCLENBQUMsQ0FBQyxDQUFDLG9DQUF3QixFQUMvRSxRQUFRLENBQ1QsQ0FBQztvQkFDRixVQUFVLElBQUksS0FBSyxDQUFDO29CQUVwQixNQUFNLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxVQUFVLENBQUMsT0FBTyxFQUFFLEtBQUssQ0FBQyxDQUFDLENBQUM7b0JBQzNELFNBQVM7aUJBQ1Y7Z0JBRUQsSUFBSSxDQUFDLEdBQUcsQ0FBQyxTQUFTLEVBQUU7b0JBQ2xCLEdBQUcsQ0FBQyxTQUFTLEdBQUcsRUFBRSxDQUFDO2lCQUNwQjtnQkFFRCxHQUFHLENBQUMsU0FBUyxDQUFDLFFBQVEsR0FBRyxRQUFRLENBQUM7Z0JBQ2xDLEdBQUcsQ0FBQyxTQUFTLENBQUMsZUFBZSxHQUFHLFVBQVUsQ0FBQztnQkFDM0MsTUFBTSxHQUFHLENBQUM7YUFDWDtTQUNGO0lBQ0gsQ0FBQztDQUNGO0FBN0VELHNEQTZFQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEh0dHBSZXF1ZXN0IH0gZnJvbSBcIkBhd3Mtc2RrL3Byb3RvY29sLWh0dHBcIjtcbmltcG9ydCB7IGlzVGhyb3R0bGluZ0Vycm9yIH0gZnJvbSBcIkBhd3Mtc2RrL3NlcnZpY2UtZXJyb3ItY2xhc3NpZmljYXRpb25cIjtcbmltcG9ydCB7IFNka0Vycm9yIH0gZnJvbSBcIkBhd3Mtc2RrL3NtaXRoeS1jbGllbnRcIjtcbmltcG9ydCB7IEZpbmFsaXplSGFuZGxlciwgRmluYWxpemVIYW5kbGVyQXJndW1lbnRzLCBNZXRhZGF0YUJlYXJlciwgUHJvdmlkZXIsIFJldHJ5U3RyYXRlZ3kgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcbmltcG9ydCB7IHY0IH0gZnJvbSBcInV1aWRcIjtcblxuaW1wb3J0IHtcbiAgREVGQVVMVF9SRVRSWV9ERUxBWV9CQVNFLFxuICBJTklUSUFMX1JFVFJZX1RPS0VOUyxcbiAgSU5WT0NBVElPTl9JRF9IRUFERVIsXG4gIFJFUVVFU1RfSEVBREVSLFxuICBUSFJPVFRMSU5HX1JFVFJZX0RFTEFZX0JBU0UsXG59IGZyb20gXCIuL2NvbnN0YW50c1wiO1xuaW1wb3J0IHsgZ2V0RGVmYXVsdFJldHJ5UXVvdGEgfSBmcm9tIFwiLi9kZWZhdWx0UmV0cnlRdW90YVwiO1xuaW1wb3J0IHsgZGVmYXVsdERlbGF5RGVjaWRlciB9IGZyb20gXCIuL2RlbGF5RGVjaWRlclwiO1xuaW1wb3J0IHsgZGVmYXVsdFJldHJ5RGVjaWRlciB9IGZyb20gXCIuL3JldHJ5RGVjaWRlclwiO1xuXG4vKipcbiAqIFRoZSBkZWZhdWx0IHZhbHVlIGZvciBob3cgbWFueSBIVFRQIHJlcXVlc3RzIGFuIFNESyBzaG91bGQgbWFrZSBmb3IgYVxuICogc2luZ2xlIFNESyBvcGVyYXRpb24gaW52b2NhdGlvbiBiZWZvcmUgZ2l2aW5nIHVwXG4gKi9cbmV4cG9ydCBjb25zdCBERUZBVUxUX01BWF9BVFRFTVBUUyA9IDM7XG5cbi8qKlxuICogVGhlIGRlZmF1bHQgcmV0cnkgYWxnb3JpdGhtIHRvIHVzZS5cbiAqL1xuZXhwb3J0IGNvbnN0IERFRkFVTFRfUkVUUllfTU9ERSA9IFwic3RhbmRhcmRcIjtcblxuLyoqXG4gKiBEZXRlcm1pbmVzIHdoZXRoZXIgYW4gZXJyb3IgaXMgcmV0cnlhYmxlIGJhc2VkIG9uIHRoZSBudW1iZXIgb2YgcmV0cmllc1xuICogYWxyZWFkeSBhdHRlbXB0ZWQsIHRoZSBIVFRQIHN0YXR1cyBjb2RlLCBhbmQgdGhlIGVycm9yIHJlY2VpdmVkIChpZiBhbnkpLlxuICpcbiAqIEBwYXJhbSBlcnJvciAgICAgICAgIFRoZSBlcnJvciBlbmNvdW50ZXJlZC5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSBSZXRyeURlY2lkZXIge1xuICAoZXJyb3I6IFNka0Vycm9yKTogYm9vbGVhbjtcbn1cblxuLyoqXG4gKiBEZXRlcm1pbmVzIHRoZSBudW1iZXIgb2YgbWlsbGlzZWNvbmRzIHRvIHdhaXQgYmVmb3JlIHJldHJ5aW5nIGFuIGFjdGlvbi5cbiAqXG4gKiBAcGFyYW0gZGVsYXlCYXNlIFRoZSBiYXNlIGRlbGF5IChpbiBtaWxsaXNlY29uZHMpLlxuICogQHBhcmFtIGF0dGVtcHRzICBUaGUgbnVtYmVyIG9mIHRpbWVzIHRoZSBhY3Rpb24gaGFzIGFscmVhZHkgYmVlbiB0cmllZC5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSBEZWxheURlY2lkZXIge1xuICAoZGVsYXlCYXNlOiBudW1iZXIsIGF0dGVtcHRzOiBudW1iZXIpOiBudW1iZXI7XG59XG5cbi8qKlxuICogSW50ZXJmYWNlIHRoYXQgc3BlY2lmaWVzIHRoZSByZXRyeSBxdW90YSBiZWhhdmlvci5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSBSZXRyeVF1b3RhIHtcbiAgLyoqXG4gICAqIHJldHVybnMgdHJ1ZSBpZiByZXRyeSB0b2tlbnMgYXJlIGF2YWlsYWJsZSBmcm9tIHRoZSByZXRyeSBxdW90YSBidWNrZXQuXG4gICAqL1xuICBoYXNSZXRyeVRva2VuczogKGVycm9yOiBTZGtFcnJvcikgPT4gYm9vbGVhbjtcblxuICAvKipcbiAgICogcmV0dXJucyB0b2tlbiBhbW91bnQgZnJvbSB0aGUgcmV0cnkgcXVvdGEgYnVja2V0LlxuICAgKiB0aHJvd3MgZXJyb3IgaXMgcmV0cnkgdG9rZW5zIGFyZSBub3QgYXZhaWxhYmxlLlxuICAgKi9cbiAgcmV0cmlldmVSZXRyeVRva2VuczogKGVycm9yOiBTZGtFcnJvcikgPT4gbnVtYmVyO1xuXG4gIC8qKlxuICAgKiByZWxlYXNlcyB0b2tlbnMgYmFjayB0byB0aGUgcmV0cnkgcXVvdGEuXG4gICAqL1xuICByZWxlYXNlUmV0cnlUb2tlbnM6IChyZWxlYXNlQ2FwYWNpdHlBbW91bnQ/OiBudW1iZXIpID0+IHZvaWQ7XG59XG5cbi8qKlxuICogU3RyYXRlZ3kgb3B0aW9ucyB0byBiZSBwYXNzZWQgdG8gU3RhbmRhcmRSZXRyeVN0cmF0ZWd5XG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgU3RhbmRhcmRSZXRyeVN0cmF0ZWd5T3B0aW9ucyB7XG4gIHJldHJ5RGVjaWRlcj86IFJldHJ5RGVjaWRlcjtcbiAgZGVsYXlEZWNpZGVyPzogRGVsYXlEZWNpZGVyO1xuICByZXRyeVF1b3RhPzogUmV0cnlRdW90YTtcbn1cblxuZXhwb3J0IGNsYXNzIFN0YW5kYXJkUmV0cnlTdHJhdGVneSBpbXBsZW1lbnRzIFJldHJ5U3RyYXRlZ3kge1xuICBwcml2YXRlIHJldHJ5RGVjaWRlcjogUmV0cnlEZWNpZGVyO1xuICBwcml2YXRlIGRlbGF5RGVjaWRlcjogRGVsYXlEZWNpZGVyO1xuICBwcml2YXRlIHJldHJ5UXVvdGE6IFJldHJ5UXVvdGE7XG4gIHB1YmxpYyByZWFkb25seSBtb2RlID0gREVGQVVMVF9SRVRSWV9NT0RFO1xuXG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgcmVhZG9ubHkgbWF4QXR0ZW1wdHNQcm92aWRlcjogUHJvdmlkZXI8bnVtYmVyPiwgb3B0aW9ucz86IFN0YW5kYXJkUmV0cnlTdHJhdGVneU9wdGlvbnMpIHtcbiAgICB0aGlzLnJldHJ5RGVjaWRlciA9IG9wdGlvbnM/LnJldHJ5RGVjaWRlciA/PyBkZWZhdWx0UmV0cnlEZWNpZGVyO1xuICAgIHRoaXMuZGVsYXlEZWNpZGVyID0gb3B0aW9ucz8uZGVsYXlEZWNpZGVyID8/IGRlZmF1bHREZWxheURlY2lkZXI7XG4gICAgdGhpcy5yZXRyeVF1b3RhID0gb3B0aW9ucz8ucmV0cnlRdW90YSA/PyBnZXREZWZhdWx0UmV0cnlRdW90YShJTklUSUFMX1JFVFJZX1RPS0VOUyk7XG4gIH1cblxuICBwcml2YXRlIHNob3VsZFJldHJ5KGVycm9yOiBTZGtFcnJvciwgYXR0ZW1wdHM6IG51bWJlciwgbWF4QXR0ZW1wdHM6IG51bWJlcikge1xuICAgIHJldHVybiBhdHRlbXB0cyA8IG1heEF0dGVtcHRzICYmIHRoaXMucmV0cnlEZWNpZGVyKGVycm9yKSAmJiB0aGlzLnJldHJ5UXVvdGEuaGFzUmV0cnlUb2tlbnMoZXJyb3IpO1xuICB9XG5cbiAgcHJpdmF0ZSBhc3luYyBnZXRNYXhBdHRlbXB0cygpIHtcbiAgICBsZXQgbWF4QXR0ZW1wdHM6IG51bWJlcjtcbiAgICB0cnkge1xuICAgICAgbWF4QXR0ZW1wdHMgPSBhd2FpdCB0aGlzLm1heEF0dGVtcHRzUHJvdmlkZXIoKTtcbiAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgbWF4QXR0ZW1wdHMgPSBERUZBVUxUX01BWF9BVFRFTVBUUztcbiAgICB9XG4gICAgcmV0dXJuIG1heEF0dGVtcHRzO1xuICB9XG5cbiAgYXN5bmMgcmV0cnk8SW5wdXQgZXh0ZW5kcyBvYmplY3QsIE91cHV0IGV4dGVuZHMgTWV0YWRhdGFCZWFyZXI+KFxuICAgIG5leHQ6IEZpbmFsaXplSGFuZGxlcjxJbnB1dCwgT3VwdXQ+LFxuICAgIGFyZ3M6IEZpbmFsaXplSGFuZGxlckFyZ3VtZW50czxJbnB1dD5cbiAgKSB7XG4gICAgbGV0IHJldHJ5VG9rZW5BbW91bnQ7XG4gICAgbGV0IGF0dGVtcHRzID0gMDtcbiAgICBsZXQgdG90YWxEZWxheSA9IDA7XG5cbiAgICBjb25zdCBtYXhBdHRlbXB0cyA9IGF3YWl0IHRoaXMuZ2V0TWF4QXR0ZW1wdHMoKTtcblxuICAgIGNvbnN0IHsgcmVxdWVzdCB9ID0gYXJncztcbiAgICBpZiAoSHR0cFJlcXVlc3QuaXNJbnN0YW5jZShyZXF1ZXN0KSkge1xuICAgICAgcmVxdWVzdC5oZWFkZXJzW0lOVk9DQVRJT05fSURfSEVBREVSXSA9IHY0KCk7XG4gICAgfVxuXG4gICAgd2hpbGUgKHRydWUpIHtcbiAgICAgIHRyeSB7XG4gICAgICAgIGlmIChIdHRwUmVxdWVzdC5pc0luc3RhbmNlKHJlcXVlc3QpKSB7XG4gICAgICAgICAgcmVxdWVzdC5oZWFkZXJzW1JFUVVFU1RfSEVBREVSXSA9IGBhdHRlbXB0PSR7YXR0ZW1wdHMgKyAxfTsgbWF4PSR7bWF4QXR0ZW1wdHN9YDtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB7IHJlc3BvbnNlLCBvdXRwdXQgfSA9IGF3YWl0IG5leHQoYXJncyk7XG5cbiAgICAgICAgdGhpcy5yZXRyeVF1b3RhLnJlbGVhc2VSZXRyeVRva2VucyhyZXRyeVRva2VuQW1vdW50KTtcbiAgICAgICAgb3V0cHV0LiRtZXRhZGF0YS5hdHRlbXB0cyA9IGF0dGVtcHRzICsgMTtcbiAgICAgICAgb3V0cHV0LiRtZXRhZGF0YS50b3RhbFJldHJ5RGVsYXkgPSB0b3RhbERlbGF5O1xuXG4gICAgICAgIHJldHVybiB7IHJlc3BvbnNlLCBvdXRwdXQgfTtcbiAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICBhdHRlbXB0cysrO1xuICAgICAgICBpZiAodGhpcy5zaG91bGRSZXRyeShlcnIgYXMgU2RrRXJyb3IsIGF0dGVtcHRzLCBtYXhBdHRlbXB0cykpIHtcbiAgICAgICAgICByZXRyeVRva2VuQW1vdW50ID0gdGhpcy5yZXRyeVF1b3RhLnJldHJpZXZlUmV0cnlUb2tlbnMoZXJyKTtcbiAgICAgICAgICBjb25zdCBkZWxheSA9IHRoaXMuZGVsYXlEZWNpZGVyKFxuICAgICAgICAgICAgaXNUaHJvdHRsaW5nRXJyb3IoZXJyKSA/IFRIUk9UVExJTkdfUkVUUllfREVMQVlfQkFTRSA6IERFRkFVTFRfUkVUUllfREVMQVlfQkFTRSxcbiAgICAgICAgICAgIGF0dGVtcHRzXG4gICAgICAgICAgKTtcbiAgICAgICAgICB0b3RhbERlbGF5ICs9IGRlbGF5O1xuXG4gICAgICAgICAgYXdhaXQgbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHNldFRpbWVvdXQocmVzb2x2ZSwgZGVsYXkpKTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghZXJyLiRtZXRhZGF0YSkge1xuICAgICAgICAgIGVyci4kbWV0YWRhdGEgPSB7fTtcbiAgICAgICAgfVxuXG4gICAgICAgIGVyci4kbWV0YWRhdGEuYXR0ZW1wdHMgPSBhdHRlbXB0cztcbiAgICAgICAgZXJyLiRtZXRhZGF0YS50b3RhbFJldHJ5RGVsYXkgPSB0b3RhbERlbGF5O1xuICAgICAgICB0aHJvdyBlcnI7XG4gICAgICB9XG4gICAgfVxuICB9XG59XG4iXX0= + +/***/ }), + +/***/ 7659: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultDelayDecider = void 0; +const constants_1 = __nccwpck_require__(91285); +/** + * Calculate a capped, fully-jittered exponential backoff time. + */ +const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(constants_1.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); +exports.defaultDelayDecider = defaultDelayDecider; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVsYXlEZWNpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlbGF5RGVjaWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwyQ0FBa0Q7QUFFbEQ7O0dBRUc7QUFDSSxNQUFNLG1CQUFtQixHQUFHLENBQUMsU0FBaUIsRUFBRSxRQUFnQixFQUFFLEVBQUUsQ0FDekUsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLCtCQUFtQixFQUFFLElBQUksQ0FBQyxNQUFNLEVBQUUsR0FBRyxDQUFDLElBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxDQUFDLENBQUM7QUFEMUUsUUFBQSxtQkFBbUIsdUJBQ3VEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTUFYSU1VTV9SRVRSWV9ERUxBWSB9IGZyb20gXCIuL2NvbnN0YW50c1wiO1xuXG4vKipcbiAqIENhbGN1bGF0ZSBhIGNhcHBlZCwgZnVsbHktaml0dGVyZWQgZXhwb25lbnRpYWwgYmFja29mZiB0aW1lLlxuICovXG5leHBvcnQgY29uc3QgZGVmYXVsdERlbGF5RGVjaWRlciA9IChkZWxheUJhc2U6IG51bWJlciwgYXR0ZW1wdHM6IG51bWJlcikgPT5cbiAgTWF0aC5mbG9vcihNYXRoLm1pbihNQVhJTVVNX1JFVFJZX0RFTEFZLCBNYXRoLnJhbmRvbSgpICogMiAqKiBhdHRlbXB0cyAqIGRlbGF5QmFzZSkpO1xuIl19 + +/***/ }), + +/***/ 7000: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(86730), exports); +tslib_1.__exportStar(__nccwpck_require__(69317), exports); +tslib_1.__exportStar(__nccwpck_require__(85857), exports); +tslib_1.__exportStar(__nccwpck_require__(49083), exports); +tslib_1.__exportStar(__nccwpck_require__(7659), exports); +tslib_1.__exportStar(__nccwpck_require__(26553), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNERBQWtDO0FBQ2xDLHVFQUE2QztBQUM3Qyw0REFBa0M7QUFDbEMsMkRBQWlDO0FBQ2pDLHlEQUErQjtBQUMvQix5REFBK0IiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9yZXRyeU1pZGRsZXdhcmVcIjtcbmV4cG9ydCAqIGZyb20gXCIuL29taXRSZXRyeUhlYWRlcnNNaWRkbGV3YXJlXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9kZWZhdWx0U3RyYXRlZ3lcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2NvbmZpZ3VyYXRpb25zXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9kZWxheURlY2lkZXJcIjtcbmV4cG9ydCAqIGZyb20gXCIuL3JldHJ5RGVjaWRlclwiO1xuIl19 + +/***/ }), + +/***/ 69317: +/***/ ((__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__(67498); +const constants_1 = __nccwpck_require__(91285); +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", +}; +const getOmitRetryHeadersPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(exports.omitRetryHeadersMiddleware(), exports.omitRetryHeadersMiddlewareOptions); + }, +}); +exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib21pdFJldHJ5SGVhZGVyc01pZGRsZXdhcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvb21pdFJldHJ5SGVhZGVyc01pZGRsZXdhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQXFEO0FBVXJELDJDQUFtRTtBQUU1RCxNQUFNLDBCQUEwQixHQUFHLEdBQUcsRUFBRSxDQUFDLENBQzlDLElBQWtDLEVBQ0osRUFBRSxDQUFDLEtBQUssRUFDdEMsSUFBbUMsRUFDSyxFQUFFO0lBQzFDLE1BQU0sRUFBRSxPQUFPLEVBQUUsR0FBRyxJQUFJLENBQUM7SUFDekIsSUFBSSwyQkFBVyxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUMsRUFBRTtRQUNuQyxPQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsZ0NBQW9CLENBQUMsQ0FBQztRQUM3QyxPQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsMEJBQWMsQ0FBQyxDQUFDO0tBQ3hDO0lBQ0QsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDcEIsQ0FBQyxDQUFDO0FBWFcsUUFBQSwwQkFBMEIsOEJBV3JDO0FBRVcsUUFBQSxpQ0FBaUMsR0FBOEI7SUFDMUUsSUFBSSxFQUFFLDRCQUE0QjtJQUNsQyxJQUFJLEVBQUUsQ0FBQyxPQUFPLEVBQUUsU0FBUyxFQUFFLG9CQUFvQixDQUFDO0lBQ2hELFFBQVEsRUFBRSxRQUFRO0lBQ2xCLFlBQVksRUFBRSxtQkFBbUI7Q0FDbEMsQ0FBQztBQUVLLE1BQU0seUJBQXlCLEdBQUcsQ0FBQyxPQUFnQixFQUF1QixFQUFFLENBQUMsQ0FBQztJQUNuRixZQUFZLEVBQUUsQ0FBQyxXQUFXLEVBQUUsRUFBRTtRQUM1QixXQUFXLENBQUMsYUFBYSxDQUFDLGtDQUEwQixFQUFFLEVBQUUseUNBQWlDLENBQUMsQ0FBQztJQUM3RixDQUFDO0NBQ0YsQ0FBQyxDQUFDO0FBSlUsUUFBQSx5QkFBeUIsNkJBSW5DIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSHR0cFJlcXVlc3QgfSBmcm9tIFwiQGF3cy1zZGsvcHJvdG9jb2wtaHR0cFwiO1xuaW1wb3J0IHtcbiAgRmluYWxpemVIYW5kbGVyLFxuICBGaW5hbGl6ZUhhbmRsZXJBcmd1bWVudHMsXG4gIEZpbmFsaXplSGFuZGxlck91dHB1dCxcbiAgTWV0YWRhdGFCZWFyZXIsXG4gIFBsdWdnYWJsZSxcbiAgUmVsYXRpdmVNaWRkbGV3YXJlT3B0aW9ucyxcbn0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmltcG9ydCB7IElOVk9DQVRJT05fSURfSEVBREVSLCBSRVFVRVNUX0hFQURFUiB9IGZyb20gXCIuL2NvbnN0YW50c1wiO1xuXG5leHBvcnQgY29uc3Qgb21pdFJldHJ5SGVhZGVyc01pZGRsZXdhcmUgPSAoKSA9PiA8T3V0cHV0IGV4dGVuZHMgTWV0YWRhdGFCZWFyZXIgPSBNZXRhZGF0YUJlYXJlcj4oXG4gIG5leHQ6IEZpbmFsaXplSGFuZGxlcjxhbnksIE91dHB1dD5cbik6IEZpbmFsaXplSGFuZGxlcjxhbnksIE91dHB1dD4gPT4gYXN5bmMgKFxuICBhcmdzOiBGaW5hbGl6ZUhhbmRsZXJBcmd1bWVudHM8YW55PlxuKTogUHJvbWlzZTxGaW5hbGl6ZUhhbmRsZXJPdXRwdXQ8T3V0cHV0Pj4gPT4ge1xuICBjb25zdCB7IHJlcXVlc3QgfSA9IGFyZ3M7XG4gIGlmIChIdHRwUmVxdWVzdC5pc0luc3RhbmNlKHJlcXVlc3QpKSB7XG4gICAgZGVsZXRlIHJlcXVlc3QuaGVhZGVyc1tJTlZPQ0FUSU9OX0lEX0hFQURFUl07XG4gICAgZGVsZXRlIHJlcXVlc3QuaGVhZGVyc1tSRVFVRVNUX0hFQURFUl07XG4gIH1cbiAgcmV0dXJuIG5leHQoYXJncyk7XG59O1xuXG5leHBvcnQgY29uc3Qgb21pdFJldHJ5SGVhZGVyc01pZGRsZXdhcmVPcHRpb25zOiBSZWxhdGl2ZU1pZGRsZXdhcmVPcHRpb25zID0ge1xuICBuYW1lOiBcIm9taXRSZXRyeUhlYWRlcnNNaWRkbGV3YXJlXCIsXG4gIHRhZ3M6IFtcIlJFVFJZXCIsIFwiSEVBREVSU1wiLCBcIk9NSVRfUkVUUllfSEVBREVSU1wiXSxcbiAgcmVsYXRpb246IFwiYmVmb3JlXCIsXG4gIHRvTWlkZGxld2FyZTogXCJhd3NBdXRoTWlkZGxld2FyZVwiLFxufTtcblxuZXhwb3J0IGNvbnN0IGdldE9taXRSZXRyeUhlYWRlcnNQbHVnaW4gPSAob3B0aW9uczogdW5rbm93bik6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGRSZWxhdGl2ZVRvKG9taXRSZXRyeUhlYWRlcnNNaWRkbGV3YXJlKCksIG9taXRSZXRyeUhlYWRlcnNNaWRkbGV3YXJlT3B0aW9ucyk7XG4gIH0sXG59KTtcbiJdfQ== + +/***/ }), + +/***/ 26553: +/***/ ((__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__(14011); +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV0cnlEZWNpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JldHJ5RGVjaWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx3RkFLK0M7QUFHeEMsTUFBTSxtQkFBbUIsR0FBRyxDQUFDLEtBQWUsRUFBRSxFQUFFO0lBQ3JELElBQUksQ0FBQyxLQUFLLEVBQUU7UUFDVixPQUFPLEtBQUssQ0FBQztLQUNkO0lBRUQsT0FBTyxpREFBa0IsQ0FBQyxLQUFLLENBQUMsSUFBSSwrQ0FBZ0IsQ0FBQyxLQUFLLENBQUMsSUFBSSxnREFBaUIsQ0FBQyxLQUFLLENBQUMsSUFBSSwrQ0FBZ0IsQ0FBQyxLQUFLLENBQUMsQ0FBQztBQUNySCxDQUFDLENBQUM7QUFOVyxRQUFBLG1CQUFtQix1QkFNOUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBpc0Nsb2NrU2tld0Vycm9yLFxuICBpc1JldHJ5YWJsZUJ5VHJhaXQsXG4gIGlzVGhyb3R0bGluZ0Vycm9yLFxuICBpc1RyYW5zaWVudEVycm9yLFxufSBmcm9tIFwiQGF3cy1zZGsvc2VydmljZS1lcnJvci1jbGFzc2lmaWNhdGlvblwiO1xuaW1wb3J0IHsgU2RrRXJyb3IgfSBmcm9tIFwiQGF3cy1zZGsvc21pdGh5LWNsaWVudFwiO1xuXG5leHBvcnQgY29uc3QgZGVmYXVsdFJldHJ5RGVjaWRlciA9IChlcnJvcjogU2RrRXJyb3IpID0+IHtcbiAgaWYgKCFlcnJvcikge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiBpc1JldHJ5YWJsZUJ5VHJhaXQoZXJyb3IpIHx8IGlzQ2xvY2tTa2V3RXJyb3IoZXJyb3IpIHx8IGlzVGhyb3R0bGluZ0Vycm9yKGVycm9yKSB8fCBpc1RyYW5zaWVudEVycm9yKGVycm9yKTtcbn07XG4iXX0= + +/***/ }), + +/***/ 86730: +/***/ ((__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) => { + var _a; + if ((_a = options === null || options === void 0 ? void 0 : options.retryStrategy) === null || _a === void 0 ? void 0 : _a.mode) + context.userAgent = [...(context.userAgent || []), ["cfg/retry-mode", options.retryStrategy.mode]]; + return options.retryStrategy.retry(next, args); +}; +exports.retryMiddleware = retryMiddleware; +exports.retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", +}; +const getRetryPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(exports.retryMiddleware(options), exports.retryMiddlewareOptions); + }, +}); +exports.getRetryPlugin = getRetryPlugin; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV0cnlNaWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JldHJ5TWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFhTyxNQUFNLGVBQWUsR0FBRyxDQUFDLE9BQTRCLEVBQUUsRUFBRSxDQUFDLENBQy9ELElBQWtDLEVBQ2xDLE9BQWdDLEVBQ0YsRUFBRSxDQUFDLEtBQUssRUFDdEMsSUFBbUMsRUFDSyxFQUFFOztJQUMxQyxVQUFJLE9BQU8sYUFBUCxPQUFPLHVCQUFQLE9BQU8sQ0FBRSxhQUFhLDBDQUFFLElBQUk7UUFDOUIsT0FBTyxDQUFDLFNBQVMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsU0FBUyxJQUFJLEVBQUUsQ0FBQyxFQUFFLENBQUMsZ0JBQWdCLEVBQUUsT0FBTyxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO0lBQ3JHLE9BQU8sT0FBTyxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxDQUFDO0FBQ2pELENBQUMsQ0FBQztBQVRXLFFBQUEsZUFBZSxtQkFTMUI7QUFFVyxRQUFBLHNCQUFzQixHQUFxRDtJQUN0RixJQUFJLEVBQUUsaUJBQWlCO0lBQ3ZCLElBQUksRUFBRSxDQUFDLE9BQU8sQ0FBQztJQUNmLElBQUksRUFBRSxpQkFBaUI7SUFDdkIsUUFBUSxFQUFFLE1BQU07Q0FDakIsQ0FBQztBQUVLLE1BQU0sY0FBYyxHQUFHLENBQUMsT0FBNEIsRUFBdUIsRUFBRSxDQUFDLENBQUM7SUFDcEYsWUFBWSxFQUFFLENBQUMsV0FBVyxFQUFFLEVBQUU7UUFDNUIsV0FBVyxDQUFDLEdBQUcsQ0FBQyx1QkFBZSxDQUFDLE9BQU8sQ0FBQyxFQUFFLDhCQUFzQixDQUFDLENBQUM7SUFDcEUsQ0FBQztDQUNGLENBQUMsQ0FBQztBQUpVLFFBQUEsY0FBYyxrQkFJeEIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBBYnNvbHV0ZUxvY2F0aW9uLFxuICBGaW5hbGl6ZUhhbmRsZXIsXG4gIEZpbmFsaXplSGFuZGxlckFyZ3VtZW50cyxcbiAgRmluYWxpemVIYW5kbGVyT3V0cHV0LFxuICBGaW5hbGl6ZVJlcXVlc3RIYW5kbGVyT3B0aW9ucyxcbiAgSGFuZGxlckV4ZWN1dGlvbkNvbnRleHQsXG4gIE1ldGFkYXRhQmVhcmVyLFxuICBQbHVnZ2FibGUsXG59IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5pbXBvcnQgeyBSZXRyeVJlc29sdmVkQ29uZmlnIH0gZnJvbSBcIi4vY29uZmlndXJhdGlvbnNcIjtcblxuZXhwb3J0IGNvbnN0IHJldHJ5TWlkZGxld2FyZSA9IChvcHRpb25zOiBSZXRyeVJlc29sdmVkQ29uZmlnKSA9PiA8T3V0cHV0IGV4dGVuZHMgTWV0YWRhdGFCZWFyZXIgPSBNZXRhZGF0YUJlYXJlcj4oXG4gIG5leHQ6IEZpbmFsaXplSGFuZGxlcjxhbnksIE91dHB1dD4sXG4gIGNvbnRleHQ6IEhhbmRsZXJFeGVjdXRpb25Db250ZXh0XG4pOiBGaW5hbGl6ZUhhbmRsZXI8YW55LCBPdXRwdXQ+ID0+IGFzeW5jIChcbiAgYXJnczogRmluYWxpemVIYW5kbGVyQXJndW1lbnRzPGFueT5cbik6IFByb21pc2U8RmluYWxpemVIYW5kbGVyT3V0cHV0PE91dHB1dD4+ID0+IHtcbiAgaWYgKG9wdGlvbnM/LnJldHJ5U3RyYXRlZ3k/Lm1vZGUpXG4gICAgY29udGV4dC51c2VyQWdlbnQgPSBbLi4uKGNvbnRleHQudXNlckFnZW50IHx8IFtdKSwgW1wiY2ZnL3JldHJ5LW1vZGVcIiwgb3B0aW9ucy5yZXRyeVN0cmF0ZWd5Lm1vZGVdXTtcbiAgcmV0dXJuIG9wdGlvbnMucmV0cnlTdHJhdGVneS5yZXRyeShuZXh0LCBhcmdzKTtcbn07XG5cbmV4cG9ydCBjb25zdCByZXRyeU1pZGRsZXdhcmVPcHRpb25zOiBGaW5hbGl6ZVJlcXVlc3RIYW5kbGVyT3B0aW9ucyAmIEFic29sdXRlTG9jYXRpb24gPSB7XG4gIG5hbWU6IFwicmV0cnlNaWRkbGV3YXJlXCIsXG4gIHRhZ3M6IFtcIlJFVFJZXCJdLFxuICBzdGVwOiBcImZpbmFsaXplUmVxdWVzdFwiLFxuICBwcmlvcml0eTogXCJoaWdoXCIsXG59O1xuXG5leHBvcnQgY29uc3QgZ2V0UmV0cnlQbHVnaW4gPSAob3B0aW9uczogUmV0cnlSZXNvbHZlZENvbmZpZyk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQocmV0cnlNaWRkbGV3YXJlKG9wdGlvbnMpLCByZXRyeU1pZGRsZXdhcmVPcHRpb25zKTtcbiAgfSxcbn0pO1xuIl19 + +/***/ }), + +/***/ 27995: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(59902), exports); +tslib_1.__exportStar(__nccwpck_require__(71148), exports); +tslib_1.__exportStar(__nccwpck_require__(70287), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNERBQWtDO0FBQ2xDLHlEQUErQjtBQUMvQiwrREFBcUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9yZWNlaXZlLW1lc3NhZ2VcIjtcbmV4cG9ydCAqIGZyb20gXCIuL3NlbmQtbWVzc2FnZVwiO1xuZXhwb3J0ICogZnJvbSBcIi4vc2VuZC1tZXNzYWdlLWJhdGNoXCI7XG4iXX0= + +/***/ }), + +/***/ 59902: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getReceiveMessagePlugin = exports.receiveMessageMiddlewareOptions = exports.receiveMessageMiddleware = void 0; +const util_hex_encoding_1 = __nccwpck_require__(73291); +function receiveMessageMiddleware(options) { + return (next) => async (args) => { + const resp = await next({ ...args }); + const output = resp.output; + const messageIds = []; + if (output.Messages !== undefined) { + for (const message of output.Messages) { + const md5 = message.MD5OfBody; + const hash = new options.md5(); + hash.update(message.Body || ""); + if (md5 !== util_hex_encoding_1.toHex(await hash.digest())) { + messageIds.push(message.MessageId); + } + } + } + if (messageIds.length > 0) { + throw new Error("Invalid MD5 checksum on messages: " + messageIds.join(", ")); + } + return resp; + }; +} +exports.receiveMessageMiddleware = receiveMessageMiddleware; +exports.receiveMessageMiddlewareOptions = { + step: "initialize", + tags: ["VALIDATE_BODY_MD5"], + name: "receiveMessageMiddleware", +}; +const getReceiveMessagePlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.add(receiveMessageMiddleware(config), exports.receiveMessageMiddlewareOptions); + }, +}); +exports.getReceiveMessagePlugin = getReceiveMessagePlugin; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjZWl2ZS1tZXNzYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JlY2VpdmUtbWVzc2FnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFTQSxrRUFBbUQ7QUFjbkQsU0FBZ0Isd0JBQXdCLENBQUMsT0FBMkI7SUFDbEUsT0FBTyxDQUNMLElBQW9DLEVBQ0osRUFBRSxDQUFDLEtBQUssRUFDeEMsSUFBcUMsRUFDSyxFQUFFO1FBQzVDLE1BQU0sSUFBSSxHQUFHLE1BQU0sSUFBSSxDQUFDLEVBQUUsR0FBRyxJQUFJLEVBQUUsQ0FBQyxDQUFDO1FBQ3JDLE1BQU0sTUFBTSxHQUFJLElBQUksQ0FBQyxNQUEwQyxDQUFDO1FBQ2hFLE1BQU0sVUFBVSxHQUFHLEVBQUUsQ0FBQztRQUN0QixJQUFJLE1BQU0sQ0FBQyxRQUFRLEtBQUssU0FBUyxFQUFFO1lBQ2pDLEtBQUssTUFBTSxPQUFPLElBQUksTUFBTSxDQUFDLFFBQVEsRUFBRTtnQkFDckMsTUFBTSxHQUFHLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQztnQkFDOUIsTUFBTSxJQUFJLEdBQUcsSUFBSSxPQUFPLENBQUMsR0FBRyxFQUFFLENBQUM7Z0JBQy9CLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLElBQUksSUFBSSxFQUFFLENBQUMsQ0FBQztnQkFDaEMsSUFBSSxHQUFHLEtBQUsseUJBQUssQ0FBQyxNQUFNLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQyxFQUFFO29CQUN0QyxVQUFVLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQztpQkFDcEM7YUFDRjtTQUNGO1FBQ0QsSUFBSSxVQUFVLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRTtZQUN6QixNQUFNLElBQUksS0FBSyxDQUFDLG9DQUFvQyxHQUFHLFVBQVUsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztTQUMvRTtRQUVELE9BQU8sSUFBSSxDQUFDO0lBQ2QsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQXpCRCw0REF5QkM7QUFFWSxRQUFBLCtCQUErQixHQUE2QjtJQUN2RSxJQUFJLEVBQUUsWUFBWTtJQUNsQixJQUFJLEVBQUUsQ0FBQyxtQkFBbUIsQ0FBQztJQUMzQixJQUFJLEVBQUUsMEJBQTBCO0NBQ2pDLENBQUM7QUFFSyxNQUFNLHVCQUF1QixHQUFHLENBQUMsTUFBMEIsRUFBdUIsRUFBRSxDQUFDLENBQUM7SUFDM0YsWUFBWSxFQUFFLENBQUMsV0FBVyxFQUFFLEVBQUU7UUFDNUIsV0FBVyxDQUFDLEdBQUcsQ0FBQyx3QkFBd0IsQ0FBQyxNQUFNLENBQUMsRUFBRSx1Q0FBK0IsQ0FBQyxDQUFDO0lBQ3JGLENBQUM7Q0FDRixDQUFDLENBQUM7QUFKVSxRQUFBLHVCQUF1QiwyQkFJakMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBJbml0aWFsaXplSGFuZGxlcixcbiAgSW5pdGlhbGl6ZUhhbmRsZXJBcmd1bWVudHMsXG4gIEluaXRpYWxpemVIYW5kbGVyT3B0aW9ucyxcbiAgSW5pdGlhbGl6ZUhhbmRsZXJPdXRwdXQsXG4gIEluaXRpYWxpemVNaWRkbGV3YXJlLFxuICBNZXRhZGF0YUJlYXJlcixcbiAgUGx1Z2dhYmxlLFxufSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcbmltcG9ydCB7IHRvSGV4IH0gZnJvbSBcIkBhd3Mtc2RrL3V0aWwtaGV4LWVuY29kaW5nXCI7XG5cbmltcG9ydCB7IFByZXZpb3VzbHlSZXNvbHZlZCB9IGZyb20gXCIuL2NvbmZpZ3VyYXRpb25zXCI7XG5cbmludGVyZmFjZSBSZWNlaXZlTWVzc2FnZVJlc3VsdCB7XG4gIE1lc3NhZ2VzOiBBcnJheTxNZXNzYWdlPjtcbn1cblxuaW50ZXJmYWNlIE1lc3NhZ2Uge1xuICBCb2R5OiBzdHJpbmcgfCB1bmRlZmluZWQ7XG4gIE1ENU9mQm9keTogc3RyaW5nIHwgdW5kZWZpbmVkO1xuICBNZXNzYWdlSWQ6IHN0cmluZyB8IHVuZGVmaW5lZDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHJlY2VpdmVNZXNzYWdlTWlkZGxld2FyZShvcHRpb25zOiBQcmV2aW91c2x5UmVzb2x2ZWQpOiBJbml0aWFsaXplTWlkZGxld2FyZTxhbnksIGFueT4ge1xuICByZXR1cm4gPE91dHB1dCBleHRlbmRzIE1ldGFkYXRhQmVhcmVyPihcbiAgICBuZXh0OiBJbml0aWFsaXplSGFuZGxlcjxhbnksIE91dHB1dD5cbiAgKTogSW5pdGlhbGl6ZUhhbmRsZXI8YW55LCBPdXRwdXQ+ID0+IGFzeW5jIChcbiAgICBhcmdzOiBJbml0aWFsaXplSGFuZGxlckFyZ3VtZW50czxhbnk+XG4gICk6IFByb21pc2U8SW5pdGlhbGl6ZUhhbmRsZXJPdXRwdXQ8T3V0cHV0Pj4gPT4ge1xuICAgIGNvbnN0IHJlc3AgPSBhd2FpdCBuZXh0KHsgLi4uYXJncyB9KTtcbiAgICBjb25zdCBvdXRwdXQgPSAocmVzcC5vdXRwdXQgYXMgdW5rbm93bikgYXMgUmVjZWl2ZU1lc3NhZ2VSZXN1bHQ7XG4gICAgY29uc3QgbWVzc2FnZUlkcyA9IFtdO1xuICAgIGlmIChvdXRwdXQuTWVzc2FnZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgZm9yIChjb25zdCBtZXNzYWdlIG9mIG91dHB1dC5NZXNzYWdlcykge1xuICAgICAgICBjb25zdCBtZDUgPSBtZXNzYWdlLk1ENU9mQm9keTtcbiAgICAgICAgY29uc3QgaGFzaCA9IG5ldyBvcHRpb25zLm1kNSgpO1xuICAgICAgICBoYXNoLnVwZGF0ZShtZXNzYWdlLkJvZHkgfHwgXCJcIik7XG4gICAgICAgIGlmIChtZDUgIT09IHRvSGV4KGF3YWl0IGhhc2guZGlnZXN0KCkpKSB7XG4gICAgICAgICAgbWVzc2FnZUlkcy5wdXNoKG1lc3NhZ2UuTWVzc2FnZUlkKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgICBpZiAobWVzc2FnZUlkcy5sZW5ndGggPiAwKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXCJJbnZhbGlkIE1ENSBjaGVja3N1bSBvbiBtZXNzYWdlczogXCIgKyBtZXNzYWdlSWRzLmpvaW4oXCIsIFwiKSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3A7XG4gIH07XG59XG5cbmV4cG9ydCBjb25zdCByZWNlaXZlTWVzc2FnZU1pZGRsZXdhcmVPcHRpb25zOiBJbml0aWFsaXplSGFuZGxlck9wdGlvbnMgPSB7XG4gIHN0ZXA6IFwiaW5pdGlhbGl6ZVwiLFxuICB0YWdzOiBbXCJWQUxJREFURV9CT0RZX01ENVwiXSxcbiAgbmFtZTogXCJyZWNlaXZlTWVzc2FnZU1pZGRsZXdhcmVcIixcbn07XG5cbmV4cG9ydCBjb25zdCBnZXRSZWNlaXZlTWVzc2FnZVBsdWdpbiA9IChjb25maWc6IFByZXZpb3VzbHlSZXNvbHZlZCk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQocmVjZWl2ZU1lc3NhZ2VNaWRkbGV3YXJlKGNvbmZpZyksIHJlY2VpdmVNZXNzYWdlTWlkZGxld2FyZU9wdGlvbnMpO1xuICB9LFxufSk7XG4iXX0= + +/***/ }), + +/***/ 70287: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSendMessageBatchPlugin = exports.sendMessageBatchMiddlewareOptions = exports.sendMessageBatchMiddleware = void 0; +const util_hex_encoding_1 = __nccwpck_require__(73291); +const sendMessageBatchMiddleware = (options) => (next) => async (args) => { + const resp = await next({ ...args }); + const output = resp.output; + const messageIds = []; + const entries = {}; + if (output.Successful !== undefined) { + for (const entry of output.Successful) { + if (entry.Id !== undefined) { + entries[entry.Id] = entry; + } + } + } + for (const entry of args.input.Entries) { + if (entries[entry.Id]) { + const md5 = entries[entry.Id].MD5OfMessageBody; + const hash = new options.md5(); + hash.update(entry.MessageBody || ""); + if (md5 !== util_hex_encoding_1.toHex(await hash.digest())) { + messageIds.push(entries[entry.Id].MessageId); + } + } + } + if (messageIds.length > 0) { + throw new Error("Invalid MD5 checksum on messages: " + messageIds.join(", ")); + } + return resp; +}; +exports.sendMessageBatchMiddleware = sendMessageBatchMiddleware; +exports.sendMessageBatchMiddlewareOptions = { + step: "initialize", + tags: ["VALIDATE_BODY_MD5"], + name: "sendMessageBatchMiddleware", +}; +const getSendMessageBatchPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.add(exports.sendMessageBatchMiddleware(config), exports.sendMessageBatchMiddlewareOptions); + }, +}); +exports.getSendMessageBatchPlugin = getSendMessageBatchPlugin; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VuZC1tZXNzYWdlLWJhdGNoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NlbmQtbWVzc2FnZS1iYXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFTQSxrRUFBbUQ7QUFjNUMsTUFBTSwwQkFBMEIsR0FBRyxDQUFDLE9BQTJCLEVBQWtDLEVBQUUsQ0FBQyxDQUd6RyxJQUFvQyxFQUNKLEVBQUUsQ0FBQyxLQUFLLEVBQ3hDLElBQXFDLEVBQ0ssRUFBRTtJQUM1QyxNQUFNLElBQUksR0FBRyxNQUFNLElBQUksQ0FBQyxFQUFFLEdBQUcsSUFBSSxFQUFFLENBQUMsQ0FBQztJQUNyQyxNQUFNLE1BQU0sR0FBSSxJQUFJLENBQUMsTUFBNEMsQ0FBQztJQUNsRSxNQUFNLFVBQVUsR0FBRyxFQUFFLENBQUM7SUFDdEIsTUFBTSxPQUFPLEdBQXFELEVBQUUsQ0FBQztJQUNyRSxJQUFJLE1BQU0sQ0FBQyxVQUFVLEtBQUssU0FBUyxFQUFFO1FBQ25DLEtBQUssTUFBTSxLQUFLLElBQUksTUFBTSxDQUFDLFVBQVUsRUFBRTtZQUNyQyxJQUFJLEtBQUssQ0FBQyxFQUFFLEtBQUssU0FBUyxFQUFFO2dCQUMxQixPQUFPLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxHQUFHLEtBQUssQ0FBQzthQUMzQjtTQUNGO0tBQ0Y7SUFDRCxLQUFLLE1BQU0sS0FBSyxJQUFJLElBQUksQ0FBQyxLQUFLLENBQUMsT0FBTyxFQUFFO1FBQ3RDLElBQUksT0FBTyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsRUFBRTtZQUNyQixNQUFNLEdBQUcsR0FBRyxPQUFPLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxDQUFDLGdCQUFnQixDQUFDO1lBQy9DLE1BQU0sSUFBSSxHQUFHLElBQUksT0FBTyxDQUFDLEdBQUcsRUFBRSxDQUFDO1lBQy9CLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLFdBQVcsSUFBSSxFQUFFLENBQUMsQ0FBQztZQUNyQyxJQUFJLEdBQUcsS0FBSyx5QkFBSyxDQUFDLE1BQU0sSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUU7Z0JBQ3RDLFVBQVUsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQzthQUM5QztTQUNGO0tBQ0Y7SUFDRCxJQUFJLFVBQVUsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxFQUFFO1FBQ3pCLE1BQU0sSUFBSSxLQUFLLENBQUMsb0NBQW9DLEdBQUcsVUFBVSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO0tBQy9FO0lBRUQsT0FBTyxJQUFJLENBQUM7QUFDZCxDQUFDLENBQUM7QUFqQ1csUUFBQSwwQkFBMEIsOEJBaUNyQztBQUVXLFFBQUEsaUNBQWlDLEdBQTZCO0lBQ3pFLElBQUksRUFBRSxZQUFZO0lBQ2xCLElBQUksRUFBRSxDQUFDLG1CQUFtQixDQUFDO0lBQzNCLElBQUksRUFBRSw0QkFBNEI7Q0FDbkMsQ0FBQztBQUVLLE1BQU0seUJBQXlCLEdBQUcsQ0FBQyxNQUEwQixFQUF1QixFQUFFLENBQUMsQ0FBQztJQUM3RixZQUFZLEVBQUUsQ0FBQyxXQUFXLEVBQUUsRUFBRTtRQUM1QixXQUFXLENBQUMsR0FBRyxDQUFDLGtDQUEwQixDQUFDLE1BQU0sQ0FBQyxFQUFFLHlDQUFpQyxDQUFDLENBQUM7SUFDekYsQ0FBQztDQUNGLENBQUMsQ0FBQztBQUpVLFFBQUEseUJBQXlCLDZCQUluQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIEluaXRpYWxpemVIYW5kbGVyLFxuICBJbml0aWFsaXplSGFuZGxlckFyZ3VtZW50cyxcbiAgSW5pdGlhbGl6ZUhhbmRsZXJPcHRpb25zLFxuICBJbml0aWFsaXplSGFuZGxlck91dHB1dCxcbiAgSW5pdGlhbGl6ZU1pZGRsZXdhcmUsXG4gIE1ldGFkYXRhQmVhcmVyLFxuICBQbHVnZ2FibGUsXG59IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgdG9IZXggfSBmcm9tIFwiQGF3cy1zZGsvdXRpbC1oZXgtZW5jb2RpbmdcIjtcblxuaW1wb3J0IHsgUHJldmlvdXNseVJlc29sdmVkIH0gZnJvbSBcIi4vY29uZmlndXJhdGlvbnNcIjtcblxuaW50ZXJmYWNlIFNlbmRNZXNzYWdlQmF0Y2hSZXN1bHQge1xuICBTdWNjZXNzZnVsOiBBcnJheTxTZW5kTWVzc2FnZUJhdGNoUmVzdWx0RW50cnk+IHwgdW5kZWZpbmVkO1xufVxuXG5pbnRlcmZhY2UgU2VuZE1lc3NhZ2VCYXRjaFJlc3VsdEVudHJ5IHtcbiAgSWQ6IHN0cmluZyB8IHVuZGVmaW5lZDtcbiAgTUQ1T2ZNZXNzYWdlQm9keTogc3RyaW5nIHwgdW5kZWZpbmVkO1xuICBNZXNzYWdlSWQ6IHN0cmluZyB8IHVuZGVmaW5lZDtcbn1cblxuZXhwb3J0IGNvbnN0IHNlbmRNZXNzYWdlQmF0Y2hNaWRkbGV3YXJlID0gKG9wdGlvbnM6IFByZXZpb3VzbHlSZXNvbHZlZCk6IEluaXRpYWxpemVNaWRkbGV3YXJlPGFueSwgYW55PiA9PiA8XG4gIE91dHB1dCBleHRlbmRzIE1ldGFkYXRhQmVhcmVyXG4+KFxuICBuZXh0OiBJbml0aWFsaXplSGFuZGxlcjxhbnksIE91dHB1dD5cbik6IEluaXRpYWxpemVIYW5kbGVyPGFueSwgT3V0cHV0PiA9PiBhc3luYyAoXG4gIGFyZ3M6IEluaXRpYWxpemVIYW5kbGVyQXJndW1lbnRzPGFueT5cbik6IFByb21pc2U8SW5pdGlhbGl6ZUhhbmRsZXJPdXRwdXQ8T3V0cHV0Pj4gPT4ge1xuICBjb25zdCByZXNwID0gYXdhaXQgbmV4dCh7IC4uLmFyZ3MgfSk7XG4gIGNvbnN0IG91dHB1dCA9IChyZXNwLm91dHB1dCBhcyB1bmtub3duKSBhcyBTZW5kTWVzc2FnZUJhdGNoUmVzdWx0O1xuICBjb25zdCBtZXNzYWdlSWRzID0gW107XG4gIGNvbnN0IGVudHJpZXM6IHsgW2luZGV4OiBzdHJpbmddOiBTZW5kTWVzc2FnZUJhdGNoUmVzdWx0RW50cnkgfSA9IHt9O1xuICBpZiAob3V0cHV0LlN1Y2Nlc3NmdWwgIT09IHVuZGVmaW5lZCkge1xuICAgIGZvciAoY29uc3QgZW50cnkgb2Ygb3V0cHV0LlN1Y2Nlc3NmdWwpIHtcbiAgICAgIGlmIChlbnRyeS5JZCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGVudHJpZXNbZW50cnkuSWRdID0gZW50cnk7XG4gICAgICB9XG4gICAgfVxuICB9XG4gIGZvciAoY29uc3QgZW50cnkgb2YgYXJncy5pbnB1dC5FbnRyaWVzKSB7XG4gICAgaWYgKGVudHJpZXNbZW50cnkuSWRdKSB7XG4gICAgICBjb25zdCBtZDUgPSBlbnRyaWVzW2VudHJ5LklkXS5NRDVPZk1lc3NhZ2VCb2R5O1xuICAgICAgY29uc3QgaGFzaCA9IG5ldyBvcHRpb25zLm1kNSgpO1xuICAgICAgaGFzaC51cGRhdGUoZW50cnkuTWVzc2FnZUJvZHkgfHwgXCJcIik7XG4gICAgICBpZiAobWQ1ICE9PSB0b0hleChhd2FpdCBoYXNoLmRpZ2VzdCgpKSkge1xuICAgICAgICBtZXNzYWdlSWRzLnB1c2goZW50cmllc1tlbnRyeS5JZF0uTWVzc2FnZUlkKTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbiAgaWYgKG1lc3NhZ2VJZHMubGVuZ3RoID4gMCkge1xuICAgIHRocm93IG5ldyBFcnJvcihcIkludmFsaWQgTUQ1IGNoZWNrc3VtIG9uIG1lc3NhZ2VzOiBcIiArIG1lc3NhZ2VJZHMuam9pbihcIiwgXCIpKTtcbiAgfVxuXG4gIHJldHVybiByZXNwO1xufTtcblxuZXhwb3J0IGNvbnN0IHNlbmRNZXNzYWdlQmF0Y2hNaWRkbGV3YXJlT3B0aW9uczogSW5pdGlhbGl6ZUhhbmRsZXJPcHRpb25zID0ge1xuICBzdGVwOiBcImluaXRpYWxpemVcIixcbiAgdGFnczogW1wiVkFMSURBVEVfQk9EWV9NRDVcIl0sXG4gIG5hbWU6IFwic2VuZE1lc3NhZ2VCYXRjaE1pZGRsZXdhcmVcIixcbn07XG5cbmV4cG9ydCBjb25zdCBnZXRTZW5kTWVzc2FnZUJhdGNoUGx1Z2luID0gKGNvbmZpZzogUHJldmlvdXNseVJlc29sdmVkKTogUGx1Z2dhYmxlPGFueSwgYW55PiA9PiAoe1xuICBhcHBseVRvU3RhY2s6IChjbGllbnRTdGFjaykgPT4ge1xuICAgIGNsaWVudFN0YWNrLmFkZChzZW5kTWVzc2FnZUJhdGNoTWlkZGxld2FyZShjb25maWcpLCBzZW5kTWVzc2FnZUJhdGNoTWlkZGxld2FyZU9wdGlvbnMpO1xuICB9LFxufSk7XG4iXX0= + +/***/ }), + +/***/ 71148: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSendMessagePlugin = exports.sendMessageMiddlewareOptions = exports.sendMessageMiddleware = void 0; +const util_hex_encoding_1 = __nccwpck_require__(73291); +const sendMessageMiddleware = (options) => (next) => async (args) => { + const resp = await next({ ...args }); + const output = resp.output; + const hash = new options.md5(); + hash.update(args.input.MessageBody || ""); + if (output.MD5OfMessageBody !== util_hex_encoding_1.toHex(await hash.digest())) { + throw new Error("InvalidChecksumError"); + } + return resp; +}; +exports.sendMessageMiddleware = sendMessageMiddleware; +exports.sendMessageMiddlewareOptions = { + step: "initialize", + tags: ["VALIDATE_BODY_MD5"], + name: "sendMessageMiddleware", +}; +const getSendMessagePlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.add(exports.sendMessageMiddleware(config), exports.sendMessageMiddlewareOptions); + }, +}); +exports.getSendMessagePlugin = getSendMessagePlugin; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VuZC1tZXNzYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NlbmQtbWVzc2FnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFTQSxrRUFBbUQ7QUFRNUMsTUFBTSxxQkFBcUIsR0FBRyxDQUFDLE9BQTJCLEVBQWtDLEVBQUUsQ0FBQyxDQUdwRyxJQUFvQyxFQUNKLEVBQUUsQ0FBQyxLQUFLLEVBQ3hDLElBQXFDLEVBQ0ssRUFBRTtJQUM1QyxNQUFNLElBQUksR0FBRyxNQUFNLElBQUksQ0FBQyxFQUFFLEdBQUcsSUFBSSxFQUFFLENBQUMsQ0FBQztJQUNyQyxNQUFNLE1BQU0sR0FBRyxJQUFJLENBQUMsTUFBMkIsQ0FBQztJQUNoRCxNQUFNLElBQUksR0FBRyxJQUFJLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQztJQUMvQixJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsV0FBVyxJQUFJLEVBQUUsQ0FBQyxDQUFDO0lBQzFDLElBQUksTUFBTSxDQUFDLGdCQUFnQixLQUFLLHlCQUFLLENBQUMsTUFBTSxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUMsRUFBRTtRQUMxRCxNQUFNLElBQUksS0FBSyxDQUFDLHNCQUFzQixDQUFDLENBQUM7S0FDekM7SUFDRCxPQUFPLElBQUksQ0FBQztBQUNkLENBQUMsQ0FBQztBQWZXLFFBQUEscUJBQXFCLHlCQWVoQztBQUVXLFFBQUEsNEJBQTRCLEdBQTZCO0lBQ3BFLElBQUksRUFBRSxZQUFZO0lBQ2xCLElBQUksRUFBRSxDQUFDLG1CQUFtQixDQUFDO0lBQzNCLElBQUksRUFBRSx1QkFBdUI7Q0FDOUIsQ0FBQztBQUVLLE1BQU0sb0JBQW9CLEdBQUcsQ0FBQyxNQUEwQixFQUF1QixFQUFFLENBQUMsQ0FBQztJQUN4RixZQUFZLEVBQUUsQ0FBQyxXQUFXLEVBQUUsRUFBRTtRQUM1QixXQUFXLENBQUMsR0FBRyxDQUFDLDZCQUFxQixDQUFDLE1BQU0sQ0FBQyxFQUFFLG9DQUE0QixDQUFDLENBQUM7SUFDL0UsQ0FBQztDQUNGLENBQUMsQ0FBQztBQUpVLFFBQUEsb0JBQW9CLHdCQUk5QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIEluaXRpYWxpemVIYW5kbGVyLFxuICBJbml0aWFsaXplSGFuZGxlckFyZ3VtZW50cyxcbiAgSW5pdGlhbGl6ZUhhbmRsZXJPcHRpb25zLFxuICBJbml0aWFsaXplSGFuZGxlck91dHB1dCxcbiAgSW5pdGlhbGl6ZU1pZGRsZXdhcmUsXG4gIE1ldGFkYXRhQmVhcmVyLFxuICBQbHVnZ2FibGUsXG59IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgdG9IZXggfSBmcm9tIFwiQGF3cy1zZGsvdXRpbC1oZXgtZW5jb2RpbmdcIjtcblxuaW1wb3J0IHsgUHJldmlvdXNseVJlc29sdmVkIH0gZnJvbSBcIi4vY29uZmlndXJhdGlvbnNcIjtcblxuaW50ZXJmYWNlIFNlbmRNZXNzYWdlUmVzdWx0IHtcbiAgTUQ1T2ZNZXNzYWdlQm9keT86IHN0cmluZztcbn1cblxuZXhwb3J0IGNvbnN0IHNlbmRNZXNzYWdlTWlkZGxld2FyZSA9IChvcHRpb25zOiBQcmV2aW91c2x5UmVzb2x2ZWQpOiBJbml0aWFsaXplTWlkZGxld2FyZTxhbnksIGFueT4gPT4gPFxuICBPdXRwdXQgZXh0ZW5kcyBNZXRhZGF0YUJlYXJlclxuPihcbiAgbmV4dDogSW5pdGlhbGl6ZUhhbmRsZXI8YW55LCBPdXRwdXQ+XG4pOiBJbml0aWFsaXplSGFuZGxlcjxhbnksIE91dHB1dD4gPT4gYXN5bmMgKFxuICBhcmdzOiBJbml0aWFsaXplSGFuZGxlckFyZ3VtZW50czxhbnk+XG4pOiBQcm9taXNlPEluaXRpYWxpemVIYW5kbGVyT3V0cHV0PE91dHB1dD4+ID0+IHtcbiAgY29uc3QgcmVzcCA9IGF3YWl0IG5leHQoeyAuLi5hcmdzIH0pO1xuICBjb25zdCBvdXRwdXQgPSByZXNwLm91dHB1dCBhcyBTZW5kTWVzc2FnZVJlc3VsdDtcbiAgY29uc3QgaGFzaCA9IG5ldyBvcHRpb25zLm1kNSgpO1xuICBoYXNoLnVwZGF0ZShhcmdzLmlucHV0Lk1lc3NhZ2VCb2R5IHx8IFwiXCIpO1xuICBpZiAob3V0cHV0Lk1ENU9mTWVzc2FnZUJvZHkgIT09IHRvSGV4KGF3YWl0IGhhc2guZGlnZXN0KCkpKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiSW52YWxpZENoZWNrc3VtRXJyb3JcIik7XG4gIH1cbiAgcmV0dXJuIHJlc3A7XG59O1xuXG5leHBvcnQgY29uc3Qgc2VuZE1lc3NhZ2VNaWRkbGV3YXJlT3B0aW9uczogSW5pdGlhbGl6ZUhhbmRsZXJPcHRpb25zID0ge1xuICBzdGVwOiBcImluaXRpYWxpemVcIixcbiAgdGFnczogW1wiVkFMSURBVEVfQk9EWV9NRDVcIl0sXG4gIG5hbWU6IFwic2VuZE1lc3NhZ2VNaWRkbGV3YXJlXCIsXG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2VuZE1lc3NhZ2VQbHVnaW4gPSAoY29uZmlnOiBQcmV2aW91c2x5UmVzb2x2ZWQpOiBQbHVnZ2FibGU8YW55LCBhbnk+ID0+ICh7XG4gIGFwcGx5VG9TdGFjazogKGNsaWVudFN0YWNrKSA9PiB7XG4gICAgY2xpZW50U3RhY2suYWRkKHNlbmRNZXNzYWdlTWlkZGxld2FyZShjb25maWcpLCBzZW5kTWVzc2FnZU1pZGRsZXdhcmVPcHRpb25zKTtcbiAgfSxcbn0pO1xuIl19 + +/***/ }), + +/***/ 45260: +/***/ ((__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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzZXJpYWxpemVyTWlkZGxld2FyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZXNlcmlhbGl6ZXJNaWRkbGV3YXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQVNPLE1BQU0sc0JBQXNCLEdBQUcsQ0FDcEMsT0FBcUIsRUFDckIsWUFBMEQsRUFDcEIsRUFBRSxDQUFDLENBQ3pDLElBQXVDLEVBQ3ZDLE9BQWdDLEVBQ0csRUFBRSxDQUFDLEtBQUssRUFDM0MsSUFBd0MsRUFDRyxFQUFFO0lBQzdDLE1BQU0sRUFBRSxRQUFRLEVBQUUsR0FBRyxNQUFNLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUN0QyxNQUFNLE1BQU0sR0FBRyxNQUFNLFlBQVksQ0FBQyxRQUFRLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFDckQsT0FBTztRQUNMLFFBQVE7UUFDUixNQUFNLEVBQUUsTUFBZ0I7S0FDekIsQ0FBQztBQUNKLENBQUMsQ0FBQztBQWZXLFFBQUEsc0JBQXNCLDBCQWVqQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIERlc2VyaWFsaXplSGFuZGxlcixcbiAgRGVzZXJpYWxpemVIYW5kbGVyQXJndW1lbnRzLFxuICBEZXNlcmlhbGl6ZUhhbmRsZXJPdXRwdXQsXG4gIERlc2VyaWFsaXplTWlkZGxld2FyZSxcbiAgSGFuZGxlckV4ZWN1dGlvbkNvbnRleHQsXG4gIFJlc3BvbnNlRGVzZXJpYWxpemVyLFxufSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGNvbnN0IGRlc2VyaWFsaXplck1pZGRsZXdhcmUgPSA8SW5wdXQgZXh0ZW5kcyBvYmplY3QsIE91dHB1dCBleHRlbmRzIG9iamVjdCwgUnVudGltZVV0aWxzID0gYW55PihcbiAgb3B0aW9uczogUnVudGltZVV0aWxzLFxuICBkZXNlcmlhbGl6ZXI6IFJlc3BvbnNlRGVzZXJpYWxpemVyPGFueSwgYW55LCBSdW50aW1lVXRpbHM+XG4pOiBEZXNlcmlhbGl6ZU1pZGRsZXdhcmU8SW5wdXQsIE91dHB1dD4gPT4gKFxuICBuZXh0OiBEZXNlcmlhbGl6ZUhhbmRsZXI8SW5wdXQsIE91dHB1dD4sXG4gIGNvbnRleHQ6IEhhbmRsZXJFeGVjdXRpb25Db250ZXh0XG4pOiBEZXNlcmlhbGl6ZUhhbmRsZXI8SW5wdXQsIE91dHB1dD4gPT4gYXN5bmMgKFxuICBhcmdzOiBEZXNlcmlhbGl6ZUhhbmRsZXJBcmd1bWVudHM8SW5wdXQ+XG4pOiBQcm9taXNlPERlc2VyaWFsaXplSGFuZGxlck91dHB1dDxPdXRwdXQ+PiA9PiB7XG4gIGNvbnN0IHsgcmVzcG9uc2UgfSA9IGF3YWl0IG5leHQoYXJncyk7XG4gIGNvbnN0IHBhcnNlZCA9IGF3YWl0IGRlc2VyaWFsaXplcihyZXNwb25zZSwgb3B0aW9ucyk7XG4gIHJldHVybiB7XG4gICAgcmVzcG9uc2UsXG4gICAgb3V0cHV0OiBwYXJzZWQgYXMgT3V0cHV0LFxuICB9O1xufTtcbiJdfQ== + +/***/ }), + +/***/ 86142: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(45260), exports); +tslib_1.__exportStar(__nccwpck_require__(81594), exports); +tslib_1.__exportStar(__nccwpck_require__(21288), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbUVBQXlDO0FBQ3pDLGlFQUF1QztBQUN2Qyx3REFBOEIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9kZXNlcmlhbGl6ZXJNaWRkbGV3YXJlXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9zZXJpYWxpemVyTWlkZGxld2FyZVwiO1xuZXhwb3J0ICogZnJvbSBcIi4vc2VyZGVQbHVnaW5cIjtcbiJdfQ== + +/***/ }), + +/***/ 21288: +/***/ ((__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__(45260); +const serializerMiddleware_1 = __nccwpck_require__(81594); +exports.deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], +}; +exports.serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], +}; +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyZGVQbHVnaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VyZGVQbHVnaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBV0EscUVBQWtFO0FBQ2xFLGlFQUE4RDtBQUVqRCxRQUFBLDRCQUE0QixHQUE4QjtJQUNyRSxJQUFJLEVBQUUsd0JBQXdCO0lBQzlCLElBQUksRUFBRSxhQUFhO0lBQ25CLElBQUksRUFBRSxDQUFDLGNBQWMsQ0FBQztDQUN2QixDQUFDO0FBRVcsUUFBQSwwQkFBMEIsR0FBNEI7SUFDakUsSUFBSSxFQUFFLHNCQUFzQjtJQUM1QixJQUFJLEVBQUUsV0FBVztJQUNqQixJQUFJLEVBQUUsQ0FBQyxZQUFZLENBQUM7Q0FDckIsQ0FBQztBQUVGLFNBQWdCLGNBQWMsQ0FLNUIsTUFBb0IsRUFDcEIsVUFBZ0QsRUFDaEQsWUFBaUU7SUFFakUsT0FBTztRQUNMLFlBQVksRUFBRSxDQUFDLFlBQW9ELEVBQUUsRUFBRTtZQUNyRSxZQUFZLENBQUMsR0FBRyxDQUFDLCtDQUFzQixDQUFDLE1BQU0sRUFBRSxZQUFZLENBQUMsRUFBRSxvQ0FBNEIsQ0FBQyxDQUFDO1lBQzdGLFlBQVksQ0FBQyxHQUFHLENBQUMsMkNBQW9CLENBQUMsTUFBTSxFQUFFLFVBQVUsQ0FBQyxFQUFFLGtDQUEwQixDQUFDLENBQUM7UUFDekYsQ0FBQztLQUNGLENBQUM7QUFDSixDQUFDO0FBZkQsd0NBZUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBEZXNlcmlhbGl6ZUhhbmRsZXJPcHRpb25zLFxuICBFbmRwb2ludEJlYXJlcixcbiAgTWV0YWRhdGFCZWFyZXIsXG4gIE1pZGRsZXdhcmVTdGFjayxcbiAgUGx1Z2dhYmxlLFxuICBSZXF1ZXN0U2VyaWFsaXplcixcbiAgUmVzcG9uc2VEZXNlcmlhbGl6ZXIsXG4gIFNlcmlhbGl6ZUhhbmRsZXJPcHRpb25zLFxufSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuaW1wb3J0IHsgZGVzZXJpYWxpemVyTWlkZGxld2FyZSB9IGZyb20gXCIuL2Rlc2VyaWFsaXplck1pZGRsZXdhcmVcIjtcbmltcG9ydCB7IHNlcmlhbGl6ZXJNaWRkbGV3YXJlIH0gZnJvbSBcIi4vc2VyaWFsaXplck1pZGRsZXdhcmVcIjtcblxuZXhwb3J0IGNvbnN0IGRlc2VyaWFsaXplck1pZGRsZXdhcmVPcHRpb246IERlc2VyaWFsaXplSGFuZGxlck9wdGlvbnMgPSB7XG4gIG5hbWU6IFwiZGVzZXJpYWxpemVyTWlkZGxld2FyZVwiLFxuICBzdGVwOiBcImRlc2VyaWFsaXplXCIsXG4gIHRhZ3M6IFtcIkRFU0VSSUFMSVpFUlwiXSxcbn07XG5cbmV4cG9ydCBjb25zdCBzZXJpYWxpemVyTWlkZGxld2FyZU9wdGlvbjogU2VyaWFsaXplSGFuZGxlck9wdGlvbnMgPSB7XG4gIG5hbWU6IFwic2VyaWFsaXplck1pZGRsZXdhcmVcIixcbiAgc3RlcDogXCJzZXJpYWxpemVcIixcbiAgdGFnczogW1wiU0VSSUFMSVpFUlwiXSxcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRTZXJkZVBsdWdpbjxcbiAgSW5wdXRUeXBlIGV4dGVuZHMgb2JqZWN0LFxuICBTZXJEZUNvbnRleHQgZXh0ZW5kcyBFbmRwb2ludEJlYXJlcixcbiAgT3V0cHV0VHlwZSBleHRlbmRzIE1ldGFkYXRhQmVhcmVyXG4+KFxuICBjb25maWc6IFNlckRlQ29udGV4dCxcbiAgc2VyaWFsaXplcjogUmVxdWVzdFNlcmlhbGl6ZXI8YW55LCBTZXJEZUNvbnRleHQ+LFxuICBkZXNlcmlhbGl6ZXI6IFJlc3BvbnNlRGVzZXJpYWxpemVyPE91dHB1dFR5cGUsIGFueSwgU2VyRGVDb250ZXh0PlxuKTogUGx1Z2dhYmxlPElucHV0VHlwZSwgT3V0cHV0VHlwZT4ge1xuICByZXR1cm4ge1xuICAgIGFwcGx5VG9TdGFjazogKGNvbW1hbmRTdGFjazogTWlkZGxld2FyZVN0YWNrPElucHV0VHlwZSwgT3V0cHV0VHlwZT4pID0+IHtcbiAgICAgIGNvbW1hbmRTdGFjay5hZGQoZGVzZXJpYWxpemVyTWlkZGxld2FyZShjb25maWcsIGRlc2VyaWFsaXplciksIGRlc2VyaWFsaXplck1pZGRsZXdhcmVPcHRpb24pO1xuICAgICAgY29tbWFuZFN0YWNrLmFkZChzZXJpYWxpemVyTWlkZGxld2FyZShjb25maWcsIHNlcmlhbGl6ZXIpLCBzZXJpYWxpemVyTWlkZGxld2FyZU9wdGlvbik7XG4gICAgfSxcbiAgfTtcbn1cbiJdfQ== + +/***/ }), + +/***/ 81594: +/***/ ((__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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyaWFsaXplck1pZGRsZXdhcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VyaWFsaXplck1pZGRsZXdhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBVU8sTUFBTSxvQkFBb0IsR0FBRyxDQUNsQyxPQUFxQixFQUNyQixVQUFnRCxFQUNaLEVBQUUsQ0FBQyxDQUN2QyxJQUFxQyxFQUNyQyxPQUFnQyxFQUNDLEVBQUUsQ0FBQyxLQUFLLEVBQ3pDLElBQXNDLEVBQ0csRUFBRTtJQUMzQyxNQUFNLE9BQU8sR0FBRyxNQUFNLFVBQVUsQ0FBQyxJQUFJLENBQUMsS0FBSyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQ3RELE9BQU8sSUFBSSxDQUFDO1FBQ1YsR0FBRyxJQUFJO1FBQ1AsT0FBTztLQUNSLENBQUMsQ0FBQztBQUNMLENBQUMsQ0FBQztBQWRXLFFBQUEsb0JBQW9CLHdCQWMvQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIEVuZHBvaW50QmVhcmVyLFxuICBIYW5kbGVyRXhlY3V0aW9uQ29udGV4dCxcbiAgUmVxdWVzdFNlcmlhbGl6ZXIsXG4gIFNlcmlhbGl6ZUhhbmRsZXIsXG4gIFNlcmlhbGl6ZUhhbmRsZXJBcmd1bWVudHMsXG4gIFNlcmlhbGl6ZUhhbmRsZXJPdXRwdXQsXG4gIFNlcmlhbGl6ZU1pZGRsZXdhcmUsXG59IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgY29uc3Qgc2VyaWFsaXplck1pZGRsZXdhcmUgPSA8SW5wdXQgZXh0ZW5kcyBvYmplY3QsIE91dHB1dCBleHRlbmRzIG9iamVjdCwgUnVudGltZVV0aWxzIGV4dGVuZHMgRW5kcG9pbnRCZWFyZXI+KFxuICBvcHRpb25zOiBSdW50aW1lVXRpbHMsXG4gIHNlcmlhbGl6ZXI6IFJlcXVlc3RTZXJpYWxpemVyPGFueSwgUnVudGltZVV0aWxzPlxuKTogU2VyaWFsaXplTWlkZGxld2FyZTxJbnB1dCwgT3V0cHV0PiA9PiAoXG4gIG5leHQ6IFNlcmlhbGl6ZUhhbmRsZXI8SW5wdXQsIE91dHB1dD4sXG4gIGNvbnRleHQ6IEhhbmRsZXJFeGVjdXRpb25Db250ZXh0XG4pOiBTZXJpYWxpemVIYW5kbGVyPElucHV0LCBPdXRwdXQ+ID0+IGFzeW5jIChcbiAgYXJnczogU2VyaWFsaXplSGFuZGxlckFyZ3VtZW50czxJbnB1dD5cbik6IFByb21pc2U8U2VyaWFsaXplSGFuZGxlck91dHB1dDxPdXRwdXQ+PiA9PiB7XG4gIGNvbnN0IHJlcXVlc3QgPSBhd2FpdCBzZXJpYWxpemVyKGFyZ3MuaW5wdXQsIG9wdGlvbnMpO1xuICByZXR1cm4gbmV4dCh7XG4gICAgLi4uYXJncyxcbiAgICByZXF1ZXN0LFxuICB9KTtcbn07XG4iXX0= + +/***/ }), + +/***/ 85370: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveAwsAuthConfig = void 0; +const signature_v4_1 = __nccwpck_require__(64172); +function resolveAwsAuthConfig(input) { + const credentials = input.credentials || input.credentialDefaultProvider(input); + const normalizedCreds = normalizeProvider(credentials); + const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input; + let signer; + if (input.signer) { + //if signer is supplied by user, normalize it to a function returning a promise for signer. + signer = normalizeProvider(input.signer); + } + else { + //construct a provider inferring signing from region. + signer = () => normalizeProvider(input.region)() + .then(async (region) => [(await input.regionInfoProvider(region)) || {}, region]) + .then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + //update client's singing region and signing service config if they are resolved. + //signing region resolving order: user supplied signingRegion -> endpoints.json inferred region -> client region + input.signingRegion = input.signingRegion || signingRegion || region; + //signing name resolving order: + //user supplied signingName -> endpoints.json inferred (credential scope -> model arnNamespace) -> model service id + input.signingName = input.signingName || signingService || input.serviceId; + return new signature_v4_1.SignatureV4({ + credentials: normalizedCreds, + region: input.signingRegion, + service: input.signingName, + sha256, + uriEscapePath: signingEscapePath, + }); + }); + } + return { + ...input, + systemClockOffset, + signingEscapePath, + credentials: normalizedCreds, + signer, + }; +} +exports.resolveAwsAuthConfig = resolveAwsAuthConfig; +function normalizeProvider(input) { + if (typeof input === "object") { + const promisified = Promise.resolve(input); + return () => promisified; + } + return input; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsd0RBQW9EO0FBNENwRCxTQUFnQixvQkFBb0IsQ0FBSSxLQUFrRDtJQUN4RixNQUFNLFdBQVcsR0FBRyxLQUFLLENBQUMsV0FBVyxJQUFJLEtBQUssQ0FBQyx5QkFBeUIsQ0FBQyxLQUFZLENBQUMsQ0FBQztJQUN2RixNQUFNLGVBQWUsR0FBRyxpQkFBaUIsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUN2RCxNQUFNLEVBQUUsaUJBQWlCLEdBQUcsSUFBSSxFQUFFLGlCQUFpQixHQUFHLEtBQUssQ0FBQyxpQkFBaUIsSUFBSSxDQUFDLEVBQUUsTUFBTSxFQUFFLEdBQUcsS0FBSyxDQUFDO0lBQ3JHLElBQUksTUFBK0IsQ0FBQztJQUNwQyxJQUFJLEtBQUssQ0FBQyxNQUFNLEVBQUU7UUFDaEIsMkZBQTJGO1FBQzNGLE1BQU0sR0FBRyxpQkFBaUIsQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUM7S0FDMUM7U0FBTTtRQUNMLHFEQUFxRDtRQUNyRCxNQUFNLEdBQUcsR0FBRyxFQUFFLENBQ1osaUJBQWlCLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxFQUFFO2FBQzlCLElBQUksQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxLQUFLLENBQUMsa0JBQWtCLENBQUMsTUFBTSxDQUFDLENBQUMsSUFBSSxFQUFFLEVBQUUsTUFBTSxDQUF5QixDQUFDO2FBQ3hHLElBQUksQ0FBQyxDQUFDLENBQUMsVUFBVSxFQUFFLE1BQU0sQ0FBQyxFQUFFLEVBQUU7WUFDN0IsTUFBTSxFQUFFLGFBQWEsRUFBRSxjQUFjLEVBQUUsR0FBRyxVQUFVLENBQUM7WUFDckQsaUZBQWlGO1lBQ2pGLGdIQUFnSDtZQUNoSCxLQUFLLENBQUMsYUFBYSxHQUFHLEtBQUssQ0FBQyxhQUFhLElBQUksYUFBYSxJQUFJLE1BQU0sQ0FBQztZQUNyRSwrQkFBK0I7WUFDL0IsbUhBQW1IO1lBQ25ILEtBQUssQ0FBQyxXQUFXLEdBQUcsS0FBSyxDQUFDLFdBQVcsSUFBSSxjQUFjLElBQUksS0FBSyxDQUFDLFNBQVMsQ0FBQztZQUUzRSxPQUFPLElBQUksMEJBQVcsQ0FBQztnQkFDckIsV0FBVyxFQUFFLGVBQWU7Z0JBQzVCLE1BQU0sRUFBRSxLQUFLLENBQUMsYUFBYTtnQkFDM0IsT0FBTyxFQUFFLEtBQUssQ0FBQyxXQUFXO2dCQUMxQixNQUFNO2dCQUNOLGFBQWEsRUFBRSxpQkFBaUI7YUFDakMsQ0FBQyxDQUFDO1FBQ0wsQ0FBQyxDQUFDLENBQUM7S0FDUjtJQUVELE9BQU87UUFDTCxHQUFHLEtBQUs7UUFDUixpQkFBaUI7UUFDakIsaUJBQWlCO1FBQ2pCLFdBQVcsRUFBRSxlQUFlO1FBQzVCLE1BQU07S0FDUCxDQUFDO0FBQ0osQ0FBQztBQXZDRCxvREF1Q0M7QUFFRCxTQUFTLGlCQUFpQixDQUFJLEtBQXNCO0lBQ2xELElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxFQUFFO1FBQzdCLE1BQU0sV0FBVyxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDM0MsT0FBTyxHQUFHLEVBQUUsQ0FBQyxXQUFXLENBQUM7S0FDMUI7SUFDRCxPQUFPLEtBQW9CLENBQUM7QUFDOUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFNpZ25hdHVyZVY0IH0gZnJvbSBcIkBhd3Mtc2RrL3NpZ25hdHVyZS12NFwiO1xuaW1wb3J0IHsgQ3JlZGVudGlhbHMsIEhhc2hDb25zdHJ1Y3RvciwgUHJvdmlkZXIsIFJlZ2lvbkluZm8sIFJlZ2lvbkluZm9Qcm92aWRlciwgUmVxdWVzdFNpZ25lciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgaW50ZXJmYWNlIEF3c0F1dGhJbnB1dENvbmZpZyB7XG4gIC8qKlxuICAgKiBUaGUgY3JlZGVudGlhbHMgdXNlZCB0byBzaWduIHJlcXVlc3RzLlxuICAgKi9cbiAgY3JlZGVudGlhbHM/OiBDcmVkZW50aWFscyB8IFByb3ZpZGVyPENyZWRlbnRpYWxzPjtcblxuICAvKipcbiAgICogVGhlIHNpZ25lciB0byB1c2Ugd2hlbiBzaWduaW5nIHJlcXVlc3RzLlxuICAgKi9cbiAgc2lnbmVyPzogUmVxdWVzdFNpZ25lciB8IFByb3ZpZGVyPFJlcXVlc3RTaWduZXI+O1xuXG4gIC8qKlxuICAgKiBXaGV0aGVyIHRvIGVzY2FwZSByZXF1ZXN0IHBhdGggd2hlbiBzaWduaW5nIHRoZSByZXF1ZXN0LlxuICAgKi9cbiAgc2lnbmluZ0VzY2FwZVBhdGg/OiBib29sZWFuO1xuXG4gIC8qKlxuICAgKiBBbiBvZmZzZXQgdmFsdWUgaW4gbWlsbGlzZWNvbmRzIHRvIGFwcGx5IHRvIGFsbCBzaWduaW5nIHRpbWVzLlxuICAgKi9cbiAgc3lzdGVtQ2xvY2tPZmZzZXQ/OiBudW1iZXI7XG5cbiAgLyoqXG4gICAqIFRoZSByZWdpb24gd2hlcmUgeW91IHdhbnQgdG8gc2lnbiB5b3VyIHJlcXVlc3QgYWdhaW5zdC4gVGhpc1xuICAgKiBjYW4gYmUgZGlmZmVyZW50IHRvIHRoZSByZWdpb24gaW4gdGhlIGVuZHBvaW50LlxuICAgKi9cbiAgc2lnbmluZ1JlZ2lvbj86IHN0cmluZztcbn1cbmludGVyZmFjZSBQcmV2aW91c2x5UmVzb2x2ZWQge1xuICBjcmVkZW50aWFsRGVmYXVsdFByb3ZpZGVyOiAoaW5wdXQ6IGFueSkgPT4gUHJvdmlkZXI8Q3JlZGVudGlhbHM+O1xuICByZWdpb246IHN0cmluZyB8IFByb3ZpZGVyPHN0cmluZz47XG4gIHJlZ2lvbkluZm9Qcm92aWRlcjogUmVnaW9uSW5mb1Byb3ZpZGVyO1xuICBzaWduaW5nTmFtZT86IHN0cmluZztcbiAgc2VydmljZUlkOiBzdHJpbmc7XG4gIHNoYTI1NjogSGFzaENvbnN0cnVjdG9yO1xufVxuZXhwb3J0IGludGVyZmFjZSBBd3NBdXRoUmVzb2x2ZWRDb25maWcge1xuICBjcmVkZW50aWFsczogUHJvdmlkZXI8Q3JlZGVudGlhbHM+O1xuICBzaWduZXI6IFByb3ZpZGVyPFJlcXVlc3RTaWduZXI+O1xuICBzaWduaW5nRXNjYXBlUGF0aDogYm9vbGVhbjtcbiAgc3lzdGVtQ2xvY2tPZmZzZXQ6IG51bWJlcjtcbn1cbmV4cG9ydCBmdW5jdGlvbiByZXNvbHZlQXdzQXV0aENvbmZpZzxUPihpbnB1dDogVCAmIEF3c0F1dGhJbnB1dENvbmZpZyAmIFByZXZpb3VzbHlSZXNvbHZlZCk6IFQgJiBBd3NBdXRoUmVzb2x2ZWRDb25maWcge1xuICBjb25zdCBjcmVkZW50aWFscyA9IGlucHV0LmNyZWRlbnRpYWxzIHx8IGlucHV0LmNyZWRlbnRpYWxEZWZhdWx0UHJvdmlkZXIoaW5wdXQgYXMgYW55KTtcbiAgY29uc3Qgbm9ybWFsaXplZENyZWRzID0gbm9ybWFsaXplUHJvdmlkZXIoY3JlZGVudGlhbHMpO1xuICBjb25zdCB7IHNpZ25pbmdFc2NhcGVQYXRoID0gdHJ1ZSwgc3lzdGVtQ2xvY2tPZmZzZXQgPSBpbnB1dC5zeXN0ZW1DbG9ja09mZnNldCB8fCAwLCBzaGEyNTYgfSA9IGlucHV0O1xuICBsZXQgc2lnbmVyOiBQcm92aWRlcjxSZXF1ZXN0U2lnbmVyPjtcbiAgaWYgKGlucHV0LnNpZ25lcikge1xuICAgIC8vaWYgc2lnbmVyIGlzIHN1cHBsaWVkIGJ5IHVzZXIsIG5vcm1hbGl6ZSBpdCB0byBhIGZ1bmN0aW9uIHJldHVybmluZyBhIHByb21pc2UgZm9yIHNpZ25lci5cbiAgICBzaWduZXIgPSBub3JtYWxpemVQcm92aWRlcihpbnB1dC5zaWduZXIpO1xuICB9IGVsc2Uge1xuICAgIC8vY29uc3RydWN0IGEgcHJvdmlkZXIgaW5mZXJyaW5nIHNpZ25pbmcgZnJvbSByZWdpb24uXG4gICAgc2lnbmVyID0gKCkgPT5cbiAgICAgIG5vcm1hbGl6ZVByb3ZpZGVyKGlucHV0LnJlZ2lvbikoKVxuICAgICAgICAudGhlbihhc3luYyAocmVnaW9uKSA9PiBbKGF3YWl0IGlucHV0LnJlZ2lvbkluZm9Qcm92aWRlcihyZWdpb24pKSB8fCB7fSwgcmVnaW9uXSBhcyBbUmVnaW9uSW5mbywgc3RyaW5nXSlcbiAgICAgICAgLnRoZW4oKFtyZWdpb25JbmZvLCByZWdpb25dKSA9PiB7XG4gICAgICAgICAgY29uc3QgeyBzaWduaW5nUmVnaW9uLCBzaWduaW5nU2VydmljZSB9ID0gcmVnaW9uSW5mbztcbiAgICAgICAgICAvL3VwZGF0ZSBjbGllbnQncyBzaW5naW5nIHJlZ2lvbiBhbmQgc2lnbmluZyBzZXJ2aWNlIGNvbmZpZyBpZiB0aGV5IGFyZSByZXNvbHZlZC5cbiAgICAgICAgICAvL3NpZ25pbmcgcmVnaW9uIHJlc29sdmluZyBvcmRlcjogdXNlciBzdXBwbGllZCBzaWduaW5nUmVnaW9uIC0+IGVuZHBvaW50cy5qc29uIGluZmVycmVkIHJlZ2lvbiAtPiBjbGllbnQgcmVnaW9uXG4gICAgICAgICAgaW5wdXQuc2lnbmluZ1JlZ2lvbiA9IGlucHV0LnNpZ25pbmdSZWdpb24gfHwgc2lnbmluZ1JlZ2lvbiB8fCByZWdpb247XG4gICAgICAgICAgLy9zaWduaW5nIG5hbWUgcmVzb2x2aW5nIG9yZGVyOlxuICAgICAgICAgIC8vdXNlciBzdXBwbGllZCBzaWduaW5nTmFtZSAtPiBlbmRwb2ludHMuanNvbiBpbmZlcnJlZCAoY3JlZGVudGlhbCBzY29wZSAtPiBtb2RlbCBhcm5OYW1lc3BhY2UpIC0+IG1vZGVsIHNlcnZpY2UgaWRcbiAgICAgICAgICBpbnB1dC5zaWduaW5nTmFtZSA9IGlucHV0LnNpZ25pbmdOYW1lIHx8IHNpZ25pbmdTZXJ2aWNlIHx8IGlucHV0LnNlcnZpY2VJZDtcblxuICAgICAgICAgIHJldHVybiBuZXcgU2lnbmF0dXJlVjQoe1xuICAgICAgICAgICAgY3JlZGVudGlhbHM6IG5vcm1hbGl6ZWRDcmVkcyxcbiAgICAgICAgICAgIHJlZ2lvbjogaW5wdXQuc2lnbmluZ1JlZ2lvbixcbiAgICAgICAgICAgIHNlcnZpY2U6IGlucHV0LnNpZ25pbmdOYW1lLFxuICAgICAgICAgICAgc2hhMjU2LFxuICAgICAgICAgICAgdXJpRXNjYXBlUGF0aDogc2lnbmluZ0VzY2FwZVBhdGgsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICB9XG5cbiAgcmV0dXJuIHtcbiAgICAuLi5pbnB1dCxcbiAgICBzeXN0ZW1DbG9ja09mZnNldCxcbiAgICBzaWduaW5nRXNjYXBlUGF0aCxcbiAgICBjcmVkZW50aWFsczogbm9ybWFsaXplZENyZWRzLFxuICAgIHNpZ25lcixcbiAgfTtcbn1cblxuZnVuY3Rpb24gbm9ybWFsaXplUHJvdmlkZXI8VD4oaW5wdXQ6IFQgfCBQcm92aWRlcjxUPik6IFByb3ZpZGVyPFQ+IHtcbiAgaWYgKHR5cGVvZiBpbnB1dCA9PT0gXCJvYmplY3RcIikge1xuICAgIGNvbnN0IHByb21pc2lmaWVkID0gUHJvbWlzZS5yZXNvbHZlKGlucHV0KTtcbiAgICByZXR1cm4gKCkgPT4gcHJvbWlzaWZpZWQ7XG4gIH1cbiAgcmV0dXJuIGlucHV0IGFzIFByb3ZpZGVyPFQ+O1xufVxuIl19 + +/***/ }), + +/***/ 82487: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(85370), exports); +tslib_1.__exportStar(__nccwpck_require__(14834), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkRBQWlDO0FBQ2pDLHVEQUE2QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2NvbmZpZ3VyYXRpb25zXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9taWRkbGV3YXJlXCI7XG4iXX0= + +/***/ }), + +/***/ 14834: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getAwsAuthPlugin = exports.awsAuthMiddlewareOptions = exports.awsAuthMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(67498); +const isClockSkewed = (newServerTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - newServerTime) >= 300000; +const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); +function awsAuthMiddleware(options) { + return (next, context) => async function (args) { + if (!protocol_http_1.HttpRequest.isInstance(args.request)) + return next(args); + const signer = typeof options.signer === "function" ? await options.signer() : options.signer; + const output = await next({ + ...args, + request: await signer.sign(args.request, { + signingDate: new Date(Date.now() + options.systemClockOffset), + signingRegion: context["signing_region"], + signingService: context["signing_service"], + }), + }); + const { headers } = output.response; + const dateHeader = headers && (headers.date || headers.Date); + if (dateHeader) { + const serverTime = Date.parse(dateHeader); + if (isClockSkewed(serverTime, options.systemClockOffset)) { + options.systemClockOffset = serverTime - Date.now(); + } + } + return output; + }; +} +exports.awsAuthMiddleware = awsAuthMiddleware; +exports.awsAuthMiddlewareOptions = { + name: "awsAuthMiddleware", + tags: ["SIGNATURE", "AWSAUTH"], + relation: "after", + toMiddleware: "retryMiddleware", +}; +const getAwsAuthPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(awsAuthMiddleware(options), exports.awsAuthMiddlewareOptions); + }, +}); +exports.getAwsAuthPlugin = getAwsAuthPlugin; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9taWRkbGV3YXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDBEQUFxRDtBQWFyRCxNQUFNLGFBQWEsR0FBRyxDQUFDLGFBQXFCLEVBQUUsaUJBQXlCLEVBQUUsRUFBRSxDQUN6RSxJQUFJLENBQUMsR0FBRyxDQUFDLG9CQUFvQixDQUFDLGlCQUFpQixDQUFDLENBQUMsT0FBTyxFQUFFLEdBQUcsYUFBYSxDQUFDLElBQUksTUFBTSxDQUFDO0FBRXhGLE1BQU0sb0JBQW9CLEdBQUcsQ0FBQyxpQkFBeUIsRUFBRSxFQUFFLENBQUMsSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxHQUFHLGlCQUFpQixDQUFDLENBQUM7QUFFckcsU0FBZ0IsaUJBQWlCLENBQy9CLE9BQThCO0lBRTlCLE9BQU8sQ0FBQyxJQUFvQyxFQUFFLE9BQWdDLEVBQWtDLEVBQUUsQ0FDaEgsS0FBSyxXQUFXLElBQXFDO1FBQ25ELElBQUksQ0FBQywyQkFBVyxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDO1lBQUUsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDN0QsTUFBTSxNQUFNLEdBQUcsT0FBTyxPQUFPLENBQUMsTUFBTSxLQUFLLFVBQVUsQ0FBQyxDQUFDLENBQUMsTUFBTSxPQUFPLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUM7UUFDOUYsTUFBTSxNQUFNLEdBQUcsTUFBTSxJQUFJLENBQUM7WUFDeEIsR0FBRyxJQUFJO1lBQ1AsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFO2dCQUN2QyxXQUFXLEVBQUUsSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxHQUFHLE9BQU8sQ0FBQyxpQkFBaUIsQ0FBQztnQkFDN0QsYUFBYSxFQUFFLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQztnQkFDeEMsY0FBYyxFQUFFLE9BQU8sQ0FBQyxpQkFBaUIsQ0FBQzthQUMzQyxDQUFDO1NBQ0gsQ0FBQyxDQUFDO1FBRUgsTUFBTSxFQUFFLE9BQU8sRUFBRSxHQUFHLE1BQU0sQ0FBQyxRQUFlLENBQUM7UUFDM0MsTUFBTSxVQUFVLEdBQUcsT0FBTyxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDN0QsSUFBSSxVQUFVLEVBQUU7WUFDZCxNQUFNLFVBQVUsR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxDQUFDO1lBQzFDLElBQUksYUFBYSxDQUFDLFVBQVUsRUFBRSxPQUFPLENBQUMsaUJBQWlCLENBQUMsRUFBRTtnQkFDeEQsT0FBTyxDQUFDLGlCQUFpQixHQUFHLFVBQVUsR0FBRyxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUM7YUFDckQ7U0FDRjtRQUVELE9BQU8sTUFBTSxDQUFDO0lBQ2hCLENBQUMsQ0FBQztBQUNOLENBQUM7QUEzQkQsOENBMkJDO0FBRVksUUFBQSx3QkFBd0IsR0FBOEI7SUFDakUsSUFBSSxFQUFFLG1CQUFtQjtJQUN6QixJQUFJLEVBQUUsQ0FBQyxXQUFXLEVBQUUsU0FBUyxDQUFDO0lBQzlCLFFBQVEsRUFBRSxPQUFPO0lBQ2pCLFlBQVksRUFBRSxpQkFBaUI7Q0FDaEMsQ0FBQztBQUVLLE1BQU0sZ0JBQWdCLEdBQUcsQ0FBQyxPQUE4QixFQUF1QixFQUFFLENBQUMsQ0FBQztJQUN4RixZQUFZLEVBQUUsQ0FBQyxXQUFXLEVBQUUsRUFBRTtRQUM1QixXQUFXLENBQUMsYUFBYSxDQUFDLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxFQUFFLGdDQUF3QixDQUFDLENBQUM7SUFDbEYsQ0FBQztDQUNGLENBQUMsQ0FBQztBQUpVLFFBQUEsZ0JBQWdCLG9CQUkxQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEh0dHBSZXF1ZXN0IH0gZnJvbSBcIkBhd3Mtc2RrL3Byb3RvY29sLWh0dHBcIjtcbmltcG9ydCB7XG4gIEZpbmFsaXplSGFuZGxlcixcbiAgRmluYWxpemVIYW5kbGVyQXJndW1lbnRzLFxuICBGaW5hbGl6ZUhhbmRsZXJPdXRwdXQsXG4gIEZpbmFsaXplUmVxdWVzdE1pZGRsZXdhcmUsXG4gIEhhbmRsZXJFeGVjdXRpb25Db250ZXh0LFxuICBQbHVnZ2FibGUsXG4gIFJlbGF0aXZlTWlkZGxld2FyZU9wdGlvbnMsXG59IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5pbXBvcnQgeyBBd3NBdXRoUmVzb2x2ZWRDb25maWcgfSBmcm9tIFwiLi9jb25maWd1cmF0aW9uc1wiO1xuXG5jb25zdCBpc0Nsb2NrU2tld2VkID0gKG5ld1NlcnZlclRpbWU6IG51bWJlciwgc3lzdGVtQ2xvY2tPZmZzZXQ6IG51bWJlcikgPT5cbiAgTWF0aC5hYnMoZ2V0U2tld0NvcnJlY3RlZERhdGUoc3lzdGVtQ2xvY2tPZmZzZXQpLmdldFRpbWUoKSAtIG5ld1NlcnZlclRpbWUpID49IDMwMDAwMDtcblxuY29uc3QgZ2V0U2tld0NvcnJlY3RlZERhdGUgPSAoc3lzdGVtQ2xvY2tPZmZzZXQ6IG51bWJlcikgPT4gbmV3IERhdGUoRGF0ZS5ub3coKSArIHN5c3RlbUNsb2NrT2Zmc2V0KTtcblxuZXhwb3J0IGZ1bmN0aW9uIGF3c0F1dGhNaWRkbGV3YXJlPElucHV0IGV4dGVuZHMgb2JqZWN0LCBPdXRwdXQgZXh0ZW5kcyBvYmplY3Q+KFxuICBvcHRpb25zOiBBd3NBdXRoUmVzb2x2ZWRDb25maWdcbik6IEZpbmFsaXplUmVxdWVzdE1pZGRsZXdhcmU8SW5wdXQsIE91dHB1dD4ge1xuICByZXR1cm4gKG5leHQ6IEZpbmFsaXplSGFuZGxlcjxJbnB1dCwgT3V0cHV0PiwgY29udGV4dDogSGFuZGxlckV4ZWN1dGlvbkNvbnRleHQpOiBGaW5hbGl6ZUhhbmRsZXI8SW5wdXQsIE91dHB1dD4gPT5cbiAgICBhc3luYyBmdW5jdGlvbiAoYXJnczogRmluYWxpemVIYW5kbGVyQXJndW1lbnRzPElucHV0Pik6IFByb21pc2U8RmluYWxpemVIYW5kbGVyT3V0cHV0PE91dHB1dD4+IHtcbiAgICAgIGlmICghSHR0cFJlcXVlc3QuaXNJbnN0YW5jZShhcmdzLnJlcXVlc3QpKSByZXR1cm4gbmV4dChhcmdzKTtcbiAgICAgIGNvbnN0IHNpZ25lciA9IHR5cGVvZiBvcHRpb25zLnNpZ25lciA9PT0gXCJmdW5jdGlvblwiID8gYXdhaXQgb3B0aW9ucy5zaWduZXIoKSA6IG9wdGlvbnMuc2lnbmVyO1xuICAgICAgY29uc3Qgb3V0cHV0ID0gYXdhaXQgbmV4dCh7XG4gICAgICAgIC4uLmFyZ3MsXG4gICAgICAgIHJlcXVlc3Q6IGF3YWl0IHNpZ25lci5zaWduKGFyZ3MucmVxdWVzdCwge1xuICAgICAgICAgIHNpZ25pbmdEYXRlOiBuZXcgRGF0ZShEYXRlLm5vdygpICsgb3B0aW9ucy5zeXN0ZW1DbG9ja09mZnNldCksXG4gICAgICAgICAgc2lnbmluZ1JlZ2lvbjogY29udGV4dFtcInNpZ25pbmdfcmVnaW9uXCJdLFxuICAgICAgICAgIHNpZ25pbmdTZXJ2aWNlOiBjb250ZXh0W1wic2lnbmluZ19zZXJ2aWNlXCJdLFxuICAgICAgICB9KSxcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCB7IGhlYWRlcnMgfSA9IG91dHB1dC5yZXNwb25zZSBhcyBhbnk7XG4gICAgICBjb25zdCBkYXRlSGVhZGVyID0gaGVhZGVycyAmJiAoaGVhZGVycy5kYXRlIHx8IGhlYWRlcnMuRGF0ZSk7XG4gICAgICBpZiAoZGF0ZUhlYWRlcikge1xuICAgICAgICBjb25zdCBzZXJ2ZXJUaW1lID0gRGF0ZS5wYXJzZShkYXRlSGVhZGVyKTtcbiAgICAgICAgaWYgKGlzQ2xvY2tTa2V3ZWQoc2VydmVyVGltZSwgb3B0aW9ucy5zeXN0ZW1DbG9ja09mZnNldCkpIHtcbiAgICAgICAgICBvcHRpb25zLnN5c3RlbUNsb2NrT2Zmc2V0ID0gc2VydmVyVGltZSAtIERhdGUubm93KCk7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dDtcbiAgICB9O1xufVxuXG5leHBvcnQgY29uc3QgYXdzQXV0aE1pZGRsZXdhcmVPcHRpb25zOiBSZWxhdGl2ZU1pZGRsZXdhcmVPcHRpb25zID0ge1xuICBuYW1lOiBcImF3c0F1dGhNaWRkbGV3YXJlXCIsXG4gIHRhZ3M6IFtcIlNJR05BVFVSRVwiLCBcIkFXU0FVVEhcIl0sXG4gIHJlbGF0aW9uOiBcImFmdGVyXCIsXG4gIHRvTWlkZGxld2FyZTogXCJyZXRyeU1pZGRsZXdhcmVcIixcbn07XG5cbmV4cG9ydCBjb25zdCBnZXRBd3NBdXRoUGx1Z2luID0gKG9wdGlvbnM6IEF3c0F1dGhSZXNvbHZlZENvbmZpZyk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGRSZWxhdGl2ZVRvKGF3c0F1dGhNaWRkbGV3YXJlKG9wdGlvbnMpLCBhd3NBdXRoTWlkZGxld2FyZU9wdGlvbnMpO1xuICB9LFxufSk7XG4iXX0= + +/***/ }), + +/***/ 59680: +/***/ ((__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) => { + //@ts-ignore + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + //@ts-ignore + 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; + }; + /** + * Get a final list of middleware in the order of being executed in the resolved handler. + */ + 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) => { + // TODO: Replace it with Array.flat(); + wholeList.push(...expendedMiddlewareList); + return wholeList; + }, []); + return mainChain.map((entry) => entry.middleware); + }; + const stack = { + add: (middleware, options = {}) => { + const { name } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options, + }; + if (name) { + if (entriesNameSet.has(name)) { + throw new Error(`Duplicate middleware name '${name}'`); + } + entriesNameSet.add(name); + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name } = options; + const entry = { + middleware, + ...options, + }; + if (name) { + if (entriesNameSet.has(name)) { + throw new Error(`Duplicated middleware name '${name}'`); + } + 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, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlkZGxld2FyZVN0YWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL01pZGRsZXdhcmVTdGFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFnQk8sTUFBTSxjQUFjLEdBQUcsR0FBZ0YsRUFBRTtJQUM5RyxJQUFJLGVBQWUsR0FBNkMsRUFBRSxDQUFDO0lBQ25FLElBQUksZUFBZSxHQUE2QyxFQUFFLENBQUM7SUFDbkUsTUFBTSxjQUFjLEdBQWdCLElBQUksR0FBRyxFQUFFLENBQUM7SUFFOUMsTUFBTSxJQUFJLEdBQUcsQ0FBbUQsT0FBWSxFQUFPLEVBQUUsQ0FDbkYsT0FBTyxDQUFDLElBQUksQ0FDVixDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxDQUNQLFdBQVcsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsV0FBVyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUM7UUFDekMsZUFBZSxDQUFDLENBQUMsQ0FBQyxRQUFRLElBQUksUUFBUSxDQUFDLEdBQUcsZUFBZSxDQUFDLENBQUMsQ0FBQyxRQUFRLElBQUksUUFBUSxDQUFDLENBQ3BGLENBQUM7SUFFSixNQUFNLFlBQVksR0FBRyxDQUFDLFFBQWdCLEVBQVcsRUFBRTtRQUNqRCxJQUFJLFNBQVMsR0FBRyxLQUFLLENBQUM7UUFDdEIsTUFBTSxRQUFRLEdBQUcsQ0FBQyxLQUFxQyxFQUFXLEVBQUU7WUFDbEUsSUFBSSxLQUFLLENBQUMsSUFBSSxJQUFJLEtBQUssQ0FBQyxJQUFJLEtBQUssUUFBUSxFQUFFO2dCQUN6QyxTQUFTLEdBQUcsSUFBSSxDQUFDO2dCQUNqQixjQUFjLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDO2dCQUNoQyxPQUFPLEtBQUssQ0FBQzthQUNkO1lBQ0QsT0FBTyxJQUFJLENBQUM7UUFDZCxDQUFDLENBQUM7UUFDRixlQUFlLEdBQUcsZUFBZSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQztRQUNuRCxlQUFlLEdBQUcsZUFBZSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQztRQUNuRCxPQUFPLFNBQVMsQ0FBQztJQUNuQixDQUFDLENBQUM7SUFFRixNQUFNLGlCQUFpQixHQUFHLENBQUMsUUFBdUMsRUFBVyxFQUFFO1FBQzdFLElBQUksU0FBUyxHQUFHLEtBQUssQ0FBQztRQUN0QixNQUFNLFFBQVEsR0FBRyxDQUFDLEtBQXFDLEVBQVcsRUFBRTtZQUNsRSxJQUFJLEtBQUssQ0FBQyxVQUFVLEtBQUssUUFBUSxFQUFFO2dCQUNqQyxTQUFTLEdBQUcsSUFBSSxDQUFDO2dCQUNqQixJQUFJLEtBQUssQ0FBQyxJQUFJO29CQUFFLGNBQWMsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDO2dCQUNsRCxPQUFPLEtBQUssQ0FBQzthQUNkO1lBQ0QsT0FBTyxJQUFJLENBQUM7UUFDZCxDQUFDLENBQUM7UUFDRixlQUFlLEdBQUcsZUFBZSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQztRQUNuRCxlQUFlLEdBQUcsZUFBZSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQztRQUNuRCxPQUFPLFNBQVMsQ0FBQztJQUNuQixDQUFDLENBQUM7SUFFRixNQUFNLE9BQU8sR0FBRyxDQUNkLE9BQStDLEVBQ1AsRUFBRTtRQUMxQyxlQUFlLENBQUMsT0FBTyxDQUFDLENBQUMsS0FBSyxFQUFFLEVBQUU7WUFDaEMsWUFBWTtZQUNaLE9BQU8sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLFVBQVUsRUFBRSxFQUFFLEdBQUcsS0FBSyxFQUFFLENBQUMsQ0FBQztRQUM5QyxDQUFDLENBQUMsQ0FBQztRQUNILGVBQWUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxLQUFLLEVBQUUsRUFBRTtZQUNoQyxZQUFZO1lBQ1osT0FBTyxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsVUFBVSxFQUFFLEVBQUUsR0FBRyxLQUFLLEVBQUUsQ0FBQyxDQUFDO1FBQ3hELENBQUMsQ0FBQyxDQUFDO1FBQ0gsT0FBTyxPQUFPLENBQUM7SUFDakIsQ0FBQyxDQUFDO0lBRUYsTUFBTSw0QkFBNEIsR0FBRyxDQUNuQyxJQUErRCxFQUM3QixFQUFFO1FBQ3BDLE1BQU0sc0JBQXNCLEdBQXFDLEVBQUUsQ0FBQztRQUNwRSxJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDLEtBQUssRUFBRSxFQUFFO1lBQzVCLElBQUksS0FBSyxDQUFDLE1BQU0sQ0FBQyxNQUFNLEtBQUssQ0FBQyxJQUFJLEtBQUssQ0FBQyxLQUFLLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtnQkFDekQsc0JBQXNCLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO2FBQ3BDO2lCQUFNO2dCQUNMLHNCQUFzQixDQUFDLElBQUksQ0FBQyxHQUFHLDRCQUE0QixDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7YUFDckU7UUFDSCxDQUFDLENBQUMsQ0FBQztRQUNILHNCQUFzQixDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNsQyxJQUFJLENBQUMsS0FBSyxDQUFDLE9BQU8sRUFBRSxDQUFDLE9BQU8sQ0FBQyxDQUFDLEtBQUssRUFBRSxFQUFFO1lBQ3JDLElBQUksS0FBSyxDQUFDLE1BQU0sQ0FBQyxNQUFNLEtBQUssQ0FBQyxJQUFJLEtBQUssQ0FBQyxLQUFLLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtnQkFDekQsc0JBQXNCLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO2FBQ3BDO2lCQUFNO2dCQUNMLHNCQUFzQixDQUFDLElBQUksQ0FBQyxHQUFHLDRCQUE0QixDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7YUFDckU7UUFDSCxDQUFDLENBQUMsQ0FBQztRQUNILE9BQU8sc0JBQXNCLENBQUM7SUFDaEMsQ0FBQyxDQUFDO0lBRUY7O09BRUc7SUFDSCxNQUFNLGlCQUFpQixHQUFHLEdBQXlDLEVBQUU7UUFDbkUsTUFBTSx5QkFBeUIsR0FBd0UsRUFBRSxDQUFDO1FBQzFHLE1BQU0seUJBQXlCLEdBQXdFLEVBQUUsQ0FBQztRQUMxRyxNQUFNLHdCQUF3QixHQUUxQixFQUFFLENBQUM7UUFFUCxlQUFlLENBQUMsT0FBTyxDQUFDLENBQUMsS0FBSyxFQUFFLEVBQUU7WUFDaEMsTUFBTSxlQUFlLEdBQUc7Z0JBQ3RCLEdBQUcsS0FBSztnQkFDUixNQUFNLEVBQUUsRUFBRTtnQkFDVixLQUFLLEVBQUUsRUFBRTthQUNWLENBQUM7WUFDRixJQUFJLGVBQWUsQ0FBQyxJQUFJO2dCQUFFLHdCQUF3QixDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsR0FBRyxlQUFlLENBQUM7WUFDM0YseUJBQXlCLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxDQUFDO1FBQ2xELENBQUMsQ0FBQyxDQUFDO1FBRUgsZUFBZSxDQUFDLE9BQU8sQ0FBQyxDQUFDLEtBQUssRUFBRSxFQUFFO1lBQ2hDLE1BQU0sZUFBZSxHQUFHO2dCQUN0QixHQUFHLEtBQUs7Z0JBQ1IsTUFBTSxFQUFFLEVBQUU7Z0JBQ1YsS0FBSyxFQUFFLEVBQUU7YUFDVixDQUFDO1lBQ0YsSUFBSSxlQUFlLENBQUMsSUFBSTtnQkFBRSx3QkFBd0IsQ0FBQyxlQUFlLENBQUMsSUFBSSxDQUFDLEdBQUcsZUFBZSxDQUFDO1lBQzNGLHlCQUF5QixDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsQ0FBQztRQUNsRCxDQUFDLENBQUMsQ0FBQztRQUVILHlCQUF5QixDQUFDLE9BQU8sQ0FBQyxDQUFDLEtBQUssRUFBRSxFQUFFO1lBQzFDLElBQUksS0FBSyxDQUFDLFlBQVksRUFBRTtnQkFDdEIsTUFBTSxZQUFZLEdBQUcsd0JBQXdCLENBQUMsS0FBSyxDQUFDLFlBQVksQ0FBQyxDQUFDO2dCQUNsRSxJQUFJLFlBQVksS0FBSyxTQUFTLEVBQUU7b0JBQzlCLE1BQU0sSUFBSSxLQUFLLENBQ2IsR0FBRyxLQUFLLENBQUMsWUFBWSw2QkFBNkIsS0FBSyxDQUFDLElBQUksSUFBSSxXQUFXLGVBQWUsS0FBSyxDQUFDLFFBQVEsSUFDdEcsS0FBSyxDQUFDLFlBQ1IsRUFBRSxDQUNILENBQUM7aUJBQ0g7Z0JBQ0QsSUFBSSxLQUFLLENBQUMsUUFBUSxLQUFLLE9BQU8sRUFBRTtvQkFDOUIsWUFBWSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7aUJBQ2hDO2dCQUNELElBQUksS0FBSyxDQUFDLFFBQVEsS0FBSyxRQUFRLEVBQUU7b0JBQy9CLFlBQVksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO2lCQUNqQzthQUNGO1FBQ0gsQ0FBQyxDQUFDLENBQUM7UUFFSCxNQUFNLFNBQVMsR0FBRyxJQUFJLENBQUMseUJBQXlCLENBQUM7YUFDOUMsR0FBRyxDQUFDLDRCQUE0QixDQUFDO2FBQ2pDLE1BQU0sQ0FBQyxDQUFDLFNBQVMsRUFBRSxzQkFBc0IsRUFBRSxFQUFFO1lBQzVDLHNDQUFzQztZQUN0QyxTQUFTLENBQUMsSUFBSSxDQUFDLEdBQUcsc0JBQXNCLENBQUMsQ0FBQztZQUMxQyxPQUFPLFNBQVMsQ0FBQztRQUNuQixDQUFDLEVBQUUsRUFBc0MsQ0FBQyxDQUFDO1FBQzdDLE9BQU8sU0FBUyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBQ3BELENBQUMsQ0FBQztJQUVGLE1BQU0sS0FBSyxHQUFHO1FBQ1osR0FBRyxFQUFFLENBQUMsVUFBeUMsRUFBRSxVQUE2QyxFQUFFLEVBQUUsRUFBRTtZQUNsRyxNQUFNLEVBQUUsSUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDO1lBQ3pCLE1BQU0sS0FBSyxHQUEyQztnQkFDcEQsSUFBSSxFQUFFLFlBQVk7Z0JBQ2xCLFFBQVEsRUFBRSxRQUFRO2dCQUNsQixVQUFVO2dCQUNWLEdBQUcsT0FBTzthQUNYLENBQUM7WUFDRixJQUFJLElBQUksRUFBRTtnQkFDUixJQUFJLGNBQWMsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLEVBQUU7b0JBQzVCLE1BQU0sSUFBSSxLQUFLLENBQUMsOEJBQThCLElBQUksR0FBRyxDQUFDLENBQUM7aUJBQ3hEO2dCQUNELGNBQWMsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLENBQUM7YUFDMUI7WUFDRCxlQUFlLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQzlCLENBQUM7UUFFRCxhQUFhLEVBQUUsQ0FBQyxVQUF5QyxFQUFFLE9BQTBDLEVBQUUsRUFBRTtZQUN2RyxNQUFNLEVBQUUsSUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDO1lBQ3pCLE1BQU0sS0FBSyxHQUEyQztnQkFDcEQsVUFBVTtnQkFDVixHQUFHLE9BQU87YUFDWCxDQUFDO1lBQ0YsSUFBSSxJQUFJLEVBQUU7Z0JBQ1IsSUFBSSxjQUFjLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxFQUFFO29CQUM1QixNQUFNLElBQUksS0FBSyxDQUFDLCtCQUErQixJQUFJLEdBQUcsQ0FBQyxDQUFDO2lCQUN6RDtnQkFDRCxjQUFjLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFDO2FBQzFCO1lBQ0QsZUFBZSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUM5QixDQUFDO1FBRUQsS0FBSyxFQUFFLEdBQUcsRUFBRSxDQUFDLE9BQU8sQ0FBQyxzQkFBYyxFQUFpQixDQUFDO1FBRXJELEdBQUcsRUFBRSxDQUFDLE1BQWdDLEVBQUUsRUFBRTtZQUN4QyxNQUFNLENBQUMsWUFBWSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQzdCLENBQUM7UUFFRCxNQUFNLEVBQUUsQ0FBQyxRQUFnRCxFQUFXLEVBQUU7WUFDcEUsSUFBSSxPQUFPLFFBQVEsS0FBSyxRQUFRO2dCQUFFLE9BQU8sWUFBWSxDQUFDLFFBQVEsQ0FBQyxDQUFDOztnQkFDM0QsT0FBTyxpQkFBaUIsQ0FBQyxRQUFRLENBQUMsQ0FBQztRQUMxQyxDQUFDO1FBRUQsV0FBVyxFQUFFLENBQUMsUUFBZ0IsRUFBVyxFQUFFO1lBQ3pDLElBQUksU0FBUyxHQUFHLEtBQUssQ0FBQztZQUN0QixNQUFNLFFBQVEsR0FBRyxDQUFDLEtBQXFDLEVBQVcsRUFBRTtnQkFDbEUsTUFBTSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsR0FBRyxLQUFLLENBQUM7Z0JBQzdCLElBQUksSUFBSSxJQUFJLElBQUksQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDLEVBQUU7b0JBQ25DLElBQUksSUFBSTt3QkFBRSxjQUFjLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO29CQUN0QyxTQUFTLEdBQUcsSUFBSSxDQUFDO29CQUNqQixPQUFPLEtBQUssQ0FBQztpQkFDZDtnQkFDRCxPQUFPLElBQUksQ0FBQztZQUNkLENBQUMsQ0FBQztZQUNGLGVBQWUsR0FBRyxlQUFlLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDO1lBQ25ELGVBQWUsR0FBRyxlQUFlLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDO1lBQ25ELE9BQU8sU0FBUyxDQUFDO1FBQ25CLENBQUM7UUFFRCxNQUFNLEVBQUUsQ0FDTixJQUE0QyxFQUNKLEVBQUU7WUFDMUMsTUFBTSxNQUFNLEdBQUcsT0FBTyxDQUFDLHNCQUFjLEVBQXlCLENBQUMsQ0FBQztZQUNoRSxNQUFNLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFDO1lBQ2pCLE9BQU8sTUFBTSxDQUFDO1FBQ2hCLENBQUM7UUFFRCxZQUFZLEVBQUUsT0FBTztRQUVyQixPQUFPLEVBQUUsQ0FDUCxPQUFrRCxFQUNsRCxPQUFnQyxFQUNBLEVBQUU7WUFDbEMsS0FBSyxNQUFNLFVBQVUsSUFBSSxpQkFBaUIsRUFBRSxDQUFDLE9BQU8sRUFBRSxFQUFFO2dCQUN0RCxPQUFPLEdBQUcsVUFBVSxDQUFDLE9BQXFDLEVBQUUsT0FBTyxDQUFRLENBQUM7YUFDN0U7WUFDRCxPQUFPLE9BQXlDLENBQUM7UUFDbkQsQ0FBQztLQUNGLENBQUM7SUFDRixPQUFPLEtBQUssQ0FBQztBQUNmLENBQUMsQ0FBQztBQTFOVyxRQUFBLGNBQWMsa0JBME56QjtBQUVGLE1BQU0sV0FBVyxHQUE4QjtJQUM3QyxVQUFVLEVBQUUsQ0FBQztJQUNiLFNBQVMsRUFBRSxDQUFDO0lBQ1osS0FBSyxFQUFFLENBQUM7SUFDUixlQUFlLEVBQUUsQ0FBQztJQUNsQixXQUFXLEVBQUUsQ0FBQztDQUNmLENBQUM7QUFFRixNQUFNLGVBQWUsR0FBa0M7SUFDckQsSUFBSSxFQUFFLENBQUM7SUFDUCxNQUFNLEVBQUUsQ0FBQztJQUNULEdBQUcsRUFBRSxDQUFDO0NBQ1AsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIEFic29sdXRlTG9jYXRpb24sXG4gIERlc2VyaWFsaXplSGFuZGxlcixcbiAgSGFuZGxlcixcbiAgSGFuZGxlckV4ZWN1dGlvbkNvbnRleHQsXG4gIEhhbmRsZXJPcHRpb25zLFxuICBNaWRkbGV3YXJlU3RhY2ssXG4gIE1pZGRsZXdhcmVUeXBlLFxuICBQbHVnZ2FibGUsXG4gIFByaW9yaXR5LFxuICBSZWxhdGl2ZUxvY2F0aW9uLFxuICBTdGVwLFxufSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuaW1wb3J0IHsgQWJzb2x1dGVNaWRkbGV3YXJlRW50cnksIE1pZGRsZXdhcmVFbnRyeSwgTm9ybWFsaXplZCwgUmVsYXRpdmVNaWRkbGV3YXJlRW50cnkgfSBmcm9tIFwiLi90eXBlc1wiO1xuXG5leHBvcnQgY29uc3QgY29uc3RydWN0U3RhY2sgPSA8SW5wdXQgZXh0ZW5kcyBvYmplY3QsIE91dHB1dCBleHRlbmRzIG9iamVjdD4oKTogTWlkZGxld2FyZVN0YWNrPElucHV0LCBPdXRwdXQ+ID0+IHtcbiAgbGV0IGFic29sdXRlRW50cmllczogQWJzb2x1dGVNaWRkbGV3YXJlRW50cnk8SW5wdXQsIE91dHB1dD5bXSA9IFtdO1xuICBsZXQgcmVsYXRpdmVFbnRyaWVzOiBSZWxhdGl2ZU1pZGRsZXdhcmVFbnRyeTxJbnB1dCwgT3V0cHV0PltdID0gW107XG4gIGNvbnN0IGVudHJpZXNOYW1lU2V0OiBTZXQ8c3RyaW5nPiA9IG5ldyBTZXQoKTtcblxuICBjb25zdCBzb3J0ID0gPFQgZXh0ZW5kcyBBYnNvbHV0ZU1pZGRsZXdhcmVFbnRyeTxJbnB1dCwgT3V0cHV0Pj4oZW50cmllczogVFtdKTogVFtdID0+XG4gICAgZW50cmllcy5zb3J0KFxuICAgICAgKGEsIGIpID0+XG4gICAgICAgIHN0ZXBXZWlnaHRzW2Iuc3RlcF0gLSBzdGVwV2VpZ2h0c1thLnN0ZXBdIHx8XG4gICAgICAgIHByaW9yaXR5V2VpZ2h0c1tiLnByaW9yaXR5IHx8IFwibm9ybWFsXCJdIC0gcHJpb3JpdHlXZWlnaHRzW2EucHJpb3JpdHkgfHwgXCJub3JtYWxcIl1cbiAgICApO1xuXG4gIGNvbnN0IHJlbW92ZUJ5TmFtZSA9ICh0b1JlbW92ZTogc3RyaW5nKTogYm9vbGVhbiA9PiB7XG4gICAgbGV0IGlzUmVtb3ZlZCA9IGZhbHNlO1xuICAgIGNvbnN0IGZpbHRlckNiID0gKGVudHJ5OiBNaWRkbGV3YXJlRW50cnk8SW5wdXQsIE91dHB1dD4pOiBib29sZWFuID0+IHtcbiAgICAgIGlmIChlbnRyeS5uYW1lICYmIGVudHJ5Lm5hbWUgPT09IHRvUmVtb3ZlKSB7XG4gICAgICAgIGlzUmVtb3ZlZCA9IHRydWU7XG4gICAgICAgIGVudHJpZXNOYW1lU2V0LmRlbGV0ZSh0b1JlbW92ZSk7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB0cnVlO1xuICAgIH07XG4gICAgYWJzb2x1dGVFbnRyaWVzID0gYWJzb2x1dGVFbnRyaWVzLmZpbHRlcihmaWx0ZXJDYik7XG4gICAgcmVsYXRpdmVFbnRyaWVzID0gcmVsYXRpdmVFbnRyaWVzLmZpbHRlcihmaWx0ZXJDYik7XG4gICAgcmV0dXJuIGlzUmVtb3ZlZDtcbiAgfTtcblxuICBjb25zdCByZW1vdmVCeVJlZmVyZW5jZSA9ICh0b1JlbW92ZTogTWlkZGxld2FyZVR5cGU8SW5wdXQsIE91dHB1dD4pOiBib29sZWFuID0+IHtcbiAgICBsZXQgaXNSZW1vdmVkID0gZmFsc2U7XG4gICAgY29uc3QgZmlsdGVyQ2IgPSAoZW50cnk6IE1pZGRsZXdhcmVFbnRyeTxJbnB1dCwgT3V0cHV0Pik6IGJvb2xlYW4gPT4ge1xuICAgICAgaWYgKGVudHJ5Lm1pZGRsZXdhcmUgPT09IHRvUmVtb3ZlKSB7XG4gICAgICAgIGlzUmVtb3ZlZCA9IHRydWU7XG4gICAgICAgIGlmIChlbnRyeS5uYW1lKSBlbnRyaWVzTmFtZVNldC5kZWxldGUoZW50cnkubmFtZSk7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB0cnVlO1xuICAgIH07XG4gICAgYWJzb2x1dGVFbnRyaWVzID0gYWJzb2x1dGVFbnRyaWVzLmZpbHRlcihmaWx0ZXJDYik7XG4gICAgcmVsYXRpdmVFbnRyaWVzID0gcmVsYXRpdmVFbnRyaWVzLmZpbHRlcihmaWx0ZXJDYik7XG4gICAgcmV0dXJuIGlzUmVtb3ZlZDtcbiAgfTtcblxuICBjb25zdCBjbG9uZVRvID0gPElucHV0VHlwZSBleHRlbmRzIElucHV0LCBPdXRwdXRUeXBlIGV4dGVuZHMgT3V0cHV0PihcbiAgICB0b1N0YWNrOiBNaWRkbGV3YXJlU3RhY2s8SW5wdXRUeXBlLCBPdXRwdXRUeXBlPlxuICApOiBNaWRkbGV3YXJlU3RhY2s8SW5wdXRUeXBlLCBPdXRwdXRUeXBlPiA9PiB7XG4gICAgYWJzb2x1dGVFbnRyaWVzLmZvckVhY2goKGVudHJ5KSA9PiB7XG4gICAgICAvL0B0cy1pZ25vcmVcbiAgICAgIHRvU3RhY2suYWRkKGVudHJ5Lm1pZGRsZXdhcmUsIHsgLi4uZW50cnkgfSk7XG4gICAgfSk7XG4gICAgcmVsYXRpdmVFbnRyaWVzLmZvckVhY2goKGVudHJ5KSA9PiB7XG4gICAgICAvL0B0cy1pZ25vcmVcbiAgICAgIHRvU3RhY2suYWRkUmVsYXRpdmVUbyhlbnRyeS5taWRkbGV3YXJlLCB7IC4uLmVudHJ5IH0pO1xuICAgIH0pO1xuICAgIHJldHVybiB0b1N0YWNrO1xuICB9O1xuXG4gIGNvbnN0IGV4cGFuZFJlbGF0aXZlTWlkZGxld2FyZUxpc3QgPSAoXG4gICAgZnJvbTogTm9ybWFsaXplZDxNaWRkbGV3YXJlRW50cnk8SW5wdXQsIE91dHB1dD4sIElucHV0LCBPdXRwdXQ+XG4gICk6IE1pZGRsZXdhcmVFbnRyeTxJbnB1dCwgT3V0cHV0PltdID0+IHtcbiAgICBjb25zdCBleHBhbmRlZE1pZGRsZXdhcmVMaXN0OiBNaWRkbGV3YXJlRW50cnk8SW5wdXQsIE91dHB1dD5bXSA9IFtdO1xuICAgIGZyb20uYmVmb3JlLmZvckVhY2goKGVudHJ5KSA9PiB7XG4gICAgICBpZiAoZW50cnkuYmVmb3JlLmxlbmd0aCA9PT0gMCAmJiBlbnRyeS5hZnRlci5sZW5ndGggPT09IDApIHtcbiAgICAgICAgZXhwYW5kZWRNaWRkbGV3YXJlTGlzdC5wdXNoKGVudHJ5KTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGV4cGFuZGVkTWlkZGxld2FyZUxpc3QucHVzaCguLi5leHBhbmRSZWxhdGl2ZU1pZGRsZXdhcmVMaXN0KGVudHJ5KSk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgZXhwYW5kZWRNaWRkbGV3YXJlTGlzdC5wdXNoKGZyb20pO1xuICAgIGZyb20uYWZ0ZXIucmV2ZXJzZSgpLmZvckVhY2goKGVudHJ5KSA9PiB7XG4gICAgICBpZiAoZW50cnkuYmVmb3JlLmxlbmd0aCA9PT0gMCAmJiBlbnRyeS5hZnRlci5sZW5ndGggPT09IDApIHtcbiAgICAgICAgZXhwYW5kZWRNaWRkbGV3YXJlTGlzdC5wdXNoKGVudHJ5KTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGV4cGFuZGVkTWlkZGxld2FyZUxpc3QucHVzaCguLi5leHBhbmRSZWxhdGl2ZU1pZGRsZXdhcmVMaXN0KGVudHJ5KSk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIGV4cGFuZGVkTWlkZGxld2FyZUxpc3Q7XG4gIH07XG5cbiAgLyoqXG4gICAqIEdldCBhIGZpbmFsIGxpc3Qgb2YgbWlkZGxld2FyZSBpbiB0aGUgb3JkZXIgb2YgYmVpbmcgZXhlY3V0ZWQgaW4gdGhlIHJlc29sdmVkIGhhbmRsZXIuXG4gICAqL1xuICBjb25zdCBnZXRNaWRkbGV3YXJlTGlzdCA9ICgpOiBBcnJheTxNaWRkbGV3YXJlVHlwZTxJbnB1dCwgT3V0cHV0Pj4gPT4ge1xuICAgIGNvbnN0IG5vcm1hbGl6ZWRBYnNvbHV0ZUVudHJpZXM6IE5vcm1hbGl6ZWQ8QWJzb2x1dGVNaWRkbGV3YXJlRW50cnk8SW5wdXQsIE91dHB1dD4sIElucHV0LCBPdXRwdXQ+W10gPSBbXTtcbiAgICBjb25zdCBub3JtYWxpemVkUmVsYXRpdmVFbnRyaWVzOiBOb3JtYWxpemVkPFJlbGF0aXZlTWlkZGxld2FyZUVudHJ5PElucHV0LCBPdXRwdXQ+LCBJbnB1dCwgT3V0cHV0PltdID0gW107XG4gICAgY29uc3Qgbm9ybWFsaXplZEVudHJpZXNOYW1lTWFwOiB7XG4gICAgICBbbWlkZGxld2FyZU5hbWU6IHN0cmluZ106IE5vcm1hbGl6ZWQ8TWlkZGxld2FyZUVudHJ5PElucHV0LCBPdXRwdXQ+LCBJbnB1dCwgT3V0cHV0PjtcbiAgICB9ID0ge307XG5cbiAgICBhYnNvbHV0ZUVudHJpZXMuZm9yRWFjaCgoZW50cnkpID0+IHtcbiAgICAgIGNvbnN0IG5vcm1hbGl6ZWRFbnRyeSA9IHtcbiAgICAgICAgLi4uZW50cnksXG4gICAgICAgIGJlZm9yZTogW10sXG4gICAgICAgIGFmdGVyOiBbXSxcbiAgICAgIH07XG4gICAgICBpZiAobm9ybWFsaXplZEVudHJ5Lm5hbWUpIG5vcm1hbGl6ZWRFbnRyaWVzTmFtZU1hcFtub3JtYWxpemVkRW50cnkubmFtZV0gPSBub3JtYWxpemVkRW50cnk7XG4gICAgICBub3JtYWxpemVkQWJzb2x1dGVFbnRyaWVzLnB1c2gobm9ybWFsaXplZEVudHJ5KTtcbiAgICB9KTtcblxuICAgIHJlbGF0aXZlRW50cmllcy5mb3JFYWNoKChlbnRyeSkgPT4ge1xuICAgICAgY29uc3Qgbm9ybWFsaXplZEVudHJ5ID0ge1xuICAgICAgICAuLi5lbnRyeSxcbiAgICAgICAgYmVmb3JlOiBbXSxcbiAgICAgICAgYWZ0ZXI6IFtdLFxuICAgICAgfTtcbiAgICAgIGlmIChub3JtYWxpemVkRW50cnkubmFtZSkgbm9ybWFsaXplZEVudHJpZXNOYW1lTWFwW25vcm1hbGl6ZWRFbnRyeS5uYW1lXSA9IG5vcm1hbGl6ZWRFbnRyeTtcbiAgICAgIG5vcm1hbGl6ZWRSZWxhdGl2ZUVudHJpZXMucHVzaChub3JtYWxpemVkRW50cnkpO1xuICAgIH0pO1xuXG4gICAgbm9ybWFsaXplZFJlbGF0aXZlRW50cmllcy5mb3JFYWNoKChlbnRyeSkgPT4ge1xuICAgICAgaWYgKGVudHJ5LnRvTWlkZGxld2FyZSkge1xuICAgICAgICBjb25zdCB0b01pZGRsZXdhcmUgPSBub3JtYWxpemVkRW50cmllc05hbWVNYXBbZW50cnkudG9NaWRkbGV3YXJlXTtcbiAgICAgICAgaWYgKHRvTWlkZGxld2FyZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgYCR7ZW50cnkudG9NaWRkbGV3YXJlfSBpcyBub3QgZm91bmQgd2hlbiBhZGRpbmcgJHtlbnRyeS5uYW1lIHx8IFwiYW5vbnltb3VzXCJ9IG1pZGRsZXdhcmUgJHtlbnRyeS5yZWxhdGlvbn0gJHtcbiAgICAgICAgICAgICAgZW50cnkudG9NaWRkbGV3YXJlXG4gICAgICAgICAgICB9YFxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGVudHJ5LnJlbGF0aW9uID09PSBcImFmdGVyXCIpIHtcbiAgICAgICAgICB0b01pZGRsZXdhcmUuYWZ0ZXIucHVzaChlbnRyeSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGVudHJ5LnJlbGF0aW9uID09PSBcImJlZm9yZVwiKSB7XG4gICAgICAgICAgdG9NaWRkbGV3YXJlLmJlZm9yZS5wdXNoKGVudHJ5KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0pO1xuXG4gICAgY29uc3QgbWFpbkNoYWluID0gc29ydChub3JtYWxpemVkQWJzb2x1dGVFbnRyaWVzKVxuICAgICAgLm1hcChleHBhbmRSZWxhdGl2ZU1pZGRsZXdhcmVMaXN0KVxuICAgICAgLnJlZHVjZSgod2hvbGVMaXN0LCBleHBlbmRlZE1pZGRsZXdhcmVMaXN0KSA9PiB7XG4gICAgICAgIC8vIFRPRE86IFJlcGxhY2UgaXQgd2l0aCBBcnJheS5mbGF0KCk7XG4gICAgICAgIHdob2xlTGlzdC5wdXNoKC4uLmV4cGVuZGVkTWlkZGxld2FyZUxpc3QpO1xuICAgICAgICByZXR1cm4gd2hvbGVMaXN0O1xuICAgICAgfSwgW10gYXMgTWlkZGxld2FyZUVudHJ5PElucHV0LCBPdXRwdXQ+W10pO1xuICAgIHJldHVybiBtYWluQ2hhaW4ubWFwKChlbnRyeSkgPT4gZW50cnkubWlkZGxld2FyZSk7XG4gIH07XG5cbiAgY29uc3Qgc3RhY2sgPSB7XG4gICAgYWRkOiAobWlkZGxld2FyZTogTWlkZGxld2FyZVR5cGU8SW5wdXQsIE91dHB1dD4sIG9wdGlvbnM6IEhhbmRsZXJPcHRpb25zICYgQWJzb2x1dGVMb2NhdGlvbiA9IHt9KSA9PiB7XG4gICAgICBjb25zdCB7IG5hbWUgfSA9IG9wdGlvbnM7XG4gICAgICBjb25zdCBlbnRyeTogQWJzb2x1dGVNaWRkbGV3YXJlRW50cnk8SW5wdXQsIE91dHB1dD4gPSB7XG4gICAgICAgIHN0ZXA6IFwiaW5pdGlhbGl6ZVwiLFxuICAgICAgICBwcmlvcml0eTogXCJub3JtYWxcIixcbiAgICAgICAgbWlkZGxld2FyZSxcbiAgICAgICAgLi4ub3B0aW9ucyxcbiAgICAgIH07XG4gICAgICBpZiAobmFtZSkge1xuICAgICAgICBpZiAoZW50cmllc05hbWVTZXQuaGFzKG5hbWUpKSB7XG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBEdXBsaWNhdGUgbWlkZGxld2FyZSBuYW1lICcke25hbWV9J2ApO1xuICAgICAgICB9XG4gICAgICAgIGVudHJpZXNOYW1lU2V0LmFkZChuYW1lKTtcbiAgICAgIH1cbiAgICAgIGFic29sdXRlRW50cmllcy5wdXNoKGVudHJ5KTtcbiAgICB9LFxuXG4gICAgYWRkUmVsYXRpdmVUbzogKG1pZGRsZXdhcmU6IE1pZGRsZXdhcmVUeXBlPElucHV0LCBPdXRwdXQ+LCBvcHRpb25zOiBIYW5kbGVyT3B0aW9ucyAmIFJlbGF0aXZlTG9jYXRpb24pID0+IHtcbiAgICAgIGNvbnN0IHsgbmFtZSB9ID0gb3B0aW9ucztcbiAgICAgIGNvbnN0IGVudHJ5OiBSZWxhdGl2ZU1pZGRsZXdhcmVFbnRyeTxJbnB1dCwgT3V0cHV0PiA9IHtcbiAgICAgICAgbWlkZGxld2FyZSxcbiAgICAgICAgLi4ub3B0aW9ucyxcbiAgICAgIH07XG4gICAgICBpZiAobmFtZSkge1xuICAgICAgICBpZiAoZW50cmllc05hbWVTZXQuaGFzKG5hbWUpKSB7XG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBEdXBsaWNhdGVkIG1pZGRsZXdhcmUgbmFtZSAnJHtuYW1lfSdgKTtcbiAgICAgICAgfVxuICAgICAgICBlbnRyaWVzTmFtZVNldC5hZGQobmFtZSk7XG4gICAgICB9XG4gICAgICByZWxhdGl2ZUVudHJpZXMucHVzaChlbnRyeSk7XG4gICAgfSxcblxuICAgIGNsb25lOiAoKSA9PiBjbG9uZVRvKGNvbnN0cnVjdFN0YWNrPElucHV0LCBPdXRwdXQ+KCkpLFxuXG4gICAgdXNlOiAocGx1Z2luOiBQbHVnZ2FibGU8SW5wdXQsIE91dHB1dD4pID0+IHtcbiAgICAgIHBsdWdpbi5hcHBseVRvU3RhY2soc3RhY2spO1xuICAgIH0sXG5cbiAgICByZW1vdmU6ICh0b1JlbW92ZTogTWlkZGxld2FyZVR5cGU8SW5wdXQsIE91dHB1dD4gfCBzdHJpbmcpOiBib29sZWFuID0+IHtcbiAgICAgIGlmICh0eXBlb2YgdG9SZW1vdmUgPT09IFwic3RyaW5nXCIpIHJldHVybiByZW1vdmVCeU5hbWUodG9SZW1vdmUpO1xuICAgICAgZWxzZSByZXR1cm4gcmVtb3ZlQnlSZWZlcmVuY2UodG9SZW1vdmUpO1xuICAgIH0sXG5cbiAgICByZW1vdmVCeVRhZzogKHRvUmVtb3ZlOiBzdHJpbmcpOiBib29sZWFuID0+IHtcbiAgICAgIGxldCBpc1JlbW92ZWQgPSBmYWxzZTtcbiAgICAgIGNvbnN0IGZpbHRlckNiID0gKGVudHJ5OiBNaWRkbGV3YXJlRW50cnk8SW5wdXQsIE91dHB1dD4pOiBib29sZWFuID0+IHtcbiAgICAgICAgY29uc3QgeyB0YWdzLCBuYW1lIH0gPSBlbnRyeTtcbiAgICAgICAgaWYgKHRhZ3MgJiYgdGFncy5pbmNsdWRlcyh0b1JlbW92ZSkpIHtcbiAgICAgICAgICBpZiAobmFtZSkgZW50cmllc05hbWVTZXQuZGVsZXRlKG5hbWUpO1xuICAgICAgICAgIGlzUmVtb3ZlZCA9IHRydWU7XG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfTtcbiAgICAgIGFic29sdXRlRW50cmllcyA9IGFic29sdXRlRW50cmllcy5maWx0ZXIoZmlsdGVyQ2IpO1xuICAgICAgcmVsYXRpdmVFbnRyaWVzID0gcmVsYXRpdmVFbnRyaWVzLmZpbHRlcihmaWx0ZXJDYik7XG4gICAgICByZXR1cm4gaXNSZW1vdmVkO1xuICAgIH0sXG5cbiAgICBjb25jYXQ6IDxJbnB1dFR5cGUgZXh0ZW5kcyBJbnB1dCwgT3V0cHV0VHlwZSBleHRlbmRzIE91dHB1dD4oXG4gICAgICBmcm9tOiBNaWRkbGV3YXJlU3RhY2s8SW5wdXRUeXBlLCBPdXRwdXRUeXBlPlxuICAgICk6IE1pZGRsZXdhcmVTdGFjazxJbnB1dFR5cGUsIE91dHB1dFR5cGU+ID0+IHtcbiAgICAgIGNvbnN0IGNsb25lZCA9IGNsb25lVG8oY29uc3RydWN0U3RhY2s8SW5wdXRUeXBlLCBPdXRwdXRUeXBlPigpKTtcbiAgICAgIGNsb25lZC51c2UoZnJvbSk7XG4gICAgICByZXR1cm4gY2xvbmVkO1xuICAgIH0sXG5cbiAgICBhcHBseVRvU3RhY2s6IGNsb25lVG8sXG5cbiAgICByZXNvbHZlOiA8SW5wdXRUeXBlIGV4dGVuZHMgSW5wdXQsIE91dHB1dFR5cGUgZXh0ZW5kcyBPdXRwdXQ+KFxuICAgICAgaGFuZGxlcjogRGVzZXJpYWxpemVIYW5kbGVyPElucHV0VHlwZSwgT3V0cHV0VHlwZT4sXG4gICAgICBjb250ZXh0OiBIYW5kbGVyRXhlY3V0aW9uQ29udGV4dFxuICAgICk6IEhhbmRsZXI8SW5wdXRUeXBlLCBPdXRwdXRUeXBlPiA9PiB7XG4gICAgICBmb3IgKGNvbnN0IG1pZGRsZXdhcmUgb2YgZ2V0TWlkZGxld2FyZUxpc3QoKS5yZXZlcnNlKCkpIHtcbiAgICAgICAgaGFuZGxlciA9IG1pZGRsZXdhcmUoaGFuZGxlciBhcyBIYW5kbGVyPElucHV0LCBPdXRwdXRUeXBlPiwgY29udGV4dCkgYXMgYW55O1xuICAgICAgfVxuICAgICAgcmV0dXJuIGhhbmRsZXIgYXMgSGFuZGxlcjxJbnB1dFR5cGUsIE91dHB1dFR5cGU+O1xuICAgIH0sXG4gIH07XG4gIHJldHVybiBzdGFjaztcbn07XG5cbmNvbnN0IHN0ZXBXZWlnaHRzOiB7IFtrZXkgaW4gU3RlcF06IG51bWJlciB9ID0ge1xuICBpbml0aWFsaXplOiA1LFxuICBzZXJpYWxpemU6IDQsXG4gIGJ1aWxkOiAzLFxuICBmaW5hbGl6ZVJlcXVlc3Q6IDIsXG4gIGRlc2VyaWFsaXplOiAxLFxufTtcblxuY29uc3QgcHJpb3JpdHlXZWlnaHRzOiB7IFtrZXkgaW4gUHJpb3JpdHldOiBudW1iZXIgfSA9IHtcbiAgaGlnaDogMyxcbiAgbm9ybWFsOiAyLFxuICBsb3c6IDEsXG59O1xuIl19 + +/***/ }), + +/***/ 82928: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(59680), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNERBQWtDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vTWlkZGxld2FyZVN0YWNrXCI7XG4iXX0= + +/***/ }), + +/***/ 6378: +/***/ ((__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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBZ0JBLFNBQWdCLHNCQUFzQixDQUNwQyxLQUFvRDtJQUVwRCxPQUFPO1FBQ0wsR0FBRyxLQUFLO1FBQ1IsZUFBZSxFQUFFLE9BQU8sS0FBSyxDQUFDLGVBQWUsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsZUFBZSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLGVBQWU7S0FDL0csQ0FBQztBQUNKLENBQUM7QUFQRCx3REFPQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFByb3ZpZGVyLCBVc2VyQWdlbnQgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcbmV4cG9ydCBpbnRlcmZhY2UgVXNlckFnZW50SW5wdXRDb25maWcge1xuICAvKipcbiAgICogVGhlIGN1c3RvbSB1c2VyIGFnZW50IGhlYWRlciB0aGF0IHdvdWxkIGJlIGFwcGVuZGVkIHRvIGRlZmF1bHQgb25lXG4gICAqL1xuICBjdXN0b21Vc2VyQWdlbnQ/OiBzdHJpbmcgfCBVc2VyQWdlbnQ7XG59XG5pbnRlcmZhY2UgUHJldmlvdXNseVJlc29sdmVkIHtcbiAgZGVmYXVsdFVzZXJBZ2VudFByb3ZpZGVyOiBQcm92aWRlcjxVc2VyQWdlbnQ+O1xuICBydW50aW1lOiBzdHJpbmc7XG59XG5leHBvcnQgaW50ZXJmYWNlIFVzZXJBZ2VudFJlc29sdmVkQ29uZmlnIHtcbiAgZGVmYXVsdFVzZXJBZ2VudFByb3ZpZGVyOiBQcm92aWRlcjxVc2VyQWdlbnQ+O1xuICBjdXN0b21Vc2VyQWdlbnQ/OiBVc2VyQWdlbnQ7XG4gIHJ1bnRpbWU6IHN0cmluZztcbn1cbmV4cG9ydCBmdW5jdGlvbiByZXNvbHZlVXNlckFnZW50Q29uZmlnPFQ+KFxuICBpbnB1dDogVCAmIFByZXZpb3VzbHlSZXNvbHZlZCAmIFVzZXJBZ2VudElucHV0Q29uZmlnXG4pOiBUICYgVXNlckFnZW50UmVzb2x2ZWRDb25maWcge1xuICByZXR1cm4ge1xuICAgIC4uLmlucHV0LFxuICAgIGN1c3RvbVVzZXJBZ2VudDogdHlwZW9mIGlucHV0LmN1c3RvbVVzZXJBZ2VudCA9PT0gXCJzdHJpbmdcIiA/IFtbaW5wdXQuY3VzdG9tVXNlckFnZW50XV0gOiBpbnB1dC5jdXN0b21Vc2VyQWdlbnQsXG4gIH07XG59XG4iXX0= + +/***/ }), + +/***/ 81584: +/***/ ((__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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLFVBQVUsR0FBRyxZQUFZLENBQUM7QUFFMUIsUUFBQSxnQkFBZ0IsR0FBRyxrQkFBa0IsQ0FBQztBQUV0QyxRQUFBLEtBQUssR0FBRyxHQUFHLENBQUM7QUFFWixRQUFBLGVBQWUsR0FBRyx3Q0FBd0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBVU0VSX0FHRU5UID0gXCJ1c2VyLWFnZW50XCI7XG5cbmV4cG9ydCBjb25zdCBYX0FNWl9VU0VSX0FHRU5UID0gXCJ4LWFtei11c2VyLWFnZW50XCI7XG5cbmV4cG9ydCBjb25zdCBTUEFDRSA9IFwiIFwiO1xuXG5leHBvcnQgY29uc3QgVUFfRVNDQVBFX1JFR0VYID0gL1teXFwhXFwjXFwkXFwlXFwmXFwnXFwqXFwrXFwtXFwuXFxeXFxfXFxgXFx8XFx+XFxkXFx3XS9nO1xuIl19 + +/***/ }), + +/***/ 55976: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(6378), exports); +tslib_1.__exportStar(__nccwpck_require__(8240), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkRBQWlDO0FBQ2pDLGtFQUF3QyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2NvbmZpZ3VyYXRpb25zXCI7XG5leHBvcnQgKiBmcm9tIFwiLi91c2VyLWFnZW50LW1pZGRsZXdhcmVcIjtcbiJdfQ== + +/***/ }), + +/***/ 8240: +/***/ ((__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__(67498); +const constants_1 = __nccwpck_require__(81584); +/** + * Build user agent header sections from: + * 1. runtime-specific default user agent provider; + * 2. custom user agent from `customUserAgent` client config; + * 3. handler execution context set by internal SDK components; + * The built user agent will be set to `x-amz-user-agent` header for ALL the + * runtimes. + * Please note that any override to the `user-agent` or `x-amz-user-agent` header + * in the HTTP request is discouraged. Please use `customUserAgent` client + * config or middleware setting the `userAgent` context to generate desired user + * agent. + */ +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)) || []; + // Set value to AWS-specific user agent header + headers[constants_1.X_AMZ_USER_AGENT] = [...defaultUserAgent, ...userAgent, ...customUserAgent].join(constants_1.SPACE); + // Get value to be sent with non-AWS-specific user agent header. + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent, + ].join(constants_1.SPACE); + if (options.runtime !== "browser" && normalUAValue) { + headers[constants_1.USER_AGENT] = headers[constants_1.USER_AGENT] ? `${headers[constants_1.USER_AGENT]} ${normalUAValue}` : normalUAValue; + } + return next({ + ...args, + request, + }); +}; +exports.userAgentMiddleware = userAgentMiddleware; +/** + * Escape the each pair according to https://tools.ietf.org/html/rfc5234 and join the pair with pattern `name/version`. + * User agent name may include prefix like `md/`, `api/`, `os/` etc., we should not escape the `/` after the prefix. + * @private + */ +const escapeUserAgent = ([name, version]) => { + const prefixSeparatorIndex = name.indexOf("/"); + const prefix = name.substring(0, prefixSeparatorIndex); // If no prefix, prefix is just "" + 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"], +}; +const getUserAgentPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.add(exports.userAgentMiddleware(config), exports.getUserAgentMiddlewareOptions); + }, +}); +exports.getUserAgentPlugin = getUserAgentPlugin; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1hZ2VudC1taWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3VzZXItYWdlbnQtbWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwREFBcUQ7QUFjckQsMkNBQW1GO0FBRW5GOzs7Ozs7Ozs7OztHQVdHO0FBQ0ksTUFBTSxtQkFBbUIsR0FBRyxDQUFDLE9BQWdDLEVBQUUsRUFBRSxDQUFDLENBQ3ZFLElBQTRCLEVBQzVCLE9BQWdDLEVBQ1IsRUFBRSxDQUFDLEtBQUssRUFBRSxJQUFnQyxFQUF1QyxFQUFFOztJQUMzRyxNQUFNLEVBQUUsT0FBTyxFQUFFLEdBQUcsSUFBSSxDQUFDO0lBQ3pCLElBQUksQ0FBQywyQkFBVyxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUM7UUFBRSxPQUFPLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUN4RCxNQUFNLEVBQUUsT0FBTyxFQUFFLEdBQUcsT0FBTyxDQUFDO0lBQzVCLE1BQU0sU0FBUyxHQUFHLE9BQUEsT0FBTyxhQUFQLE9BQU8sdUJBQVAsT0FBTyxDQUFFLFNBQVMsMENBQUUsR0FBRyxDQUFDLGVBQWUsTUFBSyxFQUFFLENBQUM7SUFDakUsTUFBTSxnQkFBZ0IsR0FBRyxDQUFDLE1BQU0sT0FBTyxDQUFDLHdCQUF3QixFQUFFLENBQUMsQ0FBQyxHQUFHLENBQUMsZUFBZSxDQUFDLENBQUM7SUFDekYsTUFBTSxlQUFlLEdBQUcsT0FBQSxPQUFPLGFBQVAsT0FBTyx1QkFBUCxPQUFPLENBQUUsZUFBZSwwQ0FBRSxHQUFHLENBQUMsZUFBZSxNQUFLLEVBQUUsQ0FBQztJQUM3RSw4Q0FBOEM7SUFDOUMsT0FBTyxDQUFDLDRCQUFnQixDQUFDLEdBQUcsQ0FBQyxHQUFHLGdCQUFnQixFQUFFLEdBQUcsU0FBUyxFQUFFLEdBQUcsZUFBZSxDQUFDLENBQUMsSUFBSSxDQUFDLGlCQUFLLENBQUMsQ0FBQztJQUNoRyxnRUFBZ0U7SUFDaEUsTUFBTSxhQUFhLEdBQUc7UUFDcEIsR0FBRyxnQkFBZ0IsQ0FBQyxNQUFNLENBQUMsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsVUFBVSxDQUFDLENBQUM7UUFDdkUsR0FBRyxlQUFlO0tBQ25CLENBQUMsSUFBSSxDQUFDLGlCQUFLLENBQUMsQ0FBQztJQUNkLElBQUksT0FBTyxDQUFDLE9BQU8sS0FBSyxTQUFTLElBQUksYUFBYSxFQUFFO1FBQ2xELE9BQU8sQ0FBQyxzQkFBVSxDQUFDLEdBQUcsT0FBTyxDQUFDLHNCQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxPQUFPLENBQUMsc0JBQVUsQ0FBQyxJQUFJLGFBQWEsRUFBRSxDQUFDLENBQUMsQ0FBQyxhQUFhLENBQUM7S0FDdkc7SUFFRCxPQUFPLElBQUksQ0FBQztRQUNWLEdBQUcsSUFBSTtRQUNQLE9BQU87S0FDUixDQUFDLENBQUM7QUFDTCxDQUFDLENBQUM7QUF6QlcsUUFBQSxtQkFBbUIsdUJBeUI5QjtBQUVGOzs7O0dBSUc7QUFDSCxNQUFNLGVBQWUsR0FBRyxDQUFDLENBQUMsSUFBSSxFQUFFLE9BQU8sQ0FBZ0IsRUFBVSxFQUFFO0lBQ2pFLE1BQU0sb0JBQW9CLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUMvQyxNQUFNLE1BQU0sR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxvQkFBb0IsQ0FBQyxDQUFDLENBQUMsa0NBQWtDO0lBQzFGLElBQUksTUFBTSxHQUFHLElBQUksQ0FBQyxTQUFTLENBQUMsb0JBQW9CLEdBQUcsQ0FBQyxDQUFDLENBQUM7SUFDdEQsSUFBSSxNQUFNLEtBQUssS0FBSyxFQUFFO1FBQ3BCLE1BQU0sR0FBRyxNQUFNLENBQUMsV0FBVyxFQUFFLENBQUM7S0FDL0I7SUFDRCxPQUFPLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxPQUFPLENBQUM7U0FDN0IsTUFBTSxDQUFDLENBQUMsSUFBSSxFQUFFLEVBQUUsQ0FBQyxJQUFJLElBQUksSUFBSSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUM7U0FDekMsR0FBRyxDQUFDLENBQUMsSUFBSSxFQUFFLEVBQUUsQ0FBQyxJQUFJLGFBQUosSUFBSSx1QkFBSixJQUFJLENBQUUsT0FBTyxDQUFDLDJCQUFlLEVBQUUsR0FBRyxDQUFDLENBQUM7U0FDbEQsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ2YsQ0FBQyxDQUFDO0FBRVcsUUFBQSw2QkFBNkIsR0FBMkM7SUFDbkYsSUFBSSxFQUFFLHdCQUF3QjtJQUM5QixJQUFJLEVBQUUsT0FBTztJQUNiLFFBQVEsRUFBRSxLQUFLO0lBQ2YsSUFBSSxFQUFFLENBQUMsZ0JBQWdCLEVBQUUsWUFBWSxDQUFDO0NBQ3ZDLENBQUM7QUFFSyxNQUFNLGtCQUFrQixHQUFHLENBQUMsTUFBK0IsRUFBdUIsRUFBRSxDQUFDLENBQUM7SUFDM0YsWUFBWSxFQUFFLENBQUMsV0FBVyxFQUFFLEVBQUU7UUFDNUIsV0FBVyxDQUFDLEdBQUcsQ0FBQywyQkFBbUIsQ0FBQyxNQUFNLENBQUMsRUFBRSxxQ0FBNkIsQ0FBQyxDQUFDO0lBQzlFLENBQUM7Q0FDRixDQUFDLENBQUM7QUFKVSxRQUFBLGtCQUFrQixzQkFJNUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIdHRwUmVxdWVzdCB9IGZyb20gXCJAYXdzLXNkay9wcm90b2NvbC1odHRwXCI7XG5pbXBvcnQge1xuICBBYnNvbHV0ZUxvY2F0aW9uLFxuICBCdWlsZEhhbmRsZXIsXG4gIEJ1aWxkSGFuZGxlckFyZ3VtZW50cyxcbiAgQnVpbGRIYW5kbGVyT3B0aW9ucyxcbiAgQnVpbGRIYW5kbGVyT3V0cHV0LFxuICBIYW5kbGVyRXhlY3V0aW9uQ29udGV4dCxcbiAgTWV0YWRhdGFCZWFyZXIsXG4gIFBsdWdnYWJsZSxcbiAgVXNlckFnZW50UGFpcixcbn0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmltcG9ydCB7IFVzZXJBZ2VudFJlc29sdmVkQ29uZmlnIH0gZnJvbSBcIi4vY29uZmlndXJhdGlvbnNcIjtcbmltcG9ydCB7IFNQQUNFLCBVQV9FU0NBUEVfUkVHRVgsIFVTRVJfQUdFTlQsIFhfQU1aX1VTRVJfQUdFTlQgfSBmcm9tIFwiLi9jb25zdGFudHNcIjtcblxuLyoqXG4gKiBCdWlsZCB1c2VyIGFnZW50IGhlYWRlciBzZWN0aW9ucyBmcm9tOlxuICogMS4gcnVudGltZS1zcGVjaWZpYyBkZWZhdWx0IHVzZXIgYWdlbnQgcHJvdmlkZXI7XG4gKiAyLiBjdXN0b20gdXNlciBhZ2VudCBmcm9tIGBjdXN0b21Vc2VyQWdlbnRgIGNsaWVudCBjb25maWc7XG4gKiAzLiBoYW5kbGVyIGV4ZWN1dGlvbiBjb250ZXh0IHNldCBieSBpbnRlcm5hbCBTREsgY29tcG9uZW50cztcbiAqIFRoZSBidWlsdCB1c2VyIGFnZW50IHdpbGwgYmUgc2V0IHRvIGB4LWFtei11c2VyLWFnZW50YCBoZWFkZXIgZm9yIEFMTCB0aGVcbiAqIHJ1bnRpbWVzLlxuICogUGxlYXNlIG5vdGUgdGhhdCBhbnkgb3ZlcnJpZGUgdG8gdGhlIGB1c2VyLWFnZW50YCBvciBgeC1hbXotdXNlci1hZ2VudGAgaGVhZGVyXG4gKiBpbiB0aGUgSFRUUCByZXF1ZXN0IGlzIGRpc2NvdXJhZ2VkLiBQbGVhc2UgdXNlIGBjdXN0b21Vc2VyQWdlbnRgIGNsaWVudFxuICogY29uZmlnIG9yIG1pZGRsZXdhcmUgc2V0dGluZyB0aGUgYHVzZXJBZ2VudGAgY29udGV4dCB0byBnZW5lcmF0ZSBkZXNpcmVkIHVzZXJcbiAqIGFnZW50LlxuICovXG5leHBvcnQgY29uc3QgdXNlckFnZW50TWlkZGxld2FyZSA9IChvcHRpb25zOiBVc2VyQWdlbnRSZXNvbHZlZENvbmZpZykgPT4gPE91dHB1dCBleHRlbmRzIE1ldGFkYXRhQmVhcmVyPihcbiAgbmV4dDogQnVpbGRIYW5kbGVyPGFueSwgYW55PixcbiAgY29udGV4dDogSGFuZGxlckV4ZWN1dGlvbkNvbnRleHRcbik6IEJ1aWxkSGFuZGxlcjxhbnksIGFueT4gPT4gYXN5bmMgKGFyZ3M6IEJ1aWxkSGFuZGxlckFyZ3VtZW50czxhbnk+KTogUHJvbWlzZTxCdWlsZEhhbmRsZXJPdXRwdXQ8T3V0cHV0Pj4gPT4ge1xuICBjb25zdCB7IHJlcXVlc3QgfSA9IGFyZ3M7XG4gIGlmICghSHR0cFJlcXVlc3QuaXNJbnN0YW5jZShyZXF1ZXN0KSkgcmV0dXJuIG5leHQoYXJncyk7XG4gIGNvbnN0IHsgaGVhZGVycyB9ID0gcmVxdWVzdDtcbiAgY29uc3QgdXNlckFnZW50ID0gY29udGV4dD8udXNlckFnZW50Py5tYXAoZXNjYXBlVXNlckFnZW50KSB8fCBbXTtcbiAgY29uc3QgZGVmYXVsdFVzZXJBZ2VudCA9IChhd2FpdCBvcHRpb25zLmRlZmF1bHRVc2VyQWdlbnRQcm92aWRlcigpKS5tYXAoZXNjYXBlVXNlckFnZW50KTtcbiAgY29uc3QgY3VzdG9tVXNlckFnZW50ID0gb3B0aW9ucz8uY3VzdG9tVXNlckFnZW50Py5tYXAoZXNjYXBlVXNlckFnZW50KSB8fCBbXTtcbiAgLy8gU2V0IHZhbHVlIHRvIEFXUy1zcGVjaWZpYyB1c2VyIGFnZW50IGhlYWRlclxuICBoZWFkZXJzW1hfQU1aX1VTRVJfQUdFTlRdID0gWy4uLmRlZmF1bHRVc2VyQWdlbnQsIC4uLnVzZXJBZ2VudCwgLi4uY3VzdG9tVXNlckFnZW50XS5qb2luKFNQQUNFKTtcbiAgLy8gR2V0IHZhbHVlIHRvIGJlIHNlbnQgd2l0aCBub24tQVdTLXNwZWNpZmljIHVzZXIgYWdlbnQgaGVhZGVyLlxuICBjb25zdCBub3JtYWxVQVZhbHVlID0gW1xuICAgIC4uLmRlZmF1bHRVc2VyQWdlbnQuZmlsdGVyKChzZWN0aW9uKSA9PiBzZWN0aW9uLnN0YXJ0c1dpdGgoXCJhd3Mtc2RrLVwiKSksXG4gICAgLi4uY3VzdG9tVXNlckFnZW50LFxuICBdLmpvaW4oU1BBQ0UpO1xuICBpZiAob3B0aW9ucy5ydW50aW1lICE9PSBcImJyb3dzZXJcIiAmJiBub3JtYWxVQVZhbHVlKSB7XG4gICAgaGVhZGVyc1tVU0VSX0FHRU5UXSA9IGhlYWRlcnNbVVNFUl9BR0VOVF0gPyBgJHtoZWFkZXJzW1VTRVJfQUdFTlRdfSAke25vcm1hbFVBVmFsdWV9YCA6IG5vcm1hbFVBVmFsdWU7XG4gIH1cblxuICByZXR1cm4gbmV4dCh7XG4gICAgLi4uYXJncyxcbiAgICByZXF1ZXN0LFxuICB9KTtcbn07XG5cbi8qKlxuICogRXNjYXBlIHRoZSBlYWNoIHBhaXIgYWNjb3JkaW5nIHRvIGh0dHBzOi8vdG9vbHMuaWV0Zi5vcmcvaHRtbC9yZmM1MjM0IGFuZCBqb2luIHRoZSBwYWlyIHdpdGggcGF0dGVybiBgbmFtZS92ZXJzaW9uYC5cbiAqIFVzZXIgYWdlbnQgbmFtZSBtYXkgaW5jbHVkZSBwcmVmaXggbGlrZSBgbWQvYCwgYGFwaS9gLCBgb3MvYCBldGMuLCB3ZSBzaG91bGQgbm90IGVzY2FwZSB0aGUgYC9gIGFmdGVyIHRoZSBwcmVmaXguXG4gKiBAcHJpdmF0ZVxuICovXG5jb25zdCBlc2NhcGVVc2VyQWdlbnQgPSAoW25hbWUsIHZlcnNpb25dOiBVc2VyQWdlbnRQYWlyKTogc3RyaW5nID0+IHtcbiAgY29uc3QgcHJlZml4U2VwYXJhdG9ySW5kZXggPSBuYW1lLmluZGV4T2YoXCIvXCIpO1xuICBjb25zdCBwcmVmaXggPSBuYW1lLnN1YnN0cmluZygwLCBwcmVmaXhTZXBhcmF0b3JJbmRleCk7IC8vIElmIG5vIHByZWZpeCwgcHJlZml4IGlzIGp1c3QgXCJcIlxuICBsZXQgdWFOYW1lID0gbmFtZS5zdWJzdHJpbmcocHJlZml4U2VwYXJhdG9ySW5kZXggKyAxKTtcbiAgaWYgKHByZWZpeCA9PT0gXCJhcGlcIikge1xuICAgIHVhTmFtZSA9IHVhTmFtZS50b0xvd2VyQ2FzZSgpO1xuICB9XG4gIHJldHVybiBbcHJlZml4LCB1YU5hbWUsIHZlcnNpb25dXG4gICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbSAmJiBpdGVtLmxlbmd0aCA+IDApXG4gICAgLm1hcCgoaXRlbSkgPT4gaXRlbT8ucmVwbGFjZShVQV9FU0NBUEVfUkVHRVgsIFwiX1wiKSlcbiAgICAuam9pbihcIi9cIik7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0VXNlckFnZW50TWlkZGxld2FyZU9wdGlvbnM6IEJ1aWxkSGFuZGxlck9wdGlvbnMgJiBBYnNvbHV0ZUxvY2F0aW9uID0ge1xuICBuYW1lOiBcImdldFVzZXJBZ2VudE1pZGRsZXdhcmVcIixcbiAgc3RlcDogXCJidWlsZFwiLFxuICBwcmlvcml0eTogXCJsb3dcIixcbiAgdGFnczogW1wiU0VUX1VTRVJfQUdFTlRcIiwgXCJVU0VSX0FHRU5UXCJdLFxufTtcblxuZXhwb3J0IGNvbnN0IGdldFVzZXJBZ2VudFBsdWdpbiA9IChjb25maWc6IFVzZXJBZ2VudFJlc29sdmVkQ29uZmlnKTogUGx1Z2dhYmxlPGFueSwgYW55PiA9PiAoe1xuICBhcHBseVRvU3RhY2s6IChjbGllbnRTdGFjaykgPT4ge1xuICAgIGNsaWVudFN0YWNrLmFkZCh1c2VyQWdlbnRNaWRkbGV3YXJlKGNvbmZpZyksIGdldFVzZXJBZ2VudE1pZGRsZXdhcmVPcHRpb25zKTtcbiAgfSxcbn0pO1xuIl19 + +/***/ }), + +/***/ 33552: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.loadConfig = void 0; +const property_provider_1 = __nccwpck_require__(1014); +const fromEnv_1 = __nccwpck_require__(8302); +const fromSharedConfigFiles_1 = __nccwpck_require__(15945); +const fromStatic_1 = __nccwpck_require__(35254); +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnTG9hZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbmZpZ0xvYWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxrRUFBNEQ7QUFHNUQsdUNBQW1EO0FBQ25ELG1FQUFvRztBQUNwRyw2Q0FBNEQ7QUFxQnJELE1BQU0sVUFBVSxHQUFHLENBQ3hCLEVBQUUsMkJBQTJCLEVBQUUsa0JBQWtCLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBNEIsRUFDcEcsZ0JBQW9DLEVBQUUsRUFDekIsRUFBRSxDQUNmLDJCQUFPLENBQ0wseUJBQUssQ0FDSCxpQkFBTyxDQUFDLDJCQUEyQixDQUFDLEVBQ3BDLDZDQUFxQixDQUFDLGtCQUFrQixFQUFFLGFBQWEsQ0FBQyxFQUN4RCx1QkFBVSxDQUFDLFlBQVksQ0FBQyxDQUN6QixDQUNGLENBQUM7QUFWUyxRQUFBLFVBQVUsY0FVbkIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjaGFpbiwgbWVtb2l6ZSB9IGZyb20gXCJAYXdzLXNkay9wcm9wZXJ0eS1wcm92aWRlclwiO1xuaW1wb3J0IHsgUHJvdmlkZXIgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuaW1wb3J0IHsgZnJvbUVudiwgR2V0dGVyRnJvbUVudiB9IGZyb20gXCIuL2Zyb21FbnZcIjtcbmltcG9ydCB7IGZyb21TaGFyZWRDb25maWdGaWxlcywgR2V0dGVyRnJvbUNvbmZpZywgU2hhcmVkQ29uZmlnSW5pdCB9IGZyb20gXCIuL2Zyb21TaGFyZWRDb25maWdGaWxlc1wiO1xuaW1wb3J0IHsgZnJvbVN0YXRpYywgRnJvbVN0YXRpY0NvbmZpZyB9IGZyb20gXCIuL2Zyb21TdGF0aWNcIjtcblxuZXhwb3J0IHR5cGUgTG9jYWxDb25maWdPcHRpb25zID0gU2hhcmVkQ29uZmlnSW5pdDtcblxuZXhwb3J0IGludGVyZmFjZSBMb2FkZWRDb25maWdTZWxlY3RvcnM8VD4ge1xuICAvKipcbiAgICogQSBnZXR0ZXIgZnVuY3Rpb24gZ2V0dGluZyB0aGUgY29uZmlnIHZhbHVlcyBmcm9tIGFsbCB0aGUgZW52aXJvbm1lbnRcbiAgICogdmFyaWFibGVzLlxuICAgKi9cbiAgZW52aXJvbm1lbnRWYXJpYWJsZVNlbGVjdG9yOiBHZXR0ZXJGcm9tRW52PFQ+O1xuICAvKipcbiAgICogQSBnZXR0ZXIgZnVuY3Rpb24gZ2V0dGluZyBjb25maWcgdmFsdWVzIGFzc29jaWF0ZWQgd2l0aCB0aGUgaW5mZXJyZWRcbiAgICogcHJvZmlsZSBmcm9tIHNoYXJlZCBJTkkgZmlsZXNcbiAgICovXG4gIGNvbmZpZ0ZpbGVTZWxlY3RvcjogR2V0dGVyRnJvbUNvbmZpZzxUPjtcbiAgLyoqXG4gICAqIERlZmF1bHQgdmFsdWUgb3IgZ2V0dGVyXG4gICAqL1xuICBkZWZhdWx0OiBGcm9tU3RhdGljQ29uZmlnPFQ+O1xufVxuXG5leHBvcnQgY29uc3QgbG9hZENvbmZpZyA9IDxUID0gc3RyaW5nPihcbiAgeyBlbnZpcm9ubWVudFZhcmlhYmxlU2VsZWN0b3IsIGNvbmZpZ0ZpbGVTZWxlY3RvciwgZGVmYXVsdDogZGVmYXVsdFZhbHVlIH06IExvYWRlZENvbmZpZ1NlbGVjdG9yczxUPixcbiAgY29uZmlndXJhdGlvbjogTG9jYWxDb25maWdPcHRpb25zID0ge31cbik6IFByb3ZpZGVyPFQ+ID0+XG4gIG1lbW9pemUoXG4gICAgY2hhaW4oXG4gICAgICBmcm9tRW52KGVudmlyb25tZW50VmFyaWFibGVTZWxlY3RvciksXG4gICAgICBmcm9tU2hhcmVkQ29uZmlnRmlsZXMoY29uZmlnRmlsZVNlbGVjdG9yLCBjb25maWd1cmF0aW9uKSxcbiAgICAgIGZyb21TdGF0aWMoZGVmYXVsdFZhbHVlKVxuICAgIClcbiAgKTtcbiJdfQ== + +/***/ }), + +/***/ 8302: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromEnv = void 0; +const property_provider_1 = __nccwpck_require__(1014); +/** + * Get config value given the environment variable name or getter from + * environment variable. + */ +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.ProviderError(e.message || `Cannot load config from environment variables with getter: ${envVarSelector}`); + } +}; +exports.fromEnv = fromEnv; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9mcm9tRW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGtFQUEyRDtBQUszRDs7O0dBR0c7QUFDSSxNQUFNLE9BQU8sR0FBRyxDQUFhLGNBQWdDLEVBQWUsRUFBRSxDQUFDLEtBQUssSUFBSSxFQUFFO0lBQy9GLElBQUk7UUFDRixNQUFNLE1BQU0sR0FBRyxjQUFjLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQzNDLElBQUksTUFBTSxLQUFLLFNBQVMsRUFBRTtZQUN4QixNQUFNLElBQUksS0FBSyxFQUFFLENBQUM7U0FDbkI7UUFDRCxPQUFPLE1BQVcsQ0FBQztLQUNwQjtJQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQ1YsTUFBTSxJQUFJLGlDQUFhLENBQ3JCLENBQUMsQ0FBQyxPQUFPLElBQUksOERBQThELGNBQWMsRUFBRSxDQUM1RixDQUFDO0tBQ0g7QUFDSCxDQUFDLENBQUM7QUFaVyxRQUFBLE9BQU8sV0FZbEIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQcm92aWRlckVycm9yIH0gZnJvbSBcIkBhd3Mtc2RrL3Byb3BlcnR5LXByb3ZpZGVyXCI7XG5pbXBvcnQgeyBQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgdHlwZSBHZXR0ZXJGcm9tRW52PFQ+ID0gKGVudjogTm9kZUpTLlByb2Nlc3NFbnYpID0+IFQgfCB1bmRlZmluZWQ7XG5cbi8qKlxuICogR2V0IGNvbmZpZyB2YWx1ZSBnaXZlbiB0aGUgZW52aXJvbm1lbnQgdmFyaWFibGUgbmFtZSBvciBnZXR0ZXIgZnJvbVxuICogZW52aXJvbm1lbnQgdmFyaWFibGUuXG4gKi9cbmV4cG9ydCBjb25zdCBmcm9tRW52ID0gPFQgPSBzdHJpbmc+KGVudlZhclNlbGVjdG9yOiBHZXR0ZXJGcm9tRW52PFQ+KTogUHJvdmlkZXI8VD4gPT4gYXN5bmMgKCkgPT4ge1xuICB0cnkge1xuICAgIGNvbnN0IGNvbmZpZyA9IGVudlZhclNlbGVjdG9yKHByb2Nlc3MuZW52KTtcbiAgICBpZiAoY29uZmlnID09PSB1bmRlZmluZWQpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcigpO1xuICAgIH1cbiAgICByZXR1cm4gY29uZmlnIGFzIFQ7XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICB0aHJvdyBuZXcgUHJvdmlkZXJFcnJvcihcbiAgICAgIGUubWVzc2FnZSB8fCBgQ2Fubm90IGxvYWQgY29uZmlnIGZyb20gZW52aXJvbm1lbnQgdmFyaWFibGVzIHdpdGggZ2V0dGVyOiAke2VudlZhclNlbGVjdG9yfWBcbiAgICApO1xuICB9XG59O1xuIl19 + +/***/ }), + +/***/ 15945: +/***/ ((__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__(1014); +const shared_ini_file_loader_1 = __nccwpck_require__(4847); +const DEFAULT_PROFILE = "default"; +exports.ENV_PROFILE = "AWS_PROFILE"; +/** + * Get config value from the shared config files with inferred profile name. + */ +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.ProviderError(e.message || `Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}`); + } +}; +exports.fromSharedConfigFiles = fromSharedConfigFiles; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbVNoYXJlZENvbmZpZ0ZpbGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Zyb21TaGFyZWRDb25maWdGaWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxrRUFBMkQ7QUFDM0QsNEVBS3lDO0FBR3pDLE1BQU0sZUFBZSxHQUFHLFNBQVMsQ0FBQztBQUNyQixRQUFBLFdBQVcsR0FBRyxhQUFhLENBQUM7QUF3QnpDOztHQUVHO0FBQ0ksTUFBTSxxQkFBcUIsR0FBRyxDQUNuQyxjQUFtQyxFQUNuQyxFQUFFLGFBQWEsR0FBRyxRQUFRLEVBQUUsR0FBRyxJQUFJLEtBQXVCLEVBQUUsRUFDL0MsRUFBRSxDQUFDLEtBQUssSUFBSSxFQUFFO0lBQzNCLE1BQU0sRUFBRSxZQUFZLEdBQUcsOENBQXFCLENBQUMsSUFBSSxDQUFDLEVBQUUsT0FBTyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsbUJBQVcsQ0FBQyxJQUFJLGVBQWUsRUFBRSxHQUFHLElBQUksQ0FBQztJQUVuSCxNQUFNLEVBQUUsVUFBVSxFQUFFLGVBQWUsRUFBRSxHQUFHLE1BQU0sWUFBWSxDQUFDO0lBRTNELE1BQU0sc0JBQXNCLEdBQUcsZUFBZSxDQUFDLE9BQU8sQ0FBQyxJQUFJLEVBQUUsQ0FBQztJQUM5RCxNQUFNLGlCQUFpQixHQUFHLFVBQVUsQ0FBQyxPQUFPLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDcEQsTUFBTSxhQUFhLEdBQ2pCLGFBQWEsS0FBSyxRQUFRO1FBQ3hCLENBQUMsQ0FBQyxFQUFFLEdBQUcsc0JBQXNCLEVBQUUsR0FBRyxpQkFBaUIsRUFBRTtRQUNyRCxDQUFDLENBQUMsRUFBRSxHQUFHLGlCQUFpQixFQUFFLEdBQUcsc0JBQXNCLEVBQUUsQ0FBQztJQUUxRCxJQUFJO1FBQ0YsTUFBTSxXQUFXLEdBQUcsY0FBYyxDQUFDLGFBQWEsQ0FBQyxDQUFDO1FBQ2xELElBQUksV0FBVyxLQUFLLFNBQVMsRUFBRTtZQUM3QixNQUFNLElBQUksS0FBSyxFQUFFLENBQUM7U0FDbkI7UUFDRCxPQUFPLFdBQVcsQ0FBQztLQUNwQjtJQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQ1YsTUFBTSxJQUFJLGlDQUFhLENBQ3JCLENBQUMsQ0FBQyxPQUFPLElBQUksa0NBQWtDLE9BQU8sNENBQTRDLGNBQWMsRUFBRSxDQUNuSCxDQUFDO0tBQ0g7QUFDSCxDQUFDLENBQUM7QUExQlcsUUFBQSxxQkFBcUIseUJBMEJoQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFByb3ZpZGVyRXJyb3IgfSBmcm9tIFwiQGF3cy1zZGsvcHJvcGVydHktcHJvdmlkZXJcIjtcbmltcG9ydCB7XG4gIGxvYWRTaGFyZWRDb25maWdGaWxlcyxcbiAgUHJvZmlsZSxcbiAgU2hhcmVkQ29uZmlnRmlsZXMsXG4gIFNoYXJlZENvbmZpZ0luaXQgYXMgQmFzZVNoYXJlZENvbmZpZ0luaXQsXG59IGZyb20gXCJAYXdzLXNkay9zaGFyZWQtaW5pLWZpbGUtbG9hZGVyXCI7XG5pbXBvcnQgeyBQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5jb25zdCBERUZBVUxUX1BST0ZJTEUgPSBcImRlZmF1bHRcIjtcbmV4cG9ydCBjb25zdCBFTlZfUFJPRklMRSA9IFwiQVdTX1BST0ZJTEVcIjtcblxuZXhwb3J0IGludGVyZmFjZSBTaGFyZWRDb25maWdJbml0IGV4dGVuZHMgQmFzZVNoYXJlZENvbmZpZ0luaXQge1xuICAvKipcbiAgICogVGhlIGNvbmZpZ3VyYXRpb24gcHJvZmlsZSB0byB1c2UuXG4gICAqL1xuICBwcm9maWxlPzogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBUaGUgcHJlZmVycmVkIHNoYXJlZCBpbmkgZmlsZSB0byBsb2FkIHRoZSBjb25maWcuIFwiY29uZmlnXCIgb3B0aW9uIHJlZmVycyB0b1xuICAgKiB0aGUgc2hhcmVkIGNvbmZpZyBmaWxlKGRlZmF1bHRzIHRvIGB+Ly5hd3MvY29uZmlnYCkuIFwiY3JlZGVudGlhbHNcIiBvcHRpb25cbiAgICogcmVmZXJzIHRvIHRoZSBzaGFyZWQgY3JlZGVudGlhbHMgZmlsZShkZWZhdWx0cyB0byBgfi8uYXdzL2NyZWRlbnRpYWxzYClcbiAgICovXG4gIHByZWZlcnJlZEZpbGU/OiBcImNvbmZpZ1wiIHwgXCJjcmVkZW50aWFsc1wiO1xuXG4gIC8qKlxuICAgKiBBIHByb21pc2UgdGhhdCB3aWxsIGJlIHJlc29sdmVkIHdpdGggbG9hZGVkIGFuZCBwYXJzZWQgY3JlZGVudGlhbHMgZmlsZXMuXG4gICAqIFVzZWQgdG8gYXZvaWQgbG9hZGluZyBzaGFyZWQgY29uZmlnIGZpbGVzIG11bHRpcGxlIHRpbWVzLlxuICAgKi9cbiAgbG9hZGVkQ29uZmlnPzogUHJvbWlzZTxTaGFyZWRDb25maWdGaWxlcz47XG59XG5cbmV4cG9ydCB0eXBlIEdldHRlckZyb21Db25maWc8VD4gPSAocHJvZmlsZTogUHJvZmlsZSkgPT4gVCB8IHVuZGVmaW5lZDtcblxuLyoqXG4gKiBHZXQgY29uZmlnIHZhbHVlIGZyb20gdGhlIHNoYXJlZCBjb25maWcgZmlsZXMgd2l0aCBpbmZlcnJlZCBwcm9maWxlIG5hbWUuXG4gKi9cbmV4cG9ydCBjb25zdCBmcm9tU2hhcmVkQ29uZmlnRmlsZXMgPSA8VCA9IHN0cmluZz4oXG4gIGNvbmZpZ1NlbGVjdG9yOiBHZXR0ZXJGcm9tQ29uZmlnPFQ+LFxuICB7IHByZWZlcnJlZEZpbGUgPSBcImNvbmZpZ1wiLCAuLi5pbml0IH06IFNoYXJlZENvbmZpZ0luaXQgPSB7fVxuKTogUHJvdmlkZXI8VD4gPT4gYXN5bmMgKCkgPT4ge1xuICBjb25zdCB7IGxvYWRlZENvbmZpZyA9IGxvYWRTaGFyZWRDb25maWdGaWxlcyhpbml0KSwgcHJvZmlsZSA9IHByb2Nlc3MuZW52W0VOVl9QUk9GSUxFXSB8fCBERUZBVUxUX1BST0ZJTEUgfSA9IGluaXQ7XG5cbiAgY29uc3QgeyBjb25maWdGaWxlLCBjcmVkZW50aWFsc0ZpbGUgfSA9IGF3YWl0IGxvYWRlZENvbmZpZztcblxuICBjb25zdCBwcm9maWxlRnJvbUNyZWRlbnRpYWxzID0gY3JlZGVudGlhbHNGaWxlW3Byb2ZpbGVdIHx8IHt9O1xuICBjb25zdCBwcm9maWxlRnJvbUNvbmZpZyA9IGNvbmZpZ0ZpbGVbcHJvZmlsZV0gfHwge307XG4gIGNvbnN0IG1lcmdlZFByb2ZpbGUgPVxuICAgIHByZWZlcnJlZEZpbGUgPT09IFwiY29uZmlnXCJcbiAgICAgID8geyAuLi5wcm9maWxlRnJvbUNyZWRlbnRpYWxzLCAuLi5wcm9maWxlRnJvbUNvbmZpZyB9XG4gICAgICA6IHsgLi4ucHJvZmlsZUZyb21Db25maWcsIC4uLnByb2ZpbGVGcm9tQ3JlZGVudGlhbHMgfTtcblxuICB0cnkge1xuICAgIGNvbnN0IGNvbmZpZ1ZhbHVlID0gY29uZmlnU2VsZWN0b3IobWVyZ2VkUHJvZmlsZSk7XG4gICAgaWYgKGNvbmZpZ1ZhbHVlID09PSB1bmRlZmluZWQpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcigpO1xuICAgIH1cbiAgICByZXR1cm4gY29uZmlnVmFsdWU7XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICB0aHJvdyBuZXcgUHJvdmlkZXJFcnJvcihcbiAgICAgIGUubWVzc2FnZSB8fCBgQ2Fubm90IGxvYWQgY29uZmlnIGZvciBwcm9maWxlICR7cHJvZmlsZX0gaW4gU0RLIGNvbmZpZ3VyYXRpb24gZmlsZXMgd2l0aCBnZXR0ZXI6ICR7Y29uZmlnU2VsZWN0b3J9YFxuICAgICk7XG4gIH1cbn07XG4iXX0= + +/***/ }), + +/***/ 35254: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromStatic = void 0; +const property_provider_1 = __nccwpck_require__(1014); +const isFunction = (func) => typeof func === "function"; +const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => defaultValue() : property_provider_1.fromStatic(defaultValue); +exports.fromStatic = fromStatic; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbVN0YXRpYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9mcm9tU3RhdGljLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGtFQUE2RTtBQUs3RSxNQUFNLFVBQVUsR0FBRyxDQUFJLElBQXlCLEVBQXFCLEVBQUUsQ0FBQyxPQUFPLElBQUksS0FBSyxVQUFVLENBQUM7QUFFNUYsTUFBTSxVQUFVLEdBQUcsQ0FBSSxZQUFpQyxFQUFlLEVBQUUsQ0FDOUUsVUFBVSxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLElBQUksRUFBRSxDQUFDLFlBQVksRUFBRSxDQUFDLENBQUMsQ0FBQyw4QkFBaUIsQ0FBQyxZQUFZLENBQUMsQ0FBQztBQUQ3RSxRQUFBLFVBQVUsY0FDbUUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBmcm9tU3RhdGljIGFzIGNvbnZlcnRUb1Byb3ZpZGVyIH0gZnJvbSBcIkBhd3Mtc2RrL3Byb3BlcnR5LXByb3ZpZGVyXCI7XG5pbXBvcnQgeyBQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgdHlwZSBGcm9tU3RhdGljQ29uZmlnPFQ+ID0gVCB8ICgoKSA9PiBUKTtcbnR5cGUgR2V0dGVyPFQ+ID0gKCkgPT4gVDtcbmNvbnN0IGlzRnVuY3Rpb24gPSA8VD4oZnVuYzogRnJvbVN0YXRpY0NvbmZpZzxUPik6IGZ1bmMgaXMgR2V0dGVyPFQ+ID0+IHR5cGVvZiBmdW5jID09PSBcImZ1bmN0aW9uXCI7XG5cbmV4cG9ydCBjb25zdCBmcm9tU3RhdGljID0gPFQ+KGRlZmF1bHRWYWx1ZTogRnJvbVN0YXRpY0NvbmZpZzxUPik6IFByb3ZpZGVyPFQ+ID0+XG4gIGlzRnVuY3Rpb24oZGVmYXVsdFZhbHVlKSA/IGFzeW5jICgpID0+IGRlZmF1bHRWYWx1ZSgpIDogY29udmVydFRvUHJvdmlkZXIoZGVmYXVsdFZhbHVlKTtcbiJdfQ== + +/***/ }), + +/***/ 71124: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(33552), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseURBQStCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vY29uZmlnTG9hZGVyXCI7XG4iXX0= + +/***/ }), + +/***/ 8962: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODEJS_TIMEOUT_ERROR_CODES = void 0; +/** + * Node.js system error codes that indicate timeout. + */ +exports.NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7R0FFRztBQUNVLFFBQUEsMEJBQTBCLEdBQUcsQ0FBQyxZQUFZLEVBQUUsT0FBTyxFQUFFLFdBQVcsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBOb2RlLmpzIHN5c3RlbSBlcnJvciBjb2RlcyB0aGF0IGluZGljYXRlIHRpbWVvdXQuXG4gKi9cbmV4cG9ydCBjb25zdCBOT0RFSlNfVElNRU9VVF9FUlJPUl9DT0RFUyA9IFtcIkVDT05OUkVTRVRcIiwgXCJFUElQRVwiLCBcIkVUSU1FRE9VVFwiXTtcbiJdfQ== + +/***/ }), + +/***/ 2269: +/***/ ((__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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXRyYW5zZm9ybWVkLWhlYWRlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ2V0LXRyYW5zZm9ybWVkLWhlYWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsTUFBTSxxQkFBcUIsR0FBRyxDQUFDLE9BQTRCLEVBQUUsRUFBRTtJQUM3RCxNQUFNLGtCQUFrQixHQUFjLEVBQUUsQ0FBQztJQUV6QyxLQUFLLE1BQU0sSUFBSSxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEVBQUU7UUFDdkMsTUFBTSxZQUFZLEdBQVcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQzNDLGtCQUFrQixDQUFDLElBQUksQ0FBQyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLFlBQVksQ0FBQztLQUNoRztJQUVELE9BQU8sa0JBQWtCLENBQUM7QUFDNUIsQ0FBQyxDQUFDO0FBRU8sc0RBQXFCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSGVhZGVyQmFnIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5pbXBvcnQgeyBJbmNvbWluZ0h0dHBIZWFkZXJzIH0gZnJvbSBcImh0dHAyXCI7XG5cbmNvbnN0IGdldFRyYW5zZm9ybWVkSGVhZGVycyA9IChoZWFkZXJzOiBJbmNvbWluZ0h0dHBIZWFkZXJzKSA9PiB7XG4gIGNvbnN0IHRyYW5zZm9ybWVkSGVhZGVyczogSGVhZGVyQmFnID0ge307XG5cbiAgZm9yIChjb25zdCBuYW1lIG9mIE9iamVjdC5rZXlzKGhlYWRlcnMpKSB7XG4gICAgY29uc3QgaGVhZGVyVmFsdWVzID0gPHN0cmluZz5oZWFkZXJzW25hbWVdO1xuICAgIHRyYW5zZm9ybWVkSGVhZGVyc1tuYW1lXSA9IEFycmF5LmlzQXJyYXkoaGVhZGVyVmFsdWVzKSA/IGhlYWRlclZhbHVlcy5qb2luKFwiLFwiKSA6IGhlYWRlclZhbHVlcztcbiAgfVxuXG4gIHJldHVybiB0cmFuc2Zvcm1lZEhlYWRlcnM7XG59O1xuXG5leHBvcnQgeyBnZXRUcmFuc2Zvcm1lZEhlYWRlcnMgfTtcbiJdfQ== + +/***/ }), + +/***/ 15168: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(24), exports); +tslib_1.__exportStar(__nccwpck_require__(8731), exports); +tslib_1.__exportStar(__nccwpck_require__(61624), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOERBQW9DO0FBQ3BDLCtEQUFxQztBQUNyQyw2REFBbUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9ub2RlLWh0dHAtaGFuZGxlclwiO1xuZXhwb3J0ICogZnJvbSBcIi4vbm9kZS1odHRwMi1oYW5kbGVyXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9zdHJlYW0tY29sbGVjdG9yXCI7XG4iXX0= + +/***/ }), + +/***/ 24: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeHttpHandler = void 0; +const protocol_http_1 = __nccwpck_require__(67498); +const querystring_builder_1 = __nccwpck_require__(71035); +const http_1 = __nccwpck_require__(98605); +const https_1 = __nccwpck_require__(57211); +const constants_1 = __nccwpck_require__(8962); +const get_transformed_headers_1 = __nccwpck_require__(2269); +const set_connection_timeout_1 = __nccwpck_require__(72072); +const set_socket_timeout_1 = __nccwpck_require__(61700); +const write_request_body_1 = __nccwpck_require__(33306); +class NodeHttpHandler { + constructor({ connectionTimeout, socketTimeout, httpAgent, httpsAgent } = {}) { + // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286 + this.metadata = { handlerProtocol: "http/1.1" }; + this.connectionTimeout = connectionTimeout; + this.socketTimeout = socketTimeout; + const keepAlive = true; + this.httpAgent = httpAgent || new http_1.Agent({ keepAlive }); + this.httpsAgent = httpsAgent || new https_1.Agent({ keepAlive }); + } + destroy() { + this.httpAgent.destroy(); + this.httpsAgent.destroy(); + } + handle(request, { abortSignal } = {}) { + return new Promise((resolve, reject) => { + // if the request was already aborted, prevent doing extra work + if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + // determine which http(s) client to use + 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, + }; + // create the http request + 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); + } + }); + // wire-up any timeout logic + set_connection_timeout_1.setConnectionTimeout(req, reject, this.connectionTimeout); + set_socket_timeout_1.setSocketTimeout(req, reject, this.socketTimeout); + // wire-up abort logic + if (abortSignal) { + abortSignal.onabort = () => { + // ensure request is destroyed + req.abort(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + } + write_request_body_1.writeRequestBody(req, request); + }); + } +} +exports.NodeHttpHandler = NodeHttpHandler; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS1odHRwLWhhbmRsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbm9kZS1odHRwLWhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQWdGO0FBQ2hGLHNFQUFnRTtBQUVoRSwrQkFBNEQ7QUFDNUQsaUNBQStFO0FBRS9FLDJDQUF5RDtBQUN6RCx1RUFBa0U7QUFDbEUscUVBQWdFO0FBQ2hFLDZEQUF3RDtBQUN4RCw2REFBd0Q7QUFzQnhELE1BQWEsZUFBZTtJQVExQixZQUFZLEVBQUUsaUJBQWlCLEVBQUUsYUFBYSxFQUFFLFNBQVMsRUFBRSxVQUFVLEtBQTZCLEVBQUU7UUFIcEcscUpBQXFKO1FBQ3JJLGFBQVEsR0FBRyxFQUFFLGVBQWUsRUFBRSxVQUFVLEVBQUUsQ0FBQztRQUd6RCxJQUFJLENBQUMsaUJBQWlCLEdBQUcsaUJBQWlCLENBQUM7UUFDM0MsSUFBSSxDQUFDLGFBQWEsR0FBRyxhQUFhLENBQUM7UUFDbkMsTUFBTSxTQUFTLEdBQUcsSUFBSSxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxTQUFTLEdBQUcsU0FBUyxJQUFJLElBQUksWUFBTSxDQUFDLEVBQUUsU0FBUyxFQUFFLENBQUMsQ0FBQztRQUN4RCxJQUFJLENBQUMsVUFBVSxHQUFHLFVBQVUsSUFBSSxJQUFJLGFBQU8sQ0FBQyxFQUFFLFNBQVMsRUFBRSxDQUFDLENBQUM7SUFDN0QsQ0FBQztJQUVELE9BQU87UUFDTCxJQUFJLENBQUMsU0FBUyxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ3pCLElBQUksQ0FBQyxVQUFVLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDNUIsQ0FBQztJQUVELE1BQU0sQ0FBQyxPQUFvQixFQUFFLEVBQUUsV0FBVyxLQUF5QixFQUFFO1FBQ25FLE9BQU8sSUFBSSxPQUFPLENBQUMsQ0FBQyxPQUFPLEVBQUUsTUFBTSxFQUFFLEVBQUU7WUFDckMsK0RBQStEO1lBQy9ELElBQUksV0FBVyxhQUFYLFdBQVcsdUJBQVgsV0FBVyxDQUFFLE9BQU8sRUFBRTtnQkFDeEIsTUFBTSxVQUFVLEdBQUcsSUFBSSxLQUFLLENBQUMsaUJBQWlCLENBQUMsQ0FBQztnQkFDaEQsVUFBVSxDQUFDLElBQUksR0FBRyxZQUFZLENBQUM7Z0JBQy9CLE1BQU0sQ0FBQyxVQUFVLENBQUMsQ0FBQztnQkFDbkIsT0FBTzthQUNSO1lBRUQsd0NBQXdDO1lBQ3hDLE1BQU0sS0FBSyxHQUFHLE9BQU8sQ0FBQyxRQUFRLEtBQUssUUFBUSxDQUFDO1lBQzVDLE1BQU0sV0FBVyxHQUFHLHNDQUFnQixDQUFDLE9BQU8sQ0FBQyxLQUFLLElBQUksRUFBRSxDQUFDLENBQUM7WUFDMUQsTUFBTSxnQkFBZ0IsR0FBbUI7Z0JBQ3ZDLE9BQU8sRUFBRSxPQUFPLENBQUMsT0FBTztnQkFDeEIsSUFBSSxFQUFFLE9BQU8sQ0FBQyxRQUFRO2dCQUN0QixNQUFNLEVBQUUsT0FBTyxDQUFDLE1BQU07Z0JBQ3RCLElBQUksRUFBRSxXQUFXLENBQUMsQ0FBQyxDQUFDLEdBQUcsT0FBTyxDQUFDLElBQUksSUFBSSxXQUFXLEVBQUUsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLElBQUk7Z0JBQ25FLElBQUksRUFBRSxPQUFPLENBQUMsSUFBSTtnQkFDbEIsS0FBSyxFQUFFLEtBQUssQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLFNBQVM7YUFDaEQsQ0FBQztZQUVGLDBCQUEwQjtZQUMxQixNQUFNLFdBQVcsR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLGVBQVMsQ0FBQyxDQUFDLENBQUMsY0FBUSxDQUFDO1lBQ2pELE1BQU0sR0FBRyxHQUFHLFdBQVcsQ0FBQyxnQkFBZ0IsRUFBRSxDQUFDLEdBQUcsRUFBRSxFQUFFO2dCQUNoRCxNQUFNLFlBQVksR0FBRyxJQUFJLDRCQUFZLENBQUM7b0JBQ3BDLFVBQVUsRUFBRSxHQUFHLENBQUMsVUFBVSxJQUFJLENBQUMsQ0FBQztvQkFDaEMsT0FBTyxFQUFFLCtDQUFxQixDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUM7b0JBQzNDLElBQUksRUFBRSxHQUFHO2lCQUNWLENBQUMsQ0FBQztnQkFDSCxPQUFPLENBQUMsRUFBRSxRQUFRLEVBQUUsWUFBWSxFQUFFLENBQUMsQ0FBQztZQUN0QyxDQUFDLENBQUMsQ0FBQztZQUVILEdBQUcsQ0FBQyxFQUFFLENBQUMsT0FBTyxFQUFFLENBQUMsR0FBVSxFQUFFLEVBQUU7Z0JBQzdCLElBQUksc0NBQTBCLENBQUMsUUFBUSxDQUFFLEdBQVcsQ0FBQyxJQUFJLENBQUMsRUFBRTtvQkFDMUQsTUFBTSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFFLEVBQUUsSUFBSSxFQUFFLGNBQWMsRUFBRSxDQUFDLENBQUMsQ0FBQztpQkFDdEQ7cUJBQU07b0JBQ0wsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDO2lCQUNiO1lBQ0gsQ0FBQyxDQUFDLENBQUM7WUFFSCw0QkFBNEI7WUFDNUIsNkNBQW9CLENBQUMsR0FBRyxFQUFFLE1BQU0sRUFBRSxJQUFJLENBQUMsaUJBQWlCLENBQUMsQ0FBQztZQUMxRCxxQ0FBZ0IsQ0FBQyxHQUFHLEVBQUUsTUFBTSxFQUFFLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQztZQUVsRCxzQkFBc0I7WUFDdEIsSUFBSSxXQUFXLEVBQUU7Z0JBQ2YsV0FBVyxDQUFDLE9BQU8sR0FBRyxHQUFHLEVBQUU7b0JBQ3pCLDhCQUE4QjtvQkFDOUIsR0FBRyxDQUFDLEtBQUssRUFBRSxDQUFDO29CQUNaLE1BQU0sVUFBVSxHQUFHLElBQUksS0FBSyxDQUFDLGlCQUFpQixDQUFDLENBQUM7b0JBQ2hELFVBQVUsQ0FBQyxJQUFJLEdBQUcsWUFBWSxDQUFDO29CQUMvQixNQUFNLENBQUMsVUFBVSxDQUFDLENBQUM7Z0JBQ3JCLENBQUMsQ0FBQzthQUNIO1lBRUQscUNBQWdCLENBQUMsR0FBRyxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQ2pDLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztDQUNGO0FBaEZELDBDQWdGQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEh0dHBIYW5kbGVyLCBIdHRwUmVxdWVzdCwgSHR0cFJlc3BvbnNlIH0gZnJvbSBcIkBhd3Mtc2RrL3Byb3RvY29sLWh0dHBcIjtcbmltcG9ydCB7IGJ1aWxkUXVlcnlTdHJpbmcgfSBmcm9tIFwiQGF3cy1zZGsvcXVlcnlzdHJpbmctYnVpbGRlclwiO1xuaW1wb3J0IHsgSHR0cEhhbmRsZXJPcHRpb25zIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5pbXBvcnQgeyBBZ2VudCBhcyBoQWdlbnQsIHJlcXVlc3QgYXMgaFJlcXVlc3QgfSBmcm9tIFwiaHR0cFwiO1xuaW1wb3J0IHsgQWdlbnQgYXMgaHNBZ2VudCwgcmVxdWVzdCBhcyBoc1JlcXVlc3QsIFJlcXVlc3RPcHRpb25zIH0gZnJvbSBcImh0dHBzXCI7XG5cbmltcG9ydCB7IE5PREVKU19USU1FT1VUX0VSUk9SX0NPREVTIH0gZnJvbSBcIi4vY29uc3RhbnRzXCI7XG5pbXBvcnQgeyBnZXRUcmFuc2Zvcm1lZEhlYWRlcnMgfSBmcm9tIFwiLi9nZXQtdHJhbnNmb3JtZWQtaGVhZGVyc1wiO1xuaW1wb3J0IHsgc2V0Q29ubmVjdGlvblRpbWVvdXQgfSBmcm9tIFwiLi9zZXQtY29ubmVjdGlvbi10aW1lb3V0XCI7XG5pbXBvcnQgeyBzZXRTb2NrZXRUaW1lb3V0IH0gZnJvbSBcIi4vc2V0LXNvY2tldC10aW1lb3V0XCI7XG5pbXBvcnQgeyB3cml0ZVJlcXVlc3RCb2R5IH0gZnJvbSBcIi4vd3JpdGUtcmVxdWVzdC1ib2R5XCI7XG5cbi8qKlxuICogUmVwcmVzZW50cyB0aGUgaHR0cCBvcHRpb25zIHRoYXQgY2FuIGJlIHBhc3NlZCB0byBhIG5vZGUgaHR0cCBjbGllbnQuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgTm9kZUh0dHBIYW5kbGVyT3B0aW9ucyB7XG4gIC8qKlxuICAgKiBUaGUgbWF4aW11bSB0aW1lIGluIG1pbGxpc2Vjb25kcyB0aGF0IHRoZSBjb25uZWN0aW9uIHBoYXNlIG9mIGEgcmVxdWVzdFxuICAgKiBtYXkgdGFrZSBiZWZvcmUgdGhlIGNvbm5lY3Rpb24gYXR0ZW1wdCBpcyBhYmFuZG9uZWQuXG4gICAqL1xuICBjb25uZWN0aW9uVGltZW91dD86IG51bWJlcjtcblxuICAvKipcbiAgICogVGhlIG1heGltdW0gdGltZSBpbiBtaWxsaXNlY29uZHMgdGhhdCBhIHNvY2tldCBtYXkgcmVtYWluIGlkbGUgYmVmb3JlIGl0XG4gICAqIGlzIGNsb3NlZC5cbiAgICovXG4gIHNvY2tldFRpbWVvdXQ/OiBudW1iZXI7XG5cbiAgaHR0cEFnZW50PzogaEFnZW50O1xuICBodHRwc0FnZW50PzogaHNBZ2VudDtcbn1cblxuZXhwb3J0IGNsYXNzIE5vZGVIdHRwSGFuZGxlciBpbXBsZW1lbnRzIEh0dHBIYW5kbGVyIHtcbiAgcHJpdmF0ZSByZWFkb25seSBodHRwQWdlbnQ6IGhBZ2VudDtcbiAgcHJpdmF0ZSByZWFkb25seSBodHRwc0FnZW50OiBoc0FnZW50O1xuICBwcml2YXRlIHJlYWRvbmx5IGNvbm5lY3Rpb25UaW1lb3V0PzogbnVtYmVyO1xuICBwcml2YXRlIHJlYWRvbmx5IHNvY2tldFRpbWVvdXQ/OiBudW1iZXI7XG4gIC8vIE5vZGUgaHR0cCBoYW5kbGVyIGlzIGhhcmQtY29kZWQgdG8gaHR0cC8xLjE6IGh0dHBzOi8vZ2l0aHViLmNvbS9ub2RlanMvbm9kZS9ibG9iL2ZmNTY2NGI4M2I4OWM1NWU0YWI1ZDVmNjAwNjhmYjQ1N2YxZjU4NzIvbGliL19odHRwX3NlcnZlci5qcyNMMjg2XG4gIHB1YmxpYyByZWFkb25seSBtZXRhZGF0YSA9IHsgaGFuZGxlclByb3RvY29sOiBcImh0dHAvMS4xXCIgfTtcblxuICBjb25zdHJ1Y3Rvcih7IGNvbm5lY3Rpb25UaW1lb3V0LCBzb2NrZXRUaW1lb3V0LCBodHRwQWdlbnQsIGh0dHBzQWdlbnQgfTogTm9kZUh0dHBIYW5kbGVyT3B0aW9ucyA9IHt9KSB7XG4gICAgdGhpcy5jb25uZWN0aW9uVGltZW91dCA9IGNvbm5lY3Rpb25UaW1lb3V0O1xuICAgIHRoaXMuc29ja2V0VGltZW91dCA9IHNvY2tldFRpbWVvdXQ7XG4gICAgY29uc3Qga2VlcEFsaXZlID0gdHJ1ZTtcbiAgICB0aGlzLmh0dHBBZ2VudCA9IGh0dHBBZ2VudCB8fCBuZXcgaEFnZW50KHsga2VlcEFsaXZlIH0pO1xuICAgIHRoaXMuaHR0cHNBZ2VudCA9IGh0dHBzQWdlbnQgfHwgbmV3IGhzQWdlbnQoeyBrZWVwQWxpdmUgfSk7XG4gIH1cblxuICBkZXN0cm95KCk6IHZvaWQge1xuICAgIHRoaXMuaHR0cEFnZW50LmRlc3Ryb3koKTtcbiAgICB0aGlzLmh0dHBzQWdlbnQuZGVzdHJveSgpO1xuICB9XG5cbiAgaGFuZGxlKHJlcXVlc3Q6IEh0dHBSZXF1ZXN0LCB7IGFib3J0U2lnbmFsIH06IEh0dHBIYW5kbGVyT3B0aW9ucyA9IHt9KTogUHJvbWlzZTx7IHJlc3BvbnNlOiBIdHRwUmVzcG9uc2UgfT4ge1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAvLyBpZiB0aGUgcmVxdWVzdCB3YXMgYWxyZWFkeSBhYm9ydGVkLCBwcmV2ZW50IGRvaW5nIGV4dHJhIHdvcmtcbiAgICAgIGlmIChhYm9ydFNpZ25hbD8uYWJvcnRlZCkge1xuICAgICAgICBjb25zdCBhYm9ydEVycm9yID0gbmV3IEVycm9yKFwiUmVxdWVzdCBhYm9ydGVkXCIpO1xuICAgICAgICBhYm9ydEVycm9yLm5hbWUgPSBcIkFib3J0RXJyb3JcIjtcbiAgICAgICAgcmVqZWN0KGFib3J0RXJyb3IpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIC8vIGRldGVybWluZSB3aGljaCBodHRwKHMpIGNsaWVudCB0byB1c2VcbiAgICAgIGNvbnN0IGlzU1NMID0gcmVxdWVzdC5wcm90b2NvbCA9PT0gXCJodHRwczpcIjtcbiAgICAgIGNvbnN0IHF1ZXJ5U3RyaW5nID0gYnVpbGRRdWVyeVN0cmluZyhyZXF1ZXN0LnF1ZXJ5IHx8IHt9KTtcbiAgICAgIGNvbnN0IG5vZGVIdHRwc09wdGlvbnM6IFJlcXVlc3RPcHRpb25zID0ge1xuICAgICAgICBoZWFkZXJzOiByZXF1ZXN0LmhlYWRlcnMsXG4gICAgICAgIGhvc3Q6IHJlcXVlc3QuaG9zdG5hbWUsXG4gICAgICAgIG1ldGhvZDogcmVxdWVzdC5tZXRob2QsXG4gICAgICAgIHBhdGg6IHF1ZXJ5U3RyaW5nID8gYCR7cmVxdWVzdC5wYXRofT8ke3F1ZXJ5U3RyaW5nfWAgOiByZXF1ZXN0LnBhdGgsXG4gICAgICAgIHBvcnQ6IHJlcXVlc3QucG9ydCxcbiAgICAgICAgYWdlbnQ6IGlzU1NMID8gdGhpcy5odHRwc0FnZW50IDogdGhpcy5odHRwQWdlbnQsXG4gICAgICB9O1xuXG4gICAgICAvLyBjcmVhdGUgdGhlIGh0dHAgcmVxdWVzdFxuICAgICAgY29uc3QgcmVxdWVzdEZ1bmMgPSBpc1NTTCA/IGhzUmVxdWVzdCA6IGhSZXF1ZXN0O1xuICAgICAgY29uc3QgcmVxID0gcmVxdWVzdEZ1bmMobm9kZUh0dHBzT3B0aW9ucywgKHJlcykgPT4ge1xuICAgICAgICBjb25zdCBodHRwUmVzcG9uc2UgPSBuZXcgSHR0cFJlc3BvbnNlKHtcbiAgICAgICAgICBzdGF0dXNDb2RlOiByZXMuc3RhdHVzQ29kZSB8fCAtMSxcbiAgICAgICAgICBoZWFkZXJzOiBnZXRUcmFuc2Zvcm1lZEhlYWRlcnMocmVzLmhlYWRlcnMpLFxuICAgICAgICAgIGJvZHk6IHJlcyxcbiAgICAgICAgfSk7XG4gICAgICAgIHJlc29sdmUoeyByZXNwb25zZTogaHR0cFJlc3BvbnNlIH0pO1xuICAgICAgfSk7XG5cbiAgICAgIHJlcS5vbihcImVycm9yXCIsIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgIGlmIChOT0RFSlNfVElNRU9VVF9FUlJPUl9DT0RFUy5pbmNsdWRlcygoZXJyIGFzIGFueSkuY29kZSkpIHtcbiAgICAgICAgICByZWplY3QoT2JqZWN0LmFzc2lnbihlcnIsIHsgbmFtZTogXCJUaW1lb3V0RXJyb3JcIiB9KSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICAvLyB3aXJlLXVwIGFueSB0aW1lb3V0IGxvZ2ljXG4gICAgICBzZXRDb25uZWN0aW9uVGltZW91dChyZXEsIHJlamVjdCwgdGhpcy5jb25uZWN0aW9uVGltZW91dCk7XG4gICAgICBzZXRTb2NrZXRUaW1lb3V0KHJlcSwgcmVqZWN0LCB0aGlzLnNvY2tldFRpbWVvdXQpO1xuXG4gICAgICAvLyB3aXJlLXVwIGFib3J0IGxvZ2ljXG4gICAgICBpZiAoYWJvcnRTaWduYWwpIHtcbiAgICAgICAgYWJvcnRTaWduYWwub25hYm9ydCA9ICgpID0+IHtcbiAgICAgICAgICAvLyBlbnN1cmUgcmVxdWVzdCBpcyBkZXN0cm95ZWRcbiAgICAgICAgICByZXEuYWJvcnQoKTtcbiAgICAgICAgICBjb25zdCBhYm9ydEVycm9yID0gbmV3IEVycm9yKFwiUmVxdWVzdCBhYm9ydGVkXCIpO1xuICAgICAgICAgIGFib3J0RXJyb3IubmFtZSA9IFwiQWJvcnRFcnJvclwiO1xuICAgICAgICAgIHJlamVjdChhYm9ydEVycm9yKTtcbiAgICAgICAgfTtcbiAgICAgIH1cblxuICAgICAgd3JpdGVSZXF1ZXN0Qm9keShyZXEsIHJlcXVlc3QpO1xuICAgIH0pO1xuICB9XG59XG4iXX0= + +/***/ }), + +/***/ 8731: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeHttp2Handler = void 0; +const protocol_http_1 = __nccwpck_require__(67498); +const querystring_builder_1 = __nccwpck_require__(71035); +const http2_1 = __nccwpck_require__(97565); +const get_transformed_headers_1 = __nccwpck_require__(2269); +const write_request_body_1 = __nccwpck_require__(33306); +class NodeHttp2Handler { + constructor({ requestTimeout, sessionTimeout } = {}) { + this.metadata = { handlerProtocol: "h2" }; + this.requestTimeout = requestTimeout; + this.sessionTimeout = sessionTimeout; + this.connectionPool = new Map(); + } + destroy() { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + for (const [_, http2Session] of this.connectionPool) { + http2Session.destroy(); + } + this.connectionPool.clear(); + } + handle(request, { abortSignal } = {}) { + return new Promise((resolve, reject) => { + // if the request was already aborted, prevent doing extra work + if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, path, query } = request; + const queryString = querystring_builder_1.buildQueryString(query || {}); + // create the http2 request + const req = this.getSession(`${protocol}//${hostname}${port ? `:${port}` : ""}`).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, + }); + resolve({ response: httpResponse }); + }); + req.on("error", reject); + req.on("frameError", reject); + req.on("aborted", reject); + 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); + }; + } + write_request_body_1.writeRequestBody(req, request); + }); + } + getSession(authority) { + const connectionPool = this.connectionPool; + const existingSession = connectionPool.get(authority); + if (existingSession) + return existingSession; + const newSession = http2_1.connect(authority); + connectionPool.set(authority, newSession); + const sessionTimeout = this.sessionTimeout; + if (sessionTimeout) { + newSession.setTimeout(sessionTimeout, () => { + newSession.close(); + connectionPool.delete(authority); + }); + } + return newSession; + } +} +exports.NodeHttp2Handler = NodeHttp2Handler; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS1odHRwMi1oYW5kbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL25vZGUtaHR0cDItaGFuZGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwREFBZ0Y7QUFDaEYsc0VBQWdFO0FBRWhFLGlDQUErRDtBQUUvRCx1RUFBa0U7QUFDbEUsNkRBQXdEO0FBb0J4RCxNQUFhLGdCQUFnQjtJQU0zQixZQUFZLEVBQUUsY0FBYyxFQUFFLGNBQWMsS0FBOEIsRUFBRTtRQUY1RCxhQUFRLEdBQUcsRUFBRSxlQUFlLEVBQUUsSUFBSSxFQUFFLENBQUM7UUFHbkQsSUFBSSxDQUFDLGNBQWMsR0FBRyxjQUFjLENBQUM7UUFDckMsSUFBSSxDQUFDLGNBQWMsR0FBRyxjQUFjLENBQUM7UUFDckMsSUFBSSxDQUFDLGNBQWMsR0FBRyxJQUFJLEdBQUcsRUFBOEIsQ0FBQztJQUM5RCxDQUFDO0lBRUQsT0FBTztRQUNMLDZEQUE2RDtRQUM3RCxLQUFLLE1BQU0sQ0FBQyxDQUFDLEVBQUUsWUFBWSxDQUFDLElBQUksSUFBSSxDQUFDLGNBQWMsRUFBRTtZQUNuRCxZQUFZLENBQUMsT0FBTyxFQUFFLENBQUM7U0FDeEI7UUFDRCxJQUFJLENBQUMsY0FBYyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQzlCLENBQUM7SUFFRCxNQUFNLENBQUMsT0FBb0IsRUFBRSxFQUFFLFdBQVcsS0FBeUIsRUFBRTtRQUNuRSxPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUFFO1lBQ3JDLCtEQUErRDtZQUMvRCxJQUFJLFdBQVcsYUFBWCxXQUFXLHVCQUFYLFdBQVcsQ0FBRSxPQUFPLEVBQUU7Z0JBQ3hCLE1BQU0sVUFBVSxHQUFHLElBQUksS0FBSyxDQUFDLGlCQUFpQixDQUFDLENBQUM7Z0JBQ2hELFVBQVUsQ0FBQyxJQUFJLEdBQUcsWUFBWSxDQUFDO2dCQUMvQixNQUFNLENBQUMsVUFBVSxDQUFDLENBQUM7Z0JBQ25CLE9BQU87YUFDUjtZQUVELE1BQU0sRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLElBQUksRUFBRSxRQUFRLEVBQUUsSUFBSSxFQUFFLEtBQUssRUFBRSxHQUFHLE9BQU8sQ0FBQztZQUNsRSxNQUFNLFdBQVcsR0FBRyxzQ0FBZ0IsQ0FBQyxLQUFLLElBQUksRUFBRSxDQUFDLENBQUM7WUFFbEQsMkJBQTJCO1lBQzNCLE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxVQUFVLENBQUMsR0FBRyxRQUFRLEtBQUssUUFBUSxHQUFHLElBQUksQ0FBQyxDQUFDLENBQUMsSUFBSSxJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxPQUFPLENBQUM7Z0JBQ3ZGLEdBQUcsT0FBTyxDQUFDLE9BQU87Z0JBQ2xCLENBQUMsaUJBQVMsQ0FBQyxpQkFBaUIsQ0FBQyxFQUFFLFdBQVcsQ0FBQyxDQUFDLENBQUMsR0FBRyxJQUFJLElBQUksV0FBVyxFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUk7Z0JBQzVFLENBQUMsaUJBQVMsQ0FBQyxtQkFBbUIsQ0FBQyxFQUFFLE1BQU07YUFDeEMsQ0FBQyxDQUFDO1lBRUgsR0FBRyxDQUFDLEVBQUUsQ0FBQyxVQUFVLEVBQUUsQ0FBQyxPQUFPLEVBQUUsRUFBRTtnQkFDN0IsTUFBTSxZQUFZLEdBQUcsSUFBSSw0QkFBWSxDQUFDO29CQUNwQyxVQUFVLEVBQUUsT0FBTyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsQ0FBQztvQkFDcEMsT0FBTyxFQUFFLCtDQUFxQixDQUFDLE9BQU8sQ0FBQztvQkFDdkMsSUFBSSxFQUFFLEdBQUc7aUJBQ1YsQ0FBQyxDQUFDO2dCQUNILE9BQU8sQ0FBQyxFQUFFLFFBQVEsRUFBRSxZQUFZLEVBQUUsQ0FBQyxDQUFDO1lBQ3RDLENBQUMsQ0FBQyxDQUFDO1lBRUgsR0FBRyxDQUFDLEVBQUUsQ0FBQyxPQUFPLEVBQUUsTUFBTSxDQUFDLENBQUM7WUFDeEIsR0FBRyxDQUFDLEVBQUUsQ0FBQyxZQUFZLEVBQUUsTUFBTSxDQUFDLENBQUM7WUFDN0IsR0FBRyxDQUFDLEVBQUUsQ0FBQyxTQUFTLEVBQUUsTUFBTSxDQUFDLENBQUM7WUFFMUIsTUFBTSxjQUFjLEdBQUcsSUFBSSxDQUFDLGNBQWMsQ0FBQztZQUMzQyxJQUFJLGNBQWMsRUFBRTtnQkFDbEIsR0FBRyxDQUFDLFVBQVUsQ0FBQyxjQUFjLEVBQUUsR0FBRyxFQUFFO29CQUNsQyxHQUFHLENBQUMsS0FBSyxFQUFFLENBQUM7b0JBQ1osTUFBTSxZQUFZLEdBQUcsSUFBSSxLQUFLLENBQUMsK0NBQStDLGNBQWMsS0FBSyxDQUFDLENBQUM7b0JBQ25HLFlBQVksQ0FBQyxJQUFJLEdBQUcsY0FBYyxDQUFDO29CQUNuQyxNQUFNLENBQUMsWUFBWSxDQUFDLENBQUM7Z0JBQ3ZCLENBQUMsQ0FBQyxDQUFDO2FBQ0o7WUFFRCxJQUFJLFdBQVcsRUFBRTtnQkFDZixXQUFXLENBQUMsT0FBTyxHQUFHLEdBQUcsRUFBRTtvQkFDekIsR0FBRyxDQUFDLEtBQUssRUFBRSxDQUFDO29CQUNaLE1BQU0sVUFBVSxHQUFHLElBQUksS0FBSyxDQUFDLGlCQUFpQixDQUFDLENBQUM7b0JBQ2hELFVBQVUsQ0FBQyxJQUFJLEdBQUcsWUFBWSxDQUFDO29CQUMvQixNQUFNLENBQUMsVUFBVSxDQUFDLENBQUM7Z0JBQ3JCLENBQUMsQ0FBQzthQUNIO1lBRUQscUNBQWdCLENBQUMsR0FBRyxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQ2pDLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztJQUVPLFVBQVUsQ0FBQyxTQUFpQjtRQUNsQyxNQUFNLGNBQWMsR0FBRyxJQUFJLENBQUMsY0FBYyxDQUFDO1FBQzNDLE1BQU0sZUFBZSxHQUFHLGNBQWMsQ0FBQyxHQUFHLENBQUMsU0FBUyxDQUFDLENBQUM7UUFDdEQsSUFBSSxlQUFlO1lBQUUsT0FBTyxlQUFlLENBQUM7UUFFNUMsTUFBTSxVQUFVLEdBQUcsZUFBTyxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQ3RDLGNBQWMsQ0FBQyxHQUFHLENBQUMsU0FBUyxFQUFFLFVBQVUsQ0FBQyxDQUFDO1FBRTFDLE1BQU0sY0FBYyxHQUFHLElBQUksQ0FBQyxjQUFjLENBQUM7UUFDM0MsSUFBSSxjQUFjLEVBQUU7WUFDbEIsVUFBVSxDQUFDLFVBQVUsQ0FBQyxjQUFjLEVBQUUsR0FBRyxFQUFFO2dCQUN6QyxVQUFVLENBQUMsS0FBSyxFQUFFLENBQUM7Z0JBQ25CLGNBQWMsQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLENBQUM7WUFDbkMsQ0FBQyxDQUFDLENBQUM7U0FDSjtRQUNELE9BQU8sVUFBVSxDQUFDO0lBQ3BCLENBQUM7Q0FDRjtBQTdGRCw0Q0E2RkMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIdHRwSGFuZGxlciwgSHR0cFJlcXVlc3QsIEh0dHBSZXNwb25zZSB9IGZyb20gXCJAYXdzLXNkay9wcm90b2NvbC1odHRwXCI7XG5pbXBvcnQgeyBidWlsZFF1ZXJ5U3RyaW5nIH0gZnJvbSBcIkBhd3Mtc2RrL3F1ZXJ5c3RyaW5nLWJ1aWxkZXJcIjtcbmltcG9ydCB7IEh0dHBIYW5kbGVyT3B0aW9ucyB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgQ2xpZW50SHR0cDJTZXNzaW9uLCBjb25uZWN0LCBjb25zdGFudHMgfSBmcm9tIFwiaHR0cDJcIjtcblxuaW1wb3J0IHsgZ2V0VHJhbnNmb3JtZWRIZWFkZXJzIH0gZnJvbSBcIi4vZ2V0LXRyYW5zZm9ybWVkLWhlYWRlcnNcIjtcbmltcG9ydCB7IHdyaXRlUmVxdWVzdEJvZHkgfSBmcm9tIFwiLi93cml0ZS1yZXF1ZXN0LWJvZHlcIjtcblxuLyoqXG4gKiBSZXByZXNlbnRzIHRoZSBodHRwMiBvcHRpb25zIHRoYXQgY2FuIGJlIHBhc3NlZCB0byBhIG5vZGUgaHR0cDIgY2xpZW50LlxuICovXG5leHBvcnQgaW50ZXJmYWNlIE5vZGVIdHRwMkhhbmRsZXJPcHRpb25zIHtcbiAgLyoqXG4gICAqIFRoZSBtYXhpbXVtIHRpbWUgaW4gbWlsbGlzZWNvbmRzIHRoYXQgYSBzdHJlYW0gbWF5IHJlbWFpbiBpZGxlIGJlZm9yZSBpdFxuICAgKiBpcyBjbG9zZWQuXG4gICAqL1xuICByZXF1ZXN0VGltZW91dD86IG51bWJlcjtcblxuICAvKipcbiAgICogVGhlIG1heGltdW0gdGltZSBpbiBtaWxsaXNlY29uZHMgdGhhdCBhIHNlc3Npb24gb3Igc29ja2V0IG1heSByZW1haW4gaWRsZVxuICAgKiBiZWZvcmUgaXQgaXMgY2xvc2VkLlxuICAgKiBodHRwczovL25vZGVqcy5vcmcvZG9jcy9sYXRlc3QtdjEyLngvYXBpL2h0dHAyLmh0bWwjaHR0cDJfaHR0cDJzZXNzaW9uX2FuZF9zb2NrZXRzXG4gICAqL1xuICBzZXNzaW9uVGltZW91dD86IG51bWJlcjtcbn1cblxuZXhwb3J0IGNsYXNzIE5vZGVIdHRwMkhhbmRsZXIgaW1wbGVtZW50cyBIdHRwSGFuZGxlciB7XG4gIHByaXZhdGUgcmVhZG9ubHkgcmVxdWVzdFRpbWVvdXQ/OiBudW1iZXI7XG4gIHByaXZhdGUgcmVhZG9ubHkgc2Vzc2lvblRpbWVvdXQ/OiBudW1iZXI7XG4gIHByaXZhdGUgcmVhZG9ubHkgY29ubmVjdGlvblBvb2w6IE1hcDxzdHJpbmcsIENsaWVudEh0dHAyU2Vzc2lvbj47XG4gIHB1YmxpYyByZWFkb25seSBtZXRhZGF0YSA9IHsgaGFuZGxlclByb3RvY29sOiBcImgyXCIgfTtcblxuICBjb25zdHJ1Y3Rvcih7IHJlcXVlc3RUaW1lb3V0LCBzZXNzaW9uVGltZW91dCB9OiBOb2RlSHR0cDJIYW5kbGVyT3B0aW9ucyA9IHt9KSB7XG4gICAgdGhpcy5yZXF1ZXN0VGltZW91dCA9IHJlcXVlc3RUaW1lb3V0O1xuICAgIHRoaXMuc2Vzc2lvblRpbWVvdXQgPSBzZXNzaW9uVGltZW91dDtcbiAgICB0aGlzLmNvbm5lY3Rpb25Qb29sID0gbmV3IE1hcDxzdHJpbmcsIENsaWVudEh0dHAyU2Vzc2lvbj4oKTtcbiAgfVxuXG4gIGRlc3Ryb3koKTogdm9pZCB7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFyc1xuICAgIGZvciAoY29uc3QgW18sIGh0dHAyU2Vzc2lvbl0gb2YgdGhpcy5jb25uZWN0aW9uUG9vbCkge1xuICAgICAgaHR0cDJTZXNzaW9uLmRlc3Ryb3koKTtcbiAgICB9XG4gICAgdGhpcy5jb25uZWN0aW9uUG9vbC5jbGVhcigpO1xuICB9XG5cbiAgaGFuZGxlKHJlcXVlc3Q6IEh0dHBSZXF1ZXN0LCB7IGFib3J0U2lnbmFsIH06IEh0dHBIYW5kbGVyT3B0aW9ucyA9IHt9KTogUHJvbWlzZTx7IHJlc3BvbnNlOiBIdHRwUmVzcG9uc2UgfT4ge1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAvLyBpZiB0aGUgcmVxdWVzdCB3YXMgYWxyZWFkeSBhYm9ydGVkLCBwcmV2ZW50IGRvaW5nIGV4dHJhIHdvcmtcbiAgICAgIGlmIChhYm9ydFNpZ25hbD8uYWJvcnRlZCkge1xuICAgICAgICBjb25zdCBhYm9ydEVycm9yID0gbmV3IEVycm9yKFwiUmVxdWVzdCBhYm9ydGVkXCIpO1xuICAgICAgICBhYm9ydEVycm9yLm5hbWUgPSBcIkFib3J0RXJyb3JcIjtcbiAgICAgICAgcmVqZWN0KGFib3J0RXJyb3IpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IHsgaG9zdG5hbWUsIG1ldGhvZCwgcG9ydCwgcHJvdG9jb2wsIHBhdGgsIHF1ZXJ5IH0gPSByZXF1ZXN0O1xuICAgICAgY29uc3QgcXVlcnlTdHJpbmcgPSBidWlsZFF1ZXJ5U3RyaW5nKHF1ZXJ5IHx8IHt9KTtcblxuICAgICAgLy8gY3JlYXRlIHRoZSBodHRwMiByZXF1ZXN0XG4gICAgICBjb25zdCByZXEgPSB0aGlzLmdldFNlc3Npb24oYCR7cHJvdG9jb2x9Ly8ke2hvc3RuYW1lfSR7cG9ydCA/IGA6JHtwb3J0fWAgOiBcIlwifWApLnJlcXVlc3Qoe1xuICAgICAgICAuLi5yZXF1ZXN0LmhlYWRlcnMsXG4gICAgICAgIFtjb25zdGFudHMuSFRUUDJfSEVBREVSX1BBVEhdOiBxdWVyeVN0cmluZyA/IGAke3BhdGh9PyR7cXVlcnlTdHJpbmd9YCA6IHBhdGgsXG4gICAgICAgIFtjb25zdGFudHMuSFRUUDJfSEVBREVSX01FVEhPRF06IG1ldGhvZCxcbiAgICAgIH0pO1xuXG4gICAgICByZXEub24oXCJyZXNwb25zZVwiLCAoaGVhZGVycykgPT4ge1xuICAgICAgICBjb25zdCBodHRwUmVzcG9uc2UgPSBuZXcgSHR0cFJlc3BvbnNlKHtcbiAgICAgICAgICBzdGF0dXNDb2RlOiBoZWFkZXJzW1wiOnN0YXR1c1wiXSB8fCAtMSxcbiAgICAgICAgICBoZWFkZXJzOiBnZXRUcmFuc2Zvcm1lZEhlYWRlcnMoaGVhZGVycyksXG4gICAgICAgICAgYm9keTogcmVxLFxuICAgICAgICB9KTtcbiAgICAgICAgcmVzb2x2ZSh7IHJlc3BvbnNlOiBodHRwUmVzcG9uc2UgfSk7XG4gICAgICB9KTtcblxuICAgICAgcmVxLm9uKFwiZXJyb3JcIiwgcmVqZWN0KTtcbiAgICAgIHJlcS5vbihcImZyYW1lRXJyb3JcIiwgcmVqZWN0KTtcbiAgICAgIHJlcS5vbihcImFib3J0ZWRcIiwgcmVqZWN0KTtcblxuICAgICAgY29uc3QgcmVxdWVzdFRpbWVvdXQgPSB0aGlzLnJlcXVlc3RUaW1lb3V0O1xuICAgICAgaWYgKHJlcXVlc3RUaW1lb3V0KSB7XG4gICAgICAgIHJlcS5zZXRUaW1lb3V0KHJlcXVlc3RUaW1lb3V0LCAoKSA9PiB7XG4gICAgICAgICAgcmVxLmNsb3NlKCk7XG4gICAgICAgICAgY29uc3QgdGltZW91dEVycm9yID0gbmV3IEVycm9yKGBTdHJlYW0gdGltZWQgb3V0IGJlY2F1c2Ugb2Ygbm8gYWN0aXZpdHkgZm9yICR7cmVxdWVzdFRpbWVvdXR9IG1zYCk7XG4gICAgICAgICAgdGltZW91dEVycm9yLm5hbWUgPSBcIlRpbWVvdXRFcnJvclwiO1xuICAgICAgICAgIHJlamVjdCh0aW1lb3V0RXJyb3IpO1xuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgaWYgKGFib3J0U2lnbmFsKSB7XG4gICAgICAgIGFib3J0U2lnbmFsLm9uYWJvcnQgPSAoKSA9PiB7XG4gICAgICAgICAgcmVxLmNsb3NlKCk7XG4gICAgICAgICAgY29uc3QgYWJvcnRFcnJvciA9IG5ldyBFcnJvcihcIlJlcXVlc3QgYWJvcnRlZFwiKTtcbiAgICAgICAgICBhYm9ydEVycm9yLm5hbWUgPSBcIkFib3J0RXJyb3JcIjtcbiAgICAgICAgICByZWplY3QoYWJvcnRFcnJvcik7XG4gICAgICAgIH07XG4gICAgICB9XG5cbiAgICAgIHdyaXRlUmVxdWVzdEJvZHkocmVxLCByZXF1ZXN0KTtcbiAgICB9KTtcbiAgfVxuXG4gIHByaXZhdGUgZ2V0U2Vzc2lvbihhdXRob3JpdHk6IHN0cmluZyk6IENsaWVudEh0dHAyU2Vzc2lvbiB7XG4gICAgY29uc3QgY29ubmVjdGlvblBvb2wgPSB0aGlzLmNvbm5lY3Rpb25Qb29sO1xuICAgIGNvbnN0IGV4aXN0aW5nU2Vzc2lvbiA9IGNvbm5lY3Rpb25Qb29sLmdldChhdXRob3JpdHkpO1xuICAgIGlmIChleGlzdGluZ1Nlc3Npb24pIHJldHVybiBleGlzdGluZ1Nlc3Npb247XG5cbiAgICBjb25zdCBuZXdTZXNzaW9uID0gY29ubmVjdChhdXRob3JpdHkpO1xuICAgIGNvbm5lY3Rpb25Qb29sLnNldChhdXRob3JpdHksIG5ld1Nlc3Npb24pO1xuXG4gICAgY29uc3Qgc2Vzc2lvblRpbWVvdXQgPSB0aGlzLnNlc3Npb25UaW1lb3V0O1xuICAgIGlmIChzZXNzaW9uVGltZW91dCkge1xuICAgICAgbmV3U2Vzc2lvbi5zZXRUaW1lb3V0KHNlc3Npb25UaW1lb3V0LCAoKSA9PiB7XG4gICAgICAgIG5ld1Nlc3Npb24uY2xvc2UoKTtcbiAgICAgICAgY29ubmVjdGlvblBvb2wuZGVsZXRlKGF1dGhvcml0eSk7XG4gICAgICB9KTtcbiAgICB9XG4gICAgcmV0dXJuIG5ld1Nlc3Npb247XG4gIH1cbn1cbiJdfQ== + +/***/ }), + +/***/ 72072: +/***/ ((__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) { + // Throw a connecting timeout error unless a connection is made within x time. + const timeoutId = setTimeout(() => { + // destroy the request. + request.destroy(); + reject(Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError", + })); + }, timeoutInMs); + // if the connection was established, cancel the timeout. + socket.on("connect", () => { + clearTimeout(timeoutId); + }); + } + }); +}; +exports.setConnectionTimeout = setConnectionTimeout; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0LWNvbm5lY3Rpb24tdGltZW91dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZXQtY29ubmVjdGlvbi10aW1lb3V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUdPLE1BQU0sb0JBQW9CLEdBQUcsQ0FBQyxPQUFzQixFQUFFLE1BQTRCLEVBQUUsV0FBVyxHQUFHLENBQUMsRUFBRSxFQUFFO0lBQzVHLElBQUksQ0FBQyxXQUFXLEVBQUU7UUFDaEIsT0FBTztLQUNSO0lBRUQsT0FBTyxDQUFDLEVBQUUsQ0FBQyxRQUFRLEVBQUUsQ0FBQyxNQUFjLEVBQUUsRUFBRTtRQUN0QyxJQUFJLE1BQU0sQ0FBQyxVQUFVLEVBQUU7WUFDckIsOEVBQThFO1lBQzlFLE1BQU0sU0FBUyxHQUFHLFVBQVUsQ0FBQyxHQUFHLEVBQUU7Z0JBQ2hDLHVCQUF1QjtnQkFDdkIsT0FBTyxDQUFDLE9BQU8sRUFBRSxDQUFDO2dCQUNsQixNQUFNLENBQ0osTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyw2REFBNkQsV0FBVyxLQUFLLENBQUMsRUFBRTtvQkFDdEcsSUFBSSxFQUFFLGNBQWM7aUJBQ3JCLENBQUMsQ0FDSCxDQUFDO1lBQ0osQ0FBQyxFQUFFLFdBQVcsQ0FBQyxDQUFDO1lBRWhCLHlEQUF5RDtZQUN6RCxNQUFNLENBQUMsRUFBRSxDQUFDLFNBQVMsRUFBRSxHQUFHLEVBQUU7Z0JBQ3hCLFlBQVksQ0FBQyxTQUFTLENBQUMsQ0FBQztZQUMxQixDQUFDLENBQUMsQ0FBQztTQUNKO0lBQ0gsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDLENBQUM7QUF4QlcsUUFBQSxvQkFBb0Isd0JBd0IvQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENsaWVudFJlcXVlc3QgfSBmcm9tIFwiaHR0cFwiO1xuaW1wb3J0IHsgU29ja2V0IH0gZnJvbSBcIm5ldFwiO1xuXG5leHBvcnQgY29uc3Qgc2V0Q29ubmVjdGlvblRpbWVvdXQgPSAocmVxdWVzdDogQ2xpZW50UmVxdWVzdCwgcmVqZWN0OiAoZXJyOiBFcnJvcikgPT4gdm9pZCwgdGltZW91dEluTXMgPSAwKSA9PiB7XG4gIGlmICghdGltZW91dEluTXMpIHtcbiAgICByZXR1cm47XG4gIH1cblxuICByZXF1ZXN0Lm9uKFwic29ja2V0XCIsIChzb2NrZXQ6IFNvY2tldCkgPT4ge1xuICAgIGlmIChzb2NrZXQuY29ubmVjdGluZykge1xuICAgICAgLy8gVGhyb3cgYSBjb25uZWN0aW5nIHRpbWVvdXQgZXJyb3IgdW5sZXNzIGEgY29ubmVjdGlvbiBpcyBtYWRlIHdpdGhpbiB4IHRpbWUuXG4gICAgICBjb25zdCB0aW1lb3V0SWQgPSBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgLy8gZGVzdHJveSB0aGUgcmVxdWVzdC5cbiAgICAgICAgcmVxdWVzdC5kZXN0cm95KCk7XG4gICAgICAgIHJlamVjdChcbiAgICAgICAgICBPYmplY3QuYXNzaWduKG5ldyBFcnJvcihgU29ja2V0IHRpbWVkIG91dCB3aXRob3V0IGVzdGFibGlzaGluZyBhIGNvbm5lY3Rpb24gd2l0aGluICR7dGltZW91dEluTXN9IG1zYCksIHtcbiAgICAgICAgICAgIG5hbWU6IFwiVGltZW91dEVycm9yXCIsXG4gICAgICAgICAgfSlcbiAgICAgICAgKTtcbiAgICAgIH0sIHRpbWVvdXRJbk1zKTtcblxuICAgICAgLy8gaWYgdGhlIGNvbm5lY3Rpb24gd2FzIGVzdGFibGlzaGVkLCBjYW5jZWwgdGhlIHRpbWVvdXQuXG4gICAgICBzb2NrZXQub24oXCJjb25uZWN0XCIsICgpID0+IHtcbiAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVvdXRJZCk7XG4gICAgICB9KTtcbiAgICB9XG4gIH0pO1xufTtcbiJdfQ== + +/***/ }), + +/***/ 61700: +/***/ ((__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, () => { + // destroy the request + request.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }); +}; +exports.setSocketTimeout = setSocketTimeout; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0LXNvY2tldC10aW1lb3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NldC1zb2NrZXQtdGltZW91dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFTyxNQUFNLGdCQUFnQixHQUFHLENBQUMsT0FBc0IsRUFBRSxNQUE0QixFQUFFLFdBQVcsR0FBRyxDQUFDLEVBQUUsRUFBRTtJQUN4RyxPQUFPLENBQUMsVUFBVSxDQUFDLFdBQVcsRUFBRSxHQUFHLEVBQUU7UUFDbkMsc0JBQXNCO1FBQ3RCLE9BQU8sQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUNsQixNQUFNLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyw4QkFBOEIsV0FBVyxLQUFLLENBQUMsRUFBRSxFQUFFLElBQUksRUFBRSxjQUFjLEVBQUUsQ0FBQyxDQUFDLENBQUM7SUFDN0csQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDLENBQUM7QUFOVyxRQUFBLGdCQUFnQixvQkFNM0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDbGllbnRSZXF1ZXN0IH0gZnJvbSBcImh0dHBcIjtcblxuZXhwb3J0IGNvbnN0IHNldFNvY2tldFRpbWVvdXQgPSAocmVxdWVzdDogQ2xpZW50UmVxdWVzdCwgcmVqZWN0OiAoZXJyOiBFcnJvcikgPT4gdm9pZCwgdGltZW91dEluTXMgPSAwKSA9PiB7XG4gIHJlcXVlc3Quc2V0VGltZW91dCh0aW1lb3V0SW5NcywgKCkgPT4ge1xuICAgIC8vIGRlc3Ryb3kgdGhlIHJlcXVlc3RcbiAgICByZXF1ZXN0LmRlc3Ryb3koKTtcbiAgICByZWplY3QoT2JqZWN0LmFzc2lnbihuZXcgRXJyb3IoYENvbm5lY3Rpb24gdGltZWQgb3V0IGFmdGVyICR7dGltZW91dEluTXN9IG1zYCksIHsgbmFtZTogXCJUaW1lb3V0RXJyb3JcIiB9KSk7XG4gIH0pO1xufTtcbiJdfQ== + +/***/ }), + +/***/ 30701: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Collector = void 0; +const stream_1 = __nccwpck_require__(92413); +class Collector extends stream_1.Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; + } + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } +} +exports.Collector = Collector; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3N0cmVhbS1jb2xsZWN0b3IvY29sbGVjdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1DQUFrQztBQUNsQyxNQUFhLFNBQVUsU0FBUSxpQkFBUTtJQUF2Qzs7UUFDa0Isa0JBQWEsR0FBYSxFQUFFLENBQUM7SUFLL0MsQ0FBQztJQUpDLE1BQU0sQ0FBQyxLQUFhLEVBQUUsUUFBZ0IsRUFBRSxRQUErQjtRQUNyRSxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUMvQixRQUFRLEVBQUUsQ0FBQztJQUNiLENBQUM7Q0FDRjtBQU5ELDhCQU1DIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgV3JpdGFibGUgfSBmcm9tIFwic3RyZWFtXCI7XG5leHBvcnQgY2xhc3MgQ29sbGVjdG9yIGV4dGVuZHMgV3JpdGFibGUge1xuICBwdWJsaWMgcmVhZG9ubHkgYnVmZmVyZWRCeXRlczogQnVmZmVyW10gPSBbXTtcbiAgX3dyaXRlKGNodW5rOiBCdWZmZXIsIGVuY29kaW5nOiBzdHJpbmcsIGNhbGxiYWNrOiAoZXJyPzogRXJyb3IpID0+IHZvaWQpIHtcbiAgICB0aGlzLmJ1ZmZlcmVkQnl0ZXMucHVzaChjaHVuayk7XG4gICAgY2FsbGJhY2soKTtcbiAgfVxufVxuIl19 + +/***/ }), + +/***/ 61624: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.streamCollector = void 0; +const collector_1 = __nccwpck_require__(30701); +const streamCollector = (stream) => new Promise((resolve, reject) => { + const collector = new collector_1.Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + // if the source errors, the destination stream needs to manually end + 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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RyZWFtLWNvbGxlY3Rvci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFHQSwyQ0FBd0M7QUFFakMsTUFBTSxlQUFlLEdBQW9CLENBQUMsTUFBZ0IsRUFBdUIsRUFBRSxDQUN4RixJQUFJLE9BQU8sQ0FBQyxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsRUFBRTtJQUM5QixNQUFNLFNBQVMsR0FBRyxJQUFJLHFCQUFTLEVBQUUsQ0FBQztJQUNsQyxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDO0lBQ3ZCLE1BQU0sQ0FBQyxFQUFFLENBQUMsT0FBTyxFQUFFLENBQUMsR0FBRyxFQUFFLEVBQUU7UUFDekIscUVBQXFFO1FBQ3JFLFNBQVMsQ0FBQyxHQUFHLEVBQUUsQ0FBQztRQUNoQixNQUFNLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDZCxDQUFDLENBQUMsQ0FBQztJQUNILFNBQVMsQ0FBQyxFQUFFLENBQUMsT0FBTyxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBQzlCLFNBQVMsQ0FBQyxFQUFFLENBQUMsUUFBUSxFQUFFO1FBQ3JCLE1BQU0sS0FBSyxHQUFHLElBQUksVUFBVSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7UUFDaEUsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQ2pCLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyxDQUFDLENBQUM7QUFkUSxRQUFBLGVBQWUsbUJBY3ZCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU3RyZWFtQ29sbGVjdG9yIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5pbXBvcnQgeyBSZWFkYWJsZSB9IGZyb20gXCJzdHJlYW1cIjtcblxuaW1wb3J0IHsgQ29sbGVjdG9yIH0gZnJvbSBcIi4vY29sbGVjdG9yXCI7XG5cbmV4cG9ydCBjb25zdCBzdHJlYW1Db2xsZWN0b3I6IFN0cmVhbUNvbGxlY3RvciA9IChzdHJlYW06IFJlYWRhYmxlKTogUHJvbWlzZTxVaW50OEFycmF5PiA9PlxuICBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgY29uc3QgY29sbGVjdG9yID0gbmV3IENvbGxlY3RvcigpO1xuICAgIHN0cmVhbS5waXBlKGNvbGxlY3Rvcik7XG4gICAgc3RyZWFtLm9uKFwiZXJyb3JcIiwgKGVycikgPT4ge1xuICAgICAgLy8gaWYgdGhlIHNvdXJjZSBlcnJvcnMsIHRoZSBkZXN0aW5hdGlvbiBzdHJlYW0gbmVlZHMgdG8gbWFudWFsbHkgZW5kXG4gICAgICBjb2xsZWN0b3IuZW5kKCk7XG4gICAgICByZWplY3QoZXJyKTtcbiAgICB9KTtcbiAgICBjb2xsZWN0b3Iub24oXCJlcnJvclwiLCByZWplY3QpO1xuICAgIGNvbGxlY3Rvci5vbihcImZpbmlzaFwiLCBmdW5jdGlvbiAodGhpczogQ29sbGVjdG9yKSB7XG4gICAgICBjb25zdCBieXRlcyA9IG5ldyBVaW50OEFycmF5KEJ1ZmZlci5jb25jYXQodGhpcy5idWZmZXJlZEJ5dGVzKSk7XG4gICAgICByZXNvbHZlKGJ5dGVzKTtcbiAgICB9KTtcbiAgfSk7XG4iXX0= + +/***/ }), + +/***/ 33306: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.writeRequestBody = void 0; +const stream_1 = __nccwpck_require__(92413); +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) { + // pipe automatically handles end + body.pipe(httpRequest); + } + else if (body) { + httpRequest.end(Buffer.from(body)); + } + else { + httpRequest.end(); + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JpdGUtcmVxdWVzdC1ib2R5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dyaXRlLXJlcXVlc3QtYm9keS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFHQSxtQ0FBa0M7QUFFbEMsU0FBZ0IsZ0JBQWdCLENBQUMsV0FBOEMsRUFBRSxPQUFvQjtJQUNuRyxNQUFNLE1BQU0sR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDdEUsSUFBSSxNQUFNLEtBQUssY0FBYyxFQUFFO1FBQzdCLFdBQVcsQ0FBQyxFQUFFLENBQUMsVUFBVSxFQUFFLEdBQUcsRUFBRTtZQUM5QixTQUFTLENBQUMsV0FBVyxFQUFFLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUN2QyxDQUFDLENBQUMsQ0FBQztLQUNKO1NBQU07UUFDTCxTQUFTLENBQUMsV0FBVyxFQUFFLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN0QztBQUNILENBQUM7QUFURCw0Q0FTQztBQUVELFNBQVMsU0FBUyxDQUNoQixXQUE4QyxFQUM5QyxJQUFxRTtJQUVyRSxJQUFJLElBQUksWUFBWSxpQkFBUSxFQUFFO1FBQzVCLGlDQUFpQztRQUNqQyxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFDO0tBQ3hCO1NBQU0sSUFBSSxJQUFJLEVBQUU7UUFDZixXQUFXLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztLQUNwQztTQUFNO1FBQ0wsV0FBVyxDQUFDLEdBQUcsRUFBRSxDQUFDO0tBQ25CO0FBQ0gsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEh0dHBSZXF1ZXN0IH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5pbXBvcnQgeyBDbGllbnRSZXF1ZXN0IH0gZnJvbSBcImh0dHBcIjtcbmltcG9ydCB7IENsaWVudEh0dHAyU3RyZWFtIH0gZnJvbSBcImh0dHAyXCI7XG5pbXBvcnQgeyBSZWFkYWJsZSB9IGZyb20gXCJzdHJlYW1cIjtcblxuZXhwb3J0IGZ1bmN0aW9uIHdyaXRlUmVxdWVzdEJvZHkoaHR0cFJlcXVlc3Q6IENsaWVudFJlcXVlc3QgfCBDbGllbnRIdHRwMlN0cmVhbSwgcmVxdWVzdDogSHR0cFJlcXVlc3QpIHtcbiAgY29uc3QgZXhwZWN0ID0gcmVxdWVzdC5oZWFkZXJzW1wiRXhwZWN0XCJdIHx8IHJlcXVlc3QuaGVhZGVyc1tcImV4cGVjdFwiXTtcbiAgaWYgKGV4cGVjdCA9PT0gXCIxMDAtY29udGludWVcIikge1xuICAgIGh0dHBSZXF1ZXN0Lm9uKFwiY29udGludWVcIiwgKCkgPT4ge1xuICAgICAgd3JpdGVCb2R5KGh0dHBSZXF1ZXN0LCByZXF1ZXN0LmJvZHkpO1xuICAgIH0pO1xuICB9IGVsc2Uge1xuICAgIHdyaXRlQm9keShodHRwUmVxdWVzdCwgcmVxdWVzdC5ib2R5KTtcbiAgfVxufVxuXG5mdW5jdGlvbiB3cml0ZUJvZHkoXG4gIGh0dHBSZXF1ZXN0OiBDbGllbnRSZXF1ZXN0IHwgQ2xpZW50SHR0cDJTdHJlYW0sXG4gIGJvZHk/OiBzdHJpbmcgfCBBcnJheUJ1ZmZlciB8IEFycmF5QnVmZmVyVmlldyB8IFJlYWRhYmxlIHwgVWludDhBcnJheVxuKSB7XG4gIGlmIChib2R5IGluc3RhbmNlb2YgUmVhZGFibGUpIHtcbiAgICAvLyBwaXBlIGF1dG9tYXRpY2FsbHkgaGFuZGxlcyBlbmRcbiAgICBib2R5LnBpcGUoaHR0cFJlcXVlc3QpO1xuICB9IGVsc2UgaWYgKGJvZHkpIHtcbiAgICBodHRwUmVxdWVzdC5lbmQoQnVmZmVyLmZyb20oYm9keSkpO1xuICB9IGVsc2Uge1xuICAgIGh0dHBSZXF1ZXN0LmVuZCgpO1xuICB9XG59XG4iXX0= + +/***/ }), + +/***/ 10791: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ProviderError = void 0; +/** + * An error representing a failure of an individual credential provider. + * + * This error class has special meaning to the {@link chain} method. If a + * provider in the chain is rejected with an error, the chain will only proceed + * to the next provider if the value of the `tryNextLink` property on the error + * is truthy. This allows individual providers to halt the chain and also + * ensures the chain will stop if an entirely unexpected error is encountered. + */ +class ProviderError extends Error { + constructor(message, tryNextLink = true) { + super(message); + this.tryNextLink = tryNextLink; + } +} +exports.ProviderError = ProviderError; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvdmlkZXJFcnJvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Qcm92aWRlckVycm9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBOzs7Ozs7OztHQVFHO0FBQ0gsTUFBYSxhQUFjLFNBQVEsS0FBSztJQUN0QyxZQUFZLE9BQWUsRUFBa0IsY0FBdUIsSUFBSTtRQUN0RSxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM7UUFENEIsZ0JBQVcsR0FBWCxXQUFXLENBQWdCO0lBRXhFLENBQUM7Q0FDRjtBQUpELHNDQUlDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBBbiBlcnJvciByZXByZXNlbnRpbmcgYSBmYWlsdXJlIG9mIGFuIGluZGl2aWR1YWwgY3JlZGVudGlhbCBwcm92aWRlci5cbiAqXG4gKiBUaGlzIGVycm9yIGNsYXNzIGhhcyBzcGVjaWFsIG1lYW5pbmcgdG8gdGhlIHtAbGluayBjaGFpbn0gbWV0aG9kLiBJZiBhXG4gKiBwcm92aWRlciBpbiB0aGUgY2hhaW4gaXMgcmVqZWN0ZWQgd2l0aCBhbiBlcnJvciwgdGhlIGNoYWluIHdpbGwgb25seSBwcm9jZWVkXG4gKiB0byB0aGUgbmV4dCBwcm92aWRlciBpZiB0aGUgdmFsdWUgb2YgdGhlIGB0cnlOZXh0TGlua2AgcHJvcGVydHkgb24gdGhlIGVycm9yXG4gKiBpcyB0cnV0aHkuIFRoaXMgYWxsb3dzIGluZGl2aWR1YWwgcHJvdmlkZXJzIHRvIGhhbHQgdGhlIGNoYWluIGFuZCBhbHNvXG4gKiBlbnN1cmVzIHRoZSBjaGFpbiB3aWxsIHN0b3AgaWYgYW4gZW50aXJlbHkgdW5leHBlY3RlZCBlcnJvciBpcyBlbmNvdW50ZXJlZC5cbiAqL1xuZXhwb3J0IGNsYXNzIFByb3ZpZGVyRXJyb3IgZXh0ZW5kcyBFcnJvciB7XG4gIGNvbnN0cnVjdG9yKG1lc3NhZ2U6IHN0cmluZywgcHVibGljIHJlYWRvbmx5IHRyeU5leHRMaW5rOiBib29sZWFuID0gdHJ1ZSkge1xuICAgIHN1cGVyKG1lc3NhZ2UpO1xuICB9XG59XG4iXX0= + +/***/ }), + +/***/ 20330: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.chain = void 0; +const ProviderError_1 = __nccwpck_require__(10791); +/** + * Compose a single credential provider function from multiple credential + * providers. The first provider in the argument list will always be invoked; + * subsequent providers in the list will be invoked in the order in which the + * were received if the preceding provider did not successfully resolve. + * + * If no providers were received or no provider resolves successfully, the + * returned promise will be rejected. + */ +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2hhaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsbURBQWdEO0FBRWhEOzs7Ozs7OztHQVFHO0FBQ0gsU0FBZ0IsS0FBSyxDQUFJLEdBQUcsU0FBNkI7SUFDdkQsT0FBTyxHQUFHLEVBQUU7UUFDVixJQUFJLE9BQU8sR0FBZSxPQUFPLENBQUMsTUFBTSxDQUFDLElBQUksNkJBQWEsQ0FBQyx1QkFBdUIsQ0FBQyxDQUFDLENBQUM7UUFDckYsS0FBSyxNQUFNLFFBQVEsSUFBSSxTQUFTLEVBQUU7WUFDaEMsT0FBTyxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFRLEVBQUUsRUFBRTtnQkFDbkMsSUFBSSxHQUFHLGFBQUgsR0FBRyx1QkFBSCxHQUFHLENBQUUsV0FBVyxFQUFFO29CQUNwQixPQUFPLFFBQVEsRUFBRSxDQUFDO2lCQUNuQjtnQkFFRCxNQUFNLEdBQUcsQ0FBQztZQUNaLENBQUMsQ0FBQyxDQUFDO1NBQ0o7UUFFRCxPQUFPLE9BQU8sQ0FBQztJQUNqQixDQUFDLENBQUM7QUFDSixDQUFDO0FBZkQsc0JBZUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5pbXBvcnQgeyBQcm92aWRlckVycm9yIH0gZnJvbSBcIi4vUHJvdmlkZXJFcnJvclwiO1xuXG4vKipcbiAqIENvbXBvc2UgYSBzaW5nbGUgY3JlZGVudGlhbCBwcm92aWRlciBmdW5jdGlvbiBmcm9tIG11bHRpcGxlIGNyZWRlbnRpYWxcbiAqIHByb3ZpZGVycy4gVGhlIGZpcnN0IHByb3ZpZGVyIGluIHRoZSBhcmd1bWVudCBsaXN0IHdpbGwgYWx3YXlzIGJlIGludm9rZWQ7XG4gKiBzdWJzZXF1ZW50IHByb3ZpZGVycyBpbiB0aGUgbGlzdCB3aWxsIGJlIGludm9rZWQgaW4gdGhlIG9yZGVyIGluIHdoaWNoIHRoZVxuICogd2VyZSByZWNlaXZlZCBpZiB0aGUgcHJlY2VkaW5nIHByb3ZpZGVyIGRpZCBub3Qgc3VjY2Vzc2Z1bGx5IHJlc29sdmUuXG4gKlxuICogSWYgbm8gcHJvdmlkZXJzIHdlcmUgcmVjZWl2ZWQgb3Igbm8gcHJvdmlkZXIgcmVzb2x2ZXMgc3VjY2Vzc2Z1bGx5LCB0aGVcbiAqIHJldHVybmVkIHByb21pc2Ugd2lsbCBiZSByZWplY3RlZC5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGNoYWluPFQ+KC4uLnByb3ZpZGVyczogQXJyYXk8UHJvdmlkZXI8VD4+KTogUHJvdmlkZXI8VD4ge1xuICByZXR1cm4gKCkgPT4ge1xuICAgIGxldCBwcm9taXNlOiBQcm9taXNlPFQ+ID0gUHJvbWlzZS5yZWplY3QobmV3IFByb3ZpZGVyRXJyb3IoXCJObyBwcm92aWRlcnMgaW4gY2hhaW5cIikpO1xuICAgIGZvciAoY29uc3QgcHJvdmlkZXIgb2YgcHJvdmlkZXJzKSB7XG4gICAgICBwcm9taXNlID0gcHJvbWlzZS5jYXRjaCgoZXJyOiBhbnkpID0+IHtcbiAgICAgICAgaWYgKGVycj8udHJ5TmV4dExpbmspIHtcbiAgICAgICAgICByZXR1cm4gcHJvdmlkZXIoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRocm93IGVycjtcbiAgICAgIH0pO1xuICAgIH1cblxuICAgIHJldHVybiBwcm9taXNlO1xuICB9O1xufVxuIl19 + +/***/ }), + +/***/ 2037: +/***/ ((__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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbVN0YXRpYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9mcm9tU3RhdGljLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVPLE1BQU0sVUFBVSxHQUFHLENBQUksV0FBYyxFQUFlLEVBQUUsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0FBQXBGLFFBQUEsVUFBVSxjQUEwRSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFByb3ZpZGVyIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmV4cG9ydCBjb25zdCBmcm9tU3RhdGljID0gPFQ+KHN0YXRpY1ZhbHVlOiBUKTogUHJvdmlkZXI8VD4gPT4gKCkgPT4gUHJvbWlzZS5yZXNvbHZlKHN0YXRpY1ZhbHVlKTtcbiJdfQ== + +/***/ }), + +/***/ 1014: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(20330), exports); +tslib_1.__exportStar(__nccwpck_require__(2037), exports); +tslib_1.__exportStar(__nccwpck_require__(77803), exports); +tslib_1.__exportStar(__nccwpck_require__(10791), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0RBQXdCO0FBQ3hCLHVEQUE2QjtBQUM3QixvREFBMEI7QUFDMUIsMERBQWdDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vY2hhaW5cIjtcbmV4cG9ydCAqIGZyb20gXCIuL2Zyb21TdGF0aWNcIjtcbmV4cG9ydCAqIGZyb20gXCIuL21lbW9pemVcIjtcbmV4cG9ydCAqIGZyb20gXCIuL1Byb3ZpZGVyRXJyb3JcIjtcbiJdfQ== + +/***/ }), + +/***/ 77803: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.memoize = void 0; +const memoize = (provider, isExpired, requiresRefresh) => { + let result; + let hasResult; + if (isExpired === undefined) { + // This is a static memoization; no need to incorporate refreshing + return () => { + if (!hasResult) { + result = provider(); + hasResult = true; + } + return result; + }; + } + let isConstant = false; + return async () => { + if (!hasResult) { + result = provider(); + hasResult = true; + } + if (isConstant) { + return result; + } + const resolved = await result; + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + return (result = provider()); + } + return resolved; + }; +}; +exports.memoize = memoize; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVtb2l6ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tZW1vaXplLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQTBDTyxNQUFNLE9BQU8sR0FBb0IsQ0FDdEMsUUFBcUIsRUFDckIsU0FBb0MsRUFDcEMsZUFBMEMsRUFDN0IsRUFBRTtJQUNmLElBQUksTUFBVyxDQUFDO0lBQ2hCLElBQUksU0FBa0IsQ0FBQztJQUN2QixJQUFJLFNBQVMsS0FBSyxTQUFTLEVBQUU7UUFDM0Isa0VBQWtFO1FBQ2xFLE9BQU8sR0FBRyxFQUFFO1lBQ1YsSUFBSSxDQUFDLFNBQVMsRUFBRTtnQkFDZCxNQUFNLEdBQUcsUUFBUSxFQUFFLENBQUM7Z0JBQ3BCLFNBQVMsR0FBRyxJQUFJLENBQUM7YUFDbEI7WUFDRCxPQUFPLE1BQU0sQ0FBQztRQUNoQixDQUFDLENBQUM7S0FDSDtJQUVELElBQUksVUFBVSxHQUFHLEtBQUssQ0FBQztJQUV2QixPQUFPLEtBQUssSUFBSSxFQUFFO1FBQ2hCLElBQUksQ0FBQyxTQUFTLEVBQUU7WUFDZCxNQUFNLEdBQUcsUUFBUSxFQUFFLENBQUM7WUFDcEIsU0FBUyxHQUFHLElBQUksQ0FBQztTQUNsQjtRQUNELElBQUksVUFBVSxFQUFFO1lBQ2QsT0FBTyxNQUFNLENBQUM7U0FDZjtRQUVELE1BQU0sUUFBUSxHQUFHLE1BQU0sTUFBTSxDQUFDO1FBQzlCLElBQUksZUFBZSxJQUFJLENBQUMsZUFBZSxDQUFDLFFBQVEsQ0FBQyxFQUFFO1lBQ2pELFVBQVUsR0FBRyxJQUFJLENBQUM7WUFDbEIsT0FBTyxRQUFRLENBQUM7U0FDakI7UUFDRCxJQUFJLFNBQVMsQ0FBQyxRQUFRLENBQUMsRUFBRTtZQUN2QixPQUFPLENBQUMsTUFBTSxHQUFHLFFBQVEsRUFBRSxDQUFDLENBQUM7U0FDOUI7UUFDRCxPQUFPLFFBQVEsQ0FBQztJQUNsQixDQUFDLENBQUM7QUFDSixDQUFDLENBQUM7QUF2Q1csUUFBQSxPQUFPLFdBdUNsQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFByb3ZpZGVyIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmludGVyZmFjZSBNZW1vaXplT3ZlcmxvYWQge1xuICAvKipcbiAgICpcbiAgICogRGVjb3JhdGVzIGEgcHJvdmlkZXIgZnVuY3Rpb24gd2l0aCBlaXRoZXIgc3RhdGljIG1lbW9pemF0aW9uLlxuICAgKlxuICAgKiBUbyBjcmVhdGUgYSBzdGF0aWNhbGx5IG1lbW9pemVkIHByb3ZpZGVyLCBzdXBwbHkgYSBwcm92aWRlciBhcyB0aGUgb25seVxuICAgKiBhcmd1bWVudCB0byB0aGlzIGZ1bmN0aW9uLiBUaGUgcHJvdmlkZXIgd2lsbCBiZSBpbnZva2VkIG9uY2UsIGFuZCBhbGxcbiAgICogaW52b2NhdGlvbnMgb2YgdGhlIHByb3ZpZGVyIHJldHVybmVkIGJ5IGBtZW1vaXplYCB3aWxsIHJldHVybiB0aGUgc2FtZVxuICAgKiBwcm9taXNlIG9iamVjdC5cbiAgICpcbiAgICogQHBhcmFtIHByb3ZpZGVyIFRoZSBwcm92aWRlciB3aG9zZSByZXN1bHQgc2hvdWxkIGJlIGNhY2hlZCBpbmRlZmluaXRlbHkuXG4gICAqL1xuICA8VD4ocHJvdmlkZXI6IFByb3ZpZGVyPFQ+KTogUHJvdmlkZXI8VD47XG5cbiAgLyoqXG4gICAqIERlY29yYXRlcyBhIHByb3ZpZGVyIGZ1bmN0aW9uIHdpdGggcmVmcmVzaGluZyBtZW1vaXphdGlvbi5cbiAgICpcbiAgICogQHBhcmFtIHByb3ZpZGVyICAgICAgICAgIFRoZSBwcm92aWRlciB3aG9zZSByZXN1bHQgc2hvdWxkIGJlIGNhY2hlZC5cbiAgICogQHBhcmFtIGlzRXhwaXJlZCAgICAgICAgIEEgZnVuY3Rpb24gdGhhdCB3aWxsIGV2YWx1YXRlIHRoZSByZXNvbHZlZCB2YWx1ZSBhbmRcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgIGRldGVybWluZSBpZiBpdCBpcyBleHBpcmVkLiBGb3IgZXhhbXBsZSwgd2hlblxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtb2l6aW5nIEFXUyBjcmVkZW50aWFsIHByb3ZpZGVycywgdGhpcyBmdW5jdGlvblxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvdWxkIHJldHVybiBgdHJ1ZWAgd2hlbiB0aGUgY3JlZGVudGlhbCdzXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICBleHBpcmF0aW9uIGlzIGluIHRoZSBwYXN0IChvciB2ZXJ5IG5lYXIgZnV0dXJlKSBhbmRcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgIGBmYWxzZWAgb3RoZXJ3aXNlLlxuICAgKiBAcGFyYW0gcmVxdWlyZXNSZWZyZXNoICAgQSBmdW5jdGlvbiB0aGF0IHdpbGwgZXZhbHVhdGUgdGhlIHJlc29sdmVkIHZhbHVlIGFuZFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgZGV0ZXJtaW5lIGlmIGl0IHJlcHJlc2VudHMgc3RhdGljIHZhbHVlIG9yIG9uZSB0aGF0XG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICB3aWxsIGV2ZW50dWFsbHkgbmVlZCB0byBiZSByZWZyZXNoZWQuIEZvciBleGFtcGxlLFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgQVdTIGNyZWRlbnRpYWxzIHRoYXQgaGF2ZSBubyBkZWZpbmVkIGV4cGlyYXRpb24gd2lsbFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgbmV2ZXIgbmVlZCB0byBiZSByZWZyZXNoZWQsIHNvIHRoaXMgZnVuY3Rpb24gd291bGRcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBgdHJ1ZWAgaWYgdGhlIGNyZWRlbnRpYWxzIHJlc29sdmVkIGJ5IHRoZVxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgdW5kZXJseWluZyBwcm92aWRlciBoYWQgYW4gZXhwaXJhdGlvbiBhbmQgYGZhbHNlYFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgb3RoZXJ3aXNlLlxuICAgKi9cbiAgPFQ+KFxuICAgIHByb3ZpZGVyOiBQcm92aWRlcjxUPixcbiAgICBpc0V4cGlyZWQ6IChyZXNvbHZlZDogVCkgPT4gYm9vbGVhbixcbiAgICByZXF1aXJlc1JlZnJlc2g/OiAocmVzb2x2ZWQ6IFQpID0+IGJvb2xlYW5cbiAgKTogUHJvdmlkZXI8VD47XG59XG5cbmV4cG9ydCBjb25zdCBtZW1vaXplOiBNZW1vaXplT3ZlcmxvYWQgPSA8VD4oXG4gIHByb3ZpZGVyOiBQcm92aWRlcjxUPixcbiAgaXNFeHBpcmVkPzogKHJlc29sdmVkOiBUKSA9PiBib29sZWFuLFxuICByZXF1aXJlc1JlZnJlc2g/OiAocmVzb2x2ZWQ6IFQpID0+IGJvb2xlYW5cbik6IFByb3ZpZGVyPFQ+ID0+IHtcbiAgbGV0IHJlc3VsdDogYW55O1xuICBsZXQgaGFzUmVzdWx0OiBib29sZWFuO1xuICBpZiAoaXNFeHBpcmVkID09PSB1bmRlZmluZWQpIHtcbiAgICAvLyBUaGlzIGlzIGEgc3RhdGljIG1lbW9pemF0aW9uOyBubyBuZWVkIHRvIGluY29ycG9yYXRlIHJlZnJlc2hpbmdcbiAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgaWYgKCFoYXNSZXN1bHQpIHtcbiAgICAgICAgcmVzdWx0ID0gcHJvdmlkZXIoKTtcbiAgICAgICAgaGFzUmVzdWx0ID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfTtcbiAgfVxuXG4gIGxldCBpc0NvbnN0YW50ID0gZmFsc2U7XG5cbiAgcmV0dXJuIGFzeW5jICgpID0+IHtcbiAgICBpZiAoIWhhc1Jlc3VsdCkge1xuICAgICAgcmVzdWx0ID0gcHJvdmlkZXIoKTtcbiAgICAgIGhhc1Jlc3VsdCA9IHRydWU7XG4gICAgfVxuICAgIGlmIChpc0NvbnN0YW50KSB7XG4gICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIGNvbnN0IHJlc29sdmVkID0gYXdhaXQgcmVzdWx0O1xuICAgIGlmIChyZXF1aXJlc1JlZnJlc2ggJiYgIXJlcXVpcmVzUmVmcmVzaChyZXNvbHZlZCkpIHtcbiAgICAgIGlzQ29uc3RhbnQgPSB0cnVlO1xuICAgICAgcmV0dXJuIHJlc29sdmVkO1xuICAgIH1cbiAgICBpZiAoaXNFeHBpcmVkKHJlc29sdmVkKSkge1xuICAgICAgcmV0dXJuIChyZXN1bHQgPSBwcm92aWRlcigpKTtcbiAgICB9XG4gICAgcmV0dXJuIHJlc29sdmVkO1xuICB9O1xufTtcbiJdfQ== + +/***/ }), + +/***/ 56695: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cEhhbmRsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaHR0cEhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEh0dHBIYW5kbGVyT3B0aW9ucywgUmVxdWVzdEhhbmRsZXIgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuaW1wb3J0IHsgSHR0cFJlcXVlc3QgfSBmcm9tIFwiLi9odHRwUmVxdWVzdFwiO1xuaW1wb3J0IHsgSHR0cFJlc3BvbnNlIH0gZnJvbSBcIi4vaHR0cFJlc3BvbnNlXCI7XG5cbmV4cG9ydCB0eXBlIEh0dHBIYW5kbGVyID0gUmVxdWVzdEhhbmRsZXI8SHR0cFJlcXVlc3QsIEh0dHBSZXNwb25zZSwgSHR0cEhhbmRsZXJPcHRpb25zPjtcbiJdfQ== + +/***/ }), + +/***/ 87577: +/***/ ((__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) { + //determine if request is a valid httpRequest + 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, + }; + }, {}); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cFJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaHR0cFJlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBTUEsTUFBYSxXQUFXO0lBVXRCLFlBQVksT0FBMkI7UUFDckMsSUFBSSxDQUFDLE1BQU0sR0FBRyxPQUFPLENBQUMsTUFBTSxJQUFJLEtBQUssQ0FBQztRQUN0QyxJQUFJLENBQUMsUUFBUSxHQUFHLE9BQU8sQ0FBQyxRQUFRLElBQUksV0FBVyxDQUFDO1FBQ2hELElBQUksQ0FBQyxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztRQUN6QixJQUFJLENBQUMsS0FBSyxHQUFHLE9BQU8sQ0FBQyxLQUFLLElBQUksRUFBRSxDQUFDO1FBQ2pDLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDLE9BQU8sSUFBSSxFQUFFLENBQUM7UUFDckMsSUFBSSxDQUFDLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDO1FBQ3pCLElBQUksQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFDLFFBQVE7WUFDOUIsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssR0FBRztnQkFDbkMsQ0FBQyxDQUFDLEdBQUcsT0FBTyxDQUFDLFFBQVEsR0FBRztnQkFDeEIsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxRQUFRO1lBQ3BCLENBQUMsQ0FBQyxRQUFRLENBQUM7UUFDYixJQUFJLENBQUMsSUFBSSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLEtBQUssR0FBRyxDQUFDLENBQUMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUM7SUFDeEcsQ0FBQztJQUVELE1BQU0sQ0FBQyxVQUFVLENBQUMsT0FBZ0I7UUFDaEMsNkNBQTZDO1FBQzdDLElBQUksQ0FBQyxPQUFPO1lBQUUsT0FBTyxLQUFLLENBQUM7UUFDM0IsTUFBTSxHQUFHLEdBQVEsT0FBTyxDQUFDO1FBQ3pCLE9BQU8sQ0FDTCxRQUFRLElBQUksR0FBRztZQUNmLFVBQVUsSUFBSSxHQUFHO1lBQ2pCLFVBQVUsSUFBSSxHQUFHO1lBQ2pCLE1BQU0sSUFBSSxHQUFHO1lBQ2IsT0FBTyxHQUFHLENBQUMsT0FBTyxDQUFDLEtBQUssUUFBUTtZQUNoQyxPQUFPLEdBQUcsQ0FBQyxTQUFTLENBQUMsS0FBSyxRQUFRLENBQ25DLENBQUM7SUFDSixDQUFDO0lBRUQsS0FBSztRQUNILE1BQU0sTUFBTSxHQUFHLElBQUksV0FBVyxDQUFDO1lBQzdCLEdBQUcsSUFBSTtZQUNQLE9BQU8sRUFBRSxFQUFFLEdBQUcsSUFBSSxDQUFDLE9BQU8sRUFBRTtTQUM3QixDQUFDLENBQUM7UUFDSCxJQUFJLE1BQU0sQ0FBQyxLQUFLO1lBQUUsTUFBTSxDQUFDLEtBQUssR0FBRyxVQUFVLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQzFELE9BQU8sTUFBTSxDQUFDO0lBQ2hCLENBQUM7Q0FDRjtBQS9DRCxrQ0ErQ0M7QUFFRCxTQUFTLFVBQVUsQ0FBQyxLQUF3QjtJQUMxQyxPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsTUFBTSxDQUFDLENBQUMsS0FBd0IsRUFBRSxTQUFpQixFQUFFLEVBQUU7UUFDL0UsTUFBTSxLQUFLLEdBQUcsS0FBSyxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQy9CLE9BQU87WUFDTCxHQUFHLEtBQUs7WUFDUixDQUFDLFNBQVMsQ0FBQyxFQUFFLEtBQUssQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSztTQUN2RCxDQUFDO0lBQ0osQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDO0FBQ1QsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEVuZHBvaW50LCBIZWFkZXJCYWcsIEh0dHBNZXNzYWdlLCBIdHRwUmVxdWVzdCBhcyBJSHR0cFJlcXVlc3QsIFF1ZXJ5UGFyYW1ldGVyQmFnIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbnR5cGUgSHR0cFJlcXVlc3RPcHRpb25zID0gUGFydGlhbDxIdHRwTWVzc2FnZT4gJiBQYXJ0aWFsPEVuZHBvaW50PiAmIHsgbWV0aG9kPzogc3RyaW5nIH07XG5cbmV4cG9ydCBpbnRlcmZhY2UgSHR0cFJlcXVlc3QgZXh0ZW5kcyBJSHR0cFJlcXVlc3Qge31cblxuZXhwb3J0IGNsYXNzIEh0dHBSZXF1ZXN0IGltcGxlbWVudHMgSHR0cE1lc3NhZ2UsIEVuZHBvaW50IHtcbiAgcHVibGljIG1ldGhvZDogc3RyaW5nO1xuICBwdWJsaWMgcHJvdG9jb2w6IHN0cmluZztcbiAgcHVibGljIGhvc3RuYW1lOiBzdHJpbmc7XG4gIHB1YmxpYyBwb3J0PzogbnVtYmVyO1xuICBwdWJsaWMgcGF0aDogc3RyaW5nO1xuICBwdWJsaWMgcXVlcnk6IFF1ZXJ5UGFyYW1ldGVyQmFnO1xuICBwdWJsaWMgaGVhZGVyczogSGVhZGVyQmFnO1xuICBwdWJsaWMgYm9keT86IGFueTtcblxuICBjb25zdHJ1Y3RvcihvcHRpb25zOiBIdHRwUmVxdWVzdE9wdGlvbnMpIHtcbiAgICB0aGlzLm1ldGhvZCA9IG9wdGlvbnMubWV0aG9kIHx8IFwiR0VUXCI7XG4gICAgdGhpcy5ob3N0bmFtZSA9IG9wdGlvbnMuaG9zdG5hbWUgfHwgXCJsb2NhbGhvc3RcIjtcbiAgICB0aGlzLnBvcnQgPSBvcHRpb25zLnBvcnQ7XG4gICAgdGhpcy5xdWVyeSA9IG9wdGlvbnMucXVlcnkgfHwge307XG4gICAgdGhpcy5oZWFkZXJzID0gb3B0aW9ucy5oZWFkZXJzIHx8IHt9O1xuICAgIHRoaXMuYm9keSA9IG9wdGlvbnMuYm9keTtcbiAgICB0aGlzLnByb3RvY29sID0gb3B0aW9ucy5wcm90b2NvbFxuICAgICAgPyBvcHRpb25zLnByb3RvY29sLnN1YnN0cigtMSkgIT09IFwiOlwiXG4gICAgICAgID8gYCR7b3B0aW9ucy5wcm90b2NvbH06YFxuICAgICAgICA6IG9wdGlvbnMucHJvdG9jb2xcbiAgICAgIDogXCJodHRwczpcIjtcbiAgICB0aGlzLnBhdGggPSBvcHRpb25zLnBhdGggPyAob3B0aW9ucy5wYXRoLmNoYXJBdCgwKSAhPT0gXCIvXCIgPyBgLyR7b3B0aW9ucy5wYXRofWAgOiBvcHRpb25zLnBhdGgpIDogXCIvXCI7XG4gIH1cblxuICBzdGF0aWMgaXNJbnN0YW5jZShyZXF1ZXN0OiB1bmtub3duKTogcmVxdWVzdCBpcyBIdHRwUmVxdWVzdCB7XG4gICAgLy9kZXRlcm1pbmUgaWYgcmVxdWVzdCBpcyBhIHZhbGlkIGh0dHBSZXF1ZXN0XG4gICAgaWYgKCFyZXF1ZXN0KSByZXR1cm4gZmFsc2U7XG4gICAgY29uc3QgcmVxOiBhbnkgPSByZXF1ZXN0O1xuICAgIHJldHVybiAoXG4gICAgICBcIm1ldGhvZFwiIGluIHJlcSAmJlxuICAgICAgXCJwcm90b2NvbFwiIGluIHJlcSAmJlxuICAgICAgXCJob3N0bmFtZVwiIGluIHJlcSAmJlxuICAgICAgXCJwYXRoXCIgaW4gcmVxICYmXG4gICAgICB0eXBlb2YgcmVxW1wicXVlcnlcIl0gPT09IFwib2JqZWN0XCIgJiZcbiAgICAgIHR5cGVvZiByZXFbXCJoZWFkZXJzXCJdID09PSBcIm9iamVjdFwiXG4gICAgKTtcbiAgfVxuXG4gIGNsb25lKCk6IEh0dHBSZXF1ZXN0IHtcbiAgICBjb25zdCBjbG9uZWQgPSBuZXcgSHR0cFJlcXVlc3Qoe1xuICAgICAgLi4udGhpcyxcbiAgICAgIGhlYWRlcnM6IHsgLi4udGhpcy5oZWFkZXJzIH0sXG4gICAgfSk7XG4gICAgaWYgKGNsb25lZC5xdWVyeSkgY2xvbmVkLnF1ZXJ5ID0gY2xvbmVRdWVyeShjbG9uZWQucXVlcnkpO1xuICAgIHJldHVybiBjbG9uZWQ7XG4gIH1cbn1cblxuZnVuY3Rpb24gY2xvbmVRdWVyeShxdWVyeTogUXVlcnlQYXJhbWV0ZXJCYWcpOiBRdWVyeVBhcmFtZXRlckJhZyB7XG4gIHJldHVybiBPYmplY3Qua2V5cyhxdWVyeSkucmVkdWNlKChjYXJyeTogUXVlcnlQYXJhbWV0ZXJCYWcsIHBhcmFtTmFtZTogc3RyaW5nKSA9PiB7XG4gICAgY29uc3QgcGFyYW0gPSBxdWVyeVtwYXJhbU5hbWVdO1xuICAgIHJldHVybiB7XG4gICAgICAuLi5jYXJyeSxcbiAgICAgIFtwYXJhbU5hbWVdOiBBcnJheS5pc0FycmF5KHBhcmFtKSA/IFsuLi5wYXJhbV0gOiBwYXJhbSxcbiAgICB9O1xuICB9LCB7fSk7XG59XG4iXX0= + +/***/ }), + +/***/ 41772: +/***/ ((__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) { + //determine if response is a valid HttpResponse + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } +} +exports.HttpResponse = HttpResponse; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cFJlc3BvbnNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2h0dHBSZXNwb25zZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFRQSxNQUFhLFlBQVk7SUFLdkIsWUFBWSxPQUE0QjtRQUN0QyxJQUFJLENBQUMsVUFBVSxHQUFHLE9BQU8sQ0FBQyxVQUFVLENBQUM7UUFDckMsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUMsT0FBTyxJQUFJLEVBQUUsQ0FBQztRQUNyQyxJQUFJLENBQUMsSUFBSSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUM7SUFDM0IsQ0FBQztJQUVELE1BQU0sQ0FBQyxVQUFVLENBQUMsUUFBaUI7UUFDakMsK0NBQStDO1FBQy9DLElBQUksQ0FBQyxRQUFRO1lBQUUsT0FBTyxLQUFLLENBQUM7UUFDNUIsTUFBTSxJQUFJLEdBQUcsUUFBZSxDQUFDO1FBQzdCLE9BQU8sT0FBTyxJQUFJLENBQUMsVUFBVSxLQUFLLFFBQVEsSUFBSSxPQUFPLElBQUksQ0FBQyxPQUFPLEtBQUssUUFBUSxDQUFDO0lBQ2pGLENBQUM7Q0FDRjtBQWpCRCxvQ0FpQkMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIZWFkZXJCYWcsIEh0dHBNZXNzYWdlLCBIdHRwUmVzcG9uc2UgYXMgSUh0dHBSZXNwb25zZSB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG50eXBlIEh0dHBSZXNwb25zZU9wdGlvbnMgPSBQYXJ0aWFsPEh0dHBNZXNzYWdlPiAmIHtcbiAgc3RhdHVzQ29kZTogbnVtYmVyO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBIdHRwUmVzcG9uc2UgZXh0ZW5kcyBJSHR0cFJlc3BvbnNlIHt9XG5cbmV4cG9ydCBjbGFzcyBIdHRwUmVzcG9uc2Uge1xuICBwdWJsaWMgc3RhdHVzQ29kZTogbnVtYmVyO1xuICBwdWJsaWMgaGVhZGVyczogSGVhZGVyQmFnO1xuICBwdWJsaWMgYm9keT86IGFueTtcblxuICBjb25zdHJ1Y3RvcihvcHRpb25zOiBIdHRwUmVzcG9uc2VPcHRpb25zKSB7XG4gICAgdGhpcy5zdGF0dXNDb2RlID0gb3B0aW9ucy5zdGF0dXNDb2RlO1xuICAgIHRoaXMuaGVhZGVycyA9IG9wdGlvbnMuaGVhZGVycyB8fCB7fTtcbiAgICB0aGlzLmJvZHkgPSBvcHRpb25zLmJvZHk7XG4gIH1cblxuICBzdGF0aWMgaXNJbnN0YW5jZShyZXNwb25zZTogdW5rbm93bik6IHJlc3BvbnNlIGlzIEh0dHBSZXNwb25zZSB7XG4gICAgLy9kZXRlcm1pbmUgaWYgcmVzcG9uc2UgaXMgYSB2YWxpZCBIdHRwUmVzcG9uc2VcbiAgICBpZiAoIXJlc3BvbnNlKSByZXR1cm4gZmFsc2U7XG4gICAgY29uc3QgcmVzcCA9IHJlc3BvbnNlIGFzIGFueTtcbiAgICByZXR1cm4gdHlwZW9mIHJlc3Auc3RhdHVzQ29kZSA9PT0gXCJudW1iZXJcIiAmJiB0eXBlb2YgcmVzcC5oZWFkZXJzID09PSBcIm9iamVjdFwiO1xuICB9XG59XG4iXX0= + +/***/ }), + +/***/ 67498: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(41772), exports); +tslib_1.__exportStar(__nccwpck_require__(87577), exports); +tslib_1.__exportStar(__nccwpck_require__(56695), exports); +tslib_1.__exportStar(__nccwpck_require__(20797), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseURBQStCO0FBQy9CLHdEQUE4QjtBQUM5Qix3REFBOEI7QUFDOUIsNERBQWtDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vaHR0cFJlc3BvbnNlXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9odHRwUmVxdWVzdFwiO1xuZXhwb3J0ICogZnJvbSBcIi4vaHR0cEhhbmRsZXJcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2lzVmFsaWRIb3N0bmFtZVwiO1xuIl19 + +/***/ }), + +/***/ 20797: +/***/ ((__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\.\-]{1,61}[a-z0-9]$/; + return hostPattern.test(hostname); +} +exports.isValidHostname = isValidHostname; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXNWYWxpZEhvc3RuYW1lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2lzVmFsaWRIb3N0bmFtZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxTQUFnQixlQUFlLENBQUMsUUFBZ0I7SUFDOUMsTUFBTSxXQUFXLEdBQUcsc0NBQXNDLENBQUM7SUFDM0QsT0FBTyxXQUFXLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBQ3BDLENBQUM7QUFIRCwwQ0FHQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBpc1ZhbGlkSG9zdG5hbWUoaG9zdG5hbWU6IHN0cmluZyk6IGJvb2xlYW4ge1xuICBjb25zdCBob3N0UGF0dGVybiA9IC9eW2EtejAtOV1bYS16MC05XFwuXFwtXXsxLDYxfVthLXowLTldJC87XG4gIHJldHVybiBob3N0UGF0dGVybi50ZXN0KGhvc3RuYW1lKTtcbn1cbiJdfQ== + +/***/ }), + +/***/ 71035: +/***/ ((__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__(87834); +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsOERBQXFEO0FBRXJELFNBQWdCLGdCQUFnQixDQUFDLEtBQXdCO0lBQ3ZELE1BQU0sS0FBSyxHQUFhLEVBQUUsQ0FBQztJQUMzQixLQUFLLElBQUksR0FBRyxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsSUFBSSxFQUFFLEVBQUU7UUFDekMsTUFBTSxLQUFLLEdBQUcsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQ3pCLEdBQUcsR0FBRywyQkFBUyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQ3JCLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsRUFBRTtZQUN4QixLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxJQUFJLEdBQUcsS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUcsSUFBSSxFQUFFLENBQUMsRUFBRSxFQUFFO2dCQUNsRCxLQUFLLENBQUMsSUFBSSxDQUFDLEdBQUcsR0FBRyxJQUFJLDJCQUFTLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDO2FBQzdDO1NBQ0Y7YUFBTTtZQUNMLElBQUksT0FBTyxHQUFHLEdBQUcsQ0FBQztZQUNsQixJQUFJLEtBQUssSUFBSSxPQUFPLEtBQUssS0FBSyxRQUFRLEVBQUU7Z0JBQ3RDLE9BQU8sSUFBSSxJQUFJLDJCQUFTLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQzthQUNuQztZQUNELEtBQUssQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUM7U0FDckI7S0FDRjtJQUVELE9BQU8sS0FBSyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUN6QixDQUFDO0FBbkJELDRDQW1CQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFF1ZXJ5UGFyYW1ldGVyQmFnIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5pbXBvcnQgeyBlc2NhcGVVcmkgfSBmcm9tIFwiQGF3cy1zZGsvdXRpbC11cmktZXNjYXBlXCI7XG5cbmV4cG9ydCBmdW5jdGlvbiBidWlsZFF1ZXJ5U3RyaW5nKHF1ZXJ5OiBRdWVyeVBhcmFtZXRlckJhZyk6IHN0cmluZyB7XG4gIGNvbnN0IHBhcnRzOiBzdHJpbmdbXSA9IFtdO1xuICBmb3IgKGxldCBrZXkgb2YgT2JqZWN0LmtleXMocXVlcnkpLnNvcnQoKSkge1xuICAgIGNvbnN0IHZhbHVlID0gcXVlcnlba2V5XTtcbiAgICBrZXkgPSBlc2NhcGVVcmkoa2V5KTtcbiAgICBpZiAoQXJyYXkuaXNBcnJheSh2YWx1ZSkpIHtcbiAgICAgIGZvciAobGV0IGkgPSAwLCBpTGVuID0gdmFsdWUubGVuZ3RoOyBpIDwgaUxlbjsgaSsrKSB7XG4gICAgICAgIHBhcnRzLnB1c2goYCR7a2V5fT0ke2VzY2FwZVVyaSh2YWx1ZVtpXSl9YCk7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIGxldCBxc0VudHJ5ID0ga2V5O1xuICAgICAgaWYgKHZhbHVlIHx8IHR5cGVvZiB2YWx1ZSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICBxc0VudHJ5ICs9IGA9JHtlc2NhcGVVcmkodmFsdWUpfWA7XG4gICAgICB9XG4gICAgICBwYXJ0cy5wdXNoKHFzRW50cnkpO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBwYXJ0cy5qb2luKFwiJlwiKTtcbn1cbiJdfQ== + +/***/ }), + +/***/ 22026: +/***/ ((__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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsU0FBZ0IsZ0JBQWdCLENBQUMsV0FBbUI7SUFDbEQsTUFBTSxLQUFLLEdBQXNCLEVBQUUsQ0FBQztJQUNwQyxXQUFXLEdBQUcsV0FBVyxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7SUFFN0MsSUFBSSxXQUFXLEVBQUU7UUFDZixLQUFLLE1BQU0sSUFBSSxJQUFJLFdBQVcsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEVBQUU7WUFDekMsSUFBSSxDQUFDLEdBQUcsRUFBRSxLQUFLLEdBQUcsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztZQUMxQyxHQUFHLEdBQUcsa0JBQWtCLENBQUMsR0FBRyxDQUFDLENBQUM7WUFDOUIsSUFBSSxLQUFLLEVBQUU7Z0JBQ1QsS0FBSyxHQUFHLGtCQUFrQixDQUFDLEtBQUssQ0FBQyxDQUFDO2FBQ25DO1lBQ0QsSUFBSSxDQUFDLENBQUMsR0FBRyxJQUFJLEtBQUssQ0FBQyxFQUFFO2dCQUNuQixLQUFLLENBQUMsR0FBRyxDQUFDLEdBQUcsS0FBSyxDQUFDO2FBQ3BCO2lCQUFNLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsRUFBRTtnQkFDbkMsS0FBSyxDQUFDLEdBQUcsQ0FBbUIsQ0FBQyxJQUFJLENBQUMsS0FBZSxDQUFDLENBQUM7YUFDckQ7aUJBQU07Z0JBQ0wsS0FBSyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBVyxFQUFFLEtBQWUsQ0FBQyxDQUFDO2FBQ3REO1NBQ0Y7S0FDRjtJQUVELE9BQU8sS0FBSyxDQUFDO0FBQ2YsQ0FBQztBQXRCRCw0Q0FzQkMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBRdWVyeVBhcmFtZXRlckJhZyB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgZnVuY3Rpb24gcGFyc2VRdWVyeVN0cmluZyhxdWVyeXN0cmluZzogc3RyaW5nKTogUXVlcnlQYXJhbWV0ZXJCYWcge1xuICBjb25zdCBxdWVyeTogUXVlcnlQYXJhbWV0ZXJCYWcgPSB7fTtcbiAgcXVlcnlzdHJpbmcgPSBxdWVyeXN0cmluZy5yZXBsYWNlKC9eXFw/LywgXCJcIik7XG5cbiAgaWYgKHF1ZXJ5c3RyaW5nKSB7XG4gICAgZm9yIChjb25zdCBwYWlyIG9mIHF1ZXJ5c3RyaW5nLnNwbGl0KFwiJlwiKSkge1xuICAgICAgbGV0IFtrZXksIHZhbHVlID0gbnVsbF0gPSBwYWlyLnNwbGl0KFwiPVwiKTtcbiAgICAgIGtleSA9IGRlY29kZVVSSUNvbXBvbmVudChrZXkpO1xuICAgICAgaWYgKHZhbHVlKSB7XG4gICAgICAgIHZhbHVlID0gZGVjb2RlVVJJQ29tcG9uZW50KHZhbHVlKTtcbiAgICAgIH1cbiAgICAgIGlmICghKGtleSBpbiBxdWVyeSkpIHtcbiAgICAgICAgcXVlcnlba2V5XSA9IHZhbHVlO1xuICAgICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KHF1ZXJ5W2tleV0pKSB7XG4gICAgICAgIChxdWVyeVtrZXldIGFzIEFycmF5PHN0cmluZz4pLnB1c2godmFsdWUgYXMgc3RyaW5nKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHF1ZXJ5W2tleV0gPSBbcXVlcnlba2V5XSBhcyBzdHJpbmcsIHZhbHVlIGFzIHN0cmluZ107XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHF1ZXJ5O1xufVxuIl19 + +/***/ }), + +/***/ 75239: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ALGORITHM_IDENTIFIER = exports.SIGNATURE_QUERY_PARAM = exports.TOKEN_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.TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; +exports.SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; +exports.ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLHFCQUFxQixHQUFHLGlCQUFpQixDQUFDO0FBQzFDLFFBQUEsc0JBQXNCLEdBQUcsa0JBQWtCLENBQUM7QUFDNUMsUUFBQSxvQkFBb0IsR0FBRyxZQUFZLENBQUM7QUFDcEMsUUFBQSxpQkFBaUIsR0FBRyxzQkFBc0IsQ0FBQztBQUMzQyxRQUFBLHFCQUFxQixHQUFHLGlCQUFpQixDQUFDO0FBRTFDLFFBQUEsb0JBQW9CLEdBQUcsa0JBQWtCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgQUxHT1JJVEhNX1FVRVJZX1BBUkFNID0gXCJYLUFtei1BbGdvcml0aG1cIjtcbmV4cG9ydCBjb25zdCBDUkVERU5USUFMX1FVRVJZX1BBUkFNID0gXCJYLUFtei1DcmVkZW50aWFsXCI7XG5leHBvcnQgY29uc3QgQU1aX0RBVEVfUVVFUllfUEFSQU0gPSBcIlgtQW16LURhdGVcIjtcbmV4cG9ydCBjb25zdCBUT0tFTl9RVUVSWV9QQVJBTSA9IFwiWC1BbXotU2VjdXJpdHktVG9rZW5cIjtcbmV4cG9ydCBjb25zdCBTSUdOQVRVUkVfUVVFUllfUEFSQU0gPSBcIlgtQW16LVNpZ25hdHVyZVwiO1xuXG5leHBvcnQgY29uc3QgQUxHT1JJVEhNX0lERU5USUZJRVIgPSBcIkFXUzQtSE1BQy1TSEEyNTZcIjtcbiJdfQ== + +/***/ }), + +/***/ 44568: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPresignedPost = void 0; +const signature_v4_1 = __nccwpck_require__(64172); +const util_format_url_1 = __nccwpck_require__(31391); +const util_hex_encoding_1 = __nccwpck_require__(73291); +const constants_1 = __nccwpck_require__(75239); +/** + * Builds the url and the form fields used for a presigned s3 post. + */ +const createPresignedPost = async (client, { Bucket, Key, Conditions = [], Fields = {}, Expires = 3600 }) => { + const { systemClockOffset, base64Encoder, utf8Decoder, sha256 } = client.config; + const now = new Date(Date.now() + systemClockOffset); + // signingDate in format like '20201028T070711Z'. + const signingDate = iso8601(now).replace(/[\-:]/g, ""); + const shortDate = signingDate.substr(0, 8); + const clientRegion = await client.config.region(); + // Prepare credentials. + const credentialScope = signature_v4_1.createScope(shortDate, clientRegion, "s3"); + const clientCredentials = await client.config.credentials(); + const credential = `${clientCredentials.accessKeyId}/${credentialScope}`; + const fields = { + ...Fields, + bucket: Bucket, + [constants_1.ALGORITHM_QUERY_PARAM]: constants_1.ALGORITHM_IDENTIFIER, + [constants_1.CREDENTIAL_QUERY_PARAM]: credential, + [constants_1.AMZ_DATE_QUERY_PARAM]: signingDate, + ...(clientCredentials.sessionToken ? { [constants_1.TOKEN_QUERY_PARAM]: clientCredentials.sessionToken } : {}), + }; + // Prepare policies. + const expiration = new Date(now.valueOf() + Expires * 1000); + const conditions = [ + ...Conditions, + ...Object.entries(fields).map(([k, v]) => ({ [k]: v })), + Key.endsWith("${filename}") + ? ["starts-with", "$key", Key.substring(0, Key.lastIndexOf("${filename}"))] + : { key: Key }, + ]; + const encodedPolicy = base64Encoder(utf8Decoder(JSON.stringify({ + expiration: iso8601(expiration), + conditions, + }))); + // Sign the request. + const signingKey = await signature_v4_1.getSigningKey(sha256, clientCredentials, shortDate, clientRegion, "s3"); + const signature = await hmac(sha256, signingKey, encodedPolicy); + const endpoint = await client.config.endpoint(); + if (!client.config.bucketEndpoint) { + endpoint.path = `/${Bucket}`; + } + return { + url: util_format_url_1.formatUrl(endpoint), + fields: { + ...fields, + key: Key, + Policy: encodedPolicy, + [constants_1.SIGNATURE_QUERY_PARAM]: util_hex_encoding_1.toHex(signature), + }, + }; +}; +exports.createPresignedPost = createPresignedPost; +const iso8601 = (date) => date.toISOString().replace(/\.\d{3}Z$/, "Z"); +const hmac = (ctor, secret, data) => { + const hash = new ctor(secret); + hash.update(data); + return hash.digest(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlUHJlc2lnbmVkUG9zdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGVQcmVzaWduZWRQb3N0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLHdEQUFtRTtBQUVuRSw4REFBcUQ7QUFDckQsa0VBQW1EO0FBRW5ELDJDQU9xQjtBQWtCckI7O0dBRUc7QUFDSSxNQUFNLG1CQUFtQixHQUFHLEtBQUssRUFDdEMsTUFBZ0IsRUFDaEIsRUFBRSxNQUFNLEVBQUUsR0FBRyxFQUFFLFVBQVUsR0FBRyxFQUFFLEVBQUUsTUFBTSxHQUFHLEVBQUUsRUFBRSxPQUFPLEdBQUcsSUFBSSxFQUF3QixFQUMzRCxFQUFFO0lBQzFCLE1BQU0sRUFBRSxpQkFBaUIsRUFBRSxhQUFhLEVBQUUsV0FBVyxFQUFFLE1BQU0sRUFBRSxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUM7SUFDaEYsTUFBTSxHQUFHLEdBQUcsSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxHQUFHLGlCQUFpQixDQUFDLENBQUM7SUFFckQsaURBQWlEO0lBQ2pELE1BQU0sV0FBVyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxPQUFPLENBQUMsUUFBUSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0lBQ3ZELE1BQU0sU0FBUyxHQUFHLFdBQVcsQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0lBQzNDLE1BQU0sWUFBWSxHQUFHLE1BQU0sTUFBTSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUUsQ0FBQztJQUVsRCx1QkFBdUI7SUFDdkIsTUFBTSxlQUFlLEdBQUcsMEJBQVcsQ0FBQyxTQUFTLEVBQUUsWUFBWSxFQUFFLElBQUksQ0FBQyxDQUFDO0lBQ25FLE1BQU0saUJBQWlCLEdBQUcsTUFBTSxNQUFNLENBQUMsTUFBTSxDQUFDLFdBQVcsRUFBRSxDQUFDO0lBQzVELE1BQU0sVUFBVSxHQUFHLEdBQUcsaUJBQWlCLENBQUMsV0FBVyxJQUFJLGVBQWUsRUFBRSxDQUFDO0lBRXpFLE1BQU0sTUFBTSxHQUFXO1FBQ3JCLEdBQUcsTUFBTTtRQUNULE1BQU0sRUFBRSxNQUFNO1FBQ2QsQ0FBQyxpQ0FBcUIsQ0FBQyxFQUFFLGdDQUFvQjtRQUM3QyxDQUFDLGtDQUFzQixDQUFDLEVBQUUsVUFBVTtRQUNwQyxDQUFDLGdDQUFvQixDQUFDLEVBQUUsV0FBVztRQUNuQyxHQUFHLENBQUMsaUJBQWlCLENBQUMsWUFBWSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsNkJBQWlCLENBQUMsRUFBRSxpQkFBaUIsQ0FBQyxZQUFZLEVBQUUsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDO0tBQ25HLENBQUM7SUFFRixvQkFBb0I7SUFDcEIsTUFBTSxVQUFVLEdBQUcsSUFBSSxJQUFJLENBQUMsR0FBRyxDQUFDLE9BQU8sRUFBRSxHQUFHLE9BQU8sR0FBRyxJQUFJLENBQUMsQ0FBQztJQUM1RCxNQUFNLFVBQVUsR0FBa0I7UUFDaEMsR0FBRyxVQUFVO1FBQ2IsR0FBRyxNQUFNLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDO1FBQ3ZELEdBQUcsQ0FBQyxRQUFRLENBQUMsYUFBYSxDQUFDO1lBQ3pCLENBQUMsQ0FBQyxDQUFDLGFBQWEsRUFBRSxNQUFNLEVBQUUsR0FBRyxDQUFDLFNBQVMsQ0FBQyxDQUFDLEVBQUUsR0FBRyxDQUFDLFdBQVcsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDO1lBQzNFLENBQUMsQ0FBQyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUU7S0FDakIsQ0FBQztJQUNGLE1BQU0sYUFBYSxHQUFHLGFBQWEsQ0FDakMsV0FBVyxDQUNULElBQUksQ0FBQyxTQUFTLENBQUM7UUFDYixVQUFVLEVBQUUsT0FBTyxDQUFDLFVBQVUsQ0FBQztRQUMvQixVQUFVO0tBQ1gsQ0FBQyxDQUNILENBQ0YsQ0FBQztJQUVGLG9CQUFvQjtJQUNwQixNQUFNLFVBQVUsR0FBRyxNQUFNLDRCQUFhLENBQUMsTUFBTSxFQUFFLGlCQUFpQixFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDakcsTUFBTSxTQUFTLEdBQUcsTUFBTSxJQUFJLENBQUMsTUFBTSxFQUFFLFVBQVUsRUFBRSxhQUFhLENBQUMsQ0FBQztJQUVoRSxNQUFNLFFBQVEsR0FBRyxNQUFNLE1BQU0sQ0FBQyxNQUFNLENBQUMsUUFBUSxFQUFFLENBQUM7SUFDaEQsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsY0FBYyxFQUFFO1FBQ2pDLFFBQVEsQ0FBQyxJQUFJLEdBQUcsSUFBSSxNQUFNLEVBQUUsQ0FBQztLQUM5QjtJQUVELE9BQU87UUFDTCxHQUFHLEVBQUUsMkJBQVMsQ0FBQyxRQUFRLENBQUM7UUFDeEIsTUFBTSxFQUFFO1lBQ04sR0FBRyxNQUFNO1lBQ1QsR0FBRyxFQUFFLEdBQUc7WUFDUixNQUFNLEVBQUUsYUFBYTtZQUNyQixDQUFDLGlDQUFxQixDQUFDLEVBQUUseUJBQUssQ0FBQyxTQUFTLENBQUM7U0FDMUM7S0FDRixDQUFDO0FBQ0osQ0FBQyxDQUFDO0FBOURXLFFBQUEsbUJBQW1CLHVCQThEOUI7QUFFRixNQUFNLE9BQU8sR0FBRyxDQUFDLElBQVUsRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLFdBQVcsRUFBRSxDQUFDLE9BQU8sQ0FBQyxXQUFXLEVBQUUsR0FBRyxDQUFDLENBQUM7QUFFN0UsTUFBTSxJQUFJLEdBQUcsQ0FBQyxJQUFxQixFQUFFLE1BQWtCLEVBQUUsSUFBZ0IsRUFBdUIsRUFBRTtJQUNoRyxNQUFNLElBQUksR0FBRyxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQztJQUM5QixJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ2xCLE9BQU8sSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDO0FBQ3ZCLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFMzQ2xpZW50IH0gZnJvbSBcIkBhd3Mtc2RrL2NsaWVudC1zM1wiO1xuaW1wb3J0IHsgY3JlYXRlU2NvcGUsIGdldFNpZ25pbmdLZXkgfSBmcm9tIFwiQGF3cy1zZGsvc2lnbmF0dXJlLXY0XCI7XG5pbXBvcnQgeyBIYXNoQ29uc3RydWN0b3IsIFNvdXJjZURhdGEgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcbmltcG9ydCB7IGZvcm1hdFVybCB9IGZyb20gXCJAYXdzLXNkay91dGlsLWZvcm1hdC11cmxcIjtcbmltcG9ydCB7IHRvSGV4IH0gZnJvbSBcIkBhd3Mtc2RrL3V0aWwtaGV4LWVuY29kaW5nXCI7XG5cbmltcG9ydCB7XG4gIEFMR09SSVRITV9JREVOVElGSUVSLFxuICBBTEdPUklUSE1fUVVFUllfUEFSQU0sXG4gIEFNWl9EQVRFX1FVRVJZX1BBUkFNLFxuICBDUkVERU5USUFMX1FVRVJZX1BBUkFNLFxuICBTSUdOQVRVUkVfUVVFUllfUEFSQU0sXG4gIFRPS0VOX1FVRVJZX1BBUkFNLFxufSBmcm9tIFwiLi9jb25zdGFudHNcIjtcbmltcG9ydCB7IENvbmRpdGlvbnMgYXMgUG9saWN5RW50cnkgfSBmcm9tIFwiLi90eXBlc1wiO1xuXG50eXBlIEZpZWxkcyA9IHsgW2tleTogc3RyaW5nXTogc3RyaW5nIH07XG5cbmV4cG9ydCBpbnRlcmZhY2UgUHJlc2lnbmVkUG9zdE9wdGlvbnMge1xuICBCdWNrZXQ6IHN0cmluZztcbiAgS2V5OiBzdHJpbmc7XG4gIENvbmRpdGlvbnM/OiBQb2xpY3lFbnRyeVtdO1xuICBGaWVsZHM/OiBGaWVsZHM7XG4gIEV4cGlyZXM/OiBudW1iZXI7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgUHJlc2lnbmVkUG9zdCB7XG4gIHVybDogc3RyaW5nO1xuICBmaWVsZHM6IHt9O1xufVxuXG4vKipcbiAqIEJ1aWxkcyB0aGUgdXJsIGFuZCB0aGUgZm9ybSBmaWVsZHMgdXNlZCBmb3IgYSBwcmVzaWduZWQgczMgcG9zdC5cbiAqL1xuZXhwb3J0IGNvbnN0IGNyZWF0ZVByZXNpZ25lZFBvc3QgPSBhc3luYyAoXG4gIGNsaWVudDogUzNDbGllbnQsXG4gIHsgQnVja2V0LCBLZXksIENvbmRpdGlvbnMgPSBbXSwgRmllbGRzID0ge30sIEV4cGlyZXMgPSAzNjAwIH06IFByZXNpZ25lZFBvc3RPcHRpb25zXG4pOiBQcm9taXNlPFByZXNpZ25lZFBvc3Q+ID0+IHtcbiAgY29uc3QgeyBzeXN0ZW1DbG9ja09mZnNldCwgYmFzZTY0RW5jb2RlciwgdXRmOERlY29kZXIsIHNoYTI1NiB9ID0gY2xpZW50LmNvbmZpZztcbiAgY29uc3Qgbm93ID0gbmV3IERhdGUoRGF0ZS5ub3coKSArIHN5c3RlbUNsb2NrT2Zmc2V0KTtcblxuICAvLyBzaWduaW5nRGF0ZSBpbiBmb3JtYXQgbGlrZSAnMjAyMDEwMjhUMDcwNzExWicuXG4gIGNvbnN0IHNpZ25pbmdEYXRlID0gaXNvODYwMShub3cpLnJlcGxhY2UoL1tcXC06XS9nLCBcIlwiKTtcbiAgY29uc3Qgc2hvcnREYXRlID0gc2lnbmluZ0RhdGUuc3Vic3RyKDAsIDgpO1xuICBjb25zdCBjbGllbnRSZWdpb24gPSBhd2FpdCBjbGllbnQuY29uZmlnLnJlZ2lvbigpO1xuXG4gIC8vIFByZXBhcmUgY3JlZGVudGlhbHMuXG4gIGNvbnN0IGNyZWRlbnRpYWxTY29wZSA9IGNyZWF0ZVNjb3BlKHNob3J0RGF0ZSwgY2xpZW50UmVnaW9uLCBcInMzXCIpO1xuICBjb25zdCBjbGllbnRDcmVkZW50aWFscyA9IGF3YWl0IGNsaWVudC5jb25maWcuY3JlZGVudGlhbHMoKTtcbiAgY29uc3QgY3JlZGVudGlhbCA9IGAke2NsaWVudENyZWRlbnRpYWxzLmFjY2Vzc0tleUlkfS8ke2NyZWRlbnRpYWxTY29wZX1gO1xuXG4gIGNvbnN0IGZpZWxkczogRmllbGRzID0ge1xuICAgIC4uLkZpZWxkcyxcbiAgICBidWNrZXQ6IEJ1Y2tldCxcbiAgICBbQUxHT1JJVEhNX1FVRVJZX1BBUkFNXTogQUxHT1JJVEhNX0lERU5USUZJRVIsXG4gICAgW0NSRURFTlRJQUxfUVVFUllfUEFSQU1dOiBjcmVkZW50aWFsLFxuICAgIFtBTVpfREFURV9RVUVSWV9QQVJBTV06IHNpZ25pbmdEYXRlLFxuICAgIC4uLihjbGllbnRDcmVkZW50aWFscy5zZXNzaW9uVG9rZW4gPyB7IFtUT0tFTl9RVUVSWV9QQVJBTV06IGNsaWVudENyZWRlbnRpYWxzLnNlc3Npb25Ub2tlbiB9IDoge30pLFxuICB9O1xuXG4gIC8vIFByZXBhcmUgcG9saWNpZXMuXG4gIGNvbnN0IGV4cGlyYXRpb24gPSBuZXcgRGF0ZShub3cudmFsdWVPZigpICsgRXhwaXJlcyAqIDEwMDApO1xuICBjb25zdCBjb25kaXRpb25zOiBQb2xpY3lFbnRyeVtdID0gW1xuICAgIC4uLkNvbmRpdGlvbnMsXG4gICAgLi4uT2JqZWN0LmVudHJpZXMoZmllbGRzKS5tYXAoKFtrLCB2XSkgPT4gKHsgW2tdOiB2IH0pKSxcbiAgICBLZXkuZW5kc1dpdGgoXCIke2ZpbGVuYW1lfVwiKVxuICAgICAgPyBbXCJzdGFydHMtd2l0aFwiLCBcIiRrZXlcIiwgS2V5LnN1YnN0cmluZygwLCBLZXkubGFzdEluZGV4T2YoXCIke2ZpbGVuYW1lfVwiKSldXG4gICAgICA6IHsga2V5OiBLZXkgfSxcbiAgXTtcbiAgY29uc3QgZW5jb2RlZFBvbGljeSA9IGJhc2U2NEVuY29kZXIoXG4gICAgdXRmOERlY29kZXIoXG4gICAgICBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgIGV4cGlyYXRpb246IGlzbzg2MDEoZXhwaXJhdGlvbiksXG4gICAgICAgIGNvbmRpdGlvbnMsXG4gICAgICB9KVxuICAgIClcbiAgKTtcblxuICAvLyBTaWduIHRoZSByZXF1ZXN0LlxuICBjb25zdCBzaWduaW5nS2V5ID0gYXdhaXQgZ2V0U2lnbmluZ0tleShzaGEyNTYsIGNsaWVudENyZWRlbnRpYWxzLCBzaG9ydERhdGUsIGNsaWVudFJlZ2lvbiwgXCJzM1wiKTtcbiAgY29uc3Qgc2lnbmF0dXJlID0gYXdhaXQgaG1hYyhzaGEyNTYsIHNpZ25pbmdLZXksIGVuY29kZWRQb2xpY3kpO1xuXG4gIGNvbnN0IGVuZHBvaW50ID0gYXdhaXQgY2xpZW50LmNvbmZpZy5lbmRwb2ludCgpO1xuICBpZiAoIWNsaWVudC5jb25maWcuYnVja2V0RW5kcG9pbnQpIHtcbiAgICBlbmRwb2ludC5wYXRoID0gYC8ke0J1Y2tldH1gO1xuICB9XG5cbiAgcmV0dXJuIHtcbiAgICB1cmw6IGZvcm1hdFVybChlbmRwb2ludCksXG4gICAgZmllbGRzOiB7XG4gICAgICAuLi5maWVsZHMsXG4gICAgICBrZXk6IEtleSxcbiAgICAgIFBvbGljeTogZW5jb2RlZFBvbGljeSxcbiAgICAgIFtTSUdOQVRVUkVfUVVFUllfUEFSQU1dOiB0b0hleChzaWduYXR1cmUpLFxuICAgIH0sXG4gIH07XG59O1xuXG5jb25zdCBpc284NjAxID0gKGRhdGU6IERhdGUpID0+IGRhdGUudG9JU09TdHJpbmcoKS5yZXBsYWNlKC9cXC5cXGR7M31aJC8sIFwiWlwiKTtcblxuY29uc3QgaG1hYyA9IChjdG9yOiBIYXNoQ29uc3RydWN0b3IsIHNlY3JldDogU291cmNlRGF0YSwgZGF0YTogU291cmNlRGF0YSk6IFByb21pc2U8VWludDhBcnJheT4gPT4ge1xuICBjb25zdCBoYXNoID0gbmV3IGN0b3Ioc2VjcmV0KTtcbiAgaGFzaC51cGRhdGUoZGF0YSk7XG4gIHJldHVybiBoYXNoLmRpZ2VzdCgpO1xufTtcbiJdfQ== + +/***/ }), + +/***/ 42104: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(44568), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsZ0VBQXNDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vY3JlYXRlUHJlc2lnbmVkUG9zdFwiO1xuIl19 + +/***/ }), + +/***/ 23584: +/***/ ((__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; +/** + * Errors encountered when the client clock and server clock cannot agree on the + * current time. + * + * These errors are retryable, assuming the SDK has enabled clock skew + * correction. + */ +exports.CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch", +]; +/** + * Errors that indicate the SDK is being throttled. + * + * These errors are always retryable. + */ +exports.THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException", +]; +/** + * Error codes that indicate transient issues + */ +exports.TRANSIENT_ERROR_CODES = ["AbortError", "TimeoutError", "RequestTimeout", "RequestTimeoutException"]; +/** + * Error codes that indicate transient issues + */ +exports.TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7Ozs7O0dBTUc7QUFDVSxRQUFBLHNCQUFzQixHQUFHO0lBQ3BDLGFBQWE7SUFDYiwyQkFBMkI7SUFDM0IsZ0JBQWdCO0lBQ2hCLG9CQUFvQjtJQUNwQixzQkFBc0I7SUFDdEIsdUJBQXVCO0NBQ3hCLENBQUM7QUFFRjs7OztHQUlHO0FBQ1UsUUFBQSxzQkFBc0IsR0FBRztJQUNwQyx3QkFBd0I7SUFDeEIsdUJBQXVCO0lBQ3ZCLHdCQUF3QjtJQUN4Qix5QkFBeUI7SUFDekIsd0NBQXdDO0lBQ3hDLHNCQUFzQjtJQUN0QixrQkFBa0I7SUFDbEIsMkJBQTJCO0lBQzNCLFVBQVU7SUFDVixvQkFBb0I7SUFDcEIsWUFBWTtJQUNaLHFCQUFxQjtJQUNyQiwwQkFBMEI7SUFDMUIsZ0NBQWdDO0NBQ2pDLENBQUM7QUFFRjs7R0FFRztBQUNVLFFBQUEscUJBQXFCLEdBQUcsQ0FBQyxZQUFZLEVBQUUsY0FBYyxFQUFFLGdCQUFnQixFQUFFLHlCQUF5QixDQUFDLENBQUM7QUFFakg7O0dBRUc7QUFDVSxRQUFBLDRCQUE0QixHQUFHLENBQUMsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEVycm9ycyBlbmNvdW50ZXJlZCB3aGVuIHRoZSBjbGllbnQgY2xvY2sgYW5kIHNlcnZlciBjbG9jayBjYW5ub3QgYWdyZWUgb24gdGhlXG4gKiBjdXJyZW50IHRpbWUuXG4gKlxuICogVGhlc2UgZXJyb3JzIGFyZSByZXRyeWFibGUsIGFzc3VtaW5nIHRoZSBTREsgaGFzIGVuYWJsZWQgY2xvY2sgc2tld1xuICogY29ycmVjdGlvbi5cbiAqL1xuZXhwb3J0IGNvbnN0IENMT0NLX1NLRVdfRVJST1JfQ09ERVMgPSBbXG4gIFwiQXV0aEZhaWx1cmVcIixcbiAgXCJJbnZhbGlkU2lnbmF0dXJlRXhjZXB0aW9uXCIsXG4gIFwiUmVxdWVzdEV4cGlyZWRcIixcbiAgXCJSZXF1ZXN0SW5UaGVGdXR1cmVcIixcbiAgXCJSZXF1ZXN0VGltZVRvb1NrZXdlZFwiLFxuICBcIlNpZ25hdHVyZURvZXNOb3RNYXRjaFwiLFxuXTtcblxuLyoqXG4gKiBFcnJvcnMgdGhhdCBpbmRpY2F0ZSB0aGUgU0RLIGlzIGJlaW5nIHRocm90dGxlZC5cbiAqXG4gKiBUaGVzZSBlcnJvcnMgYXJlIGFsd2F5cyByZXRyeWFibGUuXG4gKi9cbmV4cG9ydCBjb25zdCBUSFJPVFRMSU5HX0VSUk9SX0NPREVTID0gW1xuICBcIkJhbmR3aWR0aExpbWl0RXhjZWVkZWRcIixcbiAgXCJFQzJUaHJvdHRsZWRFeGNlcHRpb25cIixcbiAgXCJMaW1pdEV4Y2VlZGVkRXhjZXB0aW9uXCIsXG4gIFwiUHJpb3JSZXF1ZXN0Tm90Q29tcGxldGVcIixcbiAgXCJQcm92aXNpb25lZFRocm91Z2hwdXRFeGNlZWRlZEV4Y2VwdGlvblwiLFxuICBcIlJlcXVlc3RMaW1pdEV4Y2VlZGVkXCIsXG4gIFwiUmVxdWVzdFRocm90dGxlZFwiLFxuICBcIlJlcXVlc3RUaHJvdHRsZWRFeGNlcHRpb25cIixcbiAgXCJTbG93RG93blwiLFxuICBcIlRocm90dGxlZEV4Y2VwdGlvblwiLFxuICBcIlRocm90dGxpbmdcIixcbiAgXCJUaHJvdHRsaW5nRXhjZXB0aW9uXCIsXG4gIFwiVG9vTWFueVJlcXVlc3RzRXhjZXB0aW9uXCIsXG4gIFwiVHJhbnNhY3Rpb25JblByb2dyZXNzRXhjZXB0aW9uXCIsIC8vIER5bmFtb0RCXG5dO1xuXG4vKipcbiAqIEVycm9yIGNvZGVzIHRoYXQgaW5kaWNhdGUgdHJhbnNpZW50IGlzc3Vlc1xuICovXG5leHBvcnQgY29uc3QgVFJBTlNJRU5UX0VSUk9SX0NPREVTID0gW1wiQWJvcnRFcnJvclwiLCBcIlRpbWVvdXRFcnJvclwiLCBcIlJlcXVlc3RUaW1lb3V0XCIsIFwiUmVxdWVzdFRpbWVvdXRFeGNlcHRpb25cIl07XG5cbi8qKlxuICogRXJyb3IgY29kZXMgdGhhdCBpbmRpY2F0ZSB0cmFuc2llbnQgaXNzdWVzXG4gKi9cbmV4cG9ydCBjb25zdCBUUkFOU0lFTlRfRVJST1JfU1RBVFVTX0NPREVTID0gWzUwMCwgNTAyLCA1MDMsIDUwNF07XG4iXX0= + +/***/ }), + +/***/ 14011: +/***/ ((__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__(23584); +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsMkNBS3FCO0FBRWQsTUFBTSxrQkFBa0IsR0FBRyxDQUFDLEtBQWUsRUFBRSxFQUFFLENBQUMsS0FBSyxDQUFDLFVBQVUsS0FBSyxTQUFTLENBQUM7QUFBekUsUUFBQSxrQkFBa0Isc0JBQXVEO0FBRS9FLE1BQU0sZ0JBQWdCLEdBQUcsQ0FBQyxLQUFlLEVBQUUsRUFBRSxDQUFDLGtDQUFzQixDQUFDLFFBQVEsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUM7QUFBcEYsUUFBQSxnQkFBZ0Isb0JBQW9FO0FBRTFGLE1BQU0saUJBQWlCLEdBQUcsQ0FBQyxLQUFlLEVBQUUsRUFBRTs7SUFDbkQsT0FBQSxPQUFBLEtBQUssQ0FBQyxTQUFTLDBDQUFFLGNBQWMsTUFBSyxHQUFHO1FBQ3ZDLGtDQUFzQixDQUFDLFFBQVEsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDO1FBQzNDLE9BQUEsS0FBSyxDQUFDLFVBQVUsMENBQUUsVUFBVSxLQUFJLElBQUksQ0FBQTtDQUFBLENBQUM7QUFIMUIsUUFBQSxpQkFBaUIscUJBR1M7QUFFaEMsTUFBTSxnQkFBZ0IsR0FBRyxDQUFDLEtBQWUsRUFBRSxFQUFFOztJQUNsRCxPQUFBLGlDQUFxQixDQUFDLFFBQVEsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDO1FBQzFDLHdDQUE0QixDQUFDLFFBQVEsQ0FBQyxPQUFBLEtBQUssQ0FBQyxTQUFTLDBDQUFFLGNBQWMsS0FBSSxDQUFDLENBQUMsQ0FBQTtDQUFBLENBQUM7QUFGakUsUUFBQSxnQkFBZ0Isb0JBRWlEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU2RrRXJyb3IgfSBmcm9tIFwiQGF3cy1zZGsvc21pdGh5LWNsaWVudFwiO1xuXG5pbXBvcnQge1xuICBDTE9DS19TS0VXX0VSUk9SX0NPREVTLFxuICBUSFJPVFRMSU5HX0VSUk9SX0NPREVTLFxuICBUUkFOU0lFTlRfRVJST1JfQ09ERVMsXG4gIFRSQU5TSUVOVF9FUlJPUl9TVEFUVVNfQ09ERVMsXG59IGZyb20gXCIuL2NvbnN0YW50c1wiO1xuXG5leHBvcnQgY29uc3QgaXNSZXRyeWFibGVCeVRyYWl0ID0gKGVycm9yOiBTZGtFcnJvcikgPT4gZXJyb3IuJHJldHJ5YWJsZSAhPT0gdW5kZWZpbmVkO1xuXG5leHBvcnQgY29uc3QgaXNDbG9ja1NrZXdFcnJvciA9IChlcnJvcjogU2RrRXJyb3IpID0+IENMT0NLX1NLRVdfRVJST1JfQ09ERVMuaW5jbHVkZXMoZXJyb3IubmFtZSk7XG5cbmV4cG9ydCBjb25zdCBpc1Rocm90dGxpbmdFcnJvciA9IChlcnJvcjogU2RrRXJyb3IpID0+XG4gIGVycm9yLiRtZXRhZGF0YT8uaHR0cFN0YXR1c0NvZGUgPT09IDQyOSB8fFxuICBUSFJPVFRMSU5HX0VSUk9SX0NPREVTLmluY2x1ZGVzKGVycm9yLm5hbWUpIHx8XG4gIGVycm9yLiRyZXRyeWFibGU/LnRocm90dGxpbmcgPT0gdHJ1ZTtcblxuZXhwb3J0IGNvbnN0IGlzVHJhbnNpZW50RXJyb3IgPSAoZXJyb3I6IFNka0Vycm9yKSA9PlxuICBUUkFOU0lFTlRfRVJST1JfQ09ERVMuaW5jbHVkZXMoZXJyb3IubmFtZSkgfHxcbiAgVFJBTlNJRU5UX0VSUk9SX1NUQVRVU19DT0RFUy5pbmNsdWRlcyhlcnJvci4kbWV0YWRhdGE/Lmh0dHBTdGF0dXNDb2RlIHx8IDApO1xuIl19 + +/***/ }), + +/***/ 4847: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.loadSharedConfigFiles = exports.ENV_CONFIG_PATH = exports.ENV_CREDENTIALS_PATH = void 0; +const fs_1 = __nccwpck_require__(35747); +const os_1 = __nccwpck_require__(12087); +const path_1 = __nccwpck_require__(85622); +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(getHomeDir(), ".aws", "credentials"), configFilepath = process.env[exports.ENV_CONFIG_PATH] || path_1.join(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))) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + 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]; // remove comments + 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(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQThCO0FBQzlCLDJCQUE2QjtBQUM3QiwrQkFBaUM7QUFFcEIsUUFBQSxvQkFBb0IsR0FBRyw2QkFBNkIsQ0FBQztBQUNyRCxRQUFBLGVBQWUsR0FBRyxpQkFBaUIsQ0FBQztBQStCakQsTUFBTSxZQUFZLEdBQUcsR0FBRyxFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQztBQUV6QixNQUFNLHFCQUFxQixHQUFHLENBQUMsT0FBeUIsRUFBRSxFQUE4QixFQUFFO0lBQy9GLE1BQU0sRUFDSixRQUFRLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyw0QkFBb0IsQ0FBQyxJQUFJLFdBQUksQ0FBQyxVQUFVLEVBQUUsRUFBRSxNQUFNLEVBQUUsYUFBYSxDQUFDLEVBQ3pGLGNBQWMsR0FBRyxPQUFPLENBQUMsR0FBRyxDQUFDLHVCQUFlLENBQUMsSUFBSSxXQUFJLENBQUMsVUFBVSxFQUFFLEVBQUUsTUFBTSxFQUFFLFFBQVEsQ0FBQyxHQUN0RixHQUFHLElBQUksQ0FBQztJQUVULE9BQU8sT0FBTyxDQUFDLEdBQUcsQ0FBQztRQUNqQixTQUFTLENBQUMsY0FBYyxDQUFDLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLElBQUksQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDLEtBQUssQ0FBQyxZQUFZLENBQUM7UUFDdEYsU0FBUyxDQUFDLFFBQVEsQ0FBQyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQyxLQUFLLENBQUMsWUFBWSxDQUFDO0tBQ3ZELENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxXQUFpQyxFQUFFLEVBQUU7UUFDNUMsTUFBTSxDQUFDLFVBQVUsRUFBRSxlQUFlLENBQUMsR0FBRyxXQUFXLENBQUM7UUFDbEQsT0FBTztZQUNMLFVBQVU7WUFDVixlQUFlO1NBQ2hCLENBQUM7SUFDSixDQUFDLENBQUMsQ0FBQztBQUNMLENBQUMsQ0FBQztBQWhCVyxRQUFBLHFCQUFxQix5QkFnQmhDO0FBRUYsTUFBTSxlQUFlLEdBQUcsOEJBQThCLENBQUM7QUFDdkQsTUFBTSxtQkFBbUIsR0FBRyxDQUFDLElBQW1CLEVBQWlCLEVBQUU7SUFDakUsTUFBTSxHQUFHLEdBQWtCLEVBQUUsQ0FBQztJQUM5QixLQUFLLE1BQU0sR0FBRyxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUU7UUFDbkMsSUFBSSxPQUE2QixDQUFDO1FBQ2xDLElBQUksR0FBRyxLQUFLLFNBQVMsRUFBRTtZQUNyQixHQUFHLENBQUMsT0FBTyxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUM7U0FDNUI7YUFBTSxJQUFJLENBQUMsT0FBTyxHQUFHLGVBQWUsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsRUFBRTtZQUNoRCw2REFBNkQ7WUFDN0QsTUFBTSxDQUFDLEVBQUUsRUFBRSxFQUFFLEVBQUUsYUFBYSxDQUFDLEdBQUcsT0FBTyxDQUFDO1lBQ3hDLElBQUksYUFBYSxFQUFFO2dCQUNqQixHQUFHLENBQUMsYUFBYSxDQUFDLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO2FBQ2hDO1NBQ0Y7S0FDRjtJQUVELE9BQU8sR0FBRyxDQUFDO0FBQ2IsQ0FBQyxDQUFDO0FBRUYsTUFBTSxvQkFBb0IsR0FBRyxDQUFDLFdBQVcsRUFBRSxtQkFBbUIsQ0FBQyxDQUFDO0FBQ2hFLE1BQU0sUUFBUSxHQUFHLENBQUMsT0FBZSxFQUFpQixFQUFFO0lBQ2xELE1BQU0sR0FBRyxHQUFrQixFQUFFLENBQUM7SUFDOUIsSUFBSSxjQUFrQyxDQUFDO0lBQ3ZDLEtBQUssSUFBSSxJQUFJLElBQUksT0FBTyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsRUFBRTtRQUN2QyxJQUFJLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLGtCQUFrQjtRQUN0RCxNQUFNLE9BQU8sR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLHVCQUF1QixDQUFDLENBQUM7UUFDcEQsSUFBSSxPQUFPLEVBQUU7WUFDWCxjQUFjLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQzVCLElBQUksb0JBQW9CLENBQUMsUUFBUSxDQUFDLGNBQWMsQ0FBQyxFQUFFO2dCQUNqRCxNQUFNLElBQUksS0FBSyxDQUFDLCtCQUErQixjQUFjLEdBQUcsQ0FBQyxDQUFDO2FBQ25FO1NBQ0Y7YUFBTSxJQUFJLGNBQWMsRUFBRTtZQUN6QixNQUFNLElBQUksR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLDJCQUEyQixDQUFDLENBQUM7WUFDckQsSUFBSSxJQUFJLEVBQUU7Z0JBQ1IsR0FBRyxDQUFDLGNBQWMsQ0FBQyxHQUFHLEdBQUcsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLENBQUM7Z0JBQ2hELEdBQUcsQ0FBQyxjQUFjLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7YUFDeEM7U0FDRjtLQUNGO0lBRUQsT0FBTyxHQUFHLENBQUM7QUFDYixDQUFDLENBQUM7QUFFRixNQUFNLFNBQVMsR0FBRyxDQUFDLElBQVksRUFBbUIsRUFBRSxDQUNsRCxJQUFJLE9BQU8sQ0FBQyxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsRUFBRTtJQUM5QixhQUFRLENBQUMsSUFBSSxFQUFFLE1BQU0sRUFBRSxDQUFDLEdBQUcsRUFBRSxJQUFJLEVBQUUsRUFBRTtRQUNuQyxJQUFJLEdBQUcsRUFBRTtZQUNQLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztTQUNiO2FBQU07WUFDTCxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7U0FDZjtJQUNILENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyxDQUFDLENBQUM7QUFFTCxNQUFNLFVBQVUsR0FBRyxHQUFXLEVBQUU7SUFDOUIsTUFBTSxFQUFFLElBQUksRUFBRSxXQUFXLEVBQUUsUUFBUSxFQUFFLFNBQVMsR0FBRyxLQUFLLFVBQUcsRUFBRSxFQUFFLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQztJQUU1RSxJQUFJLElBQUk7UUFBRSxPQUFPLElBQUksQ0FBQztJQUN0QixJQUFJLFdBQVc7UUFBRSxPQUFPLFdBQVcsQ0FBQztJQUNwQyxJQUFJLFFBQVE7UUFBRSxPQUFPLEdBQUcsU0FBUyxHQUFHLFFBQVEsRUFBRSxDQUFDO0lBRS9DLE9BQU8sWUFBTyxFQUFFLENBQUM7QUFDbkIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgcmVhZEZpbGUgfSBmcm9tIFwiZnNcIjtcbmltcG9ydCB7IGhvbWVkaXIgfSBmcm9tIFwib3NcIjtcbmltcG9ydCB7IGpvaW4sIHNlcCB9IGZyb20gXCJwYXRoXCI7XG5cbmV4cG9ydCBjb25zdCBFTlZfQ1JFREVOVElBTFNfUEFUSCA9IFwiQVdTX1NIQVJFRF9DUkVERU5USUFMU19GSUxFXCI7XG5leHBvcnQgY29uc3QgRU5WX0NPTkZJR19QQVRIID0gXCJBV1NfQ09ORklHX0ZJTEVcIjtcblxuZXhwb3J0IGludGVyZmFjZSBTaGFyZWRDb25maWdJbml0IHtcbiAgLyoqXG4gICAqIFRoZSBwYXRoIGF0IHdoaWNoIHRvIGxvY2F0ZSB0aGUgaW5pIGNyZWRlbnRpYWxzIGZpbGUuIERlZmF1bHRzIHRvIHRoZVxuICAgKiB2YWx1ZSBvZiB0aGUgYEFXU19TSEFSRURfQ1JFREVOVElBTFNfRklMRWAgZW52aXJvbm1lbnQgdmFyaWFibGUgKGlmXG4gICAqIGRlZmluZWQpIG9yIGB+Ly5hd3MvY3JlZGVudGlhbHNgIG90aGVyd2lzZS5cbiAgICovXG4gIGZpbGVwYXRoPzogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBUaGUgcGF0aCBhdCB3aGljaCB0byBsb2NhdGUgdGhlIGluaSBjb25maWcgZmlsZS4gRGVmYXVsdHMgdG8gdGhlIHZhbHVlIG9mXG4gICAqIHRoZSBgQVdTX0NPTkZJR19GSUxFYCBlbnZpcm9ubWVudCB2YXJpYWJsZSAoaWYgZGVmaW5lZCkgb3JcbiAgICogYH4vLmF3cy9jb25maWdgIG90aGVyd2lzZS5cbiAgICovXG4gIGNvbmZpZ0ZpbGVwYXRoPzogc3RyaW5nO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIFByb2ZpbGUge1xuICBba2V5OiBzdHJpbmddOiBzdHJpbmcgfCB1bmRlZmluZWQ7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgUGFyc2VkSW5pRGF0YSB7XG4gIFtrZXk6IHN0cmluZ106IFByb2ZpbGU7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgU2hhcmVkQ29uZmlnRmlsZXMge1xuICBjcmVkZW50aWFsc0ZpbGU6IFBhcnNlZEluaURhdGE7XG4gIGNvbmZpZ0ZpbGU6IFBhcnNlZEluaURhdGE7XG59XG5cbmNvbnN0IHN3YWxsb3dFcnJvciA9ICgpID0+ICh7fSk7XG5cbmV4cG9ydCBjb25zdCBsb2FkU2hhcmVkQ29uZmlnRmlsZXMgPSAoaW5pdDogU2hhcmVkQ29uZmlnSW5pdCA9IHt9KTogUHJvbWlzZTxTaGFyZWRDb25maWdGaWxlcz4gPT4ge1xuICBjb25zdCB7XG4gICAgZmlsZXBhdGggPSBwcm9jZXNzLmVudltFTlZfQ1JFREVOVElBTFNfUEFUSF0gfHwgam9pbihnZXRIb21lRGlyKCksIFwiLmF3c1wiLCBcImNyZWRlbnRpYWxzXCIpLFxuICAgIGNvbmZpZ0ZpbGVwYXRoID0gcHJvY2Vzcy5lbnZbRU5WX0NPTkZJR19QQVRIXSB8fCBqb2luKGdldEhvbWVEaXIoKSwgXCIuYXdzXCIsIFwiY29uZmlnXCIpLFxuICB9ID0gaW5pdDtcblxuICByZXR1cm4gUHJvbWlzZS5hbGwoW1xuICAgIHNsdXJwRmlsZShjb25maWdGaWxlcGF0aCkudGhlbihwYXJzZUluaSkudGhlbihub3JtYWxpemVDb25maWdGaWxlKS5jYXRjaChzd2FsbG93RXJyb3IpLFxuICAgIHNsdXJwRmlsZShmaWxlcGF0aCkudGhlbihwYXJzZUluaSkuY2F0Y2goc3dhbGxvd0Vycm9yKSxcbiAgXSkudGhlbigocGFyc2VkRmlsZXM6IEFycmF5PFBhcnNlZEluaURhdGE+KSA9PiB7XG4gICAgY29uc3QgW2NvbmZpZ0ZpbGUsIGNyZWRlbnRpYWxzRmlsZV0gPSBwYXJzZWRGaWxlcztcbiAgICByZXR1cm4ge1xuICAgICAgY29uZmlnRmlsZSxcbiAgICAgIGNyZWRlbnRpYWxzRmlsZSxcbiAgICB9O1xuICB9KTtcbn07XG5cbmNvbnN0IHByb2ZpbGVLZXlSZWdleCA9IC9ecHJvZmlsZVxccyhbXCInXSk/KFteXFwxXSspXFwxJC87XG5jb25zdCBub3JtYWxpemVDb25maWdGaWxlID0gKGRhdGE6IFBhcnNlZEluaURhdGEpOiBQYXJzZWRJbmlEYXRhID0+IHtcbiAgY29uc3QgbWFwOiBQYXJzZWRJbmlEYXRhID0ge307XG4gIGZvciAoY29uc3Qga2V5IG9mIE9iamVjdC5rZXlzKGRhdGEpKSB7XG4gICAgbGV0IG1hdGNoZXM6IEFycmF5PHN0cmluZz4gfCBudWxsO1xuICAgIGlmIChrZXkgPT09IFwiZGVmYXVsdFwiKSB7XG4gICAgICBtYXAuZGVmYXVsdCA9IGRhdGEuZGVmYXVsdDtcbiAgICB9IGVsc2UgaWYgKChtYXRjaGVzID0gcHJvZmlsZUtleVJlZ2V4LmV4ZWMoa2V5KSkpIHtcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnNcbiAgICAgIGNvbnN0IFtfMSwgXzIsIG5vcm1hbGl6ZWRLZXldID0gbWF0Y2hlcztcbiAgICAgIGlmIChub3JtYWxpemVkS2V5KSB7XG4gICAgICAgIG1hcFtub3JtYWxpemVkS2V5XSA9IGRhdGFba2V5XTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICByZXR1cm4gbWFwO1xufTtcblxuY29uc3QgcHJvZmlsZU5hbWVCbG9ja0xpc3QgPSBbXCJfX3Byb3RvX19cIiwgXCJwcm9maWxlIF9fcHJvdG9fX1wiXTtcbmNvbnN0IHBhcnNlSW5pID0gKGluaURhdGE6IHN0cmluZyk6IFBhcnNlZEluaURhdGEgPT4ge1xuICBjb25zdCBtYXA6IFBhcnNlZEluaURhdGEgPSB7fTtcbiAgbGV0IGN1cnJlbnRTZWN0aW9uOiBzdHJpbmcgfCB1bmRlZmluZWQ7XG4gIGZvciAobGV0IGxpbmUgb2YgaW5pRGF0YS5zcGxpdCgvXFxyP1xcbi8pKSB7XG4gICAgbGluZSA9IGxpbmUuc3BsaXQoLyhefFxccylbOyNdLylbMF07IC8vIHJlbW92ZSBjb21tZW50c1xuICAgIGNvbnN0IHNlY3Rpb24gPSBsaW5lLm1hdGNoKC9eXFxzKlxcWyhbXlxcW1xcXV0rKV1cXHMqJC8pO1xuICAgIGlmIChzZWN0aW9uKSB7XG4gICAgICBjdXJyZW50U2VjdGlvbiA9IHNlY3Rpb25bMV07XG4gICAgICBpZiAocHJvZmlsZU5hbWVCbG9ja0xpc3QuaW5jbHVkZXMoY3VycmVudFNlY3Rpb24pKSB7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcihgRm91bmQgaW52YWxpZCBwcm9maWxlIG5hbWUgXCIke2N1cnJlbnRTZWN0aW9ufVwiYCk7XG4gICAgICB9XG4gICAgfSBlbHNlIGlmIChjdXJyZW50U2VjdGlvbikge1xuICAgICAgY29uc3QgaXRlbSA9IGxpbmUubWF0Y2goL15cXHMqKC4rPylcXHMqPVxccyooLis/KVxccyokLyk7XG4gICAgICBpZiAoaXRlbSkge1xuICAgICAgICBtYXBbY3VycmVudFNlY3Rpb25dID0gbWFwW2N1cnJlbnRTZWN0aW9uXSB8fCB7fTtcbiAgICAgICAgbWFwW2N1cnJlbnRTZWN0aW9uXVtpdGVtWzFdXSA9IGl0ZW1bMl07XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIG1hcDtcbn07XG5cbmNvbnN0IHNsdXJwRmlsZSA9IChwYXRoOiBzdHJpbmcpOiBQcm9taXNlPHN0cmluZz4gPT5cbiAgbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgIHJlYWRGaWxlKHBhdGgsIFwidXRmOFwiLCAoZXJyLCBkYXRhKSA9PiB7XG4gICAgICBpZiAoZXJyKSB7XG4gICAgICAgIHJlamVjdChlcnIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmVzb2x2ZShkYXRhKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfSk7XG5cbmNvbnN0IGdldEhvbWVEaXIgPSAoKTogc3RyaW5nID0+IHtcbiAgY29uc3QgeyBIT01FLCBVU0VSUFJPRklMRSwgSE9NRVBBVEgsIEhPTUVEUklWRSA9IGBDOiR7c2VwfWAgfSA9IHByb2Nlc3MuZW52O1xuXG4gIGlmIChIT01FKSByZXR1cm4gSE9NRTtcbiAgaWYgKFVTRVJQUk9GSUxFKSByZXR1cm4gVVNFUlBST0ZJTEU7XG4gIGlmIChIT01FUEFUSCkgcmV0dXJuIGAke0hPTUVEUklWRX0ke0hPTUVQQVRIfWA7XG5cbiAgcmV0dXJuIGhvbWVkaXIoKTtcbn07XG4iXX0= + +/***/ }), + +/***/ 47210: +/***/ ((__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__(73291); +const constants_1 = __nccwpck_require__(13851); +const credentialDerivation_1 = __nccwpck_require__(45478); +const getCanonicalHeaders_1 = __nccwpck_require__(99201); +const getCanonicalQuery_1 = __nccwpck_require__(28706); +const getPayloadHash_1 = __nccwpck_require__(17902); +const hasHeader_1 = __nccwpck_require__(91402); +const moveHeadersToQuery_1 = __nccwpck_require__(35850); +const prepareRequest_1 = __nccwpck_require__(14952); +const utilDate_1 = __nccwpck_require__(57850); +class SignatureV4 { + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) { + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + // default to true if applyChecksum isn't set + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = normalizeRegionProvider(region); + this.credentialProvider = 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 (!hasHeader_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(";"); +const normalizeRegionProvider = (region) => { + if (typeof region === "string") { + const promisified = Promise.resolve(region); + return () => promisified; + } + else { + return region; + } +}; +const normalizeCredentialsProvider = (credentials) => { + if (typeof credentials === "object") { + const promisified = Promise.resolve(credentials); + return () => promisified; + } + else { + return credentials; + } +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2lnbmF0dXJlVjQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvU2lnbmF0dXJlVjQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBaUJBLGtFQUFtRDtBQUVuRCwyQ0FlcUI7QUFDckIsaUVBQW9FO0FBQ3BFLCtEQUE0RDtBQUM1RCwyREFBd0Q7QUFDeEQscURBQWtEO0FBQ2xELDJDQUF3QztBQUN4Qyw2REFBMEQ7QUFDMUQscURBQWtEO0FBQ2xELHlDQUFxQztBQWtEckMsTUFBYSxXQUFXO0lBUXRCLFlBQVksRUFDVixhQUFhLEVBQ2IsV0FBVyxFQUNYLE1BQU0sRUFDTixPQUFPLEVBQ1AsTUFBTSxFQUNOLGFBQWEsR0FBRyxJQUFJLEdBQ29CO1FBQ3hDLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO1FBQ3JCLElBQUksQ0FBQyxhQUFhLEdBQUcsYUFBYSxDQUFDO1FBQ25DLDZDQUE2QztRQUM3QyxJQUFJLENBQUMsYUFBYSxHQUFHLE9BQU8sYUFBYSxLQUFLLFNBQVMsQ0FBQyxDQUFDLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUM7UUFDL0UsSUFBSSxDQUFDLGNBQWMsR0FBRyx1QkFBdUIsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUN0RCxJQUFJLENBQUMsa0JBQWtCLEdBQUcsNEJBQTRCLENBQUMsV0FBVyxDQUFDLENBQUM7SUFDdEUsQ0FBQztJQUVNLEtBQUssQ0FBQyxPQUFPLENBQUMsZUFBNEIsRUFBRSxVQUFzQyxFQUFFO1FBQ3pGLE1BQU0sRUFDSixXQUFXLEdBQUcsSUFBSSxJQUFJLEVBQUUsRUFDeEIsU0FBUyxHQUFHLElBQUksRUFDaEIsaUJBQWlCLEVBQ2pCLGtCQUFrQixFQUNsQixlQUFlLEVBQ2YsYUFBYSxFQUNiLGNBQWMsR0FDZixHQUFHLE9BQU8sQ0FBQztRQUNaLE1BQU0sV0FBVyxHQUFHLE1BQU0sSUFBSSxDQUFDLGtCQUFrQixFQUFFLENBQUM7UUFDcEQsTUFBTSxNQUFNLEdBQUcsYUFBYSxhQUFiLGFBQWEsY0FBYixhQUFhLEdBQUksQ0FBQyxNQUFNLElBQUksQ0FBQyxjQUFjLEVBQUUsQ0FBQyxDQUFDO1FBRTlELE1BQU0sRUFBRSxRQUFRLEVBQUUsU0FBUyxFQUFFLEdBQUcsVUFBVSxDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBQ3hELElBQUksU0FBUyxHQUFHLDZCQUFpQixFQUFFO1lBQ2pDLE9BQU8sT0FBTyxDQUFDLE1BQU0sQ0FDbkIsb0NBQW9DLEdBQUcscURBQXFELEdBQUcsYUFBYSxDQUM3RyxDQUFDO1NBQ0g7UUFFRCxNQUFNLEtBQUssR0FBRyxrQ0FBVyxDQUFDLFNBQVMsRUFBRSxNQUFNLEVBQUUsY0FBYyxhQUFkLGNBQWMsY0FBZCxjQUFjLEdBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBQzdFLE1BQU0sT0FBTyxHQUFHLHVDQUFrQixDQUFDLCtCQUFjLENBQUMsZUFBZSxDQUFDLEVBQUUsRUFBRSxrQkFBa0IsRUFBRSxDQUFDLENBQUM7UUFFNUYsSUFBSSxXQUFXLENBQUMsWUFBWSxFQUFFO1lBQzVCLE9BQU8sQ0FBQyxLQUFLLENBQUMsNkJBQWlCLENBQUMsR0FBRyxXQUFXLENBQUMsWUFBWSxDQUFDO1NBQzdEO1FBQ0QsT0FBTyxDQUFDLEtBQUssQ0FBQyxpQ0FBcUIsQ0FBQyxHQUFHLGdDQUFvQixDQUFDO1FBQzVELE9BQU8sQ0FBQyxLQUFLLENBQUMsa0NBQXNCLENBQUMsR0FBRyxHQUFHLFdBQVcsQ0FBQyxXQUFXLElBQUksS0FBSyxFQUFFLENBQUM7UUFDOUUsT0FBTyxDQUFDLEtBQUssQ0FBQyxnQ0FBb0IsQ0FBQyxHQUFHLFFBQVEsQ0FBQztRQUMvQyxPQUFPLENBQUMsS0FBSyxDQUFDLCtCQUFtQixDQUFDLEdBQUcsU0FBUyxDQUFDLFFBQVEsQ0FBQyxFQUFFLENBQUMsQ0FBQztRQUU1RCxNQUFNLGdCQUFnQixHQUFHLHlDQUFtQixDQUFDLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxlQUFlLENBQUMsQ0FBQztRQUMxRixPQUFPLENBQUMsS0FBSyxDQUFDLHNDQUEwQixDQUFDLEdBQUcsc0JBQXNCLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztRQUVyRixPQUFPLENBQUMsS0FBSyxDQUFDLGlDQUFxQixDQUFDLEdBQUcsTUFBTSxJQUFJLENBQUMsWUFBWSxDQUM1RCxRQUFRLEVBQ1IsS0FBSyxFQUNMLElBQUksQ0FBQyxhQUFhLENBQUMsV0FBVyxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsY0FBYyxDQUFDLEVBQ2xFLElBQUksQ0FBQyxzQkFBc0IsQ0FBQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSwrQkFBYyxDQUFDLGVBQWUsRUFBRSxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FDM0csQ0FBQztRQUVGLE9BQU8sT0FBTyxDQUFDO0lBQ2pCLENBQUM7SUFLTSxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQVcsRUFBRSxPQUFZO1FBQ3pDLElBQUksT0FBTyxNQUFNLEtBQUssUUFBUSxFQUFFO1lBQzlCLE9BQU8sSUFBSSxDQUFDLFVBQVUsQ0FBQyxNQUFNLEVBQUUsT0FBTyxDQUFDLENBQUM7U0FDekM7YUFBTSxJQUFJLE1BQU0sQ0FBQyxPQUFPLElBQUksTUFBTSxDQUFDLE9BQU8sRUFBRTtZQUMzQyxPQUFPLElBQUksQ0FBQyxTQUFTLENBQUMsTUFBTSxFQUFFLE9BQU8sQ0FBQyxDQUFDO1NBQ3hDO2FBQU07WUFDTCxPQUFPLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxFQUFFLE9BQU8sQ0FBQyxDQUFDO1NBQzFDO0lBQ0gsQ0FBQztJQUVPLEtBQUssQ0FBQyxTQUFTLENBQ3JCLEVBQUUsT0FBTyxFQUFFLE9BQU8sRUFBa0IsRUFDcEMsRUFBRSxXQUFXLEdBQUcsSUFBSSxJQUFJLEVBQUUsRUFBRSxjQUFjLEVBQUUsYUFBYSxFQUFFLGNBQWMsRUFBeUI7UUFFbEcsTUFBTSxNQUFNLEdBQUcsYUFBYSxhQUFiLGFBQWEsY0FBYixhQUFhLEdBQUksQ0FBQyxNQUFNLElBQUksQ0FBQyxjQUFjLEVBQUUsQ0FBQyxDQUFDO1FBQzlELE1BQU0sRUFBRSxTQUFTLEVBQUUsUUFBUSxFQUFFLEdBQUcsVUFBVSxDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBQ3hELE1BQU0sS0FBSyxHQUFHLGtDQUFXLENBQUMsU0FBUyxFQUFFLE1BQU0sRUFBRSxjQUFjLGFBQWQsY0FBYyxjQUFkLGNBQWMsR0FBSSxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDN0UsTUFBTSxhQUFhLEdBQUcsTUFBTSwrQkFBYyxDQUFDLEVBQUUsT0FBTyxFQUFFLEVBQUUsRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFTLEVBQUUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDO1FBQy9GLE1BQU0sSUFBSSxHQUFHLElBQUksSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDO1FBQy9CLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDckIsTUFBTSxhQUFhLEdBQUcseUJBQUssQ0FBQyxNQUFNLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDO1FBQ2pELE1BQU0sWUFBWSxHQUFHO1lBQ25CLHNDQUEwQjtZQUMxQixRQUFRO1lBQ1IsS0FBSztZQUNMLGNBQWM7WUFDZCxhQUFhO1lBQ2IsYUFBYTtTQUNkLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ2IsT0FBTyxJQUFJLENBQUMsVUFBVSxDQUFDLFlBQVksRUFBRSxFQUFFLFdBQVcsRUFBRSxhQUFhLEVBQUUsTUFBTSxFQUFFLGNBQWMsRUFBRSxDQUFDLENBQUM7SUFDL0YsQ0FBQztJQUVPLEtBQUssQ0FBQyxVQUFVLENBQ3RCLFlBQW9CLEVBQ3BCLEVBQUUsV0FBVyxHQUFHLElBQUksSUFBSSxFQUFFLEVBQUUsYUFBYSxFQUFFLGNBQWMsS0FBdUIsRUFBRTtRQUVsRixNQUFNLFdBQVcsR0FBRyxNQUFNLElBQUksQ0FBQyxrQkFBa0IsRUFBRSxDQUFDO1FBQ3BELE1BQU0sTUFBTSxHQUFHLGFBQWEsYUFBYixhQUFhLGNBQWIsYUFBYSxHQUFJLENBQUMsTUFBTSxJQUFJLENBQUMsY0FBYyxFQUFFLENBQUMsQ0FBQztRQUM5RCxNQUFNLEVBQUUsU0FBUyxFQUFFLEdBQUcsVUFBVSxDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBRTlDLE1BQU0sSUFBSSxHQUFHLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLElBQUksQ0FBQyxhQUFhLENBQUMsV0FBVyxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsY0FBYyxDQUFDLENBQUMsQ0FBQztRQUN2RyxJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksQ0FBQyxDQUFDO1FBQzFCLE9BQU8seUJBQUssQ0FBQyxNQUFNLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDO0lBQ3BDLENBQUM7SUFFTyxLQUFLLENBQUMsV0FBVyxDQUN2QixhQUEwQixFQUMxQixFQUNFLFdBQVcsR0FBRyxJQUFJLElBQUksRUFBRSxFQUN4QixlQUFlLEVBQ2YsaUJBQWlCLEVBQ2pCLGFBQWEsRUFDYixjQUFjLE1BQ2EsRUFBRTtRQUUvQixNQUFNLFdBQVcsR0FBRyxNQUFNLElBQUksQ0FBQyxrQkFBa0IsRUFBRSxDQUFDO1FBQ3BELE1BQU0sTUFBTSxHQUFHLGFBQWEsYUFBYixhQUFhLGNBQWIsYUFBYSxHQUFJLENBQUMsTUFBTSxJQUFJLENBQUMsY0FBYyxFQUFFLENBQUMsQ0FBQztRQUM5RCxNQUFNLE9BQU8sR0FBRywrQkFBYyxDQUFDLGFBQWEsQ0FBQyxDQUFDO1FBQzlDLE1BQU0sRUFBRSxRQUFRLEVBQUUsU0FBUyxFQUFFLEdBQUcsVUFBVSxDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBQ3hELE1BQU0sS0FBSyxHQUFHLGtDQUFXLENBQUMsU0FBUyxFQUFFLE1BQU0sRUFBRSxjQUFjLGFBQWQsY0FBYyxjQUFkLGNBQWMsR0FBSSxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUM7UUFFN0UsT0FBTyxDQUFDLE9BQU8sQ0FBQywyQkFBZSxDQUFDLEdBQUcsUUFBUSxDQUFDO1FBQzVDLElBQUksV0FBVyxDQUFDLFlBQVksRUFBRTtZQUM1QixPQUFPLENBQUMsT0FBTyxDQUFDLHdCQUFZLENBQUMsR0FBRyxXQUFXLENBQUMsWUFBWSxDQUFDO1NBQzFEO1FBRUQsTUFBTSxXQUFXLEdBQUcsTUFBTSwrQkFBYyxDQUFDLE9BQU8sRUFBRSxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDL0QsSUFBSSxDQUFDLHFCQUFTLENBQUMseUJBQWEsRUFBRSxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksSUFBSSxDQUFDLGFBQWEsRUFBRTtZQUNwRSxPQUFPLENBQUMsT0FBTyxDQUFDLHlCQUFhLENBQUMsR0FBRyxXQUFXLENBQUM7U0FDOUM7UUFFRCxNQUFNLGdCQUFnQixHQUFHLHlDQUFtQixDQUFDLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxlQUFlLENBQUMsQ0FBQztRQUMxRixNQUFNLFNBQVMsR0FBRyxNQUFNLElBQUksQ0FBQyxZQUFZLENBQ3ZDLFFBQVEsRUFDUixLQUFLLEVBQ0wsSUFBSSxDQUFDLGFBQWEsQ0FBQyxXQUFXLEVBQUUsTUFBTSxFQUFFLFNBQVMsRUFBRSxjQUFjLENBQUMsRUFDbEUsSUFBSSxDQUFDLHNCQUFzQixDQUFDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxXQUFXLENBQUMsQ0FDcEUsQ0FBQztRQUVGLE9BQU8sQ0FBQyxPQUFPLENBQUMsdUJBQVcsQ0FBQztZQUMxQixHQUFHLGdDQUFvQixHQUFHO2dCQUMxQixjQUFjLFdBQVcsQ0FBQyxXQUFXLElBQUksS0FBSyxJQUFJO2dCQUNsRCxpQkFBaUIsc0JBQXNCLENBQUMsZ0JBQWdCLENBQUMsSUFBSTtnQkFDN0QsYUFBYSxTQUFTLEVBQUUsQ0FBQztRQUUzQixPQUFPLE9BQU8sQ0FBQztJQUNqQixDQUFDO0lBRU8sc0JBQXNCLENBQUMsT0FBb0IsRUFBRSxnQkFBMkIsRUFBRSxXQUFtQjtRQUNuRyxNQUFNLGFBQWEsR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDM0QsT0FBTyxHQUFHLE9BQU8sQ0FBQyxNQUFNO0VBQzFCLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxPQUFPLENBQUM7RUFDOUIscUNBQWlCLENBQUMsT0FBTyxDQUFDO0VBQzFCLGFBQWEsQ0FBQyxHQUFHLENBQUMsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLEdBQUcsSUFBSSxJQUFJLGdCQUFnQixDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDOztFQUUzRSxhQUFhLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQztFQUN2QixXQUFXLEVBQUUsQ0FBQztJQUNkLENBQUM7SUFFTyxLQUFLLENBQUMsa0JBQWtCLENBQzlCLFFBQWdCLEVBQ2hCLGVBQXVCLEVBQ3ZCLGdCQUF3QjtRQUV4QixNQUFNLElBQUksR0FBRyxJQUFJLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQztRQUMvQixJQUFJLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFDLENBQUM7UUFDOUIsTUFBTSxhQUFhLEdBQUcsTUFBTSxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUM7UUFFMUMsT0FBTyxHQUFHLGdDQUFvQjtFQUNoQyxRQUFRO0VBQ1IsZUFBZTtFQUNmLHlCQUFLLENBQUMsYUFBYSxDQUFDLEVBQUUsQ0FBQztJQUN2QixDQUFDO0lBRU8sZ0JBQWdCLENBQUMsRUFBRSxJQUFJLEVBQWU7UUFDNUMsSUFBSSxJQUFJLENBQUMsYUFBYSxFQUFFO1lBQ3RCLE1BQU0sYUFBYSxHQUFHLGtCQUFrQixDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUM7WUFDbEUsT0FBTyxJQUFJLGFBQWEsQ0FBQyxPQUFPLENBQUMsTUFBTSxFQUFFLEdBQUcsQ0FBQyxFQUFFLENBQUM7U0FDakQ7UUFFRCxPQUFPLElBQUksQ0FBQztJQUNkLENBQUM7SUFFTyxLQUFLLENBQUMsWUFBWSxDQUN4QixRQUFnQixFQUNoQixlQUF1QixFQUN2QixVQUErQixFQUMvQixnQkFBd0I7UUFFeEIsTUFBTSxZQUFZLEdBQUcsTUFBTSxJQUFJLENBQUMsa0JBQWtCLENBQUMsUUFBUSxFQUFFLGVBQWUsRUFBRSxnQkFBZ0IsQ0FBQyxDQUFDO1FBRWhHLE1BQU0sSUFBSSxHQUFHLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLFVBQVUsQ0FBQyxDQUFDO1FBQy9DLElBQUksQ0FBQyxNQUFNLENBQUMsWUFBWSxDQUFDLENBQUM7UUFDMUIsT0FBTyx5QkFBSyxDQUFDLE1BQU0sSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUM7SUFDcEMsQ0FBQztJQUVPLGFBQWEsQ0FDbkIsV0FBd0IsRUFDeEIsTUFBYyxFQUNkLFNBQWlCLEVBQ2pCLE9BQWdCO1FBRWhCLE9BQU8sb0NBQWEsQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLFdBQVcsRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFFLE9BQU8sSUFBSSxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUM7SUFDN0YsQ0FBQztDQUNGO0FBeE5ELGtDQXdOQztBQUVELE1BQU0sVUFBVSxHQUFHLENBQUMsR0FBYyxFQUEyQyxFQUFFO0lBQzdFLE1BQU0sUUFBUSxHQUFHLGtCQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsT0FBTyxDQUFDLFFBQVEsRUFBRSxFQUFFLENBQUMsQ0FBQztJQUNwRCxPQUFPO1FBQ0wsUUFBUTtRQUNSLFNBQVMsRUFBRSxRQUFRLENBQUMsTUFBTSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUM7S0FDakMsQ0FBQztBQUNKLENBQUMsQ0FBQztBQUVGLE1BQU0sc0JBQXNCLEdBQUcsQ0FBQyxPQUFlLEVBQVUsRUFBRSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUMsSUFBSSxFQUFFLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBRWxHLE1BQU0sdUJBQXVCLEdBQUcsQ0FBQyxNQUFpQyxFQUFvQixFQUFFO0lBQ3RGLElBQUksT0FBTyxNQUFNLEtBQUssUUFBUSxFQUFFO1FBQzlCLE1BQU0sV0FBVyxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDNUMsT0FBTyxHQUFHLEVBQUUsQ0FBQyxXQUFXLENBQUM7S0FDMUI7U0FBTTtRQUNMLE9BQU8sTUFBTSxDQUFDO0tBQ2Y7QUFDSCxDQUFDLENBQUM7QUFFRixNQUFNLDRCQUE0QixHQUFHLENBQUMsV0FBZ0QsRUFBeUIsRUFBRTtJQUMvRyxJQUFJLE9BQU8sV0FBVyxLQUFLLFFBQVEsRUFBRTtRQUNuQyxNQUFNLFdBQVcsR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBQ2pELE9BQU8sR0FBRyxFQUFFLENBQUMsV0FBVyxDQUFDO0tBQzFCO1NBQU07UUFDTCxPQUFPLFdBQVcsQ0FBQztLQUNwQjtBQUNILENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIENyZWRlbnRpYWxzLFxuICBEYXRlSW5wdXQsXG4gIEV2ZW50U2lnbmVyLFxuICBFdmVudFNpZ25pbmdBcmd1bWVudHMsXG4gIEZvcm1hdHRlZEV2ZW50LFxuICBIYXNoQ29uc3RydWN0b3IsXG4gIEhlYWRlckJhZyxcbiAgSHR0cFJlcXVlc3QsXG4gIFByb3ZpZGVyLFxuICBSZXF1ZXN0UHJlc2lnbmVyLFxuICBSZXF1ZXN0UHJlc2lnbmluZ0FyZ3VtZW50cyxcbiAgUmVxdWVzdFNpZ25lcixcbiAgUmVxdWVzdFNpZ25pbmdBcmd1bWVudHMsXG4gIFNpZ25pbmdBcmd1bWVudHMsXG4gIFN0cmluZ1NpZ25lcixcbn0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5pbXBvcnQgeyB0b0hleCB9IGZyb20gXCJAYXdzLXNkay91dGlsLWhleC1lbmNvZGluZ1wiO1xuXG5pbXBvcnQge1xuICBBTEdPUklUSE1fSURFTlRJRklFUixcbiAgQUxHT1JJVEhNX1FVRVJZX1BBUkFNLFxuICBBTVpfREFURV9IRUFERVIsXG4gIEFNWl9EQVRFX1FVRVJZX1BBUkFNLFxuICBBVVRIX0hFQURFUixcbiAgQ1JFREVOVElBTF9RVUVSWV9QQVJBTSxcbiAgRVZFTlRfQUxHT1JJVEhNX0lERU5USUZJRVIsXG4gIEVYUElSRVNfUVVFUllfUEFSQU0sXG4gIE1BWF9QUkVTSUdORURfVFRMLFxuICBTSEEyNTZfSEVBREVSLFxuICBTSUdOQVRVUkVfUVVFUllfUEFSQU0sXG4gIFNJR05FRF9IRUFERVJTX1FVRVJZX1BBUkFNLFxuICBUT0tFTl9IRUFERVIsXG4gIFRPS0VOX1FVRVJZX1BBUkFNLFxufSBmcm9tIFwiLi9jb25zdGFudHNcIjtcbmltcG9ydCB7IGNyZWF0ZVNjb3BlLCBnZXRTaWduaW5nS2V5IH0gZnJvbSBcIi4vY3JlZGVudGlhbERlcml2YXRpb25cIjtcbmltcG9ydCB7IGdldENhbm9uaWNhbEhlYWRlcnMgfSBmcm9tIFwiLi9nZXRDYW5vbmljYWxIZWFkZXJzXCI7XG5pbXBvcnQgeyBnZXRDYW5vbmljYWxRdWVyeSB9IGZyb20gXCIuL2dldENhbm9uaWNhbFF1ZXJ5XCI7XG5pbXBvcnQgeyBnZXRQYXlsb2FkSGFzaCB9IGZyb20gXCIuL2dldFBheWxvYWRIYXNoXCI7XG5pbXBvcnQgeyBoYXNIZWFkZXIgfSBmcm9tIFwiLi9oYXNIZWFkZXJcIjtcbmltcG9ydCB7IG1vdmVIZWFkZXJzVG9RdWVyeSB9IGZyb20gXCIuL21vdmVIZWFkZXJzVG9RdWVyeVwiO1xuaW1wb3J0IHsgcHJlcGFyZVJlcXVlc3QgfSBmcm9tIFwiLi9wcmVwYXJlUmVxdWVzdFwiO1xuaW1wb3J0IHsgaXNvODYwMSB9IGZyb20gXCIuL3V0aWxEYXRlXCI7XG5cbmV4cG9ydCBpbnRlcmZhY2UgU2lnbmF0dXJlVjRJbml0IHtcbiAgLyoqXG4gICAqIFRoZSBzZXJ2aWNlIHNpZ25pbmcgbmFtZS5cbiAgICovXG4gIHNlcnZpY2U6IHN0cmluZztcblxuICAvKipcbiAgICogVGhlIHJlZ2lvbiBuYW1lIG9yIGEgZnVuY3Rpb24gdGhhdCByZXR1cm5zIGEgcHJvbWlzZSB0aGF0IHdpbGwgYmVcbiAgICogcmVzb2x2ZWQgd2l0aCB0aGUgcmVnaW9uIG5hbWUuXG4gICAqL1xuICByZWdpb246IHN0cmluZyB8IFByb3ZpZGVyPHN0cmluZz47XG5cbiAgLyoqXG4gICAqIFRoZSBjcmVkZW50aWFscyB3aXRoIHdoaWNoIHRoZSByZXF1ZXN0IHNob3VsZCBiZSBzaWduZWQgb3IgYSBmdW5jdGlvblxuICAgKiB0aGF0IHJldHVybnMgYSBwcm9taXNlIHRoYXQgd2lsbCBiZSByZXNvbHZlZCB3aXRoIGNyZWRlbnRpYWxzLlxuICAgKi9cbiAgY3JlZGVudGlhbHM6IENyZWRlbnRpYWxzIHwgUHJvdmlkZXI8Q3JlZGVudGlhbHM+O1xuXG4gIC8qKlxuICAgKiBBIGNvbnN0cnVjdG9yIGZ1bmN0aW9uIGZvciBhIGhhc2ggb2JqZWN0IHRoYXQgd2lsbCBjYWxjdWxhdGUgU0hBLTI1NiBITUFDXG4gICAqIGNoZWNrc3Vtcy5cbiAgICovXG4gIHNoYTI1Nj86IEhhc2hDb25zdHJ1Y3RvcjtcblxuICAvKipcbiAgICogV2hldGhlciB0byB1cmktZXNjYXBlIHRoZSByZXF1ZXN0IFVSSSBwYXRoIGFzIHBhcnQgb2YgY29tcHV0aW5nIHRoZVxuICAgKiBjYW5vbmljYWwgcmVxdWVzdCBzdHJpbmcuIFRoaXMgaXMgcmVxdWlyZWQgZm9yIGV2ZXJ5IEFXUyBzZXJ2aWNlLCBleGNlcHRcbiAgICogQW1hem9uIFMzLCBhcyBvZiBsYXRlIDIwMTcuXG4gICAqXG4gICAqIEBkZWZhdWx0IFt0cnVlXVxuICAgKi9cbiAgdXJpRXNjYXBlUGF0aD86IGJvb2xlYW47XG5cbiAgLyoqXG4gICAqIFdoZXRoZXIgdG8gY2FsY3VsYXRlIGEgY2hlY2tzdW0gb2YgdGhlIHJlcXVlc3QgYm9keSBhbmQgaW5jbHVkZSBpdCBhc1xuICAgKiBlaXRoZXIgYSByZXF1ZXN0IGhlYWRlciAod2hlbiBzaWduaW5nKSBvciBhcyBhIHF1ZXJ5IHN0cmluZyBwYXJhbWV0ZXJcbiAgICogKHdoZW4gcHJlc2lnbmluZykuIFRoaXMgaXMgcmVxdWlyZWQgZm9yIEFXUyBHbGFjaWVyIGFuZCBBbWF6b24gUzMgYW5kIG9wdGlvbmFsIGZvclxuICAgKiBldmVyeSBvdGhlciBBV1Mgc2VydmljZSBhcyBvZiBsYXRlIDIwMTcuXG4gICAqXG4gICAqIEBkZWZhdWx0IFt0cnVlXVxuICAgKi9cbiAgYXBwbHlDaGVja3N1bT86IGJvb2xlYW47XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgU2lnbmF0dXJlVjRDcnlwdG9Jbml0IHtcbiAgc2hhMjU2OiBIYXNoQ29uc3RydWN0b3I7XG59XG5cbmV4cG9ydCBjbGFzcyBTaWduYXR1cmVWNCBpbXBsZW1lbnRzIFJlcXVlc3RQcmVzaWduZXIsIFJlcXVlc3RTaWduZXIsIFN0cmluZ1NpZ25lciwgRXZlbnRTaWduZXIge1xuICBwcml2YXRlIHJlYWRvbmx5IHNlcnZpY2U6IHN0cmluZztcbiAgcHJpdmF0ZSByZWFkb25seSByZWdpb25Qcm92aWRlcjogUHJvdmlkZXI8c3RyaW5nPjtcbiAgcHJpdmF0ZSByZWFkb25seSBjcmVkZW50aWFsUHJvdmlkZXI6IFByb3ZpZGVyPENyZWRlbnRpYWxzPjtcbiAgcHJpdmF0ZSByZWFkb25seSBzaGEyNTY6IEhhc2hDb25zdHJ1Y3RvcjtcbiAgcHJpdmF0ZSByZWFkb25seSB1cmlFc2NhcGVQYXRoOiBib29sZWFuO1xuICBwcml2YXRlIHJlYWRvbmx5IGFwcGx5Q2hlY2tzdW06IGJvb2xlYW47XG5cbiAgY29uc3RydWN0b3Ioe1xuICAgIGFwcGx5Q2hlY2tzdW0sXG4gICAgY3JlZGVudGlhbHMsXG4gICAgcmVnaW9uLFxuICAgIHNlcnZpY2UsXG4gICAgc2hhMjU2LFxuICAgIHVyaUVzY2FwZVBhdGggPSB0cnVlLFxuICB9OiBTaWduYXR1cmVWNEluaXQgJiBTaWduYXR1cmVWNENyeXB0b0luaXQpIHtcbiAgICB0aGlzLnNlcnZpY2UgPSBzZXJ2aWNlO1xuICAgIHRoaXMuc2hhMjU2ID0gc2hhMjU2O1xuICAgIHRoaXMudXJpRXNjYXBlUGF0aCA9IHVyaUVzY2FwZVBhdGg7XG4gICAgLy8gZGVmYXVsdCB0byB0cnVlIGlmIGFwcGx5Q2hlY2tzdW0gaXNuJ3Qgc2V0XG4gICAgdGhpcy5hcHBseUNoZWNrc3VtID0gdHlwZW9mIGFwcGx5Q2hlY2tzdW0gPT09IFwiYm9vbGVhblwiID8gYXBwbHlDaGVja3N1bSA6IHRydWU7XG4gICAgdGhpcy5yZWdpb25Qcm92aWRlciA9IG5vcm1hbGl6ZVJlZ2lvblByb3ZpZGVyKHJlZ2lvbik7XG4gICAgdGhpcy5jcmVkZW50aWFsUHJvdmlkZXIgPSBub3JtYWxpemVDcmVkZW50aWFsc1Byb3ZpZGVyKGNyZWRlbnRpYWxzKTtcbiAgfVxuXG4gIHB1YmxpYyBhc3luYyBwcmVzaWduKG9yaWdpbmFsUmVxdWVzdDogSHR0cFJlcXVlc3QsIG9wdGlvbnM6IFJlcXVlc3RQcmVzaWduaW5nQXJndW1lbnRzID0ge30pOiBQcm9taXNlPEh0dHBSZXF1ZXN0PiB7XG4gICAgY29uc3Qge1xuICAgICAgc2lnbmluZ0RhdGUgPSBuZXcgRGF0ZSgpLFxuICAgICAgZXhwaXJlc0luID0gMzYwMCxcbiAgICAgIHVuc2lnbmFibGVIZWFkZXJzLFxuICAgICAgdW5ob2lzdGFibGVIZWFkZXJzLFxuICAgICAgc2lnbmFibGVIZWFkZXJzLFxuICAgICAgc2lnbmluZ1JlZ2lvbixcbiAgICAgIHNpZ25pbmdTZXJ2aWNlLFxuICAgIH0gPSBvcHRpb25zO1xuICAgIGNvbnN0IGNyZWRlbnRpYWxzID0gYXdhaXQgdGhpcy5jcmVkZW50aWFsUHJvdmlkZXIoKTtcbiAgICBjb25zdCByZWdpb24gPSBzaWduaW5nUmVnaW9uID8/IChhd2FpdCB0aGlzLnJlZ2lvblByb3ZpZGVyKCkpO1xuXG4gICAgY29uc3QgeyBsb25nRGF0ZSwgc2hvcnREYXRlIH0gPSBmb3JtYXREYXRlKHNpZ25pbmdEYXRlKTtcbiAgICBpZiAoZXhwaXJlc0luID4gTUFYX1BSRVNJR05FRF9UVEwpIHtcbiAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChcbiAgICAgICAgXCJTaWduYXR1cmUgdmVyc2lvbiA0IHByZXNpZ25lZCBVUkxzXCIgKyBcIiBtdXN0IGhhdmUgYW4gZXhwaXJhdGlvbiBkYXRlIGxlc3MgdGhhbiBvbmUgd2VlayBpblwiICsgXCIgdGhlIGZ1dHVyZVwiXG4gICAgICApO1xuICAgIH1cblxuICAgIGNvbnN0IHNjb3BlID0gY3JlYXRlU2NvcGUoc2hvcnREYXRlLCByZWdpb24sIHNpZ25pbmdTZXJ2aWNlID8/IHRoaXMuc2VydmljZSk7XG4gICAgY29uc3QgcmVxdWVzdCA9IG1vdmVIZWFkZXJzVG9RdWVyeShwcmVwYXJlUmVxdWVzdChvcmlnaW5hbFJlcXVlc3QpLCB7IHVuaG9pc3RhYmxlSGVhZGVycyB9KTtcblxuICAgIGlmIChjcmVkZW50aWFscy5zZXNzaW9uVG9rZW4pIHtcbiAgICAgIHJlcXVlc3QucXVlcnlbVE9LRU5fUVVFUllfUEFSQU1dID0gY3JlZGVudGlhbHMuc2Vzc2lvblRva2VuO1xuICAgIH1cbiAgICByZXF1ZXN0LnF1ZXJ5W0FMR09SSVRITV9RVUVSWV9QQVJBTV0gPSBBTEdPUklUSE1fSURFTlRJRklFUjtcbiAgICByZXF1ZXN0LnF1ZXJ5W0NSRURFTlRJQUxfUVVFUllfUEFSQU1dID0gYCR7Y3JlZGVudGlhbHMuYWNjZXNzS2V5SWR9LyR7c2NvcGV9YDtcbiAgICByZXF1ZXN0LnF1ZXJ5W0FNWl9EQVRFX1FVRVJZX1BBUkFNXSA9IGxvbmdEYXRlO1xuICAgIHJlcXVlc3QucXVlcnlbRVhQSVJFU19RVUVSWV9QQVJBTV0gPSBleHBpcmVzSW4udG9TdHJpbmcoMTApO1xuXG4gICAgY29uc3QgY2Fub25pY2FsSGVhZGVycyA9IGdldENhbm9uaWNhbEhlYWRlcnMocmVxdWVzdCwgdW5zaWduYWJsZUhlYWRlcnMsIHNpZ25hYmxlSGVhZGVycyk7XG4gICAgcmVxdWVzdC5xdWVyeVtTSUdORURfSEVBREVSU19RVUVSWV9QQVJBTV0gPSBnZXRDYW5vbmljYWxIZWFkZXJMaXN0KGNhbm9uaWNhbEhlYWRlcnMpO1xuXG4gICAgcmVxdWVzdC5xdWVyeVtTSUdOQVRVUkVfUVVFUllfUEFSQU1dID0gYXdhaXQgdGhpcy5nZXRTaWduYXR1cmUoXG4gICAgICBsb25nRGF0ZSxcbiAgICAgIHNjb3BlLFxuICAgICAgdGhpcy5nZXRTaWduaW5nS2V5KGNyZWRlbnRpYWxzLCByZWdpb24sIHNob3J0RGF0ZSwgc2lnbmluZ1NlcnZpY2UpLFxuICAgICAgdGhpcy5jcmVhdGVDYW5vbmljYWxSZXF1ZXN0KHJlcXVlc3QsIGNhbm9uaWNhbEhlYWRlcnMsIGF3YWl0IGdldFBheWxvYWRIYXNoKG9yaWdpbmFsUmVxdWVzdCwgdGhpcy5zaGEyNTYpKVxuICAgICk7XG5cbiAgICByZXR1cm4gcmVxdWVzdDtcbiAgfVxuXG4gIHB1YmxpYyBhc3luYyBzaWduKHN0cmluZ1RvU2lnbjogc3RyaW5nLCBvcHRpb25zPzogU2lnbmluZ0FyZ3VtZW50cyk6IFByb21pc2U8c3RyaW5nPjtcbiAgcHVibGljIGFzeW5jIHNpZ24oZXZlbnQ6IEZvcm1hdHRlZEV2ZW50LCBvcHRpb25zOiBFdmVudFNpZ25pbmdBcmd1bWVudHMpOiBQcm9taXNlPHN0cmluZz47XG4gIHB1YmxpYyBhc3luYyBzaWduKHJlcXVlc3RUb1NpZ246IEh0dHBSZXF1ZXN0LCBvcHRpb25zPzogUmVxdWVzdFNpZ25pbmdBcmd1bWVudHMpOiBQcm9taXNlPEh0dHBSZXF1ZXN0PjtcbiAgcHVibGljIGFzeW5jIHNpZ24odG9TaWduOiBhbnksIG9wdGlvbnM6IGFueSk6IFByb21pc2U8YW55PiB7XG4gICAgaWYgKHR5cGVvZiB0b1NpZ24gPT09IFwic3RyaW5nXCIpIHtcbiAgICAgIHJldHVybiB0aGlzLnNpZ25TdHJpbmcodG9TaWduLCBvcHRpb25zKTtcbiAgICB9IGVsc2UgaWYgKHRvU2lnbi5oZWFkZXJzICYmIHRvU2lnbi5wYXlsb2FkKSB7XG4gICAgICByZXR1cm4gdGhpcy5zaWduRXZlbnQodG9TaWduLCBvcHRpb25zKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIHRoaXMuc2lnblJlcXVlc3QodG9TaWduLCBvcHRpb25zKTtcbiAgICB9XG4gIH1cblxuICBwcml2YXRlIGFzeW5jIHNpZ25FdmVudChcbiAgICB7IGhlYWRlcnMsIHBheWxvYWQgfTogRm9ybWF0dGVkRXZlbnQsXG4gICAgeyBzaWduaW5nRGF0ZSA9IG5ldyBEYXRlKCksIHByaW9yU2lnbmF0dXJlLCBzaWduaW5nUmVnaW9uLCBzaWduaW5nU2VydmljZSB9OiBFdmVudFNpZ25pbmdBcmd1bWVudHNcbiAgKTogUHJvbWlzZTxzdHJpbmc+IHtcbiAgICBjb25zdCByZWdpb24gPSBzaWduaW5nUmVnaW9uID8/IChhd2FpdCB0aGlzLnJlZ2lvblByb3ZpZGVyKCkpO1xuICAgIGNvbnN0IHsgc2hvcnREYXRlLCBsb25nRGF0ZSB9ID0gZm9ybWF0RGF0ZShzaWduaW5nRGF0ZSk7XG4gICAgY29uc3Qgc2NvcGUgPSBjcmVhdGVTY29wZShzaG9ydERhdGUsIHJlZ2lvbiwgc2lnbmluZ1NlcnZpY2UgPz8gdGhpcy5zZXJ2aWNlKTtcbiAgICBjb25zdCBoYXNoZWRQYXlsb2FkID0gYXdhaXQgZ2V0UGF5bG9hZEhhc2goeyBoZWFkZXJzOiB7fSwgYm9keTogcGF5bG9hZCB9IGFzIGFueSwgdGhpcy5zaGEyNTYpO1xuICAgIGNvbnN0IGhhc2ggPSBuZXcgdGhpcy5zaGEyNTYoKTtcbiAgICBoYXNoLnVwZGF0ZShoZWFkZXJzKTtcbiAgICBjb25zdCBoYXNoZWRIZWFkZXJzID0gdG9IZXgoYXdhaXQgaGFzaC5kaWdlc3QoKSk7XG4gICAgY29uc3Qgc3RyaW5nVG9TaWduID0gW1xuICAgICAgRVZFTlRfQUxHT1JJVEhNX0lERU5USUZJRVIsXG4gICAgICBsb25nRGF0ZSxcbiAgICAgIHNjb3BlLFxuICAgICAgcHJpb3JTaWduYXR1cmUsXG4gICAgICBoYXNoZWRIZWFkZXJzLFxuICAgICAgaGFzaGVkUGF5bG9hZCxcbiAgICBdLmpvaW4oXCJcXG5cIik7XG4gICAgcmV0dXJuIHRoaXMuc2lnblN0cmluZyhzdHJpbmdUb1NpZ24sIHsgc2lnbmluZ0RhdGUsIHNpZ25pbmdSZWdpb246IHJlZ2lvbiwgc2lnbmluZ1NlcnZpY2UgfSk7XG4gIH1cblxuICBwcml2YXRlIGFzeW5jIHNpZ25TdHJpbmcoXG4gICAgc3RyaW5nVG9TaWduOiBzdHJpbmcsXG4gICAgeyBzaWduaW5nRGF0ZSA9IG5ldyBEYXRlKCksIHNpZ25pbmdSZWdpb24sIHNpZ25pbmdTZXJ2aWNlIH06IFNpZ25pbmdBcmd1bWVudHMgPSB7fVxuICApOiBQcm9taXNlPHN0cmluZz4ge1xuICAgIGNvbnN0IGNyZWRlbnRpYWxzID0gYXdhaXQgdGhpcy5jcmVkZW50aWFsUHJvdmlkZXIoKTtcbiAgICBjb25zdCByZWdpb24gPSBzaWduaW5nUmVnaW9uID8/IChhd2FpdCB0aGlzLnJlZ2lvblByb3ZpZGVyKCkpO1xuICAgIGNvbnN0IHsgc2hvcnREYXRlIH0gPSBmb3JtYXREYXRlKHNpZ25pbmdEYXRlKTtcblxuICAgIGNvbnN0IGhhc2ggPSBuZXcgdGhpcy5zaGEyNTYoYXdhaXQgdGhpcy5nZXRTaWduaW5nS2V5KGNyZWRlbnRpYWxzLCByZWdpb24sIHNob3J0RGF0ZSwgc2lnbmluZ1NlcnZpY2UpKTtcbiAgICBoYXNoLnVwZGF0ZShzdHJpbmdUb1NpZ24pO1xuICAgIHJldHVybiB0b0hleChhd2FpdCBoYXNoLmRpZ2VzdCgpKTtcbiAgfVxuXG4gIHByaXZhdGUgYXN5bmMgc2lnblJlcXVlc3QoXG4gICAgcmVxdWVzdFRvU2lnbjogSHR0cFJlcXVlc3QsXG4gICAge1xuICAgICAgc2lnbmluZ0RhdGUgPSBuZXcgRGF0ZSgpLFxuICAgICAgc2lnbmFibGVIZWFkZXJzLFxuICAgICAgdW5zaWduYWJsZUhlYWRlcnMsXG4gICAgICBzaWduaW5nUmVnaW9uLFxuICAgICAgc2lnbmluZ1NlcnZpY2UsXG4gICAgfTogUmVxdWVzdFNpZ25pbmdBcmd1bWVudHMgPSB7fVxuICApOiBQcm9taXNlPEh0dHBSZXF1ZXN0PiB7XG4gICAgY29uc3QgY3JlZGVudGlhbHMgPSBhd2FpdCB0aGlzLmNyZWRlbnRpYWxQcm92aWRlcigpO1xuICAgIGNvbnN0IHJlZ2lvbiA9IHNpZ25pbmdSZWdpb24gPz8gKGF3YWl0IHRoaXMucmVnaW9uUHJvdmlkZXIoKSk7XG4gICAgY29uc3QgcmVxdWVzdCA9IHByZXBhcmVSZXF1ZXN0KHJlcXVlc3RUb1NpZ24pO1xuICAgIGNvbnN0IHsgbG9uZ0RhdGUsIHNob3J0RGF0ZSB9ID0gZm9ybWF0RGF0ZShzaWduaW5nRGF0ZSk7XG4gICAgY29uc3Qgc2NvcGUgPSBjcmVhdGVTY29wZShzaG9ydERhdGUsIHJlZ2lvbiwgc2lnbmluZ1NlcnZpY2UgPz8gdGhpcy5zZXJ2aWNlKTtcblxuICAgIHJlcXVlc3QuaGVhZGVyc1tBTVpfREFURV9IRUFERVJdID0gbG9uZ0RhdGU7XG4gICAgaWYgKGNyZWRlbnRpYWxzLnNlc3Npb25Ub2tlbikge1xuICAgICAgcmVxdWVzdC5oZWFkZXJzW1RPS0VOX0hFQURFUl0gPSBjcmVkZW50aWFscy5zZXNzaW9uVG9rZW47XG4gICAgfVxuXG4gICAgY29uc3QgcGF5bG9hZEhhc2ggPSBhd2FpdCBnZXRQYXlsb2FkSGFzaChyZXF1ZXN0LCB0aGlzLnNoYTI1Nik7XG4gICAgaWYgKCFoYXNIZWFkZXIoU0hBMjU2X0hFQURFUiwgcmVxdWVzdC5oZWFkZXJzKSAmJiB0aGlzLmFwcGx5Q2hlY2tzdW0pIHtcbiAgICAgIHJlcXVlc3QuaGVhZGVyc1tTSEEyNTZfSEVBREVSXSA9IHBheWxvYWRIYXNoO1xuICAgIH1cblxuICAgIGNvbnN0IGNhbm9uaWNhbEhlYWRlcnMgPSBnZXRDYW5vbmljYWxIZWFkZXJzKHJlcXVlc3QsIHVuc2lnbmFibGVIZWFkZXJzLCBzaWduYWJsZUhlYWRlcnMpO1xuICAgIGNvbnN0IHNpZ25hdHVyZSA9IGF3YWl0IHRoaXMuZ2V0U2lnbmF0dXJlKFxuICAgICAgbG9uZ0RhdGUsXG4gICAgICBzY29wZSxcbiAgICAgIHRoaXMuZ2V0U2lnbmluZ0tleShjcmVkZW50aWFscywgcmVnaW9uLCBzaG9ydERhdGUsIHNpZ25pbmdTZXJ2aWNlKSxcbiAgICAgIHRoaXMuY3JlYXRlQ2Fub25pY2FsUmVxdWVzdChyZXF1ZXN0LCBjYW5vbmljYWxIZWFkZXJzLCBwYXlsb2FkSGFzaClcbiAgICApO1xuXG4gICAgcmVxdWVzdC5oZWFkZXJzW0FVVEhfSEVBREVSXSA9XG4gICAgICBgJHtBTEdPUklUSE1fSURFTlRJRklFUn0gYCArXG4gICAgICBgQ3JlZGVudGlhbD0ke2NyZWRlbnRpYWxzLmFjY2Vzc0tleUlkfS8ke3Njb3BlfSwgYCArXG4gICAgICBgU2lnbmVkSGVhZGVycz0ke2dldENhbm9uaWNhbEhlYWRlckxpc3QoY2Fub25pY2FsSGVhZGVycyl9LCBgICtcbiAgICAgIGBTaWduYXR1cmU9JHtzaWduYXR1cmV9YDtcblxuICAgIHJldHVybiByZXF1ZXN0O1xuICB9XG5cbiAgcHJpdmF0ZSBjcmVhdGVDYW5vbmljYWxSZXF1ZXN0KHJlcXVlc3Q6IEh0dHBSZXF1ZXN0LCBjYW5vbmljYWxIZWFkZXJzOiBIZWFkZXJCYWcsIHBheWxvYWRIYXNoOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgIGNvbnN0IHNvcnRlZEhlYWRlcnMgPSBPYmplY3Qua2V5cyhjYW5vbmljYWxIZWFkZXJzKS5zb3J0KCk7XG4gICAgcmV0dXJuIGAke3JlcXVlc3QubWV0aG9kfVxuJHt0aGlzLmdldENhbm9uaWNhbFBhdGgocmVxdWVzdCl9XG4ke2dldENhbm9uaWNhbFF1ZXJ5KHJlcXVlc3QpfVxuJHtzb3J0ZWRIZWFkZXJzLm1hcCgobmFtZSkgPT4gYCR7bmFtZX06JHtjYW5vbmljYWxIZWFkZXJzW25hbWVdfWApLmpvaW4oXCJcXG5cIil9XG5cbiR7c29ydGVkSGVhZGVycy5qb2luKFwiO1wiKX1cbiR7cGF5bG9hZEhhc2h9YDtcbiAgfVxuXG4gIHByaXZhdGUgYXN5bmMgY3JlYXRlU3RyaW5nVG9TaWduKFxuICAgIGxvbmdEYXRlOiBzdHJpbmcsXG4gICAgY3JlZGVudGlhbFNjb3BlOiBzdHJpbmcsXG4gICAgY2Fub25pY2FsUmVxdWVzdDogc3RyaW5nXG4gICk6IFByb21pc2U8c3RyaW5nPiB7XG4gICAgY29uc3QgaGFzaCA9IG5ldyB0aGlzLnNoYTI1NigpO1xuICAgIGhhc2gudXBkYXRlKGNhbm9uaWNhbFJlcXVlc3QpO1xuICAgIGNvbnN0IGhhc2hlZFJlcXVlc3QgPSBhd2FpdCBoYXNoLmRpZ2VzdCgpO1xuXG4gICAgcmV0dXJuIGAke0FMR09SSVRITV9JREVOVElGSUVSfVxuJHtsb25nRGF0ZX1cbiR7Y3JlZGVudGlhbFNjb3BlfVxuJHt0b0hleChoYXNoZWRSZXF1ZXN0KX1gO1xuICB9XG5cbiAgcHJpdmF0ZSBnZXRDYW5vbmljYWxQYXRoKHsgcGF0aCB9OiBIdHRwUmVxdWVzdCk6IHN0cmluZyB7XG4gICAgaWYgKHRoaXMudXJpRXNjYXBlUGF0aCkge1xuICAgICAgY29uc3QgZG91YmxlRW5jb2RlZCA9IGVuY29kZVVSSUNvbXBvbmVudChwYXRoLnJlcGxhY2UoL15cXC8vLCBcIlwiKSk7XG4gICAgICByZXR1cm4gYC8ke2RvdWJsZUVuY29kZWQucmVwbGFjZSgvJTJGL2csIFwiL1wiKX1gO1xuICAgIH1cblxuICAgIHJldHVybiBwYXRoO1xuICB9XG5cbiAgcHJpdmF0ZSBhc3luYyBnZXRTaWduYXR1cmUoXG4gICAgbG9uZ0RhdGU6IHN0cmluZyxcbiAgICBjcmVkZW50aWFsU2NvcGU6IHN0cmluZyxcbiAgICBrZXlQcm9taXNlOiBQcm9taXNlPFVpbnQ4QXJyYXk+LFxuICAgIGNhbm9uaWNhbFJlcXVlc3Q6IHN0cmluZ1xuICApOiBQcm9taXNlPHN0cmluZz4ge1xuICAgIGNvbnN0IHN0cmluZ1RvU2lnbiA9IGF3YWl0IHRoaXMuY3JlYXRlU3RyaW5nVG9TaWduKGxvbmdEYXRlLCBjcmVkZW50aWFsU2NvcGUsIGNhbm9uaWNhbFJlcXVlc3QpO1xuXG4gICAgY29uc3QgaGFzaCA9IG5ldyB0aGlzLnNoYTI1Nihhd2FpdCBrZXlQcm9taXNlKTtcbiAgICBoYXNoLnVwZGF0ZShzdHJpbmdUb1NpZ24pO1xuICAgIHJldHVybiB0b0hleChhd2FpdCBoYXNoLmRpZ2VzdCgpKTtcbiAgfVxuXG4gIHByaXZhdGUgZ2V0U2lnbmluZ0tleShcbiAgICBjcmVkZW50aWFsczogQ3JlZGVudGlhbHMsXG4gICAgcmVnaW9uOiBzdHJpbmcsXG4gICAgc2hvcnREYXRlOiBzdHJpbmcsXG4gICAgc2VydmljZT86IHN0cmluZ1xuICApOiBQcm9taXNlPFVpbnQ4QXJyYXk+IHtcbiAgICByZXR1cm4gZ2V0U2lnbmluZ0tleSh0aGlzLnNoYTI1NiwgY3JlZGVudGlhbHMsIHNob3J0RGF0ZSwgcmVnaW9uLCBzZXJ2aWNlIHx8IHRoaXMuc2VydmljZSk7XG4gIH1cbn1cblxuY29uc3QgZm9ybWF0RGF0ZSA9IChub3c6IERhdGVJbnB1dCk6IHsgbG9uZ0RhdGU6IHN0cmluZzsgc2hvcnREYXRlOiBzdHJpbmcgfSA9PiB7XG4gIGNvbnN0IGxvbmdEYXRlID0gaXNvODYwMShub3cpLnJlcGxhY2UoL1tcXC06XS9nLCBcIlwiKTtcbiAgcmV0dXJuIHtcbiAgICBsb25nRGF0ZSxcbiAgICBzaG9ydERhdGU6IGxvbmdEYXRlLnN1YnN0cigwLCA4KSxcbiAgfTtcbn07XG5cbmNvbnN0IGdldENhbm9uaWNhbEhlYWRlckxpc3QgPSAoaGVhZGVyczogb2JqZWN0KTogc3RyaW5nID0+IE9iamVjdC5rZXlzKGhlYWRlcnMpLnNvcnQoKS5qb2luKFwiO1wiKTtcblxuY29uc3Qgbm9ybWFsaXplUmVnaW9uUHJvdmlkZXIgPSAocmVnaW9uOiBzdHJpbmcgfCBQcm92aWRlcjxzdHJpbmc+KTogUHJvdmlkZXI8c3RyaW5nPiA9PiB7XG4gIGlmICh0eXBlb2YgcmVnaW9uID09PSBcInN0cmluZ1wiKSB7XG4gICAgY29uc3QgcHJvbWlzaWZpZWQgPSBQcm9taXNlLnJlc29sdmUocmVnaW9uKTtcbiAgICByZXR1cm4gKCkgPT4gcHJvbWlzaWZpZWQ7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHJlZ2lvbjtcbiAgfVxufTtcblxuY29uc3Qgbm9ybWFsaXplQ3JlZGVudGlhbHNQcm92aWRlciA9IChjcmVkZW50aWFsczogQ3JlZGVudGlhbHMgfCBQcm92aWRlcjxDcmVkZW50aWFscz4pOiBQcm92aWRlcjxDcmVkZW50aWFscz4gPT4ge1xuICBpZiAodHlwZW9mIGNyZWRlbnRpYWxzID09PSBcIm9iamVjdFwiKSB7XG4gICAgY29uc3QgcHJvbWlzaWZpZWQgPSBQcm9taXNlLnJlc29sdmUoY3JlZGVudGlhbHMpO1xuICAgIHJldHVybiAoKSA9PiBwcm9taXNpZmllZDtcbiAgfSBlbHNlIHtcbiAgICByZXR1cm4gY3JlZGVudGlhbHM7XG4gIH1cbn07XG4iXX0= + +/***/ }), + +/***/ 14566: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.cloneRequest = void 0; +/** + * @internal + */ +function cloneRequest({ headers, query, ...rest }) { + return { + ...rest, + headers: { ...headers }, + query: query ? cloneQuery(query) : undefined, + }; +} +exports.cloneRequest = cloneRequest; +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param, + }; + }, {}); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xvbmVSZXF1ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Nsb25lUmVxdWVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQTs7R0FFRztBQUNILFNBQWdCLFlBQVksQ0FBQyxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsR0FBRyxJQUFJLEVBQWU7SUFDbkUsT0FBTztRQUNMLEdBQUcsSUFBSTtRQUNQLE9BQU8sRUFBRSxFQUFFLEdBQUcsT0FBTyxFQUFFO1FBQ3ZCLEtBQUssRUFBRSxLQUFLLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUztLQUM3QyxDQUFDO0FBQ0osQ0FBQztBQU5ELG9DQU1DO0FBRUQsU0FBUyxVQUFVLENBQUMsS0FBd0I7SUFDMUMsT0FBTyxNQUFNLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLEtBQXdCLEVBQUUsU0FBaUIsRUFBRSxFQUFFO1FBQy9FLE1BQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxTQUFTLENBQUMsQ0FBQztRQUMvQixPQUFPO1lBQ0wsR0FBRyxLQUFLO1lBQ1IsQ0FBQyxTQUFTLENBQUMsRUFBRSxLQUFLLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUs7U0FDdkQsQ0FBQztJQUNKLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQztBQUNULENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIdHRwUmVxdWVzdCwgUXVlcnlQYXJhbWV0ZXJCYWcgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGNsb25lUmVxdWVzdCh7IGhlYWRlcnMsIHF1ZXJ5LCAuLi5yZXN0IH06IEh0dHBSZXF1ZXN0KTogSHR0cFJlcXVlc3Qge1xuICByZXR1cm4ge1xuICAgIC4uLnJlc3QsXG4gICAgaGVhZGVyczogeyAuLi5oZWFkZXJzIH0sXG4gICAgcXVlcnk6IHF1ZXJ5ID8gY2xvbmVRdWVyeShxdWVyeSkgOiB1bmRlZmluZWQsXG4gIH07XG59XG5cbmZ1bmN0aW9uIGNsb25lUXVlcnkocXVlcnk6IFF1ZXJ5UGFyYW1ldGVyQmFnKTogUXVlcnlQYXJhbWV0ZXJCYWcge1xuICByZXR1cm4gT2JqZWN0LmtleXMocXVlcnkpLnJlZHVjZSgoY2Fycnk6IFF1ZXJ5UGFyYW1ldGVyQmFnLCBwYXJhbU5hbWU6IHN0cmluZykgPT4ge1xuICAgIGNvbnN0IHBhcmFtID0gcXVlcnlbcGFyYW1OYW1lXTtcbiAgICByZXR1cm4ge1xuICAgICAgLi4uY2FycnksXG4gICAgICBbcGFyYW1OYW1lXTogQXJyYXkuaXNBcnJheShwYXJhbSkgPyBbLi4ucGFyYW1dIDogcGFyYW0sXG4gICAgfTtcbiAgfSwge30pO1xufVxuIl19 + +/***/ }), + +/***/ 13851: +/***/ ((__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 = 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.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.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.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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLHFCQUFxQixHQUFHLGlCQUFpQixDQUFDO0FBQzFDLFFBQUEsc0JBQXNCLEdBQUcsa0JBQWtCLENBQUM7QUFDNUMsUUFBQSxvQkFBb0IsR0FBRyxZQUFZLENBQUM7QUFDcEMsUUFBQSwwQkFBMEIsR0FBRyxxQkFBcUIsQ0FBQztBQUNuRCxRQUFBLG1CQUFtQixHQUFHLGVBQWUsQ0FBQztBQUN0QyxRQUFBLHFCQUFxQixHQUFHLGlCQUFpQixDQUFDO0FBQzFDLFFBQUEsaUJBQWlCLEdBQUcsc0JBQXNCLENBQUM7QUFFM0MsUUFBQSxXQUFXLEdBQUcsZUFBZSxDQUFDO0FBQzlCLFFBQUEsZUFBZSxHQUFHLDRCQUFvQixDQUFDLFdBQVcsRUFBRSxDQUFDO0FBQ3JELFFBQUEsV0FBVyxHQUFHLE1BQU0sQ0FBQztBQUNyQixRQUFBLGlCQUFpQixHQUFHLENBQUMsbUJBQVcsRUFBRSx1QkFBZSxFQUFFLG1CQUFXLENBQUMsQ0FBQztBQUNoRSxRQUFBLGdCQUFnQixHQUFHLDZCQUFxQixDQUFDLFdBQVcsRUFBRSxDQUFDO0FBQ3ZELFFBQUEsYUFBYSxHQUFHLHNCQUFzQixDQUFDO0FBQ3ZDLFFBQUEsWUFBWSxHQUFHLHlCQUFpQixDQUFDLFdBQVcsRUFBRSxDQUFDO0FBQy9DLFFBQUEsV0FBVyxHQUFHLE1BQU0sQ0FBQztBQUVyQixRQUFBLHlCQUF5QixHQUFHO0lBQ3ZDLGFBQWEsRUFBRSxJQUFJO0lBQ25CLGVBQWUsRUFBRSxJQUFJO0lBQ3JCLFVBQVUsRUFBRSxJQUFJO0lBQ2hCLE1BQU0sRUFBRSxJQUFJO0lBQ1osSUFBSSxFQUFFLElBQUk7SUFDVixZQUFZLEVBQUUsSUFBSTtJQUNsQixjQUFjLEVBQUUsSUFBSTtJQUNwQixNQUFNLEVBQUUsSUFBSTtJQUNaLE9BQU8sRUFBRSxJQUFJO0lBQ2IsRUFBRSxFQUFFLElBQUk7SUFDUixPQUFPLEVBQUUsSUFBSTtJQUNiLG1CQUFtQixFQUFFLElBQUk7SUFDekIsT0FBTyxFQUFFLElBQUk7SUFDYixZQUFZLEVBQUUsSUFBSTtJQUNsQixpQkFBaUIsRUFBRSxJQUFJO0NBQ3hCLENBQUM7QUFFVyxRQUFBLG9CQUFvQixHQUFHLFNBQVMsQ0FBQztBQUVqQyxRQUFBLGtCQUFrQixHQUFHLE9BQU8sQ0FBQztBQUU3QixRQUFBLG1CQUFtQixHQUFHLENBQUMsVUFBVSxFQUFFLFFBQVEsQ0FBQyxDQUFDO0FBRTdDLFFBQUEsb0JBQW9CLEdBQUcsa0JBQWtCLENBQUM7QUFFMUMsUUFBQSwwQkFBMEIsR0FBRywwQkFBMEIsQ0FBQztBQUV4RCxRQUFBLGdCQUFnQixHQUFHLGtCQUFrQixDQUFDO0FBRXRDLFFBQUEsY0FBYyxHQUFHLEVBQUUsQ0FBQztBQUNwQixRQUFBLG1CQUFtQixHQUFHLGNBQWMsQ0FBQztBQUVyQyxRQUFBLGlCQUFpQixHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBBTEdPUklUSE1fUVVFUllfUEFSQU0gPSBcIlgtQW16LUFsZ29yaXRobVwiO1xuZXhwb3J0IGNvbnN0IENSRURFTlRJQUxfUVVFUllfUEFSQU0gPSBcIlgtQW16LUNyZWRlbnRpYWxcIjtcbmV4cG9ydCBjb25zdCBBTVpfREFURV9RVUVSWV9QQVJBTSA9IFwiWC1BbXotRGF0ZVwiO1xuZXhwb3J0IGNvbnN0IFNJR05FRF9IRUFERVJTX1FVRVJZX1BBUkFNID0gXCJYLUFtei1TaWduZWRIZWFkZXJzXCI7XG5leHBvcnQgY29uc3QgRVhQSVJFU19RVUVSWV9QQVJBTSA9IFwiWC1BbXotRXhwaXJlc1wiO1xuZXhwb3J0IGNvbnN0IFNJR05BVFVSRV9RVUVSWV9QQVJBTSA9IFwiWC1BbXotU2lnbmF0dXJlXCI7XG5leHBvcnQgY29uc3QgVE9LRU5fUVVFUllfUEFSQU0gPSBcIlgtQW16LVNlY3VyaXR5LVRva2VuXCI7XG5cbmV4cG9ydCBjb25zdCBBVVRIX0hFQURFUiA9IFwiYXV0aG9yaXphdGlvblwiO1xuZXhwb3J0IGNvbnN0IEFNWl9EQVRFX0hFQURFUiA9IEFNWl9EQVRFX1FVRVJZX1BBUkFNLnRvTG93ZXJDYXNlKCk7XG5leHBvcnQgY29uc3QgREFURV9IRUFERVIgPSBcImRhdGVcIjtcbmV4cG9ydCBjb25zdCBHRU5FUkFURURfSEVBREVSUyA9IFtBVVRIX0hFQURFUiwgQU1aX0RBVEVfSEVBREVSLCBEQVRFX0hFQURFUl07XG5leHBvcnQgY29uc3QgU0lHTkFUVVJFX0hFQURFUiA9IFNJR05BVFVSRV9RVUVSWV9QQVJBTS50b0xvd2VyQ2FzZSgpO1xuZXhwb3J0IGNvbnN0IFNIQTI1Nl9IRUFERVIgPSBcIngtYW16LWNvbnRlbnQtc2hhMjU2XCI7XG5leHBvcnQgY29uc3QgVE9LRU5fSEVBREVSID0gVE9LRU5fUVVFUllfUEFSQU0udG9Mb3dlckNhc2UoKTtcbmV4cG9ydCBjb25zdCBIT1NUX0hFQURFUiA9IFwiaG9zdFwiO1xuXG5leHBvcnQgY29uc3QgQUxXQVlTX1VOU0lHTkFCTEVfSEVBREVSUyA9IHtcbiAgYXV0aG9yaXphdGlvbjogdHJ1ZSxcbiAgXCJjYWNoZS1jb250cm9sXCI6IHRydWUsXG4gIGNvbm5lY3Rpb246IHRydWUsXG4gIGV4cGVjdDogdHJ1ZSxcbiAgZnJvbTogdHJ1ZSxcbiAgXCJrZWVwLWFsaXZlXCI6IHRydWUsXG4gIFwibWF4LWZvcndhcmRzXCI6IHRydWUsXG4gIHByYWdtYTogdHJ1ZSxcbiAgcmVmZXJlcjogdHJ1ZSxcbiAgdGU6IHRydWUsXG4gIHRyYWlsZXI6IHRydWUsXG4gIFwidHJhbnNmZXItZW5jb2RpbmdcIjogdHJ1ZSxcbiAgdXBncmFkZTogdHJ1ZSxcbiAgXCJ1c2VyLWFnZW50XCI6IHRydWUsXG4gIFwieC1hbXpuLXRyYWNlLWlkXCI6IHRydWUsXG59O1xuXG5leHBvcnQgY29uc3QgUFJPWFlfSEVBREVSX1BBVFRFUk4gPSAvXnByb3h5LS87XG5cbmV4cG9ydCBjb25zdCBTRUNfSEVBREVSX1BBVFRFUk4gPSAvXnNlYy0vO1xuXG5leHBvcnQgY29uc3QgVU5TSUdOQUJMRV9QQVRURVJOUyA9IFsvXnByb3h5LS9pLCAvXnNlYy0vaV07XG5cbmV4cG9ydCBjb25zdCBBTEdPUklUSE1fSURFTlRJRklFUiA9IFwiQVdTNC1ITUFDLVNIQTI1NlwiO1xuXG5leHBvcnQgY29uc3QgRVZFTlRfQUxHT1JJVEhNX0lERU5USUZJRVIgPSBcIkFXUzQtSE1BQy1TSEEyNTYtUEFZTE9BRFwiO1xuXG5leHBvcnQgY29uc3QgVU5TSUdORURfUEFZTE9BRCA9IFwiVU5TSUdORUQtUEFZTE9BRFwiO1xuXG5leHBvcnQgY29uc3QgTUFYX0NBQ0hFX1NJWkUgPSA1MDtcbmV4cG9ydCBjb25zdCBLRVlfVFlQRV9JREVOVElGSUVSID0gXCJhd3M0X3JlcXVlc3RcIjtcblxuZXhwb3J0IGNvbnN0IE1BWF9QUkVTSUdORURfVFRMID0gNjAgKiA2MCAqIDI0ICogNztcbiJdfQ== + +/***/ }), + +/***/ 45478: +/***/ ((__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__(73291); +const constants_1 = __nccwpck_require__(13851); +const signingKeyCache = {}; +const cacheQueue = []; +/** + * Create a string describing the scope of credentials used to sign a request. + * + * @param shortDate The current calendar date in the form YYYYMMDD. + * @param region The AWS region in which the service resides. + * @param service The service to which the signed request is being sent. + */ +function createScope(shortDate, region, service) { + return `${shortDate}/${region}/${service}/${constants_1.KEY_TYPE_IDENTIFIER}`; +} +exports.createScope = createScope; +/** + * Derive a signing key from its composite parts + * + * @param sha256Constructor A constructor function that can instantiate SHA-256 + * hash objects. + * @param credentials The credentials with which the request will be + * signed. + * @param shortDate The current calendar date in the form YYYYMMDD. + * @param region The AWS region in which the service resides. + * @param service The service to which the signed request is being + * sent. + */ +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; +/** + * @internal + */ +function clearCredentialCache() { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); +} +exports.clearCredentialCache = clearCredentialCache; +function hmac(ctor, secret, data) { + const hash = new ctor(secret); + hash.update(data); + return hash.digest(); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlZGVudGlhbERlcml2YXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY3JlZGVudGlhbERlcml2YXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0Esa0VBQW1EO0FBRW5ELDJDQUFrRTtBQUVsRSxNQUFNLGVBQWUsR0FBa0MsRUFBRSxDQUFDO0FBQzFELE1BQU0sVUFBVSxHQUFrQixFQUFFLENBQUM7QUFFckM7Ozs7OztHQU1HO0FBQ0gsU0FBZ0IsV0FBVyxDQUFDLFNBQWlCLEVBQUUsTUFBYyxFQUFFLE9BQWU7SUFDNUUsT0FBTyxHQUFHLFNBQVMsSUFBSSxNQUFNLElBQUksT0FBTyxJQUFJLCtCQUFtQixFQUFFLENBQUM7QUFDcEUsQ0FBQztBQUZELGtDQUVDO0FBRUQ7Ozs7Ozs7Ozs7O0dBV0c7QUFDSSxNQUFNLGFBQWEsR0FBRyxLQUFLLEVBQ2hDLGlCQUFrQyxFQUNsQyxXQUF3QixFQUN4QixTQUFpQixFQUNqQixNQUFjLEVBQ2QsT0FBZSxFQUNNLEVBQUU7SUFDdkIsTUFBTSxTQUFTLEdBQUcsTUFBTSxJQUFJLENBQUMsaUJBQWlCLEVBQUUsV0FBVyxDQUFDLGVBQWUsRUFBRSxXQUFXLENBQUMsV0FBVyxDQUFDLENBQUM7SUFDdEcsTUFBTSxRQUFRLEdBQUcsR0FBRyxTQUFTLElBQUksTUFBTSxJQUFJLE9BQU8sSUFBSSx5QkFBSyxDQUFDLFNBQVMsQ0FBQyxJQUFJLFdBQVcsQ0FBQyxZQUFZLEVBQUUsQ0FBQztJQUNyRyxJQUFJLFFBQVEsSUFBSSxlQUFlLEVBQUU7UUFDL0IsT0FBTyxlQUFlLENBQUMsUUFBUSxDQUFDLENBQUM7S0FDbEM7SUFFRCxVQUFVLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDO0lBQzFCLE9BQU8sVUFBVSxDQUFDLE1BQU0sR0FBRywwQkFBYyxFQUFFO1FBQ3pDLE9BQU8sZUFBZSxDQUFDLFVBQVUsQ0FBQyxLQUFLLEVBQVksQ0FBQyxDQUFDO0tBQ3REO0lBRUQsSUFBSSxHQUFHLEdBQWUsT0FBTyxXQUFXLENBQUMsZUFBZSxFQUFFLENBQUM7SUFDM0QsS0FBSyxNQUFNLFFBQVEsSUFBSSxDQUFDLFNBQVMsRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLCtCQUFtQixDQUFDLEVBQUU7UUFDeEUsR0FBRyxHQUFHLE1BQU0sSUFBSSxDQUFDLGlCQUFpQixFQUFFLEdBQUcsRUFBRSxRQUFRLENBQUMsQ0FBQztLQUNwRDtJQUNELE9BQU8sQ0FBQyxlQUFlLENBQUMsUUFBUSxDQUFDLEdBQUcsR0FBaUIsQ0FBQyxDQUFDO0FBQ3pELENBQUMsQ0FBQztBQXZCVyxRQUFBLGFBQWEsaUJBdUJ4QjtBQUVGOztHQUVHO0FBQ0gsU0FBZ0Isb0JBQW9CO0lBQ2xDLFVBQVUsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDO0lBQ3RCLE1BQU0sQ0FBQyxJQUFJLENBQUMsZUFBZSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsUUFBUSxFQUFFLEVBQUU7UUFDaEQsT0FBTyxlQUFlLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDbkMsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDO0FBTEQsb0RBS0M7QUFFRCxTQUFTLElBQUksQ0FBQyxJQUFxQixFQUFFLE1BQWtCLEVBQUUsSUFBZ0I7SUFDdkUsTUFBTSxJQUFJLEdBQUcsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDOUIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNsQixPQUFPLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQztBQUN2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ3JlZGVudGlhbHMsIEhhc2hDb25zdHJ1Y3RvciwgU291cmNlRGF0YSB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgdG9IZXggfSBmcm9tIFwiQGF3cy1zZGsvdXRpbC1oZXgtZW5jb2RpbmdcIjtcblxuaW1wb3J0IHsgS0VZX1RZUEVfSURFTlRJRklFUiwgTUFYX0NBQ0hFX1NJWkUgfSBmcm9tIFwiLi9jb25zdGFudHNcIjtcblxuY29uc3Qgc2lnbmluZ0tleUNhY2hlOiB7IFtrZXk6IHN0cmluZ106IFVpbnQ4QXJyYXkgfSA9IHt9O1xuY29uc3QgY2FjaGVRdWV1ZTogQXJyYXk8c3RyaW5nPiA9IFtdO1xuXG4vKipcbiAqIENyZWF0ZSBhIHN0cmluZyBkZXNjcmliaW5nIHRoZSBzY29wZSBvZiBjcmVkZW50aWFscyB1c2VkIHRvIHNpZ24gYSByZXF1ZXN0LlxuICpcbiAqIEBwYXJhbSBzaG9ydERhdGUgVGhlIGN1cnJlbnQgY2FsZW5kYXIgZGF0ZSBpbiB0aGUgZm9ybSBZWVlZTU1ERC5cbiAqIEBwYXJhbSByZWdpb24gICAgVGhlIEFXUyByZWdpb24gaW4gd2hpY2ggdGhlIHNlcnZpY2UgcmVzaWRlcy5cbiAqIEBwYXJhbSBzZXJ2aWNlICAgVGhlIHNlcnZpY2UgdG8gd2hpY2ggdGhlIHNpZ25lZCByZXF1ZXN0IGlzIGJlaW5nIHNlbnQuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVTY29wZShzaG9ydERhdGU6IHN0cmluZywgcmVnaW9uOiBzdHJpbmcsIHNlcnZpY2U6IHN0cmluZyk6IHN0cmluZyB7XG4gIHJldHVybiBgJHtzaG9ydERhdGV9LyR7cmVnaW9ufS8ke3NlcnZpY2V9LyR7S0VZX1RZUEVfSURFTlRJRklFUn1gO1xufVxuXG4vKipcbiAqIERlcml2ZSBhIHNpZ25pbmcga2V5IGZyb20gaXRzIGNvbXBvc2l0ZSBwYXJ0c1xuICpcbiAqIEBwYXJhbSBzaGEyNTZDb25zdHJ1Y3RvciBBIGNvbnN0cnVjdG9yIGZ1bmN0aW9uIHRoYXQgY2FuIGluc3RhbnRpYXRlIFNIQS0yNTZcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICBoYXNoIG9iamVjdHMuXG4gKiBAcGFyYW0gY3JlZGVudGlhbHMgICAgICAgVGhlIGNyZWRlbnRpYWxzIHdpdGggd2hpY2ggdGhlIHJlcXVlc3Qgd2lsbCBiZVxuICogICAgICAgICAgICAgICAgICAgICAgICAgIHNpZ25lZC5cbiAqIEBwYXJhbSBzaG9ydERhdGUgICAgICAgICBUaGUgY3VycmVudCBjYWxlbmRhciBkYXRlIGluIHRoZSBmb3JtIFlZWVlNTURELlxuICogQHBhcmFtIHJlZ2lvbiAgICAgICAgICAgIFRoZSBBV1MgcmVnaW9uIGluIHdoaWNoIHRoZSBzZXJ2aWNlIHJlc2lkZXMuXG4gKiBAcGFyYW0gc2VydmljZSAgICAgICAgICAgVGhlIHNlcnZpY2UgdG8gd2hpY2ggdGhlIHNpZ25lZCByZXF1ZXN0IGlzIGJlaW5nXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgc2VudC5cbiAqL1xuZXhwb3J0IGNvbnN0IGdldFNpZ25pbmdLZXkgPSBhc3luYyAoXG4gIHNoYTI1NkNvbnN0cnVjdG9yOiBIYXNoQ29uc3RydWN0b3IsXG4gIGNyZWRlbnRpYWxzOiBDcmVkZW50aWFscyxcbiAgc2hvcnREYXRlOiBzdHJpbmcsXG4gIHJlZ2lvbjogc3RyaW5nLFxuICBzZXJ2aWNlOiBzdHJpbmdcbik6IFByb21pc2U8VWludDhBcnJheT4gPT4ge1xuICBjb25zdCBjcmVkc0hhc2ggPSBhd2FpdCBobWFjKHNoYTI1NkNvbnN0cnVjdG9yLCBjcmVkZW50aWFscy5zZWNyZXRBY2Nlc3NLZXksIGNyZWRlbnRpYWxzLmFjY2Vzc0tleUlkKTtcbiAgY29uc3QgY2FjaGVLZXkgPSBgJHtzaG9ydERhdGV9OiR7cmVnaW9ufToke3NlcnZpY2V9OiR7dG9IZXgoY3JlZHNIYXNoKX06JHtjcmVkZW50aWFscy5zZXNzaW9uVG9rZW59YDtcbiAgaWYgKGNhY2hlS2V5IGluIHNpZ25pbmdLZXlDYWNoZSkge1xuICAgIHJldHVybiBzaWduaW5nS2V5Q2FjaGVbY2FjaGVLZXldO1xuICB9XG5cbiAgY2FjaGVRdWV1ZS5wdXNoKGNhY2hlS2V5KTtcbiAgd2hpbGUgKGNhY2hlUXVldWUubGVuZ3RoID4gTUFYX0NBQ0hFX1NJWkUpIHtcbiAgICBkZWxldGUgc2lnbmluZ0tleUNhY2hlW2NhY2hlUXVldWUuc2hpZnQoKSBhcyBzdHJpbmddO1xuICB9XG5cbiAgbGV0IGtleTogU291cmNlRGF0YSA9IGBBV1M0JHtjcmVkZW50aWFscy5zZWNyZXRBY2Nlc3NLZXl9YDtcbiAgZm9yIChjb25zdCBzaWduYWJsZSBvZiBbc2hvcnREYXRlLCByZWdpb24sIHNlcnZpY2UsIEtFWV9UWVBFX0lERU5USUZJRVJdKSB7XG4gICAga2V5ID0gYXdhaXQgaG1hYyhzaGEyNTZDb25zdHJ1Y3Rvciwga2V5LCBzaWduYWJsZSk7XG4gIH1cbiAgcmV0dXJuIChzaWduaW5nS2V5Q2FjaGVbY2FjaGVLZXldID0ga2V5IGFzIFVpbnQ4QXJyYXkpO1xufTtcblxuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGNsZWFyQ3JlZGVudGlhbENhY2hlKCk6IHZvaWQge1xuICBjYWNoZVF1ZXVlLmxlbmd0aCA9IDA7XG4gIE9iamVjdC5rZXlzKHNpZ25pbmdLZXlDYWNoZSkuZm9yRWFjaCgoY2FjaGVLZXkpID0+IHtcbiAgICBkZWxldGUgc2lnbmluZ0tleUNhY2hlW2NhY2hlS2V5XTtcbiAgfSk7XG59XG5cbmZ1bmN0aW9uIGhtYWMoY3RvcjogSGFzaENvbnN0cnVjdG9yLCBzZWNyZXQ6IFNvdXJjZURhdGEsIGRhdGE6IFNvdXJjZURhdGEpOiBQcm9taXNlPFVpbnQ4QXJyYXk+IHtcbiAgY29uc3QgaGFzaCA9IG5ldyBjdG9yKHNlY3JldCk7XG4gIGhhc2gudXBkYXRlKGRhdGEpO1xuICByZXR1cm4gaGFzaC5kaWdlc3QoKTtcbn1cbiJdfQ== + +/***/ }), + +/***/ 99201: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCanonicalHeaders = void 0; +const constants_1 = __nccwpck_require__(13851); +/** + * @internal + */ +function 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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0Q2Fub25pY2FsSGVhZGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nZXRDYW5vbmljYWxIZWFkZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBLDJDQUFrRztBQUVsRzs7R0FFRztBQUNILFNBQWdCLG1CQUFtQixDQUNqQyxFQUFFLE9BQU8sRUFBZSxFQUN4QixpQkFBK0IsRUFDL0IsZUFBNkI7SUFFN0IsTUFBTSxTQUFTLEdBQWMsRUFBRSxDQUFDO0lBQ2hDLEtBQUssTUFBTSxVQUFVLElBQUksTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxJQUFJLEVBQUUsRUFBRTtRQUNwRCxNQUFNLG1CQUFtQixHQUFHLFVBQVUsQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUNyRCxJQUNFLG1CQUFtQixJQUFJLHFDQUF5QixLQUNoRCxpQkFBaUIsYUFBakIsaUJBQWlCLHVCQUFqQixpQkFBaUIsQ0FBRSxHQUFHLENBQUMsbUJBQW1CLEVBQUM7WUFDM0MsZ0NBQW9CLENBQUMsSUFBSSxDQUFDLG1CQUFtQixDQUFDO1lBQzlDLDhCQUFrQixDQUFDLElBQUksQ0FBQyxtQkFBbUIsQ0FBQyxFQUM1QztZQUNBLElBQUksQ0FBQyxlQUFlLElBQUksQ0FBQyxlQUFlLElBQUksQ0FBQyxlQUFlLENBQUMsR0FBRyxDQUFDLG1CQUFtQixDQUFDLENBQUMsRUFBRTtnQkFDdEYsU0FBUzthQUNWO1NBQ0Y7UUFFRCxTQUFTLENBQUMsbUJBQW1CLENBQUMsR0FBRyxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUMsSUFBSSxFQUFFLENBQUMsT0FBTyxDQUFDLE1BQU0sRUFBRSxHQUFHLENBQUMsQ0FBQztLQUNsRjtJQUVELE9BQU8sU0FBUyxDQUFDO0FBQ25CLENBQUM7QUF2QkQsa0RBdUJDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSGVhZGVyQmFnLCBIdHRwUmVxdWVzdCB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5pbXBvcnQgeyBBTFdBWVNfVU5TSUdOQUJMRV9IRUFERVJTLCBQUk9YWV9IRUFERVJfUEFUVEVSTiwgU0VDX0hFQURFUl9QQVRURVJOIH0gZnJvbSBcIi4vY29uc3RhbnRzXCI7XG5cbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRDYW5vbmljYWxIZWFkZXJzKFxuICB7IGhlYWRlcnMgfTogSHR0cFJlcXVlc3QsXG4gIHVuc2lnbmFibGVIZWFkZXJzPzogU2V0PHN0cmluZz4sXG4gIHNpZ25hYmxlSGVhZGVycz86IFNldDxzdHJpbmc+XG4pOiBIZWFkZXJCYWcge1xuICBjb25zdCBjYW5vbmljYWw6IEhlYWRlckJhZyA9IHt9O1xuICBmb3IgKGNvbnN0IGhlYWRlck5hbWUgb2YgT2JqZWN0LmtleXMoaGVhZGVycykuc29ydCgpKSB7XG4gICAgY29uc3QgY2Fub25pY2FsSGVhZGVyTmFtZSA9IGhlYWRlck5hbWUudG9Mb3dlckNhc2UoKTtcbiAgICBpZiAoXG4gICAgICBjYW5vbmljYWxIZWFkZXJOYW1lIGluIEFMV0FZU19VTlNJR05BQkxFX0hFQURFUlMgfHxcbiAgICAgIHVuc2lnbmFibGVIZWFkZXJzPy5oYXMoY2Fub25pY2FsSGVhZGVyTmFtZSkgfHxcbiAgICAgIFBST1hZX0hFQURFUl9QQVRURVJOLnRlc3QoY2Fub25pY2FsSGVhZGVyTmFtZSkgfHxcbiAgICAgIFNFQ19IRUFERVJfUEFUVEVSTi50ZXN0KGNhbm9uaWNhbEhlYWRlck5hbWUpXG4gICAgKSB7XG4gICAgICBpZiAoIXNpZ25hYmxlSGVhZGVycyB8fCAoc2lnbmFibGVIZWFkZXJzICYmICFzaWduYWJsZUhlYWRlcnMuaGFzKGNhbm9uaWNhbEhlYWRlck5hbWUpKSkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBjYW5vbmljYWxbY2Fub25pY2FsSGVhZGVyTmFtZV0gPSBoZWFkZXJzW2hlYWRlck5hbWVdLnRyaW0oKS5yZXBsYWNlKC9cXHMrL2csIFwiIFwiKTtcbiAgfVxuXG4gIHJldHVybiBjYW5vbmljYWw7XG59XG4iXX0= + +/***/ }), + +/***/ 28706: +/***/ ((__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__(87834); +const constants_1 = __nccwpck_require__(13851); +/** + * @internal + */ +function 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) // omit any falsy values + .join("&"); +} +exports.getCanonicalQuery = getCanonicalQuery; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0Q2Fub25pY2FsUXVlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ2V0Q2Fub25pY2FsUXVlcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsOERBQXFEO0FBRXJELDJDQUErQztBQUUvQzs7R0FFRztBQUNILFNBQWdCLGlCQUFpQixDQUFDLEVBQUUsS0FBSyxHQUFHLEVBQUUsRUFBZTtJQUMzRCxNQUFNLElBQUksR0FBa0IsRUFBRSxDQUFDO0lBQy9CLE1BQU0sVUFBVSxHQUE4QixFQUFFLENBQUM7SUFDakQsS0FBSyxNQUFNLEdBQUcsSUFBSSxNQUFNLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLElBQUksRUFBRSxFQUFFO1FBQzNDLElBQUksR0FBRyxDQUFDLFdBQVcsRUFBRSxLQUFLLDRCQUFnQixFQUFFO1lBQzFDLFNBQVM7U0FDVjtRQUVELElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7UUFDZixNQUFNLEtBQUssR0FBRyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUM7UUFDekIsSUFBSSxPQUFPLEtBQUssS0FBSyxRQUFRLEVBQUU7WUFDN0IsVUFBVSxDQUFDLEdBQUcsQ0FBQyxHQUFHLEdBQUcsMkJBQVMsQ0FBQyxHQUFHLENBQUMsSUFBSSwyQkFBUyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUM7U0FDM0Q7YUFBTSxJQUFJLEtBQUssQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLEVBQUU7WUFDL0IsVUFBVSxDQUFDLEdBQUcsQ0FBQyxHQUFHLEtBQUs7aUJBQ3BCLEtBQUssQ0FBQyxDQUFDLENBQUM7aUJBQ1IsSUFBSSxFQUFFO2lCQUNOLE1BQU0sQ0FDTCxDQUFDLE9BQXNCLEVBQUUsS0FBYSxFQUFFLEVBQUUsQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUMsR0FBRywyQkFBUyxDQUFDLEdBQUcsQ0FBQyxJQUFJLDJCQUFTLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQ3BHLEVBQUUsQ0FDSDtpQkFDQSxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7U0FDZDtLQUNGO0lBRUQsT0FBTyxJQUFJO1NBQ1IsR0FBRyxDQUFDLENBQUMsR0FBRyxFQUFFLEVBQUUsQ0FBQyxVQUFVLENBQUMsR0FBRyxDQUFDLENBQUM7U0FDN0IsTUFBTSxDQUFDLENBQUMsVUFBVSxFQUFFLEVBQUUsQ0FBQyxVQUFVLENBQUMsQ0FBQyx3QkFBd0I7U0FDM0QsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ2YsQ0FBQztBQTVCRCw4Q0E0QkMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIdHRwUmVxdWVzdCB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgZXNjYXBlVXJpIH0gZnJvbSBcIkBhd3Mtc2RrL3V0aWwtdXJpLWVzY2FwZVwiO1xuXG5pbXBvcnQgeyBTSUdOQVRVUkVfSEVBREVSIH0gZnJvbSBcIi4vY29uc3RhbnRzXCI7XG5cbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRDYW5vbmljYWxRdWVyeSh7IHF1ZXJ5ID0ge30gfTogSHR0cFJlcXVlc3QpOiBzdHJpbmcge1xuICBjb25zdCBrZXlzOiBBcnJheTxzdHJpbmc+ID0gW107XG4gIGNvbnN0IHNlcmlhbGl6ZWQ6IHsgW2tleTogc3RyaW5nXTogc3RyaW5nIH0gPSB7fTtcbiAgZm9yIChjb25zdCBrZXkgb2YgT2JqZWN0LmtleXMocXVlcnkpLnNvcnQoKSkge1xuICAgIGlmIChrZXkudG9Mb3dlckNhc2UoKSA9PT0gU0lHTkFUVVJFX0hFQURFUikge1xuICAgICAgY29udGludWU7XG4gICAgfVxuXG4gICAga2V5cy5wdXNoKGtleSk7XG4gICAgY29uc3QgdmFsdWUgPSBxdWVyeVtrZXldO1xuICAgIGlmICh0eXBlb2YgdmFsdWUgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgIHNlcmlhbGl6ZWRba2V5XSA9IGAke2VzY2FwZVVyaShrZXkpfT0ke2VzY2FwZVVyaSh2YWx1ZSl9YDtcbiAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkodmFsdWUpKSB7XG4gICAgICBzZXJpYWxpemVkW2tleV0gPSB2YWx1ZVxuICAgICAgICAuc2xpY2UoMClcbiAgICAgICAgLnNvcnQoKVxuICAgICAgICAucmVkdWNlKFxuICAgICAgICAgIChlbmNvZGVkOiBBcnJheTxzdHJpbmc+LCB2YWx1ZTogc3RyaW5nKSA9PiBlbmNvZGVkLmNvbmNhdChbYCR7ZXNjYXBlVXJpKGtleSl9PSR7ZXNjYXBlVXJpKHZhbHVlKX1gXSksXG4gICAgICAgICAgW11cbiAgICAgICAgKVxuICAgICAgICAuam9pbihcIiZcIik7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGtleXNcbiAgICAubWFwKChrZXkpID0+IHNlcmlhbGl6ZWRba2V5XSlcbiAgICAuZmlsdGVyKChzZXJpYWxpemVkKSA9PiBzZXJpYWxpemVkKSAvLyBvbWl0IGFueSBmYWxzeSB2YWx1ZXNcbiAgICAuam9pbihcIiZcIik7XG59XG4iXX0= + +/***/ }), + +/***/ 17902: +/***/ ((__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__(30694); +const util_hex_encoding_1 = __nccwpck_require__(73291); +const constants_1 = __nccwpck_require__(13851); +/** + * @internal + */ +async function getPayloadHash({ 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()); + } + // As any defined body that is not a string or binary data is a stream, this + // body is unsignable. Attempt to send the request with an unsigned payload, + // which may or may not be accepted by the service. + return constants_1.UNSIGNED_PAYLOAD; +} +exports.getPayloadHash = getPayloadHash; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0UGF5bG9hZEhhc2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ2V0UGF5bG9hZEhhc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOERBQXlEO0FBRXpELGtFQUFtRDtBQUVuRCwyQ0FBOEQ7QUFFOUQ7O0dBRUc7QUFDSSxLQUFLLFVBQVUsY0FBYyxDQUNsQyxFQUFFLE9BQU8sRUFBRSxJQUFJLEVBQWUsRUFDOUIsZUFBZ0M7SUFFaEMsS0FBSyxNQUFNLFVBQVUsSUFBSSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQzdDLElBQUksVUFBVSxDQUFDLFdBQVcsRUFBRSxLQUFLLHlCQUFhLEVBQUU7WUFDOUMsT0FBTyxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUM7U0FDNUI7S0FDRjtJQUVELElBQUksSUFBSSxJQUFJLFNBQVMsRUFBRTtRQUNyQixPQUFPLGtFQUFrRSxDQUFDO0tBQzNFO1NBQU0sSUFBSSxPQUFPLElBQUksS0FBSyxRQUFRLElBQUksV0FBVyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSwrQkFBYSxDQUFDLElBQUksQ0FBQyxFQUFFO1FBQ3RGLE1BQU0sUUFBUSxHQUFHLElBQUksZUFBZSxFQUFFLENBQUM7UUFDdkMsUUFBUSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUN0QixPQUFPLHlCQUFLLENBQUMsTUFBTSxRQUFRLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQztLQUN2QztJQUVELDRFQUE0RTtJQUM1RSw0RUFBNEU7SUFDNUUsbURBQW1EO0lBQ25ELE9BQU8sNEJBQWdCLENBQUM7QUFDMUIsQ0FBQztBQXRCRCx3Q0FzQkMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBpc0FycmF5QnVmZmVyIH0gZnJvbSBcIkBhd3Mtc2RrL2lzLWFycmF5LWJ1ZmZlclwiO1xuaW1wb3J0IHsgSGFzaENvbnN0cnVjdG9yLCBIdHRwUmVxdWVzdCB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgdG9IZXggfSBmcm9tIFwiQGF3cy1zZGsvdXRpbC1oZXgtZW5jb2RpbmdcIjtcblxuaW1wb3J0IHsgU0hBMjU2X0hFQURFUiwgVU5TSUdORURfUEFZTE9BRCB9IGZyb20gXCIuL2NvbnN0YW50c1wiO1xuXG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gZ2V0UGF5bG9hZEhhc2goXG4gIHsgaGVhZGVycywgYm9keSB9OiBIdHRwUmVxdWVzdCxcbiAgaGFzaENvbnN0cnVjdG9yOiBIYXNoQ29uc3RydWN0b3Jcbik6IFByb21pc2U8c3RyaW5nPiB7XG4gIGZvciAoY29uc3QgaGVhZGVyTmFtZSBvZiBPYmplY3Qua2V5cyhoZWFkZXJzKSkge1xuICAgIGlmIChoZWFkZXJOYW1lLnRvTG93ZXJDYXNlKCkgPT09IFNIQTI1Nl9IRUFERVIpIHtcbiAgICAgIHJldHVybiBoZWFkZXJzW2hlYWRlck5hbWVdO1xuICAgIH1cbiAgfVxuXG4gIGlmIChib2R5ID09IHVuZGVmaW5lZCkge1xuICAgIHJldHVybiBcImUzYjBjNDQyOThmYzFjMTQ5YWZiZjRjODk5NmZiOTI0MjdhZTQxZTQ2NDliOTM0Y2E0OTU5OTFiNzg1MmI4NTVcIjtcbiAgfSBlbHNlIGlmICh0eXBlb2YgYm9keSA9PT0gXCJzdHJpbmdcIiB8fCBBcnJheUJ1ZmZlci5pc1ZpZXcoYm9keSkgfHwgaXNBcnJheUJ1ZmZlcihib2R5KSkge1xuICAgIGNvbnN0IGhhc2hDdG9yID0gbmV3IGhhc2hDb25zdHJ1Y3RvcigpO1xuICAgIGhhc2hDdG9yLnVwZGF0ZShib2R5KTtcbiAgICByZXR1cm4gdG9IZXgoYXdhaXQgaGFzaEN0b3IuZGlnZXN0KCkpO1xuICB9XG5cbiAgLy8gQXMgYW55IGRlZmluZWQgYm9keSB0aGF0IGlzIG5vdCBhIHN0cmluZyBvciBiaW5hcnkgZGF0YSBpcyBhIHN0cmVhbSwgdGhpc1xuICAvLyBib2R5IGlzIHVuc2lnbmFibGUuIEF0dGVtcHQgdG8gc2VuZCB0aGUgcmVxdWVzdCB3aXRoIGFuIHVuc2lnbmVkIHBheWxvYWQsXG4gIC8vIHdoaWNoIG1heSBvciBtYXkgbm90IGJlIGFjY2VwdGVkIGJ5IHRoZSBzZXJ2aWNlLlxuICByZXR1cm4gVU5TSUdORURfUEFZTE9BRDtcbn1cbiJdfQ== + +/***/ }), + +/***/ 91402: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.hasHeader = void 0; +function hasHeader(soughtHeader, headers) { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; +} +exports.hasHeader = hasHeader; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFzSGVhZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2hhc0hlYWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxTQUFnQixTQUFTLENBQUMsWUFBb0IsRUFBRSxPQUFrQjtJQUNoRSxZQUFZLEdBQUcsWUFBWSxDQUFDLFdBQVcsRUFBRSxDQUFDO0lBQzFDLEtBQUssTUFBTSxVQUFVLElBQUksTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsRUFBRTtRQUM3QyxJQUFJLFlBQVksS0FBSyxVQUFVLENBQUMsV0FBVyxFQUFFLEVBQUU7WUFDN0MsT0FBTyxJQUFJLENBQUM7U0FDYjtLQUNGO0lBRUQsT0FBTyxLQUFLLENBQUM7QUFDZixDQUFDO0FBVEQsOEJBU0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIZWFkZXJCYWcgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGZ1bmN0aW9uIGhhc0hlYWRlcihzb3VnaHRIZWFkZXI6IHN0cmluZywgaGVhZGVyczogSGVhZGVyQmFnKTogYm9vbGVhbiB7XG4gIHNvdWdodEhlYWRlciA9IHNvdWdodEhlYWRlci50b0xvd2VyQ2FzZSgpO1xuICBmb3IgKGNvbnN0IGhlYWRlck5hbWUgb2YgT2JqZWN0LmtleXMoaGVhZGVycykpIHtcbiAgICBpZiAoc291Z2h0SGVhZGVyID09PSBoZWFkZXJOYW1lLnRvTG93ZXJDYXNlKCkpIHtcbiAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBmYWxzZTtcbn1cbiJdfQ== + +/***/ }), + +/***/ 64172: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(45478), exports); +tslib_1.__exportStar(__nccwpck_require__(47210), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUVBQXVDO0FBQ3ZDLHdEQUE4QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2NyZWRlbnRpYWxEZXJpdmF0aW9uXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9TaWduYXR1cmVWNFwiO1xuIl19 + +/***/ }), + +/***/ 35850: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.moveHeadersToQuery = void 0; +const cloneRequest_1 = __nccwpck_require__(14566); +/** + * @internal + */ +function 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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW92ZUhlYWRlcnNUb1F1ZXJ5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21vdmVIZWFkZXJzVG9RdWVyeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxpREFBOEM7QUFFOUM7O0dBRUc7QUFDSCxTQUFnQixrQkFBa0IsQ0FDaEMsT0FBb0IsRUFDcEIsVUFBZ0QsRUFBRTs7SUFFbEQsTUFBTSxFQUFFLE9BQU8sRUFBRSxLQUFLLEdBQUcsRUFBdUIsRUFBRSxHQUNoRCxPQUFRLE9BQWUsQ0FBQyxLQUFLLEtBQUssVUFBVSxDQUFDLENBQUMsQ0FBRSxPQUFlLENBQUMsS0FBSyxFQUFFLENBQUMsQ0FBQyxDQUFDLDJCQUFZLENBQUMsT0FBTyxDQUFDLENBQUM7SUFDbEcsS0FBSyxNQUFNLElBQUksSUFBSSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQ3ZDLE1BQU0sS0FBSyxHQUFHLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUNqQyxJQUFJLEtBQUssQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxLQUFLLFFBQVEsSUFBSSxRQUFDLE9BQU8sQ0FBQyxrQkFBa0IsMENBQUUsR0FBRyxDQUFDLEtBQUssRUFBQyxFQUFFO1lBQzlFLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7WUFDNUIsT0FBTyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7U0FDdEI7S0FDRjtJQUVELE9BQU87UUFDTCxHQUFHLE9BQU87UUFDVixPQUFPO1FBQ1AsS0FBSztLQUNOLENBQUM7QUFDSixDQUFDO0FBbkJELGdEQW1CQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEh0dHBSZXF1ZXN0LCBRdWVyeVBhcmFtZXRlckJhZyB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5pbXBvcnQgeyBjbG9uZVJlcXVlc3QgfSBmcm9tIFwiLi9jbG9uZVJlcXVlc3RcIjtcblxuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIG1vdmVIZWFkZXJzVG9RdWVyeShcbiAgcmVxdWVzdDogSHR0cFJlcXVlc3QsXG4gIG9wdGlvbnM6IHsgdW5ob2lzdGFibGVIZWFkZXJzPzogU2V0PHN0cmluZz4gfSA9IHt9XG4pOiBIdHRwUmVxdWVzdCAmIHsgcXVlcnk6IFF1ZXJ5UGFyYW1ldGVyQmFnIH0ge1xuICBjb25zdCB7IGhlYWRlcnMsIHF1ZXJ5ID0ge30gYXMgUXVlcnlQYXJhbWV0ZXJCYWcgfSA9XG4gICAgdHlwZW9mIChyZXF1ZXN0IGFzIGFueSkuY2xvbmUgPT09IFwiZnVuY3Rpb25cIiA/IChyZXF1ZXN0IGFzIGFueSkuY2xvbmUoKSA6IGNsb25lUmVxdWVzdChyZXF1ZXN0KTtcbiAgZm9yIChjb25zdCBuYW1lIG9mIE9iamVjdC5rZXlzKGhlYWRlcnMpKSB7XG4gICAgY29uc3QgbG5hbWUgPSBuYW1lLnRvTG93ZXJDYXNlKCk7XG4gICAgaWYgKGxuYW1lLnN1YnN0cigwLCA2KSA9PT0gXCJ4LWFtei1cIiAmJiAhb3B0aW9ucy51bmhvaXN0YWJsZUhlYWRlcnM/LmhhcyhsbmFtZSkpIHtcbiAgICAgIHF1ZXJ5W25hbWVdID0gaGVhZGVyc1tuYW1lXTtcbiAgICAgIGRlbGV0ZSBoZWFkZXJzW25hbWVdO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB7XG4gICAgLi4ucmVxdWVzdCxcbiAgICBoZWFkZXJzLFxuICAgIHF1ZXJ5LFxuICB9O1xufVxuIl19 + +/***/ }), + +/***/ 14952: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.prepareRequest = void 0; +const cloneRequest_1 = __nccwpck_require__(14566); +const constants_1 = __nccwpck_require__(13851); +/** + * @internal + */ +function prepareRequest(request) { + // Create a clone of the request object that does not clone the body + 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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlcGFyZVJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcHJlcGFyZVJlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsaURBQThDO0FBQzlDLDJDQUFnRDtBQUVoRDs7R0FFRztBQUNILFNBQWdCLGNBQWMsQ0FBQyxPQUFvQjtJQUNqRCxvRUFBb0U7SUFDcEUsT0FBTyxHQUFHLE9BQVEsT0FBZSxDQUFDLEtBQUssS0FBSyxVQUFVLENBQUMsQ0FBQyxDQUFFLE9BQWUsQ0FBQyxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUMsMkJBQVksQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUUxRyxLQUFLLE1BQU0sVUFBVSxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQ3JELElBQUksNkJBQWlCLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxXQUFXLEVBQUUsQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFFO1lBQzVELE9BQU8sT0FBTyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQztTQUNwQztLQUNGO0lBRUQsT0FBTyxPQUFPLENBQUM7QUFDakIsQ0FBQztBQVhELHdDQVdDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSHR0cFJlcXVlc3QgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuaW1wb3J0IHsgY2xvbmVSZXF1ZXN0IH0gZnJvbSBcIi4vY2xvbmVSZXF1ZXN0XCI7XG5pbXBvcnQgeyBHRU5FUkFURURfSEVBREVSUyB9IGZyb20gXCIuL2NvbnN0YW50c1wiO1xuXG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgZnVuY3Rpb24gcHJlcGFyZVJlcXVlc3QocmVxdWVzdDogSHR0cFJlcXVlc3QpOiBIdHRwUmVxdWVzdCB7XG4gIC8vIENyZWF0ZSBhIGNsb25lIG9mIHRoZSByZXF1ZXN0IG9iamVjdCB0aGF0IGRvZXMgbm90IGNsb25lIHRoZSBib2R5XG4gIHJlcXVlc3QgPSB0eXBlb2YgKHJlcXVlc3QgYXMgYW55KS5jbG9uZSA9PT0gXCJmdW5jdGlvblwiID8gKHJlcXVlc3QgYXMgYW55KS5jbG9uZSgpIDogY2xvbmVSZXF1ZXN0KHJlcXVlc3QpO1xuXG4gIGZvciAoY29uc3QgaGVhZGVyTmFtZSBvZiBPYmplY3Qua2V5cyhyZXF1ZXN0LmhlYWRlcnMpKSB7XG4gICAgaWYgKEdFTkVSQVRFRF9IRUFERVJTLmluZGV4T2YoaGVhZGVyTmFtZS50b0xvd2VyQ2FzZSgpKSA+IC0xKSB7XG4gICAgICBkZWxldGUgcmVxdWVzdC5oZWFkZXJzW2hlYWRlck5hbWVdO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiByZXF1ZXN0O1xufVxuIl19 + +/***/ }), + +/***/ 57850: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toDate = exports.iso8601 = void 0; +function iso8601(time) { + return toDate(time) + .toISOString() + .replace(/\.\d{3}Z$/, "Z"); +} +exports.iso8601 = iso8601; +function 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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbERhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbERhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsU0FBZ0IsT0FBTyxDQUFDLElBQTRCO0lBQ2xELE9BQU8sTUFBTSxDQUFDLElBQUksQ0FBQztTQUNoQixXQUFXLEVBQUU7U0FDYixPQUFPLENBQUMsV0FBVyxFQUFFLEdBQUcsQ0FBQyxDQUFDO0FBQy9CLENBQUM7QUFKRCwwQkFJQztBQUVELFNBQWdCLE1BQU0sQ0FBQyxJQUE0QjtJQUNqRCxJQUFJLE9BQU8sSUFBSSxLQUFLLFFBQVEsRUFBRTtRQUM1QixPQUFPLElBQUksSUFBSSxDQUFDLElBQUksR0FBRyxJQUFJLENBQUMsQ0FBQztLQUM5QjtJQUVELElBQUksT0FBTyxJQUFJLEtBQUssUUFBUSxFQUFFO1FBQzVCLElBQUksTUFBTSxDQUFDLElBQUksQ0FBQyxFQUFFO1lBQ2hCLE9BQU8sSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDO1NBQ3RDO1FBQ0QsT0FBTyxJQUFJLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN2QjtJQUVELE9BQU8sSUFBSSxDQUFDO0FBQ2QsQ0FBQztBQWJELHdCQWFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIGlzbzg2MDEodGltZTogbnVtYmVyIHwgc3RyaW5nIHwgRGF0ZSk6IHN0cmluZyB7XG4gIHJldHVybiB0b0RhdGUodGltZSlcbiAgICAudG9JU09TdHJpbmcoKVxuICAgIC5yZXBsYWNlKC9cXC5cXGR7M31aJC8sIFwiWlwiKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHRvRGF0ZSh0aW1lOiBudW1iZXIgfCBzdHJpbmcgfCBEYXRlKTogRGF0ZSB7XG4gIGlmICh0eXBlb2YgdGltZSA9PT0gXCJudW1iZXJcIikge1xuICAgIHJldHVybiBuZXcgRGF0ZSh0aW1lICogMTAwMCk7XG4gIH1cblxuICBpZiAodHlwZW9mIHRpbWUgPT09IFwic3RyaW5nXCIpIHtcbiAgICBpZiAoTnVtYmVyKHRpbWUpKSB7XG4gICAgICByZXR1cm4gbmV3IERhdGUoTnVtYmVyKHRpbWUpICogMTAwMCk7XG4gICAgfVxuICAgIHJldHVybiBuZXcgRGF0ZSh0aW1lKTtcbiAgfVxuXG4gIHJldHVybiB0aW1lO1xufVxuIl19 + +/***/ }), + +/***/ 26717: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Client = void 0; +const middleware_stack_1 = __nccwpck_require__(82928); +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( + // prevent any errors thrown in the callback from triggering an + // unhandled promise rejection + () => { }); + } + else { + return handler(command).then((result) => result.output); + } + } + destroy() { + if (this.config.requestHandler.destroy) + this.config.requestHandler.destroy(); + } +} +exports.Client = Client; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NsaWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxnRUFBMkQ7QUFVM0QsTUFBYSxNQUFNO0lBUWpCLFlBQVksTUFBbUM7UUFGeEMsb0JBQWUsR0FBRyxpQ0FBYyxFQUE2QixDQUFDO1FBR25FLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO0lBQ3ZCLENBQUM7SUFjRCxJQUFJLENBQ0YsT0FBK0csRUFDL0csV0FBc0UsRUFDdEUsRUFBMEM7UUFFMUMsTUFBTSxPQUFPLEdBQUcsT0FBTyxXQUFXLEtBQUssVUFBVSxDQUFDLENBQUMsQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLFNBQVMsQ0FBQztRQUM1RSxNQUFNLFFBQVEsR0FBRyxPQUFPLFdBQVcsS0FBSyxVQUFVLENBQUMsQ0FBQyxDQUFFLFdBQXFELENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQztRQUNqSCxNQUFNLE9BQU8sR0FBRyxPQUFPLENBQUMsaUJBQWlCLENBQUMsSUFBSSxDQUFDLGVBQXNCLEVBQUUsSUFBSSxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsQ0FBQztRQUM3RixJQUFJLFFBQVEsRUFBRTtZQUNaLE9BQU8sQ0FBQyxPQUFPLENBQUM7aUJBQ2IsSUFBSSxDQUNILENBQUMsTUFBTSxFQUFFLEVBQUUsQ0FBQyxRQUFRLENBQUMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxNQUFNLENBQUMsRUFDekMsQ0FBQyxHQUFRLEVBQUUsRUFBRSxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsQ0FDNUI7aUJBQ0EsS0FBSztZQUNKLCtEQUErRDtZQUMvRCw4QkFBOEI7WUFDOUIsR0FBRyxFQUFFLEdBQUUsQ0FBQyxDQUNULENBQUM7U0FDTDthQUFNO1lBQ0wsT0FBTyxPQUFPLENBQUMsT0FBTyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsTUFBTSxFQUFFLEVBQUUsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUM7U0FDekQ7SUFDSCxDQUFDO0lBRUQsT0FBTztRQUNMLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxjQUFjLENBQUMsT0FBTztZQUFFLElBQUksQ0FBQyxNQUFNLENBQUMsY0FBYyxDQUFDLE9BQU8sRUFBRSxDQUFDO0lBQy9FLENBQUM7Q0FDRjtBQW5ERCx3QkFtREMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjb25zdHJ1Y3RTdGFjayB9IGZyb20gXCJAYXdzLXNkay9taWRkbGV3YXJlLXN0YWNrXCI7XG5pbXBvcnQgeyBDbGllbnQgYXMgSUNsaWVudCwgQ29tbWFuZCwgTWV0YWRhdGFCZWFyZXIsIFJlcXVlc3RIYW5kbGVyIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmV4cG9ydCBpbnRlcmZhY2UgU21pdGh5Q29uZmlndXJhdGlvbjxIYW5kbGVyT3B0aW9ucz4ge1xuICByZXF1ZXN0SGFuZGxlcjogUmVxdWVzdEhhbmRsZXI8YW55LCBhbnksIEhhbmRsZXJPcHRpb25zPjtcbiAgcmVhZG9ubHkgYXBpVmVyc2lvbjogc3RyaW5nO1xufVxuXG5leHBvcnQgdHlwZSBTbWl0aHlSZXNvbHZlZENvbmZpZ3VyYXRpb248SGFuZGxlck9wdGlvbnM+ID0gU21pdGh5Q29uZmlndXJhdGlvbjxIYW5kbGVyT3B0aW9ucz47XG5cbmV4cG9ydCBjbGFzcyBDbGllbnQ8XG4gIEhhbmRsZXJPcHRpb25zLFxuICBDbGllbnRJbnB1dCBleHRlbmRzIG9iamVjdCxcbiAgQ2xpZW50T3V0cHV0IGV4dGVuZHMgTWV0YWRhdGFCZWFyZXIsXG4gIFJlc29sdmVkQ2xpZW50Q29uZmlndXJhdGlvbiBleHRlbmRzIFNtaXRoeVJlc29sdmVkQ29uZmlndXJhdGlvbjxIYW5kbGVyT3B0aW9ucz5cbj4gaW1wbGVtZW50cyBJQ2xpZW50PENsaWVudElucHV0LCBDbGllbnRPdXRwdXQsIFJlc29sdmVkQ2xpZW50Q29uZmlndXJhdGlvbj4ge1xuICBwdWJsaWMgbWlkZGxld2FyZVN0YWNrID0gY29uc3RydWN0U3RhY2s8Q2xpZW50SW5wdXQsIENsaWVudE91dHB1dD4oKTtcbiAgcmVhZG9ubHkgY29uZmlnOiBSZXNvbHZlZENsaWVudENvbmZpZ3VyYXRpb247XG4gIGNvbnN0cnVjdG9yKGNvbmZpZzogUmVzb2x2ZWRDbGllbnRDb25maWd1cmF0aW9uKSB7XG4gICAgdGhpcy5jb25maWcgPSBjb25maWc7XG4gIH1cbiAgc2VuZDxJbnB1dFR5cGUgZXh0ZW5kcyBDbGllbnRJbnB1dCwgT3V0cHV0VHlwZSBleHRlbmRzIENsaWVudE91dHB1dD4oXG4gICAgY29tbWFuZDogQ29tbWFuZDxDbGllbnRJbnB1dCwgSW5wdXRUeXBlLCBDbGllbnRPdXRwdXQsIE91dHB1dFR5cGUsIFNtaXRoeVJlc29sdmVkQ29uZmlndXJhdGlvbjxIYW5kbGVyT3B0aW9ucz4+LFxuICAgIG9wdGlvbnM/OiBIYW5kbGVyT3B0aW9uc1xuICApOiBQcm9taXNlPE91dHB1dFR5cGU+O1xuICBzZW5kPElucHV0VHlwZSBleHRlbmRzIENsaWVudElucHV0LCBPdXRwdXRUeXBlIGV4dGVuZHMgQ2xpZW50T3V0cHV0PihcbiAgICBjb21tYW5kOiBDb21tYW5kPENsaWVudElucHV0LCBJbnB1dFR5cGUsIENsaWVudE91dHB1dCwgT3V0cHV0VHlwZSwgU21pdGh5UmVzb2x2ZWRDb25maWd1cmF0aW9uPEhhbmRsZXJPcHRpb25zPj4sXG4gICAgY2I6IChlcnI6IGFueSwgZGF0YT86IE91dHB1dFR5cGUpID0+IHZvaWRcbiAgKTogdm9pZDtcbiAgc2VuZDxJbnB1dFR5cGUgZXh0ZW5kcyBDbGllbnRJbnB1dCwgT3V0cHV0VHlwZSBleHRlbmRzIENsaWVudE91dHB1dD4oXG4gICAgY29tbWFuZDogQ29tbWFuZDxDbGllbnRJbnB1dCwgSW5wdXRUeXBlLCBDbGllbnRPdXRwdXQsIE91dHB1dFR5cGUsIFNtaXRoeVJlc29sdmVkQ29uZmlndXJhdGlvbjxIYW5kbGVyT3B0aW9ucz4+LFxuICAgIG9wdGlvbnM6IEhhbmRsZXJPcHRpb25zLFxuICAgIGNiOiAoZXJyOiBhbnksIGRhdGE/OiBPdXRwdXRUeXBlKSA9PiB2b2lkXG4gICk6IHZvaWQ7XG4gIHNlbmQ8SW5wdXRUeXBlIGV4dGVuZHMgQ2xpZW50SW5wdXQsIE91dHB1dFR5cGUgZXh0ZW5kcyBDbGllbnRPdXRwdXQ+KFxuICAgIGNvbW1hbmQ6IENvbW1hbmQ8Q2xpZW50SW5wdXQsIElucHV0VHlwZSwgQ2xpZW50T3V0cHV0LCBPdXRwdXRUeXBlLCBTbWl0aHlSZXNvbHZlZENvbmZpZ3VyYXRpb248SGFuZGxlck9wdGlvbnM+PixcbiAgICBvcHRpb25zT3JDYj86IEhhbmRsZXJPcHRpb25zIHwgKChlcnI6IGFueSwgZGF0YT86IE91dHB1dFR5cGUpID0+IHZvaWQpLFxuICAgIGNiPzogKGVycjogYW55LCBkYXRhPzogT3V0cHV0VHlwZSkgPT4gdm9pZFxuICApOiBQcm9taXNlPE91dHB1dFR5cGU+IHwgdm9pZCB7XG4gICAgY29uc3Qgb3B0aW9ucyA9IHR5cGVvZiBvcHRpb25zT3JDYiAhPT0gXCJmdW5jdGlvblwiID8gb3B0aW9uc09yQ2IgOiB1bmRlZmluZWQ7XG4gICAgY29uc3QgY2FsbGJhY2sgPSB0eXBlb2Ygb3B0aW9uc09yQ2IgPT09IFwiZnVuY3Rpb25cIiA/IChvcHRpb25zT3JDYiBhcyAoZXJyOiBhbnksIGRhdGE/OiBPdXRwdXRUeXBlKSA9PiB2b2lkKSA6IGNiO1xuICAgIGNvbnN0IGhhbmRsZXIgPSBjb21tYW5kLnJlc29sdmVNaWRkbGV3YXJlKHRoaXMubWlkZGxld2FyZVN0YWNrIGFzIGFueSwgdGhpcy5jb25maWcsIG9wdGlvbnMpO1xuICAgIGlmIChjYWxsYmFjaykge1xuICAgICAgaGFuZGxlcihjb21tYW5kKVxuICAgICAgICAudGhlbihcbiAgICAgICAgICAocmVzdWx0KSA9PiBjYWxsYmFjayhudWxsLCByZXN1bHQub3V0cHV0KSxcbiAgICAgICAgICAoZXJyOiBhbnkpID0+IGNhbGxiYWNrKGVycilcbiAgICAgICAgKVxuICAgICAgICAuY2F0Y2goXG4gICAgICAgICAgLy8gcHJldmVudCBhbnkgZXJyb3JzIHRocm93biBpbiB0aGUgY2FsbGJhY2sgZnJvbSB0cmlnZ2VyaW5nIGFuXG4gICAgICAgICAgLy8gdW5oYW5kbGVkIHByb21pc2UgcmVqZWN0aW9uXG4gICAgICAgICAgKCkgPT4ge31cbiAgICAgICAgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGhhbmRsZXIoY29tbWFuZCkudGhlbigocmVzdWx0KSA9PiByZXN1bHQub3V0cHV0KTtcbiAgICB9XG4gIH1cblxuICBkZXN0cm95KCkge1xuICAgIGlmICh0aGlzLmNvbmZpZy5yZXF1ZXN0SGFuZGxlci5kZXN0cm95KSB0aGlzLmNvbmZpZy5yZXF1ZXN0SGFuZGxlci5kZXN0cm95KCk7XG4gIH1cbn1cbiJdfQ== + +/***/ }), + +/***/ 6041: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Command = void 0; +const middleware_stack_1 = __nccwpck_require__(82928); +class Command { + constructor() { + this.middlewareStack = middleware_stack_1.constructStack(); + } +} +exports.Command = Command; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tYW5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGdFQUEyRDtBQUczRCxNQUFzQixPQUFPO0lBQTdCO1FBUVcsb0JBQWUsR0FBb0MsaUNBQWMsRUFBaUIsQ0FBQztJQU05RixDQUFDO0NBQUE7QUFkRCwwQkFjQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNvbnN0cnVjdFN0YWNrIH0gZnJvbSBcIkBhd3Mtc2RrL21pZGRsZXdhcmUtc3RhY2tcIjtcbmltcG9ydCB7IENvbW1hbmQgYXMgSUNvbW1hbmQsIEhhbmRsZXIsIE1ldGFkYXRhQmVhcmVyLCBNaWRkbGV3YXJlU3RhY2sgYXMgSU1pZGRsZXdhcmVTdGFjayB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgQ29tbWFuZDxcbiAgSW5wdXQgZXh0ZW5kcyBDbGllbnRJbnB1dCxcbiAgT3V0cHV0IGV4dGVuZHMgQ2xpZW50T3V0cHV0LFxuICBSZXNvbHZlZENsaWVudENvbmZpZ3VyYXRpb24sXG4gIENsaWVudElucHV0IGV4dGVuZHMgb2JqZWN0ID0gYW55LFxuICBDbGllbnRPdXRwdXQgZXh0ZW5kcyBNZXRhZGF0YUJlYXJlciA9IGFueVxuPiBpbXBsZW1lbnRzIElDb21tYW5kPENsaWVudElucHV0LCBJbnB1dCwgQ2xpZW50T3V0cHV0LCBPdXRwdXQsIFJlc29sdmVkQ2xpZW50Q29uZmlndXJhdGlvbj4ge1xuICBhYnN0cmFjdCBpbnB1dDogSW5wdXQ7XG4gIHJlYWRvbmx5IG1pZGRsZXdhcmVTdGFjazogSU1pZGRsZXdhcmVTdGFjazxJbnB1dCwgT3V0cHV0PiA9IGNvbnN0cnVjdFN0YWNrPElucHV0LCBPdXRwdXQ+KCk7XG4gIGFic3RyYWN0IHJlc29sdmVNaWRkbGV3YXJlKFxuICAgIHN0YWNrOiBJTWlkZGxld2FyZVN0YWNrPENsaWVudElucHV0LCBDbGllbnRPdXRwdXQ+LFxuICAgIGNvbmZpZ3VyYXRpb246IFJlc29sdmVkQ2xpZW50Q29uZmlndXJhdGlvbixcbiAgICBvcHRpb25zOiBhbnlcbiAgKTogSGFuZGxlcjxJbnB1dCwgT3V0cHV0Pjtcbn1cbiJdfQ== + +/***/ }), + +/***/ 86171: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SENSITIVE_STRING = void 0; +exports.SENSITIVE_STRING = "***SensitiveInformation***"; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLGdCQUFnQixHQUFHLDRCQUE0QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IFNFTlNJVElWRV9TVFJJTkcgPSBcIioqKlNlbnNpdGl2ZUluZm9ybWF0aW9uKioqXCI7XG4iXX0= + +/***/ }), + +/***/ 31370: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Builds a proper UTC HttpDate timestamp from a Date object + * since not all environments will have this as the expected + * format. + * + * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString + * > Prior to ECMAScript 2018, the format of the return value + * > varied according to the platform. The most common return + * > value was an RFC-1123 formatted date stamp, which is a + * > slightly updated version of RFC-822 date stamps. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.dateToUtcString = void 0; +// Build indexes outside so we allocate them once. +const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +// prettier-ignore +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(); + // Build 0 prefixed strings for contents that need to be + // two digits and where we get an integer back. + 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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kYXRlLXV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7OztHQVVHOzs7QUFFSCxrREFBa0Q7QUFDbEQsTUFBTSxJQUFJLEdBQWtCLENBQUMsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDOUUsa0JBQWtCO0FBQ2xCLE1BQU0sTUFBTSxHQUFrQixDQUFDLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFFbkgsU0FBZ0IsZUFBZSxDQUFDLElBQVU7SUFDeEMsTUFBTSxJQUFJLEdBQUcsSUFBSSxDQUFDLGNBQWMsRUFBRSxDQUFDO0lBQ25DLE1BQU0sS0FBSyxHQUFHLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQztJQUNqQyxNQUFNLFNBQVMsR0FBRyxJQUFJLENBQUMsU0FBUyxFQUFFLENBQUM7SUFDbkMsTUFBTSxhQUFhLEdBQUcsSUFBSSxDQUFDLFVBQVUsRUFBRSxDQUFDO0lBQ3hDLE1BQU0sUUFBUSxHQUFHLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQztJQUNwQyxNQUFNLFVBQVUsR0FBRyxJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7SUFDeEMsTUFBTSxVQUFVLEdBQUcsSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDO0lBRXhDLHdEQUF3RDtJQUN4RCwrQ0FBK0M7SUFDL0MsTUFBTSxnQkFBZ0IsR0FBRyxhQUFhLEdBQUcsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLGFBQWEsRUFBRSxDQUFDLENBQUMsQ0FBQyxHQUFHLGFBQWEsRUFBRSxDQUFDO0lBQ3ZGLE1BQU0sV0FBVyxHQUFHLFFBQVEsR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksUUFBUSxFQUFFLENBQUMsQ0FBQyxDQUFDLEdBQUcsUUFBUSxFQUFFLENBQUM7SUFDbkUsTUFBTSxhQUFhLEdBQUcsVUFBVSxHQUFHLEVBQUUsQ0FBQyxDQUFDLENBQUMsSUFBSSxVQUFVLEVBQUUsQ0FBQyxDQUFDLENBQUMsR0FBRyxVQUFVLEVBQUUsQ0FBQztJQUMzRSxNQUFNLGFBQWEsR0FBRyxVQUFVLEdBQUcsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLFVBQVUsRUFBRSxDQUFDLENBQUMsQ0FBQyxHQUFHLFVBQVUsRUFBRSxDQUFDO0lBRTNFLE9BQU8sR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLEtBQUssZ0JBQWdCLElBQUksTUFBTSxDQUFDLEtBQUssQ0FBQyxJQUFJLElBQUksSUFBSSxXQUFXLElBQUksYUFBYSxJQUFJLGFBQWEsTUFBTSxDQUFDO0FBQ2pJLENBQUM7QUFqQkQsMENBaUJDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBCdWlsZHMgYSBwcm9wZXIgVVRDIEh0dHBEYXRlIHRpbWVzdGFtcCBmcm9tIGEgRGF0ZSBvYmplY3RcbiAqIHNpbmNlIG5vdCBhbGwgZW52aXJvbm1lbnRzIHdpbGwgaGF2ZSB0aGlzIGFzIHRoZSBleHBlY3RlZFxuICogZm9ybWF0LlxuICpcbiAqIFNlZTogaHR0cHM6Ly9kZXZlbG9wZXIubW96aWxsYS5vcmcvZW4tVVMvZG9jcy9XZWIvSmF2YVNjcmlwdC9SZWZlcmVuY2UvR2xvYmFsX09iamVjdHMvRGF0ZS90b1VUQ1N0cmluZ1xuICogPiBQcmlvciB0byBFQ01BU2NyaXB0IDIwMTgsIHRoZSBmb3JtYXQgb2YgdGhlIHJldHVybiB2YWx1ZVxuICogPiB2YXJpZWQgYWNjb3JkaW5nIHRvIHRoZSBwbGF0Zm9ybS4gVGhlIG1vc3QgY29tbW9uIHJldHVyblxuICogPiB2YWx1ZSB3YXMgYW4gUkZDLTExMjMgZm9ybWF0dGVkIGRhdGUgc3RhbXAsIHdoaWNoIGlzIGFcbiAqID4gc2xpZ2h0bHkgdXBkYXRlZCB2ZXJzaW9uIG9mIFJGQy04MjIgZGF0ZSBzdGFtcHMuXG4gKi9cblxuLy8gQnVpbGQgaW5kZXhlcyBvdXRzaWRlIHNvIHdlIGFsbG9jYXRlIHRoZW0gb25jZS5cbmNvbnN0IGRheXM6IEFycmF5PFN0cmluZz4gPSBbXCJTdW5cIiwgXCJNb25cIiwgXCJUdWVcIiwgXCJXZWRcIiwgXCJUaHVcIiwgXCJGcmlcIiwgXCJTYXRcIl07XG4vLyBwcmV0dGllci1pZ25vcmVcbmNvbnN0IG1vbnRoczogQXJyYXk8U3RyaW5nPiA9IFtcIkphblwiLCBcIkZlYlwiLCBcIk1hclwiLCBcIkFwclwiLCBcIk1heVwiLCBcIkp1blwiLCBcIkp1bFwiLCBcIkF1Z1wiLCBcIlNlcFwiLCBcIk9jdFwiLCBcIk5vdlwiLCBcIkRlY1wiXTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRhdGVUb1V0Y1N0cmluZyhkYXRlOiBEYXRlKTogc3RyaW5nIHtcbiAgY29uc3QgeWVhciA9IGRhdGUuZ2V0VVRDRnVsbFllYXIoKTtcbiAgY29uc3QgbW9udGggPSBkYXRlLmdldFVUQ01vbnRoKCk7XG4gIGNvbnN0IGRheU9mV2VlayA9IGRhdGUuZ2V0VVRDRGF5KCk7XG4gIGNvbnN0IGRheU9mTW9udGhJbnQgPSBkYXRlLmdldFVUQ0RhdGUoKTtcbiAgY29uc3QgaG91cnNJbnQgPSBkYXRlLmdldFVUQ0hvdXJzKCk7XG4gIGNvbnN0IG1pbnV0ZXNJbnQgPSBkYXRlLmdldFVUQ01pbnV0ZXMoKTtcbiAgY29uc3Qgc2Vjb25kc0ludCA9IGRhdGUuZ2V0VVRDU2Vjb25kcygpO1xuXG4gIC8vIEJ1aWxkIDAgcHJlZml4ZWQgc3RyaW5ncyBmb3IgY29udGVudHMgdGhhdCBuZWVkIHRvIGJlXG4gIC8vIHR3byBkaWdpdHMgYW5kIHdoZXJlIHdlIGdldCBhbiBpbnRlZ2VyIGJhY2suXG4gIGNvbnN0IGRheU9mTW9udGhTdHJpbmcgPSBkYXlPZk1vbnRoSW50IDwgMTAgPyBgMCR7ZGF5T2ZNb250aEludH1gIDogYCR7ZGF5T2ZNb250aEludH1gO1xuICBjb25zdCBob3Vyc1N0cmluZyA9IGhvdXJzSW50IDwgMTAgPyBgMCR7aG91cnNJbnR9YCA6IGAke2hvdXJzSW50fWA7XG4gIGNvbnN0IG1pbnV0ZXNTdHJpbmcgPSBtaW51dGVzSW50IDwgMTAgPyBgMCR7bWludXRlc0ludH1gIDogYCR7bWludXRlc0ludH1gO1xuICBjb25zdCBzZWNvbmRzU3RyaW5nID0gc2Vjb25kc0ludCA8IDEwID8gYDAke3NlY29uZHNJbnR9YCA6IGAke3NlY29uZHNJbnR9YDtcblxuICByZXR1cm4gYCR7ZGF5c1tkYXlPZldlZWtdfSwgJHtkYXlPZk1vbnRoU3RyaW5nfSAke21vbnRoc1ttb250aF19ICR7eWVhcn0gJHtob3Vyc1N0cmluZ306JHttaW51dGVzU3RyaW5nfToke3NlY29uZHNTdHJpbmd9IEdNVGA7XG59XG4iXX0= + +/***/ }), + +/***/ 68269: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9jdW1lbnQtdHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kb2N1bWVudC10eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFNtaXRoeSBkb2N1bWVudCB0eXBlIHZhbHVlcy5cbiAqL1xuLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1uYW1lc3BhY2VcbmV4cG9ydCBuYW1lc3BhY2UgRG9jdW1lbnRUeXBlIHtcbiAgZXhwb3J0IHR5cGUgVmFsdWUgPSBTY2FsYXIgfCBTdHJ1Y3R1cmUgfCBMaXN0O1xuICBleHBvcnQgdHlwZSBTY2FsYXIgPSBzdHJpbmcgfCBudW1iZXIgfCBib29sZWFuIHwgbnVsbDtcbiAgZXhwb3J0IHR5cGUgU3RydWN0dXJlID0geyBbbWVtYmVyOiBzdHJpbmddOiBWYWx1ZSB9O1xuICBleHBvcnQgaW50ZXJmYWNlIExpc3QgZXh0ZW5kcyBBcnJheTxWYWx1ZT4ge31cbn1cbiJdfQ== + +/***/ }), + +/***/ 56582: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhjZXB0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2V4Y2VwdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUmV0cnlhYmxlVHJhaXQgfSBmcm9tIFwiLi9yZXRyeWFibGUtdHJhaXRcIjtcblxuLyoqXG4gKiBUeXBlIHRoYXQgaXMgaW1wbGVtZW50ZWQgYnkgYWxsIFNtaXRoeSBzaGFwZXMgbWFya2VkIHdpdGggdGhlXG4gKiBlcnJvciB0cmFpdC5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSBTbWl0aHlFeGNlcHRpb24ge1xuICAvKipcbiAgICogVGhlIHNoYXBlIElEIG5hbWUgb2YgdGhlIGV4Y2VwdGlvbi5cbiAgICovXG4gIHJlYWRvbmx5IG5hbWU6IHN0cmluZztcblxuICAvKipcbiAgICogV2hldGhlciB0aGUgY2xpZW50IG9yIHNlcnZlciBhcmUgYXQgZmF1bHQuXG4gICAqL1xuICByZWFkb25seSAkZmF1bHQ6IFwiY2xpZW50XCIgfCBcInNlcnZlclwiO1xuXG4gIC8qKlxuICAgKiBUaGUgc2VydmljZSB0aGF0IGVuY291bnRlcmVkIHRoZSBleGNlcHRpb24uXG4gICAqL1xuICByZWFkb25seSAkc2VydmljZT86IHN0cmluZztcblxuICAvKipcbiAgICogSW5kaWNhdGVzIHRoYXQgYW4gZXJyb3IgTUFZIGJlIHJldHJpZWQgYnkgdGhlIGNsaWVudC5cbiAgICovXG4gIHJlYWRvbmx5ICRyZXRyeWFibGU/OiBSZXRyeWFibGVUcmFpdDtcbn1cbiJdfQ== + +/***/ }), + +/***/ 57121: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.extendedEncodeURIComponent = void 0; +/** + * Function that wraps encodeURIComponent to encode additional characters + * to fully adhere to RFC 3986. + */ +function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16); + }); +} +exports.extendedEncodeURIComponent = extendedEncodeURIComponent; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5kZWQtZW5jb2RlLXVyaS1jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXh0ZW5kZWQtZW5jb2RlLXVyaS1jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7OztHQUdHO0FBQ0gsU0FBZ0IsMEJBQTBCLENBQUMsR0FBVztJQUNwRCxPQUFPLGtCQUFrQixDQUFDLEdBQUcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxVQUFVLEVBQUUsVUFBVSxDQUFDO1FBQzVELE9BQU8sR0FBRyxHQUFHLENBQUMsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxDQUFDO0lBQzVDLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUpELGdFQUlDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBGdW5jdGlvbiB0aGF0IHdyYXBzIGVuY29kZVVSSUNvbXBvbmVudCB0byBlbmNvZGUgYWRkaXRpb25hbCBjaGFyYWN0ZXJzXG4gKiB0byBmdWxseSBhZGhlcmUgdG8gUkZDIDM5ODYuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBleHRlbmRlZEVuY29kZVVSSUNvbXBvbmVudChzdHI6IHN0cmluZyk6IHN0cmluZyB7XG4gIHJldHVybiBlbmNvZGVVUklDb21wb25lbnQoc3RyKS5yZXBsYWNlKC9bIScoKSpdL2csIGZ1bmN0aW9uIChjKSB7XG4gICAgcmV0dXJuIFwiJVwiICsgYy5jaGFyQ29kZUF0KDApLnRvU3RyaW5nKDE2KTtcbiAgfSk7XG59XG4iXX0= + +/***/ }), + +/***/ 34650: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getArrayIfSingleItem = void 0; +/** + * The XML parser will set one K:V for a member that could + * return multiple entries but only has one. + */ +const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; +exports.getArrayIfSingleItem = getArrayIfSingleItem; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWFycmF5LWlmLXNpbmdsZS1pdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2dldC1hcnJheS1pZi1zaW5nbGUtaXRlbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7O0dBR0c7QUFDSSxNQUFNLG9CQUFvQixHQUFHLENBQUksVUFBYSxFQUFXLEVBQUUsQ0FDaEUsS0FBSyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0FBRDNDLFFBQUEsb0JBQW9CLHdCQUN1QiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogVGhlIFhNTCBwYXJzZXIgd2lsbCBzZXQgb25lIEs6ViBmb3IgYSBtZW1iZXIgdGhhdCBjb3VsZFxuICogcmV0dXJuIG11bHRpcGxlIGVudHJpZXMgYnV0IG9ubHkgaGFzIG9uZS5cbiAqL1xuZXhwb3J0IGNvbnN0IGdldEFycmF5SWZTaW5nbGVJdGVtID0gPFQ+KG1heUJlQXJyYXk6IFQpOiBUIHwgVFtdID0+XG4gIEFycmF5LmlzQXJyYXkobWF5QmVBcnJheSkgPyBtYXlCZUFycmF5IDogW21heUJlQXJyYXldO1xuIl19 + +/***/ }), + +/***/ 66526: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getValueFromTextNode = void 0; +/** + * Recursively parses object and populates value is node from + * "#text" key if it's available + */ +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXZhbHVlLWZyb20tdGV4dC1ub2RlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2dldC12YWx1ZS1mcm9tLXRleHQtbm9kZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7O0dBR0c7QUFDSSxNQUFNLG9CQUFvQixHQUFHLENBQUMsR0FBUSxFQUFFLEVBQUU7SUFDL0MsTUFBTSxZQUFZLEdBQUcsT0FBTyxDQUFDO0lBQzdCLEtBQUssTUFBTSxHQUFHLElBQUksR0FBRyxFQUFFO1FBQ3JCLElBQUksR0FBRyxDQUFDLGNBQWMsQ0FBQyxHQUFHLENBQUMsSUFBSSxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsWUFBWSxDQUFDLEtBQUssU0FBUyxFQUFFO1lBQ25FLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsWUFBWSxDQUFDLENBQUM7U0FDbkM7YUFBTSxJQUFJLE9BQU8sR0FBRyxDQUFDLEdBQUcsQ0FBQyxLQUFLLFFBQVEsSUFBSSxHQUFHLENBQUMsR0FBRyxDQUFDLEtBQUssSUFBSSxFQUFFO1lBQzVELEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyw0QkFBb0IsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQztTQUMzQztLQUNGO0lBQ0QsT0FBTyxHQUFHLENBQUM7QUFDYixDQUFDLENBQUM7QUFWVyxRQUFBLG9CQUFvQix3QkFVL0IiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFJlY3Vyc2l2ZWx5IHBhcnNlcyBvYmplY3QgYW5kIHBvcHVsYXRlcyB2YWx1ZSBpcyBub2RlIGZyb21cbiAqIFwiI3RleHRcIiBrZXkgaWYgaXQncyBhdmFpbGFibGVcbiAqL1xuZXhwb3J0IGNvbnN0IGdldFZhbHVlRnJvbVRleHROb2RlID0gKG9iajogYW55KSA9PiB7XG4gIGNvbnN0IHRleHROb2RlTmFtZSA9IFwiI3RleHRcIjtcbiAgZm9yIChjb25zdCBrZXkgaW4gb2JqKSB7XG4gICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShrZXkpICYmIG9ialtrZXldW3RleHROb2RlTmFtZV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgb2JqW2tleV0gPSBvYmpba2V5XVt0ZXh0Tm9kZU5hbWVdO1xuICAgIH0gZWxzZSBpZiAodHlwZW9mIG9ialtrZXldID09PSBcIm9iamVjdFwiICYmIG9ialtrZXldICE9PSBudWxsKSB7XG4gICAgICBvYmpba2V5XSA9IGdldFZhbHVlRnJvbVRleHROb2RlKG9ialtrZXldKTtcbiAgICB9XG4gIH1cbiAgcmV0dXJuIG9iajtcbn07XG4iXX0= + +/***/ }), + +/***/ 84060: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(26717), exports); +tslib_1.__exportStar(__nccwpck_require__(6041), exports); +tslib_1.__exportStar(__nccwpck_require__(68269), exports); +tslib_1.__exportStar(__nccwpck_require__(56582), exports); +tslib_1.__exportStar(__nccwpck_require__(57121), exports); +tslib_1.__exportStar(__nccwpck_require__(34650), exports); +tslib_1.__exportStar(__nccwpck_require__(66526), exports); +tslib_1.__exportStar(__nccwpck_require__(1207), exports); +tslib_1.__exportStar(__nccwpck_require__(31370), exports); +tslib_1.__exportStar(__nccwpck_require__(86399), exports); +tslib_1.__exportStar(__nccwpck_require__(86171), exports); +tslib_1.__exportStar(__nccwpck_require__(2908), exports); +tslib_1.__exportStar(__nccwpck_require__(41200), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbURBQXlCO0FBQ3pCLG9EQUEwQjtBQUMxQiwwREFBZ0M7QUFDaEMsc0RBQTRCO0FBQzVCLDBFQUFnRDtBQUNoRCxxRUFBMkM7QUFDM0MscUVBQTJDO0FBQzNDLHNEQUE0QjtBQUM1Qix1REFBNkI7QUFDN0Isd0RBQThCO0FBQzlCLHNEQUE0QjtBQUM1Qiw0REFBa0M7QUFDbEMsc0RBQTRCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vY2xpZW50XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9jb21tYW5kXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9kb2N1bWVudC10eXBlXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9leGNlcHRpb25cIjtcbmV4cG9ydCAqIGZyb20gXCIuL2V4dGVuZGVkLWVuY29kZS11cmktY29tcG9uZW50XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9nZXQtYXJyYXktaWYtc2luZ2xlLWl0ZW1cIjtcbmV4cG9ydCAqIGZyb20gXCIuL2dldC12YWx1ZS1mcm9tLXRleHQtbm9kZVwiO1xuZXhwb3J0ICogZnJvbSBcIi4vbGF6eS1qc29uXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9kYXRlLXV0aWxzXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9zcGxpdC1ldmVyeVwiO1xuZXhwb3J0ICogZnJvbSBcIi4vY29uc3RhbnRzXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9yZXRyeWFibGUtdHJhaXRcIjtcbmV4cG9ydCAqIGZyb20gXCIuL3Nkay1lcnJvclwiO1xuIl19 + +/***/ }), + +/***/ 1207: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/** + * Lazy String holder for JSON typed contents. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LazyJsonString = exports.StringWrapper = void 0; +/** + * Because of https://github.com/microsoft/tslib/issues/95, + * TS 'extends' shim doesn't support extending native types like String. + * So here we create StringWrapper that duplicate everything from String + * class including its prototype chain. So we can extend from here. + */ +// @ts-ignore StringWrapper implementation is not a simple constructor +const StringWrapper = function () { + //@ts-ignore 'this' cannot be assigned to any, but Object.getPrototypeOf accepts any + const Class = Object.getPrototypeOf(this).constructor; + const Constructor = Function.bind.apply(String, [null, ...arguments]); + //@ts-ignore Call wrapped String constructor directly, don't bother typing it. + 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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS1qc29uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2xhenktanNvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7O0dBRUc7OztBQU1IOzs7OztHQUtHO0FBQ0gsc0VBQXNFO0FBQy9ELE1BQU0sYUFBYSxHQUFrQjtJQUMxQyxvRkFBb0Y7SUFDcEYsTUFBTSxLQUFLLEdBQUcsTUFBTSxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxXQUFXLENBQUM7SUFDdEQsTUFBTSxXQUFXLEdBQUcsUUFBUSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsSUFBVyxFQUFFLEdBQUcsU0FBUyxDQUFDLENBQUMsQ0FBQztJQUM3RSw4RUFBOEU7SUFDOUUsTUFBTSxRQUFRLEdBQUcsSUFBSSxXQUFXLEVBQUUsQ0FBQztJQUNuQyxNQUFNLENBQUMsY0FBYyxDQUFDLFFBQVEsRUFBRSxLQUFLLENBQUMsU0FBUyxDQUFDLENBQUM7SUFDakQsT0FBTyxRQUFrQixDQUFDO0FBQzVCLENBQUMsQ0FBQztBQVJXLFFBQUEsYUFBYSxpQkFReEI7QUFDRixxQkFBYSxDQUFDLFNBQVMsR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxTQUFTLEVBQUU7SUFDeEQsV0FBVyxFQUFFO1FBQ1gsS0FBSyxFQUFFLHFCQUFhO1FBQ3BCLFVBQVUsRUFBRSxLQUFLO1FBQ2pCLFFBQVEsRUFBRSxJQUFJO1FBQ2QsWUFBWSxFQUFFLElBQUk7S0FDbkI7Q0FDRixDQUFDLENBQUM7QUFDSCxNQUFNLENBQUMsY0FBYyxDQUFDLHFCQUFhLEVBQUUsTUFBTSxDQUFDLENBQUM7QUFFN0MsTUFBYSxjQUFlLFNBQVEscUJBQWE7SUFDL0MsZUFBZTtRQUNiLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQztJQUN0QyxDQUFDO0lBRUQsTUFBTTtRQUNKLE9BQU8sS0FBSyxDQUFDLFFBQVEsRUFBRSxDQUFDO0lBQzFCLENBQUM7SUFFRCxNQUFNLENBQUMsVUFBVSxDQUFDLE1BQVc7UUFDM0IsSUFBSSxNQUFNLFlBQVksY0FBYyxFQUFFO1lBQ3BDLE9BQU8sTUFBTSxDQUFDO1NBQ2Y7YUFBTSxJQUFJLE1BQU0sWUFBWSxNQUFNLElBQUksT0FBTyxNQUFNLEtBQUssUUFBUSxFQUFFO1lBQ2pFLE9BQU8sSUFBSSxjQUFjLENBQUMsTUFBTSxDQUFDLENBQUM7U0FDbkM7UUFDRCxPQUFPLElBQUksY0FBYyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztJQUNwRCxDQUFDO0NBQ0Y7QUFqQkQsd0NBaUJDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBMYXp5IFN0cmluZyBob2xkZXIgZm9yIEpTT04gdHlwZWQgY29udGVudHMuXG4gKi9cblxuaW50ZXJmYWNlIFN0cmluZ1dyYXBwZXIge1xuICBuZXcgKGFyZzogYW55KTogU3RyaW5nO1xufVxuXG4vKipcbiAqIEJlY2F1c2Ugb2YgaHR0cHM6Ly9naXRodWIuY29tL21pY3Jvc29mdC90c2xpYi9pc3N1ZXMvOTUsXG4gKiBUUyAnZXh0ZW5kcycgc2hpbSBkb2Vzbid0IHN1cHBvcnQgZXh0ZW5kaW5nIG5hdGl2ZSB0eXBlcyBsaWtlIFN0cmluZy5cbiAqIFNvIGhlcmUgd2UgY3JlYXRlIFN0cmluZ1dyYXBwZXIgdGhhdCBkdXBsaWNhdGUgZXZlcnl0aGluZyBmcm9tIFN0cmluZ1xuICogY2xhc3MgaW5jbHVkaW5nIGl0cyBwcm90b3R5cGUgY2hhaW4uIFNvIHdlIGNhbiBleHRlbmQgZnJvbSBoZXJlLlxuICovXG4vLyBAdHMtaWdub3JlIFN0cmluZ1dyYXBwZXIgaW1wbGVtZW50YXRpb24gaXMgbm90IGEgc2ltcGxlIGNvbnN0cnVjdG9yXG5leHBvcnQgY29uc3QgU3RyaW5nV3JhcHBlcjogU3RyaW5nV3JhcHBlciA9IGZ1bmN0aW9uICgpIHtcbiAgLy9AdHMtaWdub3JlICd0aGlzJyBjYW5ub3QgYmUgYXNzaWduZWQgdG8gYW55LCBidXQgT2JqZWN0LmdldFByb3RvdHlwZU9mIGFjY2VwdHMgYW55XG4gIGNvbnN0IENsYXNzID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKHRoaXMpLmNvbnN0cnVjdG9yO1xuICBjb25zdCBDb25zdHJ1Y3RvciA9IEZ1bmN0aW9uLmJpbmQuYXBwbHkoU3RyaW5nLCBbbnVsbCBhcyBhbnksIC4uLmFyZ3VtZW50c10pO1xuICAvL0B0cy1pZ25vcmUgQ2FsbCB3cmFwcGVkIFN0cmluZyBjb25zdHJ1Y3RvciBkaXJlY3RseSwgZG9uJ3QgYm90aGVyIHR5cGluZyBpdC5cbiAgY29uc3QgaW5zdGFuY2UgPSBuZXcgQ29uc3RydWN0b3IoKTtcbiAgT2JqZWN0LnNldFByb3RvdHlwZU9mKGluc3RhbmNlLCBDbGFzcy5wcm90b3R5cGUpO1xuICByZXR1cm4gaW5zdGFuY2UgYXMgU3RyaW5nO1xufTtcblN0cmluZ1dyYXBwZXIucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShTdHJpbmcucHJvdG90eXBlLCB7XG4gIGNvbnN0cnVjdG9yOiB7XG4gICAgdmFsdWU6IFN0cmluZ1dyYXBwZXIsXG4gICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgd3JpdGFibGU6IHRydWUsXG4gICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICB9LFxufSk7XG5PYmplY3Quc2V0UHJvdG90eXBlT2YoU3RyaW5nV3JhcHBlciwgU3RyaW5nKTtcblxuZXhwb3J0IGNsYXNzIExhenlKc29uU3RyaW5nIGV4dGVuZHMgU3RyaW5nV3JhcHBlciB7XG4gIGRlc2VyaWFsaXplSlNPTigpOiBhbnkge1xuICAgIHJldHVybiBKU09OLnBhcnNlKHN1cGVyLnRvU3RyaW5nKCkpO1xuICB9XG5cbiAgdG9KU09OKCk6IHN0cmluZyB7XG4gICAgcmV0dXJuIHN1cGVyLnRvU3RyaW5nKCk7XG4gIH1cblxuICBzdGF0aWMgZnJvbU9iamVjdChvYmplY3Q6IGFueSk6IExhenlKc29uU3RyaW5nIHtcbiAgICBpZiAob2JqZWN0IGluc3RhbmNlb2YgTGF6eUpzb25TdHJpbmcpIHtcbiAgICAgIHJldHVybiBvYmplY3Q7XG4gICAgfSBlbHNlIGlmIChvYmplY3QgaW5zdGFuY2VvZiBTdHJpbmcgfHwgdHlwZW9mIG9iamVjdCA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgcmV0dXJuIG5ldyBMYXp5SnNvblN0cmluZyhvYmplY3QpO1xuICAgIH1cbiAgICByZXR1cm4gbmV3IExhenlKc29uU3RyaW5nKEpTT04uc3RyaW5naWZ5KG9iamVjdCkpO1xuICB9XG59XG4iXX0= + +/***/ }), + +/***/ 2908: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV0cnlhYmxlLXRyYWl0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JldHJ5YWJsZS10cmFpdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBBIHN0cnVjdHVyZSBzaGFwZSB3aXRoIHRoZSBlcnJvciB0cmFpdC5cbiAqIGh0dHBzOi8vYXdzbGFicy5naXRodWIuaW8vc21pdGh5L3NwZWMvY29yZS5odG1sI3JldHJ5YWJsZS10cmFpdFxuICovXG5leHBvcnQgaW50ZXJmYWNlIFJldHJ5YWJsZVRyYWl0IHtcbiAgLyoqXG4gICAqIEluZGljYXRlcyB0aGF0IHRoZSBlcnJvciBpcyBhIHJldHJ5YWJsZSB0aHJvdHRsaW5nIGVycm9yLlxuICAgKi9cbiAgcmVhZG9ubHkgdGhyb3R0bGluZz86IGJvb2xlYW47XG59XG4iXX0= + +/***/ }), + +/***/ 41200: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2RrLWVycm9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Nkay1lcnJvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTWV0YWRhdGFCZWFyZXIgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuaW1wb3J0IHsgU21pdGh5RXhjZXB0aW9uIH0gZnJvbSBcIi4vZXhjZXB0aW9uXCI7XG5cbmV4cG9ydCB0eXBlIFNka0Vycm9yID0gRXJyb3IgJiBTbWl0aHlFeGNlcHRpb24gJiBNZXRhZGF0YUJlYXJlcjtcbiJdfQ== + +/***/ }), + +/***/ 86399: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.splitEvery = void 0; +/** + * Given an input string, splits based on the delimiter after a given + * number of delimiters has been encountered. + * + * @param value The input string to split. + * @param delimiter The delimiter to split on. + * @param numDelimiters The number of delimiters to have encountered to split. + */ +function splitEvery(value, delimiter, numDelimiters) { + // Fail if we don't have a clear number to split on. + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + // Short circuit extra logic for the simple case. + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i = 0; i < segments.length; i++) { + if (currentSegment === "") { + // Start a new segment. + currentSegment = segments[i]; + } + else { + // Compound the current segment with the delimiter. + currentSegment += delimiter + segments[i]; + } + if ((i + 1) % numDelimiters === 0) { + // We encountered the right number of delimiters, so add the entry. + compoundSegments.push(currentSegment); + // And reset the current segment. + currentSegment = ""; + } + } + // Handle any leftover segment portion. + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; +} +exports.splitEvery = splitEvery; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BsaXQtZXZlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc3BsaXQtZXZlcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7Ozs7Ozs7R0FPRztBQUNILFNBQWdCLFVBQVUsQ0FBQyxLQUFhLEVBQUUsU0FBaUIsRUFBRSxhQUFxQjtJQUNoRixvREFBb0Q7SUFDcEQsSUFBSSxhQUFhLElBQUksQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxhQUFhLENBQUMsRUFBRTtRQUMxRCxNQUFNLElBQUksS0FBSyxDQUFDLGdDQUFnQyxHQUFHLGFBQWEsR0FBRyxtQkFBbUIsQ0FBQyxDQUFDO0tBQ3pGO0lBRUQsTUFBTSxRQUFRLEdBQUcsS0FBSyxDQUFDLEtBQUssQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUN4QyxpREFBaUQ7SUFDakQsSUFBSSxhQUFhLEtBQUssQ0FBQyxFQUFFO1FBQ3ZCLE9BQU8sUUFBUSxDQUFDO0tBQ2pCO0lBRUQsTUFBTSxnQkFBZ0IsR0FBa0IsRUFBRSxDQUFDO0lBQzNDLElBQUksY0FBYyxHQUFHLEVBQUUsQ0FBQztJQUN4QixLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsUUFBUSxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtRQUN4QyxJQUFJLGNBQWMsS0FBSyxFQUFFLEVBQUU7WUFDekIsdUJBQXVCO1lBQ3ZCLGNBQWMsR0FBRyxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQUM7U0FDOUI7YUFBTTtZQUNMLG1EQUFtRDtZQUNuRCxjQUFjLElBQUksU0FBUyxHQUFHLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUMzQztRQUVELElBQUksQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEdBQUcsYUFBYSxLQUFLLENBQUMsRUFBRTtZQUNqQyxtRUFBbUU7WUFDbkUsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLGNBQWMsQ0FBQyxDQUFDO1lBQ3RDLGlDQUFpQztZQUNqQyxjQUFjLEdBQUcsRUFBRSxDQUFDO1NBQ3JCO0tBQ0Y7SUFFRCx1Q0FBdUM7SUFDdkMsSUFBSSxjQUFjLEtBQUssRUFBRSxFQUFFO1FBQ3pCLGdCQUFnQixDQUFDLElBQUksQ0FBQyxjQUFjLENBQUMsQ0FBQztLQUN2QztJQUVELE9BQU8sZ0JBQWdCLENBQUM7QUFDMUIsQ0FBQztBQXJDRCxnQ0FxQ0MiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdpdmVuIGFuIGlucHV0IHN0cmluZywgc3BsaXRzIGJhc2VkIG9uIHRoZSBkZWxpbWl0ZXIgYWZ0ZXIgYSBnaXZlblxuICogbnVtYmVyIG9mIGRlbGltaXRlcnMgaGFzIGJlZW4gZW5jb3VudGVyZWQuXG4gKlxuICogQHBhcmFtIHZhbHVlIFRoZSBpbnB1dCBzdHJpbmcgdG8gc3BsaXQuXG4gKiBAcGFyYW0gZGVsaW1pdGVyIFRoZSBkZWxpbWl0ZXIgdG8gc3BsaXQgb24uXG4gKiBAcGFyYW0gbnVtRGVsaW1pdGVycyBUaGUgbnVtYmVyIG9mIGRlbGltaXRlcnMgdG8gaGF2ZSBlbmNvdW50ZXJlZCB0byBzcGxpdC5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIHNwbGl0RXZlcnkodmFsdWU6IHN0cmluZywgZGVsaW1pdGVyOiBzdHJpbmcsIG51bURlbGltaXRlcnM6IG51bWJlcik6IEFycmF5PHN0cmluZz4ge1xuICAvLyBGYWlsIGlmIHdlIGRvbid0IGhhdmUgYSBjbGVhciBudW1iZXIgdG8gc3BsaXQgb24uXG4gIGlmIChudW1EZWxpbWl0ZXJzIDw9IDAgfHwgIU51bWJlci5pc0ludGVnZXIobnVtRGVsaW1pdGVycykpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXCJJbnZhbGlkIG51bWJlciBvZiBkZWxpbWl0ZXJzIChcIiArIG51bURlbGltaXRlcnMgKyBcIikgZm9yIHNwbGl0RXZlcnkuXCIpO1xuICB9XG5cbiAgY29uc3Qgc2VnbWVudHMgPSB2YWx1ZS5zcGxpdChkZWxpbWl0ZXIpO1xuICAvLyBTaG9ydCBjaXJjdWl0IGV4dHJhIGxvZ2ljIGZvciB0aGUgc2ltcGxlIGNhc2UuXG4gIGlmIChudW1EZWxpbWl0ZXJzID09PSAxKSB7XG4gICAgcmV0dXJuIHNlZ21lbnRzO1xuICB9XG5cbiAgY29uc3QgY29tcG91bmRTZWdtZW50czogQXJyYXk8c3RyaW5nPiA9IFtdO1xuICBsZXQgY3VycmVudFNlZ21lbnQgPSBcIlwiO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IHNlZ21lbnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgaWYgKGN1cnJlbnRTZWdtZW50ID09PSBcIlwiKSB7XG4gICAgICAvLyBTdGFydCBhIG5ldyBzZWdtZW50LlxuICAgICAgY3VycmVudFNlZ21lbnQgPSBzZWdtZW50c1tpXTtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gQ29tcG91bmQgdGhlIGN1cnJlbnQgc2VnbWVudCB3aXRoIHRoZSBkZWxpbWl0ZXIuXG4gICAgICBjdXJyZW50U2VnbWVudCArPSBkZWxpbWl0ZXIgKyBzZWdtZW50c1tpXTtcbiAgICB9XG5cbiAgICBpZiAoKGkgKyAxKSAlIG51bURlbGltaXRlcnMgPT09IDApIHtcbiAgICAgIC8vIFdlIGVuY291bnRlcmVkIHRoZSByaWdodCBudW1iZXIgb2YgZGVsaW1pdGVycywgc28gYWRkIHRoZSBlbnRyeS5cbiAgICAgIGNvbXBvdW5kU2VnbWVudHMucHVzaChjdXJyZW50U2VnbWVudCk7XG4gICAgICAvLyBBbmQgcmVzZXQgdGhlIGN1cnJlbnQgc2VnbWVudC5cbiAgICAgIGN1cnJlbnRTZWdtZW50ID0gXCJcIjtcbiAgICB9XG4gIH1cblxuICAvLyBIYW5kbGUgYW55IGxlZnRvdmVyIHNlZ21lbnQgcG9ydGlvbi5cbiAgaWYgKGN1cnJlbnRTZWdtZW50ICE9PSBcIlwiKSB7XG4gICAgY29tcG91bmRTZWdtZW50cy5wdXNoKGN1cnJlbnRTZWdtZW50KTtcbiAgfVxuXG4gIHJldHVybiBjb21wb3VuZFNlZ21lbnRzO1xufVxuIl19 + +/***/ }), + +/***/ 99427: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseUrl = void 0; +const querystring_parser_1 = __nccwpck_require__(22026); +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsb0VBQStEO0FBR3hELE1BQU0sUUFBUSxHQUFjLENBQUMsR0FBVyxFQUFZLEVBQUU7SUFDM0QsTUFBTSxFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUUsR0FBRyxJQUFJLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUVwRSxJQUFJLEtBQW9DLENBQUM7SUFDekMsSUFBSSxNQUFNLEVBQUU7UUFDVixLQUFLLEdBQUcscUNBQWdCLENBQUMsTUFBTSxDQUFDLENBQUM7S0FDbEM7SUFFRCxPQUFPO1FBQ0wsUUFBUTtRQUNSLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUztRQUN2QyxRQUFRO1FBQ1IsSUFBSSxFQUFFLFFBQVE7UUFDZCxLQUFLO0tBQ04sQ0FBQztBQUNKLENBQUMsQ0FBQztBQWZXLFFBQUEsUUFBUSxZQWVuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHBhcnNlUXVlcnlTdHJpbmcgfSBmcm9tIFwiQGF3cy1zZGsvcXVlcnlzdHJpbmctcGFyc2VyXCI7XG5pbXBvcnQgeyBFbmRwb2ludCwgUXVlcnlQYXJhbWV0ZXJCYWcsIFVybFBhcnNlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgY29uc3QgcGFyc2VVcmw6IFVybFBhcnNlciA9ICh1cmw6IHN0cmluZyk6IEVuZHBvaW50ID0+IHtcbiAgY29uc3QgeyBob3N0bmFtZSwgcGF0aG5hbWUsIHBvcnQsIHByb3RvY29sLCBzZWFyY2ggfSA9IG5ldyBVUkwodXJsKTtcblxuICBsZXQgcXVlcnk6IFF1ZXJ5UGFyYW1ldGVyQmFnIHwgdW5kZWZpbmVkO1xuICBpZiAoc2VhcmNoKSB7XG4gICAgcXVlcnkgPSBwYXJzZVF1ZXJ5U3RyaW5nKHNlYXJjaCk7XG4gIH1cblxuICByZXR1cm4ge1xuICAgIGhvc3RuYW1lLFxuICAgIHBvcnQ6IHBvcnQgPyBwYXJzZUludChwb3J0KSA6IHVuZGVmaW5lZCxcbiAgICBwcm90b2NvbCxcbiAgICBwYXRoOiBwYXRobmFtZSxcbiAgICBxdWVyeSxcbiAgfTtcbn07XG4iXX0= + +/***/ }), + +/***/ 2091: +/***/ ((__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__(38577); +/** + * Converts a base-64 encoded string to a Uint8Array of bytes using Node.JS's + * `buffer` module. + * + * @param input The base-64 encoded string + */ +function fromBase64(input) { + const buffer = util_buffer_from_1.fromString(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); +} +exports.fromBase64 = fromBase64; +/** + * Converts a Uint8Array of binary data to a base-64 encoded string using + * Node.JS's `buffer` module. + * + * @param input The binary data to encode + */ +function toBase64(input) { + return util_buffer_from_1.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64"); +} +exports.toBase64 = toBase64; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsZ0VBQXdFO0FBRXhFOzs7OztHQUtHO0FBQ0gsU0FBZ0IsVUFBVSxDQUFDLEtBQWE7SUFDdEMsTUFBTSxNQUFNLEdBQUcsNkJBQVUsQ0FBQyxLQUFLLEVBQUUsUUFBUSxDQUFDLENBQUM7SUFFM0MsT0FBTyxJQUFJLFVBQVUsQ0FBQyxNQUFNLENBQUMsTUFBTSxFQUFFLE1BQU0sQ0FBQyxVQUFVLEVBQUUsTUFBTSxDQUFDLFVBQVUsQ0FBQyxDQUFDO0FBQzdFLENBQUM7QUFKRCxnQ0FJQztBQUVEOzs7OztHQUtHO0FBQ0gsU0FBZ0IsUUFBUSxDQUFDLEtBQWlCO0lBQ3hDLE9BQU8sa0NBQWUsQ0FBQyxLQUFLLENBQUMsTUFBTSxFQUFFLEtBQUssQ0FBQyxVQUFVLEVBQUUsS0FBSyxDQUFDLFVBQVUsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUM5RixDQUFDO0FBRkQsNEJBRUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBmcm9tQXJyYXlCdWZmZXIsIGZyb21TdHJpbmcgfSBmcm9tIFwiQGF3cy1zZGsvdXRpbC1idWZmZXItZnJvbVwiO1xuXG4vKipcbiAqIENvbnZlcnRzIGEgYmFzZS02NCBlbmNvZGVkIHN0cmluZyB0byBhIFVpbnQ4QXJyYXkgb2YgYnl0ZXMgdXNpbmcgTm9kZS5KUydzXG4gKiBgYnVmZmVyYCBtb2R1bGUuXG4gKlxuICogQHBhcmFtIGlucHV0IFRoZSBiYXNlLTY0IGVuY29kZWQgc3RyaW5nXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBmcm9tQmFzZTY0KGlucHV0OiBzdHJpbmcpOiBVaW50OEFycmF5IHtcbiAgY29uc3QgYnVmZmVyID0gZnJvbVN0cmluZyhpbnB1dCwgXCJiYXNlNjRcIik7XG5cbiAgcmV0dXJuIG5ldyBVaW50OEFycmF5KGJ1ZmZlci5idWZmZXIsIGJ1ZmZlci5ieXRlT2Zmc2V0LCBidWZmZXIuYnl0ZUxlbmd0aCk7XG59XG5cbi8qKlxuICogQ29udmVydHMgYSBVaW50OEFycmF5IG9mIGJpbmFyeSBkYXRhIHRvIGEgYmFzZS02NCBlbmNvZGVkIHN0cmluZyB1c2luZ1xuICogTm9kZS5KUydzIGBidWZmZXJgIG1vZHVsZS5cbiAqXG4gKiBAcGFyYW0gaW5wdXQgVGhlIGJpbmFyeSBkYXRhIHRvIGVuY29kZVxuICovXG5leHBvcnQgZnVuY3Rpb24gdG9CYXNlNjQoaW5wdXQ6IFVpbnQ4QXJyYXkpOiBzdHJpbmcge1xuICByZXR1cm4gZnJvbUFycmF5QnVmZmVyKGlucHV0LmJ1ZmZlciwgaW5wdXQuYnl0ZU9mZnNldCwgaW5wdXQuYnl0ZUxlbmd0aCkudG9TdHJpbmcoXCJiYXNlNjRcIik7XG59XG4iXX0= + +/***/ }), + +/***/ 40286: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.calculateBodyLength = void 0; +const fs_1 = __nccwpck_require__(35747); +function calculateBodyLength(body) { + if (!body) { + return 0; + } + if (typeof body === "string") { + return Buffer.from(body).length; + } + else if (typeof body.byteLength === "number") { + // handles Uint8Array, ArrayBuffer, Buffer, and ArrayBufferView + return body.byteLength; + } + else if (typeof body.size === "number") { + return body.size; + } + else if (typeof body.path === "string") { + // handles fs readable streams + return fs_1.lstatSync(body.path).size; + } +} +exports.calculateBodyLength = calculateBodyLength; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQStCO0FBRS9CLFNBQWdCLG1CQUFtQixDQUFDLElBQVM7SUFDM0MsSUFBSSxDQUFDLElBQUksRUFBRTtRQUNULE9BQU8sQ0FBQyxDQUFDO0tBQ1Y7SUFDRCxJQUFJLE9BQU8sSUFBSSxLQUFLLFFBQVEsRUFBRTtRQUM1QixPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsTUFBTSxDQUFDO0tBQ2pDO1NBQU0sSUFBSSxPQUFPLElBQUksQ0FBQyxVQUFVLEtBQUssUUFBUSxFQUFFO1FBQzlDLCtEQUErRDtRQUMvRCxPQUFPLElBQUksQ0FBQyxVQUFVLENBQUM7S0FDeEI7U0FBTSxJQUFJLE9BQU8sSUFBSSxDQUFDLElBQUksS0FBSyxRQUFRLEVBQUU7UUFDeEMsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDO0tBQ2xCO1NBQU0sSUFBSSxPQUFPLElBQUksQ0FBQyxJQUFJLEtBQUssUUFBUSxFQUFFO1FBQ3hDLDhCQUE4QjtRQUM5QixPQUFPLGNBQVMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsSUFBSSxDQUFDO0tBQ2xDO0FBQ0gsQ0FBQztBQWZELGtEQWVDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgbHN0YXRTeW5jIH0gZnJvbSBcImZzXCI7XG5cbmV4cG9ydCBmdW5jdGlvbiBjYWxjdWxhdGVCb2R5TGVuZ3RoKGJvZHk6IGFueSk6IG51bWJlciB8IHVuZGVmaW5lZCB7XG4gIGlmICghYm9keSkge1xuICAgIHJldHVybiAwO1xuICB9XG4gIGlmICh0eXBlb2YgYm9keSA9PT0gXCJzdHJpbmdcIikge1xuICAgIHJldHVybiBCdWZmZXIuZnJvbShib2R5KS5sZW5ndGg7XG4gIH0gZWxzZSBpZiAodHlwZW9mIGJvZHkuYnl0ZUxlbmd0aCA9PT0gXCJudW1iZXJcIikge1xuICAgIC8vIGhhbmRsZXMgVWludDhBcnJheSwgQXJyYXlCdWZmZXIsIEJ1ZmZlciwgYW5kIEFycmF5QnVmZmVyVmlld1xuICAgIHJldHVybiBib2R5LmJ5dGVMZW5ndGg7XG4gIH0gZWxzZSBpZiAodHlwZW9mIGJvZHkuc2l6ZSA9PT0gXCJudW1iZXJcIikge1xuICAgIHJldHVybiBib2R5LnNpemU7XG4gIH0gZWxzZSBpZiAodHlwZW9mIGJvZHkucGF0aCA9PT0gXCJzdHJpbmdcIikge1xuICAgIC8vIGhhbmRsZXMgZnMgcmVhZGFibGUgc3RyZWFtc1xuICAgIHJldHVybiBsc3RhdFN5bmMoYm9keS5wYXRoKS5zaXplO1xuICB9XG59XG4iXX0= + +/***/ }), + +/***/ 38577: +/***/ ((__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__(30694); +const buffer_1 = __nccwpck_require__(64293); +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOERBQXlEO0FBQ3pELG1DQUFnQztBQUV6QixNQUFNLGVBQWUsR0FBRyxDQUFDLEtBQWtCLEVBQUUsTUFBTSxHQUFHLENBQUMsRUFBRSxTQUFpQixLQUFLLENBQUMsVUFBVSxHQUFHLE1BQU0sRUFBVSxFQUFFO0lBQ3BILElBQUksQ0FBQywrQkFBYSxDQUFDLEtBQUssQ0FBQyxFQUFFO1FBQ3pCLE1BQU0sSUFBSSxTQUFTLENBQUMsMkRBQTJELE9BQU8sS0FBSyxLQUFLLEtBQUssR0FBRyxDQUFDLENBQUM7S0FDM0c7SUFFRCxPQUFPLGVBQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLENBQUMsQ0FBQztBQUM1QyxDQUFDLENBQUM7QUFOVyxRQUFBLGVBQWUsbUJBTTFCO0FBSUssTUFBTSxVQUFVLEdBQUcsQ0FBQyxLQUFhLEVBQUUsUUFBeUIsRUFBVSxFQUFFO0lBQzdFLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxFQUFFO1FBQzdCLE1BQU0sSUFBSSxTQUFTLENBQUMsOERBQThELE9BQU8sS0FBSyxLQUFLLEtBQUssR0FBRyxDQUFDLENBQUM7S0FDOUc7SUFFRCxPQUFPLFFBQVEsQ0FBQyxDQUFDLENBQUMsZUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLEVBQUUsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLGVBQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDdEUsQ0FBQyxDQUFDO0FBTlcsUUFBQSxVQUFVLGNBTXJCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgaXNBcnJheUJ1ZmZlciB9IGZyb20gXCJAYXdzLXNkay9pcy1hcnJheS1idWZmZXJcIjtcbmltcG9ydCB7IEJ1ZmZlciB9IGZyb20gXCJidWZmZXJcIjtcblxuZXhwb3J0IGNvbnN0IGZyb21BcnJheUJ1ZmZlciA9IChpbnB1dDogQXJyYXlCdWZmZXIsIG9mZnNldCA9IDAsIGxlbmd0aDogbnVtYmVyID0gaW5wdXQuYnl0ZUxlbmd0aCAtIG9mZnNldCk6IEJ1ZmZlciA9PiB7XG4gIGlmICghaXNBcnJheUJ1ZmZlcihpbnB1dCkpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKGBUaGUgXCJpbnB1dFwiIGFyZ3VtZW50IG11c3QgYmUgQXJyYXlCdWZmZXIuIFJlY2VpdmVkIHR5cGUgJHt0eXBlb2YgaW5wdXR9ICgke2lucHV0fSlgKTtcbiAgfVxuXG4gIHJldHVybiBCdWZmZXIuZnJvbShpbnB1dCwgb2Zmc2V0LCBsZW5ndGgpO1xufTtcblxuZXhwb3J0IHR5cGUgU3RyaW5nRW5jb2RpbmcgPSBcImFzY2lpXCIgfCBcInV0ZjhcIiB8IFwidXRmMTZsZVwiIHwgXCJ1Y3MyXCIgfCBcImJhc2U2NFwiIHwgXCJsYXRpbjFcIiB8IFwiYmluYXJ5XCIgfCBcImhleFwiO1xuXG5leHBvcnQgY29uc3QgZnJvbVN0cmluZyA9IChpbnB1dDogc3RyaW5nLCBlbmNvZGluZz86IFN0cmluZ0VuY29kaW5nKTogQnVmZmVyID0+IHtcbiAgaWYgKHR5cGVvZiBpbnB1dCAhPT0gXCJzdHJpbmdcIikge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoYFRoZSBcImlucHV0XCIgYXJndW1lbnQgbXVzdCBiZSBvZiB0eXBlIHN0cmluZy4gUmVjZWl2ZWQgdHlwZSAke3R5cGVvZiBpbnB1dH0gKCR7aW5wdXR9KWApO1xuICB9XG5cbiAgcmV0dXJuIGVuY29kaW5nID8gQnVmZmVyLmZyb20oaW5wdXQsIGVuY29kaW5nKSA6IEJ1ZmZlci5mcm9tKGlucHV0KTtcbn07XG4iXX0= + +/***/ }), + +/***/ 31391: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.formatUrl = void 0; +const querystring_builder_1 = __nccwpck_require__(71035); +function formatUrl(request) { + const { port, query } = request; + let { protocol, path, hostname } = request; + if (protocol && protocol.substr(-1) !== ":") { + protocol += ":"; + } + if (port) { + hostname += `:${port}`; + } + if (path && path.charAt(0) !== "/") { + path = `/${path}`; + } + let queryString = query ? querystring_builder_1.buildQueryString(query) : ""; + if (queryString && queryString[0] !== "?") { + queryString = `?${queryString}`; + } + return `${protocol}//${hostname}${path}${queryString}`; +} +exports.formatUrl = formatUrl; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsc0VBQWdFO0FBR2hFLFNBQWdCLFNBQVMsQ0FBQyxPQUFnRDtJQUN4RSxNQUFNLEVBQUUsSUFBSSxFQUFFLEtBQUssRUFBRSxHQUFHLE9BQU8sQ0FBQztJQUNoQyxJQUFJLEVBQUUsUUFBUSxFQUFFLElBQUksRUFBRSxRQUFRLEVBQUUsR0FBRyxPQUFPLENBQUM7SUFDM0MsSUFBSSxRQUFRLElBQUksUUFBUSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLEdBQUcsRUFBRTtRQUMzQyxRQUFRLElBQUksR0FBRyxDQUFDO0tBQ2pCO0lBQ0QsSUFBSSxJQUFJLEVBQUU7UUFDUixRQUFRLElBQUksSUFBSSxJQUFJLEVBQUUsQ0FBQztLQUN4QjtJQUNELElBQUksSUFBSSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLEtBQUssR0FBRyxFQUFFO1FBQ2xDLElBQUksR0FBRyxJQUFJLElBQUksRUFBRSxDQUFDO0tBQ25CO0lBQ0QsSUFBSSxXQUFXLEdBQUcsS0FBSyxDQUFDLENBQUMsQ0FBQyxzQ0FBZ0IsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDO0lBQ3ZELElBQUksV0FBVyxJQUFJLFdBQVcsQ0FBQyxDQUFDLENBQUMsS0FBSyxHQUFHLEVBQUU7UUFDekMsV0FBVyxHQUFHLElBQUksV0FBVyxFQUFFLENBQUM7S0FDakM7SUFDRCxPQUFPLEdBQUcsUUFBUSxLQUFLLFFBQVEsR0FBRyxJQUFJLEdBQUcsV0FBVyxFQUFFLENBQUM7QUFDekQsQ0FBQztBQWpCRCw4QkFpQkMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBidWlsZFF1ZXJ5U3RyaW5nIH0gZnJvbSBcIkBhd3Mtc2RrL3F1ZXJ5c3RyaW5nLWJ1aWxkZXJcIjtcbmltcG9ydCB7IEh0dHBSZXF1ZXN0IH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmV4cG9ydCBmdW5jdGlvbiBmb3JtYXRVcmwocmVxdWVzdDogT21pdDxIdHRwUmVxdWVzdCwgXCJoZWFkZXJzXCIgfCBcIm1ldGhvZFwiPik6IHN0cmluZyB7XG4gIGNvbnN0IHsgcG9ydCwgcXVlcnkgfSA9IHJlcXVlc3Q7XG4gIGxldCB7IHByb3RvY29sLCBwYXRoLCBob3N0bmFtZSB9ID0gcmVxdWVzdDtcbiAgaWYgKHByb3RvY29sICYmIHByb3RvY29sLnN1YnN0cigtMSkgIT09IFwiOlwiKSB7XG4gICAgcHJvdG9jb2wgKz0gXCI6XCI7XG4gIH1cbiAgaWYgKHBvcnQpIHtcbiAgICBob3N0bmFtZSArPSBgOiR7cG9ydH1gO1xuICB9XG4gIGlmIChwYXRoICYmIHBhdGguY2hhckF0KDApICE9PSBcIi9cIikge1xuICAgIHBhdGggPSBgLyR7cGF0aH1gO1xuICB9XG4gIGxldCBxdWVyeVN0cmluZyA9IHF1ZXJ5ID8gYnVpbGRRdWVyeVN0cmluZyhxdWVyeSkgOiBcIlwiO1xuICBpZiAocXVlcnlTdHJpbmcgJiYgcXVlcnlTdHJpbmdbMF0gIT09IFwiP1wiKSB7XG4gICAgcXVlcnlTdHJpbmcgPSBgPyR7cXVlcnlTdHJpbmd9YDtcbiAgfVxuICByZXR1cm4gYCR7cHJvdG9jb2x9Ly8ke2hvc3RuYW1lfSR7cGF0aH0ke3F1ZXJ5U3RyaW5nfWA7XG59XG4iXX0= + +/***/ }), + +/***/ 73291: +/***/ ((__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; +} +/** + * Converts a hexadecimal encoded string to a Uint8Array of bytes. + * + * @param encoded The hexadecimal encoded string + */ +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; +/** + * Converts a Uint8Array of binary data to a hexadecimal encoded string. + * + * @param bytes The binary data to encode + */ +function toHex(bytes) { + let out = ""; + for (let i = 0; i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; + } + return out; +} +exports.toHex = toHex; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsTUFBTSxZQUFZLEdBQThCLEVBQUUsQ0FBQztBQUNuRCxNQUFNLFlBQVksR0FBOEIsRUFBRSxDQUFDO0FBRW5ELEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxHQUFHLEVBQUUsQ0FBQyxFQUFFLEVBQUU7SUFDNUIsSUFBSSxXQUFXLEdBQUcsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxFQUFFLENBQUMsQ0FBQyxXQUFXLEVBQUUsQ0FBQztJQUMvQyxJQUFJLFdBQVcsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFO1FBQzVCLFdBQVcsR0FBRyxJQUFJLFdBQVcsRUFBRSxDQUFDO0tBQ2pDO0lBRUQsWUFBWSxDQUFDLENBQUMsQ0FBQyxHQUFHLFdBQVcsQ0FBQztJQUM5QixZQUFZLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0NBQy9CO0FBRUQ7Ozs7R0FJRztBQUNILFNBQWdCLE9BQU8sQ0FBQyxPQUFlO0lBQ3JDLElBQUksT0FBTyxDQUFDLE1BQU0sR0FBRyxDQUFDLEtBQUssQ0FBQyxFQUFFO1FBQzVCLE1BQU0sSUFBSSxLQUFLLENBQUMscURBQXFELENBQUMsQ0FBQztLQUN4RTtJQUVELE1BQU0sR0FBRyxHQUFHLElBQUksVUFBVSxDQUFDLE9BQU8sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUM7SUFDL0MsS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLE9BQU8sQ0FBQyxNQUFNLEVBQUUsQ0FBQyxJQUFJLENBQUMsRUFBRTtRQUMxQyxNQUFNLFdBQVcsR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUN2RCxJQUFJLFdBQVcsSUFBSSxZQUFZLEVBQUU7WUFDL0IsR0FBRyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsR0FBRyxZQUFZLENBQUMsV0FBVyxDQUFDLENBQUM7U0FDeEM7YUFBTTtZQUNMLE1BQU0sSUFBSSxLQUFLLENBQUMsdUNBQXVDLFdBQVcsaUJBQWlCLENBQUMsQ0FBQztTQUN0RjtLQUNGO0lBRUQsT0FBTyxHQUFHLENBQUM7QUFDYixDQUFDO0FBaEJELDBCQWdCQztBQUVEOzs7O0dBSUc7QUFDSCxTQUFnQixLQUFLLENBQUMsS0FBaUI7SUFDckMsSUFBSSxHQUFHLEdBQUcsRUFBRSxDQUFDO0lBQ2IsS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLEtBQUssQ0FBQyxVQUFVLEVBQUUsQ0FBQyxFQUFFLEVBQUU7UUFDekMsR0FBRyxJQUFJLFlBQVksQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztLQUMvQjtJQUVELE9BQU8sR0FBRyxDQUFDO0FBQ2IsQ0FBQztBQVBELHNCQU9DIiwic291cmNlc0NvbnRlbnQiOlsiY29uc3QgU0hPUlRfVE9fSEVYOiB7IFtrZXk6IG51bWJlcl06IHN0cmluZyB9ID0ge307XG5jb25zdCBIRVhfVE9fU0hPUlQ6IHsgW2tleTogc3RyaW5nXTogbnVtYmVyIH0gPSB7fTtcblxuZm9yIChsZXQgaSA9IDA7IGkgPCAyNTY7IGkrKykge1xuICBsZXQgZW5jb2RlZEJ5dGUgPSBpLnRvU3RyaW5nKDE2KS50b0xvd2VyQ2FzZSgpO1xuICBpZiAoZW5jb2RlZEJ5dGUubGVuZ3RoID09PSAxKSB7XG4gICAgZW5jb2RlZEJ5dGUgPSBgMCR7ZW5jb2RlZEJ5dGV9YDtcbiAgfVxuXG4gIFNIT1JUX1RPX0hFWFtpXSA9IGVuY29kZWRCeXRlO1xuICBIRVhfVE9fU0hPUlRbZW5jb2RlZEJ5dGVdID0gaTtcbn1cblxuLyoqXG4gKiBDb252ZXJ0cyBhIGhleGFkZWNpbWFsIGVuY29kZWQgc3RyaW5nIHRvIGEgVWludDhBcnJheSBvZiBieXRlcy5cbiAqXG4gKiBAcGFyYW0gZW5jb2RlZCBUaGUgaGV4YWRlY2ltYWwgZW5jb2RlZCBzdHJpbmdcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGZyb21IZXgoZW5jb2RlZDogc3RyaW5nKTogVWludDhBcnJheSB7XG4gIGlmIChlbmNvZGVkLmxlbmd0aCAlIDIgIT09IDApIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXCJIZXggZW5jb2RlZCBzdHJpbmdzIG11c3QgaGF2ZSBhbiBldmVuIG51bWJlciBsZW5ndGhcIik7XG4gIH1cblxuICBjb25zdCBvdXQgPSBuZXcgVWludDhBcnJheShlbmNvZGVkLmxlbmd0aCAvIDIpO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IGVuY29kZWQubGVuZ3RoOyBpICs9IDIpIHtcbiAgICBjb25zdCBlbmNvZGVkQnl0ZSA9IGVuY29kZWQuc3Vic3RyKGksIDIpLnRvTG93ZXJDYXNlKCk7XG4gICAgaWYgKGVuY29kZWRCeXRlIGluIEhFWF9UT19TSE9SVCkge1xuICAgICAgb3V0W2kgLyAyXSA9IEhFWF9UT19TSE9SVFtlbmNvZGVkQnl0ZV07XG4gICAgfSBlbHNlIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQ2Fubm90IGRlY29kZSB1bnJlY29nbml6ZWQgc2VxdWVuY2UgJHtlbmNvZGVkQnl0ZX0gYXMgaGV4YWRlY2ltYWxgKTtcbiAgICB9XG4gIH1cblxuICByZXR1cm4gb3V0O1xufVxuXG4vKipcbiAqIENvbnZlcnRzIGEgVWludDhBcnJheSBvZiBiaW5hcnkgZGF0YSB0byBhIGhleGFkZWNpbWFsIGVuY29kZWQgc3RyaW5nLlxuICpcbiAqIEBwYXJhbSBieXRlcyBUaGUgYmluYXJ5IGRhdGEgdG8gZW5jb2RlXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiB0b0hleChieXRlczogVWludDhBcnJheSk6IHN0cmluZyB7XG4gIGxldCBvdXQgPSBcIlwiO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IGJ5dGVzLmJ5dGVMZW5ndGg7IGkrKykge1xuICAgIG91dCArPSBTSE9SVF9UT19IRVhbYnl0ZXNbaV1dO1xuICB9XG5cbiAgcmV0dXJuIG91dDtcbn1cbiJdfQ== + +/***/ }), + +/***/ 23545: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.escapeUriPath = void 0; +const escape_uri_1 = __nccwpck_require__(14302); +const escapeUriPath = (uri) => uri.split("/").map(escape_uri_1.escapeUri).join("/"); +exports.escapeUriPath = escapeUriPath; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNjYXBlLXVyaS1wYXRoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2VzY2FwZS11cmktcGF0aC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2Q0FBeUM7QUFFbEMsTUFBTSxhQUFhLEdBQUcsQ0FBQyxHQUFXLEVBQVUsRUFBRSxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsR0FBRyxDQUFDLHNCQUFTLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7QUFBakYsUUFBQSxhQUFhLGlCQUFvRSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGVzY2FwZVVyaSB9IGZyb20gXCIuL2VzY2FwZS11cmlcIjtcblxuZXhwb3J0IGNvbnN0IGVzY2FwZVVyaVBhdGggPSAodXJpOiBzdHJpbmcpOiBzdHJpbmcgPT4gdXJpLnNwbGl0KFwiL1wiKS5tYXAoZXNjYXBlVXJpKS5qb2luKFwiL1wiKTtcbiJdfQ== + +/***/ }), + +/***/ 14302: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.escapeUri = void 0; +const escapeUri = (uri) => +// AWS percent-encodes some extra non-standard characters in a URI +encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); +exports.escapeUri = escapeUri; +const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNjYXBlLXVyaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lc2NhcGUtdXJpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFPLE1BQU0sU0FBUyxHQUFHLENBQUMsR0FBVyxFQUFVLEVBQUU7QUFDL0Msa0VBQWtFO0FBQ2xFLGtCQUFrQixDQUFDLEdBQUcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxVQUFVLEVBQUUsU0FBUyxDQUFDLENBQUM7QUFGNUMsUUFBQSxTQUFTLGFBRW1DO0FBRXpELE1BQU0sU0FBUyxHQUFHLENBQUMsQ0FBUyxFQUFFLEVBQUUsQ0FBQyxJQUFJLENBQUMsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxDQUFDLFdBQVcsRUFBRSxFQUFFLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgZXNjYXBlVXJpID0gKHVyaTogc3RyaW5nKTogc3RyaW5nID0+XG4gIC8vIEFXUyBwZXJjZW50LWVuY29kZXMgc29tZSBleHRyYSBub24tc3RhbmRhcmQgY2hhcmFjdGVycyBpbiBhIFVSSVxuICBlbmNvZGVVUklDb21wb25lbnQodXJpKS5yZXBsYWNlKC9bIScoKSpdL2csIGhleEVuY29kZSk7XG5cbmNvbnN0IGhleEVuY29kZSA9IChjOiBzdHJpbmcpID0+IGAlJHtjLmNoYXJDb2RlQXQoMCkudG9TdHJpbmcoMTYpLnRvVXBwZXJDYXNlKCl9YDtcbiJdfQ== + +/***/ }), + +/***/ 87834: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(14302), exports); +tslib_1.__exportStar(__nccwpck_require__(23545), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsdURBQTZCO0FBQzdCLDREQUFrQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2VzY2FwZS11cmlcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2VzY2FwZS11cmktcGF0aFwiO1xuIl19 + +/***/ }), + +/***/ 64717: +/***/ ((__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__(71124); +const os_1 = __nccwpck_require__(12087); +const process_1 = __nccwpck_require__(61765); +exports.UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; +exports.UA_APP_ID_INI_NAME = "sdk-ua-app-id"; +/** + * Collect metrics from runtime to put into user agent. + */ +const defaultUserAgent = ({ serviceId, clientVersion, }) => async () => { + const sections = [ + // sdk-metadata + ["aws-sdk-js", clientVersion], + // os-metadata + [`os/${os_1.platform()}`, os_1.release()], + // language-metadata + // ECMAScript edition doesn't matter in JS, so no version needed. + ["lang/js"], + ["md/nodejs", `${process_1.versions.node}`], + ]; + if (serviceId) { + // api-metadata + // service Id may not appear in non-AWS clients + sections.push([`api/${serviceId}`, clientVersion]); + } + if (process_1.env.AWS_EXECUTION_ENV) { + // env-metadata + sections.push([`exec-env/${process_1.env.AWS_EXECUTION_ENV}`]); + } + const appId = await 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, + })(); + if (appId) { + sections.push([`app/${appId}`]); + } + return sections; +}; +exports.defaultUserAgent = defaultUserAgent; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsd0VBQTJEO0FBRTNELDJCQUF1QztBQUN2QyxxQ0FBd0M7QUFFM0IsUUFBQSxrQkFBa0IsR0FBRyxtQkFBbUIsQ0FBQztBQUN6QyxRQUFBLGtCQUFrQixHQUFHLGVBQWUsQ0FBQztBQU9sRDs7R0FFRztBQUNJLE1BQU0sZ0JBQWdCLEdBQUcsQ0FBQyxFQUMvQixTQUFTLEVBQ1QsYUFBYSxHQUNXLEVBQXVCLEVBQUUsQ0FBQyxLQUFLLElBQUksRUFBRTtJQUM3RCxNQUFNLFFBQVEsR0FBYztRQUMxQixlQUFlO1FBQ2YsQ0FBQyxZQUFZLEVBQUUsYUFBYSxDQUFDO1FBQzdCLGNBQWM7UUFDZCxDQUFDLE1BQU0sYUFBUSxFQUFFLEVBQUUsRUFBRSxZQUFPLEVBQUUsQ0FBQztRQUMvQixvQkFBb0I7UUFDcEIsaUVBQWlFO1FBQ2pFLENBQUMsU0FBUyxDQUFDO1FBQ1gsQ0FBQyxXQUFXLEVBQUUsR0FBRyxrQkFBUSxDQUFDLElBQUksRUFBRSxDQUFDO0tBQ2xDLENBQUM7SUFFRixJQUFJLFNBQVMsRUFBRTtRQUNiLGVBQWU7UUFDZiwrQ0FBK0M7UUFDL0MsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFDLE9BQU8sU0FBUyxFQUFFLEVBQUUsYUFBYSxDQUFDLENBQUMsQ0FBQztLQUNwRDtJQUVELElBQUksYUFBRyxDQUFDLGlCQUFpQixFQUFFO1FBQ3pCLGVBQWU7UUFDZixRQUFRLENBQUMsSUFBSSxDQUFDLENBQUMsWUFBWSxhQUFHLENBQUMsaUJBQWlCLEVBQUUsQ0FBQyxDQUFDLENBQUM7S0FDdEQ7SUFFRCxNQUFNLEtBQUssR0FBRyxNQUFNLGlDQUFVLENBQXFCO1FBQ2pELDJCQUEyQixFQUFFLENBQUMsR0FBRyxFQUFFLEVBQUUsQ0FBQyxHQUFHLENBQUMsMEJBQWtCLENBQUM7UUFDN0Qsa0JBQWtCLEVBQUUsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLE9BQU8sQ0FBQywwQkFBa0IsQ0FBQztRQUM1RCxPQUFPLEVBQUUsU0FBUztLQUNuQixDQUFDLEVBQUUsQ0FBQztJQUNMLElBQUksS0FBSyxFQUFFO1FBQ1QsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFDLE9BQU8sS0FBSyxFQUFFLENBQUMsQ0FBQyxDQUFDO0tBQ2pDO0lBRUQsT0FBTyxRQUFRLENBQUM7QUFDbEIsQ0FBQyxDQUFDO0FBcENXLFFBQUEsZ0JBQWdCLG9CQW9DM0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBsb2FkQ29uZmlnIH0gZnJvbSBcIkBhd3Mtc2RrL25vZGUtY29uZmlnLXByb3ZpZGVyXCI7XG5pbXBvcnQgeyBQcm92aWRlciwgVXNlckFnZW50IH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5pbXBvcnQgeyBwbGF0Zm9ybSwgcmVsZWFzZSB9IGZyb20gXCJvc1wiO1xuaW1wb3J0IHsgZW52LCB2ZXJzaW9ucyB9IGZyb20gXCJwcm9jZXNzXCI7XG5cbmV4cG9ydCBjb25zdCBVQV9BUFBfSURfRU5WX05BTUUgPSBcIkFXU19TREtfVUFfQVBQX0lEXCI7XG5leHBvcnQgY29uc3QgVUFfQVBQX0lEX0lOSV9OQU1FID0gXCJzZGstdWEtYXBwLWlkXCI7XG5cbmludGVyZmFjZSBEZWZhdWx0VXNlckFnZW50T3B0aW9ucyB7XG4gIHNlcnZpY2VJZD86IHN0cmluZztcbiAgY2xpZW50VmVyc2lvbjogc3RyaW5nO1xufVxuXG4vKipcbiAqIENvbGxlY3QgbWV0cmljcyBmcm9tIHJ1bnRpbWUgdG8gcHV0IGludG8gdXNlciBhZ2VudC5cbiAqL1xuZXhwb3J0IGNvbnN0IGRlZmF1bHRVc2VyQWdlbnQgPSAoe1xuICBzZXJ2aWNlSWQsXG4gIGNsaWVudFZlcnNpb24sXG59OiBEZWZhdWx0VXNlckFnZW50T3B0aW9ucyk6IFByb3ZpZGVyPFVzZXJBZ2VudD4gPT4gYXN5bmMgKCkgPT4ge1xuICBjb25zdCBzZWN0aW9uczogVXNlckFnZW50ID0gW1xuICAgIC8vIHNkay1tZXRhZGF0YVxuICAgIFtcImF3cy1zZGstanNcIiwgY2xpZW50VmVyc2lvbl0sXG4gICAgLy8gb3MtbWV0YWRhdGFcbiAgICBbYG9zLyR7cGxhdGZvcm0oKX1gLCByZWxlYXNlKCldLFxuICAgIC8vIGxhbmd1YWdlLW1ldGFkYXRhXG4gICAgLy8gRUNNQVNjcmlwdCBlZGl0aW9uIGRvZXNuJ3QgbWF0dGVyIGluIEpTLCBzbyBubyB2ZXJzaW9uIG5lZWRlZC5cbiAgICBbXCJsYW5nL2pzXCJdLFxuICAgIFtcIm1kL25vZGVqc1wiLCBgJHt2ZXJzaW9ucy5ub2RlfWBdLFxuICBdO1xuXG4gIGlmIChzZXJ2aWNlSWQpIHtcbiAgICAvLyBhcGktbWV0YWRhdGFcbiAgICAvLyBzZXJ2aWNlIElkIG1heSBub3QgYXBwZWFyIGluIG5vbi1BV1MgY2xpZW50c1xuICAgIHNlY3Rpb25zLnB1c2goW2BhcGkvJHtzZXJ2aWNlSWR9YCwgY2xpZW50VmVyc2lvbl0pO1xuICB9XG5cbiAgaWYgKGVudi5BV1NfRVhFQ1VUSU9OX0VOVikge1xuICAgIC8vIGVudi1tZXRhZGF0YVxuICAgIHNlY3Rpb25zLnB1c2goW2BleGVjLWVudi8ke2Vudi5BV1NfRVhFQ1VUSU9OX0VOVn1gXSk7XG4gIH1cblxuICBjb25zdCBhcHBJZCA9IGF3YWl0IGxvYWRDb25maWc8c3RyaW5nIHwgdW5kZWZpbmVkPih7XG4gICAgZW52aXJvbm1lbnRWYXJpYWJsZVNlbGVjdG9yOiAoZW52KSA9PiBlbnZbVUFfQVBQX0lEX0VOVl9OQU1FXSxcbiAgICBjb25maWdGaWxlU2VsZWN0b3I6IChwcm9maWxlKSA9PiBwcm9maWxlW1VBX0FQUF9JRF9JTklfTkFNRV0sXG4gICAgZGVmYXVsdDogdW5kZWZpbmVkLFxuICB9KSgpO1xuICBpZiAoYXBwSWQpIHtcbiAgICBzZWN0aW9ucy5wdXNoKFtgYXBwLyR7YXBwSWR9YF0pO1xuICB9XG5cbiAgcmV0dXJuIHNlY3Rpb25zO1xufTtcbiJdfQ== + +/***/ }), + +/***/ 85227: +/***/ ((__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__(38577); +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsZ0VBQXdFO0FBRWpFLE1BQU0sUUFBUSxHQUFHLENBQUMsS0FBYSxFQUFjLEVBQUU7SUFDcEQsTUFBTSxHQUFHLEdBQUcsNkJBQVUsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLENBQUM7SUFDdEMsT0FBTyxJQUFJLFVBQVUsQ0FBQyxHQUFHLENBQUMsTUFBTSxFQUFFLEdBQUcsQ0FBQyxVQUFVLEVBQUUsR0FBRyxDQUFDLFVBQVUsR0FBRyxVQUFVLENBQUMsaUJBQWlCLENBQUMsQ0FBQztBQUNuRyxDQUFDLENBQUM7QUFIVyxRQUFBLFFBQVEsWUFHbkI7QUFFSyxNQUFNLE1BQU0sR0FBRyxDQUFDLEtBQWlCLEVBQVUsRUFBRSxDQUNsRCxrQ0FBZSxDQUFDLEtBQUssQ0FBQyxNQUFNLEVBQUUsS0FBSyxDQUFDLFVBQVUsRUFBRSxLQUFLLENBQUMsVUFBVSxDQUFDLENBQUMsUUFBUSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBRHhFLFFBQUEsTUFBTSxVQUNrRSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGZyb21BcnJheUJ1ZmZlciwgZnJvbVN0cmluZyB9IGZyb20gXCJAYXdzLXNkay91dGlsLWJ1ZmZlci1mcm9tXCI7XG5cbmV4cG9ydCBjb25zdCBmcm9tVXRmOCA9IChpbnB1dDogc3RyaW5nKTogVWludDhBcnJheSA9PiB7XG4gIGNvbnN0IGJ1ZiA9IGZyb21TdHJpbmcoaW5wdXQsIFwidXRmOFwiKTtcbiAgcmV0dXJuIG5ldyBVaW50OEFycmF5KGJ1Zi5idWZmZXIsIGJ1Zi5ieXRlT2Zmc2V0LCBidWYuYnl0ZUxlbmd0aCAvIFVpbnQ4QXJyYXkuQllURVNfUEVSX0VMRU1FTlQpO1xufTtcblxuZXhwb3J0IGNvbnN0IHRvVXRmOCA9IChpbnB1dDogVWludDhBcnJheSk6IHN0cmluZyA9PlxuICBmcm9tQXJyYXlCdWZmZXIoaW5wdXQuYnVmZmVyLCBpbnB1dC5ieXRlT2Zmc2V0LCBpbnB1dC5ieXRlTGVuZ3RoKS50b1N0cmluZyhcInV0ZjhcIik7XG4iXX0= + +/***/ }), + +/***/ 41194: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createWaiter = void 0; +const poller_1 = __nccwpck_require__(39689); +const utils_1 = __nccwpck_require__(79534); +const waiter_1 = __nccwpck_require__(70709); +const abortTimeout = async (abortSignal) => { + return new Promise((resolve) => { + abortSignal.onabort = () => resolve({ state: waiter_1.WaiterState.ABORTED }); + }); +}; +/** + * Create a waiter promise that only resolves when: + * 1. Abort controller is signaled + * 2. Max wait time is reached + * 3. `acceptorChecks` succeeds, or fails + * Otherwise, it invokes `acceptorChecks` with exponential-backoff delay. + * + * @internal + */ +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)); + } + return Promise.race(exitConditions); +}; +exports.createWaiter = createWaiter; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlV2FpdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NyZWF0ZVdhaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxxQ0FBc0M7QUFDdEMsbUNBQWdEO0FBQ2hELHFDQUEyRjtBQUUzRixNQUFNLFlBQVksR0FBRyxLQUFLLEVBQUUsV0FBd0IsRUFBeUIsRUFBRTtJQUM3RSxPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLEVBQUU7UUFDN0IsV0FBVyxDQUFDLE9BQU8sR0FBRyxHQUFHLEVBQUUsQ0FBQyxPQUFPLENBQUMsRUFBRSxLQUFLLEVBQUUsb0JBQVcsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDO0lBQ3RFLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyxDQUFDO0FBRUY7Ozs7Ozs7O0dBUUc7QUFDSSxNQUFNLFlBQVksR0FBRyxLQUFLLEVBQy9CLE9BQThCLEVBQzlCLEtBQVksRUFDWixjQUF1RSxFQUNoRCxFQUFFO0lBQ3pCLE1BQU0sTUFBTSxHQUFHO1FBQ2IsR0FBRyw4QkFBcUI7UUFDeEIsR0FBRyxPQUFPO0tBQ1gsQ0FBQztJQUNGLDZCQUFxQixDQUFDLE1BQU0sQ0FBQyxDQUFDO0lBRTlCLE1BQU0sY0FBYyxHQUFHLENBQUMsbUJBQVUsQ0FBZ0IsTUFBTSxFQUFFLEtBQUssRUFBRSxjQUFjLENBQUMsQ0FBQyxDQUFDO0lBQ2xGLElBQUksT0FBTyxDQUFDLGVBQWUsRUFBRTtRQUMzQixjQUFjLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxPQUFPLENBQUMsZUFBZSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7S0FDbkU7SUFDRCxPQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsY0FBYyxDQUFDLENBQUM7QUFDdEMsQ0FBQyxDQUFDO0FBaEJXLFFBQUEsWUFBWSxnQkFnQnZCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQWJvcnRTaWduYWwgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuaW1wb3J0IHsgcnVuUG9sbGluZyB9IGZyb20gXCIuL3BvbGxlclwiO1xuaW1wb3J0IHsgdmFsaWRhdGVXYWl0ZXJPcHRpb25zIH0gZnJvbSBcIi4vdXRpbHNcIjtcbmltcG9ydCB7IFdhaXRlck9wdGlvbnMsIFdhaXRlclJlc3VsdCwgd2FpdGVyU2VydmljZURlZmF1bHRzLCBXYWl0ZXJTdGF0ZSB9IGZyb20gXCIuL3dhaXRlclwiO1xuXG5jb25zdCBhYm9ydFRpbWVvdXQgPSBhc3luYyAoYWJvcnRTaWduYWw6IEFib3J0U2lnbmFsKTogUHJvbWlzZTxXYWl0ZXJSZXN1bHQ+ID0+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7XG4gICAgYWJvcnRTaWduYWwub25hYm9ydCA9ICgpID0+IHJlc29sdmUoeyBzdGF0ZTogV2FpdGVyU3RhdGUuQUJPUlRFRCB9KTtcbiAgfSk7XG59O1xuXG4vKipcbiAqIENyZWF0ZSBhIHdhaXRlciBwcm9taXNlIHRoYXQgb25seSByZXNvbHZlcyB3aGVuOlxuICogMS4gQWJvcnQgY29udHJvbGxlciBpcyBzaWduYWxlZFxuICogMi4gTWF4IHdhaXQgdGltZSBpcyByZWFjaGVkXG4gKiAzLiBgYWNjZXB0b3JDaGVja3NgIHN1Y2NlZWRzLCBvciBmYWlsc1xuICogT3RoZXJ3aXNlLCBpdCBpbnZva2VzIGBhY2NlcHRvckNoZWNrc2Agd2l0aCBleHBvbmVudGlhbC1iYWNrb2ZmIGRlbGF5LlxuICpcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgY3JlYXRlV2FpdGVyID0gYXN5bmMgPENsaWVudCwgSW5wdXQ+KFxuICBvcHRpb25zOiBXYWl0ZXJPcHRpb25zPENsaWVudD4sXG4gIGlucHV0OiBJbnB1dCxcbiAgYWNjZXB0b3JDaGVja3M6IChjbGllbnQ6IENsaWVudCwgaW5wdXQ6IElucHV0KSA9PiBQcm9taXNlPFdhaXRlclJlc3VsdD5cbik6IFByb21pc2U8V2FpdGVyUmVzdWx0PiA9PiB7XG4gIGNvbnN0IHBhcmFtcyA9IHtcbiAgICAuLi53YWl0ZXJTZXJ2aWNlRGVmYXVsdHMsXG4gICAgLi4ub3B0aW9ucyxcbiAgfTtcbiAgdmFsaWRhdGVXYWl0ZXJPcHRpb25zKHBhcmFtcyk7XG5cbiAgY29uc3QgZXhpdENvbmRpdGlvbnMgPSBbcnVuUG9sbGluZzxDbGllbnQsIElucHV0PihwYXJhbXMsIGlucHV0LCBhY2NlcHRvckNoZWNrcyldO1xuICBpZiAob3B0aW9ucy5hYm9ydENvbnRyb2xsZXIpIHtcbiAgICBleGl0Q29uZGl0aW9ucy5wdXNoKGFib3J0VGltZW91dChvcHRpb25zLmFib3J0Q29udHJvbGxlci5zaWduYWwpKTtcbiAgfVxuICByZXR1cm4gUHJvbWlzZS5yYWNlKGV4aXRDb25kaXRpb25zKTtcbn07XG4iXX0= + +/***/ }), + +/***/ 6243: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(41194), exports); +tslib_1.__exportStar(__nccwpck_require__(70709), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseURBQStCO0FBQy9CLG1EQUF5QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2NyZWF0ZVdhaXRlclwiO1xuZXhwb3J0ICogZnJvbSBcIi4vd2FpdGVyXCI7XG4iXX0= + +/***/ }), + +/***/ 39689: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.runPolling = void 0; +const sleep_1 = __nccwpck_require__(35442); +const waiter_1 = __nccwpck_require__(70709); +/** + * Reference: https://awslabs.github.io/smithy/1.0/spec/waiters.html#waiter-retries + */ +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); +/** + * Function that runs polling as part of waiters. This will make one inital attempt and then + * subsequent attempts with an increasing delay. + * @param params options passed to the waiter. + * @param client AWS SDK Client + * @param input client input + * @param stateChecker function that checks the acceptor states on each poll. + */ +const runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client }, 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; + // The max attempt number that the derived delay time tend to increase. + // Pre-compute this number to avoid Number type overflow. + 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) { + return { state: waiter_1.WaiterState.ABORTED }; + } + const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt); + // Resolve the promise explicitly at timeout or aborted. Otherwise this while loop will keep making API call until + // `acceptorCheck` returns non-retry status, even with the Promise.race() outside. + 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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9sbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3BvbGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5Q0FBc0M7QUFDdEMscUNBQW9FO0FBRXBFOztHQUVHO0FBQ0gsTUFBTSw0QkFBNEIsR0FBRyxDQUFDLFFBQWdCLEVBQUUsUUFBZ0IsRUFBRSxjQUFzQixFQUFFLE9BQWUsRUFBRSxFQUFFO0lBQ25ILElBQUksT0FBTyxHQUFHLGNBQWM7UUFBRSxPQUFPLFFBQVEsQ0FBQztJQUM5QyxNQUFNLEtBQUssR0FBRyxRQUFRLEdBQUcsQ0FBQyxJQUFJLENBQUMsT0FBTyxHQUFHLENBQUMsQ0FBQyxDQUFDO0lBQzVDLE9BQU8sYUFBYSxDQUFDLFFBQVEsRUFBRSxLQUFLLENBQUMsQ0FBQztBQUN4QyxDQUFDLENBQUM7QUFFRixNQUFNLGFBQWEsR0FBRyxDQUFDLEdBQVcsRUFBRSxHQUFXLEVBQUUsRUFBRSxDQUFDLEdBQUcsR0FBRyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsQ0FBQyxHQUFHLEdBQUcsR0FBRyxDQUFDLENBQUM7QUFFdEY7Ozs7Ozs7R0FPRztBQUNJLE1BQU0sVUFBVSxHQUFHLEtBQUssRUFDN0IsRUFBRSxRQUFRLEVBQUUsUUFBUSxFQUFFLFdBQVcsRUFBRSxlQUFlLEVBQUUsTUFBTSxFQUF5QixFQUNuRixLQUFZLEVBQ1osY0FBdUUsRUFDaEQsRUFBRTs7SUFDekIsTUFBTSxFQUFFLEtBQUssRUFBRSxHQUFHLE1BQU0sY0FBYyxDQUFDLE1BQU0sRUFBRSxLQUFLLENBQUMsQ0FBQztJQUN0RCxJQUFJLEtBQUssS0FBSyxvQkFBVyxDQUFDLEtBQUssRUFBRTtRQUMvQixPQUFPLEVBQUUsS0FBSyxFQUFFLENBQUM7S0FDbEI7SUFFRCxJQUFJLGNBQWMsR0FBRyxDQUFDLENBQUM7SUFDdkIsTUFBTSxTQUFTLEdBQUcsSUFBSSxDQUFDLEdBQUcsRUFBRSxHQUFHLFdBQVcsR0FBRyxJQUFJLENBQUM7SUFDbEQsdUVBQXVFO0lBQ3ZFLHlEQUF5RDtJQUN6RCxNQUFNLGNBQWMsR0FBRyxJQUFJLENBQUMsR0FBRyxDQUFDLFFBQVEsR0FBRyxRQUFRLENBQUMsR0FBRyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUN2RSxPQUFPLElBQUksRUFBRTtRQUNYLFVBQUksZUFBZSxhQUFmLGVBQWUsdUJBQWYsZUFBZSxDQUFFLE1BQU0sMENBQUUsT0FBTyxFQUFFO1lBQ3BDLE9BQU8sRUFBRSxLQUFLLEVBQUUsb0JBQVcsQ0FBQyxPQUFPLEVBQUUsQ0FBQztTQUN2QztRQUNELE1BQU0sS0FBSyxHQUFHLDRCQUE0QixDQUFDLFFBQVEsRUFBRSxRQUFRLEVBQUUsY0FBYyxFQUFFLGNBQWMsQ0FBQyxDQUFDO1FBQy9GLGtIQUFrSDtRQUNsSCxrRkFBa0Y7UUFDbEYsSUFBSSxJQUFJLENBQUMsR0FBRyxFQUFFLEdBQUcsS0FBSyxHQUFHLElBQUksR0FBRyxTQUFTLEVBQUU7WUFDekMsT0FBTyxFQUFFLEtBQUssRUFBRSxvQkFBVyxDQUFDLE9BQU8sRUFBRSxDQUFDO1NBQ3ZDO1FBQ0QsTUFBTSxhQUFLLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDbkIsTUFBTSxFQUFFLEtBQUssRUFBRSxHQUFHLE1BQU0sY0FBYyxDQUFDLE1BQU0sRUFBRSxLQUFLLENBQUMsQ0FBQztRQUN0RCxJQUFJLEtBQUssS0FBSyxvQkFBVyxDQUFDLEtBQUssRUFBRTtZQUMvQixPQUFPLEVBQUUsS0FBSyxFQUFFLENBQUM7U0FDbEI7UUFFRCxjQUFjLElBQUksQ0FBQyxDQUFDO0tBQ3JCO0FBQ0gsQ0FBQyxDQUFDO0FBakNXLFFBQUEsVUFBVSxjQWlDckIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzbGVlcCB9IGZyb20gXCIuL3V0aWxzL3NsZWVwXCI7XG5pbXBvcnQgeyBXYWl0ZXJPcHRpb25zLCBXYWl0ZXJSZXN1bHQsIFdhaXRlclN0YXRlIH0gZnJvbSBcIi4vd2FpdGVyXCI7XG5cbi8qKlxuICogUmVmZXJlbmNlOiBodHRwczovL2F3c2xhYnMuZ2l0aHViLmlvL3NtaXRoeS8xLjAvc3BlYy93YWl0ZXJzLmh0bWwjd2FpdGVyLXJldHJpZXNcbiAqL1xuY29uc3QgZXhwb25lbnRpYWxCYWNrb2ZmV2l0aEppdHRlciA9IChtaW5EZWxheTogbnVtYmVyLCBtYXhEZWxheTogbnVtYmVyLCBhdHRlbXB0Q2VpbGluZzogbnVtYmVyLCBhdHRlbXB0OiBudW1iZXIpID0+IHtcbiAgaWYgKGF0dGVtcHQgPiBhdHRlbXB0Q2VpbGluZykgcmV0dXJuIG1heERlbGF5O1xuICBjb25zdCBkZWxheSA9IG1pbkRlbGF5ICogMiAqKiAoYXR0ZW1wdCAtIDEpO1xuICByZXR1cm4gcmFuZG9tSW5SYW5nZShtaW5EZWxheSwgZGVsYXkpO1xufTtcblxuY29uc3QgcmFuZG9tSW5SYW5nZSA9IChtaW46IG51bWJlciwgbWF4OiBudW1iZXIpID0+IG1pbiArIE1hdGgucmFuZG9tKCkgKiAobWF4IC0gbWluKTtcblxuLyoqXG4gKiBGdW5jdGlvbiB0aGF0IHJ1bnMgcG9sbGluZyBhcyBwYXJ0IG9mIHdhaXRlcnMuIFRoaXMgd2lsbCBtYWtlIG9uZSBpbml0YWwgYXR0ZW1wdCBhbmQgdGhlblxuICogc3Vic2VxdWVudCBhdHRlbXB0cyB3aXRoIGFuIGluY3JlYXNpbmcgZGVsYXkuXG4gKiBAcGFyYW0gcGFyYW1zIG9wdGlvbnMgcGFzc2VkIHRvIHRoZSB3YWl0ZXIuXG4gKiBAcGFyYW0gY2xpZW50IEFXUyBTREsgQ2xpZW50XG4gKiBAcGFyYW0gaW5wdXQgY2xpZW50IGlucHV0XG4gKiBAcGFyYW0gc3RhdGVDaGVja2VyIGZ1bmN0aW9uIHRoYXQgY2hlY2tzIHRoZSBhY2NlcHRvciBzdGF0ZXMgb24gZWFjaCBwb2xsLlxuICovXG5leHBvcnQgY29uc3QgcnVuUG9sbGluZyA9IGFzeW5jIDxDbGllbnQsIElucHV0PihcbiAgeyBtaW5EZWxheSwgbWF4RGVsYXksIG1heFdhaXRUaW1lLCBhYm9ydENvbnRyb2xsZXIsIGNsaWVudCB9OiBXYWl0ZXJPcHRpb25zPENsaWVudD4sXG4gIGlucHV0OiBJbnB1dCxcbiAgYWNjZXB0b3JDaGVja3M6IChjbGllbnQ6IENsaWVudCwgaW5wdXQ6IElucHV0KSA9PiBQcm9taXNlPFdhaXRlclJlc3VsdD5cbik6IFByb21pc2U8V2FpdGVyUmVzdWx0PiA9PiB7XG4gIGNvbnN0IHsgc3RhdGUgfSA9IGF3YWl0IGFjY2VwdG9yQ2hlY2tzKGNsaWVudCwgaW5wdXQpO1xuICBpZiAoc3RhdGUgIT09IFdhaXRlclN0YXRlLlJFVFJZKSB7XG4gICAgcmV0dXJuIHsgc3RhdGUgfTtcbiAgfVxuXG4gIGxldCBjdXJyZW50QXR0ZW1wdCA9IDE7XG4gIGNvbnN0IHdhaXRVbnRpbCA9IERhdGUubm93KCkgKyBtYXhXYWl0VGltZSAqIDEwMDA7XG4gIC8vIFRoZSBtYXggYXR0ZW1wdCBudW1iZXIgdGhhdCB0aGUgZGVyaXZlZCBkZWxheSB0aW1lIHRlbmQgdG8gaW5jcmVhc2UuXG4gIC8vIFByZS1jb21wdXRlIHRoaXMgbnVtYmVyIHRvIGF2b2lkIE51bWJlciB0eXBlIG92ZXJmbG93LlxuICBjb25zdCBhdHRlbXB0Q2VpbGluZyA9IE1hdGgubG9nKG1heERlbGF5IC8gbWluRGVsYXkpIC8gTWF0aC5sb2coMikgKyAxO1xuICB3aGlsZSAodHJ1ZSkge1xuICAgIGlmIChhYm9ydENvbnRyb2xsZXI/LnNpZ25hbD8uYWJvcnRlZCkge1xuICAgICAgcmV0dXJuIHsgc3RhdGU6IFdhaXRlclN0YXRlLkFCT1JURUQgfTtcbiAgICB9XG4gICAgY29uc3QgZGVsYXkgPSBleHBvbmVudGlhbEJhY2tvZmZXaXRoSml0dGVyKG1pbkRlbGF5LCBtYXhEZWxheSwgYXR0ZW1wdENlaWxpbmcsIGN1cnJlbnRBdHRlbXB0KTtcbiAgICAvLyBSZXNvbHZlIHRoZSBwcm9taXNlIGV4cGxpY2l0bHkgYXQgdGltZW91dCBvciBhYm9ydGVkLiBPdGhlcndpc2UgdGhpcyB3aGlsZSBsb29wIHdpbGwga2VlcCBtYWtpbmcgQVBJIGNhbGwgdW50aWxcbiAgICAvLyBgYWNjZXB0b3JDaGVja2AgcmV0dXJucyBub24tcmV0cnkgc3RhdHVzLCBldmVuIHdpdGggdGhlIFByb21pc2UucmFjZSgpIG91dHNpZGUuXG4gICAgaWYgKERhdGUubm93KCkgKyBkZWxheSAqIDEwMDAgPiB3YWl0VW50aWwpIHtcbiAgICAgIHJldHVybiB7IHN0YXRlOiBXYWl0ZXJTdGF0ZS5USU1FT1VUIH07XG4gICAgfVxuICAgIGF3YWl0IHNsZWVwKGRlbGF5KTtcbiAgICBjb25zdCB7IHN0YXRlIH0gPSBhd2FpdCBhY2NlcHRvckNoZWNrcyhjbGllbnQsIGlucHV0KTtcbiAgICBpZiAoc3RhdGUgIT09IFdhaXRlclN0YXRlLlJFVFJZKSB7XG4gICAgICByZXR1cm4geyBzdGF0ZSB9O1xuICAgIH1cblxuICAgIGN1cnJlbnRBdHRlbXB0ICs9IDE7XG4gIH1cbn07XG4iXX0= + +/***/ }), + +/***/ 79534: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(75636); +tslib_1.__exportStar(__nccwpck_require__(35442), exports); +tslib_1.__exportStar(__nccwpck_require__(49067), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0RBQXdCO0FBQ3hCLHFEQUEyQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL3NsZWVwXCI7XG5leHBvcnQgKiBmcm9tIFwiLi92YWxpZGF0ZVwiO1xuIl19 + +/***/ }), + +/***/ 35442: +/***/ ((__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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xlZXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvc2xlZXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQU8sTUFBTSxLQUFLLEdBQUcsQ0FBQyxPQUFlLEVBQUUsRUFBRTtJQUN2QyxPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxVQUFVLENBQUMsT0FBTyxFQUFFLE9BQU8sR0FBRyxJQUFJLENBQUMsQ0FBQyxDQUFDO0FBQ3ZFLENBQUMsQ0FBQztBQUZXLFFBQUEsS0FBSyxTQUVoQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBzbGVlcCA9IChzZWNvbmRzOiBudW1iZXIpID0+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiBzZXRUaW1lb3V0KHJlc29sdmUsIHNlY29uZHMgKiAxMDAwKSk7XG59O1xuIl19 + +/***/ }), + +/***/ 49067: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.validateWaiterOptions = void 0; +/** + * Validates that waiter options are passed correctly + * @param options a waiter configuration object + */ +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; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvdmFsaWRhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUE7OztHQUdHO0FBQ0ksTUFBTSxxQkFBcUIsR0FBRyxDQUFTLE9BQThCLEVBQVEsRUFBRTtJQUNwRixJQUFJLE9BQU8sQ0FBQyxXQUFXLEdBQUcsQ0FBQyxFQUFFO1FBQzNCLE1BQU0sSUFBSSxLQUFLLENBQUMsd0RBQXdELENBQUMsQ0FBQztLQUMzRTtTQUFNLElBQUksT0FBTyxDQUFDLFFBQVEsR0FBRyxDQUFDLEVBQUU7UUFDL0IsTUFBTSxJQUFJLEtBQUssQ0FBQyxxREFBcUQsQ0FBQyxDQUFDO0tBQ3hFO1NBQU0sSUFBSSxPQUFPLENBQUMsUUFBUSxHQUFHLENBQUMsRUFBRTtRQUMvQixNQUFNLElBQUksS0FBSyxDQUFDLHFEQUFxRCxDQUFDLENBQUM7S0FDeEU7U0FBTSxJQUFJLE9BQU8sQ0FBQyxXQUFXLElBQUksT0FBTyxDQUFDLFFBQVEsRUFBRTtRQUNsRCxNQUFNLElBQUksS0FBSyxDQUNiLG9DQUFvQyxPQUFPLENBQUMsV0FBVyx3REFBd0QsT0FBTyxDQUFDLFFBQVEsbUJBQW1CLENBQ25KLENBQUM7S0FDSDtTQUFNLElBQUksT0FBTyxDQUFDLFFBQVEsR0FBRyxPQUFPLENBQUMsUUFBUSxFQUFFO1FBQzlDLE1BQU0sSUFBSSxLQUFLLENBQ2IsaUNBQWlDLE9BQU8sQ0FBQyxRQUFRLHdEQUF3RCxPQUFPLENBQUMsUUFBUSxtQkFBbUIsQ0FDN0ksQ0FBQztLQUNIO0FBQ0gsQ0FBQyxDQUFDO0FBaEJXLFFBQUEscUJBQXFCLHlCQWdCaEMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBXYWl0ZXJPcHRpb25zIH0gZnJvbSBcIi4uL3dhaXRlclwiO1xuXG4vKipcbiAqIFZhbGlkYXRlcyB0aGF0IHdhaXRlciBvcHRpb25zIGFyZSBwYXNzZWQgY29ycmVjdGx5XG4gKiBAcGFyYW0gb3B0aW9ucyBhIHdhaXRlciBjb25maWd1cmF0aW9uIG9iamVjdFxuICovXG5leHBvcnQgY29uc3QgdmFsaWRhdGVXYWl0ZXJPcHRpb25zID0gPENsaWVudD4ob3B0aW9uczogV2FpdGVyT3B0aW9uczxDbGllbnQ+KTogdm9pZCA9PiB7XG4gIGlmIChvcHRpb25zLm1heFdhaXRUaW1lIDwgMSkge1xuICAgIHRocm93IG5ldyBFcnJvcihgV2FpdGVyQ29uZmlndXJhdGlvbi5tYXhXYWl0VGltZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAwYCk7XG4gIH0gZWxzZSBpZiAob3B0aW9ucy5taW5EZWxheSA8IDEpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYFdhaXRlckNvbmZpZ3VyYXRpb24ubWluRGVsYXkgbXVzdCBiZSBncmVhdGVyIHRoYW4gMGApO1xuICB9IGVsc2UgaWYgKG9wdGlvbnMubWF4RGVsYXkgPCAxKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKGBXYWl0ZXJDb25maWd1cmF0aW9uLm1heERlbGF5IG11c3QgYmUgZ3JlYXRlciB0aGFuIDBgKTtcbiAgfSBlbHNlIGlmIChvcHRpb25zLm1heFdhaXRUaW1lIDw9IG9wdGlvbnMubWluRGVsYXkpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICBgV2FpdGVyQ29uZmlndXJhdGlvbi5tYXhXYWl0VGltZSBbJHtvcHRpb25zLm1heFdhaXRUaW1lfV0gbXVzdCBiZSBncmVhdGVyIHRoYW4gV2FpdGVyQ29uZmlndXJhdGlvbi5taW5EZWxheSBbJHtvcHRpb25zLm1pbkRlbGF5fV0gZm9yIHRoaXMgd2FpdGVyYFxuICAgICk7XG4gIH0gZWxzZSBpZiAob3B0aW9ucy5tYXhEZWxheSA8IG9wdGlvbnMubWluRGVsYXkpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICBgV2FpdGVyQ29uZmlndXJhdGlvbi5tYXhEZWxheSBbJHtvcHRpb25zLm1heERlbGF5fV0gbXVzdCBiZSBncmVhdGVyIHRoYW4gV2FpdGVyQ29uZmlndXJhdGlvbi5taW5EZWxheSBbJHtvcHRpb25zLm1pbkRlbGF5fV0gZm9yIHRoaXMgd2FpdGVyYFxuICAgICk7XG4gIH1cbn07XG4iXX0= + +/***/ }), + +/***/ 70709: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.WaiterState = exports.waiterServiceDefaults = void 0; +/** + * @private + */ +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 = {})); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dhaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFpQ0E7O0dBRUc7QUFDVSxRQUFBLHFCQUFxQixHQUFHO0lBQ25DLFFBQVEsRUFBRSxDQUFDO0lBQ1gsUUFBUSxFQUFFLEdBQUc7Q0FDZCxDQUFDO0FBUUYsSUFBWSxXQU1YO0FBTkQsV0FBWSxXQUFXO0lBQ3JCLGtDQUFtQixDQUFBO0lBQ25CLGtDQUFtQixDQUFBO0lBQ25CLGtDQUFtQixDQUFBO0lBQ25CLDhCQUFlLENBQUE7SUFDZixrQ0FBbUIsQ0FBQTtBQUNyQixDQUFDLEVBTlcsV0FBVyxHQUFYLG1CQUFXLEtBQVgsbUJBQVcsUUFNdEIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBYm9ydENvbnRyb2xsZXIgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGludGVyZmFjZSBXYWl0ZXJDb25maWd1cmF0aW9uPENsaWVudD4ge1xuICAvKipcbiAgICogUmVxdWlyZWQgc2VydmljZSBjbGllbnRcbiAgICovXG4gIGNsaWVudDogQ2xpZW50O1xuXG4gIC8qKlxuICAgKiBUaGUgYW1vdW50IG9mIHRpbWUgaW4gc2Vjb25kcyBhIHVzZXIgaXMgd2lsbGluZyB0byB3YWl0IGZvciBhIHdhaXRlciB0byBjb21wbGV0ZS5cbiAgICovXG4gIG1heFdhaXRUaW1lOiBudW1iZXI7XG5cbiAgLyoqXG4gICAqIEFib3J0IGNvbnRyb2xsZXIuIFVzZWQgZm9yIGVuZGluZyB0aGUgd2FpdGVyIGVhcmx5LlxuICAgKi9cbiAgYWJvcnRDb250cm9sbGVyPzogQWJvcnRDb250cm9sbGVyO1xuXG4gIC8qKlxuICAgKiBUaGUgbWluaW11bSBhbW91bnQgb2YgdGltZSB0byBkZWxheSBiZXR3ZWVuIHJldHJpZXMgaW4gc2Vjb25kcy4gVGhpcyBpcyB0aGVcbiAgICogZmxvb3Igb2YgdGhlIGV4cG9uZW50aWFsIGJhY2tvZmYuIFRoaXMgdmFsdWUgZGVmYXVsdHMgdG8gc2VydmljZSBkZWZhdWx0XG4gICAqIGlmIG5vdCBzcGVjaWZpZWQuIFRoaXMgdmFsdWUgTVVTVCBiZSBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gbWF4RGVsYXkgYW5kIGdyZWF0ZXIgdGhhbiAwLlxuICAgKi9cbiAgbWluRGVsYXk/OiBudW1iZXI7XG5cbiAgLyoqXG4gICAqIFRoZSBtYXhpbXVtIGFtb3VudCBvZiB0aW1lIHRvIGRlbGF5IGJldHdlZW4gcmV0cmllcyBpbiBzZWNvbmRzLiBUaGlzIGlzIHRoZVxuICAgKiBjZWlsaW5nIG9mIHRoZSBleHBvbmVudGlhbCBiYWNrb2ZmLiBUaGlzIHZhbHVlIGRlZmF1bHRzIHRvIHNlcnZpY2UgZGVmYXVsdFxuICAgKiBpZiBub3Qgc3BlY2lmaWVkLiBJZiBzcGVjaWZpZWQsIHRoaXMgdmFsdWUgTVVTVCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gMS5cbiAgICovXG4gIG1heERlbGF5PzogbnVtYmVyO1xufVxuXG4vKipcbiAqIEBwcml2YXRlXG4gKi9cbmV4cG9ydCBjb25zdCB3YWl0ZXJTZXJ2aWNlRGVmYXVsdHMgPSB7XG4gIG1pbkRlbGF5OiAyLFxuICBtYXhEZWxheTogMTIwLFxufTtcblxuLyoqXG4gKiBAcHJpdmF0ZVxuICovXG5leHBvcnQgdHlwZSBXYWl0ZXJPcHRpb25zPENsaWVudD4gPSBXYWl0ZXJDb25maWd1cmF0aW9uPENsaWVudD4gJlxuICBSZXF1aXJlZDxQaWNrPFdhaXRlckNvbmZpZ3VyYXRpb248Q2xpZW50PiwgXCJtaW5EZWxheVwiIHwgXCJtYXhEZWxheVwiPj47XG5cbmV4cG9ydCBlbnVtIFdhaXRlclN0YXRlIHtcbiAgQUJPUlRFRCA9IFwiQUJPUlRFRFwiLFxuICBGQUlMVVJFID0gXCJGQUlMVVJFXCIsXG4gIFNVQ0NFU1MgPSBcIlNVQ0NFU1NcIixcbiAgUkVUUlkgPSBcIlJFVFJZXCIsXG4gIFRJTUVPVVQgPSBcIlRJTUVPVVRcIixcbn1cblxuZXhwb3J0IHR5cGUgV2FpdGVyUmVzdWx0ID0ge1xuICBzdGF0ZTogV2FpdGVyU3RhdGU7XG59O1xuIl19 + +/***/ }), + +/***/ 67630: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDevice = void 0; +const client_iot_1 = __nccwpck_require__(81222); +const uuid_1 = __nccwpck_require__(62222); +const deviceFileLocations_1 = __nccwpck_require__(91630); +const fs_1 = __nccwpck_require__(35747); +const path = __nccwpck_require__(85622); +const createDevice = async ({ iot, thingGroupName, certsDir, endpoint, attributes, }) => { + var _a, _b; + const thingName = `firmware-ci-${uuid_1.v4()}`; + const { thingArn } = await iot.send(new client_iot_1.CreateThingCommand({ + thingName, + attributePayload: { attributes }, + })); + await iot.send(new client_iot_1.AddThingToThingGroupCommand({ + thingArn, + thingGroupName, + })); + const certs = await iot.send(new client_iot_1.CreateKeysAndCertificateCommand({ setAsActive: true })); + if (certs.certificateArn === undefined) + throw new Error(`Failed to create certificate.`); + await iot.send(new client_iot_1.AttachThingPrincipalCommand({ + principal: certs.certificateArn, + thingName, + })); + const certificate = deviceFileLocations_1.deviceFileLocations({ certsDir, deviceId: thingName }); + await fs_1.promises.writeFile(certificate.key, (_a = certs.keyPair) === null || _a === void 0 ? void 0 : _a.PrivateKey, 'utf-8'); + await fs_1.promises.writeFile(certificate.certWithCA, certs.certificatePem, 'utf-8'); + await fs_1.promises.writeFile(certificate.json, JSON.stringify({ + clientId: thingName, + brokerHostname: endpoint, + caCert: await fs_1.promises.readFile(path.resolve(process.cwd(), 'data', 'AmazonRootCA1.pem'), 'utf-8'), + clientCert: certs.certificatePem, + privateKey: (_b = certs.keyPair) === null || _b === void 0 ? void 0 : _b.PrivateKey, + certificateArn: certs.certificateArn, + certificateId: certs.certificateId, + }, null, 2), 'utf-8'); + return { thingName, thingArn: thingArn }; +}; +exports.createDevice = createDevice; + + +/***/ }), + +/***/ 71352: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deleteDevice = void 0; +const client_iot_1 = __nccwpck_require__(81222); +const deviceFileLocations_1 = __nccwpck_require__(91630); +const fs_1 = __nccwpck_require__(35747); +const deleteDevice = async ({ iot, thingGroupName, thingName, certsDir, }) => { + const { certificateArn, certificateId } = JSON.parse(await fs_1.promises.readFile(deviceFileLocations_1.deviceFileLocations({ certsDir, deviceId: thingName }).json, 'utf-8')); + await iot.send(new client_iot_1.DetachThingPrincipalCommand({ + thingName, + principal: certificateArn, + })); + await iot.send(new client_iot_1.UpdateCertificateCommand({ + certificateId, + newStatus: 'INACTIVE', + })); + await iot.send(new client_iot_1.DeleteCertificateCommand({ + certificateId, + })); + await iot.send(new client_iot_1.RemoveThingFromThingGroupCommand({ + thingName, + thingGroupName, + })); + await iot.send(new client_iot_1.DeleteThingCommand({ + thingName, + })); +}; +exports.deleteDevice = deleteDevice; + + +/***/ }), + +/***/ 92190: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.caFileLocations = void 0; +const path = __nccwpck_require__(85622); +const caFileLocations = (certsDir) => ({ + cert: path.resolve(certsDir, 'rootCA.pem'), + key: path.resolve(certsDir, 'rootCA.key'), + verificationCert: path.resolve(certsDir, 'privateKeyVerification.pem'), + verificationKey: path.resolve(certsDir, 'privateKeyVerification.key'), + csr: path.resolve(certsDir, 'privateKeyVerification.csr'), + id: path.resolve(certsDir, 'rootCA.id'), +}); +exports.caFileLocations = caFileLocations; + + +/***/ }), + +/***/ 35639: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.certsDir = void 0; +const path = __nccwpck_require__(85622); +const fs_1 = __nccwpck_require__(35747); +const certsDir = async ({ accountId, iotEndpoint, workingDirectory, }) => { + const dir = path.resolve(path.join(workingDirectory !== null && workingDirectory !== void 0 ? workingDirectory : process.cwd(), 'certificates', `${accountId}-${iotEndpoint}`)); + try { + await fs_1.promises.stat(dir); + } + catch { + await fs_1.promises.mkdir(dir, { recursive: true }); + console.error(`[certsDir]`, `${dir} created.`); + } + return dir; +}; +exports.certsDir = certsDir; + + +/***/ }), + +/***/ 67475: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createCA = void 0; +const client_cloudformation_1 = __nccwpck_require__(22932); +const client_iot_1 = __nccwpck_require__(81222); +const fs_1 = __nccwpck_require__(35747); +const caFileLocations_1 = __nccwpck_require__(92190); +const run_1 = __nccwpck_require__(36532); +const cloudformation_helpers_1 = __nccwpck_require__(52838); +const createCA = async (args) => { + var _a; + const { certsDir, log, debug, iot, cf } = args; + const caFiles = caFileLocations_1.caFileLocations(certsDir); + try { + await fs_1.promises.stat(certsDir); + } + catch { + await fs_1.promises.mkdir(certsDir); + log(`Created ${certsDir}`); + } + let certExists = false; + try { + await fs_1.promises.stat(caFiles.cert); + certExists = true; + } + catch { + } + if (certExists) { + throw new Error(`CA Certificate exists: ${caFiles.cert}!`); + } + const [stackOutput, registrationCode] = await Promise.all([ + cf + .send(new client_cloudformation_1.DescribeStacksCommand({ StackName: args.stack })) + .then(async ({ Stacks }) => { + if ((Stacks === null || Stacks === void 0 ? void 0 : Stacks.length) === 0 || (Stacks === null || Stacks === void 0 ? void 0 : Stacks[0].Outputs) === undefined) { + throw new Error(`Stack ${args.stack} not found.`); + } + return cloudformation_helpers_1.toObject(Stacks[0].Outputs); + }), + iot + .send(new client_iot_1.GetRegistrationCodeCommand({})) + .then(({ registrationCode }) => registrationCode), + ]); + log('CA Registration code', registrationCode); + await Promise.all([ + run_1.run({ + command: 'openssl', + args: ['genrsa', '-out', caFiles.verificationKey, '2048'], + log: debug, + }), + run_1.run({ + command: 'openssl', + args: ['genrsa', '-out', caFiles.key, '2048'], + log: debug, + }), + ]); + await run_1.run({ + command: 'openssl', + args: [ + 'req', + '-x509', + '-new', + '-nodes', + '-key', + caFiles.key, + '-sha256', + '-days', + '365', + '-out', + caFiles.cert, + '-subj', + `/OU=${(_a = args.subject) !== null && _a !== void 0 ? _a : args.stack}`, + ], + log: debug, + }); + await run_1.run({ + command: 'openssl', + args: [ + 'req', + '-new', + '-key', + caFiles.verificationKey, + '-out', + caFiles.csr, + '-subj', + `/CN=${registrationCode}`, + ], + log: debug, + }); + await run_1.run({ + command: 'openssl', + args: [ + 'x509', + '-req', + '-in', + caFiles.csr, + '-CA', + caFiles.cert, + '-CAkey', + caFiles.key, + '-CAcreateserial', + '-out', + caFiles.verificationCert, + '-days', + '365', + '-sha256', + ], + log: debug, + }); + log(`Created CA certificate in ${caFiles.cert}`); + const [caCertificate, verificationCertificate] = await Promise.all([ + fs_1.promises.readFile(caFiles.cert, 'utf-8'), + fs_1.promises.readFile(caFiles.verificationCert, 'utf-8'), + ]); + await iot.send(new client_iot_1.UpdateEventConfigurationsCommand({ + eventConfigurations: { + CA_CERTIFICATE: { + Enabled: true, + }, + CERTIFICATE: { + Enabled: true, + }, + }, + })); + const jitpTemplate = { + Parameters: { + 'AWS::IoT::Certificate::CommonName': { + Type: 'String', + }, + 'AWS::IoT::Certificate::Id': { + Type: 'String', + }, + }, + Resources: { + thing: { + Type: 'AWS::IoT::Thing', + Properties: { + ThingName: { + Ref: 'AWS::IoT::Certificate::CommonName', + }, + ThingGroups: [stackOutput === null || stackOutput === void 0 ? void 0 : stackOutput.thingGroupName], + }, + }, + cert: { + Type: 'AWS::IoT::Certificate', + Properties: { + CertificateId: { + Ref: 'AWS::IoT::Certificate::Id', + }, + Status: 'ACTIVE', + }, + }, + }, + }; + if (args.attributes !== undefined) { + jitpTemplate.Resources.thing.Properties.AttributePayload = args.attributes; + } + const res = await iot.send(new client_iot_1.RegisterCACertificateCommand({ + caCertificate, + verificationCertificate, + allowAutoRegistration: true, + setAsActive: true, + registrationConfig: { + templateBody: JSON.stringify(jitpTemplate), + roleArn: stackOutput === null || stackOutput === void 0 ? void 0 : stackOutput.jitpRoleArn, + }, + })); + if ((res === null || res === void 0 ? void 0 : res.certificateId) === undefined) { + throw new Error('Failed to register CA!'); + } + await fs_1.promises.writeFile(caFiles.id, res.certificateId, 'utf-8'); + log(`Registered CA and enabled auto-registration to group ${stackOutput === null || stackOutput === void 0 ? void 0 : stackOutput.thingGroupName}`); + return { + certificateId: res.certificateId, + }; +}; +exports.createCA = createCA; + + +/***/ }), + +/***/ 57311: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDeviceCertificate = void 0; +const os = __nccwpck_require__(12087); +const fs_1 = __nccwpck_require__(35747); +const caFileLocations_1 = __nccwpck_require__(92190); +const deviceFileLocations_1 = __nccwpck_require__(91630); +const run_1 = __nccwpck_require__(36532); +const createDeviceCertificate = async ({ certsDir, log, debug, deviceId, awsIotRootCA, mqttEndpoint, }) => { + try { + await fs_1.promises.stat(certsDir); + } + catch { + throw new Error(`${certsDir} does not exist.`); + } + log === null || log === void 0 ? void 0 : log(`Generating certificate for device ${deviceId}`); + const caFiles = caFileLocations_1.caFileLocations(certsDir); + const deviceFiles = deviceFileLocations_1.deviceFileLocations({ + certsDir, + deviceId, + }); + await run_1.run({ + command: 'openssl', + args: [ + 'ecparam', + '-out', + deviceFiles.key, + '-name', + 'prime256v1', + '-genkey', + ], + log: debug, + }); + await run_1.run({ + command: 'openssl', + args: [ + 'req', + '-new', + '-key', + deviceFiles.key, + '-out', + deviceFiles.csr, + '-subj', + `/CN=${deviceId}`, + ], + log: debug, + }); + await run_1.run({ + command: 'openssl', + args: [ + 'x509', + '-req', + '-in', + deviceFiles.csr, + '-CAkey', + caFiles.key, + '-CA', + caFiles.cert, + '-CAcreateserial', + '-out', + deviceFiles.cert, + '-days', + '10950', + '-sha256', + ], + log: debug, + }); + const certWithCa = (await Promise.all([ + fs_1.promises.readFile(deviceFiles.cert), + fs_1.promises.readFile(caFiles.cert), + ])).join(os.EOL); + await fs_1.promises.writeFile(deviceFiles.certWithCA, certWithCa, 'utf-8'); + await fs_1.promises.writeFile(deviceFiles.json, JSON.stringify({ + caCert: awsIotRootCA, + clientCert: certWithCa, + privateKey: await fs_1.promises.readFile(deviceFiles.key, 'utf-8'), + clientId: deviceId, + brokerHostname: mqttEndpoint, + }, null, 2), 'utf-8'); + return { deviceId }; +}; +exports.createDeviceCertificate = createDeviceCertificate; + + +/***/ }), + +/***/ 91630: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deviceFileLocations = void 0; +const path = __nccwpck_require__(85622); +const deviceFileLocations = ({ certsDir, deviceId, }) => ({ + key: path.resolve(certsDir, `device-${deviceId}.key`), + csr: path.resolve(certsDir, `device-${deviceId}.csr`), + cert: path.resolve(certsDir, `device-${deviceId}.pem`), + certWithCA: path.resolve(certsDir, `device-${deviceId}.bundle.pem`), + json: path.resolve(certsDir, `device-${deviceId}.json`), +}); +exports.deviceFileLocations = deviceFileLocations; + + +/***/ }), + +/***/ 36532: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.run = void 0; +const child_process_1 = __nccwpck_require__(63129); +const os = __nccwpck_require__(12087); +const run = async (args) => new Promise((resolve, reject) => { + var _a, _b; + (_a = args === null || args === void 0 ? void 0 : args.log) === null || _a === void 0 ? void 0 : _a.call(args, `${args.command} ${(_b = args.args) === null || _b === void 0 ? void 0 : _b.join(' ')}`); + const p = child_process_1.spawn(args.command, args.args); + const result = []; + const errors = []; + if (args.input !== undefined) { + p.stdin.write(args.input); + } + p.on('close', (code) => { + var _a; + if (code !== 0) { + return reject(new Error(`${args.command} ${(_a = args.args) === null || _a === void 0 ? void 0 : _a.join(' ')} failed: ${errors.join(os.EOL)}`)); + } + return resolve(result.join(os.EOL)); + }); + p.stdout.on('data', (data) => { + result.push(data); + }); + p.stderr.on('data', (data) => { + errors.push(data); + }); +}); +exports.run = run; + + +/***/ }), + +/***/ 49041: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + 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]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(92190), exports); +__exportStar(__nccwpck_require__(35639), exports); +__exportStar(__nccwpck_require__(67475), exports); +__exportStar(__nccwpck_require__(91630), exports); +__exportStar(__nccwpck_require__(57311), exports); +__exportStar(__nccwpck_require__(196), exports); + + +/***/ }), + +/***/ 50377: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.bifravstStepRunners = void 0; +const e2e_bdd_test_runner_1 = __nccwpck_require__(27702); +const random_words_1 = __nccwpck_require__(99800); +const createDeviceCertificate_1 = __nccwpck_require__(57311); +const aws_iot_device_sdk_1 = __nccwpck_require__(92); +const deviceFileLocations_1 = __nccwpck_require__(91630); +const chai_1 = __nccwpck_require__(80630); +const isNullOrUndefined_1 = __nccwpck_require__(65626); +const fs_1 = __nccwpck_require__(35747); +const connect = ({ mqttEndpoint, certsDir, awsIotRootCA, }) => (clientId) => { + const deviceFiles = deviceFileLocations_1.deviceFileLocations({ + certsDir, + deviceId: clientId, + }); + const { privateKey, clientCert } = JSON.parse(fs_1.readFileSync(deviceFiles.json, 'utf-8')); + return new aws_iot_device_sdk_1.device({ + privateKey: Buffer.from(privateKey), + clientCert: Buffer.from(clientCert), + caCert: Buffer.from(awsIotRootCA), + clientId, + host: mqttEndpoint, + region: mqttEndpoint.split('.')[2], + }); +}; +const shadow = ({ mqttEndpoint, certsDir, awsIotRootCA, }) => (clientId) => { + const deviceFiles = deviceFileLocations_1.deviceFileLocations({ + certsDir, + deviceId: clientId, + }); + const { privateKey, clientCert } = JSON.parse(fs_1.readFileSync(deviceFiles.json, 'utf-8')); + return new aws_iot_device_sdk_1.thingShadow({ + privateKey: Buffer.from(privateKey), + clientCert: Buffer.from(clientCert), + caCert: Buffer.from(awsIotRootCA), + clientId, + host: mqttEndpoint, + region: mqttEndpoint.split('.')[2], + }); +}; +const bifravstStepRunners = ({ mqttEndpoint, certsDir, awsIotRootCA, }) => { + const connectToBroker = connect({ + mqttEndpoint, + certsDir, + awsIotRootCA, + }); + const shadowOnBroker = shadow({ + mqttEndpoint, + certsDir, + awsIotRootCA, + }); + return [ + e2e_bdd_test_runner_1.regexMatcher(/^(?:a cat exists|I generate a certificate)(?: for the cat tracker "([^"]+)")?$/)(async ([deviceId], __, runner) => { + const catId = deviceId !== null && deviceId !== void 0 ? deviceId : (await random_words_1.randomWords({ numWords: 3 })).join('-'); + const prefix = deviceId === undefined ? 'cat' : `cat:${catId}`; + if (runner.store[`${prefix}:id`] === undefined) { + await createDeviceCertificate_1.createDeviceCertificate({ + deviceId: catId, + certsDir, + mqttEndpoint, + awsIotRootCA, + log: (...message) => { + runner.progress('IoT (cert)', ...message); + }, + debug: (...message) => { + runner.progress('IoT (cert)', ...message); + }, + }); + const deviceFiles = deviceFileLocations_1.deviceFileLocations({ + certsDir, + deviceId: catId, + }); + const { privateKey, clientCert } = JSON.parse(fs_1.readFileSync(deviceFiles.json, 'utf-8')); + runner.store[`${prefix}:privateKey`] = privateKey; + runner.store[`${prefix}:clientCert`] = clientCert; + runner.store[`${prefix}:id`] = catId; + runner.store[`${prefix}:arn`] = `arn:aws:iot:${mqttEndpoint.split('.')[2]}:${runner.world.accountId}:thing/${catId}`; + } + return runner.store[`${prefix}:id`]; + }), + e2e_bdd_test_runner_1.regexMatcher(/^I connect the cat tracker(?: ([^ ]+))?$/)(async ([deviceId], __, runner) => { + const catId = deviceId !== null && deviceId !== void 0 ? deviceId : runner.store['cat:id']; + await runner.progress('IoT', catId); + const deviceFiles = deviceFileLocations_1.deviceFileLocations({ + certsDir, + deviceId: catId, + }); + await runner.progress('IoT', `Connecting ${catId} to ${mqttEndpoint}`); + return new Promise((resolve, reject) => { + const timeout = setTimeout(reject, 60 * 1000); + const { privateKey, clientCert } = JSON.parse(fs_1.readFileSync(deviceFiles.json, 'utf-8')); + const connection = new aws_iot_device_sdk_1.thingShadow({ + privateKey: Buffer.from(privateKey), + clientCert: Buffer.from(clientCert), + caCert: Buffer.from(awsIotRootCA), + clientId: catId, + host: mqttEndpoint, + region: mqttEndpoint.split('.')[2], + }); + connection.on('connect', () => { + clearTimeout(timeout); + resolve([catId, mqttEndpoint]); + connection.end(); + }); + connection.on('error', () => { + clearTimeout(timeout); + reject(); + connection.end(); + }); + }); + }), + e2e_bdd_test_runner_1.regexMatcher(/^the cat tracker(?: ([^ ]+))? updates its reported state with$/)(async ([deviceId], step, runner) => { + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const reported = JSON.parse(step.interpolatedArgument); + const catId = deviceId !== null && deviceId !== void 0 ? deviceId : runner.store['cat:id']; + const connection = shadowOnBroker(catId); + const updatePromise = await new Promise((resolve, reject) => { + const timeout = setTimeout(reject, 10 * 1000); + connection.on('status', async (_thingName, stat, _clientToken, stateObject) => { + await runner.progress('IoT < status', stat); + await runner.progress('IoT < status', JSON.stringify(stateObject)); + if (stat === 'accepted') { + clearTimeout(timeout); + resolve(stateObject); + connection.end(); + } + }); + connection.on('error', (err) => { + console.error(err); + clearTimeout(timeout); + reject(err); + connection.end(); + }); + connection.register(catId, {}, async () => { + await runner.progress('IoT > reported', catId); + await runner.progress('IoT > reported', JSON.stringify(reported)); + connection.update(catId, { state: { reported } }); + }); + }); + return await updatePromise; + }), + e2e_bdd_test_runner_1.regexMatcher(/^the cat tracker(?: ([^ ]+))? publishes this message to the topic ([^ ]+)$/)(async ([deviceId, topic], step, runner) => { + const catId = deviceId !== null && deviceId !== void 0 ? deviceId : runner.store['cat:id']; + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const message = JSON.parse(step.interpolatedArgument); + const connection = connectToBroker(catId); + const publishPromise = new Promise((resolve, reject) => { + const timeout = setTimeout(reject, 10 * 1000); + connection.on('error', (err) => { + clearTimeout(timeout); + reject(err); + }); + connection.publish(topic, JSON.stringify(message), undefined, (err) => { + if (isNullOrUndefined_1.isNotNullOrUndefined(err)) { + return reject(err); + } + clearTimeout(timeout); + resolve(); + }); + }); + return publishPromise; + }), + e2e_bdd_test_runner_1.regexGroupMatcher(/^the cat tracker(?: (?[^ ]+))? fetches the next job into "(?[^"]+)"$/)(async ({ deviceId, storeName }, _, runner) => { + const catId = deviceId !== null && deviceId !== void 0 ? deviceId : runner.store['cat:id']; + return new Promise((resolve, reject) => { + const timeout = setTimeout(reject, 60 * 1000); + const connection = connectToBroker(catId); + const successTopic = `$aws/things/${catId}/jobs/$next/get/accepted`; + connection.on('connect', () => { + clearTimeout(timeout); + connection.subscribe(successTopic, undefined, (err) => { + if (isNullOrUndefined_1.isNotNullOrUndefined(err)) { + connection.end(); + reject(err); + } + connection.publish(`$aws/things/${catId}/jobs/$next/get`, '', undefined, (err) => { + if (isNullOrUndefined_1.isNotNullOrUndefined(err)) { + connection.end(); + reject(err); + } + }); + }); + connection.on('message', async (topic, message) => { + connection.end(); + await runner.progress('Iot (job)', topic); + await runner.progress('Iot (job)', message); + const { execution } = JSON.parse(message); + if (topic === successTopic && isNullOrUndefined_1.isNotNullOrUndefined(execution)) { + runner.store[storeName] = execution; + resolve(execution); + connection.end(); + } + else { + reject(new Error(`Did not receive a next job!`)); + connection.end(); + } + }); + }); + connection.on('error', (error) => { + clearTimeout(timeout); + reject(error); + connection.end(); + }); + }); + }), + e2e_bdd_test_runner_1.regexGroupMatcher(/^the cat tracker(?: (?[^ ]+))? marks the job in "(?[^"]+)" as in progress$/)(async ({ deviceId, storeName }, _, runner) => { + const catId = deviceId !== null && deviceId !== void 0 ? deviceId : runner.store['cat:id']; + const job = runner.store[storeName]; + chai_1.expect(job).to.not.be.an('undefined'); + return new Promise((resolve, reject) => { + const timeout = setTimeout(reject, 60 * 1000); + const connection = connectToBroker(catId); + connection.on('connect', () => { + clearTimeout(timeout); + connection.subscribe(`$aws/things/${catId}/jobs/${job.jobId}/update/accepted`); + connection.publish(`$aws/things/${catId}/jobs/${job.jobId}/update`, JSON.stringify({ + status: 'IN_PROGRESS', + expectedVersion: job.versionNumber, + executionNumber: job.executionNumber, + }), undefined, (err) => { + if (err) { + connection.end(); + reject(err); + } + }); + }); + connection.on('message', async (topic, payload) => { + await runner.progress('Iot (job)', topic); + await runner.progress('Iot (job)', payload); + connection.end(); + resolve(); + }); + connection.on('error', (error) => { + clearTimeout(timeout); + reject(error); + connection.end(); + }); + }); + }), + ]; +}; +exports.bifravstStepRunners = bifravstStepRunners; + + +/***/ }), + +/***/ 36048: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.firmwareCIStepRunners = void 0; +const e2e_bdd_test_runner_1 = __nccwpck_require__(27702); +const createDevice_1 = __nccwpck_require__(67630); +const deleteDevice_1 = __nccwpck_require__(71352); +const firmwareCIStepRunners = ({ mqttEndpoint, certsDir, iot, }) => { + return [ + e2e_bdd_test_runner_1.regexMatcher(/^I create a firmware CI device as "([^"]+)"$/)(async ([storageName], __, runner) => { + const { thingName, thingArn } = await createDevice_1.createDevice({ + endpoint: mqttEndpoint, + certsDir, + iot, + thingGroupName: runner.world['firmwareCI:thingGroupName'], + attributes: { + test: 'e2e', + }, + }); + runner.store[`${storageName}:name`] = thingName; + runner.store[`${storageName}:arn`] = thingArn; + return thingName; + }), + e2e_bdd_test_runner_1.regexMatcher(/^I delete the firmware CI device "([^"]+)"$/)(async ([storageName], __, runner) => { + return deleteDevice_1.deleteDevice({ + thingName: runner.store[`${storageName}:name`], + certsDir, + iot, + thingGroupName: runner.world['firmwareCI:thingGroupName'], + }); + }), + ]; +}; +exports.firmwareCIStepRunners = firmwareCIStepRunners; + + +/***/ }), + +/***/ 196: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + 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]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(50377), exports); +__exportStar(__nccwpck_require__(36048), exports); + + +/***/ }), + +/***/ 65626: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isNotNullOrUndefined = exports.isNullOrUndefined = void 0; +const isNullOrUndefined = (arg) => arg === undefined || arg === null; +exports.isNullOrUndefined = isNullOrUndefined; +const isNotNullOrUndefined = (arg) => !exports.isNullOrUndefined(arg); +exports.isNotNullOrUndefined = isNotNullOrUndefined; + + +/***/ }), + +/***/ 62222: +/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); + +// EXPORTS +__nccwpck_require__.d(__webpack_exports__, { + "NIL": () => /* reexport */ nil, + "parse": () => /* reexport */ esm_node_parse, + "stringify": () => /* reexport */ esm_node_stringify, + "v1": () => /* reexport */ esm_node_v1, + "v3": () => /* reexport */ esm_node_v3, + "v4": () => /* reexport */ esm_node_v4, + "v5": () => /* reexport */ esm_node_v5, + "validate": () => /* reexport */ esm_node_validate, + "version": () => /* reexport */ esm_node_version +}); + +// EXTERNAL MODULE: external "crypto" +var external_crypto_ = __nccwpck_require__(76417); +var external_crypto_default = /*#__PURE__*/__nccwpck_require__.n(external_crypto_); + +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/rng.js + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + external_crypto_default().randomFillSync(rnds8Pool); + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/regex.js +/* harmony default export */ const regex = (/^(?:[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); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/validate.js + + +function validate(uuid) { + return typeof uuid === 'string' && regex.test(uuid); +} + +/* harmony default export */ const esm_node_validate = (validate); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/stringify.js + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +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 (!esm_node_validate(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +/* harmony default export */ const esm_node_stringify = (stringify); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/v1.js + + // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || esm_node_stringify(b); +} + +/* harmony default export */ const esm_node_v1 = (v1); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/parse.js + + +function parse(uuid) { + if (!esm_node_validate(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; +} + +/* harmony default export */ const esm_node_parse = (parse); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/v35.js + + + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +/* harmony default export */ function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = esm_node_parse(namespace); + } + + 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])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return esm_node_stringify(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/md5.js + + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return external_crypto_default().createHash('md5').update(bytes).digest(); +} + +/* harmony default export */ const esm_node_md5 = (md5); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/v3.js + + +const v3 = v35('v3', 0x30, esm_node_md5); +/* harmony default export */ const esm_node_v3 = (v3); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/v4.js + + + +function v4(options, buf, offset) { + options = options || {}; + const 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) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return esm_node_stringify(rnds); +} + +/* harmony default export */ const esm_node_v4 = (v4); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/sha1.js + + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return external_crypto_default().createHash('sha1').update(bytes).digest(); +} + +/* harmony default export */ const esm_node_sha1 = (sha1); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/v5.js + + +const v5 = v35('v5', 0x50, esm_node_sha1); +/* harmony default export */ const esm_node_v5 = (v5); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/nil.js +/* harmony default export */ const nil = ('00000000-0000-0000-0000-000000000000'); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/version.js + + +function version(uuid) { + if (!esm_node_validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +/* harmony default export */ const esm_node_version = (version); +// CONCATENATED MODULE: ./node_modules/@bifravst/aws/node_modules/uuid/dist/esm-node/index.js + + + + + + + + + + +/***/ }), + +/***/ 27702: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + 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]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.replaceStoragePlaceholders = void 0; +__exportStar(__nccwpck_require__(36529), exports); +__exportStar(__nccwpck_require__(71899), exports); +__exportStar(__nccwpck_require__(14805), exports); +__exportStar(__nccwpck_require__(43006), exports); +__exportStar(__nccwpck_require__(17755), exports); +__exportStar(__nccwpck_require__(495), exports); +__exportStar(__nccwpck_require__(87466), exports); +__exportStar(__nccwpck_require__(6653), exports); +__exportStar(__nccwpck_require__(52202), exports); +__exportStar(__nccwpck_require__(94414), exports); +__exportStar(__nccwpck_require__(45761), exports); +__exportStar(__nccwpck_require__(2917), exports); +__exportStar(__nccwpck_require__(92960), exports); +__exportStar(__nccwpck_require__(73058), exports); +__exportStar(__nccwpck_require__(20568), exports); +__exportStar(__nccwpck_require__(26306), exports); +__exportStar(__nccwpck_require__(49491), exports); +__exportStar(__nccwpck_require__(20908), exports); +__exportStar(__nccwpck_require__(48704), exports); +__exportStar(__nccwpck_require__(79716), exports); +var replaceStoragePlaceholders_1 = __nccwpck_require__(22043); +Object.defineProperty(exports, "replaceStoragePlaceholders", ({ enumerable: true, get: function () { return replaceStoragePlaceholders_1.replaceStoragePlaceholders; } })); + + +/***/ }), + +/***/ 71899: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GQLSubscription = void 0; +const chai_1 = __nccwpck_require__(80630); +const Websocket = __nccwpck_require__(88867); +const paho_mqtt_1 = __nccwpck_require__(88822); +global.WebSocket = Websocket; +class GQLSubscription { + constructor(selection, url, clientId, topics, runner) { + this.messages = []; + this.subscribers = []; + this.subscriberMessages = {}; + this.notifySubcribers = (result) => { + this.subscribers.forEach(({ id, matches, onMatch }) => { + if (matches(result)) { + if (this.subscriberMessages[id] !== undefined) { + this.subscriberMessages[id] = []; + } + this.subscriberMessages[id].push(result); + onMatch.forEach((fn) => fn(result)); + } + }); + }; + this.addListener = (listenerId, matcher) => { + this.subscribers.push({ + id: listenerId, + matches: (message) => { + try { + chai_1.expect(message).to.containSubset(matcher); + return true; + } + catch (error) { + return false; + } + }, + onMatch: [], + }); + this.messages.forEach((message) => this.notifySubcribers(message)); + }; + this.disconnect = () => { + this.client.disconnect(); + }; + this.listenerMessage = async (listenerId, timeout = 5000) => { + if (Array.isArray(this.subscriberMessages[listenerId]) && + this.subscriberMessages[listenerId].length > 0) { + return this.subscriberMessages[listenerId][this.subscriberMessages[listenerId].length - 1]; + } + let messageListenerId; + return new Promise((resolve, reject) => { + const sub = this.subscribers.find(({ id }) => id === listenerId); + if (!sub) { + throw new Error(`Subscriber for "${listenerId}" not found!`); + } + const timeoutId = setTimeout(() => { + sub.onMatch.splice(messageListenerId, 1); + reject(); + }, timeout); + messageListenerId = sub.onMatch.push((msg) => { + clearTimeout(timeoutId); + resolve(msg); + }); + }); + }; + this.client = new paho_mqtt_1.Client(url, clientId); + this.client.onMessageArrived = (msg) => { + const { data: { [selection]: result }, } = JSON.parse(msg.payloadString); + this.messages.push(result); + void runner.progress(' { + this.client.connect({ + useSSL: false, + mqttVersion: 3, + onSuccess: async () => { + await Promise.all(topics.map((topic) => new Promise((resolve1, reject1) => { + this.client.subscribe(topic, { + onSuccess: resolve1, + onFailure: reject1, + }); + }))); + resolve(this.client); + }, + onFailure: reject, + }); + }); + } +} +exports.GQLSubscription = GQLSubscription; + + +/***/ }), + +/***/ 36529: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AppSyncClient = void 0; +const AppSyncClient = () => ({ + endpoint: '', + operation: '', + selection: '', + response: {}, + variables: {}, + authorization: 'IAM', + subscriptions: {}, + subscriptionQueries: {}, + listenerSubscription: {}, + subscriptionMessages: {}, +}); +exports.AppSyncClient = AppSyncClient; + + +/***/ }), + +/***/ 43006: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseQuery = void 0; +const graphql_1 = __nccwpck_require__(16155); +const parseQuery = (gqlQuery) => { + var _a, _b; + let selection = ''; + let operation = ''; + try { + const op = graphql_1.getOperationAST(graphql_1.parse(gqlQuery), undefined); + operation = (_b = (_a = op === null || op === void 0 ? void 0 : op.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ''; + const selections = op === null || op === void 0 ? void 0 : op.selectionSet.selections; + selection = + (Array.isArray(selections) && + selections.length > 0 && + selections[0].name.value) || + ''; + } + catch (error) { + throw new TypeError(`Invalid GQL query: ${gqlQuery}: "${error.message}"`); + } + return { + selection, + operation, + }; +}; +exports.parseQuery = parseQuery; + + +/***/ }), + +/***/ 86469: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.queryWithApiKey = void 0; +const node_fetch_1 = __nccwpck_require__(80467); +const url_1 = __nccwpck_require__(78835); +const parseQuery_1 = __nccwpck_require__(43006); +const queryWithApiKey = (apiKey, endpoint) => async (gqlQuery, variables) => { + const { selection, operation } = parseQuery_1.parseQuery(gqlQuery); + const query = { + query: gqlQuery, + variables, + }; + const graphQLEndpoint = url_1.parse(endpoint); + const options = { + method: 'POST', + body: JSON.stringify(query), + headers: { + 'Content-Type': 'application/json', + 'x-api-key': apiKey, + }, + }; + const response = await node_fetch_1.default(graphQLEndpoint.href, options); + return { + operation, + selection, + result: await response.json(), + }; +}; +exports.queryWithApiKey = queryWithApiKey; + + +/***/ }), + +/***/ 17755: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.queryWithIAM = void 0; +const signature_v4_1 = __nccwpck_require__(64172); +const protocol_http_1 = __nccwpck_require__(67498); +const node_fetch_1 = __nccwpck_require__(80467); +const url_1 = __nccwpck_require__(78835); +const parseQuery_1 = __nccwpck_require__(43006); +const queryWithIAM = (accessKeyId, secretAccessKey, sessionToken, endpoint) => async (gqlQuery, variables) => { + const credentials = { + accessKeyId, + secretAccessKey, + sessionToken, + }; + const { selection, operation } = parseQuery_1.parseQuery(gqlQuery); + const graphQLEndpoint = url_1.parse(endpoint); + const region = graphQLEndpoint.host.split('.')[2]; + const httpRequest = new protocol_http_1.HttpRequest(((p) => ({ + ...p, + port: p.port !== null ? parseInt(p.port, 10) : undefined, + }))(url_1.parse(endpoint))); + const query = { + query: gqlQuery, + variables, + }; + httpRequest.headers.host = graphQLEndpoint.host; + httpRequest.headers['Content-Type'] = 'application/json'; + httpRequest.method = 'POST'; + httpRequest.region = region; + httpRequest.body = JSON.stringify(query); + const signer = new signature_v4_1.SignatureV4(httpRequest, 'appsync', true); + signer.addAuthorization(credentials, new Date()); + const options = { + method: httpRequest.method, + body: httpRequest.body, + headers: httpRequest.headers, + }; + const response = await node_fetch_1.default(graphQLEndpoint.href, options); + return { + operation, + selection, + result: await response.json(), + }; +}; +exports.queryWithIAM = queryWithIAM; + + +/***/ }), + +/***/ 14805: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.subscribe = void 0; +const GQLSubscription_1 = __nccwpck_require__(71899); +const subscribe = async (runner, subscription, query, variables) => { + const q = subscription.replace(/\n\s*/g, ' '); + await runner.progress('GQL@', `${q}`); + if (variables) { + await runner.progress('GQL@', JSON.stringify(variables)); + } + const { selection, result } = await query(q, variables); + if (result.errors !== undefined) { + throw new Error(`MQTT subscription failed: ${JSON.stringify(result.errors)}`); + } + const { data, extensions } = result; + await runner.progress(' { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ConsoleReporter = void 0; +const runner_1 = __nccwpck_require__(6653); +const chalk = __nccwpck_require__(78818); +const Chai = __nccwpck_require__(80630); +const cucumber_messages_1 = __nccwpck_require__(56106); +class ConsoleReporter { + constructor(config) { + var _a; + this.config = { + ...{ + printResults: false, + printProgress: false, + printProgressTimestamps: false, + printSummary: false, + }, + ...config, + }; + this.console = (_a = config === null || config === void 0 ? void 0 : config.console) !== null && _a !== void 0 ? _a : console; + } + async report(result) { + const featureReporter = reportFeature(this.console); + const scenarioReporter = reportScenario(this.console); + const stepReporter = reportStep(this.console); + const runResultReporter = reportRunResult(this.console); + result.featureResults.forEach((featureResult) => { + featureReporter(featureResult); + featureResult.scenarioResults.forEach((scenarioResult) => { + scenarioReporter(scenarioResult); + scenarioResult.stepResults.forEach((stepResult) => { + stepReporter(stepResult, this.config); + }); + }); + }); + if (this.config.printSummary) { + const summaryReporter = reportSummary(this.console); + summaryReporter(result); + } + runResultReporter(result.success, result.runTime); + if (result.error) { + this.console.error(' ', chalk.red.bold(' 🚨 '), chalk.yellow(result.error.message)); + } + } + async progress(type, info) { + if (!this.config.printProgress) { + return; + } + const i = [' ']; + if (this.config.printProgressTimestamps === true) { + i.push(chalk.grey(`[${new Date().toISOString()}]`)); + } + i.push(chalk.magenta(' ℹ '), chalk.cyan(type)); + if (info !== undefined) { + i.push(chalk.grey(info)); + } + if (this.lastProgress !== undefined) { + i.push(chalk.blue(`⏱ +${Date.now() - this.lastProgress}ms`)); + } + this.lastProgress = Date.now(); + this.console.log(...i); + } +} +exports.ConsoleReporter = ConsoleReporter; +const reportFeature = (console) => (result) => { + console.log(''); + const i = []; + if (result.feature.skip) { + i.push('', chalk.yellow.strikethrough.dim(`${result.feature.name}`), chalk.magenta('↷ (skipped)')); + } + else { + console.log('', chalk.gray('Feature: '), chalk.yellow.bold(`${result.feature.name}`)); + console.log(''); + i.push(result.success ? chalk.green(' 💯') : chalk.red.bold(' ❌')); + if (result.runTime !== undefined) { + i.push(chalk.blue(`⏱ ${result.runTime}ms`)); + } + if (Array.isArray(result.feature.tags) && result.feature.tags.length > 0) { + i.push(...result.feature.tags.map(({ name }) => chalk.blueBright(`${name}`))); + } + } + console.log(...i); +}; +const reportScenario = (console) => (result) => { + console.log(''); + const type = result.scenario instanceof cucumber_messages_1.messages.GherkinDocument.Feature.Background + ? 'Background' + : 'Scenario'; + const i = [chalk.gray(type) + ':']; + if (result.skipped) { + i.push(chalk.magenta(' ↷ '), chalk.magenta('(skipped)')); + if (typeof result.scenario.name === 'string') { + i.push(chalk.gray(result.scenario.name)); + } + } + else { + if (typeof result.scenario.name === 'string') { + i.push(chalk.yellow(result.scenario.name)); + } + if (result.runTime !== undefined) { + i.push(chalk.blue(`⏱ ${result.runTime}ms`)); + } + if (result.tries > 1) { + i.push(chalk.red(`⏱ ${result.tries}x`)); + } + } + console.log('', ...i); + console.log(''); +}; +const reportRunResult = (console) => (success, runTime) => { + console.log(''); + const i = [ + success ? chalk.green(' 💯 ALL PASS 👍 ') : chalk.red.bold(' ❌ FAIL 👎 '), + ]; + if (runTime !== undefined) { + i.push(chalk.blue(`⏱ ${runTime}ms`)); + } + if (success) { + i.push(''); + } + console.log(' ', ...i); + console.log(''); +}; +const reportStep = (console) => (result, config) => { + const i = [' ']; + if (result.skipped) { + i.push(chalk.gray(' ↷ ')); + i.push(chalk.gray(result.step.interpolatedText)); + i.push(chalk.magenta('(skipped)')); + } + else { + if (result.success) { + i.push(chalk.green(' ✔ ')); + i.push(chalk.yellow(result.step.interpolatedText)); + if (result.runTime !== undefined) { + i.push(chalk.blue(`⏱ ${result.runTime}ms`)); + } + } + else { + i.push(chalk.red.bold(' ❌ ')); + i.push(chalk.red.bold(result.step.interpolatedText)); + } + } + console.log(...i); + if (result.step.interpolatedArgument !== undefined) { + console.log(chalk.yellow.dim(' ▶ '), chalk.yellow.dim(result.step.interpolatedArgument.replace(/\n\s*/g, ' ').trimLeft())); + } + if (result.result !== undefined && config.printResults) { + const results = [ + ...(Array.isArray(result.result) ? result.result : [result.result]), + ]; + results.forEach((r) => { + console.log(chalk.cyan(' ◀ '), chalk.cyan(JSON.stringify(r))); + }); + } + if (result.error) { + if (result.error instanceof runner_1.StepRunnerNotDefinedError && + result.error.step.interpolatedText !== result.error.step.text) { + console.log(chalk.grey(' ▶'), chalk.grey(result.error.step.interpolatedText)); + } + console.error(' ', chalk.red.bold(' 🚨 '), chalk.yellow.bold('👆'), chalk.yellow(result.error.message)); + if (result.error instanceof Chai.AssertionError) { + console.log(chalk.green(' Expected:'), JSON.stringify(result.error.expected)); + console.log(chalk.red.bold(' Actual: '), JSON.stringify(result.error.actual)); + } + } +}; +const reportSummary = (console) => (result) => { + const featureReporter = reportFeature(console); + const scenarioReporter = reportScenario(console); + result.featureResults + .filter(({ success }) => !success) + .forEach((featureResult) => { + const failedScenarios = featureResult.scenarioResults.filter(({ success }) => !success); + featureReporter(featureResult); + failedScenarios.forEach(scenarioReporter); + }); + const features = result.featureResults.length; + const skippedFeatures = result.featureResults.reduce((total, { feature }) => total + (feature.skip ? 1 : 0), 0); + const failedFeatures = result.featureResults.reduce((total, { success }) => total + (!success ? 1 : 0), 0); + const scenarios = result.featureResults.reduce((total, { scenarioResults }) => total + scenarioResults.length, 0); + const skippedScenarios = result.featureResults.reduce((total, { scenarioResults }) => total + scenarioResults.filter(({ skipped }) => skipped).length, 0); + const failedScenarios = result.featureResults.reduce((total, { scenarioResults }) => total + scenarioResults.filter(({ success }) => !success).length, 0); + const passedFeatures = features - skippedFeatures - failedFeatures; + const passedScenarioCount = scenarios - skippedScenarios - failedScenarios; + const colorIf = (color, defaultColor = chalk.green) => (cond, n, c = n) => (cond(c) ? color(n) : defaultColor(n)); + const redIf = colorIf(chalk.redBright.bold); + const yellowIf = colorIf(chalk.yellow, chalk.gray); + console.log(''); + console.log('', chalk.gray('Feature Summary: '), redIf((n) => n > 0, failedFeatures), chalk.gray('failed,'), yellowIf((n) => n > 0, skippedFeatures), chalk.gray('skipped,'), redIf((n) => n > 0, passedFeatures, failedFeatures), chalk.gray('passed,'), chalk.gray(`${features} total`)); + console.log('', chalk.gray('Scenario Summary: '), redIf((n) => n > 0, failedScenarios), chalk.gray('failed,'), yellowIf((n) => n > 0, skippedScenarios), chalk.gray('skipped,'), redIf((n) => n > 0, passedScenarioCount, failedScenarios), chalk.gray('passed,'), chalk.gray(`${scenarios} total${skippedFeatures ? ` (for non-skipped features)` : ''}`)); +}; + + +/***/ }), + +/***/ 92960: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 2917: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromDirectory = exports.parseFeatures = void 0; +const runner_1 = __nccwpck_require__(6653); +const TokenScanner_1 = __nccwpck_require__(976); +const AstBuilder_1 = __nccwpck_require__(66431); +const cucumber_messages_1 = __nccwpck_require__(56106); +const Parser_1 = __nccwpck_require__(73332); +const TokenMatcher_1 = __nccwpck_require__(62402); +const toposort = __nccwpck_require__(23889); +const globAsync = __nccwpck_require__(91957); +const util_1 = __nccwpck_require__(31669); +const path = __nccwpck_require__(85622); +const glob = util_1.promisify(globAsync); +const fs_1 = __nccwpck_require__(35747); +const parser = new Parser_1.default(new AstBuilder_1.default(cucumber_messages_1.IdGenerator.uuid())); +const matcher = new TokenMatcher_1.default(); +const parseFeatures = (featureData) => { + const parsedFeatures = featureData.map((d) => { + const scanner = new TokenScanner_1.default(d.toString()); + return parser.parse(scanner, matcher) + .feature; + }); + const sortedByLast = parsedFeatures.sort(({ tags: t1 }) => (t1 || []).find(({ name }) => name === '@Last') ? 1 : -1); + const featureNames = sortedByLast.map(({ name }) => name); + const featureDependencies = sortedByLast.map((feature) => { + var _a; + const bgSteps = (_a = feature.children) === null || _a === void 0 ? void 0 : _a.filter(({ background }) => background).map((bg) => { + var _a, _b; + return ((_b = (_a = bg.background) === null || _a === void 0 ? void 0 : _a.steps) !== null && _b !== void 0 ? _b : []).filter(({ text }) => typeof text === 'string' && runner_1.afterRx.test(text)); + }).flat(); + const runAfter = bgSteps === null || bgSteps === void 0 ? void 0 : bgSteps.map((afterStep) => { + if (afterStep === undefined) + return; + const m = typeof afterStep.text === 'string' && runner_1.afterRx.exec(afterStep.text); + if (!Array.isArray(m)) { + throw new Error(`Failed to find feature in ${afterStep.text}`); + } + if (!featureNames.includes(m[1])) { + throw new Error(`The feature ${m[1]} you want to run after does not exist!`); + } + return m[1]; + }); + if (Array.isArray(runAfter) && runAfter.length > 0) { + return runAfter.map((dep) => [dep, feature.name]); + } + return [[feature.name, undefined]]; + }); + const sortedFeatureNames = toposort(featureDependencies.flat()).filter((feature) => feature); + const dependencies = (f) => sortedFeatures.filter(({ name }) => { + const depNames = featureDependencies + .flat() + .filter(([, fname]) => fname === f.name) + .map(([depName]) => depName); + return depNames.includes(name); + }); + const sortedFeatures = sortedFeatureNames.map((featureName) => parsedFeatures.find(({ name }) => name === featureName)); + const isOnly = (f) => { var _a; return (_a = f === null || f === void 0 ? void 0 : f.tags) === null || _a === void 0 ? void 0 : _a.find(({ name }) => name === '@Only'); }; + const only = parsedFeatures.filter(isOnly); + const onlyNames = only.map(({ name }) => name); + return sortedFeatures.map((f) => { + const { tags, name: featureName } = f; + const skip = (tags !== null && tags !== void 0 ? tags : []).filter(({ name }) => name === '@Skip').length > 0 || + (onlyNames.length && !onlyNames.includes(featureName)); + return { + ...f, + skip: skip === true, + dependsOn: dependencies(f), + }; + }); +}; +exports.parseFeatures = parseFeatures; +const fromDirectory = async (dir) => { + const scan = path.join(path.resolve(dir), '*.feature'); + const featureFiles = await glob(scan); + const features = exports.parseFeatures(featureFiles.map((f) => fs_1.readFileSync(f))); + if (!features.length) { + throw new Error(`No features found in directory ${dir}`); + } + return features; +}; +exports.fromDirectory = fromDirectory; + + +/***/ }), + +/***/ 87466: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.regexGroupMatcher = void 0; +const regexGroupMatcher = (rx) => (stepRunner) => (step) => { + const m = rx.exec(step.interpolatedText); + if (!m || m.groups === undefined) { + return false; + } + return (runner, feature) => stepRunner(m.groups, step, runner, feature); +}; +exports.regexGroupMatcher = regexGroupMatcher; + + +/***/ }), + +/***/ 495: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.regexMatcher = void 0; +const regexMatcher = (rx) => (stepRunner) => (step) => { + const m = rx.exec(step.interpolatedText); + if (!m) { + return false; + } + return (runner, feature) => stepRunner(m.slice(1), step, runner, feature); +}; +exports.regexMatcher = regexMatcher; + + +/***/ }), + +/***/ 22043: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.replaceStoragePlaceholders = void 0; +const runner_1 = __nccwpck_require__(6653); +const replaceStoragePlaceholders = (data) => (text) => { + const interpolated = Object.keys(data).reduce((str, key) => str.replace(new RegExp(`{${key}}`, 'g'), data[key]), text); + const missed = interpolated.match(/\{[\w:]+\}/g); + if (missed !== null && missed.length > 0) { + throw new runner_1.StoreKeyUndefinedError(missed.map((k) => k.slice(1, -1)), data); + } + return interpolated; +}; +exports.replaceStoragePlaceholders = replaceStoragePlaceholders; + + +/***/ }), + +/***/ 45761: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RestClient = void 0; +const querystring = __nccwpck_require__(71191); +const fetchPonyfill = __nccwpck_require__(71566); +const uuid_1 = __nccwpck_require__(10453); +const { fetch } = fetchPonyfill(); +const toQueryString = (obj) => { + if (!Object.keys(obj).length) { + return ''; + } + return '?' + querystring.stringify(obj); +}; +class RestClient { + constructor({ debugLog, errorLog, } = {}) { + this.headers = { + Accept: 'application/json', + }; + this.endpoint = ''; + this.response = { + headers: {}, + statusCode: -1, + body: '', + }; + this.debugLog = debugLog; + this.errorLog = errorLog; + } + async request(method, path, queryString, extraHeaders, body) { + var _a, _b, _c, _d, _e, _f; + const requestId = uuid_1.v4(); + const headers = { + ...this.headers, + ...extraHeaders, + }; + const url = path.startsWith('http') + ? path + : `${this.endpoint.replace(/\/+$/, '')}/${path.replace(/^\/+/, '')}${toQueryString(queryString !== null && queryString !== void 0 ? queryString : {})}`; + const options = { + method, + headers, + body: body !== undefined + ? typeof body !== 'string' + ? JSON.stringify(body) + : body + : undefined, + }; + (_a = this.debugLog) === null || _a === void 0 ? void 0 : _a.call(this, requestId, { + request: { + url, + options, + }, + }); + const res = await fetch(url, options); + const statusCode = res.status; + const h = {}; + res.headers.forEach((v, k) => { + h[k] = v; + }); + const contentType = (_b = res.headers.get('content-type')) !== null && _b !== void 0 ? _b : '', mediaType = contentType.split(';')[0]; + if (!headers.Accept.includes(mediaType)) { + const errorMessage = `The content-type "${contentType}" of the response does not match accepted media-type ${headers.Accept}`; + (_c = this.errorLog) === null || _c === void 0 ? void 0 : _c.call(this, requestId, { + error: errorMessage, + statusCode, + headers: h, + body: await res.text(), + }); + throw new Error(errorMessage); + } + const contentLength = +((_d = res.headers.get('content-length')) !== null && _d !== void 0 ? _d : 0); + if (contentLength > 0 && + /^application\/([^ /]+\+)?json$/.test(mediaType) === false) { + const errorMessage = `The content-type "${contentType}" of the response is not JSON!`; + (_e = this.errorLog) === null || _e === void 0 ? void 0 : _e.call(this, requestId, { + error: errorMessage, + statusCode, + headers: h, + body: await res.text(), + }); + throw new Error(errorMessage); + } + this.response = { + statusCode, + headers: h, + body: contentLength ? await res.json() : undefined, + }; + (_f = this.debugLog) === null || _f === void 0 ? void 0 : _f.call(this, requestId, { + response: { + ...this.response, + }, + }); + return url; + } +} +exports.RestClient = RestClient; + + +/***/ }), + +/***/ 77918: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.retryConfiguration = exports.defaultRetryConfig = void 0; +exports.defaultRetryConfig = { + initialDelay: 1000, + maxDelay: 16000, + failAfter: 5, +}; +const retryConfiguration = (scenario) => { + var _a, _b, _c; + const retryTag = (_a = scenario === null || scenario === void 0 ? void 0 : scenario.tags) === null || _a === void 0 ? void 0 : _a.find((tag) => { var _a; return (_a = tag.name) === null || _a === void 0 ? void 0 : _a.startsWith('@Retry='); }); + if (!retryTag) + return exports.defaultRetryConfig; + return ((_c = (_b = retryTag === null || retryTag === void 0 ? void 0 : retryTag.name) === null || _b === void 0 ? void 0 : _b.split('=')[1].split(',').reduce((settings, config) => { + const [k, v] = config.split(':'); + return { + ...settings, + [k]: parseInt(v, 10), + }; + }, exports.defaultRetryConfig)) !== null && _c !== void 0 ? _c : exports.defaultRetryConfig); +}; +exports.retryConfiguration = retryConfiguration; + + +/***/ }), + +/***/ 6653: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StoreKeyUndefinedError = exports.RetryError = exports.StepRunnerNotDefinedError = exports.FeatureRunner = exports.afterRx = void 0; +const load_features_1 = __nccwpck_require__(2917); +const console_reporter_1 = __nccwpck_require__(94414); +const backoff_1 = __nccwpck_require__(33086); +const cucumber_messages_1 = __nccwpck_require__(56106); +const replaceStoragePlaceholders_1 = __nccwpck_require__(22043); +const retryConfiguration_1 = __nccwpck_require__(77918); +const allSuccess = (r, result) => (result.success ? r : false); +exports.afterRx = /^I am run after the "([^"]+)" feature$/; +class FeatureRunner { + constructor(world, options) { + var _a, _b; + this.stepRunners = []; + this.cleaners = []; + this.world = world; + this.featuresDir = options.dir; + this.reporters = (_a = options.reporters) !== null && _a !== void 0 ? _a : [new console_reporter_1.ConsoleReporter()]; + this.store = (_b = options.store) !== null && _b !== void 0 ? _b : {}; + this.retry = options.retry === undefined ? true : options.retry; + } + addStepRunners(runners) { + this.stepRunners.push(...runners); + return this; + } + cleanup(fn) { + this.cleaners.push(fn); + } + async progress(type, info) { + await Promise.all(this.reporters.map((reporter) => reporter.progress(type, info))); + } + async run() { + const features = await load_features_1.fromDirectory(this.featuresDir); + const startRun = Date.now(); + const featureResults = []; + await features.reduce((promise, feature) => promise.then(async () => { + let skip = false; + if (feature.dependsOn.length) { + const depNames = feature.dependsOn.map(({ name }) => name); + const dependendRuns = featureResults.filter(({ feature: { name } }) => depNames.includes(name)); + skip = !dependendRuns.reduce((allSucceeded, dep) => { + if (!allSucceeded) + return allSucceeded; + return dep.success; + }, true); + } + if (skip) { + featureResults.push({ + feature: { + ...feature, + skip: true, + }, + scenarioResults: [], + success: false, + }); + } + else { + featureResults.push(await this.runFeature(feature)); + } + }), Promise.resolve()); + const result = { + success: featureResults.reduce(allSuccess, true), + runTime: Date.now() - startRun, + featureResults, + store: this.store, + }; + await Promise.all(this.reporters.map((reporter) => reporter.report(result))); + await this.cleaners.reduce((promise, cleaner) => promise.then(async () => cleaner(this).then((res) => this.progress('cleaner', res))), Promise.resolve()); + return result; + } + async runFeature(feature) { + var _a; + await this.progress('feature', `${feature.name}`); + if (feature.skip) { + return { + feature, + success: true, + scenarioResults: [], + }; + } + const startRun = Date.now(); + const scenarioResults = []; + const flightRecorder = { + flags: {}, + settings: {}, + }; + await ((_a = feature === null || feature === void 0 ? void 0 : feature.children) === null || _a === void 0 ? void 0 : _a.reduce((promise, scenario) => promise.then(async () => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + if (scenarioResults.length && + !scenarioResults[scenarioResults.length - 1].success) { + scenarioResults.push({ + success: false, + scenario: scenario, + tries: 0, + stepResults: [], + skipped: true, + retryConfiguration: retryConfiguration_1.retryConfiguration(scenario), + }); + return; + } + if (((_c = (_b = (_a = scenario.scenario) === null || _a === void 0 ? void 0 : _a.examples) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0) > 0) { + const example = (_e = (_d = scenario.scenario) === null || _d === void 0 ? void 0 : _d.examples) === null || _e === void 0 ? void 0 : _e[0]; + if (example) { + const header = (_g = (_f = example.tableHeader) === null || _f === void 0 ? void 0 : _f.cells) === null || _g === void 0 ? void 0 : _g.map(({ value }) => value); + await ((_h = example.tableBody) === null || _h === void 0 ? void 0 : _h.reduce((promise, example) => promise.then(async () => { + var _a, _b, _c, _d; + const values = (_a = example === null || example === void 0 ? void 0 : example.cells) === null || _a === void 0 ? void 0 : _a.map(({ value }) => value); + const replace = (str) => header === null || header === void 0 ? void 0 : header.reduce((str, _, k) => { var _a; return str === null || str === void 0 ? void 0 : str.replace(`<${header[k]}>`, (_a = values === null || values === void 0 ? void 0 : values[k]) !== null && _a !== void 0 ? _a : ''); }, str); + const s = { + keyword: 'Scenario', + name: `${(_b = scenario.scenario) === null || _b === void 0 ? void 0 : _b.name} (${values === null || values === void 0 ? void 0 : values.join(',')})`, + steps: (_d = (_c = scenario.scenario) === null || _c === void 0 ? void 0 : _c.steps) === null || _d === void 0 ? void 0 : _d.map((step) => { + var _a, _b; + return ({ + ...step, + text: replace((_a = step.text) !== null && _a !== void 0 ? _a : ''), + docString: step.docString + ? { + ...step.docString, + content: replace((_b = step.docString.content) !== null && _b !== void 0 ? _b : ''), + } + : undefined, + }); + }), + }; + if (this.retry) { + scenarioResults.push(await this.retryScenario(s, flightRecorder)); + } + else { + scenarioResults.push(await this.runScenario(s, flightRecorder)); + } + }), Promise.resolve())); + } + } + else { + const s = (_j = scenario.scenario) !== null && _j !== void 0 ? _j : scenario.background; + if (s) { + if (this.retry) { + scenarioResults.push(await this.retryScenario(s, flightRecorder)); + } + else { + scenarioResults.push(await this.runScenario(s, flightRecorder)); + } + } + } + }), Promise.resolve())); + return { + success: scenarioResults.reduce(allSuccess, true), + runTime: Date.now() - startRun, + feature, + scenarioResults, + }; + } + async retryScenario(scenario, feature) { + return new Promise(async (resolve) => { + let lastResult = await this.runScenario(scenario, feature); + if (lastResult.success) { + return resolve(lastResult); + } + const cfg = retryConfiguration_1.retryConfiguration(scenario); + const b = backoff_1.exponential({ + randomisationFactor: 0, + initialDelay: cfg.initialDelay, + maxDelay: cfg.maxDelay, + }); + b.failAfter(cfg.failAfter); + b.on('ready', async (num) => { + const r = await this.runScenario(scenario, feature); + lastResult = { + ...r, + tries: num + 1, + }; + if (lastResult.success) { + return resolve(lastResult); + } + await this.progress('retry', `${scenario.name}`); + b.backoff(); + }); + b.on('fail', () => { + resolve(lastResult); + }); + b.backoff(); + }); + } + async runScenario(scenario, feature) { + var _a; + await this.progress(scenario instanceof cucumber_messages_1.messages.GherkinDocument.Feature.Background + ? 'background' + : 'scenario', `${scenario.name}`); + const startRun = Date.now(); + const stepResults = []; + let abort = false; + await ((_a = scenario === null || scenario === void 0 ? void 0 : scenario.steps) === null || _a === void 0 ? void 0 : _a.reduce((promise, step) => promise + .then(async () => { + if (abort) { + stepResults.push({ + skipped: true, + success: false, + step: { + ...step, + interpolatedText: `${step.text}`, + }, + }); + } + else { + stepResults.push(await this.runStep(step, feature)); + } + }) + .catch(async (error) => { + await this.progress('step error', error); + stepResults.push({ + success: false, + step: { + ...step, + interpolatedText: `${step.text}`, + }, + error, + skipped: false, + }); + abort = true; + }), Promise.resolve())); + return { + success: stepResults.reduce(allSuccess, true), + runTime: Date.now() - startRun, + scenario, + stepResults, + tries: 1, + skipped: false, + retryConfiguration: retryConfiguration_1.retryConfiguration(scenario), + }; + } + async runStep(step, feature) { + await this.progress('step', `${step.text}`); + const r = replaceStoragePlaceholders_1.replaceStoragePlaceholders({ + ...this.world, + ...this.store, + }); + const interpolatedStep = { + ...step, + interpolatedText: r(`${step.text}`), + interpolatedArgument: step.docString + ? r(`${step.docString.content}`) + : undefined, + }; + if (exports.afterRx.test(`${step.text}`)) { + return { + success: true, + step: interpolatedStep, + skipped: false, + }; + } + const matchedRunner = this.stepRunners.reduce((matchedRunner, runner) => { + if (matchedRunner) { + return matchedRunner; + } + const r = runner(interpolatedStep); + if (r !== false) { + return r; + } + return undefined; + }, undefined); + if (!matchedRunner) { + throw new StepRunnerNotDefinedError(interpolatedStep); + } + const startRun = Date.now(); + const result = await matchedRunner(this, feature); + return { + success: true, + runTime: Date.now() - startRun, + step: interpolatedStep, + result, + skipped: false, + }; + } +} +exports.FeatureRunner = FeatureRunner; +class StepRunnerNotDefinedError extends Error { + constructor(step) { + super('No runner defined for this step!'); + this.step = step; + this.name = StepRunnerNotDefinedError.name; + Error.captureStackTrace(this, StepRunnerNotDefinedError); + Object.setPrototypeOf(this, StepRunnerNotDefinedError.prototype); + } +} +exports.StepRunnerNotDefinedError = StepRunnerNotDefinedError; +class RetryError extends Error { + constructor(step) { + super('Retrying step failed!'); + this.step = step; + this.name = RetryError.name; + Error.captureStackTrace(this, RetryError); + Object.setPrototypeOf(this, RetryError.prototype); + } +} +exports.RetryError = RetryError; +class StoreKeyUndefinedError extends Error { + constructor(keys, store) { + super(`"${keys.join('"')}" is not defined in the store!`); + this.keys = keys; + this.store = store; + this.name = StoreKeyUndefinedError.name; + Error.captureStackTrace(this, StoreKeyUndefinedError); + Object.setPrototypeOf(this, StoreKeyUndefinedError.prototype); + } +} +exports.StoreKeyUndefinedError = StoreKeyUndefinedError; + + +/***/ }), + +/***/ 52202: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.WebhookReceiver = void 0; +const client_sqs_1 = __nccwpck_require__(83062); +class WebhookReceiver { + constructor({ queueUrl }) { + this.queueUrl = queueUrl; + this.sqs = new client_sqs_1.SQSClient({}); + } + async receiveWebhookRequest(MessageGroupId, runner) { + const { Messages } = await this.sqs.send(new client_sqs_1.ReceiveMessageCommand({ + QueueUrl: this.queueUrl, + MaxNumberOfMessages: 1, + MessageAttributeNames: ['All'], + AttributeNames: ['MessageGroupId'], + WaitTimeSeconds: 20, + })); + if (Messages === undefined || !Messages.length) { + throw new Error('No webhook request received!'); + } + const { Body, MessageAttributes, ReceiptHandle, Attributes } = Messages[0]; + await this.sqs.send(new client_sqs_1.DeleteMessageCommand({ + QueueUrl: this.queueUrl, + ReceiptHandle: ReceiptHandle, + })); + if (Attributes === undefined || MessageAttributes === undefined) + throw new Error(`No attributes defined in Message "${JSON.stringify(Messages[0])}"!`); + const attrs = MessageAttributes; + const { MessageGroupId: RcvdMessageGroupId } = Attributes; + this.latestWebhookRequest = { + headers: Object.keys(attrs !== null && attrs !== void 0 ? attrs : {}).reduce((hdrs, key) => { + hdrs[key] = attrs[key].StringValue; + return hdrs; + }, {}), + body: JSON.parse(Body), + }; + await runner.progress(`Webhook < ${RcvdMessageGroupId}`, JSON.stringify(this.latestWebhookRequest.body)); + if (RcvdMessageGroupId !== MessageGroupId) { + throw new Error(`Wrong webhook request received! Expected "${MessageGroupId}", got "${RcvdMessageGroupId}"`); + } + return this.latestWebhookRequest; + } + async clearQueue() { + const { Messages } = await this.sqs.send(new client_sqs_1.ReceiveMessageCommand({ + QueueUrl: this.queueUrl, + MaxNumberOfMessages: 10, + WaitTimeSeconds: 0, + })); + if (Messages !== undefined) { + await Promise.all(Messages.map(async ({ ReceiptHandle }) => this.sqs.send(new client_sqs_1.DeleteMessageCommand({ + QueueUrl: this.queueUrl, + ReceiptHandle: ReceiptHandle, + })))); + await this.clearQueue(); + this.latestWebhookRequest = undefined; + } + } +} +exports.WebhookReceiver = WebhookReceiver; + + +/***/ }), + +/***/ 26306: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.appSyncStepRunners = exports.appSyncAfterAll = exports.appSyncBeforeAll = void 0; +const regexMatcher_1 = __nccwpck_require__(495); +const chai = __nccwpck_require__(80630); +const chai_1 = __nccwpck_require__(80630); +const jsonata = __nccwpck_require__(44245); +const appSyncClient_1 = __nccwpck_require__(36529); +const queryWithIAM_1 = __nccwpck_require__(17755); +const subscribe_1 = __nccwpck_require__(14805); +const queryWithApiKey_1 = __nccwpck_require__(86469); +const chaiSubset = __nccwpck_require__(43370); +chai.use(chaiSubset); +const appSyncBeforeAll = async (runner) => { + runner.store.appSyncClient = appSyncClient_1.AppSyncClient(); + return runner.store.appSyncClient; +}; +exports.appSyncBeforeAll = appSyncBeforeAll; +const appSyncAfterAll = async (runner) => { + Object.keys(runner.store.appSyncClient.subscriptions).forEach((id) => runner.store.appSyncClient.subscriptions[id].disconnect()); +}; +exports.appSyncAfterAll = appSyncAfterAll; +const getAppSyncQuery = (store, client, userId) => { + if (client.authorization === 'API_KEY') { + if (userId !== undefined) { + throw new Error('API_KEY authorization does not support user argument!'); + } + return queryWithApiKey_1.queryWithApiKey(client.apiKey, client.endpoint); + } + else { + const prefix = userId !== undefined ? `cognito:${userId}` : `cognito`; + const { [`${prefix}:AccessKeyId`]: AccessKeyId, [`${prefix}:SecretKey`]: SecretKey, [`${prefix}:SessionToken`]: SessionToken, } = store; + return queryWithIAM_1.queryWithIAM(AccessKeyId, SecretKey, SessionToken, client.endpoint); + } +}; +const appSyncStepRunners = ({ getQuery } = { getQuery: getAppSyncQuery }) => [ + regexMatcher_1.regexMatcher(/^the GQL endpoint is "([^"]+)"$/)(async ([endpoint], _, runner) => { + const { appSyncClient: client } = runner.store; + client.endpoint = endpoint; + }), + regexMatcher_1.regexMatcher(/^I execute this GQL query(?: as "([^"]+)")?$/)(async ([userId], step, runner) => { + const { appSyncClient: client } = runner.store; + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const q = step.interpolatedArgument.replace(/\n\s*/g, ' '); + await runner.progress('GQL>', q); + const query = getQuery(runner.store, client, userId); + const { result, operation, selection } = await query(q, client.variables); + client.variables = {}; + client.response = result; + client.operation = operation; + client.selection = selection; + await runner.progress(' { + const { appSyncClient: client } = runner.store; + chai_1.expect(client.response).to.not.have.property('errors'); + }), + regexMatcher_1.regexMatcher(/^the GQL query result should contain this error$/)(async (_, step, runner) => { + const { appSyncClient: client } = runner.store; + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + chai_1.expect(client.response).to.have.property('errors'); + chai_1.expect(client.response.errors).to.containSubset([ + JSON.parse(step.interpolatedArgument), + ]); + }), + regexMatcher_1.regexMatcher(/^(?:"([^"]+)" of )?the GQL response should (equal|match) this JSON$/)(async ([exp, equalOrMatch], step, runner) => { + const { appSyncClient: client } = runner.store; + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const j = JSON.parse(step.interpolatedArgument); + const result = client.response; + const fragment = exp ? jsonata(exp).evaluate(result) : result; + if (equalOrMatch === 'match') { + chai_1.expect(fragment).to.containSubset(j); + } + else { + chai_1.expect(fragment).to.deep.equal(j); + } + return result; + }), + regexMatcher_1.regexMatcher(/^"([^"]+)" of the GQL response should be (true|false)$/)(async ([exp, expected], _, runner) => { + const { appSyncClient: client } = runner.store; + const e = jsonata(exp); + const v = e.evaluate(client.response); + chai_1.expect(v).to.equal(expected === 'true'); + return v; + }), + regexMatcher_1.regexMatcher(/^"([^"]+)" of the GQL response should contain "([^"]+)"$/)(async ([exp, expected], _, runner) => { + const { appSyncClient: client } = runner.store; + const e = jsonata(exp); + const v = e.evaluate(client.response); + chai_1.expect(v).to.contain(expected); + return v; + }), + regexMatcher_1.regexMatcher(/^I store "([^"]+)" of the GQL response as "([^"]+)"$/)(async ([expression, storeName], _, runner) => { + const { appSyncClient: client } = runner.store; + chai_1.expect(client.response).to.have.property('data'); + chai_1.expect(client.response.data).to.have.property(client.selection); + const e = jsonata(expression); + const result = e.evaluate(client.response); + chai_1.expect(result).to.not.be.an('undefined'); + runner.store[storeName] = result; + return result; + }), + regexMatcher_1.regexMatcher(/^I store (?:"([^"]+)" of )?the GQL operation result as "([^"]+)"$/)(async ([expression, storeName], _, runner) => { + const { appSyncClient: client } = runner.store; + let result = client.response.data[client.selection]; + if (expression) { + const e = jsonata(expression); + result = e.evaluate(result); + } + chai_1.expect(result).to.not.be.an('undefined'); + runner.store[storeName] = result; + return result; + }), + regexMatcher_1.regexMatcher(/^(?:"([^"]+)" of )?the GQL operation result (parsed as JSON )?should (equal|match) this JSON$/)(async ([exp, parseAsJson, equalOrMatch], step, runner) => { + const { appSyncClient: client } = runner.store; + chai_1.expect(client.response).to.have.property('data'); + chai_1.expect(client.response.data).to.have.property(client.selection); + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const j = JSON.parse(step.interpolatedArgument); + const opResult = client.response.data[client.selection]; + let fragment = exp ? jsonata(exp).evaluate(opResult) : opResult; + if (parseAsJson) { + fragment = JSON.parse(fragment); + } + if (equalOrMatch === 'match') { + chai_1.expect(fragment).to.containSubset(j); + } + else { + chai_1.expect(fragment).to.deep.equal(j); + } + return opResult; + }), + regexMatcher_1.regexMatcher(/^(?:"([^"]+)" of )?the GQL operation result should (?:(not) )?equal "([^"]+)"$/)(async ([exp, not, expected], _, runner) => { + const { appSyncClient: client } = runner.store; + chai_1.expect(client.response).to.have.property('data'); + chai_1.expect(client.response.data).to.have.property(client.selection); + const opResult = client.response.data[client.selection]; + const fragment = exp ? jsonata(exp).evaluate(opResult) : opResult; + if (not) { + chai_1.expect(fragment).to.not.equal(expected); + } + else { + chai_1.expect(fragment).to.equal(expected); + } + return opResult; + }), + regexMatcher_1.regexMatcher(/^"([^"]+)" of the GQL operation result should be (true|false|null|undefined)$/)(async ([exp, expected], _, runner) => { + const { appSyncClient: client } = runner.store; + chai_1.expect(client.response).to.have.property('data'); + chai_1.expect(client.response.data).to.have.property(client.selection); + const opResult = client.response.data[client.selection]; + const checks = { + null: (fragment) => chai_1.expect(fragment).to.equal(null), + undefined: (fragment) => chai_1.expect(fragment).to.equal(undefined), + true: (fragment) => chai_1.expect(fragment).to.equal(true), + false: (fragment) => chai_1.expect(fragment).to.equal(false), + }; + checks[expected](jsonata(exp).evaluate(opResult)); + return opResult; + }), + regexMatcher_1.regexMatcher(/^the GQL queries are authenticated with Cognito$/)(async (_, __, runner) => { + const { appSyncClient: client } = runner.store; + client.authorization = 'IAM'; + }), + regexMatcher_1.regexMatcher(/^the GQL queries are authenticated with the API key "([^"]+)"$/)(async ([apiKey], __, runner) => { + const { appSyncClient: client } = runner.store; + client.authorization = 'API_KEY'; + client.apiKey = apiKey; + }), + regexMatcher_1.regexMatcher(/^I set the GQL variable "([^"]+)" to "([^"]+)"$/)(async ([name, value], _, runner) => { + const { appSyncClient: client } = runner.store; + client.variables[name] = value; + }), + regexMatcher_1.regexMatcher(/^I set the GQL variable "([^"]+)" to (the stringified version of )?this JSON$/)(async ([name, stringify], step, runner) => { + const { appSyncClient: client } = runner.store; + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const j = JSON.parse(step.interpolatedArgument); + client.variables[name] = stringify ? JSON.stringify(j) : j; + return client.variables[name]; + }), + regexMatcher_1.regexMatcher(/^I am subscribed to the "([^"]+)" GQL subscription(?: as "([^"]+)")?( with these variables)?$/)(async ([subscriptionId, userId, withVariables], step, runner) => { + const { appSyncClient: client } = runner.store; + let key = subscriptionId; + if (userId) { + key = `${key}:${userId}`; + } + let variables; + if (withVariables) { + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + variables = JSON.parse(step.interpolatedArgument); + } + const query = getQuery(runner.store, client, userId); + client.subscriptions[key] = await subscribe_1.subscribe(runner, client.subscriptionQueries[subscriptionId], query, variables); + }), + regexMatcher_1.regexMatcher(/^I register a "([^"]+)" listener on the "([^"]+)" GQL subscription(?: as "([^"]+)")?( that matches this JSON)?$/)(async ([listener, subscriptionId, userId, matchJSON], step, runner) => { + const { appSyncClient: client } = runner.store; + if (client.listenerSubscription[listener] !== undefined) { + console.warn(`The listener "${listener}" is already registered!`); + } + let key = subscriptionId; + if (userId) { + key = `${key}:${userId}`; + } + if (client.subscriptions[key] === undefined) { + throw new Error(`Subscription "${key}" not found!`); + } + let matcher = {}; + if (matchJSON) { + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + matcher = JSON.parse(step.interpolatedArgument); + } + client.subscriptions[key].addListener(listener, matcher); + client.listenerSubscription[listener] = client.subscriptions[key]; + }), + regexMatcher_1.regexMatcher(/^I should receive a message on the "([^"]+)" GQL subscription listener?$/)(async ([listener], _, runner) => { + const { appSyncClient: client } = runner.store; + if (client.listenerSubscription[listener] === undefined) { + throw new Error(`Listener "${listener}" not found!`); + } + return client.listenerSubscription[listener].listenerMessage(listener); + }), + regexMatcher_1.regexMatcher(/^"([^"]+)" of the last "([^"]+)" GQL subscription listener message should equal "([^"]+)"$/)(async ([exp, subscriptionId, expected], _, runner) => { + const { appSyncClient: client } = runner.store; + const message = client.subscriptionMessages[subscriptionId][client.subscriptionMessages[subscriptionId].length - 1]; + chai_1.expect(jsonata(exp).evaluate(message)).to.equal(expected); + }), +]; +exports.appSyncStepRunners = appSyncStepRunners; + + +/***/ }), + +/***/ 20908: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.awsSdkStepRunners = exports.accessKeyAuthentication = void 0; +const AWS = __nccwpck_require__(71786); +const regexMatcher_1 = __nccwpck_require__(495); +const cognito = __nccwpck_require__(49491); +const regexGroupMatcher_1 = __nccwpck_require__(87466); +exports.accessKeyAuthentication = 'accessKeyAuthentication'; +const awsSdkStepRunners = ({ constructorArgs, }) => [ + regexMatcher_1.regexMatcher(/^I execute "([^"]+)" of the AWS ([^ ]+) SDK( with)?$/)(async ([method, api, withArgs], step, runner, flightRecorder) => { + let argument; + if (withArgs) { + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + try { + argument = JSON.parse(step.interpolatedArgument); + } + catch { + throw new Error(`Failed to parse argument: ${step.interpolatedArgument}`); + } + } + let extraArgs = {}; + const cognitoEnabled = flightRecorder.flags[cognito.cognitoAuthentication]; + const accessKeyAuth = flightRecorder.flags[exports.accessKeyAuthentication]; + if (cognitoEnabled) { + const { secretAccessKey, identityId, accessKeyId, sessionToken, } = flightRecorder.settings[cognito.cognitoAuthentication]; + extraArgs = { + credentials: { + secretAccessKey, + identityId, + accessKeyId, + sessionToken, + }, + }; + await runner.progress(`AWS-SDK.${api}.auth`, extraArgs.credentials.identityId); + } + else if (accessKeyAuth) { + const { secretAccessKey, accessKeyId } = flightRecorder.settings[exports.accessKeyAuthentication]; + extraArgs = { + credentials: { + secretAccessKey, + accessKeyId, + }, + }; + await runner.progress(`AWS-SDK.${api}.auth`, extraArgs.credentials.accessKeyId); + } + const args = { + ...constructorArgs === null || constructorArgs === void 0 ? void 0 : constructorArgs[api], + ...extraArgs, + }; + const a = new AWS[api](args); + await runner.progress(`AWS-SDK.${api}`, `${method}(${argument !== undefined ? JSON.stringify(argument) : ''})`); + const res = await new Promise((resolve, reject) => { + a[method](argument, (err, res) => { + if (err !== undefined && err !== null) + return reject(err); + resolve(res); + }); + }); + runner.store.awsSdk = { + res, + }; + return res; + }), + regexGroupMatcher_1.regexGroupMatcher(/^I am authenticated with AWS key "(?[^"]+)" and secret "(?[^"]+)"$/)(async ({ accessKeyId, secretAccessKey }, _, __, { flags, settings }) => { + flags[exports.accessKeyAuthentication] = true; + settings[exports.accessKeyAuthentication] = { + accessKeyId, + secretAccessKey, + }; + }), +]; +exports.awsSdkStepRunners = awsSdkStepRunners; + + +/***/ }), + +/***/ 49491: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.cognitoStepRunners = exports.cognitoAuthentication = void 0; +const regexMatcher_1 = __nccwpck_require__(495); +const client_cognito_identity_1 = __nccwpck_require__(25949); +const client_cognito_identity_provider_1 = __nccwpck_require__(69508); +const randSeq = () => Math.random() + .toString(36) + .replace(/[^a-z]+/g, ''); +exports.cognitoAuthentication = 'cognitoAuthentication'; +const cognitoStepRunners = ({ developerProviderName, emailAsUsername, }) => { + const ci = new client_cognito_identity_1.CognitoIdentityClient({}); + const cisp = new client_cognito_identity_provider_1.CognitoIdentityProviderClient({}); + return [ + regexMatcher_1.regexMatcher(/^I am authenticated with Cognito(?: as "([^"]+)")?$/)(async ([userId], __, runner, { flags, settings }) => { + flags[exports.cognitoAuthentication] = true; + const prefix = userId ? `cognito:${userId}` : `cognito`; + if (runner.store[`${prefix}:IdentityId`] === undefined) { + const Username = userId ? `${userId}-${randSeq()}` : randSeq(); + const email = `${Username.toLowerCase()}@example.com`; + const cognitoUsername = emailAsUsername === true ? email : Username; + await runner.progress('Cognito', `Registering user ${cognitoUsername}`); + const TemporaryPassword = `${randSeq()}${randSeq().toUpperCase()}${Math.random()}`; + await cisp.send(new client_cognito_identity_provider_1.AdminCreateUserCommand({ + UserPoolId: runner.world.userPoolId, + Username: cognitoUsername, + UserAttributes: [ + { + Name: 'email', + Value: email, + }, + { + Name: 'email_verified', + Value: 'True', + }, + ], + TemporaryPassword, + })); + const newPassword = `${randSeq()}${randSeq().toUpperCase()}${Math.random()}`; + const { Session } = await cisp.send(new client_cognito_identity_provider_1.AdminInitiateAuthCommand({ + AuthFlow: 'ADMIN_NO_SRP_AUTH', + UserPoolId: runner.world.userPoolId, + ClientId: runner.world.userPoolClientId, + AuthParameters: { + USERNAME: cognitoUsername, + PASSWORD: TemporaryPassword, + }, + })); + const { AuthenticationResult } = await cisp.send(new client_cognito_identity_provider_1.AdminRespondToAuthChallengeCommand({ + ChallengeName: 'NEW_PASSWORD_REQUIRED', + UserPoolId: runner.world.userPoolId, + ClientId: runner.world.userPoolClientId, + Session: Session, + ChallengeResponses: { + USERNAME: cognitoUsername, + NEW_PASSWORD: newPassword, + }, + })); + runner.store[`${prefix}:IdToken`] = AuthenticationResult.IdToken; + runner.store[`${prefix}:Username`] = cognitoUsername; + runner.store[userId ? `${userId}:Email` : 'Email'] = email; + const { IdentityId, Token } = await ci.send(new client_cognito_identity_1.GetOpenIdTokenForDeveloperIdentityCommand({ + IdentityPoolId: runner.world.identityPoolId, + Logins: { + [developerProviderName]: runner.store[`${prefix}:Username`], + }, + TokenDuration: 3600, + })); + const { Credentials } = await ci.send(new client_cognito_identity_1.GetCredentialsForIdentityCommand({ + IdentityId: IdentityId, + Logins: { + ['cognito-identity.amazonaws.com']: Token, + }, + })); + runner.store[`${prefix}:IdentityId`] = IdentityId; + runner.store[`${prefix}:Token`] = Token; + runner.store[`${prefix}:AccessKeyId`] = Credentials.AccessKeyId; + runner.store[`${prefix}:SecretKey`] = Credentials.SecretKey; + runner.store[`${prefix}:SessionToken`] = Credentials.SessionToken; + } + settings[exports.cognitoAuthentication] = { + userId: prefix, + accessKeyId: runner.store[`${prefix}:AccessKeyId`], + identityId: runner.store[`${prefix}:IdentityId`], + secretAccessKey: runner.store[`${prefix}:SecretKey`], + sessionToken: runner.store[`${prefix}:SessionToken`], + }; + return [runner.store[`${prefix}:IdentityId`]]; + }), + ]; +}; +exports.cognitoStepRunners = cognitoStepRunners; + + +/***/ }), + +/***/ 48704: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.randomStepRunners = void 0; +const regexGroupMatcher_1 = __nccwpck_require__(87466); +const uuid_1 = __nccwpck_require__(10453); +const randomStepRunners = ({ generators } = { + generators: { UUID: () => uuid_1.v4() }, +}) => [ + regexGroupMatcher_1.regexGroupMatcher(/^I have a random (?[^ ]+) in "(?[^"]+)"$/)(async ({ generatorId, storeName }, _, runner) => { + const generator = generators[generatorId]; + if (generator === undefined) { + throw new Error(`Unknown random string generator "${generatorId}"!`); + } + runner.store[storeName] = generator(); + return runner.store[storeName]; + }), +]; +exports.randomStepRunners = randomStepRunners; + + +/***/ }), + +/***/ 73058: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.restStepRunners = void 0; +const jsonata = __nccwpck_require__(44245); +const chai = __nccwpck_require__(80630); +const rest_client_1 = __nccwpck_require__(45761); +const chai_1 = __nccwpck_require__(80630); +const regexMatcher_1 = __nccwpck_require__(495); +const chaiSubset = __nccwpck_require__(43370); +chai.use(chaiSubset); +const restStepRunners = ({ client } = { client: new rest_client_1.RestClient() }) => [ + regexMatcher_1.regexMatcher(/^the ([^ ]+) header is "([^"]+)"$/)(async ([name, value]) => { + client.headers[name] = value; + }), + regexMatcher_1.regexMatcher(/^the ([^ ]+) header is "([^"]+)"$/)(async ([name, value]) => { + client.headers[name] = value; + }), + regexMatcher_1.regexMatcher(/^the endpoint is "([^"]+)"$/)(async ([endpoint]) => { + client.endpoint = endpoint; + }), + regexMatcher_1.regexMatcher(/^I (GET|PUT|POST|PATCH|DELETE) (?:to )?([^ ]+)$/)(async ([method, path]) => { + return client.request(method, path); + }), + regexMatcher_1.regexMatcher(/^I GET ([^ ]+) with this query$/)(async ([path], step) => { + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const j = JSON.parse(step.interpolatedArgument); + return client.request('GET', path, j); + }), + regexMatcher_1.regexMatcher(/^the response status code should be ([0-9]+)$/)(async ([statusCode]) => { + chai_1.expect(client.response.statusCode).to.equal(+statusCode); + return client.response.statusCode; + }), + regexMatcher_1.regexMatcher(/^the response ([^ ]+) should be "([^"]+)"$/)(async ([name, value]) => { + chai_1.expect(client.response.headers).to.have.property(name.toLowerCase()); + chai_1.expect(client.response.headers[name.toLowerCase()]).to.equal(value); + return client.response.headers[name.toLowerCase()]; + }), + regexMatcher_1.regexMatcher(/^the response should (equal|match) this JSON$/)(async ([equalOrMatch], step) => { + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const j = JSON.parse(step.interpolatedArgument); + if (equalOrMatch === 'match') { + chai_1.expect(client.response.body).to.containSubset(j); + } + else { + chai_1.expect(client.response.body).to.deep.equal(j); + } + return client.response.body; + }), + regexMatcher_1.regexMatcher(/^the response (?:body )should equal this payload$/)(async (_, step) => { + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + chai_1.expect(client.response.body).to.equal(step.interpolatedArgument.trim()); + return client.response.body; + }), + regexMatcher_1.regexMatcher(/^"([^"]+)" of the response body is not empty$/)(async ([exp]) => { + const e = jsonata(exp); + const v = e.evaluate(client.response.body); + chai_1.expect(v).to.not.be.an('undefined'); + return v; + }), + regexMatcher_1.regexMatcher(/^"([^"]+)" of the response body should equal "([^"]+)"$/)(async ([exp, expected]) => { + const e = jsonata(exp); + const v = e.evaluate(client.response.body); + chai_1.expect(v).to.equal(expected); + return v; + }), + regexMatcher_1.regexMatcher(/^"([^"]+)" of the response body should equal ([0-9]+)$/)(async ([exp, expected]) => { + const e = jsonata(exp); + const v = e.evaluate(client.response.body); + chai_1.expect(v).to.equal(+expected); + return v; + }), + regexMatcher_1.regexMatcher(/^"([^"]+)" of the response body should be (true|false)$/)(async ([exp, trueOrFalse]) => { + const e = jsonata(exp); + const v = e.evaluate(client.response.body); + chai_1.expect(v).to.equal(trueOrFalse === 'true'); + return v; + }), + regexMatcher_1.regexMatcher(/^"([^"]+)" of the response body should (equal|match) this JSON$/)(async ([exp, equalOrMatch], step) => { + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const j = JSON.parse(step.interpolatedArgument); + const e = jsonata(exp); + const v = e.evaluate(client.response.body); + if (equalOrMatch === 'match') { + chai_1.expect(v).to.containSubset(j); + } + else { + chai_1.expect(v).to.deep.equal(j); + } + return v; + }), + regexMatcher_1.regexMatcher(/^I (POST|PUT|PATCH) (?:to )?([^ ]+) with this (JSON|payload)$/)(async ([method, path, jsonOrPayload], step) => { + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const payload = jsonOrPayload === 'JSON' + ? JSON.parse(step.interpolatedArgument) + : step.interpolatedArgument; + return [ + await client.request(method, path, undefined, undefined, payload), + payload, + ]; + }), + regexMatcher_1.regexMatcher(/^I store "([^"]+)" of the response body as "([^"]+)"(?: encoded with (encodeURIComponent))?$/)(async ([expression, storeName, encoder], _, runner) => { + const e = jsonata(expression); + const result = e.evaluate(client.response.body); + chai_1.expect(result).to.not.be.an('undefined'); + switch (encoder) { + case 'encodeURIComponent': + runner.store[storeName] = encodeURIComponent(result); + break; + default: + runner.store[storeName] = result; + } + return result; + }), + regexMatcher_1.regexMatcher(/^I store the ([^ ]+) response header as "([^"]+)"$/)(async ([header, storeName], _, runner) => { + chai_1.expect(client.response.headers).to.have.property(header.toLowerCase()); + chai_1.expect(client.response.headers[header.toLowerCase()]).to.have.not.be.an('undefined'); + runner.store[storeName] = client.response.headers[header.toLowerCase()]; + return client.response.headers[header.toLowerCase()]; + }), +]; +exports.restStepRunners = restStepRunners; + + +/***/ }), + +/***/ 79716: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.storageStepRunners = void 0; +const jsonata = __nccwpck_require__(44245); +const chai = __nccwpck_require__(80630); +const chai_1 = __nccwpck_require__(80630); +const regexGroupMatcher_1 = __nccwpck_require__(87466); +const chaiSubset = __nccwpck_require__(43370); +chai.use(chaiSubset); +const storageStepRunners = ({ encoders, decoders, } = { + encoders: { + base64: (s) => Buffer.from(s).toString('base64'), + JSON: (s) => JSON.stringify(JSON.stringify(JSON.parse(s))), + replaceNewLines: (s) => s.replace(/\n/g, '\\n'), + querystring: (s) => Object.entries(s) + .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`) + .join('&'), + }, + decoders: { + base64: (s) => Buffer.from(s, 'base64').toString('ascii'), + }, +}) => [ + regexGroupMatcher_1.regexGroupMatcher(/^"(?[^"]+)" should (?(?:equal|be)|match) (?:(?this JSON)|"(?[^"]+)"|(?[0-9]+)|(?true|false))$/)(async ({ exp, equalOrMatch, jsonMatch, stringMatch, numMatch, boolMatch }, step, runner) => { + let expected; + if (jsonMatch) { + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + expected = JSON.parse(step.interpolatedArgument); + } + else if (stringMatch) { + expected = stringMatch; + } + else if (numMatch) { + expected = parseInt(numMatch, 10); + } + else if (boolMatch) { + expected = boolMatch === 'true'; + } + const fragment = jsonata(exp).evaluate(runner.store); + if (equalOrMatch === 'match') { + chai_1.expect(fragment).to.containSubset(expected); + } + else { + chai_1.expect(fragment).to.deep.equal(expected); + } + return [fragment]; + }), + regexGroupMatcher_1.regexGroupMatcher(/^I parse "(?[^"]+)" into "(?[^"]+)"$/)(async ({ exp, storeName }, _, runner) => { + const e = jsonata(exp); + const result = e.evaluate(runner.store); + chai_1.expect(result).to.not.be.an('undefined'); + runner.store[storeName] = JSON.parse(result); + return runner.store[storeName]; + }), + regexGroupMatcher_1.regexGroupMatcher(/^I store "(?[^"]+)" into "(?[^"]+)"$/)(async ({ exp, storeName }, _, runner) => { + const e = jsonata(exp); + const result = e.evaluate(runner.store); + chai_1.expect(result).to.not.be.an('undefined'); + runner.store[storeName] = result; + return result; + }), + regexGroupMatcher_1.regexGroupMatcher(/^I (?encode|decode) (?:"(?[^"]+)"|this payload) into "(?[^"]+)" using (?[a-zA-Z0-9]+)$/)(async ({ encodeOrDecode, exp, storeName, encoding }, step, runner) => { + let data; + if (exp === undefined) { + if (step.interpolatedArgument === undefined) + throw new Error('Must provide argument!'); + data = step.interpolatedArgument; + } + else { + const e = jsonata(exp); + data = e.evaluate(runner.store); + } + chai_1.expect(data).to.not.be.an('undefined'); + const encoder = encodeOrDecode === 'encode' ? encoders[encoding] : decoders[encoding]; + try { + runner.store[storeName] = encoder(data); + } + catch (err) { + console.error(data); + throw new Error(`Encoding using ${encoding} failed: ${err.message}!`); + } + return [data, runner.store[storeName]]; + }), +]; +exports.storageStepRunners = storageStepRunners; + + +/***/ }), + +/***/ 20568: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.webhookStepRunners = void 0; +const jsonata = __nccwpck_require__(44245); +const chai = __nccwpck_require__(80630); +const chai_1 = __nccwpck_require__(80630); +const regexMatcher_1 = __nccwpck_require__(495); +const webhook_receiver_1 = __nccwpck_require__(52202); +const chaiSubset = __nccwpck_require__(43370); +const regexGroupMatcher_1 = __nccwpck_require__(87466); +chai.use(chaiSubset); +const webhookStepRunners = ({ webhookQueue, }) => { + let r; + return [ + regexMatcher_1.regexMatcher(/^the Webhook Receiver "([^"]+)" should be called$/)(async ([MessageGroupId], _, runner) => r.receiveWebhookRequest(MessageGroupId, runner).then((r) => r.body)), + regexMatcher_1.regexMatcher(/^"([^"]+)" of the webhook request body should equal "([^"]+)"$/)(async ([exp, expected]) => { + var _a; + const e = jsonata(exp); + chai_1.expect(r.latestWebhookRequest).not.to.be.an('undefined'); + const b = (_a = r.latestWebhookRequest) === null || _a === void 0 ? void 0 : _a.body; + chai_1.expect(b).not.to.be.an('undefined'); + const result = e.evaluate(b); + chai_1.expect(result).to.deep.equal(expected); + return b; + }), + regexMatcher_1.regexMatcher(/^the webhook request body should (equal|match) this JSON$/)(async ([equalOrMatch], step) => { + var _a; + if (step.interpolatedArgument === undefined) { + throw new Error('Must provide argument!'); + } + const j = JSON.parse(step.interpolatedArgument); + const b = (_a = r.latestWebhookRequest) === null || _a === void 0 ? void 0 : _a.body; + chai_1.expect(b).not.to.be.an('undefined'); + if (equalOrMatch === 'match') { + chai_1.expect(b).to.containSubset(j); + } + else { + chai_1.expect(b).to.deep.equal(j); + } + return b; + }), + regexMatcher_1.regexMatcher(/^I have a Webhook Receiver/)(async () => { + r = new webhook_receiver_1.WebhookReceiver({ queueUrl: webhookQueue }); + await r.clearQueue(); + }), + regexGroupMatcher_1.regexGroupMatcher(/^I store "(?[^"]+)" of the last webhook request into "(?[^"]+)"$/)(async ({ exp, storeName }, _, runner) => { + const e = jsonata(exp); + const result = e.evaluate(r.latestWebhookRequest); + chai_1.expect(result).to.not.be.an('undefined'); + runner.store[storeName] = result; + return result; + }), + ]; +}; +exports.webhookStepRunners = webhookStepRunners; + + +/***/ }), + +/***/ 10453: +/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); + +// EXPORTS +__nccwpck_require__.d(__webpack_exports__, { + "NIL": () => /* reexport */ nil, + "parse": () => /* reexport */ esm_node_parse, + "stringify": () => /* reexport */ esm_node_stringify, + "v1": () => /* reexport */ esm_node_v1, + "v3": () => /* reexport */ esm_node_v3, + "v4": () => /* reexport */ esm_node_v4, + "v5": () => /* reexport */ esm_node_v5, + "validate": () => /* reexport */ esm_node_validate, + "version": () => /* reexport */ esm_node_version +}); + +// EXTERNAL MODULE: external "crypto" +var external_crypto_ = __nccwpck_require__(76417); +var external_crypto_default = /*#__PURE__*/__nccwpck_require__.n(external_crypto_); + +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/rng.js + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + external_crypto_default().randomFillSync(rnds8Pool); + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/regex.js +/* harmony default export */ const regex = (/^(?:[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); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/validate.js + + +function validate(uuid) { + return typeof uuid === 'string' && regex.test(uuid); +} + +/* harmony default export */ const esm_node_validate = (validate); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/stringify.js + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +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 (!esm_node_validate(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +/* harmony default export */ const esm_node_stringify = (stringify); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/v1.js + + // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || esm_node_stringify(b); +} + +/* harmony default export */ const esm_node_v1 = (v1); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/parse.js + + +function parse(uuid) { + if (!esm_node_validate(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; +} + +/* harmony default export */ const esm_node_parse = (parse); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/v35.js + + + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +/* harmony default export */ function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = esm_node_parse(namespace); + } + + 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])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return esm_node_stringify(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/md5.js + + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return external_crypto_default().createHash('md5').update(bytes).digest(); +} + +/* harmony default export */ const esm_node_md5 = (md5); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/v3.js + + +const v3 = v35('v3', 0x30, esm_node_md5); +/* harmony default export */ const esm_node_v3 = (v3); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/v4.js + + + +function v4(options, buf, offset) { + options = options || {}; + const 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) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return esm_node_stringify(rnds); +} + +/* harmony default export */ const esm_node_v4 = (v4); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/sha1.js + + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return external_crypto_default().createHash('sha1').update(bytes).digest(); +} + +/* harmony default export */ const esm_node_sha1 = (sha1); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/v5.js + + +const v5 = v35('v5', 0x50, esm_node_sha1); +/* harmony default export */ const esm_node_v5 = (v5); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/nil.js +/* harmony default export */ const nil = ('00000000-0000-0000-0000-000000000000'); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/version.js + + +function version(uuid) { + if (!esm_node_validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +/* harmony default export */ const esm_node_version = (version); +// CONCATENATED MODULE: ./node_modules/@bifravst/e2e-bdd-test-runner/node_modules/uuid/dist/esm-node/index.js + + + + + + + + + + +/***/ }), + +/***/ 20849: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + 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]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(96094), exports); + + +/***/ }), + +/***/ 89312: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.cancel = void 0; +const chalk = __nccwpck_require__(78818); +const client_iot_1 = __nccwpck_require__(81222); +const cancel = async ({ iot, jobId, }) => { + await iot.send(new client_iot_1.DeleteJobCommand({ jobId, force: true })); + console.log(chalk.green('Job'), chalk.blueBright(jobId), chalk.green('cancelled.')); + console.log(); +}; +exports.cancel = cancel; + + +/***/ }), + +/***/ 96094: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + 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]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(60098), exports); +__exportStar(__nccwpck_require__(10623), exports); +__exportStar(__nccwpck_require__(58178), exports); +__exportStar(__nccwpck_require__(89312), exports); + + +/***/ }), + +/***/ 60098: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultTimeoutInMinutes = void 0; +exports.defaultTimeoutInMinutes = 2; + + +/***/ }), + +/***/ 10623: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.schedule = void 0; +const uuid_1 = __nccwpck_require__(23487); +const chalk = __nccwpck_require__(78818); +const s3_presigned_post_1 = __nccwpck_require__(42104); +const client_iot_1 = __nccwpck_require__(81222); +const fs_1 = __nccwpck_require__(35747); +const queryString = (s) => Object.entries(s) + .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`) + .join('&'); +const schedule = async ({ firmwareUrl, certificateJSON, target, network, secTag, bucketName, region, s3, ciDeviceArn, jobId, iot, timeoutInMinutes, abortOn, endOn, }) => { + jobId = jobId !== null && jobId !== void 0 ? jobId : uuid_1.v4(); + console.log(''); + const { url, fields } = await s3_presigned_post_1.createPresignedPost(s3, { + Bucket: bucketName, + Key: `${jobId}.json`, + }); + const { caCert, clientCert, privateKey } = JSON.parse(await fs_1.promises.readFile(certificateJSON, 'utf-8')); + const jobDocument = { + reportPublishUrl: `${url}?${queryString(fields)}`, + reportUrl: `https://${bucketName}.s3.${region}.amazonaws.com/${jobId}.json`, + fw: firmwareUrl, + target: `${target}:${network}`, + expires: new Date(Date.now() + 60 * 60 * 1000).toISOString(), + credentials: { + secTag, + privateKey, + clientCert, + caCert, + }, + timeoutInMinutes, + abortOn, + endOn, + }; + await iot.send(new client_iot_1.CreateJobCommand({ + jobId, + targets: [ciDeviceArn], + document: JSON.stringify(jobDocument), + description: `Firmware CI job for a ${target} with ${network}`, + targetSelection: 'SNAPSHOT', + timeoutConfig: { + inProgressTimeoutInMinutes: 60, + }, + })); + console.log(chalk.green('Job'), chalk.blueBright(jobId), chalk.green('created.')); + console.log(); + console.log(chalk.green('You can observe the job execution using:')); + console.log(chalk.greenBright('node cli wait'), chalk.blueBright(jobId)); + return jobDocument; +}; +exports.schedule = schedule; + + +/***/ }), + +/***/ 58178: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.wait = exports.waitDefaultIntervalInSeconds = exports.waitDefaultTimeoutInMinutes = void 0; +const chalk = __nccwpck_require__(78818); +const client_iot_1 = __nccwpck_require__(81222); +const log_1 = __nccwpck_require__(70744); +exports.waitDefaultTimeoutInMinutes = 5; +exports.waitDefaultIntervalInSeconds = 30; +const wait = async ({ iot, timeoutInMinutes, interval, jobId, }) => new Promise((resolve, reject) => { + const t = setTimeout(() => reject(new Error(`Timed out waiting for job ${jobId} to complete.`)), (timeoutInMinutes !== null && timeoutInMinutes !== void 0 ? timeoutInMinutes : exports.waitDefaultTimeoutInMinutes) * 60 * 1000); + let i = undefined; + const cleanUp = () => { + if (i !== undefined) + clearInterval(i); + clearTimeout(t); + }; + const checkJob = async () => { + var _a, _b, _c, _d, _e, _f; + try { + const { job } = await iot.send(new client_iot_1.DescribeJobCommand({ + jobId, + })); + if (job === undefined) { + cleanUp(); + throw new Error(`Job ${jobId} not found.`); + } + if (job.status === 'COMPLETED') { + cleanUp(); + log_1.progress(job.status); + if (((_b = (_a = job.jobProcessDetails) === null || _a === void 0 ? void 0 : _a.numberOfFailedThings) !== null && _b !== void 0 ? _b : 0) > 0) { + log_1.warn(`${(_c = job.jobProcessDetails) === null || _c === void 0 ? void 0 : _c.numberOfFailedThings} failed executions.`); + return reject(new Error(`Job ${jobId} failed!`)); + } + log_1.success(`${(_d = job.jobProcessDetails) === null || _d === void 0 ? void 0 : _d.numberOfFailedThings} failed executions.`); + return resolve({ + job, + jobDocument: JSON.parse((await iot.send(new client_iot_1.GetJobDocumentCommand({ + jobId: job.jobId, + }))).document), + }); + } + else if (job.status === 'DELETION_IN_PROGRESS') { + cleanUp(); + return reject(new Error(`Job ${jobId} is being deleted.`)); + } + else { + log_1.progress(chalk.yellow(job.status), chalk.blueBright((_f = (_e = job.jobProcessDetails) === null || _e === void 0 ? void 0 : _e.numberOfInProgressThings) !== null && _f !== void 0 ? _f : 0), chalk.yellow('things have started the job')); + } + } + catch (err) { + log_1.warn(chalk.red(err.message)); + cleanUp(); + return reject(new Error(`Job ${jobId} not found.`)); + } + }; + void checkJob(); + i = setInterval(checkJob, (interval !== null && interval !== void 0 ? interval : exports.waitDefaultIntervalInSeconds) * 1000); +}); +exports.wait = wait; + + +/***/ }), + +/***/ 70744: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.log = exports.debug = exports.success = exports.progress = exports.warn = void 0; +const chalk = __nccwpck_require__(78818); +const stringify = (a) => (typeof a === 'object' ? JSON.stringify(a) : a); +const warn = (...args) => console.warn(...args.map((arg) => chalk.yellow(stringify(arg)))); +exports.warn = warn; +const progress = (...args) => console.info(...args.map((arg) => chalk.blue(stringify(arg))), chalk.blue.dim('...')); +exports.progress = progress; +const success = (...args) => console.info(...args.map((arg) => chalk.green(stringify(arg)))); +exports.success = success; +const debug = (...args) => console.debug(...args.map((arg) => chalk.magenta(stringify(arg)))); +exports.debug = debug; +const notEmpty = (s) => s !== undefined; +const log = (...prefixes) => ({ + warn: (...args) => exports.warn(...[...prefixes, ...args].filter(notEmpty)), + progress: (...args) => exports.progress(...[...prefixes, ...args].filter(notEmpty)), + success: (...args) => exports.success(...[...prefixes, ...args].filter(notEmpty)), + debug: (...args) => exports.debug(...[...prefixes, ...args].filter(notEmpty)), +}); +exports.log = log; + + +/***/ }), + +/***/ 23487: +/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); + +// EXPORTS +__nccwpck_require__.d(__webpack_exports__, { + "NIL": () => /* reexport */ nil, + "parse": () => /* reexport */ esm_node_parse, + "stringify": () => /* reexport */ esm_node_stringify, + "v1": () => /* reexport */ esm_node_v1, + "v3": () => /* reexport */ esm_node_v3, + "v4": () => /* reexport */ esm_node_v4, + "v5": () => /* reexport */ esm_node_v5, + "validate": () => /* reexport */ esm_node_validate, + "version": () => /* reexport */ esm_node_version +}); + +// EXTERNAL MODULE: external "crypto" +var external_crypto_ = __nccwpck_require__(76417); +var external_crypto_default = /*#__PURE__*/__nccwpck_require__.n(external_crypto_); + +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/rng.js + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + external_crypto_default().randomFillSync(rnds8Pool); + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/regex.js +/* harmony default export */ const regex = (/^(?:[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); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/validate.js + + +function validate(uuid) { + return typeof uuid === 'string' && regex.test(uuid); +} + +/* harmony default export */ const esm_node_validate = (validate); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/stringify.js + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +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 (!esm_node_validate(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +/* harmony default export */ const esm_node_stringify = (stringify); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/v1.js + + // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || esm_node_stringify(b); +} + +/* harmony default export */ const esm_node_v1 = (v1); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/parse.js + + +function parse(uuid) { + if (!esm_node_validate(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; +} + +/* harmony default export */ const esm_node_parse = (parse); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/v35.js + + + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +/* harmony default export */ function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = esm_node_parse(namespace); + } + + 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])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return esm_node_stringify(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/md5.js + + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return external_crypto_default().createHash('md5').update(bytes).digest(); +} + +/* harmony default export */ const esm_node_md5 = (md5); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/v3.js + + +const v3 = v35('v3', 0x30, esm_node_md5); +/* harmony default export */ const esm_node_v3 = (v3); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/v4.js + + + +function v4(options, buf, offset) { + options = options || {}; + const 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) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return esm_node_stringify(rnds); +} + +/* harmony default export */ const esm_node_v4 = (v4); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/sha1.js + + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return external_crypto_default().createHash('sha1').update(bytes).digest(); +} + +/* harmony default export */ const esm_node_sha1 = (sha1); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/v5.js + + +const v5 = v35('v5', 0x50, esm_node_sha1); +/* harmony default export */ const esm_node_v5 = (v5); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/nil.js +/* harmony default export */ const nil = ('00000000-0000-0000-0000-000000000000'); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/version.js + + +function version(uuid) { + if (!esm_node_validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +/* harmony default export */ const esm_node_version = (version); +// CONCATENATED MODULE: ./node_modules/@bifravst/firmware-ci-runner-aws/node_modules/uuid/dist/esm-node/index.js + + + + + + + + + + +/***/ }), + +/***/ 99800: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { words, count } = __nccwpck_require__(50481) +const randomNumber = __nccwpck_require__(48880) + +async function * randomWord () { + while (true) { + const number = await randomNumber(0, count - 1) + yield words[number] + } +} + +module.exports = { + randomWords: async ({ numWords } = { numWords: 4 }) => { + const randomWords = [] + const r = randomWord() + for (let i = 0; i < parseInt(numWords, 10); i++) { + randomWords.push((await r.next()).value) + } + return randomWords + } + +} + + +/***/ }), + +/***/ 50481: +/***/ ((module) => { + +module.exports = { + count: 14744, + words: [ + 'abaction', + 'abaculus', + 'abasedly', + 'abatable', + 'abatised', + 'abattoir', + 'abatvoix', + 'abbatial', + 'abderian', + 'abderite', + 'abdicant', + 'abdicate', + 'abditive', + 'abditory', + 'abductor', + 'abearing', + 'abelmosk', + 'aberrant', + 'aberrate', + 'abetment', + 'abeyance', + 'abeyancy', + 'abhorrer', + 'abidance', + 'abietene', + 'abietine', + 'abietite', + 'abiogeny', + 'abjectly', + 'abjugate', + 'ablation', + 'ablative', + 'ablegate', + 'ableness', + 'abligate', + 'ablution', + 'abluvion', + 'abnegate', + 'abnodate', + 'abnormal', + 'abodance', + 'abomasum', + 'abomasus', + 'aborsive', + 'abortion', + 'abortive', + 'abradant', + 'abrasion', + 'abrasive', + 'abricock', + 'abridger', + 'abrogate', + 'abruptly', + 'abscissa', + 'absentee', + 'absenter', + 'absently', + 'absinthe', + 'absolute', + 'absolver', + 'absonant', + 'absonous', + 'absorber', + 'absterge', + 'absterse', + 'abstract', + 'abstrude', + 'abstruse', + 'absurdly', + 'abundant', + 'abusable', + 'abuseful', + 'abutilon', + 'abutment', + 'academic', + 'acanthus', + 'acardiac', + 'acaridan', + 'acarpous', + 'acaudate', + 'acauline', + 'acaulose', + 'acaulous', + 'accadian', + 'accensor', + 'accentor', + 'accepter', + 'acceptor', + 'accident', + 'accismus', + 'accolade', + 'accorder', + 'accosted', + 'accouple', + 'accouter', + 'accoutre', + 'accredit', + 'accresce', + 'accroach', + 'accumber', + 'accuracy', + 'accurate', + 'accursed', + 'accusant', + 'accustom', + 'aceldama', + 'acentric', + 'acephala', + 'acephali', + 'acerbate', + 'acerbity', + 'acervate', + 'acervose', + 'acescent', + 'acetable', + 'acetated', + 'acetonic', + 'achatina', + 'achatour', + 'achenial', + 'achenium', + 'achiever', + 'achilles', + 'achilous', + 'acholous', + 'achromic', + 'achronic', + 'achroous', + 'achylous', + 'achymous', + 'acicular', + 'acidific', + 'acidness', + 'acierage', + 'acinaces', + 'acinesia', + 'acinetae', + 'acologic', + 'aconital', + 'aconitia', + 'aconitic', + 'aconitum', + 'acontias', + 'acorncup', + 'acosmism', + 'acosmist', + 'acoustic', + 'acquaint', + 'acquirer', + 'acranial', + 'acreable', + 'acridity', + 'acrimony', + 'acritude', + 'acroatic', + 'acrodont', + 'acrolein', + 'acrolith', + 'acromial', + 'acromion', + 'acrostic', + 'acrotism', + 'actinism', + 'actinium', + 'actinoid', + 'actinost', + 'actinula', + 'activate', + 'actively', + 'activity', + 'actually', + 'actuator', + 'acuation', + 'acuition', + 'aculeate', + 'aculeous', + 'adamical', + 'adaption', + 'adaptive', + 'addendum', + 'adderfly', + 'addition', + 'additive', + 'additory', + 'addlings', + 'addorsed', + 'adducent', + 'adductor', + 'adelopod', + 'adelphia', + 'adenalgy', + 'adenitis', + 'adeption', + 'adeptist', + 'adequacy', + 'adequate', + 'adfected', + 'adhamant', + 'adherent', + 'adhesion', + 'adhesive', + 'adiantum', + 'adipsous', + 'adjacent', + 'adjudger', + 'adjugate', + 'adjument', + 'adjuster', + 'adjutage', + 'adjutant', + 'adjutory', + 'adjutrix', + 'adjuvant', + 'admiring', + 'admitted', + 'admitter', + 'admonish', + 'adnation', + 'adoption', + 'adoptive', + 'adorable', + 'adorably', + 'adragant', + 'adreamed', + 'adriatic', + 'adrogate', + 'adroitly', + 'adscript', + 'adstrict', + 'adularia', + 'adulator', + 'adultery', + 'aduncity', + 'aduncous', + 'adustion', + 'advanced', + 'advancer', + 'advisory', + 'advocacy', + 'advocate', + 'advoutry', + 'advowson', + 'advowtry', + 'adynamia', + 'adynamic', + 'aecidium', + 'aegilops', + 'aegrotat', + 'aeration', + 'aerially', + 'aeriform', + 'aerobies', + 'aeroboat', + 'aeroclub', + 'aerocyst', + 'aerofoil', + 'aerolite', + 'aerolith', + 'aerology', + 'aeronaut', + 'aerostat', + 'aesculin', + 'aesopian', + 'aesthete', + 'aestival', + 'aestuary', + 'aestuous', + 'aethogen', + 'affamish', + 'affected', + 'affecter', + 'affeerer', + 'affeeror', + 'afferent', + 'affiance', + 'affinity', + 'affirmer', + 'affixion', + 'afflatus', + 'affluent', + 'affodill', + 'afforest', + 'affrayer', + 'affright', + 'affronte', + 'affusion', + 'aflicker', + 'aflutter', + 'aftereye', + 'againbuy', + 'againsay', + 'agalloch', + 'agastric', + 'agedness', + 'agenesic', + 'agenesis', + 'agential', + 'ageratum', + 'aggerate', + 'aggerose', + 'aggrieve', + 'agiotage', + 'agitable', + 'agitator', + 'aglimmer', + 'aglitter', + 'aglossal', + 'agminate', + 'agnation', + 'agnition', + 'agnostic', + 'agnusdei', + 'agraphia', + 'agraphic', + 'agrappes', + 'agrarian', + 'agrestic', + 'agrimony', + 'agronomy', + 'agrostis', + 'aigrette', + 'aiguille', + 'ailantus', + 'airbrake', + 'airbrush', + 'aircraft', + 'airdrill', + 'airiness', + 'airlevel', + 'airplant', + 'airpoise', + 'airshaft', + 'airstove', + 'airwards', + 'airwoman', + 'akinesia', + 'akinesic', + 'alacrify', + 'alacrity', + 'alalonga', + 'alarming', + 'alarmist', + 'albacore', + 'albanian', + 'albicant', + 'albicore', + 'albiness', + 'albinism', + 'albolith', + 'albumose', + 'alburnum', + 'alcahest', + 'alcaldia', + 'alchemic', + 'alchymic', + 'alcohate', + 'alcyones', + 'alcyonic', + 'aldehyde', + 'alderfly', + 'alderman', + 'alderney', + 'aleatory', + 'alebench', + 'aleberry', + 'alehouse', + 'alestake', + 'aleurone', + 'aleutian', + 'alfenide', + 'alfresco', + 'algaroba', + 'algaroth', + 'algerian', + 'algerine', + 'algidity', + 'algology', + 'algonkin', + 'algorism', + 'alguazil', + 'alhambra', + 'alienage', + 'alienate', + 'alienism', + 'alienist', + 'alinasal', + 'aliquant', + 'alitrunk', + 'alizarin', + 'alkahest', + 'alkalify', + 'alkaline', + 'alkalize', + 'alkaloid', + 'alkargen', + 'alkarsin', + 'alkermes', + 'allanite', + 'allecret', + 'allegory', + 'alleluia', + 'allerion', + 'alleyway', + 'allfools', + 'allfours', + 'alliable', + 'alliance', + 'alligate', + 'allision', + 'allmouth', + 'allnight', + 'allocate', + 'allodial', + 'allodium', + 'allogamy', + 'allopath', + 'allottee', + 'allotter', + 'alloyage', + 'allsouls', + 'allspice', + 'allthing', + 'alluring', + 'allusion', + 'allusive', + 'allusory', + 'alluvial', + 'alluvion', + 'alluvium', + 'allwhere', + 'allylene', + 'almagest', + 'almighty', + 'almsdeed', + 'almsfolk', + 'alomancy', + 'alopecia', + 'alouatte', + 'alphabet', + 'alpigene', + 'alpinist', + 'alquifou', + 'alsatian', + 'altarage', + 'altarist', + 'alterant', + 'alterity', + 'alternat', + 'altheine', + 'although', + 'altincar', + 'altitude', + 'altrical', + 'altrices', + 'altruism', + 'altruist', + 'aluminic', + 'aluminum', + 'alumroot', + 'alunogen', + 'alveated', + 'alveolar', + 'alveolus', + 'amadavat', + 'amalgama', + 'amandine', + 'amaracus', + 'amaranth', + 'amazedly', + 'amazeful', + 'ambition', + 'amblotic', + 'amblygon', + 'amblyopy', + 'ambreate', + 'ambrosia', + 'ambrosin', + 'ambulant', + 'ambulate', + 'ambusher', + 'amelcorn', + 'amenable', + 'amenably', + 'amenance', + 'amendful', + 'american', + 'amethyst', + 'amicable', + 'amicably', + 'amidogen', + 'amioidei', + 'amission', + 'amitosis', + 'amitotic', + 'ammodyte', + 'ammoniac', + 'ammonite', + 'ammonium', + 'amnestic', + 'amniotic', + 'amoebean', + 'amoebian', + 'amoeboid', + 'amoebous', + 'amoneste', + 'amorette', + 'amortise', + 'amortize', + 'amovable', + 'ampelite', + 'amperage', + 'amphibia', + 'amphigen', + 'amphipod', + 'amphiuma', + 'amphoral', + 'amphoric', + 'ampliate', + 'ampullar', + 'amputate', + 'amuletic', + 'amurcous', + 'amusable', + 'amusette', + 'amyelous', + 'amygdala', + 'amylogen', + 'anabasis', + 'anabatic', + 'anabolic', + 'anaconda', + 'anaglyph', + 'anagogic', + 'anagraph', + 'analcime', + 'analcite', + 'analecta', + 'analects', + 'analemma', + 'analepsy', + 'analgene', + 'analogal', + 'analogic', + 'analogon', + 'analogue', + 'analyser', + 'analysis', + 'analytic', + 'analyzer', + 'anapaest', + 'anaphora', + 'anapnoic', + 'anarchal', + 'anarchic', + 'anasarca', + 'anastate', + 'anathema', + 'anatifer', + 'anatomic', + 'ancestor', + 'ancestry', + 'anchored', + 'anchoret', + 'anchusin', + 'ancienty', + 'anconeal', + 'anconeus', + 'anconoid', + 'andesine', + 'andesite', + 'andromed', + 'anecdote', + 'anemonic', + 'anemonin', + 'anemosis', + 'aneurism', + 'angelage', + 'angelica', + 'angelify', + 'angelize', + 'angevine', + 'anginose', + 'anginous', + 'anglican', + 'angulate', + 'angulose', + 'angulous', + 'anhelose', + 'anhelous', + 'animally', + 'animated', + 'animater', + 'animator', + 'anisette', + 'ankerite', + 'ankylose', + 'annalist', + 'annalize', + 'annealer', + 'annelida', + 'anneloid', + 'annexion', + 'annotate', + 'annotine', + 'announce', + 'annoyful', + 'annoying', + 'annoyous', + 'annually', + 'annueler', + 'annulary', + 'annulata', + 'annulate', + 'annuller', + 'annuloid', + 'annulosa', + 'annulose', + 'anointer', + 'anomoura', + 'anomural', + 'anomuran', + 'anophyte', + 'anoplura', + 'anorexia', + 'anorthic', + 'anourous', + 'anoxemia', + 'anserine', + 'anserous', + 'answerer', + 'antacrid', + 'antagony', + 'antalgic', + 'antecede', + 'antedate', + 'antefact', + 'antelope', + 'antennal', + 'antepast', + 'antepone', + 'anteport', + 'anterior', + 'anteroom', + 'antevert', + 'anthelix', + 'anthemis', + 'anthesis', + 'anthozoa', + 'antiarin', + 'antibody', + 'anticous', + 'antidote', + 'antilogy', + 'antimask', + 'antimere', + 'antimony', + 'antinomy', + 'antiphon', + 'antipode', + 'antipole', + 'antipope', + 'antipyic', + 'antiscii', + 'antithet', + 'antitype', + 'antitypy', + 'antlered', + 'antozone', + 'antrorse', + 'anything', + 'anywhere', + 'aoristic', + 'aortitis', + 'apagogic', + 'apastron', + 'apathist', + 'apellous', + 'apennine', + 'aperient', + 'apertion', + 'aperture', + 'aphakial', + 'aphanite', + 'aphelion', + 'aphetism', + 'aphetize', + 'aphidian', + 'aphonous', + 'aphorism', + 'aphorist', + 'aphorize', + 'aphrasia', + 'aphthoid', + 'aphthong', + 'aphthous', + 'apiarian', + 'apiarist', + 'apicular', + 'apiology', + 'aplastic', + 'aplotomy', + 'aplustre', + 'apocynin', + 'apodixis', + 'apodosis', + 'apogamic', + 'apograph', + 'apollyon', + 'apologer', + 'apologue', + 'apophyge', + 'apoplexy', + 'apositic', + 'apostasy', + 'apostate', + 'aposteme', + 'apostume', + 'apothegm', + 'appanage', + 'apparent', + 'appealer', + 'appearer', + 'appeaser', + 'appellee', + 'appellor', + 'appenage', + 'appendix', + 'appetent', + 'appetite', + 'appetize', + 'applause', + 'applepie', + 'applique', + 'apporter', + 'apposite', + 'appraise', + 'apprizal', + 'apprizer', + 'approach', + 'appropre', + 'approval', + 'approver', + 'apricate', + 'apronful', + 'apronman', + 'apterous', + 'aptitude', + 'aptychus', + 'apyretic', + 'apyrexia', + 'aquarial', + 'aquarian', + 'aquarium', + 'aquarius', + 'aquatile', + 'aquatint', + 'aqueduct', + 'aquiform', + 'aquiline', + 'aquosity', + 'arabical', + 'araceous', + 'arachnid', + 'araguato', + 'aramaean', + 'aramaism', + 'araneida', + 'araneina', + 'araneose', + 'araneous', + 'arapaima', + 'arbalest', + 'arbalist', + 'arbitral', + 'arborary', + 'arboreal', + 'arborist', + 'arborous', + 'arbuscle', + 'arcadian', + 'archaean', + 'archaism', + 'archaist', + 'archaize', + 'archduke', + 'archical', + 'archival', + 'archlute', + 'archness', + 'archonts', + 'archwife', + 'archwise', + 'arciform', + 'arclight', + 'arctisca', + 'arcturus', + 'arcuated', + 'ardently', + 'ardurous', + 'arecolin', + 'areolate', + 'aretaics', + 'argental', + 'argentan', + 'argentic', + 'argentry', + 'argonaut', + 'arguable', + 'argument', + 'argutely', + 'arhizous', + 'arianism', + 'arianize', + 'aridness', + 'arietate', + 'arillate', + 'arillode', + 'aristate', + 'arkshell', + 'armament', + 'armature', + 'armchair', + 'armenian', + 'armgaunt', + 'arminian', + 'armoniac', + 'armorial', + 'armorist', + 'armozeen', + 'armozine', + 'armyworm', + 'arnicine', + 'aromatic', + 'arpeggio', + 'arquated', + 'arquebus', + 'arranger', + 'arrantly', + 'arrasene', + 'arrastre', + 'arraught', + 'arrected', + 'arrestee', + 'arrester', + 'arrhizal', + 'arrhytmy', + 'arrogant', + 'arrogate', + 'arrosion', + 'arsenate', + 'arsenide', + 'arsenite', + 'arteriac', + 'arterial', + 'artesian', + 'artfully', + 'articled', + 'artifact', + 'artifice', + 'artilize', + 'artistic', + 'artistry', + 'artotype', + 'artunion', + 'aruspice', + 'aruspicy', + 'arvicole', + 'aryanize', + 'asbestic', + 'asbestos', + 'asbestus', + 'ascidian', + 'ascidium', + 'ascocarp', + 'ashantee', + 'asmonean', + 'aspartic', + 'aspected', + 'asperate', + 'asperges', + 'asperity', + 'asperous', + 'aspersed', + 'asperser', + 'asphalte', + 'asphodel', + 'asphyxia', + 'aspirant', + 'aspirate', + 'aspiring', + 'assailer', + 'assamese', + 'assassin', + 'assaying', + 'assayton', + 'assecure', + 'assemble', + 'assembly', + 'assenter', + 'asserter', + 'assertor', + 'assessee', + 'assessor', + 'assidean', + 'assident', + 'assiento', + 'assignat', + 'assignee', + 'assigner', + 'assignor', + 'assinego', + 'assister', + 'assistor', + 'assonant', + 'assonate', + 'assorted', + 'assuager', + 'assument', + 'assuming', + 'assuring', + 'assyrian', + 'astatize', + 'asterias', + 'asterion', + 'asterisk', + 'asterism', + 'asternal', + 'asteroid', + 'asterope', + 'asthenia', + 'asthenic', + 'astomous', + 'astonied', + 'astonish', + 'astraean', + 'astragal', + 'astringe', + 'astrofel', + 'astroite', + 'astucity', + 'asturian', + 'astyllen', + 'aswooned', + 'asystole', + 'ataraxia', + 'atechnic', + 'athanasy', + 'athecata', + 'atheling', + 'atheneum', + 'athenian', + 'atherine', + 'atheroid', + 'atheroma', + 'athetize', + 'athletic', + 'atlantal', + 'atlantes', + 'atlantic', + 'atmiatry', + 'atmology', + 'atmolyze', + 'atomical', + 'atomizer', + 'atonable', + 'atrocity', + 'atrophic', + 'atropine', + 'atropism', + 'atropous', + 'attacker', + 'attaghan', + 'attemper', + 'attender', + 'attentat', + 'attently', + 'attercop', + 'attester', + 'attestor', + 'atticism', + 'atticize', + 'attitude', + 'attorney', + 'attritus', + 'atypical', + 'audacity', + 'audience', + 'audition', + 'auditive', + 'auditory', + 'auditual', + 'augratin', + 'augurate', + 'augurial', + 'augurist', + 'augurize', + 'augurous', + 'augustan', + 'augustly', + 'aularian', + 'aulnager', + 'auncetry', + 'auntrous', + 'aurelian', + 'aurevoir', + 'auricled', + 'auricula', + 'auriform', + 'aurilave', + 'ausonian', + 'austrian', + 'austrine', + 'autarchy', + 'authorly', + 'autocrat', + 'autogamy', + 'autoharp', + 'automath', + 'autonomy', + 'autopsic', + 'autoptic', + 'autotype', + 'autotypy', + 'autumnal', + 'autunite', + 'auxiliar', + 'avadavat', + 'avellane', + 'avemaria', + 'avenalin', + 'avenious', + 'aventail', + 'aventine', + 'aventure', + 'avercorn', + 'averment', + 'avernian', + 'aversely', + 'aversion', + 'aviation', + 'aviatrix', + 'avicular', + 'avidious', + 'avifauna', + 'aviseful', + 'avoucher', + 'avoutrer', + 'avoutrie', + 'avowable', + 'avowance', + 'avulsion', + 'awakener', + 'awanting', + 'awayward', + 'awearied', + 'aweather', + 'awninged', + 'aworking', + 'axillars', + 'axillary', + 'axletree', + 'ayegreen', + 'ayenward', + 'ayrshire', + 'azoturia', + 'azureous', + 'babblery', + 'babehood', + 'babyfarm', + 'babyhood', + 'babyship', + 'baccarat', + 'baccated', + 'bacchant', + 'bacchius', + 'bachelor', + 'bachelry', + 'bacillar', + 'bacillus', + 'backband', + 'backbite', + 'backbond', + 'backbone', + 'backcast', + 'backdoor', + 'backdown', + 'backfall', + 'backfire', + 'backhand', + 'backheel', + 'backlash', + 'backless', + 'backrack', + 'backside', + 'backstay', + 'backster', + 'backstop', + 'backward', + 'backwash', + 'backworm', + 'baconian', + 'bacteria', + 'bacterin', + 'bactrian', + 'baculine', + 'baculite', + 'badgerer', + 'badigeon', + 'badinage', + 'badlands', + 'baenopod', + 'baetulus', + 'baffling', + 'baggager', + 'bagpiper', + 'baguette', + 'bahaudur', + 'bailable', + 'bailbond', + 'bailment', + 'bakemeat', + 'bakingly', + 'bakistre', + 'bakshish', + 'balancer', + 'balanite', + 'balanoid', + 'baldhead', + 'baldness', + 'baldpate', + 'balearic', + 'balefire', + 'balisaur', + 'balister', + 'ballader', + 'balladry', + 'ballahoo', + 'ballahou', + 'ballarag', + 'ballatry', + 'ballista', + 'balloter', + 'ballotin', + 'ballroom', + 'balmoral', + 'balneary', + 'balotade', + 'balsamic', + 'baluster', + 'banality', + 'bandanna', + 'bandelet', + 'bandfish', + 'banewort', + 'banisher', + 'banister', + 'bankable', + 'bankbill', + 'bankbook', + 'banknote', + 'bankrupt', + 'bankside', + 'banlieue', + 'bannered', + 'banneret', + 'bannerol', + 'bansshee', + 'banterer', + 'bantling', + 'banxring', + 'baphomet', + 'baptizer', + 'barathea', + 'barbacan', + 'barbados', + 'barbaric', + 'barbated', + 'barbecue', + 'barberry', + 'barbette', + 'barbican', + 'barbicel', + 'barbiers', + 'barbiton', + 'bardling', + 'bardship', + 'bareback', + 'barebone', + 'barefoot', + 'barehead', + 'bareness', + 'baresark', + 'bargeman', + 'barghest', + 'barillet', + 'baritone', + 'barkless', + 'barnacle', + 'barnyard', + 'barogram', + 'barology', + 'barometz', + 'baronage', + 'baroness', + 'baronial', + 'barouche', + 'barracan', + 'barranca', + 'barrator', + 'barratry', + 'barreled', + 'barrenly', + 'barrulet', + 'barterer', + 'bartizan', + 'bartlett', + 'barytone', + 'basaltic', + 'basanite', + 'bascinet', + 'baseball', + 'baseborn', + 'baselard', + 'baseless', + 'basement', + 'baseness', + 'baseviol', + 'bashless', + 'basicity', + 'basidium', + 'basifier', + 'basihyal', + 'basilary', + 'basilica', + 'basilisk', + 'basketry', + 'basquish', + 'bassdrum', + 'bassetto', + 'basshorn', + 'bassinet', + 'bassorin', + 'bassviol', + 'basswood', + 'bastardy', + 'bastille', + 'basylous', + 'batavian', + 'bateless', + 'batement', + 'bathetic', + 'bathmism', + 'bathorse', + 'batoidei', + 'battable', + 'battalia', + 'batteler', + 'batterer', + 'baubling', + 'baudekin', + 'baudrick', + 'bavarian', + 'bawbling', + 'bawdrick', + 'bawhorse', + 'bayadere', + 'bayardly', + 'bayberry', + 'baystate', + 'bdellium', + 'beadlery', + 'beadroll', + 'beadsman', + 'beadwork', + 'beakhead', + 'beakiron', + 'beambird', + 'beamless', + 'beamtree', + 'bearable', + 'bearbind', + 'bearherd', + 'bearskin', + 'bearward', + 'beatific', + 'beaufort', + 'beaupere', + 'beauship', + 'beautied', + 'beautify', + 'beauxite', + 'beavered', + 'bebirine', + 'bebloody', + 'bechamel', + 'bechance', + 'becoming', + 'bedabble', + 'bedaggle', + 'bedazzle', + 'bedchair', + 'bedeguar', + 'bedesman', + 'bedmaker', + 'bedphere', + 'bedpiece', + 'bedplate', + 'bedquilt', + 'bedrench', + 'bedright', + 'bedscrew', + 'bedstaff', + 'bedstead', + 'bedsteps', + 'bedstock', + 'bedstraw', + 'beebread', + 'beechnut', + 'beefwood', + 'beehouse', + 'beeregar', + 'beeswing', + 'beetrave', + 'beflower', + 'befriend', + 'befringe', + 'befuddle', + 'begetter', + 'beggable', + 'beggarly', + 'beginner', + 'begirdle', + 'begotten', + 'begrease', + 'begrimer', + 'begrudge', + 'beguiler', + 'behappen', + 'behavior', + 'beheadal', + 'behemoth', + 'behither', + 'beholden', + 'beholder', + 'behovely', + 'bejumble', + 'belamour', + 'believer', + 'belittle', + 'bellbird', + 'bellical', + 'bellower', + 'belluine', + 'bellwort', + 'bellyful', + 'belonite', + 'belooche', + 'bemangle', + 'bemaster', + 'bemingle', + 'bemoaner', + 'bemuddle', + 'bemuffle', + 'bendable', + 'bendwise', + 'beneaped', + 'benedick', + 'benedict', + 'benefice', + 'bengalee', + 'benignly', + 'benitier', + 'benjamin', + 'benumbed', + 'benzoate', + 'benzosol', + 'beplumed', + 'bepommel', + 'bepowder', + 'bepraise', + 'bepuffed', + 'bepurple', + 'bequeath', + 'berattle', + 'berberry', + 'berceuse', + 'bereaver', + 'berenice', + 'bergamot', + 'bergeret', + 'bergmeal', + 'bergmote', + 'beriberi', + 'bernacle', + 'bernafly', + 'bernicle', + 'bernouse', + 'berretta', + 'berrying', + 'berthage', + 'berthing', + 'berycoid', + 'bescrawl', + 'bescreen', + 'beseemly', + 'besetter', + 'beshroud', + 'besieger', + 'beslaver', + 'besmirch', + 'besotted', + 'besought', + 'bespread', + 'besprent', + 'bestiary', + 'bestowal', + 'bestower', + 'bestreak', + 'bestride', + 'bestrode', + 'bestrown', + 'betacism', + 'betarays', + 'betaught', + 'betelnut', + 'bethrall', + 'betongue', + 'betrayal', + 'betrayer', + 'betumble', + 'bevelled', + 'beverage', + 'bevilled', + 'bewailer', + 'bewilder', + 'bewinter', + 'bewonder', + 'bewrayer', + 'bezonian', + 'bheestie', + 'biannual', + 'bibacity', + 'bibirine', + 'bibitory', + 'biblical', + 'bibulous', + 'bicaudal', + 'bickerer', + 'biconvex', + 'bicorned', + 'bicrural', + 'bicuspid', + 'bicycler', + 'bicyclic', + 'bidarkee', + 'biddable', + 'bidental', + 'biennial', + 'bierbalk', + 'bifacial', + 'biferous', + 'bifidate', + 'biforate', + 'biforine', + 'biforked', + 'biformed', + 'biforous', + 'bigamist', + 'bigamous', + 'bigaroon', + 'bignonia', + 'bijoutry', + 'bijugate', + 'bijugous', + 'bilander', + 'bilberry', + 'biliment', + 'bilinear', + 'billbook', + 'billfish', + 'billhead', + 'billhook', + 'billiard', + 'billyboy', + 'bilobate', + 'bimanous', + 'bimedial', + 'bimensal', + 'binaural', + 'binbashi', + 'bindweed', + 'binnacle', + 'binomial', + 'binoxide', + 'bioblast', + 'biograph', + 'biologic', + 'biolysis', + 'biolytic', + 'biometry', + 'biophore', + 'bioplasm', + 'bioplast', + 'bioscope', + 'biparous', + 'bipennis', + 'biramous', + 'birdbolt', + 'birdcage', + 'birdcall', + 'birdikin', + 'birdlike', + 'birdlime', + 'birdling', + 'birdseed', + 'birthday', + 'birthdom', + 'birthing', + 'biscayan', + 'biscotin', + 'bisector', + 'biserial', + 'bisetose', + 'bisetous', + 'bisexous', + 'bisexual', + 'bishoply', + 'bistoury', + 'bitheism', + 'bitingin', + 'bitingly', + 'bitotree', + 'bitstock', + 'bittacle', + 'bitterly', + 'bivalent', + 'bivalved', + 'bivector', + 'biweekly', + 'blackart', + 'blackcap', + 'blackfin', + 'blacking', + 'blackish', + 'blackleg', + 'blackrod', + 'bladdery', + 'blamable', + 'blameful', + 'blancard', + 'blancher', + 'blandise', + 'blandish', + 'blastema', + 'blastide', + 'blasting', + 'blastoid', + 'blastula', + 'blastule', + 'blatancy', + 'blazoner', + 'blazonry', + 'bleached', + 'bleacher', + 'bleareye', + 'bleating', + 'bleeding', + 'blencher', + 'blending', + 'blendous', + 'blenniid', + 'blessing', + 'bletting', + 'blimbing', + 'blindage', + 'blinding', + 'blindman', + 'blinkard', + 'blissful', + 'blistery', + 'blithely', + 'blizzard', + 'blockade', + 'blockage', + 'blocking', + 'blockish', + 'blocktin', + 'bloedite', + 'bloncket', + 'bloodily', + 'bloodlet', + 'bloodulf', + 'bloodwit', + 'bloomary', + 'bloomery', + 'blooming', + 'blossomy', + 'blotched', + 'blotless', + 'blowball', + 'blowhole', + 'blowpipe', + 'blowtube', + 'blubbery', + 'bludgeon', + 'blueback', + 'bluebell', + 'bluebill', + 'bluebird', + 'bluebook', + 'bluecoat', + 'bluefish', + 'bluegown', + 'blueness', + 'bluenose', + 'bluepoll', + 'bluewing', + 'blunging', + 'bluntish', + 'blushful', + 'blushing', + 'boarding', + 'boarfish', + 'boastful', + 'boasting', + 'boastive', + 'boatable', + 'boatbill', + 'boatsman', + 'bobbinet', + 'bobolink', + 'bobwhite', + 'bocasine', + 'bockbeer', + 'bockelet', + 'bockland', + 'bodement', + 'bodhisat', + 'bodiless', + 'bodleian', + 'boeotian', + 'bogberry', + 'bogglish', + 'bohemian', + 'boistous', + 'boldness', + 'bolivian', + 'bollworm', + 'bolthead', + 'boltrope', + 'bombardo', + 'bombazet', + 'bombycid', + 'bonafide', + 'bonaroba', + 'bonassus', + 'bondager', + 'bondmaid', + 'bondsman', + 'boneache', + 'bonefish', + 'boneless', + 'boneshaw', + 'bongrace', + 'bonhomie', + 'bonibell', + 'boniface', + 'boniform', + 'boniness', + 'bonitary', + 'bonneted', + 'bonnibel', + 'bonspiel', + 'bontebok', + 'boobyish', + 'boodhism', + 'boodhist', + 'bookcase', + 'bookland', + 'bookless', + 'bookmark', + 'bookmate', + 'bookshop', + 'bookwork', + 'bookworm', + 'boomorah', + 'boothale', + 'boothose', + 'bootikin', + 'bootjack', + 'bootless', + 'bootlick', + 'boottree', + 'borachte', + 'boracite', + 'boracous', + 'bordeaux', + 'bordello', + 'borderer', + 'bordland', + 'bordlode', + 'borecole', + 'borracho', + 'borrower', + 'boshvark', + 'bosporus', + 'botanist', + 'botanize', + 'botchery', + 'boteless', + 'botherer', + 'bothnian', + 'botryoid', + 'botryose', + 'bottling', + 'bottomed', + 'bottomry', + 'bouchees', + 'boughten', + 'bouillon', + 'bouldery', + 'bouncing', + 'boundary', + 'bounding', + 'bourgeon', + 'bournous', + 'boutefeu', + 'boviform', + 'bowenite', + 'bowgrace', + 'bowingly', + 'bowldery', + 'bowsprit', + 'boxberry', + 'boxthorn', + 'boydekin', + 'boyishly', + 'boyscout', + 'brabbler', + 'braccate', + 'bracelet', + 'brachial', + 'brachium', + 'brachman', + 'brackish', + 'bracteal', + 'bractlet', + 'braggart', + 'bragless', + 'brahmani', + 'braiding', + 'brainish', + 'brainpan', + 'brakeman', + 'brambled', + 'braminic', + 'brancard', + 'brancher', + 'branchia', + 'brandied', + 'brandish', + 'brandlin', + 'brangler', + 'brantail', + 'branular', + 'brasilin', + 'brassage', + 'brassart', + 'brassets', + 'brassica', + 'bratsche', + 'brattice', + 'braunite', + 'brawling', + 'brazenly', + 'brazilin', + 'breakage', + 'breakman', + 'breasted', + 'breather', + 'breeches', + 'breeding', + 'breloque', + 'brennage', + 'brethren', + 'brettice', + 'brevetcy', + 'breviary', + 'breviate', + 'breviped', + 'brevipen', + 'brezilin', + 'briarean', + 'bribable', + 'brickbat', + 'bridalty', + 'bridebed', + 'brideman', + 'bridging', + 'briefman', + 'brighten', + 'brightly', + 'brimless', + 'brimming', + 'brindled', + 'britzska', + 'broacher', + 'broadaxe', + 'broadish', + 'brocaded', + 'brocatel', + 'broccoli', + 'brochure', + 'brockish', + 'brodekin', + 'broidery', + 'broiling', + 'brokenly', + 'brokerly', + 'bromalin', + 'bromanil', + 'bromlife', + 'bromuret', + 'bronchia', + 'bronchic', + 'bronchus', + 'bronzine', + 'bronzing', + 'bronzist', + 'bronzite', + 'brookite', + 'brooklet', + 'brougham', + 'browbeat', + 'browdyng', + 'browless', + 'brownian', + 'browning', + 'brownish', + 'brownism', + 'brownist', + 'browpost', + 'browsing', + 'browspot', + 'brumaire', + 'brunette', + 'brushing', + 'brushite', + 'brussels', + 'brutally', + 'bryology', + 'bryozoan', + 'bryozoum', + 'buansuah', + 'bubaline', + 'buccinal', + 'buccinum', + 'buckbean', + 'buckling', + 'buckshot', + 'buckskin', + 'buddhism', + 'buddhist', + 'budgerow', + 'buffeter', + 'bufonite', + 'buhlbuhl', + 'buhlwork', + 'building', + 'bukshish', + 'bulkhead', + 'bulldoze', + 'bulletin', + 'bullfice', + 'bullfist', + 'bullfrog', + 'bullhead', + 'bullirag', + 'bullpout', + 'bullweed', + 'bullwort', + 'bullyrag', + 'bumbarge', + 'buncombe', + 'bungalow', + 'bungarum', + 'bunghole', + 'bungling', + 'buntline', + 'buoyance', + 'buoyancy', + 'burdener', + 'burgamot', + 'burganet', + 'burgeois', + 'burglary', + 'burgonet', + 'burgrass', + 'burgrave', + 'burgundy', + 'burinist', + 'burletta', + 'burnable', + 'burnoose', + 'burrower', + 'bursitis', + 'bushless', + 'bushment', + 'business', + 'buskined', + 'bustling', + 'busybody', + 'butchery', + 'butteris', + 'buttress', + 'buttweld', + 'butylene', + 'butyrate', + 'butyrone', + 'butyrous', + 'bylander', + 'caatinga', + 'cabalism', + 'cabalist', + 'cabalize', + 'caballer', + 'cabassou', + 'cabazite', + 'cabbling', + 'cabirean', + 'cabirian', + 'caboched', + 'cabochon', + 'caboodle', + 'cabotage', + 'cabrilla', + 'cabriole', + 'cacaemia', + 'cachalot', + 'cachemia', + 'cachepot', + 'cachexia', + 'cachucha', + 'cachunde', + 'cackerel', + 'cackling', + 'cacodoxy', + 'cacology', + 'cacomixl', + 'cacoxene', + 'cadaster', + 'cadastre', + 'cadeworm', + 'cadillac', + 'caducary', + 'caducean', + 'caduceus', + 'caducity', + 'caducous', + 'caesious', + 'caesural', + 'caffeine', + 'cageling', + 'cahincic', + 'caimacam', + 'cajolery', + 'calabash', + 'calabozo', + 'caladium', + 'calamary', + 'calambac', + 'calamine', + 'calamint', + 'calamist', + 'calamite', + 'calamity', + 'calcareo', + 'calcedon', + 'calcific', + 'calciner', + 'calculus', + 'calendar', + 'calender', + 'calfskin', + 'calidity', + 'caliduct', + 'califate', + 'calipash', + 'calipers', + 'calippic', + 'calliope', + 'callipee', + 'callosan', + 'callosum', + 'calmness', + 'calmucks', + 'calotype', + 'calumbin', + 'calvaria', + 'calycine', + 'calycled', + 'calymene', + 'calyptra', + 'calzoons', + 'camboose', + 'cambrian', + 'cameleon', + 'camellia', + 'camerade', + 'camerate', + 'camisade', + 'camisado', + 'camisard', + 'camisole', + 'camleted', + 'camomile', + 'camoused', + 'camously', + 'campagna', + 'campaign', + 'campaned', + 'campanes', + 'campania', + 'camphene', + 'camphine', + 'camphire', + 'canadian', + 'canaille', + 'canarese', + 'canaster', + 'cancelli', + 'cancrine', + 'cancroid', + 'canderos', + 'candidly', + 'canicula', + 'canicule', + 'canister', + 'cankered', + 'cannabin', + 'cannabis', + 'cannibal', + 'cannikin', + 'cannoned', + 'cannonry', + 'cannular', + 'canoeing', + 'canoeist', + 'canoeman', + 'canonbit', + 'canoness', + 'canonist', + 'canonize', + 'canorous', + 'canstick', + 'cantarro', + 'canthook', + 'canticle', + 'canticoy', + 'cantonal', + 'cantoned', + 'cantoral', + 'cantoris', + 'canzonet', + 'caoncito', + 'capacify', + 'capacity', + 'capeline', + 'capellet', + 'capibara', + 'capitate', + 'capitula', + 'capitule', + 'capnomor', + 'caponize', + 'cappaper', + 'cappella', + 'capriole', + 'capriped', + 'caproate', + 'caprylic', + 'capsheaf', + 'capsicin', + 'capsicum', + 'capstone', + 'capsular', + 'captious', + 'capuccio', + 'capuched', + 'capuchin', + 'capucine', + 'capybara', + 'carabine', + 'caraboid', + 'caracara', + 'caracole', + 'caracoly', + 'caracora', + 'caracore', + 'carageen', + 'carapace', + 'carapato', + 'carbamic', + 'carbanil', + 'carbazol', + 'carbinol', + 'carbolic', + 'carbonic', + 'carbonyl', + 'carboxyl', + 'carburet', + 'carcajou', + 'carcanet', + 'carceral', + 'cardamom', + 'cardcase', + 'cardinal', + 'cardioid', + 'carditis', + 'careless', + 'careworn', + 'cargason', + 'cargoose', + 'caribbee', + 'caricous', + 'carillon', + 'carinate', + 'carkanet', + 'carlings', + 'carmelin', + 'carminic', + 'carnally', + 'carnauba', + 'carneous', + 'carnifex', + 'carnival', + 'caroched', + 'caroigne', + 'caroline', + 'caroling', + 'caroteel', + 'carousal', + 'carouser', + 'carraway', + 'carriage', + 'carriboo', + 'carryall', + 'carrying', + 'cartbote', + 'cartouch', + 'carucage', + 'carucate', + 'caruncle', + 'carwheel', + 'caryatic', + 'caryatid', + 'cascabel', + 'cascalho', + 'cascaron', + 'casemate', + 'casement', + 'caseshot', + 'caseworm', + 'cashbook', + 'cashmere', + 'cassette', + 'cassican', + 'castanea', + 'castanet', + 'castaway', + 'castiron', + 'castlery', + 'castling', + 'castorin', + 'castrate', + 'castrato', + 'casually', + 'casualty', + 'catacomb', + 'catamite', + 'catapasm', + 'catapuce', + 'catapult', + 'cataract', + 'catawbas', + 'catchfly', + 'catching', + 'catechin', + 'category', + 'catenary', + 'catenate', + 'cateress', + 'cathedra', + 'catheter', + 'cathetus', + 'cathodic', + 'catholic', + 'catonian', + 'catopron', + 'catopter', + 'catstick', + 'caudated', + 'caudicle', + 'caulicle', + 'causable', + 'causally', + 'causator', + 'causeful', + 'causerie', + 'causeuse', + 'causeway', + 'causeyed', + 'cautious', + 'cavalero', + 'cavalier', + 'cavatina', + 'caveator', + 'caverned', + 'cavesson', + 'cavicorn', + 'caviling', + 'caviller', + 'cavilous', + 'cavitary', + 'cedriret', + 'ceinture', + 'celature', + 'celeriac', + 'celerity', + 'celibacy', + 'celibate', + 'cellarer', + 'cellaret', + 'cellular', + 'celotomy', + 'cemental', + 'cementer', + 'cemetery', + 'cenanthy', + 'cenation', + 'cenatory', + 'cenobite', + 'cenogamy', + 'cenotaph', + 'cenozoic', + 'censurer', + 'centaury', + 'centiare', + 'centinel', + 'centiped', + 'centrale', + 'centring', + 'centrode', + 'centroid', + 'centuple', + 'cephalad', + 'cephalic', + 'cephalon', + 'ceramics', + 'cerastes', + 'ceratine', + 'cerberus', + 'cercaria', + 'cercopod', + 'cerealia', + 'cerealin', + 'cerebral', + 'cerebric', + 'cerebrin', + 'cerebrum', + 'cerement', + 'ceremony', + 'cernuous', + 'cerolite', + 'cerotene', + 'cerotype', + 'cerulean', + 'cerulein', + 'ceruleum', + 'cerusite', + 'cervelat', + 'cervical', + 'cesarean', + 'cesarian', + 'cesarism', + 'cessavit', + 'cessible', + 'cessment', + 'cesspipe', + 'cesspool', + 'cetacean', + 'ceterach', + 'cetewale', + 'cetology', + 'cetraric', + 'cetrarin', + 'chaconne', + 'chafewax', + 'chaffern', + 'chaffery', + 'chaffing', + 'chaffwax', + 'chagreen', + 'chainlet', + 'chaintie', + 'chairman', + 'chalazal', + 'chaldaic', + 'chaldean', + 'chaldron', + 'chaliced', + 'chambray', + 'chambrel', + 'chamfret', + 'chamfron', + 'chamisal', + 'champion', + 'chancery', + 'chandler', + 'chanfrin', + 'chantant', + 'chanting', + 'chapbook', + 'chapelet', + 'chapelry', + 'chaperon', + 'chapiter', + 'chaplain', + 'chapless', + 'chaptrel', + 'charcoal', + 'charlock', + 'charmful', + 'charming', + 'charneco', + 'charnico', + 'chartism', + 'chartist', + 'chasable', + 'chasible', + 'chasseur', + 'chastely', + 'chastise', + 'chastity', + 'chasuble', + 'chatelet', + 'chatwood', + 'chaudron', + 'chauffer', + 'chaunter', + 'chausses', + 'chawdron', + 'chayroot', + 'chebacco', + 'checkage', + 'checkers', + 'cheerful', + 'cheerily', + 'chelidon', + 'chelifer', + 'chelonia', + 'chemical', + 'chemosis', + 'chenille', + 'chepster', + 'chequing', + 'cherubic', + 'cherubim', + 'cherubin', + 'chesible', + 'chessman', + 'chesteyn', + 'chestnut', + 'chetvert', + 'cheveril', + 'chiasmus', + 'chicaner', + 'chiccory', + 'chiefage', + 'chiefest', + 'chiefrie', + 'childbed', + 'childing', + 'childish', + 'children', + 'chiliasm', + 'chiliast', + 'chilling', + 'chilopod', + 'chimaera', + 'chimango', + 'chimeric', + 'chinaman', + 'chincona', + 'chipmunk', + 'chipping', + 'chiragra', + 'chiretta', + 'chirping', + 'chirrupy', + 'chitchat', + 'chivalry', + 'chloasma', + 'chlorate', + 'chloride', + 'chlorine', + 'chlorite', + 'chlorous', + 'choanoid', + 'choctaws', + 'choicely', + 'chokedar', + 'choleric', + 'choliamb', + 'cholinic', + 'chondrin', + 'chopboat', + 'chopness', + 'chopping', + 'chopsooy', + 'chopsuey', + 'choragic', + 'choragus', + 'chorally', + 'chordata', + 'choriamb', + 'chorisis', + 'chouicha', + 'choultry', + 'chowchow', + 'choyroot', + 'chrismal', + 'christen', + 'christly', + 'christom', + 'chromate', + 'chromism', + 'chromite', + 'chromium', + 'chromous', + 'chromule', + 'chrysene', + 'chrysopa', + 'chthonic', + 'chuffily', + 'chupatty', + 'churchly', + 'churlish', + 'churning', + 'chylific', + 'chyluria', + 'cibation', + 'ciborium', + 'cicatrix', + 'cicerone', + 'cicisbeo', + 'cicurate', + 'ciderist', + 'ciderkin', + 'ciliated', + 'cilician', + 'ciliform', + 'cillosis', + 'cimbrian', + 'cimolite', + 'cinchona', + 'cincture', + 'cinerary', + 'cingulum', + 'cinnabar', + 'cinnamic', + 'cinnamon', + 'cinnamyl', + 'cipherer', + 'circinal', + 'circuity', + 'circular', + 'circulet', + 'cirrhose', + 'cirrhous', + 'cirriped', + 'ciselure', + 'citation', + 'citatory', + 'citicism', + 'citified', + 'citrange', + 'civicism', + 'civilian', + 'civilist', + 'civility', + 'civilize', + 'claimant', + 'clambake', + 'clammily', + 'clamorer', + 'clangous', + 'clannish', + 'clanship', + 'clansman', + 'clapcake', + 'claptrap', + 'claqueur', + 'clarence', + 'clarinet', + 'classday', + 'classify', + 'classman', + 'claudent', + 'clausure', + 'clavated', + 'clavecin', + 'clavicle', + 'claviger', + 'clawback', + 'clawless', + 'claymore', + 'cleading', + 'cleaning', + 'cleanser', + 'clearage', + 'clearing', + 'cleavage', + 'cleavers', + 'clematis', + 'clemence', + 'clemency', + 'clepsine', + 'clergeon', + 'clergial', + 'clerical', + 'cleverly', + 'cliental', + 'cliented', + 'climatal', + 'climatic', + 'climbing', + 'clincher', + 'clinical', + 'clinique', + 'clinkant', + 'clipping', + 'cliquish', + 'cliquism', + 'clitoris', + 'cloaking', + 'cloddish', + 'clodpate', + 'clodpoll', + 'clogging', + 'cloister', + 'clothier', + 'clothing', + 'clothred', + 'clotpoll', + 'clotweed', + 'cloudage', + 'cloudily', + 'clouding', + 'cloudlet', + 'clovered', + 'clownage', + 'clownery', + 'clownish', + 'cloyless', + 'cloyment', + 'clubbish', + 'clubbist', + 'clubfist', + 'clubfoot', + 'clubhand', + 'clubhaul', + 'clubroom', + 'clucking', + 'clumsily', + 'clupeoid', + 'clustery', + 'clypeate', + 'clysmian', + 'cnidaria', + 'cnidocil', + 'coachbox', + 'coachdog', + 'coachman', + 'coaction', + 'coactive', + 'coadjust', + 'coagency', + 'coagment', + 'coagulum', + 'coalesce', + 'coalfish', + 'coalsack', + 'coamings', + 'coarsely', + 'coasting', + 'coatless', + 'cobaltic', + 'cobishop', + 'cobstone', + 'cobwebby', + 'cochlear', + 'cockaded', + 'cockatoo', + 'cockbill', + 'cockboat', + 'cockcrow', + 'cockerel', + 'cockhead', + 'cockloft', + 'cockshut', + 'cockspur', + 'cocksure', + 'cocktail', + 'cockweed', + 'cocoanut', + 'cocobolo', + 'cocopalm', + 'coctible', + 'codifier', + 'codliver', + 'codpiece', + 'coenurus', + 'coercion', + 'coercive', + 'coestate', + 'coextend', + 'cofferer', + 'cogenial', + 'cogently', + 'cogitate', + 'cognatus', + 'cognisee', + 'cognisor', + 'cognizee', + 'cognizor', + 'cognomen', + 'cognovit', + 'cogwheel', + 'coherald', + 'coherent', + 'cohesion', + 'cohesive', + 'cohobate', + 'coiffeur', + 'coiffure', + 'coincide', + 'coinhere', + 'coistril', + 'cokernut', + 'cokewold', + 'colander', + 'colaseed', + 'colation', + 'colature', + 'coldness', + 'coldwave', + 'coleseed', + 'coleslaw', + 'colewort', + 'coliseum', + 'collagen', + 'collapse', + 'collards', + 'collared', + 'collaret', + 'collator', + 'colletic', + 'colliery', + 'collogue', + 'colloped', + 'colloquy', + 'colluder', + 'coloboma', + 'colocolo', + 'colombin', + 'colonial', + 'colonist', + 'colonize', + 'colophon', + 'colorate', + 'coloring', + 'colorist', + 'colorman', + 'colossal', + 'colossus', + 'colotomy', + 'colstaff', + 'columbae', + 'columbia', + 'columbic', + 'columbin', + 'columnar', + 'columned', + 'comatose', + 'comatous', + 'comatula', + 'combater', + 'combined', + 'combiner', + 'combless', + 'comedian', + 'comedown', + 'comelily', + 'cometary', + 'comether', + 'comitial', + 'comitiva', + 'commando', + 'commatic', + 'commence', + 'commerce', + 'commoner', + 'commonly', + 'commonty', + 'commorse', + 'communal', + 'commuter', + 'compages', + 'comparer', + 'compense', + 'compesce', + 'compiler', + 'compinge', + 'complain', + 'complete', + 'complice', + 'complier', + 'compline', + 'composed', + 'composer', + 'compound', + 'compress', + 'comprint', + 'comprise', + 'comptrol', + 'compunct', + 'computer', + 'comrogue', + 'conarium', + 'conation', + 'conative', + 'concause', + 'concaved', + 'conceive', + 'concerto', + 'concetto', + 'conchite', + 'conchoid', + 'conclave', + 'conclude', + 'concolor', + 'concrete', + 'condense', + 'condoler', + 'condylar', + 'conepate', + 'conepatl', + 'confalon', + 'confated', + 'confeder', + 'conferee', + 'conferva', + 'confetti', + 'confider', + 'confiner', + 'conflate', + 'conflict', + 'confocal', + 'confound', + 'confract', + 'confrere', + 'confrier', + 'confront', + 'confuter', + 'congener', + 'congiary', + 'conglobe', + 'congored', + 'congreet', + 'congress', + 'conicoid', + 'conidium', + 'coniform', + 'conimene', + 'conistra', + 'conjoint', + 'conjugal', + 'conjunct', + 'conjurer', + 'conjuror', + 'conniver', + 'connusor', + 'conodont', + 'conoidal', + 'conoidic', + 'conquest', + 'conquian', + 'conserve', + 'consider', + 'consigne', + 'consoler', + 'consomme', + 'consound', + 'conspire', + 'constant', + 'constate', + 'construe', + 'consular', + 'consumer', + 'contango', + 'contempt', + 'contents', + 'continue', + 'continuo', + 'contline', + 'contract', + 'contrary', + 'contrast', + 'contrate', + 'contrist', + 'contrite', + 'contrive', + 'conusant', + 'convener', + 'converge', + 'converse', + 'convexed', + 'convexly', + 'conveyer', + 'conveyor', + 'convince', + 'convival', + 'convolve', + 'convulse', + 'conylene', + 'conyrine', + 'cookbook', + 'cookmaid', + 'cookroom', + 'cookshop', + 'coolness', + 'cooptate', + 'coordain', + 'cootfoot', + 'copatain', + 'copelata', + 'copepoda', + 'coplanar', + 'copperas', + 'copulate', + 'copyhold', + 'coquetry', + 'coquette', + 'coquille', + 'coracoid', + 'corallin', + 'corallum', + 'coranach', + 'cordelle', + 'cordiner', + 'cordovan', + 'corduroy', + 'cordwain', + 'coreloss', + 'corfiote', + 'coridine', + 'corindon', + 'corkwing', + 'corkwood', + 'cornbind', + 'corncrib', + 'corneous', + 'cornered', + 'cornetcy', + 'corneter', + 'corneule', + 'corniced', + 'cornicle', + 'cornific', + 'cornloft', + 'cornmuse', + 'cornuted', + 'cornutor', + 'corocore', + 'corollet', + 'coronach', + 'coronary', + 'coronate', + 'coronium', + 'coronoid', + 'coronule', + 'corporal', + 'corporas', + 'corridor', + 'corrival', + 'corroval', + 'corselet', + 'cortical', + 'corundum', + 'corvette', + 'corvetto', + 'corybant', + 'corymbed', + 'coryphee', + 'cosecant', + 'cosenage', + 'cosening', + 'cosherer', + 'cosinage', + 'cosmetic', + 'cosmical', + 'cossette', + 'cossical', + 'costated', + 'costless', + 'costlewe', + 'costmary', + 'costumer', + 'cosurety', + 'cotenant', + 'cotillon', + 'cotquean', + 'cotswold', + 'cottaged', + 'cottager', + 'cottised', + 'cotyloid', + 'couchant', + 'couching', + 'coulisse', + 'coumaric', + 'coumarin', + 'coumarou', + 'countess', + 'countour', + 'coupable', + 'coupling', + 'couranto', + 'coursing', + 'courtepy', + 'courtesy', + 'courtier', + 'couscous', + 'cousinly', + 'cousinry', + 'couveuse', + 'covenant', + 'covenous', + 'coventry', + 'coverage', + 'covercle', + 'covering', + 'coverlet', + 'coverlid', + 'covertly', + 'covetise', + 'covetous', + 'covinous', + 'cowalker', + 'cowardie', + 'cowardly', + 'cowberry', + 'cowleech', + 'coworker', + 'cowquake', + 'cowwheat', + 'coxalgia', + 'coxswain', + 'coystrel', + 'cozenage', + 'coziness', + 'crabbing', + 'crabbish', + 'crabtree', + 'crackled', + 'cracknel', + 'cracowes', + 'cradling', + 'craftily', + 'cragsman', + 'cramoisy', + 'crandall', + 'craniota', + 'crannied', + 'crannoge', + 'crantara', + 'crashing', + 'crawfish', + 'crawford', + 'crayfish', + 'creaking', + 'creamery', + 'creasing', + 'creasote', + 'creation', + 'creative', + 'creatrix', + 'creature', + 'crebrous', + 'credence', + 'credible', + 'credibly', + 'creditor', + 'creeping', + 'cremator', + 'cremosin', + 'crenated', + 'crenelle', + 'creolean', + 'creolian', + 'creosote', + 'crepance', + 'crepitus', + 'crescent', + 'crescive', + 'cresting', + 'cresylic', + 'cretacic', + 'cretonne', + 'creutzer', + 'crevalle', + 'crevasse', + 'creviced', + 'cribbage', + 'cribbing', + 'cribrate', + 'cribrose', + 'crimeful', + 'criminal', + 'crimosin', + 'crimpage', + 'crinated', + 'crinital', + 'crinkled', + 'crippled', + 'crippler', + 'crispate', + 'cristate', + 'critical', + 'critique', + 'croatian', + 'croceous', + 'crocetin', + 'crociary', + 'crockery', + 'crocoite', + 'croconic', + 'crofting', + 'croisade', + 'croisado', + 'cromlech', + 'cromorna', + 'cropsick', + 'crossbar', + 'crossbow', + 'crosscut', + 'crossing', + 'crosslet', + 'crossrow', + 'crossway', + 'crotalum', + 'crotalus', + 'crotched', + 'crotchet', + 'crotonic', + 'crottles', + 'crouched', + 'croupade', + 'croupier', + 'croupous', + 'crowfoot', + 'crownlet', + 'crowstep', + 'cruciate', + 'crucible', + 'crucifer', + 'crucifix', + 'crumenal', + 'crunodal', + 'crusader', + 'crushing', + 'crustily', + 'crutched', + 'cryolite', + 'crypturi', + 'cubation', + 'cubatory', + 'cubature', + 'cubdrawn', + 'cubiform', + 'cubilose', + 'cuboidal', + 'cucquean', + 'cucullus', + 'cuculoid', + 'cucumber', + 'cucurbit', + 'cudgeler', + 'culerage', + 'culinary', + 'cullible', + 'cullyism', + 'culminal', + 'culpable', + 'cultrate', + 'cultural', + 'cultured', + 'culverin', + 'cumbrian', + 'cumbrous', + 'cumidine', + 'cumulate', + 'cumulose', + 'cunabula', + 'cuneated', + 'cuneatic', + 'cuniform', + 'cupboard', + 'cupidity', + 'cupreous', + 'cupshake', + 'cupulate', + 'curarine', + 'curarize', + 'curassow', + 'curation', + 'curative', + 'curatrix', + 'curbless', + 'curbroof', + 'curculio', + 'curcumin', + 'curdless', + 'cureless', + 'curlycue', + 'currency', + 'curricle', + 'cursedly', + 'cursitor', + 'cursores', + 'curtalax', + 'curtleax', + 'curtness', + 'curvated', + 'cushiony', + 'cuspated', + 'cuspidal', + 'cuspidor', + 'customer', + 'cutchery', + 'cuteness', + 'cutgrass', + 'cutinize', + 'cutpurse', + 'cutwater', + 'cyanogen', + 'cyanosed', + 'cyanosis', + 'cyanotic', + 'cyanuret', + 'cyanuric', + 'cyclamen', + 'cyclamin', + 'cyclical', + 'cyclonic', + 'cyclopic', + 'cyclosis', + 'cylinder', + 'cymatium', + 'cymbling', + 'cymidine', + 'cymogene', + 'cynanche', + 'cynicism', + 'cynoidea', + 'cynosure', + 'cyrenaic', + 'cyrenian', + 'cystidea', + 'cystitis', + 'cytogeny', + 'czarevna', + 'dabchick', + 'dacotahs', + 'dactylar', + 'dactylet', + 'dactylic', + 'daemonic', + 'daffodil', + 'daftness', + 'dagswain', + 'dahabeah', + 'daintify', + 'daintily', + 'daintrel', + 'dairying', + 'dairyman', + 'dakerhen', + 'dalesman', + 'dalmania', + 'dalmatic', + 'dalsegno', + 'damascus', + 'damasken', + 'damaskin', + 'damassin', + 'damewort', + 'damnable', + 'damnably', + 'damnific', + 'dampness', + 'danalite', + 'dancette', + 'dandriff', + 'dandruff', + 'dandyise', + 'dandyish', + 'dandyism', + 'dandyize', + 'danegeld', + 'danegelt', + 'danewort', + 'danseuse', + 'danubian', + 'darbyite', + 'darkener', + 'darkling', + 'darkness', + 'darksome', + 'darraign', + 'dartrous', + 'dastardy', + 'dateless', + 'dateline', + 'datiscin', + 'datively', + 'datolite', + 'daturine', + 'daughter', + 'dauphine', + 'davylamp', + 'daybreak', + 'daydream', + 'daylight', + 'daywoman', + 'deaconry', + 'deadbeat', + 'deadborn', + 'deadener', + 'deadhead', + 'deadlock', + 'deadness', + 'deadwood', + 'deafness', + 'dealbate', + 'dealfish', + 'deanship', + 'dearborn', + 'dearling', + 'dearness', + 'deathbed', + 'deathful', + 'deaurate', + 'debating', + 'debility', + 'debonair', + 'debouche', + 'debtless', + 'debutant', + 'decadent', + 'decadist', + 'decagram', + 'decanter', + 'decapoda', + 'decatoic', + 'deceased', + 'decedent', + 'deceiver', + 'december', + 'decemfid', + 'decemvir', + 'decigram', + 'decimate', + 'decipher', + 'decipium', + 'decision', + 'decisive', + 'decisory', + 'declarer', + 'declinal', + 'declined', + 'decliner', + 'decorate', + 'decorous', + 'decrease', + 'decrepit', + 'decretal', + 'decurion', + 'dedalian', + 'dedalous', + 'dedicate', + 'dedition', + 'dedolent', + 'deducive', + 'deductor', + 'deedless', + 'deedpoll', + 'deemster', + 'deepness', + 'deerskin', + 'defamous', + 'defecate', + 'defendee', + 'defender', + 'defenser', + 'defensor', + 'deferent', + 'deferrer', + 'defiance', + 'defigure', + 'defilade', + 'definite', + 'deflexed', + 'deflower', + 'defluous', + 'deforest', + 'deformed', + 'deformer', + 'deforser', + 'defrayal', + 'defrayer', + 'deftness', + 'degender', + 'degraded', + 'degrease', + 'dehorter', + 'deifical', + 'deignous', + 'dejected', + 'dejecter', + 'dejectly', + 'dejerate', + 'dejeuner', + 'dekagram', + 'delation', + 'delaware', + 'delectus', + 'delegacy', + 'delegate', + 'deletery', + 'deletion', + 'deletive', + 'deletory', + 'delibate', + 'delicacy', + 'delicate', + 'deligate', + 'deliracy', + 'delirant', + 'delirate', + 'delirium', + 'delivery', + 'delphian', + 'delphine', + 'delsarte', + 'delusion', + 'delusive', + 'delusory', + 'demagogy', + 'demander', + 'demeanor', + 'demented', + 'dementia', + 'demersed', + 'demijohn', + 'demilune', + 'demissly', + 'demisuit', + 'demitint', + 'demitone', + 'demiurge', + 'demivill', + 'demivolt', + 'demiwolf', + 'democrat', + 'demolish', + 'demoness', + 'demoniac', + 'demonial', + 'demonian', + 'demonism', + 'demonist', + 'demonize', + 'demonomy', + 'demorage', + 'demotics', + 'dempster', + 'demurely', + 'demurity', + 'demurral', + 'demurrer', + 'denarius', + 'denature', + 'dendrite', + 'dendroid', + 'denegate', + 'deniable', + 'deniance', + 'denotate', + 'denotive', + 'denounce', + 'dentated', + 'dentelle', + 'dentelli', + 'denticle', + 'dentinal', + 'denudate', + 'departer', + 'depeinct', + 'depender', + 'depeople', + 'deperdit', + 'dephlegm', + 'depilate', + 'depilous', + 'deplorer', + 'depolish', + 'deponent', + 'depraver', + 'depriver', + 'depurant', + 'depurate', + 'deputize', + 'deranged', + 'deranger', + 'derdoing', + 'derelict', + 'dereling', + 'derision', + 'derisive', + 'derisory', + 'derivate', + 'dermatic', + 'derogant', + 'derogate', + 'derworth', + 'describe', + 'descrier', + 'descrive', + 'desecate', + 'deserter', + 'deserver', + 'designer', + 'desilver', + 'desinent', + 'desirous', + 'desition', + 'desitive', + 'deskwork', + 'desolate', + 'despatch', + 'despisal', + 'despiser', + 'despotat', + 'despotic', + 'despread', + 'destinal', + 'destruct', + 'destruie', + 'detached', + 'detailer', + 'detainer', + 'detecter', + 'detector', + 'detester', + 'dethrone', + 'detonate', + 'detonize', + 'detrital', + 'detritus', + 'detteles', + 'devexity', + 'deviator', + 'deviless', + 'deviling', + 'devilish', + 'devilism', + 'devilize', + 'devilkin', + 'deviltry', + 'devolute', + 'devonian', + 'devotary', + 'devotion', + 'devourer', + 'devoutly', + 'dewberry', + 'dewiness', + 'dextrose', + 'dextrous', + 'diabetes', + 'diabetic', + 'diabolic', + 'diaconal', + 'diaglyph', + 'diagnose', + 'diagonal', + 'diagraph', + 'diallage', + 'dialogue', + 'dialysis', + 'dialytic', + 'dialyzed', + 'dialyzer', + 'diameter', + 'diandria', + 'dianthus', + 'diapason', + 'diapente', + 'diaphane', + 'diaphote', + 'diapnoic', + 'diarrhea', + 'diaspora', + 'diaspore', + 'diastase', + 'diastema', + 'diastole', + 'diastyle', + 'diatomic', + 'diatonic', + 'diatribe', + 'diatryma', + 'dibstone', + 'dicacity', + 'dicalcic', + 'dicentra', + 'dichroic', + 'diclinic', + 'dicrotal', + 'dicrotic', + 'dictamen', + 'dictator', + 'dicyemid', + 'didactic', + 'didactyl', + 'didapper', + 'didrachm', + 'didymium', + 'didymous', + 'diecious', + 'diegesis', + 'dielytra', + 'dieresis', + 'diesirae', + 'diestock', + 'dietetic', + 'dietical', + 'diffract', + 'diffused', + 'diffuser', + 'digamist', + 'digamous', + 'digenous', + 'digerent', + 'digester', + 'digestor', + 'diggable', + 'digitate', + 'digitize', + 'digitule', + 'digonous', + 'digynian', + 'digynous', + 'dihedral', + 'dihedron', + 'diiambus', + 'diiodide', + 'dilation', + 'dilative', + 'dilatory', + 'diligent', + 'dilluing', + 'dilution', + 'diluvial', + 'diluvian', + 'diluvium', + 'dimerous', + 'dimethyl', + 'dimetric', + 'diminish', + 'diminute', + 'dimyaria', + 'dinarchy', + 'dingdong', + 'dinnerly', + 'dinornis', + 'dinosaur', + 'dinoxide', + 'diocesan', + 'dioecian', + 'dioecism', + 'diogenes', + 'dioicous', + 'diomedea', + 'dionysia', + 'diopside', + 'dioptase', + 'dioptric', + 'dioramic', + 'dioritic', + 'dipchick', + 'diphenyl', + 'diplanar', + 'diplomat', + 'diplopia', + 'diplopod', + 'dipropyl', + 'dipsetic', + 'dipsosis', + 'dipteral', + 'dipteran', + 'directer', + 'directly', + 'director', + 'direness', + 'dirgeful', + 'dirigent', + 'diriment', + 'dirkness', + 'disabuse', + 'disacryl', + 'disadorn', + 'disagree', + 'disallow', + 'disannex', + 'disannul', + 'disarmed', + 'disarmer', + 'disarray', + 'disaster', + 'disbench', + 'disblame', + 'disbowel', + 'disburse', + 'discandy', + 'discinct', + 'disciple', + 'disclaim', + 'disclame', + 'discloak', + 'disclose', + 'discloud', + 'disclout', + 'discoast', + 'discolor', + 'discompt', + 'discount', + 'discoure', + 'discover', + 'discreet', + 'discrete', + 'discrive', + 'discrown', + 'disdeify', + 'disdeign', + 'diseased', + 'disedify', + 'diselder', + 'disembay', + 'disendow', + 'disenter', + 'disfancy', + 'disfavor', + 'disflesh', + 'disfriar', + 'disfrock', + 'disgavel', + 'disglory', + 'disgorge', + 'disgrace', + 'disgrade', + 'disguise', + 'dishabit', + 'dishable', + 'dishaunt', + 'disheart', + 'disherit', + 'dishevel', + 'dishonor', + 'dishorse', + 'dishouse', + 'dishumor', + 'disinter', + 'disinure', + 'disjoint', + 'disjunct', + 'diskless', + 'disleave', + 'disliken', + 'disliker', + 'dislodge', + 'disloign', + 'disloyal', + 'dismally', + 'dismarch', + 'dismarry', + 'dismount', + 'disorder', + 'dispatch', + 'dispathy', + 'dispence', + 'dispense', + 'disperge', + 'disperse', + 'dispirit', + 'displace', + 'displant', + 'displode', + 'displume', + 'disponee', + 'disponer', + 'disponge', + 'disposal', + 'disposed', + 'disposer', + 'dispread', + 'disprize', + 'disproof', + 'disprove', + 'dispunct', + 'dispunge', + 'dispurse', + 'disputer', + 'disquiet', + 'disrange', + 'disrober', + 'disseize', + 'disserve', + 'dissever', + 'dissolve', + 'dissuade', + 'distally', + 'distance', + 'distancy', + 'distaste', + 'disthene', + 'distinct', + 'distitle', + 'distract', + 'distrain', + 'distrait', + 'distream', + 'distress', + 'district', + 'distrust', + 'disunion', + 'disunite', + 'disunity', + 'disusage', + 'disvalue', + 'disvelop', + 'disvouch', + 'disworth', + 'ditation', + 'dithecal', + 'ditheism', + 'ditheist', + 'ditokous', + 'ditroite', + 'diureide', + 'diuresis', + 'diuretic', + 'divalent', + 'diverter', + 'dividant', + 'dividend', + 'divident', + 'dividing', + 'dividual', + 'divinely', + 'divinify', + 'divining', + 'divinity', + 'divinize', + 'division', + 'divisive', + 'divorcee', + 'divorcer', + 'dobchick', + 'docetism', + 'dochmiac', + 'dochmius', + 'docility', + 'docimacy', + 'dockyard', + 'doctoral', + 'doctorly', + 'doctress', + 'doctrine', + 'document', + 'doddered', + 'dodecane', + 'dodipate', + 'dodipoll', + 'doegling', + 'dogberry', + 'dogeless', + 'doggedly', + 'doggerel', + 'dogmatic', + 'dogshore', + 'dogsleep', + 'dogtooth', + 'dogtrick', + 'dogwatch', + 'doldrums', + 'dolerite', + 'dolesome', + 'doliolum', + 'dolomite', + 'dolomize', + 'doloroso', + 'dolorous', + 'domanial', + 'domebook', + 'domesday', + 'domesman', + 'domestic', + 'domicile', + 'dominant', + 'dominate', + 'domineer', + 'dominion', + 'donatary', + 'donation', + 'donatism', + 'donatist', + 'donative', + 'donatory', + 'doncella', + 'doompalm', + 'doomsday', + 'doomsman', + 'doomster', + 'doorcase', + 'doorless', + 'doornail', + 'doorpost', + 'doorsill', + 'doorstep', + 'doorstop', + 'dooryard', + 'doretree', + 'doricism', + 'dormancy', + 'dormouse', + 'dorrhawk', + 'dorsally', + 'dosology', + 'dotardly', + 'dotation', + 'dotehead', + 'dotterel', + 'douanier', + 'doublets', + 'doubling', + 'doubloon', + 'doublure', + 'doubtful', + 'doubting', + 'doubtous', + 'doughnut', + 'doumpalm', + 'dovecote', + 'dovelike', + 'doveship', + 'dovetail', + 'dowdyish', + 'downbear', + 'downcast', + 'downcome', + 'downfall', + 'downhaul', + 'downhill', + 'downpour', + 'downtrod', + 'downward', + 'downweed', + 'doxology', + 'doziness', + 'drabbish', + 'drabbler', + 'dracaena', + 'dracanth', + 'draconic', + 'draconin', + 'draffish', + 'dragbolt', + 'dragline', + 'draglink', + 'dragoman', + 'dragonet', + 'dragrope', + 'drainage', + 'draining', + 'dramatic', + 'dramming', + 'dramshop', + 'draughts', + 'draughty', + 'drawable', + 'drawback', + 'drawbolt', + 'drawbore', + 'drawgear', + 'drawhead', + 'drawling', + 'drawlink', + 'drawloom', + 'dreadful', + 'dreamful', + 'dreamily', + 'drearily', + 'drearing', + 'dreggish', + 'dreibund', + 'drencher', + 'drengage', + 'dressing', + 'dribbler', + 'dribblet', + 'driftage', + 'driftpin', + 'driftway', + 'drilling', + 'drinking', + 'dripping', + 'driveler', + 'driveway', + 'drofland', + 'drogoman', + 'drollery', + 'drollish', + 'drollist', + 'dronebee', + 'dronefly', + 'dropmeal', + 'dropmele', + 'dropping', + 'dropsied', + 'dropwise', + 'dropworm', + 'dropwort', + 'drotchel', + 'droughty', + 'drownage', + 'drowsily', + 'drudgery', + 'druggist', + 'drugster', + 'druidess', + 'druidish', + 'druidism', + 'drumbeat', + 'drumfish', + 'drumhead', + 'drumming', + 'drunkard', + 'drupelet', + 'dryandra', + 'dryfland', + 'drygoods', + 'drynurse', + 'dubitate', + 'duboisia', + 'ducatoon', + 'duckbill', + 'duckling', + 'duckmeat', + 'duckweed', + 'ductible', + 'ductless', + 'duettino', + 'dukeling', + 'dukeship', + 'dulciana', + 'dulcimer', + 'dulcinea', + 'dullhead', + 'dullness', + 'dullsome', + 'dulwilly', + 'dumbness', + 'dumetose', + 'dumfound', + 'dummador', + 'dummerer', + 'dumpling', + 'duncedom', + 'duncical', + 'dungaree', + 'dungfork', + 'dunghill', + 'dungmeer', + 'dungyard', + 'duodenal', + 'duodenum', + 'duograph', + 'duration', + 'durative', + 'dureless', + 'duressor', + 'durukuli', + 'duskness', + 'dustless', + 'dutchman', + 'dutiable', + 'dwarfish', + 'dwelling', + 'dyehouse', + 'dyestuff', + 'dynamics', + 'dynamism', + 'dynamist', + 'dynamite', + 'dynastic', + 'dyscrasy', + 'dysluite', + 'dyslysin', + 'dysodile', + 'dyspepsy', + 'dysphagy', + 'dysphony', + 'dyspnoea', + 'dyspnoic', + 'dystocia', + 'eariness', + 'earlduck', + 'earreach', + 'earthbag', + 'earthdin', + 'earthmad', + 'earthnut', + 'earthpea', + 'easeless', + 'easement', + 'easiness', + 'easterly', + 'eastward', + 'eaudevie', + 'eauforte', + 'eavedrop', + 'ebionite', + 'eburnean', + 'eburnine', + 'ecaudate', + 'ecboline', + 'eccehomo', + 'ecclesia', + 'eccritic', + 'ecgonine', + 'echinate', + 'echinite', + 'echinoid', + 'echoless', + 'eclampsy', + 'eclectic', + 'ecliptic', + 'eclogite', + 'economic', + 'ecostate', + 'ecphasis', + 'ecraseur', + 'ecstatic', + 'ectental', + 'ectocyst', + 'ectoderm', + 'ectomere', + 'ectosarc', + 'ectozoic', + 'ectozoon', + 'ectrotic', + 'ecumenic', + 'edacious', + 'eddykite', + 'edenized', + 'edentata', + 'edentate', + 'edgebone', + 'edgeless', + 'edgelong', + 'edgeshot', + 'edgeways', + 'edgewise', + 'edgingly', + 'edifying', + 'editress', + 'edituate', + 'educable', + 'educated', + 'educator', + 'educible', + 'eduction', + 'eductive', + 'edulious', + 'eelgrass', + 'eelspear', + 'eerisome', + 'effecter', + 'effector', + 'efferent', + 'efferous', + 'efficacy', + 'effierce', + 'effigial', + 'effigies', + 'efflower', + 'effluent', + 'effusion', + 'effusive', + 'eftsoons', + 'egestion', + 'eggement', + 'eggplant', + 'eggshell', + 'eglatere', + 'egoistic', + 'egophony', + 'egremoin', + 'egressor', + 'egrimony', + 'egritude', + 'egyptian', + 'egyptize', + 'eighteen', + 'eighthly', + 'eikosane', + 'ejection', + 'ekaboron', + 'elaidate', + 'elaiodic', + 'elamping', + 'elaolite', + 'elaphine', + 'elaphure', + 'elapsion', + 'elatedly', + 'elderish', + 'eldorado', + 'eldritch', + 'electant', + 'electary', + 'election', + 'elective', + 'electric', + 'electron', + 'electrum', + 'elegance', + 'elegancy', + 'elegiast', + 'elenchus', + 'elenctic', + 'elephant', + 'elevated', + 'elevator', + 'eleventh', + 'elfishly', + 'eligible', + 'eligibly', + 'elinguid', + 'ellebore', + 'ellipsis', + 'elliptic', + 'elocular', + 'eloinate', + 'elongate', + 'eloquent', + 'elsewise', + 'eluctate', + 'eludible', + 'elvanite', + 'elvishly', + 'elytroid', + 'emaciate', + 'embalmer', + 'embattle', + 'embetter', + 'embezzle', + 'embillow', + 'embitter', + 'emblanch', + 'emblazon', + 'embodier', + 'embolden', + 'embolism', + 'embolite', + 'emborder', + 'embossed', + 'embosser', + 'embottle', + 'embracer', + 'embright', + 'embronze', + 'embroude', + 'embrowde', + 'embroyde', + 'embryous', + 'emergent', + 'emerited', + 'emeritus', + 'emeroids', + 'emersion', + 'emetical', + 'emiction', + 'emictory', + 'emigrant', + 'emigrate', + 'eminence', + 'eminency', + 'emirship', + 'emissary', + 'emission', + 'emissive', + 'emissory', + 'emittent', + 'emmantle', + 'emmanuel', + 'emmarble', + 'empeople', + 'emperess', + 'emperice', + 'emphasis', + 'emphatic', + 'empierce', + 'employee', + 'employer', + 'emplumed', + 'emplunge', + 'empoison', + 'emporium', + 'emprison', + 'emptying', + 'empurple', + 'empuzzle', + 'empyesis', + 'empyreal', + 'empyrean', + 'emulable', + 'emulator', + 'emulgent', + 'emulsify', + 'emulsion', + 'emulsive', + 'enactive', + 'enacture', + 'enallage', + 'enambush', + 'enamelar', + 'enameled', + 'enameler', + 'enarched', + 'enargite', + 'enascent', + 'enaunter', + 'enbroude', + 'encaenia', + 'encanker', + 'encarpus', + 'enceinte', + 'encharge', + 'enchaser', + 'encheson', + 'enchisel', + 'enchodus', + 'enchoric', + 'encircle', + 'enclitic', + 'enclothe', + 'encoffin', + 'encolden', + 'encollar', + 'encolure', + 'encomber', + 'encomion', + 'encomium', + 'encradle', + 'encrease', + 'encrinal', + 'encrinic', + 'encrinus', + 'encroach', + 'encumber', + 'encyclic', + 'encysted', + 'endamage', + 'endanger', + 'endazzle', + 'endeavor', + 'endecane', + 'endeixis', + 'endemial', + 'endenize', + 'endermic', + 'endiaper', + 'endocarp', + 'endocyst', + 'endoderm', + 'endogamy', + 'endogeny', + 'endorsee', + 'endorser', + 'endosarc', + 'endrudge', + 'endurant', + 'enduring', + 'energize', + 'enervate', + 'enervous', + 'enfamish', + 'enfeeble', + 'enfester', + 'enfetter', + 'enfierce', + 'enfilade', + 'enflower', + 'enforced', + 'enforcer', + 'enforest', + 'enfreeze', + 'engaging', + 'engender', + 'engineer', + 'enginery', + 'enginous', + 'engirdle', + 'engorged', + 'engouled', + 'engoulee', + 'engraved', + 'engraver', + 'engregge', + 'engrieve', + 'enhancer', + 'enharbor', + 'enharden', + 'enhunger', + 'enhydros', + 'enjoiner', + 'enkennel', + 'enkindle', + 'enlarged', + 'enlarger', + 'enlumine', + 'enmanche', + 'enmarble', + 'enmossed', + 'enmuffle', + 'ennation', + 'enneagon', + 'enneatic', + 'ennobler', + 'enormity', + 'enormous', + 'enpatron', + 'enpierce', + 'enquirer', + 'enravish', + 'enricher', + 'enroller', + 'ensample', + 'ensconce', + 'ensearch', + 'ensemble', + 'enshield', + 'enshrine', + 'enshroud', + 'ensiform', + 'ensigncy', + 'ensilage', + 'enslaver', + 'ensphere', + 'ensuable', + 'enswathe', + 'entackle', + 'entangle', + 'entastic', + 'entellus', + 'entender', + 'entheasm', + 'enthetic', + 'enthrall', + 'enthrill', + 'enthrone', + 'enticing', + 'entierty', + 'entirely', + 'entirety', + 'entitule', + 'entoderm', + 'entomere', + 'entomoid', + 'entoptic', + 'entozoal', + 'entozoic', + 'entozoon', + 'entrails', + 'entrance', + 'entreaty', + 'entrench', + 'entrepot', + 'entresol', + 'enuresis', + 'envassal', + 'enveigle', + 'envelope', + 'envenime', + 'enviable', + 'environs', + 'envisage', + 'envolume', + 'enwallow', + 'enzootic', + 'eolipile', + 'eophytic', + 'eosaurus', + 'eozoonal', + 'epagogic', + 'epanodos', + 'ependyma', + 'epenetic', + 'ephemera', + 'ephesian', + 'epiblast', + 'epiblema', + 'epibolic', + 'epicoele', + 'epicoene', + 'epicolic', + 'epicycle', + 'epidemic', + 'epidotic', + 'epigeous', + 'epigraph', + 'epilepsy', + 'epilogic', + 'epilogue', + 'epimeral', + 'epimeron', + 'epiornis', + 'epiphany', + 'epiphora', + 'epiphyte', + 'epiploce', + 'epiploic', + 'epiploon', + 'epipolic', + 'epipubic', + 'epipubis', + 'episcopy', + 'episodal', + 'episodic', + 'episperm', + 'epispore', + 'epistler', + 'epistoma', + 'epistome', + 'epistyle', + 'epitasis', + 'epitheca', + 'epithema', + 'epithite', + 'epitrite', + 'epitrope', + 'epizooen', + 'epizooty', + 'eponymic', + 'epopoeia', + 'epsomite', + 'epulotic', + 'equality', + 'equalize', + 'equation', + 'equiform', + 'equipage', + 'equitant', + 'equivoke', + 'eradiate', + 'erasable', + 'erastian', + 'erectile', + 'erection', + 'erective', + 'eremitic', + 'ereption', + 'erethism', + 'erewhile', + 'ergmeter', + 'ergotine', + 'ergotism', + 'ericinol', + 'ericolin', + 'eridanus', + 'erigible', + 'erminois', + 'erotesis', + 'erotical', + 'errabund', + 'errantia', + 'errantry', + 'erration', + 'errorful', + 'errorist', + 'eructate', + 'erudiate', + 'erumpent', + 'eruption', + 'eruptive', + 'eryngium', + 'erythema', + 'erythric', + 'erythrin', + 'escalade', + 'escallop', + 'escambio', + 'escapade', + 'eschalot', + 'eschevin', + 'eschewer', + 'escorial', + 'escouade', + 'escribed', + 'esculent', + 'escurial', + 'esoteric', + 'espalier', + 'esparcet', + 'especial', + 'espousal', + 'espouser', + 'esquimau', + 'esquisse', + 'essayist', + 'essenism', + 'essoiner', + 'essonite', + 'essorant', + 'estacade', + 'estancia', + 'esteemer', + 'esthetic', + 'estimate', + 'estivate', + 'estoppel', + 'estovers', + 'estrange', + 'estuance', + 'esurient', + 'etcetera', + 'eteostic', + 'eternify', + 'eternity', + 'eternize', + 'ethereal', + 'etherize', + 'ethicist', + 'ethidene', + 'ethionic', + 'ethiopic', + 'ethnarch', + 'ethnical', + 'ethology', + 'ethylate', + 'ethylene', + 'etiolate', + 'etiology', + 'etrurian', + 'etruscan', + 'etypical', + 'eucharis', + 'euchroic', + 'euchrone', + 'euctical', + 'eudaemon', + 'eudoxian', + 'eugenics', + 'eugubian', + 'eugubine', + 'eulachon', + 'eulerian', + 'eulogist', + 'eulogium', + 'eulogize', + 'eulytite', + 'eumolpus', + 'eunomian', + 'euonymin', + 'euonymus', + 'eupatrid', + 'eupepsia', + 'eupeptic', + 'euphonic', + 'euphonon', + 'euphrasy', + 'euphuism', + 'euphuist', + 'euphuize', + 'eupryion', + 'eupyrion', + 'eurafric', + 'eurasian', + 'euripize', + 'european', + 'europium', + 'eurythmy', + 'eusebian', + 'eutectic', + 'eutrophy', + 'euxenite', + 'evacuant', + 'evacuate', + 'evadible', + 'evaluate', + 'evanesce', + 'evangely', + 'evangile', + 'evasible', + 'evectics', + 'evection', + 'evenfall', + 'evenhand', + 'evenness', + 'evensong', + 'eventful', + 'eventide', + 'eventual', + 'evermore', + 'eversion', + 'eversive', + 'everyday', + 'everyone', + 'evesdrop', + 'evibrate', + 'eviction', + 'evidence', + 'evilness', + 'evincive', + 'evitable', + 'evocator', + 'evolatic', + 'evolvent', + 'evulgate', + 'evulsion', + 'exacting', + 'exaction', + 'exacuate', + 'exaltate', + 'examinee', + 'examiner', + 'exampler', + 'exanthem', + 'excambie', + 'excavate', + 'excecate', + 'excedent', + 'exceeder', + 'exceptor', + 'exchange', + 'excision', + 'excitant', + 'excitate', + 'exciting', + 'excitive', + 'excreate', + 'excretin', + 'excursus', + 'execrate', + 'exection', + 'executer', + 'executor', + 'exegesis', + 'exegetic', + 'exemplar', + 'exequial', + 'exercent', + 'exercise', + 'exertion', + 'exertive', + 'exhalant', + 'exhorter', + 'exiccate', + 'exigence', + 'exigency', + 'exigible', + 'exiguity', + 'exiguous', + 'eximious', + 'existent', + 'exitious', + 'exlibris', + 'exocetus', + 'exoplasm', + 'exoptile', + 'exorable', + 'exorcise', + 'exorcism', + 'exorcist', + 'exordial', + 'exordium', + 'exorhiza', + 'exortive', + 'exosmose', + 'exospore', + 'exossate', + 'exostome', + 'exoteric', + 'exotheca', + 'exotical', + 'expander', + 'expecter', + 'expedite', + 'expeller', + 'expertly', + 'expiable', + 'expiator', + 'expirant', + 'expiring', + 'explicit', + 'exploder', + 'explorer', + 'expolish', + 'exponent', + 'exporter', + 'exposure', + 'expugner', + 'expulser', + 'exscribe', + 'exscript', + 'exserted', + 'extender', + 'extensor', + 'exterior', + 'external', + 'extirper', + 'extoller', + 'extorter', + 'extrados', + 'extrorse', + 'exuccous', + 'exultant', + 'exulting', + 'exundate', + 'exurgent', + 'exustion', + 'exuviate', + 'eyeglass', + 'eyepiece', + 'eyereach', + 'eyesaint', + 'eyesalve', + 'eyesight', + 'eyestalk', + 'eyestone', + 'eyetooth', + 'eyewater', + 'fabulist', + 'fabulize', + 'fabulous', + 'faburden', + 'facetiae', + 'facework', + 'facility', + 'facingly', + 'factious', + 'factotum', + 'fadeless', + 'fahlband', + 'failance', + 'faineant', + 'fainting', + 'faintish', + 'fairhood', + 'fairness', + 'faithful', + 'falanaka', + 'falcated', + 'falchion', + 'falconer', + 'falconet', + 'falconry', + 'fallency', + 'fallfish', + 'fallible', + 'fallibly', + 'falsetto', + 'fameless', + 'familiar', + 'familism', + 'familist', + 'famosity', + 'famoused', + 'famously', + 'famulate', + 'famulist', + 'fanatism', + 'fanciful', + 'fandango', + 'fanfaron', + 'fangless', + 'fantasia', + 'fantigue', + 'fantique', + 'faradism', + 'faradize', + 'farantly', + 'farcical', + 'farcimen', + 'farctate', + 'farewell', + 'farfetch', + 'farinose', + 'farmable', + 'farmyard', + 'farriery', + 'farthest', + 'farthing', + 'fasciate', + 'fascicle', + 'fasciola', + 'fasciole', + 'fassaite', + 'fastener', + 'fastness', + 'fastuous', + 'fatalism', + 'fatalist', + 'fatality', + 'fatherly', + 'fathomer', + 'fatigate', + 'fatimide', + 'fatimite', + 'fattener', + 'faubourg', + 'fauchion', + 'faultful', + 'faultily', + 'faulting', + 'fauteuil', + 'fautress', + 'fauvette', + 'favonian', + 'favoress', + 'favoring', + 'favorite', + 'favosite', + 'fayalite', + 'fazzolet', + 'feaberry', + 'fearless', + 'fearsome', + 'feasible', + 'feastful', + 'feateous', + 'feathery', + 'featness', + 'featured', + 'feazings', + 'febrific', + 'february', + 'fecifork', + 'feckless', + 'feculent', + 'federary', + 'federate', + 'feetless', + 'feigning', + 'feldspar', + 'felicify', + 'felicity', + 'fellable', + 'fellfare', + 'fellinic', + 'fellness', + 'fellowly', + 'felonous', + 'felsitic', + 'felspath', + 'felstone', + 'femalist', + 'femalize', + 'femerell', + 'feminate', + 'feminine', + 'feminity', + 'feminize', + 'fenceful', + 'fencible', + 'fenerate', + 'fenestra', + 'feracity', + 'ferdness', + 'feretory', + 'ferforth', + 'feringee', + 'ferocity', + 'ferreous', + 'ferreter', + 'ferretto', + 'ferriage', + 'ferryman', + 'fervence', + 'fervency', + 'fesswise', + 'festally', + 'festival', + 'festlich', + 'festoony', + 'fetation', + 'feticide', + 'feticism', + 'fetidity', + 'fetisely', + 'fettered', + 'fetterer', + 'fettling', + 'feudally', + 'feuterer', + 'feverfew', + 'feverish', + 'feverous', + 'fibrilla', + 'fibulare', + 'fictious', + 'fidelity', + 'fiducial', + 'fielding', + 'fiendful', + 'fiendish', + 'fiftieth', + 'figeater', + 'fighting', + 'figulate', + 'figuline', + 'figurant', + 'figurate', + 'figurial', + 'figurine', + 'figurist', + 'filament', + 'filander', + 'filarial', + 'filatory', + 'filature', + 'filefish', + 'filially', + 'filicide', + 'filicoid', + 'filiform', + 'filigree', + 'filioque', + 'filipino', + 'fillibeg', + 'filthily', + 'filtrate', + 'finalist', + 'finality', + 'finative', + 'findable', + 'finedraw', + 'fineless', + 'fineness', + 'finespun', + 'fingered', + 'fingerer', + 'fingrigo', + 'finished', + 'finisher', + 'finitely', + 'finitude', + 'finnikin', + 'finochio', + 'fireback', + 'fireball', + 'firebare', + 'firebird', + 'firebote', + 'firefish', + 'fireless', + 'firelock', + 'fireroom', + 'fireside', + 'firetail', + 'fireweed', + 'firewood', + 'firework', + 'fireworm', + 'firmless', + 'firmness', + 'fishhawk', + 'fishhook', + 'fishlike', + 'fishskin', + 'fishwife', + 'fissiped', + 'fissural', + 'fistinut', + 'fistular', + 'fittable', + 'fivefold', + 'fiveling', + 'fixation', + 'fixative', + 'fixidity', + 'flabbily', + 'flagging', + 'flagrant', + 'flagrate', + 'flagship', + 'flagworm', + 'flambeau', + 'flamelet', + 'flamingo', + 'flanched', + 'flanerie', + 'flapjack', + 'flashily', + 'flashing', + 'flatbill', + 'flatboat', + 'flatfish', + 'flatfoot', + 'flathead', + 'flatiron', + 'flatling', + 'flatlong', + 'flatness', + 'flattery', + 'flatting', + 'flattish', + 'flatuous', + 'flatware', + 'flatwise', + 'flatworm', + 'flautist', + 'flavored', + 'flawless', + 'flaxseed', + 'flaxweed', + 'fleabane', + 'fleaking', + 'fleawort', + 'flection', + 'fleeting', + 'fleshpot', + 'fletcher', + 'flexible', + 'flexuose', + 'flexuous', + 'flexural', + 'flighted', + 'flighter', + 'flimflam', + 'flimsily', + 'flincher', + 'flinders', + 'flippant', + 'flittern', + 'flitting', + 'floatage', + 'floating', + 'floccose', + 'floccule', + 'flockmel', + 'flogging', + 'floodage', + 'flooding', + 'floorage', + 'flooring', + 'flopwing', + 'florally', + 'florence', + 'floriage', + 'floridly', + 'floriken', + 'florimer', + 'floscule', + 'flotilla', + 'flounder', + 'flourish', + 'flowerer', + 'floweret', + 'fluently', + 'fluepipe', + 'fluework', + 'fluidity', + 'fluidize', + 'flummery', + 'fluorene', + 'fluoride', + 'fluorine', + 'fluorite', + 'fluoroid', + 'fluorous', + 'flurried', + 'flushing', + 'fluxible', + 'fluxions', + 'flyblown', + 'flyspeck', + 'flytting', + 'foalfoot', + 'foamless', + 'focalize', + 'fodderer', + 'foilable', + 'foistied', + 'folderol', + 'foldless', + 'foliaged', + 'foliated', + 'folkland', + 'folklore', + 'folkmote', + 'follicle', + 'folliful', + 'follower', + 'fomenter', + 'fondling', + 'fondness', + 'fontanel', + 'fontange', + 'foodless', + 'foolfish', + 'foolscap', + 'football', + 'footband', + 'footbath', + 'footfall', + 'foothalt', + 'foothill', + 'foothold', + 'foothook', + 'footless', + 'footmark', + 'footnote', + 'footpace', + 'footpath', + 'footrope', + 'footstep', + 'footworn', + 'foralite', + 'forbathe', + 'forblack', + 'forboden', + 'forborne', + 'forcarve', + 'forceful', + 'forcible', + 'forcibly', + 'forcipal', + 'fordable', + 'fordless', + 'fordrive', + 'fordwine', + 'forebeam', + 'forebear', + 'forebode', + 'forecast', + 'foredate', + 'foredeck', + 'foredeem', + 'foredoom', + 'forefeel', + 'forefend', + 'foreflow', + 'forefoot', + 'foregame', + 'foregift', + 'foregoer', + 'forehand', + 'forehead', + 'forehear', + 'forehend', + 'forehold', + 'forehook', + 'foreknow', + 'foreland', + 'forelend', + 'forelift', + 'forelock', + 'forelook', + 'foremast', + 'foremilk', + 'foremost', + 'forename', + 'forenoon', + 'forensal', + 'forensic', + 'forepart', + 'forepast', + 'forerank', + 'foreread', + 'foresaid', + 'foresail', + 'foreseen', + 'foreseer', + 'foreshew', + 'foreship', + 'foreshot', + 'foreshow', + 'foreside', + 'foreskin', + 'foreslow', + 'forestal', + 'forestay', + 'forester', + 'forestry', + 'foretell', + 'foretime', + 'foreward', + 'forewarn', + 'forewend', + 'forewish', + 'forewite', + 'foreword', + 'foreworn', + 'foreyard', + 'forfered', + 'forgeman', + 'forgiver', + 'forkerve', + 'forkless', + 'forktail', + 'forleave', + 'formalin', + 'formally', + 'formedon', + 'formeret', + 'formerly', + 'formicid', + 'formless', + 'forncast', + 'fornical', + 'forsaker', + 'forshape', + 'forslack', + 'forsooth', + 'forspeak', + 'forspent', + 'forstall', + 'forswear', + 'forswonk', + 'forswore', + 'forsworn', + 'forthink', + 'fortieth', + 'fortread', + 'fortress', + 'fortuity', + 'forwaked', + 'forwards', + 'forwaste', + 'forweary', + 'foryelde', + 'forzando', + 'fossette', + 'fosseway', + 'fossores', + 'fossoria', + 'fosterer', + 'fostress', + 'fougasse', + 'foughten', + 'foulness', + 'foundery', + 'founding', + 'fountain', + 'fountful', + 'fourfold', + 'fourling', + 'fourneau', + 'fourrier', + 'foursome', + 'fourteen', + 'fourthly', + 'foxearth', + 'foxglove', + 'foxhound', + 'foxiness', + 'foziness', + 'fraction', + 'fracture', + 'fragment', + 'fragrant', + 'framable', + 'frampoid', + 'frangent', + 'franking', + 'frankish', + 'franklin', + 'frapping', + 'fratrage', + 'fraudful', + 'fraulein', + 'fraxinus', + 'freaking', + 'freakish', + 'freckled', + 'freeborn', + 'freedman', + 'freehold', + 'freeness', + 'freewill', + 'freezing', + 'freiherr', + 'fremitus', + 'frenetic', + 'frenzied', + 'frequent', + 'frescade', + 'freshman', + 'fretwork', + 'friation', + 'fribbler', + 'friborgh', + 'fricando', + 'friction', + 'fridstol', + 'friended', + 'friendly', + 'friesish', + 'frighten', + 'frigidly', + 'frimaire', + 'fringent', + 'frippery', + 'frisette', + 'friskful', + 'friskily', + 'fritting', + 'frizette', + 'frizzler', + 'frogfish', + 'frolicky', + 'frolicly', + 'fromward', + 'frondent', + 'frondeur', + 'frondlet', + 'frondose', + 'frondous', + 'frontage', + 'frontate', + 'frontier', + 'frontlet', + 'froppish', + 'frostbow', + 'frostily', + 'frosting', + 'froterer', + 'frothily', + 'frothing', + 'froufrou', + 'fructify', + 'fructose', + 'fructure', + 'frugally', + 'fruitage', + 'fruitery', + 'fruitful', + 'fruiting', + 'fruition', + 'fruitive', + 'frumenty', + 'frumpish', + 'frustule', + 'fuchsine', + 'fucoidal', + 'fugacity', + 'fughetta', + 'fugitive', + 'fugleman', + 'fulcible', + 'fulcrate', + 'fulgency', + 'fulimart', + 'fullmart', + 'fullness', + 'fulminic', + 'fulsamic', + 'fumarate', + 'fumarine', + 'fumarole', + 'fumatory', + 'fumedoak', + 'fumeless', + 'fumerell', + 'fumetere', + 'fumidity', + 'fumigant', + 'fumigate', + 'fumingly', + 'fumitory', + 'fumosity', + 'function', + 'fundable', + 'fundless', + 'funerate', + 'funereal', + 'furacity', + 'furbelow', + 'furcated', + 'furcular', + 'furculum', + 'furfuran', + 'furfurol', + 'furlough', + 'furmonty', + 'furriery', + 'furthest', + 'furuncle', + 'fusarole', + 'fuselage', + 'fuseloil', + 'fuseplug', + 'fusiform', + 'fusileer', + 'fusilier', + 'fusteric', + 'fustilug', + 'futilely', + 'futility', + 'futilous', + 'futurely', + 'futurism', + 'futurist', + 'futurity', + 'fuzeplug', + 'gabarage', + 'gabioned', + 'gadabout', + 'gadhelic', + 'gagtooth', + 'gaillard', + 'gainable', + 'gainless', + 'gainpain', + 'gainsome', + 'gairfowl', + 'galactic', + 'galactin', + 'galangal', + 'galatian', + 'galbanum', + 'galeated', + 'galenism', + 'galenist', + 'galenite', + 'galerite', + 'galician', + 'galilean', + 'galleass', + 'gallegan', + 'galliard', + 'galliass', + 'gallican', + 'gallinae', + 'gallipot', + 'gallivat', + 'galloper', + 'gallopin', + 'galloway', + 'galvanic', + 'gamashes', + 'gambeson', + 'gambison', + 'gambogic', + 'gambroon', + 'gamecock', + 'gamefowl', + 'gameless', + 'gameness', + 'gamesome', + 'gamester', + 'gangetic', + 'gangliac', + 'ganglial', + 'ganglion', + 'gangrene', + 'ganister', + 'ganoidal', + 'ganoidei', + 'gantline', + 'gantlope', + 'gapeseed', + 'gapesing', + 'gapeworm', + 'garancin', + 'garboard', + 'garcinia', + 'gardener', + 'gardenia', + 'gardenly', + 'gardyloo', + 'garefowl', + 'garganey', + 'gargoyle', + 'garlicky', + 'garookuh', + 'garreted', + 'garrison', + 'garroter', + 'gasalier', + 'gaselier', + 'gasiform', + 'gaslight', + 'gasolene', + 'gasolier', + 'gasoline', + 'gastight', + 'gastness', + 'gastraea', + 'gastrula', + 'gastrura', + 'gateless', + 'gatepost', + 'gatewise', + 'gatherer', + 'gaudless', + 'gauntlet', + 'gauntree', + 'gaussage', + 'gavelock', + 'gaverick', + 'gawntree', + 'gaydiang', + 'gazement', + 'gazogene', + 'gelastic', + 'gelatine', + 'gelation', + 'geldable', + 'gelidity', + 'gelsemic', + 'gemarist', + 'geminate', + 'geminous', + 'gemmated', + 'gemmeous', + 'gendarme', + 'genearch', + 'generant', + 'generate', + 'generous', + 'genesial', + 'genevese', + 'genially', + 'genitals', + 'geniting', + 'genitive', + 'geniture', + 'genterie', + 'gentilly', + 'gentisin', + 'geodesic', + 'geodetic', + 'geognost', + 'geognosy', + 'geogonic', + 'geolatry', + 'geologer', + 'geologic', + 'geomancy', + 'geometer', + 'geometry', + 'geophila', + 'geoponic', + 'georgian', + 'geoscopy', + 'gephyrea', + 'geranine', + 'geranium', + 'gerbille', + 'germanic', + 'germcell', + 'germinal', + 'germless', + 'germogen', + 'gerocomy', + 'gerontes', + 'gestural', + 'gettable', + 'getterup', + 'geusdism', + 'ghastful', + 'ghoulish', + 'giambeux', + 'giantess', + 'giantize', + 'gibbsite', + 'gibingly', + 'gibstaff', + 'giffgaff', + 'gigantic', + 'gigerium', + 'gilthead', + 'gilttail', + 'gimcrack', + 'gingerly', + 'gingival', + 'ginhouse', + 'gipsyism', + 'girasole', + 'girlhood', + 'girtline', + 'glabella', + 'glabrate', + 'glabrity', + 'glabrous', + 'glaciate', + 'glacious', + 'gladiate', + 'gladiole', + 'gladness', + 'gladship', + 'gladsome', + 'glancing', + 'glandage', + 'glanders', + 'glandule', + 'glareous', + 'glasseye', + 'glassful', + 'glassily', + 'glassite', + 'glasynge', + 'glaucine', + 'glaucoma', + 'glaucous', + 'glaverer', + 'glaymore', + 'gleaning', + 'gleeclub', + 'gleesome', + 'glibbery', + 'glibness', + 'gliddery', + 'glissade', + 'gloaming', + 'globated', + 'globular', + 'globulet', + 'globulin', + 'glonoine', + 'gloomily', + 'glooming', + 'gloriole', + 'gloriosa', + 'glorioso', + 'glorious', + 'glossary', + 'glossata', + 'glossily', + 'glossist', + 'glowbard', + 'glowlamp', + 'glowworm', + 'gloxinia', + 'glucinic', + 'glucinum', + 'glucogen', + 'gluconic', + 'glumella', + 'glumelle', + 'glumness', + 'glutaeus', + 'glutamic', + 'glutaric', + 'gluttony', + 'glyceric', + 'glycerin', + 'glycerol', + 'glyceryl', + 'glycidic', + 'glycocin', + 'glycogen', + 'glycolic', + 'glycolyl', + 'glyconic', + 'glyconin', + 'glyoxime', + 'glyptics', + 'gnathite', + 'gnatling', + 'gnatworm', + 'gneissic', + 'gnomical', + 'gnomonic', + 'goatfish', + 'goatherd', + 'goatlike', + 'goatskin', + 'gobbetly', + 'gobstick', + 'godchild', + 'godelich', + 'godspeed', + 'goethite', + 'goitered', + 'goitrous', + 'goldenly', + 'goldfish', + 'goldless', + 'goldseed', + 'golgotha', + 'gomarist', + 'gomarite', + 'gommelin', + 'gondolet', + 'goneness', + 'gonfalon', + 'gonfanon', + 'gonidial', + 'gonidium', + 'gonimous', + 'gonosome', + 'gonydial', + 'goodgeon', + 'goodless', + 'goodlich', + 'goodness', + 'goodship', + 'goodwife', + 'gooseegg', + 'gorebill', + 'gorgelet', + 'gorgeous', + 'gorgerin', + 'gorgonia', + 'gospeler', + 'gossamer', + 'gossiper', + 'gossipry', + 'gourmand', + 'goutweed', + 'goutwort', + 'governal', + 'governor', + 'gowdnook', + 'gownsman', + 'graafian', + 'graceful', + 'gracious', + 'gradient', + 'graduate', + 'graffage', + 'graffiti', + 'graffito', + 'graftage', + 'grafting', + 'graining', + 'gralline', + 'gralloch', + 'gramarye', + 'gramercy', + 'granatin', + 'grandeur', + 'grandity', + 'grandson', + 'granilla', + 'granitic', + 'granular', + 'graphics', + 'graphite', + 'grapsoid', + 'grasping', + 'grateful', + 'gratuity', + 'gravamen', + 'gravelly', + 'grayback', + 'grayling', + 'grayness', + 'grazioso', + 'greasily', + 'greedily', + 'greegree', + 'greekess', + 'greekish', + 'greenery', + 'greening', + 'greenish', + 'greenlet', + 'greeting', + 'greffier', + 'grewsome', + 'gridelin', + 'gridiron', + 'griefful', + 'grieving', + 'grievous', + 'grillade', + 'grillage', + 'grimaced', + 'grimness', + 'grindery', + 'grinding', + 'grindlet', + 'grinting', + 'gripeful', + 'gripsack', + 'griseous', + 'grisette', + 'gritrock', + 'grizelin', + 'grizzled', + 'groanful', + 'groggery', + 'grogshop', + 'gromwell', + 'grooving', + 'grosbeak', + 'groschen', + 'grounden', + 'groundly', + 'grouping', + 'grouting', + 'groutnol', + 'groveler', + 'growable', + 'grubworm', + 'gruesome', + 'grumbler', + 'grumpily', + 'grundsel', + 'gryphaea', + 'gryphite', + 'guacharo', + 'guaiacol', + 'guaiacum', + 'guaranty', + 'guardage', + 'guardant', + 'guardful', + 'guardian', + 'guelphic', + 'gueparde', + 'guerilla', + 'guessive', + 'guicowar', + 'guidable', + 'guidance', + 'guidguid', + 'guileful', + 'guiltily', + 'guirland', + 'guitguit', + 'gullible', + 'gulosity', + 'gumption', + 'gunarchy', + 'gundelet', + 'gunflint', + 'gunreach', + 'gunsmith', + 'gunstick', + 'gunstock', + 'gunstome', + 'gurgeons', + 'gurgoyle', + 'gustable', + 'gustless', + 'guttated', + 'guttifer', + 'guttural', + 'gymnical', + 'gymnogen', + 'gymnotus', + 'gynander', + 'gynarchy', + 'gyneceum', + 'gynecian', + 'gynobase', + 'gypseous', + 'gypsyism', + 'gyration', + 'gyratory', + 'gyroidal', + 'gyrostat', + 'habendum', + 'hability', + 'habitant', + 'habitual', + 'habitude', + 'habiture', + 'hacienda', + 'hackbolt', + 'hackbuss', + 'hackster', + 'haemapod', + 'haematic', + 'haematin', + 'hagberry', + 'haguebut', + 'hailshot', + 'hairbell', + 'hairbird', + 'hairless', + 'hairtail', + 'hairworm', + 'halation', + 'halfbeak', + 'halfcock', + 'halfness', + 'halfpace', + 'halftone', + 'halicore', + 'haliotis', + 'halliard', + 'hallucal', + 'halteres', + 'hamiform', + 'haminura', + 'hamleted', + 'hammerer', + 'hamulate', + 'hamulose', + 'handball', + 'handbill', + 'handbook', + 'handcart', + 'handcuff', + 'handfast', + 'handfish', + 'handicap', + 'handiron', + 'handless', + 'handling', + 'handmade', + 'handmaid', + 'handsome', + 'hangbird', + 'hangnail', + 'hangnest', + 'hanukkah', + 'haquebut', + 'harangue', + 'harasser', + 'harborer', + 'hardbake', + 'hardbeam', + 'hardened', + 'hardener', + 'hardfern', + 'hardhack', + 'hardhead', + 'hardness', + 'hardship', + 'hardspun', + 'hardtail', + 'hardware', + 'harebell', + 'harefoot', + 'harikari', + 'harlotry', + 'harmless', + 'harmonic', + 'harpagon', + 'harpings', + 'harpress', + 'harridan', + 'harrower', + 'hartford', + 'hartwort', + 'hasheesh', + 'hastated', + 'hastener', + 'hastings', + 'hatchery', + 'hatching', + 'hatchure', + 'hatchway', + 'hatstand', + 'hatteria', + 'hauerite', + 'haunched', + 'haurient', + 'hautgout', + 'hauynite', + 'havanese', + 'haveless', + 'havelock', + 'havenage', + 'havildar', + 'hawaiian', + 'hawebake', + 'hawfinch', + 'hawkbill', + 'hawkmoth', + 'hawkweed', + 'hawthorn', + 'hayfield', + 'haymaker', + 'haystack', + 'haystalk', + 'haythorn', + 'hazarder', + 'hazardry', + 'hazeless', + 'hazelnut', + 'haziness', + 'headache', + 'headachy', + 'headband', + 'headfish', + 'headgear', + 'headland', + 'headless', + 'headline', + 'headlong', + 'headmost', + 'headnote', + 'headrace', + 'headroom', + 'headrope', + 'headsail', + 'headship', + 'headsman', + 'headtire', + 'headwork', + 'healable', + 'heartily', + 'heartlet', + 'heartpea', + 'heathery', + 'heatless', + 'heavenly', + 'hebdomad', + 'hebetate', + 'hebetude', + 'hebraism', + 'hebraist', + 'hebraize', + 'hecatomb', + 'heckimal', + 'hectorly', + 'heddling', + 'hederose', + 'hedgehog', + 'hedgepig', + 'hedgerow', + 'hedonics', + 'hedonism', + 'hedonist', + 'heedless', + 'heelball', + 'heelless', + 'heelpath', + 'heelpost', + 'heelspur', + 'heeltool', + 'heemraad', + 'hegelian', + 'hegelism', + 'hegemony', + 'heighten', + 'heirless', + 'heirloom', + 'heirship', + 'heliacal', + 'helicine', + 'helicoid', + 'heliozoa', + 'hellborn', + 'hellbred', + 'hellenic', + 'hellkite', + 'hellward', + 'helmeted', + 'helminth', + 'helmless', + 'helmsman', + 'helmwind', + 'helotism', + 'helpless', + 'helpmate', + 'helpmeet', + 'helvetic', + 'hemacite', + 'hematein', + 'hematite', + 'hematoid', + 'hematoma', + 'hemicarp', + 'hemionus', + 'hemiopia', + 'hemipode', + 'hemipter', + 'hemisect', + 'hemitone', + 'hemselve', + 'henchboy', + 'henchman', + 'henhouse', + 'henhussy', + 'heniquen', + 'henogeny', + 'henroost', + 'hepatica', + 'hepatite', + 'hepatize', + 'heptagon', + 'heptarch', + 'heptylic', + 'heraldic', + 'heraldry', + 'herbaged', + 'herbergh', + 'herberwe', + 'herbless', + 'hercules', + 'herdbook', + 'herdsman', + 'heredity', + 'hereford', + 'hereinto', + 'heremite', + 'heretoch', + 'hereunto', + 'hereupon', + 'herewith', + 'herisson', + 'heritage', + 'hermetic', + 'hernshaw', + 'herodian', + 'heroical', + 'heronsew', + 'heroship', + 'herpetic', + 'herschel', + 'hertzian', + 'hesitant', + 'hesitate', + 'hesperid', + 'hesperus', + 'hetarism', + 'hexagony', + 'hexagram', + 'hexapoda', + 'hexdecyl', + 'hexylene', + 'heydeguy', + 'hibernal', + 'hibiscus', + 'hiccough', + 'hicksite', + 'hickwall', + 'hiddenly', + 'hidrosis', + 'hidrotic', + 'hierarch', + 'hieratic', + 'higgledy', + 'highborn', + 'highfive', + 'highland', + 'highmost', + 'highness', + 'highroad', + 'hilarity', + 'hillside', + 'himselve', + 'himyaric', + 'hinderer', + 'hindmost', + 'hinduism', + 'hinniate', + 'hippuric', + 'hireless', + 'hireling', + 'hirudine', + 'hispanic', + 'historic', + 'histrion', + 'hitherto', + 'hiveless', + 'hoarding', + 'hoarsely', + 'hobornob', + 'hochepot', + 'hockherb', + 'hogchain', + 'hogframe', + 'hoggerel', + 'hogmanay', + 'hogreeve', + 'hogscore', + 'hogshead', + 'hoistway', + 'holdback', + 'holdfast', + 'holiness', + 'hollands', + 'hollowly', + 'holostei', + 'holstein', + 'homaloid', + 'homeborn', + 'homeless', + 'homelike', + 'homelily', + 'homeling', + 'homemade', + 'homesick', + 'homespun', + 'homeward', + 'homicide', + 'homiform', + 'homilete', + 'homilist', + 'homilite', + 'hommocky', + 'homodont', + 'homogamy', + 'homogene', + 'homogeny', + 'homogony', + 'homology', + 'homonomy', + 'homonymy', + 'homopter', + 'homotaxy', + 'homotype', + 'homotypy', + 'honestly', + 'honewort', + 'honeybee', + 'honeydew', + 'honorary', + 'hoodless', + 'hoodwink', + 'hoofless', + 'hopeless', + 'hopingly', + 'horatian', + 'hornbeak', + 'hornbeam', + 'hornbill', + 'hornbook', + 'hornfish', + 'hornfoot', + 'hornless', + 'hornpike', + 'hornpipe', + 'hornpout', + 'horntail', + 'hornwork', + 'hornwort', + 'horologe', + 'horology', + 'horopter', + 'horrible', + 'horribly', + 'horridly', + 'horrific', + 'horsefly', + 'horseman', + 'hortulan', + 'hortyard', + 'hospital', + 'hospodar', + 'hosteler', + 'hostelry', + 'hostless', + 'hotblast', + 'hotchpot', + 'hothouse', + 'hotpress', + 'hounding', + 'housling', + 'hoveling', + 'howitzer', + 'huaracho', + 'huckster', + 'huguenot', + 'huiabird', + 'humanate', + 'humanics', + 'humanify', + 'humanism', + 'humanist', + 'humanity', + 'humanize', + 'humation', + 'humidity', + 'humifuse', + 'humility', + 'hummeler', + 'hummocky', + 'humorism', + 'humorist', + 'humorize', + 'humorous', + 'humpback', + 'humpless', + 'humstrum', + 'hungered', + 'hungerer', + 'hungerly', + 'hungrily', + 'huntress', + 'huntsman', + 'hurlbone', + 'hurlwind', + 'huronian', + 'hurtless', + 'hustings', + 'hyacinth', + 'hyblaean', + 'hybodont', + 'hydatoid', + 'hydracid', + 'hydranth', + 'hydrated', + 'hydrogen', + 'hydromel', + 'hydropic', + 'hydropsy', + 'hydrotic', + 'hydroxyl', + 'hydrozoa', + 'hydruret', + 'hygieist', + 'hygienic', + 'hylicist', + 'hylobate', + 'hylozoic', + 'hymeneal', + 'hymenean', + 'hymenium', + 'hyoideal', + 'hyoidean', + 'hyoscine', + 'hypaxial', + 'hyperion', + 'hypnosis', + 'hypnotic', + 'hypobole', + 'hypocarp', + 'hypocist', + 'hypoderm', + 'hypogean', + 'hypogene', + 'hypogeum', + 'hypohyal', + 'hypothec', + 'hypozoic', + 'hyracoid', + 'hysteria', + 'hysteric', + 'iambical', + 'ianthina', + 'iatrical', + 'ibsenism', + 'icebound', + 'iceplant', + 'icequake', + 'ichorous', + 'ichthyic', + 'ichthyol', + 'iconical', + 'icteroid', + 'idealess', + 'idealism', + 'idealist', + 'ideality', + 'idealize', + 'ideation', + 'identify', + 'identism', + 'identity', + 'ideogeny', + 'ideogram', + 'ideology', + 'idiotish', + 'idiotism', + 'idiotize', + 'idleness', + 'idocrase', + 'idolater', + 'idolatry', + 'idolizer', + 'idoneous', + 'igasuric', + 'ignition', + 'ignominy', + 'ignorant', + 'iguanian', + 'iguanoid', + 'illabile', + 'illation', + 'illative', + 'illesive', + 'illicium', + 'illinois', + 'illision', + 'illtreat', + 'illumine', + 'illusion', + 'illusive', + 'illusory', + 'ilmenite', + 'ilmenium', + 'imaginal', + 'imaginer', + 'imbecile', + 'imbellic', + 'imbezzle', + 'imbitter', + 'imblazon', + 'imbolden', + 'imbonity', + 'imborder', + 'imbution', + 'imesatin', + 'imitable', + 'imitancy', + 'imitator', + 'immailed', + 'immanent', + 'immanity', + 'immantle', + 'immanuel', + 'immature', + 'immersed', + 'imminent', + 'immingle', + 'immobile', + 'immodest', + 'immolate', + 'immoment', + 'immortal', + 'immunity', + 'immutate', + 'impacted', + 'impairer', + 'impallid', + 'impanate', + 'imparity', + 'imparter', + 'impedite', + 'impeller', + 'impennes', + 'impeople', + 'imperant', + 'imperate', + 'imperial', + 'imperium', + 'impester', + 'impetigo', + 'impierce', + 'impishly', + 'impleach', + 'impledge', + 'implicit', + 'imploded', + 'implorer', + 'implumed', + 'implunge', + 'impoison', + 'impolicy', + 'impolite', + 'imporous', + 'importer', + 'imposing', + 'impostor', + 'impotent', + 'imprimis', + 'imprison', + 'imprompt', + 'improper', + 'improver', + 'impudent', + 'impugner', + 'impulsor', + 'impunity', + 'impurely', + 'impurity', + 'impurple', + 'inaction', + 'inactive', + 'inactose', + 'inapathy', + 'inaquate', + 'inarable', + 'inasmuch', + 'inaurate', + 'incanous', + 'incanton', + 'incensed', + 'incenser', + 'incensor', + 'incenter', + 'inceptor', + 'incertum', + 'inchipin', + 'inchmeal', + 'inchoate', + 'inchworm', + 'incident', + 'incircle', + 'incisely', + 'incision', + 'incisive', + 'incisory', + 'incisure', + 'incitant', + 'incivism', + 'inclined', + 'incliner', + 'incloser', + 'included', + 'incocted', + 'incomber', + 'incoming', + 'incomity', + 'incorpse', + 'increase', + 'increate', + 'incubate', + 'incubous', + 'incumber', + 'incurved', + 'incysted', + 'indagate', + 'indamage', + 'indebted', + 'indecent', + 'indenize', + 'indented', + 'indesert', + 'indevote', + 'indevout', + 'indiadem', + 'indiaman', + 'indicant', + 'indicate', + 'indictee', + 'indicter', + 'indictor', + 'indigeen', + 'indigene', + 'indigent', + 'indigest', + 'indignly', + 'indirect', + 'indocile', + 'indolent', + 'indomite', + 'indorsed', + 'indorsee', + 'indorser', + 'indorsor', + 'indrench', + 'inductor', + 'indulger', + 'induline', + 'indument', + 'indurate', + 'indusial', + 'indusium', + 'industry', + 'indutive', + 'induviae', + 'inedible', + 'inedited', + 'inequity', + 'inermous', + 'inertion', + 'inescate', + 'inexpert', + 'infamize', + 'infamous', + 'infantly', + 'infantry', + 'infecter', + 'infecund', + 'infeeble', + 'inferiae', + 'inferior', + 'infernal', + 'infester', + 'infilter', + 'infinite', + 'infinito', + 'infinity', + 'infirmly', + 'inflamed', + 'inflamer', + 'inflated', + 'inflater', + 'inflatus', + 'inflexed', + 'influent', + 'informal', + 'informed', + 'informer', + 'infringe', + 'infrugal', + 'infucate', + 'infumate', + 'infusion', + 'infusive', + 'infusory', + 'ingender', + 'ingenite', + 'inghalla', + 'ingrieve', + 'ingroove', + 'ingrowth', + 'inguilty', + 'inguinal', + 'inhabile', + 'inhalant', + 'inhalent', + 'inhauler', + 'inhearse', + 'inherent', + 'inhesion', + 'inholder', + 'inhumate', + 'inimical', + 'iniquity', + 'iniquous', + 'initiate', + 'injector', + 'inkiness', + 'inkstand', + 'inkstone', + 'inlander', + 'inleague', + 'inlumine', + 'innately', + 'innative', + 'innixion', + 'innocent', + 'innodate', + 'innovate', + 'innuendo', + 'inocular', + 'inodiate', + 'inosinic', + 'inquirer', + 'insafety', + 'insanely', + 'insanity', + 'insapory', + 'inscient', + 'insconce', + 'inscribe', + 'inscroll', + 'insearch', + 'insected', + 'insecure', + 'inserted', + 'insessor', + 'inshaded', + 'inshrine', + 'insignia', + 'insition', + 'insnarer', + 'insolate', + 'insolent', + 'insomnia', + 'insomuch', + 'insperse', + 'insphere', + 'inspired', + 'inspirer', + 'inspirit', + 'instable', + 'instance', + 'instancy', + 'instaure', + 'instinct', + 'instroke', + 'instruct', + 'insulary', + 'insulate', + 'insulite', + 'insulous', + 'insulter', + 'insurant', + 'inswathe', + 'intaglio', + 'intangle', + 'integral', + 'intended', + 'intender', + 'intently', + 'interact', + 'interall', + 'intercur', + 'interess', + 'interest', + 'interior', + 'interlay', + 'intermit', + 'intermix', + 'internal', + 'interpel', + 'interrer', + 'interrex', + 'interset', + 'intertex', + 'intertie', + 'interval', + 'inthirst', + 'inthrall', + 'inthrone', + 'inthrong', + 'intimacy', + 'intimate', + 'intirely', + 'intitule', + 'intonate', + 'intrados', + 'intrench', + 'intrepid', + 'intrigue', + 'intrinse', + 'intromit', + 'introrse', + 'intruded', + 'intruder', + 'inuncted', + 'inundant', + 'inundate', + 'inurbane', + 'inustion', + 'invalide', + 'invalued', + 'invasion', + 'invasive', + 'invected', + 'inveigle', + 'inventer', + 'inventor', + 'inverted', + 'invertin', + 'investor', + 'invirile', + 'invision', + 'inviting', + 'invocate', + 'involute', + 'involved', + 'invulgar', + 'inwardly', + 'iodoform', + 'iodyrite', + 'ionidium', + 'iotacism', + 'ipomoeic', + 'irenarch', + 'irenical', + 'irenicon', + 'irestone', + 'irideous', + 'iridious', + 'irisated', + 'iriscope', + 'irishism', + 'irishman', + 'ironclad', + 'ironical', + 'ironware', + 'ironweed', + 'ironwood', + 'ironwork', + 'ironwort', + 'iroquois', + 'irrelate', + 'irrigate', + 'irrision', + 'irritant', + 'irritate', + 'irrorate', + 'irrugate', + 'irrupted', + 'isabella', + 'isagogic', + 'isatinic', + 'isatogen', + 'islamism', + 'islamite', + 'islamize', + 'islander', + 'isobaric', + 'isobront', + 'isochasm', + 'isocheim', + 'isocryme', + 'isodrome', + 'isogonic', + 'isolable', + 'isolated', + 'isolator', + 'isomeric', + 'isomorph', + 'isonomic', + 'isopathy', + 'isoprene', + 'isospore', + 'isostasy', + 'isothere', + 'isotherm', + 'isotonic', + 'isotropy', + 'issuable', + 'issuably', + 'issuance', + 'isthmian', + 'itaconic', + 'itchless', + 'iterable', + 'iterance', + 'jaalgoat', + 'jabberer', + 'jaborine', + 'jacconet', + 'jackaroo', + 'jackeroo', + 'jacketed', + 'jackstay', + 'jackwood', + 'jacobean', + 'jacobian', + 'jacobine', + 'jacobite', + 'jacquard', + 'jactancy', + 'jaculate', + 'jalousie', + 'jamacina', + 'jamaican', + 'janglery', + 'jangling', + 'janitrix', + 'janizary', + 'janthina', + 'japanese', + 'japanned', + 'japanner', + 'japhetic', + 'japonica', + 'japonism', + 'jararaca', + 'jargonic', + 'jarosite', + 'jasponyx', + 'jaundice', + 'jauntily', + 'javanese', + 'jazerant', + 'jealousy', + 'jehovist', + 'jejunity', + 'jelerang', + 'jeniquen', + 'jentling', + 'jeopardy', + 'jeremiad', + 'jerquing', + 'jesuited', + 'jesuitic', + 'jesuitry', + 'jettison', + 'jimcrack', + 'jingling', + 'jingoism', + 'jiujitsu', + 'jiujutsu', + 'jobation', + 'jocantry', + 'jocosity', + 'joculary', + 'johannes', + 'joinhand', + 'jointing', + 'jointure', + 'jokingly', + 'jolthead', + 'jonesian', + 'jongleur', + 'jovially', + 'jovialty', + 'jubilant', + 'jubilate', + 'judahite', + 'judaical', + 'judaizer', + 'judgment', + 'judicial', + 'jugement', + 'jugglery', + 'juggling', + 'jugulate', + 'julienne', + 'juliform', + 'jumpweld', + 'junction', + 'juncture', + 'jupartie', + 'jurassic', + 'juratory', + 'juristic', + 'jurymast', + 'justicer', + 'justness', + 'juvenile', + 'kabassou', + 'kaimacam', + 'kakoxene', + 'kalendar', + 'kalender', + 'kaliform', + 'kangaroo', + 'kapnomar', + 'karagane', + 'kathetal', + 'kaurigum', + 'keckling', + 'kecklish', + 'keelhaul', + 'keelrake', + 'keenness', + 'keepsake', + 'kelotomy', + 'kelpfish', + 'kelpware', + 'kentucky', + 'kephalin', + 'keramics', + 'kerasine', + 'keratode', + 'keratome', + 'keratosa', + 'keratose', + 'kerchief', + 'kermesse', + 'kernbaby', + 'kerneled', + 'kernelly', + 'kerolite', + 'kerosene', + 'keyboard', + 'keyfruit', + 'keystone', + 'kickable', + 'kickshaw', + 'kickshoe', + 'kiddyish', + 'kidnaper', + 'kiefekil', + 'killdeer', + 'killesse', + 'kilnhole', + 'kilogram', + 'kilovolt', + 'kilowatt', + 'kindless', + 'kindling', + 'kindness', + 'kinetics', + 'kingbird', + 'kingbolt', + 'kingfish', + 'kinghood', + 'kingless', + 'kingling', + 'kingship', + 'kingston', + 'kinkajou', + 'kinology', + 'kinsfolk', + 'kirkyard', + 'kistvaen', + 'kittlish', + 'kittysol', + 'kivikivi', + 'kiwikiwi', + 'klamaths', + 'klipfish', + 'knackish', + 'knappish', + 'knapsack', + 'knapweed', + 'kneejerk', + 'knightly', + 'knitback', + 'knitchet', + 'knitster', + 'knitting', + 'knobbing', + 'knobbler', + 'knocking', + 'knoppern', + 'knopweed', + 'knotless', + 'knotweed', + 'knotwort', + 'knowable', + 'knuckled', + 'koftgari', + 'kohinoor', + 'kolarian', + 'kolinsky', + 'kolushan', + 'koolslaa', + 'koordish', + 'korrigum', + 'krameria', + 'krameric', + 'kreosote', + 'kreutzer', + 'krumhorn', + 'kruppgun', + 'kruppize', + 'kryolite', + 'kurilian', + 'kyrielle', + 'labadist', + 'labdanum', + 'labellum', + 'labially', + 'labiated', + 'lability', + 'labipalp', + 'laborant', + 'laborday', + 'laboring', + 'laborous', + 'labrador', + 'laburnic', + 'laburnum', + 'lacerate', + 'lacertus', + 'lacewing', + 'lacinula', + 'lackaday', + 'laconian', + 'laconism', + 'laconize', + 'lacrosse', + 'lacrymal', + 'lactamic', + 'lacteous', + 'lactific', + 'lactonic', + 'lactucic', + 'lactucin', + 'lacunose', + 'lacunous', + 'ladleful', + 'ladybird', + 'ladyfish', + 'ladyhood', + 'ladylike', + 'ladylove', + 'ladyship', + 'lagenian', + 'lagnappe', + 'lagopous', + 'lagthing', + 'laically', + 'lakeweed', + 'lamantin', + 'lamasery', + 'lambaste', + 'lambdoid', + 'lambkill', + 'lamblike', + 'lambskin', + 'lamellar', + 'lameness', + 'lamented', + 'lamenter', + 'lamentin', + 'laminary', + 'laminate', + 'lampless', + 'lampyris', + 'lancegay', + 'lancelet', + 'landfall', + 'landlady', + 'landless', + 'landlock', + 'landlord', + 'landmark', + 'landskip', + 'landslip', + 'landsman', + 'landward', + 'landwehr', + 'langarey', + 'langrage', + 'langsyne', + 'language', + 'languish', + 'lanifice', + 'lankness', + 'lanneret', + 'lantanum', + 'lanthorn', + 'laocooen', + 'lapboard', + 'lapelled', + 'lapicide', + 'lapidary', + 'lapidate', + 'lapidify', + 'lapidist', + 'lapponic', + 'lapsable', + 'lapsible', + 'lapsided', + 'lapstone', + 'laqueary', + 'larboard', + 'larcener', + 'larderer', + 'largesse', + 'larkspur', + 'larrikin', + 'larvalia', + 'larvated', + 'lascious', + 'lasslorn', + 'latching', + 'latchkey', + 'lateness', + 'latently', + 'laterite', + 'latewake', + 'lateward', + 'lathwork', + 'latinism', + 'latinist', + 'latinity', + 'latinize', + 'latitant', + 'latitude', + 'latterly', + 'laudable', + 'laudably', + 'laudanum', + 'laudator', + 'laughing', + 'laughter', + 'laureate', + 'laureled', + 'laurinol', + 'lavation', + 'lavatory', + 'lavature', + 'lavement', + 'lavender', + 'laverock', + 'lavisher', + 'lavishly', + 'lawgiver', + 'lawmaker', + 'lawsonia', + 'lawyerly', + 'laxation', + 'laxative', + 'layering', + 'layshaft', + 'laystall', + 'lazarist', + 'lazarite', + 'lazaroni', + 'laziness', + 'lazulite', + 'lazyback', + 'leadsman', + 'leadwort', + 'leafless', + 'leanness', + 'leapfrog', + 'leapyear', + 'learning', + 'leasable', + 'leathern', + 'leathery', + 'leavings', + 'lecherer', + 'lecithin', + 'lecturer', + 'lecythis', + 'ledgment', + 'leeangle', + 'leeboard', + 'leftward', + 'legalism', + 'legalist', + 'legality', + 'legalize', + 'legatary', + 'legatine', + 'legation', + 'legatura', + 'legature', + 'legement', + 'legerity', + 'leggiero', + 'legioned', + 'legionry', + 'leisured', + 'lemonade', + 'lemurine', + 'lemuroid', + 'lendable', + 'lengthen', + 'lenience', + 'leniency', + 'leniment', + 'lenitive', + 'lenitude', + 'lentando', + 'lenticel', + 'lentlily', + 'lepadite', + 'lepadoid', + 'leperize', + 'leperous', + 'lepidine', + 'lepidote', + 'leporine', + 'lessener', + 'lethargy', + 'lettered', + 'letterer', + 'lettrure', + 'leucinic', + 'leucitic', + 'leuconic', + 'leucoryx', + 'levanter', + 'levation', + 'leveling', + 'levelism', + 'leverage', + 'leverock', + 'leviable', + 'levigate', + 'levirate', + 'levitate', + 'levulose', + 'levynite', + 'lewdster', + 'lewisson', + 'libament', + 'libation', + 'libatory', + 'libelant', + 'libelist', + 'libellee', + 'libelous', + 'liberate', + 'libretto', + 'licensed', + 'licensee', + 'licenser', + 'lichened', + 'lichenic', + 'lichenin', + 'lichwale', + 'lichwort', + 'licorice', + 'licorous', + 'liefsome', + 'liegance', + 'liegeman', + 'lientery', + 'lifeboat', + 'lifehold', + 'lifeless', + 'lifelike', + 'lifelong', + 'lifemate', + 'lifesome', + 'lifetime', + 'liftable', + 'ligament', + 'ligation', + 'ligature', + 'ligeance', + 'ligement', + 'lightful', + 'lighting', + 'lightman', + 'ligneous', + 'lignitic', + 'ligulate', + 'likeable', + 'likehood', + 'likeness', + 'likerous', + 'likewise', + 'lilywort', + 'limacina', + 'limaille', + 'limation', + 'limature', + 'limbless', + 'limbmeal', + 'limekiln', + 'limenean', + 'limerick', + 'limetwig', + 'liminess', + 'limitary', + 'limitate', + 'limitive', + 'limitour', + 'limoniad', + 'limonite', + 'limpness', + 'linament', + 'linarite', + 'linchpin', + 'lincture', + 'lineally', + 'linearly', + 'lineated', + 'lingence', + 'lingerer', + 'lingerie', + 'linguist', + 'liniment', + 'linkwork', + 'linnaean', + 'linoleic', + 'linoleum', + 'linotype', + 'linstock', + 'lintseed', + 'lionhood', + 'lionlike', + 'lionship', + 'lipaemia', + 'liparian', + 'liparite', + 'lipogram', + 'liquable', + 'liquidly', + 'liripipe', + 'liripoop', + 'listener', + 'listless', + 'literacy', + 'literary', + 'literate', + 'literati', + 'litharge', + 'litherly', + 'lithoxyl', + 'litigant', + 'litigate', + 'littoral', + 'littress', + 'liturate', + 'liturgic', + 'livelily', + 'livelode', + 'livelong', + 'liveried', + 'livering', + 'lividity', + 'livingly', + 'livonian', + 'lixivial', + 'lixivium', + 'loadsman', + 'loadstar', + 'loanable', + 'loathful', + 'loathing', + 'lobately', + 'lobbyist', + 'lobefoot', + 'lobeline', + 'loblolly', + 'lobsided', + 'lobulate', + 'localism', + 'locality', + 'localize', + 'location', + 'locative', + 'lockless', + 'lockstep', + 'locofoco', + 'loculate', + 'loculose', + 'loculous', + 'locustic', + 'locution', + 'locutory', + 'lodesman', + 'lodestar', + 'lodgment', + 'lodicule', + 'logician', + 'logistic', + 'logogram', + 'logotype', + 'loiterer', + 'lollardy', + 'lollipop', + 'lomonite', + 'londoner', + 'loneness', + 'lonesome', + 'longbeak', + 'longboat', + 'longeval', + 'longhand', + 'longhorn', + 'longlegs', + 'longness', + 'longnose', + 'longsome', + 'longspun', + 'longspur', + 'longtail', + 'longways', + 'longwise', + 'lookdown', + 'loophole', + 'loosener', + 'lopeared', + 'lopsided', + 'lordlike', + 'lordling', + 'lordosis', + 'lordship', + 'loresman', + 'loricata', + 'loricate', + 'lorikeet', + 'losenger', + 'losingly', + 'lossless', + 'lothario', + 'lothsome', + 'loudness', + 'loveable', + 'loveless', + 'lovelily', + 'lovelock', + 'lovelorn', + 'lovesome', + 'lovingly', + 'lowering', + 'lowsteel', + 'loyalist', + 'lozenged', + 'lubberly', + 'lubrical', + 'lucchese', + 'lucernal', + 'lucidity', + 'luciform', + 'luckless', + 'lucrific', + 'luculent', + 'ludibund', + 'lukewarm', + 'lumachel', + 'lumberer', + 'luminant', + 'luminary', + 'luminate', + 'luminous', + 'lumpfish', + 'lunarian', + 'lunation', + 'luncheon', + 'lungfish', + 'lungless', + 'lungworm', + 'lungwort', + 'luniform', + 'lunulate', + 'lunulite', + 'lupercal', + 'lupinine', + 'lupuline', + 'luscious', + 'lushburg', + 'lustless', + 'lustrate', + 'lustring', + 'lustrous', + 'lustwort', + 'lutanist', + 'lutation', + 'lutecium', + 'lutenist', + 'luteolin', + 'lutheran', + 'lutidine', + 'lutulent', + 'luxation', + 'luxurist', + 'lychgate', + 'lycopode', + 'lygodium', + 'lymhound', + 'lymphate', + 'lymphoid', + 'lymphoma', + 'lynchlaw', + 'lyrebird', + 'lyricism', + 'lyterian', + 'macarize', + 'macaroni', + 'macaroon', + 'macavahu', + 'maccaboy', + 'maccoboy', + 'macerate', + 'machinal', + 'machiner', + 'macilent', + 'mackerel', + 'mackinaw', + 'maclurea', + 'maclurin', + 'macropod', + 'macropus', + 'macroura', + 'macrural', + 'macruran', + 'maculate', + 'maculose', + 'madbrain', + 'madecass', + 'madhouse', + 'madrague', + 'madrigal', + 'madronya', + 'maegbote', + 'maestoso', + 'maffioso', + 'magazine', + 'magdalen', + 'maggiore', + 'magician', + 'magister', + 'magnesia', + 'magnesic', + 'magnetic', + 'magnific', + 'magnolia', + 'maharmah', + 'mahdiism', + 'mahogany', + 'mahoohoo', + 'mahratta', + 'maidenly', + 'maidhood', + 'maidpale', + 'maieutic', + 'mailable', + 'mailclad', + 'maimedly', + 'mainland', + 'mainmast', + 'mainsail', + 'mainstay', + 'maintain', + 'mainyard', + 'maistrie', + 'majestic', + 'majolica', + 'majorate', + 'majorcan', + 'majority', + 'makebate', + 'makeless', + 'malagash', + 'malagasy', + 'malamate', + 'malamide', + 'malapert', + 'malarial', + 'malarian', + 'malaxate', + 'maledict', + 'malefice', + 'maligner', + 'malignly', + 'malinger', + 'malleate', + 'mallecho', + 'mallotus', + 'malonate', + 'maltonic', + 'maltreat', + 'maltster', + 'maltworm', + 'malvesie', + 'mamaluke', + 'mameluco', + 'mameluke', + 'mammalia', + 'mammetry', + 'mammifer', + 'mammilla', + 'mammodis', + 'managery', + 'manation', + 'manciple', + 'mandamus', + 'mandarin', + 'mandator', + 'mandelic', + 'manderil', + 'mandible', + 'mandioca', + 'mandment', + 'mandolin', + 'mandrake', + 'mandrill', + 'manducus', + 'maneless', + 'manequin', + 'manerial', + 'maneuver', + 'mangabey', + 'manganic', + 'mangcorn', + 'mangonel', + 'mangrove', + 'manhaden', + 'maniable', + 'maniacal', + 'manicate', + 'manichee', + 'manicure', + 'manifest', + 'manifold', + 'maniform', + 'mannered', + 'mannerly', + 'mannitan', + 'mannitic', + 'mannitol', + 'manorial', + 'manovery', + 'mansuete', + 'manswear', + 'mantchoo', + 'mantelet', + 'mantilla', + 'mantissa', + 'mantling', + 'manually', + 'manubial', + 'manucode', + 'manumise', + 'manurage', + 'manurial', + 'manuring', + 'manyways', + 'manywise', + 'marabout', + 'marasmus', + 'marauder', + 'maravedi', + 'marbling', + 'marching', + 'marchman', + 'margaric', + 'margarin', + 'marginal', + 'margined', + 'margrave', + 'marigold', + 'marikina', + 'marinade', + 'marinate', + 'marinism', + 'mariotte', + 'maritime', + 'marjoram', + 'markable', + 'marketer', + 'markhoor', + 'marksman', + 'marlitic', + 'marmalet', + 'marmoset', + 'marmozet', + 'maronite', + 'marquess', + 'marquise', + 'marriage', + 'martagon', + 'martinet', + 'martyrly', + 'marysole', + 'mascotte', + 'masorite', + 'massacre', + 'masseter', + 'masseuse', + 'massicot', + 'massoret', + 'mastabah', + 'masterly', + 'masthead', + 'masticin', + 'masticot', + 'mastitis', + 'mastless', + 'mastodon', + 'mastress', + 'matabele', + 'matachin', + 'matadore', + 'matamata', + 'mateless', + 'matelote', + 'material', + 'materiel', + 'maternal', + 'matfelon', + 'mathesis', + 'mathurin', + 'matronal', + 'matronly', + 'mattages', + 'mattress', + 'maturant', + 'maturate', + 'maturely', + 'maturing', + 'maturity', + 'matutine', + 'maundril', + 'mauveine', + 'maverick', + 'mawmetry', + 'maxillar', + 'maximgun', + 'maximize', + 'mayaarch', + 'maybloom', + 'mayoress', + 'mazarine', + 'mazdeism', + 'maziness', + 'mazology', + 'mazourka', + 'meagerly', + 'meagrely', + 'mealtime', + 'meanness', + 'meantime', + 'measelry', + 'measured', + 'measurer', + 'meatless', + 'meazling', + 'meccawee', + 'mechanic', + 'meconate', + 'meconium', + 'medalist', + 'medallic', + 'meddling', + 'mediator', + 'medicate', + 'medicean', + 'medicine', + 'medieval', + 'mediocre', + 'meditate', + 'medjidie', + 'medregal', + 'medullar', + 'medullin', + 'medusian', + 'medusoid', + 'meekness', + 'meetness', + 'megacosm', + 'megaderm', + 'megadyne', + 'megalerg', + 'megalith', + 'megalops', + 'megapode', + 'megarian', + 'megaseme', + 'megavolt', + 'meiocene', + 'meionite', + 'melamine', + 'melanian', + 'melanism', + 'melanite', + 'melanoma', + 'melanure', + 'melasses', + 'melassic', + 'melchite', + 'melenite', + 'melibean', + 'melilite', + 'melinite', + 'melissic', + 'melissyl', + 'melitose', + 'mellific', + 'mellitic', + 'mellowly', + 'melodeon', + 'melodics', + 'melodist', + 'melodize', + 'melotype', + 'meltable', + 'membered', + 'membrane', + 'memorate', + 'memorial', + 'memorist', + 'memorize', + 'memphian', + 'mendable', + 'mendiant', + 'mendment', + 'menhaden', + 'menilite', + 'meninges', + 'meniscal', + 'meniscus', + 'menology', + 'menopoma', + 'menopome', + 'menstrue', + 'mensural', + 'mentagra', + 'mentally', + 'menthene', + 'mephitic', + 'mephitis', + 'mercable', + 'mercator', + 'merchand', + 'merchant', + 'merciful', + 'mercuric', + 'meresman', + 'mericarp', + 'meridian', + 'meringue', + 'meristem', + 'merithal', + 'meritory', + 'merocele', + 'merosome', + 'mesaraic', + 'mesdames', + 'meseraic', + 'mesially', + 'mesmeree', + 'mesmeric', + 'mesocarp', + 'mesoderm', + 'mesodont', + 'mesoglea', + 'mesolabe', + 'mesolite', + 'mesoseme', + 'mesotype', + 'mesozoic', + 'mesprise', + 'mesquite', + 'messager', + 'messbeef', + 'messidor', + 'messmate', + 'messuage', + 'mestling', + 'metabola', + 'metabole', + 'metacism', + 'metallic', + 'metalman', + 'metamere', + 'metaphor', + 'metapode', + 'metasome', + 'metayage', + 'metazoan', + 'metazoic', + 'metazoon', + 'metecorn', + 'meteoric', + 'meterage', + 'metewand', + 'meteyard', + 'methenyl', + 'methinks', + 'methodic', + 'methoxyl', + 'methylal', + 'methylic', + 'metonymy', + 'metrical', + 'metritis', + 'mezereon', + 'mezquita', + 'mezuzoth', + 'mhometer', + 'miascite', + 'microbic', + 'microzoa', + 'midbrain', + 'middling', + 'midgarth', + 'midnight', + 'midships', + 'mightful', + 'mightily', + 'migniard', + 'migraine', + 'milanese', + 'mildness', + 'milepost', + 'milesian', + 'miliaria', + 'militant', + 'military', + 'militate', + 'milkmaid', + 'milkweed', + 'milkwort', + 'milleped', + 'milliard', + 'milliary', + 'milliner', + 'millinet', + 'milliped', + 'millreis', + 'millrind', + 'millrynd', + 'millwork', + 'miltonic', + 'mimetene', + 'mimetism', + 'mimetite', + 'mimicker', + 'minacity', + 'minatory', + 'mincepie', + 'mindless', + 'miniment', + 'minimize', + 'minionly', + 'minister', + 'ministry', + 'minobird', + 'minorate', + 'minoress', + 'minorite', + 'minority', + 'minotaur', + 'minstrel', + 'minutary', + 'minutely', + 'miquelet', + 'miriness', + 'mirksome', + 'mirliton', + 'mirthful', + 'misaimed', + 'misalter', + 'misapply', + 'misassay', + 'misavize', + 'misbegot', + 'misboden', + 'miscarry', + 'mischief', + 'mischnic', + 'miscible', + 'misclaim', + 'miscolor', + 'miscount', + 'miscovet', + 'misdempt', + 'misdight', + 'misdoing', + 'misdoubt', + 'misdread', + 'miseased', + 'misenter', + 'misentry', + 'miserere', + 'misfaith', + 'misfeign', + 'misframe', + 'misgraff', + 'misgraft', + 'misguess', + 'misguide', + 'mishappy', + 'mishmash', + 'misinfer', + 'misjudge', + 'mislayer', + 'mislearn', + 'misletoe', + 'mislight', + 'misliker', + 'mislodge', + 'mismatch', + 'mismeter', + 'misnomer', + 'misogamy', + 'misogyny', + 'misology', + 'misorder', + 'mispaint', + 'mispense', + 'misplace', + 'misplead', + 'mispoint', + 'misprint', + 'misprise', + 'misprize', + 'misproud', + 'misquote', + 'misraise', + 'misserve', + 'misshape', + 'missound', + 'misspeak', + 'misspell', + 'misspend', + 'misspent', + 'misstate', + 'misswear', + 'mistaken', + 'mistaker', + 'misteach', + 'misthink', + 'misthrow', + 'mistigri', + 'mistitle', + 'mistrain', + 'mistreat', + 'mistress', + 'mistrial', + 'mistrist', + 'mistrust', + 'mistutor', + 'misurato', + 'misusage', + 'misvalue', + 'misvouch', + 'miswrite', + 'mitigant', + 'mitigate', + 'mittened', + 'mittimus', + 'mnemonic', + 'mobility', + 'mobilize', + 'mobocrat', + 'moccasin', + 'mockable', + 'mockbird', + 'modalist', + 'modality', + 'modeling', + 'modelize', + 'modenese', + 'moderate', + 'moderato', + 'modernly', + 'modestly', + 'modicity', + 'modifier', + 'modiolar', + 'modiolus', + 'modulate', + 'moelline', + 'mohicans', + 'mohurrum', + 'moistful', + 'moisture', + 'mokadour', + 'molasses', + 'moldable', + 'moldwarp', + 'molecast', + 'molecule', + 'molehill', + 'moleskin', + 'molester', + 'molestie', + 'molewarp', + 'molinism', + 'molinist', + 'mollient', + 'mollinet', + 'mollusca', + 'molokane', + 'molokany', + 'molosses', + 'molossus', + 'moltable', + 'molybdic', + 'momental', + 'momently', + 'momentum', + 'monachal', + 'monamide', + 'monamine', + 'monander', + 'monandry', + 'monarcho', + 'monarchy', + 'monastic', + 'monaxial', + 'monazite', + 'monecian', + 'monerula', + 'monetary', + 'monetize', + 'moneyage', + 'mongcorn', + 'mongolic', + 'mongoose', + 'monifier', + 'moniment', + 'monisher', + 'monistic', + 'monition', + 'monitive', + 'monitory', + 'monitrix', + 'monkfish', + 'monkhood', + 'monocarp', + 'monocrat', + 'monocule', + 'monodist', + 'monoecia', + 'monogamy', + 'monogeny', + 'monogram', + 'monogyny', + 'monolith', + 'monology', + 'monomane', + 'monomial', + 'monopode', + 'monopody', + 'monopoly', + 'monotone', + 'monotony', + 'monotype', + 'monoxide', + 'monsieur', + 'montanic', + 'monteith', + 'monticle', + 'montross', + 'monument', + 'monureid', + 'moonbeam', + 'mooncalf', + 'moonfish', + 'moonless', + 'moonling', + 'moonrise', + 'moonsail', + 'moonseed', + 'moonshee', + 'moonwort', + 'moorball', + 'moorband', + 'moorland', + 'mootable', + 'mopboard', + 'mopsical', + 'mopstick', + 'moquette', + 'morainic', + 'moralism', + 'moralist', + 'morality', + 'moralize', + 'moration', + 'moratory', + 'moravian', + 'morbidly', + 'morbific', + 'mordente', + 'moreland', + 'moreness', + 'moreover', + 'morepork', + 'moresque', + 'moribund', + 'morindin', + 'moringic', + 'mornward', + 'moroccan', + 'morology', + 'morosely', + 'morosity', + 'morosoph', + 'morosous', + 'moroxite', + 'morphean', + 'morpheus', + 'morphine', + 'morricer', + 'morrimal', + 'mortally', + 'mortgage', + 'mortling', + 'mortmain', + 'mortress', + 'mortuary', + 'mosaical', + 'mosasaur', + 'moschine', + 'moslings', + 'mosquito', + 'mossback', + 'mostwhat', + 'motation', + 'mothered', + 'motherly', + 'motility', + 'motioner', + 'motivate', + 'motivity', + 'motorcar', + 'motorial', + 'motoring', + 'motorize', + 'motorman', + 'mouchoir', + 'mouezzin', + 'mouldery', + 'moulding', + 'moulinet', + 'mountain', + 'mountant', + 'mounting', + 'mountlet', + 'mournful', + 'mourning', + 'mousekin', + 'mouthful', + 'moveless', + 'movement', + 'movingly', + 'mozzetta', + 'mucamide', + 'muchness', + 'muchwhat', + 'muciform', + 'mucilage', + 'mucivore', + 'muckerer', + 'muckrake', + 'muckworm', + 'mucocele', + 'muconate', + 'mucosity', + 'muculent', + 'muffetee', + 'mughouse', + 'mugiency', + 'mugiloid', + 'muharram', + 'mulberry', + 'mulctary', + 'muleteer', + 'mulewort', + 'mulierly', + 'mulierty', + 'multeity', + 'multifid', + 'multiped', + 'multiple', + 'multiply', + 'mumbling', + 'munerary', + 'munerate', + 'mungcorn', + 'mungoose', + 'muniment', + 'munition', + 'murderer', + 'murdress', + 'murenger', + 'murenoid', + 'murexide', + 'murexoin', + 'muriated', + 'muriatic', + 'muricate', + 'muricoid', + 'muriform', + 'muringer', + 'murmurer', + 'murnival', + 'murrayin', + 'murrelet', + 'murrhine', + 'muscadel', + 'muscales', + 'muscarin', + 'muscatel', + 'muscling', + 'muscular', + 'musculin', + 'museless', + 'mushroom', + 'musicale', + 'musician', + 'musingly', + 'muskadel', + 'musketry', + 'muskwood', + 'muslinet', + 'musquash', + 'musquito', + 'mustache', + 'mustacho', + 'mustaiba', + 'mutacism', + 'mutandum', + 'mutation', + 'mutchkin', + 'muteness', + 'muticous', + 'mutilate', + 'mutilous', + 'mutineer', + 'mutinous', + 'mutterer', + 'mutually', + 'mycelium', + 'myceloid', + 'mycetoid', + 'mycology', + 'myelitis', + 'myelonal', + 'mynchery', + 'myocomma', + 'myogalid', + 'myograph', + 'myolemma', + 'myologic', + 'myomancy', + 'myomorph', + 'myopathy', + 'myositic', + 'myositis', + 'myosotis', + 'myotomic', + 'myriapod', + 'myriarch', + 'myristic', + 'myristin', + 'myrmidon', + 'myrrhine', + 'myselven', + 'mystacal', + 'mystical', + 'mytacism', + 'mythical', + 'mytiloid', + 'myxinoid', + 'myzontes', + 'nacreous', + 'nailless', + 'nainsook', + 'naissant', + 'namation', + 'nameless', + 'namesake', + 'naperian', + 'naphthol', + 'naphthyl', + 'napiform', + 'napoleon', + 'narceine', + 'narcosis', + 'narcotic', + 'nargileh', + 'nariform', + 'narrable', + 'narrator', + 'narrower', + 'narrowly', + 'nasality', + 'nasalize', + 'nascency', + 'nasiform', + 'nataloin', + 'natantly', + 'natation', + 'natatory', + 'natchnee', + 'nathless', + 'nathmore', + 'naticoid', + 'national', + 'natively', + 'nativism', + 'nativist', + 'nativity', + 'naturism', + 'naturist', + 'naturity', + 'naturize', + 'naufrage', + 'naughtly', + 'naumachy', + 'nauplius', + 'nauscopy', + 'nauseant', + 'nauseate', + 'nauseous', + 'nautical', + 'nautilus', + 'navajoes', + 'navarchy', + 'navigate', + 'navyblue', + 'nazarene', + 'nazarite', + 'nazirite', + 'nearbeer', + 'nearctic', + 'nearhand', + 'nearness', + 'neatherd', + 'neatness', + 'neatress', + 'nebulize', + 'nebulose', + 'nebulous', + 'neckband', + 'necklace', + 'neckland', + 'neckmold', + 'neckwear', + 'neckweed', + 'necropsy', + 'necrosed', + 'necrosis', + 'necrotic', + 'nectared', + 'nectosac', + 'needless', + 'needment', + 'neelghau', + 'neemtree', + 'negation', + 'negative', + 'negatory', + 'neginoth', + 'negligee', + 'negritic', + 'negritos', + 'nehiloth', + 'neighbor', + 'neishout', + 'nemaline', + 'nemalite', + 'nematode', + 'nematoid', + 'nemertes', + 'nemertid', + 'nemorous', + 'nenuphar', + 'neocracy', + 'neogaean', + 'neologic', + 'neomenia', + 'neomorph', + 'neophyte', + 'neoplasm', + 'neossine', + 'neoteric', + 'nepenthe', + 'nephilim', + 'nephrite', + 'nepotism', + 'nepotist', + 'nereites', + 'nerfling', + 'neritina', + 'nestling', + 'netemere', + 'nethinim', + 'nettling', + 'neuralgy', + 'neuraxis', + 'neuridin', + 'neuritis', + 'neuropod', + 'neurosis', + 'neurotic', + 'nevadite', + 'newcomer', + 'newsroom', + 'niceness', + 'nickelic', + 'nicknack', + 'nickname', + 'nicotian', + 'nicotine', + 'nidering', + 'nidorose', + 'nidorous', + 'nidulant', + 'nidulate', + 'nidulite', + 'niellist', + 'niggardy', + 'niggling', + 'nighness', + 'nightcap', + 'nightish', + 'nightjar', + 'nightman', + 'nigritic', + 'nihilism', + 'nihilist', + 'nihility', + 'nimbless', + 'ninefold', + 'ninepins', + 'nineteen', + 'nitrated', + 'nitriary', + 'nitrogen', + 'nitrolic', + 'nitrosyl', + 'nitroxyl', + 'nittings', + 'noachian', + 'nobilify', + 'nobility', + 'nobleman', + 'noblesse', + 'nocently', + 'noctuary', + 'nocturne', + 'nocument', + 'nodation', + 'nodosity', + 'nodosous', + 'nodulose', + 'nodulous', + 'noematic', + 'noetical', + 'noiseful', + 'noisette', + 'nolition', + 'nolleity', + 'nomadian', + 'nomadism', + 'nomadize', + 'nomarchy', + 'nominate', + 'nomology', + 'nonadult', + 'nonclaim', + 'nonelect', + 'nonesuch', + 'nonjuror', + 'nonmetal', + 'nonmoral', + 'nonplane', + 'nonsense', + 'nontoxic', + 'nonunion', + 'nonvocal', + 'nonylene', + 'nooelogy', + 'noonshun', + 'noontide', + 'normalcy', + 'normally', + 'norseman', + 'nortelry', + 'northern', + 'northing', + 'northman', + 'norweyan', + 'noseband', + 'noseless', + 'nosology', + 'nosophen', + 'nostalgy', + 'notandum', + 'notarial', + 'notation', + 'notching', + 'notebook', + 'noteless', + 'notional', + 'notornis', + 'notturno', + 'notwheat', + 'noumenal', + 'noumenon', + 'novatian', + 'novation', + 'novelism', + 'novelist', + 'novelize', + 'november', + 'novenary', + 'novercal', + 'nowadays', + 'nubecula', + 'nubilate', + 'nubility', + 'nubilose', + 'nubilous', + 'nucament', + 'nucellus', + 'nuciform', + 'nucleate', + 'nucleole', + 'nudation', + 'nudicaul', + 'nugacity', + 'nugation', + 'nugatory', + 'nuisance', + 'numberer', + 'numbfish', + 'numbless', + 'numbness', + 'numerary', + 'numerate', + 'numerist', + 'numerous', + 'numidian', + 'nummular', + 'numskull', + 'nunchion', + 'nunciate', + 'nundinal', + 'nursling', + 'nutation', + 'nuthatch', + 'nutrient', + 'nutshell', + 'nymphaea', + 'nymphean', + 'nymphish', + 'oarsweed', + 'oathable', + 'obduracy', + 'obdurate', + 'obedible', + 'obedient', + 'obeisant', + 'obituary', + 'objector', + 'oblation', + 'obligate', + 'obligato', + 'obliging', + 'oblivion', + 'oblongly', + 'oblongum', + 'obrogate', + 'obscurer', + 'observer', + 'obsidian', + 'obsolete', + 'obstacle', + 'obstancy', + 'obstruct', + 'obtainer', + 'obtected', + 'obtemper', + 'obtruder', + 'obtunder', + 'obturate', + 'obtusely', + 'obtusion', + 'obtusity', + 'obuncous', + 'obvolute', + 'occasion', + 'occasive', + 'occident', + 'occipito', + 'occision', + 'occulted', + 'occultly', + 'occupant', + 'occupate', + 'occupier', + 'ocellary', + 'ocellate', + 'ocherous', + 'ochlesis', + 'ochreate', + 'ochreous', + 'ocreated', + 'octander', + 'octaroon', + 'octocera', + 'octodont', + 'octogamy', + 'octogild', + 'octonary', + 'octopede', + 'octopoda', + 'octoroon', + 'octylene', + 'ocularly', + 'oculated', + 'odograph', + 'odometer', + 'odometry', + 'odontoid', + 'odorless', + 'oecology', + 'oeconomy', + 'oeillade', + 'oenocyan', + 'oenology', + 'oestrian', + 'oestrual', + 'offender', + 'offering', + 'official', + 'offprint', + 'offshoot', + 'offshore', + 'ofttimes', + 'ohmmeter', + 'oilcloth', + 'oiliness', + 'oilstone', + 'oinement', + 'ointment', + 'ojibways', + 'oleander', + 'oleaster', + 'olefiant', + 'oleosity', + 'olfactor', + 'olibanum', + 'oligarch', + 'olympiad', + 'olympian', + 'omission', + 'omissive', + 'ommateal', + 'ommateum', + 'omniform', + 'omnivora', + 'omohyoid', + 'omoplate', + 'omphalic', + 'omphalos', + 'oncidium', + 'oncotomy', + 'ondogram', + 'ondoyant', + 'oneberry', + 'onliness', + 'onocerin', + 'onomancy', + 'ontogeny', + 'ontology', + 'ooelitic', + 'ooephore', + 'ooephyte', + 'ooesperm', + 'ooespore', + 'ooetheca', + 'ooetooid', + 'oogonium', + 'oologist', + 'oophoric', + 'oophytic', + 'oosphere', + 'oosporic', + 'ootocoid', + 'opacular', + 'opalesce', + 'openbill', + 'opendoor', + 'openness', + 'openwork', + 'operable', + 'operance', + 'operancy', + 'operatic', + 'operator', + 'opercula', + 'operetta', + 'ophidian', + 'ophidion', + 'ophiuran', + 'ophiurid', + 'opianine', + 'opificer', + 'opinable', + 'opinator', + 'opiniate', + 'opinicus', + 'opletree', + 'opopanax', + 'oppilate', + 'oppleted', + 'opponent', + 'opposite', + 'opprobry', + 'oppugner', + 'optation', + 'optative', + 'optician', + 'optimacy', + 'optimate', + 'optimism', + 'optimist', + 'optimity', + 'optional', + 'optogram', + 'opulence', + 'opulency', + 'opuscule', + 'orabassu', + 'oracular', + 'oragious', + 'orangeat', + 'orangery', + 'orangite', + 'oratorio', + 'oratress', + 'orbation', + 'orbicula', + 'orbitary', + 'orbitude', + 'orbulina', + 'orcadian', + 'orchanet', + 'orchitis', + 'ordainer', + 'ordalian', + 'ordering', + 'ordinand', + 'ordinant', + 'ordinary', + 'ordinate', + 'ordnance', + 'ordovian', + 'ordurous', + 'oreodont', + 'oreosoma', + 'organdie', + 'organism', + 'organist', + 'organity', + 'organize', + 'organule', + 'orgulous', + 'oriental', + 'oriflamb', + 'origanum', + 'original', + 'oriskany', + 'orkneyan', + 'ornament', + 'ornately', + 'ornature', + 'ornithic', + 'ornithon', + 'orograph', + 'orometer', + 'orphancy', + 'orphanet', + 'orpiment', + 'orseille', + 'orsellic', + 'orthodox', + 'orthoepy', + 'orthogon', + 'orthopny', + 'orvietan', + 'oryctere', + 'oscinian', + 'oscinine', + 'oscitant', + 'oscitate', + 'osculant', + 'osculate', + 'osmazome', + 'osmiamic', + 'osmogene', + 'osnaburg', + 'ossianic', + 'ossified', + 'osteitis', + 'osteogen', + 'osteozoa', + 'ostracea', + 'otiosity', + 'otobafat', + 'otocrane', + 'otolitic', + 'otopathy', + 'otorrhea', + 'otoscope', + 'otoscopy', + 'otosteal', + 'ottomite', + 'ouistiti', + 'oulachan', + 'ourology', + 'outargue', + 'outbleat', + 'outblown', + 'outblush', + 'outboard', + 'outbound', + 'outbowed', + 'outbrave', + 'outbreak', + 'outbribe', + 'outbring', + 'outbuild', + 'outburst', + 'outcheat', + 'outclimb', + 'outcourt', + 'outcrier', + 'outdated', + 'outdoors', + 'outdream', + 'outdrink', + 'outdwell', + 'outfeast', + 'outfield', + 'outflank', + 'outfling', + 'outfrown', + 'outgoing', + 'outguard', + 'outhouse', + 'outknave', + 'outlabor', + 'outlaugh', + 'outlawry', + 'outlearn', + 'outliver', + 'outloose', + 'outlying', + 'outmarch', + 'outmount', + 'outnoise', + 'outpoise', + 'outpower', + 'outprize', + 'outrance', + 'outreach', + 'outreign', + 'outrider', + 'outright', + 'outrival', + 'outscent', + 'outscold', + 'outscorn', + 'outscout', + 'outshine', + 'outshoot', + 'outsider', + 'outskirt', + 'outsleep', + 'outslide', + 'outsound', + 'outspeak', + 'outspeed', + 'outspend', + 'outsport', + 'outstand', + 'outstare', + 'outstart', + 'outstorm', + 'outstrip', + 'outswear', + 'outswell', + 'outtaken', + 'outthrow', + 'outtwine', + 'outvalue', + 'outvenom', + 'outvoice', + 'outwards', + 'outwatch', + 'outweary', + 'outweigh', + 'outwhore', + 'outworth', + 'outwrest', + 'outwrite', + 'ovariole', + 'ovarious', + 'ovaritis', + 'ovenbird', + 'overalls', + 'overarch', + 'overbear', + 'overbend', + 'overbide', + 'overblow', + 'overboil', + 'overbold', + 'overbrim', + 'overbrow', + 'overbulk', + 'overburn', + 'overcare', + 'overcast', + 'overcloy', + 'overcoat', + 'overcold', + 'overcome', + 'overcrow', + 'overdare', + 'overdate', + 'overdeal', + 'overdoer', + 'overdose', + 'overdraw', + 'overfall', + 'overfeed', + 'overfill', + 'overfish', + 'overflow', + 'overflux', + 'overfond', + 'overfree', + 'overfull', + 'overgaze', + 'overgild', + 'overgird', + 'overgive', + 'overglad', + 'overgrow', + 'overhale', + 'overhall', + 'overhand', + 'overhang', + 'overhaul', + 'overhead', + 'overhear', + 'overheat', + 'overhele', + 'overhent', + 'overhigh', + 'overhold', + 'overhung', + 'overjump', + 'overking', + 'overlade', + 'overland', + 'overlash', + 'overlate', + 'overlave', + 'overlead', + 'overleap', + 'overlick', + 'overlive', + 'overload', + 'overlong', + 'overlook', + 'overloop', + 'overlord', + 'overloud', + 'overlove', + 'overmast', + 'overmore', + 'overmost', + 'overmuch', + 'overname', + 'overneat', + 'overnice', + 'overpart', + 'overpass', + 'overpeer', + 'overplus', + 'overpost', + 'overrake', + 'overrank', + 'overrate', + 'overread', + 'overrent', + 'overrich', + 'override', + 'overripe', + 'overrule', + 'overseas', + 'overseer', + 'oversell', + 'overshoe', + 'overshot', + 'oversize', + 'overskip', + 'overslip', + 'overslop', + 'overslow', + 'oversman', + 'oversnow', + 'oversoon', + 'oversoul', + 'overspan', + 'overspin', + 'overstay', + 'overstep', + 'oversure', + 'oversway', + 'overtake', + 'overtalk', + 'overtask', + 'overtilt', + 'overtime', + 'overtire', + 'overtoil', + 'overtone', + 'overtrip', + 'overtrow', + 'overture', + 'overturn', + 'overvail', + 'overveil', + 'overview', + 'overvote', + 'overwalk', + 'overwary', + 'overwash', + 'overweak', + 'overwear', + 'overween', + 'overwell', + 'overwind', + 'overwing', + 'overwise', + 'overword', + 'overwork', + 'overworn', + 'overzeal', + 'ovicular', + 'oviducal', + 'oviposit', + 'owllight', + 'oxaluric', + 'oxanilic', + 'oxidable', + 'oxidator', + 'oxidizer', + 'oxpecker', + 'oxtongue', + 'oxycrate', + 'oxygenic', + 'oxygonal', + 'oxymoron', + 'oxyphony', + 'oxytocic', + 'ozonizer', + 'pabulous', + 'pacation', + 'pachalic', + 'pachonta', + 'pachyote', + 'pacifico', + 'pacifier', + 'pacinian', + 'packfong', + 'padelion', + 'padishah', + 'paduasoy', + 'paducahs', + 'paeonine', + 'pagandom', + 'paganish', + 'paganism', + 'paganity', + 'paganize', + 'pagehood', + 'pagodite', + 'pagurian', + 'pahoehoe', + 'pailmall', + 'painable', + 'painless', + 'painting', + 'painture', + 'pairment', + 'palamate', + 'palatial', + 'palatine', + 'palative', + 'palatize', + 'paleface', + 'paleness', + 'palenque', + 'palestra', + 'palewise', + 'palgrave', + 'paliform', + 'palilogy', + 'palinode', + 'palinody', + 'palisade', + 'palisado', + 'palladic', + 'palliard', + 'palliate', + 'pallidly', + 'palmated', + 'palmette', + 'palmetto', + 'palmiped', + 'palmitic', + 'palmitin', + 'palometa', + 'palpable', + 'palpator', + 'palpebra', + 'palpifer', + 'palpiger', + 'palpless', + 'palpocil', + 'palsical', + 'palstave', + 'palterer', + 'palterly', + 'paltrily', + 'paludina', + 'paludine', + 'paludism', + 'paludose', + 'pampered', + 'pamperer', + 'pamperos', + 'pamphlet', + 'panabase', + 'panacean', + 'pancarte', + 'panchway', + 'pancreas', + 'pandanus', + 'pandemic', + 'panderly', + 'pandowdy', + 'panegyry', + 'paneless', + 'paneling', + 'pangless', + 'pangolin', + 'panicled', + 'pannikel', + 'pannikin', + 'panorama', + 'panorpid', + 'pansophy', + 'pantable', + 'pantalet', + 'pantheon', + 'pantofle', + 'panurgic', + 'panzoism', + 'papabote', + 'papalist', + 'papality', + 'papalize', + 'paparchy', + 'papillar', + 'papistic', + 'papistry', + 'pappoose', + 'papulose', + 'papulous', + 'papyrean', + 'papyrine', + 'parabola', + 'parabole', + 'paradigm', + 'paradise', + 'paradoxy', + 'paraffin', + 'paragoge', + 'paragram', + 'parakeet', + 'parakite', + 'paralian', + 'parallax', + 'parallel', + 'paralogy', + 'paralyse', + 'paralyze', + 'parament', + 'paramere', + 'paramour', + 'paranoia', + 'parapegm', + 'paraquet', + 'parasang', + 'parashah', + 'parasita', + 'parasite', + 'parauque', + 'paravail', + 'paravant', + 'paraxial', + 'parbreak', + 'parcener', + 'parchesi', + 'parching', + 'parchisi', + 'parclose', + 'pardoner', + 'parelcon', + 'parement', + 'parental', + 'parergon', + 'parfitly', + 'parfocal', + 'parfourn', + 'pargeter', + 'parhelic', + 'parietal', + 'parietes', + 'parietic', + 'parillin', + 'parishen', + 'parisian', + 'paritory', + 'parkeria', + 'parlance', + 'parlando', + 'parlante', + 'parmesan', + 'parodist', + 'paronymy', + 'paroquet', + 'parotoid', + 'parousia', + 'paroxysm', + 'parraqua', + 'parroter', + 'parrotry', + 'parsoned', + 'parsonic', + 'partable', + 'partaker', + 'parterre', + 'parthian', + 'partible', + 'particle', + 'partisan', + 'partyism', + 'parvolin', + 'pashalic', + 'pasilaly', + 'passable', + 'passably', + 'passager', + 'passeres', + 'passible', + 'passless', + 'passover', + 'passport', + 'password', + 'pastille', + 'pastoral', + 'pastorly', + 'pasturer', + 'patacoon', + 'patagium', + 'patchery', + 'patellar', + 'patentee', + 'patently', + 'paterero', + 'paternal', + 'pathetic', + 'pathless', + 'patience', + 'patriots', + 'patronal', + 'pattemar', + 'pattened', + 'patterer', + 'pattypan', + 'patulous', + 'pauldron', + 'pavement', + 'pavesade', + 'pavidity', + 'pavilion', + 'pavonian', + 'pavonine', + 'pawnable', + 'paxillus', + 'paxywaxy', + 'paycerps', + 'peaceful', + 'peachick', + 'pearlash', + 'pearlins', + 'pearlite', + 'pearmain', + 'peastone', + 'peasweep', + 'peccable', + 'peccancy', + 'pectinal', + 'pectoral', + 'pectosic', + 'peculate', + 'peculiar', + 'peculium', + 'pecunial', + 'pedagogy', + 'pedalian', + 'pedality', + 'pedantic', + 'pedantry', + 'pedarian', + 'peddlery', + 'peddling', + 'pederast', + 'pederero', + 'pedestal', + 'pedicule', + 'pedicure', + 'pediform', + 'pedigree', + 'pediluvy', + 'pedimana', + 'pedimane', + 'pediment', + 'pedipalp', + 'pedireme', + 'pedology', + 'pedregal', + 'peduncle', + 'peekaboo', + 'peephole', + 'peerless', + 'peerweet', + 'pegasean', + 'pegasoid', + 'pegroots', + 'peignoir', + 'pelagian', + 'pelasgic', + 'pelecoid', + 'pelerine', + 'pelicoid', + 'pellagra', + 'pelleted', + 'pellicle', + 'pellmell', + 'pellucid', + 'pelopium', + 'pelotage', + 'peltated', + 'pelusiac', + 'pemmican', + 'penality', + 'penalize', + 'penchant', + 'penchute', + 'penciled', + 'pencraft', + 'pendence', + 'pendency', + 'pendicle', + 'pendular', + 'pendulum', + 'penelope', + 'pengolin', + 'penhouse', + 'penitent', + 'penknife', + 'pennated', + 'penology', + 'pensible', + 'pensived', + 'penstock', + 'pentacid', + 'pentacle', + 'pentafid', + 'pentagon', + 'pentelic', + 'pentosan', + 'pentroof', + 'pentylic', + 'penuchle', + 'penumbra', + 'penwiper', + 'penwoman', + 'peoplish', + 'pepastic', + 'peperine', + 'peperino', + 'pepperer', + 'peptogen', + 'peracute', + 'perbreak', + 'perceive', + 'perchant', + 'perclose', + 'perflate', + 'perforce', + 'perfumer', + 'periagua', + 'perianth', + 'periblem', + 'pericarp', + 'pericope', + 'periderm', + 'peridium', + 'periergy', + 'perigean', + 'perigeum', + 'perigone', + 'perilous', + 'perineal', + 'perineum', + 'periodic', + 'perioeci', + 'periople', + 'periotic', + 'perisarc', + 'periscii', + 'perisoma', + 'perisome', + 'perissad', + 'perjenet', + 'perjured', + 'perjurer', + 'perlitic', + 'permeant', + 'permeate', + 'permians', + 'permuter', + 'pernancy', + 'peronate', + 'peroneal', + 'perorate', + 'peroxide', + 'perruque', + 'persecot', + 'persever', + 'persicot', + 'persolve', + 'personal', + 'perspire', + 'persuade', + 'perthite', + 'pertness', + 'pertused', + 'peruvian', + 'perverse', + 'pervious', + 'pesanted', + 'peschito', + 'peshitto', + 'pessulus', + 'pesterer', + 'petaline', + 'petalism', + 'petalite', + 'petalody', + 'petaloid', + 'petalous', + 'peterero', + 'peterman', + 'petiolar', + 'petioled', + 'petition', + 'petitmal', + 'petitory', + 'petrific', + 'petronel', + 'petrosal', + 'pettifog', + 'petulant', + 'petuntse', + 'petuntze', + 'pewterer', + 'pezizoid', + 'phaethon', + 'phalaena', + 'phallism', + 'phantasm', + 'phantasy', + 'pharisee', + 'pharmacy', + 'phatagin', + 'pheasant', + 'phenetol', + 'phenylic', + 'philabeg', + 'philauty', + 'philibeg', + 'philomel', + 'philomot', + 'phimosis', + 'phlegmon', + 'phlorone', + 'phocenic', + 'phocenin', + 'phonetic', + 'phorminx', + 'phormium', + 'phoronis', + 'phosgene', + 'phospham', + 'phosphor', + 'photogen', + 'photopsy', + 'phrasing', + 'phreatic', + 'phrenics', + 'phrenism', + 'phrentic', + 'phrygian', + 'phthalic', + 'phthalin', + 'phthalyl', + 'phthisic', + 'phthisis', + 'phylarch', + 'phyllite', + 'phyllode', + 'phyllody', + 'phylloid', + 'phyllome', + 'phyllous', + 'physalia', + 'physeter', + 'physical', + 'physique', + 'physnomy', + 'physopod', + 'phytomer', + 'piacular', + 'piamater', + 'pianette', + 'piassava', + 'picapare', + 'picariae', + 'picarian', + 'picaroon', + 'picayune', + 'piccadil', + 'piciform', + 'pickback', + 'pickerel', + 'picketee', + 'picklock', + 'pickmire', + 'picknick', + 'pickpack', + 'picoline', + 'picotine', + 'picromel', + 'pictoric', + 'pictural', + 'pictured', + 'picturer', + 'piddling', + 'piecener', + 'piedmont', + 'piedness', + 'pieplant', + 'piercing', + 'pierides', + 'pigeonry', + 'piketail', + 'pilaster', + 'pilchard', + 'pileated', + 'pilement', + 'pilentum', + 'pileworm', + 'pilewort', + 'pilferer', + 'pilidium', + 'pilifera', + 'piliform', + 'pillager', + 'pillared', + 'pillaret', + 'pillowed', + 'pillworm', + 'pillwort', + 'pilosity', + 'pilotage', + 'pilotism', + 'pilulous', + 'pimelite', + 'pimiento', + 'pimpillo', + 'pimpinel', + 'pimpship', + 'pinacoid', + 'pinacone', + 'pinafore', + 'pinaster', + 'pinchers', + 'pinching', + 'pincpinc', + 'pindaric', + 'pineweed', + 'pingster', + 'piningly', + 'pinioned', + 'pinkness', + 'pinkroot', + 'pinkster', + 'pinnacle', + 'pinnated', + 'pinniped', + 'pinpatch', + 'pioneers', + 'pipeclay', + 'pipefish', + 'pipeline', + 'piperine', + 'pipestem', + 'pipevine', + 'pipewood', + 'pipewort', + 'piquancy', + 'pirarucu', + 'piscator', + 'piscinal', + 'pisiform', + 'pisolite', + 'pissabed', + 'pistache', + 'pistacia', + 'pistolet', + 'pitahaya', + 'pitching', + 'pithless', + 'pithsome', + 'pitiable', + 'pitiless', + 'pittacal', + 'pittance', + 'pityroid', + 'placable', + 'placeful', + 'placeman', + 'placenta', + 'placidly', + 'placitum', + 'plagiary', + 'plaguily', + 'plaiding', + 'plainant', + 'plaining', + 'plaister', + 'planaria', + 'plancher', + 'planchet', + 'planeted', + 'planetic', + 'plangent', + 'planking', + 'plankton', + 'planless', + 'plantage', + 'plantain', + 'planting', + 'plantlet', + 'plantule', + 'plashing', + 'plashoot', + 'plastery', + 'plastide', + 'plastron', + 'platanus', + 'platband', + 'plateful', + 'platform', + 'platinic', + 'platinum', + 'platness', + 'platonic', + 'platting', + 'platypod', + 'platypus', + 'plausive', + 'playbill', + 'playbook', + 'playfere', + 'playgame', + 'playgoer', + 'playmate', + 'playsome', + 'playtime', + 'pleading', + 'pleasant', + 'pleasing', + 'pleasure', + 'plebeian', + 'plectile', + 'plectrum', + 'pledgeor', + 'pledgery', + 'pleiades', + 'plenarty', + 'pleonasm', + 'pleonast', + 'plesance', + 'plethora', + 'plethory', + 'plethron', + 'plethrum', + 'pleurisy', + 'pleurite', + 'plicated', + 'plighter', + 'plimsoll', + 'pliocene', + 'plodding', + 'plougher', + 'plowable', + 'plowbote', + 'plowfoot', + 'plowgang', + 'plowgate', + 'plowhead', + 'plowland', + 'plowtail', + 'ployment', + 'pluckily', + 'plugging', + 'plumbage', + 'plumbago', + 'plumbean', + 'plumbery', + 'plumbing', + 'plumbism', + 'plumbous', + 'plumelet', + 'plumiped', + 'plumming', + 'plumular', + 'plurally', + 'plutonic', + 'pluviose', + 'pluvious', + 'pneumato', + 'pneumony', + 'poachard', + 'pockmark', + 'pockwood', + 'poculent', + 'podagric', + 'podalgia', + 'podetium', + 'podiceps', + 'podocarp', + 'poematic', + 'poephaga', + 'poetical', + 'poetship', + 'poignant', + 'pointing', + 'pointrel', + 'poisoner', + 'pokerish', + 'pokeweed', + 'polander', + 'polarchy', + 'polarily', + 'polarity', + 'polarize', + 'poledavy', + 'poleless', + 'polemics', + 'polemist', + 'polestar', + 'policate', + 'policial', + 'policied', + 'polished', + 'polisher', + 'politely', + 'politics', + 'politize', + 'politure', + 'pollened', + 'pollenin', + 'polliwig', + 'polliwog', + 'polluted', + 'polluter', + 'pollywog', + 'polonese', + 'polonium', + 'poltroon', + 'polyacid', + 'polyfoil', + 'polygala', + 'polygamy', + 'polygeny', + 'polyglot', + 'polygony', + 'polygram', + 'polygyny', + 'polylogy', + 'polymnia', + 'polyneme', + 'polyonym', + 'polypary', + 'polypean', + 'polypide', + 'polypier', + 'polypite', + 'polypode', + 'polypody', + 'polypoid', + 'polypous', + 'polytomy', + 'polytype', + 'polyuria', + 'polyzoan', + 'polyzoon', + 'pomander', + 'pomarine', + 'pommette', + 'pomology', + 'pompatic', + 'pompeian', + 'pomptine', + 'pomwater', + 'poncelet', + 'ponderal', + 'ponderer', + 'pondfish', + 'pondweed', + 'pontifex', + 'pontific', + 'poorness', + 'popeling', + 'popelote', + 'popinjay', + 'poplitic', + 'popovtsy', + 'populace', + 'populacy', + 'populate', + 'populism', + 'populist', + 'populous', + 'poraille', + 'porifera', + 'poriform', + 'poriness', + 'poristic', + 'porkling', + 'porkwood', + 'porosity', + 'porotype', + 'porously', + 'porpesse', + 'porphyre', + 'porphyry', + 'porpoise', + 'porridge', + 'portable', + 'portague', + 'portance', + 'portegue', + 'portesse', + 'portfire', + 'porthole', + 'porthook', + 'porthors', + 'portiere', + 'portigue', + 'portlast', + 'portmote', + 'portoise', + 'portpane', + 'portrait', + 'portress', + 'portsale', + 'portuary', + 'porwigle', + 'posingly', + 'position', + 'positive', + 'positure', + 'posology', + 'possible', + 'possibly', + 'postable', + 'postanal', + 'postcava', + 'postdate', + 'postfact', + 'posthume', + 'postiler', + 'postlude', + 'postmark', + 'postnate', + 'postnote', + 'postoral', + 'postpaid', + 'postpone', + 'postpose', + 'postural', + 'posturer', + 'potamian', + 'potashes', + 'potassic', + 'potation', + 'potatory', + 'potecary', + 'potently', + 'pothouse', + 'potlatch', + 'potshard', + 'potshare', + 'potsherd', + 'potstone', + 'potulent', + 'pouchong', + 'poulaine', + 'pouldron', + 'poultice', + 'poultive', + 'pouncing', + 'poundage', + 'pounding', + 'poupeton', + 'pourlieu', + 'pourtray', + 'powdered', + 'powerful', + 'powldron', + 'poynette', + 'practice', + 'practick', + 'practico', + 'practise', + 'practive', + 'praecava', + 'praecipe', + 'praedial', + 'praeoral', + 'prairial', + 'prandial', + 'prankish', + 'prateful', + 'pratique', + 'prattler', + 'preacher', + 'preamble', + 'preaxial', + 'precinct', + 'precious', + 'preclude', + 'precoces', + 'precurse', + 'predecay', + 'predella', + 'preelect', + 'preerect', + 'preexist', + 'prefacer', + 'pregnant', + 'prehensi', + 'prehnite', + 'prejudge', + 'prelatic', + 'prelatry', + 'prelimit', + 'preluder', + 'premerit', + 'premiant', + 'premices', + 'premiere', + 'premious', + 'premolar', + 'premorse', + 'prenasal', + 'prenatal', + 'prenomen', + 'prentice', + 'preorder', + 'prepared', + 'preparer', + 'prepense', + 'prepubic', + 'prepubis', + 'presager', + 'presbyte', + 'prescind', + 'presence', + 'preserve', + 'presider', + 'presidio', + 'pressing', + 'pression', + 'pressive', + 'pressman', + 'pressure', + 'prestige', + 'presumer', + 'pretence', + 'pretense', + 'preterit', + 'prettily', + 'previous', + 'priapean', + 'priapism', + 'priceite', + 'pricking', + 'prideful', + 'priedieu', + 'priestly', + 'priggery', + 'priggish', + 'priggism', + 'prillion', + 'primates', + 'primeval', + 'primitia', + 'primness', + 'primrose', + 'princely', + 'princess', + 'princock', + 'printery', + 'printing', + 'priorate', + 'prioress', + 'priority', + 'prismoid', + 'prisoner', + 'pristine', + 'pritchel', + 'prizable', + 'prizeman', + 'proatlas', + 'probable', + 'probably', + 'probator', + 'proceeds', + 'proceres', + 'prochein', + 'procinct', + 'proclaim', + 'proclive', + 'procoele', + 'procurer', + 'prodigal', + 'proditor', + 'prodrome', + 'producer', + 'proemial', + 'profaner', + 'profound', + 'progress', + 'prohibit', + 'prolapse', + 'prolatum', + 'prolific', + 'prolixly', + 'prologue', + 'prolonge', + 'promerit', + 'promisee', + 'promiser', + 'promisor', + 'promoter', + 'promover', + 'prompter', + 'promptly', + 'promulge', + 'pronator', + 'prononce', + 'pronotum', + 'prooetic', + 'propense', + 'propenyl', + 'properly', + 'property', + 'prophane', + 'prophecy', + 'prophesy', + 'propinyl', + 'propione', + 'proplasm', + 'propolis', + 'proposal', + 'proposer', + 'propound', + 'propulse', + 'propylic', + 'propylon', + 'prorenal', + 'prorogue', + 'prosaism', + 'prosaist', + 'proseman', + 'prospect', + 'prostate', + 'prostyle', + 'protagon', + 'protamin', + 'protasis', + 'protatic', + 'protegee', + 'proteles', + 'protense', + 'proteose', + 'protista', + 'protocol', + 'protozoa', + 'protract', + 'protrude', + 'proudish', + 'provable', + 'provided', + 'provider', + 'province', + 'provisor', + 'prowling', + 'proxenet', + 'proximad', + 'proximal', + 'prudence', + 'prudency', + 'pruinate', + 'pruinose', + 'pruinous', + 'prunella', + 'prunelle', + 'prunello', + 'prurient', + 'pruritus', + 'prussian', + 'prutenic', + 'pryingly', + 'prytanis', + 'psalmist', + 'psalmody', + 'psaltery', + 'psammite', + 'psellism', + 'psephism', + 'psittaci', + 'psychian', + 'psychics', + 'psychism', + 'pteropod', + 'pterotic', + 'ptilosis', + 'ptomaine', + 'ptyalism', + 'publican', + 'publicly', + 'pucelage', + 'puckball', + 'puckerer', + 'puckfist', + 'puddling', + 'pudendal', + 'pudendum', + 'pudicity', + 'puffball', + 'puggaree', + 'puggered', + 'pugilism', + 'pugilist', + 'puissant', + 'pulicene', + 'pulicose', + 'pulicous', + 'pulingly', + 'pullback', + 'pulmonic', + 'pulmotor', + 'pulpited', + 'pulpiter', + 'pulpitry', + 'pulsator', + 'pulsific', + 'pultesse', + 'pulvillo', + 'pulvinar', + 'pulvinic', + 'pumicate', + 'puncheon', + 'punction', + 'punctist', + 'punctual', + 'puncture', + 'pungence', + 'pungency', + 'punicial', + 'puniness', + 'punisher', + 'punition', + 'punitive', + 'punitory', + 'punkling', + 'puntello', + 'pupation', + 'pupilage', + 'pupipara', + 'pupivora', + 'puplican', + 'puppetry', + 'puppyish', + 'puppyism', + 'purblind', + 'purchase', + 'pureness', + 'purfling', + 'purifier', + 'puriform', + 'puristic', + 'purkinje', + 'purparty', + 'purplish', + 'purposer', + 'purprise', + 'purpureo', + 'purpuric', + 'purpurin', + 'purseful', + 'purslain', + 'purslane', + 'pursuant', + 'purulent', + 'purveyor', + 'puseyism', + 'puseyite', + 'pustular', + 'putanism', + 'putative', + 'putchuck', + 'putidity', + 'putresce', + 'puzzolan', + 'pyelitis', + 'pygargus', + 'pygidium', + 'pylagore', + 'pyogenic', + 'pyramoid', + 'pyrazine', + 'pyrenean', + 'pyrenoid', + 'pyrexial', + 'pyridine', + 'pyriform', + 'pyritize', + 'pyritoid', + 'pyritous', + 'pyroacid', + 'pyrocoll', + 'pyrology', + 'pyrosome', + 'pyrouric', + 'pyroxene', + 'pyroxyle', + 'pythonic', + 'pyxidate', + 'pyxidium', + 'quackery', + 'quackish', + 'quackism', + 'quadrans', + 'quadrant', + 'quadrate', + 'quadriga', + 'quadroon', + 'quaestor', + 'quagmire', + 'quaintly', + 'quakerly', + 'qualmish', + 'quandary', + 'quandong', + 'quantify', + 'quantity', + 'quarried', + 'quarrier', + 'quartane', + 'quartene', + 'quartern', + 'quartile', + 'quartine', + 'quateron', + 'quatorze', + 'quatrain', + 'quaverer', + 'queasily', + 'quebrith', + 'queendom', + 'queening', + 'queerish', + 'quemeful', + 'quencher', + 'quenelle', + 'quercite', + 'questant', + 'question', + 'questman', + 'quibbler', + 'quichuan', + 'quickens', + 'quickset', + 'quiddany', + 'quiddity', + 'quiddler', + 'quidnunc', + 'quietage', + 'quietism', + 'quietist', + 'quietude', + 'quilling', + 'quilting', + 'quinazol', + 'quincunx', + 'quindism', + 'quinible', + 'quininic', + 'quinogen', + 'quinovic', + 'quinovin', + 'quinoxyl', + 'quintain', + 'quintile', + 'quintine', + 'quintole', + 'quirinal', + 'quirites', + 'quirkish', + 'quirpele', + 'quitrent', + 'quitture', + 'quivered', + 'quixotic', + 'quixotry', + 'quizzism', + 'quoddies', + 'quotable', + 'quotient', + 'quotiety', + 'rabatine', + 'rabbinic', + 'rabbitry', + 'rabidity', + 'racahout', + 'racemate', + 'racemose', + 'racemous', + 'racemule', + 'rachilla', + 'rachitic', + 'rachitis', + 'raciness', + 'racketer', + 'racktail', + 'rackwork', + 'racoonda', + 'racovian', + 'radially', + 'radiance', + 'radiancy', + 'radiated', + 'radiator', + 'radicant', + 'radicate', + 'radicule', + 'raftsman', + 'ragabash', + 'ragguled', + 'ragnarok', + 'raillery', + 'railleur', + 'railroad', + 'raindeer', + 'raindrop', + 'rainfall', + 'rainless', + 'raisable', + 'raisonne', + 'rakehell', + 'rakishly', + 'rakuware', + 'ramayana', + 'ramberge', + 'rambling', + 'rambooze', + 'rambutan', + 'ramequin', + 'ramiform', + 'rampancy', + 'ramulose', + 'ramulous', + 'ranchero', + 'ranchman', + 'rancidly', + 'randomly', + 'ranedeer', + 'ranforce', + 'rankness', + 'ransomer', + 'rapacity', + 'rapfully', + 'raphides', + 'rapidity', + 'rapiered', + 'rapinous', + 'rapparee', + 'raptores', + 'rareness', + 'rareripe', + 'rascally', + 'rashling', + 'rashness', + 'rasorial', + 'rataplan', + 'rateable', + 'rathripe', + 'ratifier', + 'rational', + 'ratitate', + 'ratlines', + 'ratsbane', + 'rattinet', + 'raunsoun', + 'ravehook', + 'raveling', + 'ravenala', + 'ravening', + 'ravenous', + 'ravisher', + 'rawboned', + 'raygrass', + 'reabsorb', + 'reaccess', + 'reaccuse', + 'reaction', + 'reactive', + 'readable', + 'readjust', + 'reaffirm', + 'realizer', + 'reallege', + 'realness', + 'reanswer', + 'reappear', + 'reardoss', + 'rearmost', + 'rearward', + 'reascend', + 'reascent', + 'reasoner', + 'reassert', + 'reassign', + 'reassume', + 'reassure', + 'reattach', + 'reattain', + 'rebanish', + 'rebeldom', + 'rebeller', + 'rebellow', + 'rebiting', + 'rebucous', + 'rebuttal', + 'rebutter', + 'recanter', + 'recapper', + 'recaptor', + 'receiver', + 'recenter', + 'recently', + 'recessed', + 'rechange', + 'recharge', + 'rechless', + 'rechoose', + 'reciprok', + 'recision', + 'reckless', + 'reckling', + 'reckoner', + 'reclined', + 'recliner', + 'reclothe', + 'recoiler', + 'recollet', + 'recommit', + 'reconvey', + 'recorder', + 'recouper', + 'recourse', + 'recovery', + 'recreant', + 'recreate', + 'rectitis', + 'rectoral', + 'rectress', + 'recurved', + 'recusant', + 'redactor', + 'redargue', + 'redbelly', + 'redcross', + 'redeemer', + 'redeless', + 'redemand', + 'redemise', + 'redented', + 'redfinch', + 'redigest', + 'redirect', + 'redition', + 'redivide', + 'redmouth', + 'redolent', + 'redouble', + 'redshank', + 'redstart', + 'reducent', + 'reducing', + 'redwithe', + 'reedbird', + 'reedbuck', + 'reedless', + 'reedling', + 'reedwork', + 'reembark', + 'reembody', + 'reemerge', + 'reengage', + 'reenlist', + 'reestate', + 'reexport', + 'refasten', + 'referrer', + 'refigure', + 'refinery', + 'reflexed', + 'reflexly', + 'reflower', + 'refluent', + 'reflueus', + 'refoment', + 'reforest', + 'reforger', + 'reformed', + 'reformer', + 'reformly', + 'refunder', + 'refusion', + 'regalian', + 'regalism', + 'regality', + 'regarder', + 'regather', + 'regelate', + 'regicide', + 'regiment', + 'regional', + 'register', + 'registry', + 'regnancy', + 'regrater', + 'regrator', + 'regrowth', + 'regulate', + 'reguline', + 'regulize', + 'rehearse', + 'reillume', + 'reimbark', + 'reimbody', + 'reimport', + 'reimpose', + 'reindeer', + 'reinduce', + 'reinette', + 'reinfect', + 'reinfund', + 'reinless', + 'reinsert', + 'reinsure', + 'reinvest', + 'reissner', + 'rejecter', + 'rejoicer', + 'rekindle', + 'relapser', + 'relation', + 'relative', + 'relatrix', + 'relaxant', + 'releasee', + 'releaser', + 'releasor', + 'relegate', + 'relessee', + 'relessor', + 'relevant', + 'reliable', + 'reliance', + 'relicted', + 'reliever', + 'religion', + 'relocate', + 'relucent', + 'relumine', + 'remanent', + 'remarker', + 'remarque', + 'remberge', + 'remedial', + 'remember', + 'remenant', + 'remercie', + 'remiform', + 'reminder', + 'remissly', + 'remittal', + 'remittee', + 'remitter', + 'remittor', + 'remodify', + 'remolade', + 'remorate', + 'remorsed', + 'remotion', + 'remoulad', + 'remuable', + 'remurmur', + 'renderer', + 'rendible', + 'rendrock', + 'renegade', + 'renegado', + 'reniform', + 'renitent', + 'renneted', + 'renounce', + 'renovate', + 'renowmed', + 'renowned', + 'renowner', + 'rentable', + 'renterer', + 'renverse', + 'reobtain', + 'reoccupy', + 'reometer', + 'reoppose', + 'reordain', + 'reorient', + 'reotrope', + 'repacify', + 'repacker', + 'repairer', + 'repartee', + 'repaster', + 'repealer', + 'repeater', + 'repeller', + 'repenter', + 'repeople', + 'reperuse', + 'repetend', + 'replevin', + 'repolish', + 'reporter', + 'reposure', + 'repousse', + 'repriefe', + 'reprieve', + 'reprimer', + 'reprisal', + 'reprizes', + 'reproach', + 'reproval', + 'reprover', + 'reptilia', + 'republic', + 'repugner', + 'repulser', + 'repurify', + 'requirer', + 'requital', + 'requiter', + 'rerefief', + 'rereward', + 'resalgar', + 'resalute', + 'rescribe', + 'rescript', + 'research', + 'reseizer', + 'resemble', + 'resenter', + 'reserate', + 'reserved', + 'reservee', + 'reserver', + 'reservor', + 'resetter', + 'resettle', + 'resiance', + 'resident', + 'residual', + 'residuum', + 'resigned', + 'resignee', + 'resigner', + 'resinate', + 'resinoid', + 'resinous', + 'resister', + 'resolute', + 'resolved', + 'resolver', + 'resonant', + 'resorcin', + 'resorter', + 'resource', + 'resperse', + 'response', + 'restcure', + 'restless', + 'restoral', + 'restorer', + 'restrain', + 'restrict', + 'restrive', + 'resummon', + 'resupine', + 'resupply', + 'resurvey', + 'retailer', + 'retainal', + 'retainer', + 'retarder', + 'retentor', + 'retepore', + 'reticent', + 'reticule', + 'retiform', + 'retineum', + 'retinite', + 'retinoid', + 'retinula', + 'retiracy', + 'retirade', + 'retiring', + 'retorter', + 'retraict', + 'retraxit', + 'retrench', + 'retrieve', + 'retroact', + 'retrorse', + 'returner', + 'revealer', + 'reveille', + 'revelate', + 'revelous', + 'revenger', + 'reverend', + 'reverent', + 'reversal', + 'reversed', + 'reverser', + 'reversis', + 'reverted', + 'reverter', + 'revestry', + 'reviewal', + 'reviewer', + 'reviling', + 'revision', + 'revisory', + 'revivify', + 'reviving', + 'revocate', + 'revolter', + 'revolute', + 'revolver', + 'rewarder', + 'rhabdite', + 'rhaetian', + 'rhamadan', + 'rhapsode', + 'rhapsody', + 'rhatanhy', + 'rhematic', + 'rheocrat', + 'rheostat', + 'rheotome', + 'rhetoric', + 'rhinitis', + 'rhizogan', + 'rhizogen', + 'rhizopod', + 'rhodanic', + 'rhomboid', + 'rhonchal', + 'rhonchus', + 'rhopalic', + 'rhubarby', + 'rhyolite', + 'rhythmer', + 'rhythmic', + 'rhythmus', + 'ribaldry', + 'ribanded', + 'ribaudry', + 'ribroast', + 'ricebird', + 'richesse', + 'richness', + 'richweed', + 'ricinine', + 'rickrack', + 'ricochet', + 'riddance', + 'riddling', + 'ridgelet', + 'ridicule', + 'riffraff', + 'rifleman', + 'rigadoon', + 'rigarion', + 'rightful', + 'rigidity', + 'rigorism', + 'rigorist', + 'rigorous', + 'rimosely', + 'rimosity', + 'rindless', + 'ringbill', + 'ringbird', + 'ringbolt', + 'ringbone', + 'ringdove', + 'ringhead', + 'ringneck', + 'ringsail', + 'ringtail', + 'ringtoss', + 'ringworm', + 'riparian', + 'ripeness', + 'riptowel', + 'risorial', + 'ritenuto', + 'ritratto', + 'ritually', + 'rivaless', + 'rivality', + 'riveting', + 'rixation', + 'rixatrix', + 'rixdaler', + 'roadless', + 'roadside', + 'roadster', + 'roasting', + 'robalito', + 'roborant', + 'roborate', + 'roborean', + 'robustly', + 'rocaille', + 'rochelle', + 'rockaway', + 'rockelay', + 'rockered', + 'rocketer', + 'rockfish', + 'rockless', + 'rockling', + 'rockrose', + 'rockweed', + 'rockwood', + 'rockwork', + 'rodentia', + 'rodomont', + 'roestone', + 'rogation', + 'rogatory', + 'rollable', + 'rollejee', + 'rolliche', + 'romancer', + 'romanish', + 'romanism', + 'romanist', + 'romanize', + 'romansch', + 'romantic', + 'romescot', + 'romeward', + 'roncador', + 'rondache', + 'roodebok', + 'roofless', + 'rooftree', + 'roomless', + 'roommate', + 'roomsome', + 'roorbach', + 'roorback', + 'roosaoil', + 'rootless', + 'ropeband', + 'ropewalk', + 'ropiness', + 'roration', + 'rorulent', + 'rosalgar', + 'rosarian', + 'rosebush', + 'rosedrop', + 'rosefish', + 'rosehead', + 'roselite', + 'rosemary', + 'roseroot', + 'rosewood', + 'roseworm', + 'rosewort', + 'rosiness', + 'rosselly', + 'rostrate', + 'rosulate', + 'rotacism', + 'rotalite', + 'rotation', + 'rotative', + 'rotatory', + 'rotifera', + 'rotiform', + 'roturier', + 'roughdry', + 'roughhew', + 'roughing', + 'roughish', + 'roughleg', + 'roulette', + 'rounding', + 'roundish', + 'roundlet', + 'roundtop', + 'roundure', + 'routcake', + 'rovingly', + 'rowdydow', + 'rowdyish', + 'rowdyism', + 'roxburgh', + 'royalism', + 'royalist', + 'royalize', + 'roytelet', + 'rubaiyat', + 'rubbidge', + 'rubiacin', + 'rubianic', + 'rubicund', + 'rubidine', + 'rubidium', + 'rubiform', + 'rubrical', + 'rubstone', + 'rubytail', + 'rubywood', + 'ruderary', + 'rudiment', + 'rudistes', + 'rufiopin', + 'rugosity', + 'rugulose', + 'ruinable', + 'ruleless', + 'rulingly', + 'rumbling', + 'ruminant', + 'ruminate', + 'rummager', + 'rumorous', + 'rumpless', + 'runagate', + 'runghead', + 'runology', + 'runround', + 'rupicola', + 'ruptuary', + 'ruptured', + 'ruralism', + 'ruralist', + 'rurality', + 'ruralize', + 'rushlike', + 'rustical', + 'rusticly', + 'rustless', + 'ruthenic', + 'ruthless', + 'rutilant', + 'rutilate', + 'rutilian', + 'rutinose', + 'rutylene', + 'sabaeism', + 'sabbatic', + 'sabbaton', + 'sabotage', + 'sabulose', + 'sabulous', + 'sacalait', + 'saccular', + 'sacculus', + 'sacellum', + 'sackless', + 'sacrific', + 'sacristy', + 'saddlery', + 'sadducee', + 'safeness', + 'saffrony', + 'safranin', + 'sagacity', + 'sagamore', + 'sageness', + 'sagenite', + 'saginate', + 'sagittal', + 'saibling', + 'sailable', + 'sailboat', + 'sailfish', + 'sailless', + 'sainfoin', + 'saintdom', + 'saintess', + 'saintish', + 'saintism', + 'salacity', + 'salading', + 'salagane', + 'salaried', + 'saleable', + 'saleably', + 'salesman', + 'salework', + 'salience', + 'saliency', + 'salinity', + 'salinous', + 'salivant', + 'salivary', + 'salivate', + 'salivous', + 'sallyman', + 'salmonet', + 'salpicon', + 'saltbush', + 'saltfoot', + 'saltless', + 'saltness', + 'saltwort', + 'salutary', + 'salvable', + 'salvific', + 'samarium', + 'samaroid', + 'sambucus', + 'sameness', + 'samphire', + 'sanation', + 'sanative', + 'sanatory', + 'sanctify', + 'sanction', + 'sanctity', + 'sandaled', + 'sandarac', + 'sandever', + 'sandfish', + 'sandiver', + 'sandwich', + 'sandworm', + 'sandwort', + 'saneness', + 'sangaree', + 'sangraal', + 'sangreal', + 'sanguify', + 'sanguine', + 'sanidine', + 'sanitary', + 'sanscrit', + 'sanskrit', + 'santalic', + 'santalin', + 'santalum', + 'santonic', + 'santonin', + 'sapidity', + 'sapience', + 'sapindus', + 'saponary', + 'saponify', + 'saponite', + 'saporous', + 'sapphire', + 'sapskull', + 'sapucaia', + 'saraband', + 'sarceled', + 'sarcelle', + 'sarcenet', + 'sarcocol', + 'sarcodic', + 'sarcosin', + 'sarcosis', + 'sarcotic', + 'sardonic', + 'sardonyx', + 'sargasso', + 'sarmatic', + 'sarplier', + 'sarrasin', + 'sarsenet', + 'sarumuse', + 'sassabye', + 'sassolin', + 'sassorol', + 'sastrugi', + 'satanism', + 'satanist', + 'sateless', + 'sathanas', + 'satirist', + 'satirize', + 'satrapal', + 'saturant', + 'saturate', + 'saturday', + 'saturity', + 'satyrion', + 'saubaant', + 'saucebox', + 'saucepan', + 'saucisse', + 'saunders', + 'saurioid', + 'saururae', + 'sauterne', + 'savagely', + 'savagery', + 'savagism', + 'saveable', + 'savement', + 'savingly', + 'savorily', + 'savorous', + 'savoyard', + 'sawbelly', + 'sawbones', + 'sawhorse', + 'sawtooth', + 'saxatile', + 'saxicava', + 'saxonism', + 'saxonist', + 'saxonite', + 'scabbard', + 'scabbily', + 'scabious', + 'scabling', + 'scabrous', + 'scabwort', + 'scaffold', + 'scalable', + 'scalaria', + 'scalawag', + 'scaliola', + 'scallion', + 'scalping', + 'scambler', + 'scammony', + 'scampish', + 'scandent', + 'scandium', + 'scansion', + 'scantily', + 'scantlet', + 'scaphism', + 'scaphite', + 'scaphoid', + 'scapular', + 'scapulet', + 'scarabee', + 'scarcely', + 'scarcity', + 'scariose', + 'scarious', + 'scarless', + 'scarmage', + 'scarmoge', + 'scarring', + 'scatches', + 'scathful', + 'scavenge', + 'scelerat', + 'scenario', + 'sceneful', + 'sceneman', + 'scenical', + 'scentful', + 'sceptral', + 'schedule', + 'scheelin', + 'scheming', + 'schemist', + 'scherbet', + 'schiedam', + 'schiller', + 'schistic', + 'schizont', + 'schmelze', + 'schnapps', + 'scholion', + 'scholium', + 'schoolma', + 'schooner', + 'sciatica', + 'scienter', + 'scilicet', + 'scillain', + 'scimitar', + 'scimiter', + 'scincoid', + 'sciolism', + 'sciolist', + 'sciolous', + 'scioptic', + 'scirrhus', + 'scissile', + 'scission', + 'scissors', + 'scissure', + 'sciurine', + 'sciuroid', + 'sclavism', + 'sclender', + 'sclerema', + 'sclerite', + 'scleroid', + 'scleroma', + 'sclerous', + 'scoffery', + 'scolding', + 'scolytid', + 'scomfish', + 'scoparin', + 'scopiped', + 'scopsowl', + 'scorbute', + 'scorious', + 'scornful', + 'scorpene', + 'scorpion', + 'scotsman', + 'scottish', + 'scourage', + 'scourger', + 'scrabble', + 'scraffle', + 'scragged', + 'scramble', + 'scrannel', + 'scraping', + 'scrapple', + 'scratchy', + 'scrawler', + 'screable', + 'screamer', + 'screechy', + 'screwing', + 'scribbet', + 'scribble', + 'scribism', + 'scriggle', + 'scrofula', + 'scrolled', + 'scrubbed', + 'scrubber', + 'scrupler', + 'scrutiny', + 'scuffler', + 'scullery', + 'scullion', + 'sculptor', + 'scumming', + 'scuppaug', + 'scurrier', + 'scurrile', + 'scurvily', + 'scutcher', + 'scutella', + 'scutiger', + 'scutiped', + 'scyllaea', + 'scyllite', + 'scymetar', + 'scythian', + 'seaacorn', + 'seaadder', + 'seaapple', + 'seaarrow', + 'seabeach', + 'seabeard', + 'seabeast', + 'seablite', + 'seaboard', + 'seabound', + 'seabream', + 'seabrief', + 'seachart', + 'seacoast', + 'seacocoa', + 'seadevil', + 'seadrake', + 'seaeagle', + 'seafarer', + 'seafight', + 'seafroth', + 'seagauge', + 'seagoing', + 'seagoose', + 'seagrape', + 'seagrass', + 'seagreen', + 'seaheath', + 'seaholly', + 'seahorse', + 'seajelly', + 'sealaces', + 'sealemon', + 'sealevel', + 'sealoach', + 'sealouse', + 'sealskin', + 'seamarge', + 'seamless', + 'seamouse', + 'seamster', + 'seaonion', + 'seaotter', + 'seapeach', + 'seaperch', + 'seapiece', + 'seapoker', + 'seapoppy', + 'seapurse', + 'seaquail', + 'seaquake', + 'searaven', + 'searcher', + 'searobin', + 'searover', + 'seascape', + 'seascurf', + 'seashell', + 'seashore', + 'seasnail', + 'seasnake', + 'seasnipe', + 'seasonal', + 'seasoner', + 'seathief', + 'seatless', + 'seatrout', + 'seawrack', + 'sebesten', + 'seconder', + 'secondly', + 'secretly', + 'sectator', + 'sectoral', + 'securely', + 'security', + 'sedation', + 'sedative', + 'sederunt', + 'sediment', + 'sedition', + 'seducing', + 'sedulity', + 'sedulous', + 'seecatch', + 'seedcake', + 'seedless', + 'seedling', + 'seedness', + 'seedsman', + 'seedtime', + 'seemless', + 'seemlily', + 'seerfish', + 'seerhand', + 'seership', + 'seerwood', + 'seidlitz', + 'seignior', + 'seirfish', + 'seizable', + 'selachii', + 'selcouth', + 'seldseen', + 'selector', + 'selenate', + 'selenide', + 'selenite', + 'selenium', + 'selfhood', + 'selfless', + 'selfness', + 'selfsame', + 'selvaged', + 'selvagee', + 'selvedge', + 'semblant', + 'sembling', + 'semester', + 'semiacid', + 'semiaxis', + 'semibull', + 'semicope', + 'semidome', + 'semiform', + 'semilens', + 'semilune', + 'semimute', + 'seminary', + 'seminate', + 'seminist', + 'seminose', + 'seminude', + 'semiopal', + 'semiotic', + 'semioval', + 'semipupa', + 'semiring', + 'semisoun', + 'semitism', + 'semitone', + 'semolina', + 'semolino', + 'sempster', + 'semuncia', + 'sengreen', + 'senility', + 'sennachy', + 'sennight', + 'senonian', + 'senorita', + 'sensated', + 'senseful', + 'sensible', + 'sensibly', + 'sensific', + 'sensuism', + 'sensuous', + 'sentence', + 'sentient', + 'sentinel', + 'sepaline', + 'sepalody', + 'sepaloid', + 'sepalous', + 'separate', + 'sepiment', + 'septette', + 'septfoil', + 'septical', + 'septuary', + 'septulum', + 'septuple', + 'sequence', + 'seraglio', + 'seraphic', + 'seraphim', + 'serenade', + 'serenata', + 'serenate', + 'serenely', + 'serenity', + 'serfhood', + 'sergeant', + 'serially', + 'seriatim', + 'sericite', + 'serjeant', + 'sermoner', + 'sermonet', + 'sermonic', + 'serosity', + 'serotine', + 'serpette', + 'serpolet', + 'serrated', + 'serrator', + 'servable', + 'servient', + 'servitor', + 'sesamoid', + 'sesspool', + 'sesterce', + 'sestetto', + 'setewale', + 'setiform', + 'setireme', + 'settling', + 'setulose', + 'severity', + 'sewellel', + 'sewerage', + 'sexangle', + 'sexenary', + 'sextetto', + 'sextolet', + 'sextonry', + 'sextuple', + 'sexually', + 'sforzato', + 'shabbily', + 'shabrack', + 'shadbird', + 'shaddock', + 'shadeful', + 'shadrach', + 'shaffler', + 'shafiite', + 'shafting', + 'shaftman', + 'shagbark', + 'shagreen', + 'shakings', + 'shalloon', + 'shamanic', + 'shameful', + 'shamrock', + 'shanghai', + 'shapable', + 'sharking', + 'sharpsaw', + 'shattery', + 'shawfowl', + 'shawnees', + 'sheading', + 'shealing', + 'shearing', + 'shearman', + 'sheathed', + 'sheather', + 'sheatree', + 'shedding', + 'sheeling', + 'sheepcot', + 'sheepish', + 'sheetful', + 'sheeting', + 'sheiling', + 'shekinah', + 'shelduck', + 'shelling', + 'sheltery', + 'shelving', + 'shemitic', + 'shendful', + 'shepherd', + 'shepster', + 'shieling', + 'shifting', + 'shikaree', + 'shilling', + 'shingler', + 'shingles', + 'shintyan', + 'shipless', + 'shipload', + 'shipmate', + 'shipment', + 'shipping', + 'shipworm', + 'shipyard', + 'shirting', + 'shistose', + 'shoading', + 'shoaling', + 'shockdog', + 'shocking', + 'shoebill', + 'shoehorn', + 'shoeless', + 'shooting', + 'shopbook', + 'shopgirl', + 'shoplike', + 'shopmaid', + 'shoppish', + 'shopworn', + 'shorling', + 'shortage', + 'shoulder', + 'shoveler', + 'showroom', + 'shragger', + 'shrapnel', + 'shrewish', + 'shrieker', + 'shrieval', + 'shrimper', + 'shrinker', + 'shriving', + 'shrouded', + 'shroving', + 'shrunken', + 'shuffler', + 'shunless', + 'shunting', + 'siberian', + 'sibilant', + 'sibilate', + 'sibilous', + 'sibylist', + 'sicamore', + 'siccific', + 'sicilian', + 'sickerly', + 'sickless', + 'sicklied', + 'sickness', + 'sidebone', + 'sidehill', + 'sideline', + 'sideling', + 'sidelong', + 'sidereal', + 'siderite', + 'sideslip', + 'sidesman', + 'sidewalk', + 'sideways', + 'sidewise', + 'sienitic', + 'siennese', + 'sightful', + 'sighting', + 'sigillum', + 'signable', + 'signally', + 'signeted', + 'signifer', + 'signiory', + 'signpost', + 'silencer', + 'silently', + 'silesian', + 'silicate', + 'silicide', + 'silicify', + 'silicium', + 'silicula', + 'silicule', + 'silkness', + 'silkweed', + 'silkworm', + 'sillabub', + 'sillyhow', + 'silundum', + 'silurian', + 'siluroid', + 'silverly', + 'similary', + 'similize', + 'simoniac', + 'simonial', + 'simonian', + 'simonist', + 'simperer', + 'simpless', + 'simplify', + 'simplist', + 'simplity', + 'simploce', + 'simulate', + 'sinaitic', + 'sinalbin', + 'sinamine', + 'sinapate', + 'sinapine', + 'sinapism', + 'sinciput', + 'sinecure', + 'sinewish', + 'sinewous', + 'singsong', + 'singster', + 'singular', + 'sinicism', + 'sinigrin', + 'sinister', + 'sinology', + 'sinopite', + 'sinsring', + 'sintoism', + 'sintoist', + 'sinuated', + 'sinusoid', + 'siphilis', + 'siphonal', + 'siphonet', + 'siphonia', + 'siphonic', + 'sippling', + 'sirenian', + 'sirenize', + 'siriasis', + 'sirvente', + 'siscowet', + 'siserara', + 'siserary', + 'siskiwit', + 'sisterly', + 'sisyphus', + 'sitheman', + 'sithence', + 'siththen', + 'sitology', + 'situated', + 'sitzbath', + 'sixpence', + 'sixpenny', + 'sixscore', + 'sixtieth', + 'siziness', + 'sizzling', + 'skeletal', + 'skeleton', + 'sketcher', + 'skewbald', + 'skidroad', + 'skillful', + 'skilling', + 'skimback', + 'skimitry', + 'skimming', + 'skinless', + 'skipjack', + 'skirling', + 'skirmish', + 'skirrhus', + 'skirting', + 'skittish', + 'skittles', + 'skopster', + 'skullcap', + 'skunkish', + 'skunktop', + 'skylight', + 'skypilot', + 'slabbery', + 'slabbing', + 'slangous', + 'slanting', + 'slapdash', + 'slapjack', + 'slapping', + 'slattern', + 'slatting', + 'slaverer', + 'slavonic', + 'sledding', + 'sleepful', + 'sleepily', + 'sleeping', + 'sleepish', + 'sleighty', + 'slickens', + 'slicking', + 'sliddery', + 'slideway', + 'slighten', + 'slighter', + 'slightly', + 'slimness', + 'slipknot', + 'slippage', + 'slippery', + 'slipshod', + 'slipshoe', + 'slipskin', + 'slipslop', + 'slitting', + 'slobbery', + 'slocking', + 'slopshop', + 'slopwork', + 'slothful', + 'slotting', + 'slovenly', + 'slovenry', + 'slowback', + 'slowness', + 'slowworm', + 'slubbing', + 'slugabed', + 'sluggard', + 'sluggish', + 'slugworm', + 'slumbery', + 'slumming', + 'sluttery', + 'sluttish', + 'slyboots', + 'smacking', + 'smallage', + 'smallish', + 'smallpox', + 'smaltine', + 'smaltite', + 'smeardab', + 'smectite', + 'smelling', + 'smeltery', + 'smelting', + 'smilacin', + 'smilodon', + 'smithery', + 'smithing', + 'smokable', + 'smoothen', + 'smoother', + 'smoothly', + 'smorsato', + 'smothery', + 'smoulder', + 'smouldry', + 'smuggler', + 'smugness', + 'smutchin', + 'smyrniot', + 'snaphead', + 'snapping', + 'snappish', + 'snapsack', + 'snapshot', + 'snapweed', + 'snarling', + 'snatcher', + 'snattock', + 'sneaking', + 'sneaksby', + 'sneerful', + 'sneezing', + 'sniffing', + 'snifting', + 'snippack', + 'snippety', + 'sniveler', + 'snobbery', + 'snobbish', + 'snobbism', + 'snobling', + 'snottery', + 'snowball', + 'snowbird', + 'snowdrop', + 'snowless', + 'snowplow', + 'snowshed', + 'snowshoe', + 'snowslip', + 'snuffbox', + 'snuffers', + 'snuffler', + 'snuggery', + 'snugness', + 'soapfish', + 'soaproot', + 'soapsuds', + 'soapwort', + 'soberize', + 'sobranje', + 'sobriety', + 'sociable', + 'sociably', + 'socially', + 'socinian', + 'socketed', + 'sockless', + 'socmanry', + 'socratic', + 'sodalite', + 'sodality', + 'sodamide', + 'sodomite', + 'softener', + 'softling', + 'softness', + 'soilless', + 'soilpipe', + 'solander', + 'solanine', + 'solanoid', + 'solarium', + 'solarize', + 'solatium', + 'soldanel', + 'solderer', + 'soldiery', + 'solecism', + 'solecist', + 'solecize', + 'solemnly', + 'solempne', + 'soleness', + 'solenoid', + 'soleship', + 'solidago', + 'solidare', + 'solidary', + 'solidate', + 'solidify', + 'solidism', + 'solidist', + 'solidity', + 'soliform', + 'solitary', + 'solitude', + 'solleret', + 'solpugid', + 'solstice', + 'solution', + 'solutive', + 'solvable', + 'solvency', + 'solvible', + 'somatics', + 'somatist', + 'somatome', + 'somberly', + 'sombrely', + 'sombrero', + 'sombrous', + 'somebody', + 'somedeal', + 'somerset', + 'sometime', + 'somewhat', + 'somewhen', + 'somnific', + 'somonour', + 'sompnour', + 'sonatina', + 'songless', + 'songster', + 'sonneter', + 'sonority', + 'sonorous', + 'soochong', + 'sooshong', + 'soothing', + 'soothsay', + 'sophical', + 'sopition', + 'soporate', + 'soporose', + 'soporous', + 'sorcerer', + 'sordidly', + 'soredium', + 'sorehead', + 'soreness', + 'soricine', + 'sororize', + 'sorrance', + 'sorrowed', + 'sortable', + 'sortably', + 'sortance', + 'sortment', + 'sorweful', + 'sotadean', + 'souchong', + 'soufflee', + 'soulless', + 'soundage', + 'sounding', + 'sourness', + 'sourwood', + 'soutache', + 'souterly', + 'southern', + 'southing', + 'southpaw', + 'southren', + 'southron', + 'southsay', + 'souvenir', + 'spacebar', + 'spaceful', + 'spacekey', + 'spacious', + 'spadeful', + 'spadille', + 'spadroon', + 'spaewife', + 'spagyric', + 'spakenet', + 'spalpeen', + 'spandogs', + 'spandrel', + 'spangler', + 'spaniard', + 'spanking', + 'spanless', + 'spanworm', + 'sparable', + 'sparagus', + 'spareful', + 'sparerib', + 'sparhawk', + 'sparkful', + 'sparkgap', + 'sparkish', + 'sparkler', + 'sparklet', + 'sparling', + 'sparlyre', + 'sparpoil', + 'sparsely', + 'spathose', + 'spathous', + 'spatiate', + 'spavined', + 'spawling', + 'speaking', + 'spearman', + 'specific', + 'specimen', + 'specious', + 'speckled', + 'spectant', + 'spectral', + 'spectrum', + 'specular', + 'speculum', + 'speedful', + 'speedily', + 'spekboom', + 'spelding', + 'spellful', + 'spelling', + 'spellken', + 'spending', + 'sperable', + 'sperling', + 'spermary', + 'spermato', + 'spermism', + 'spermist', + 'spermule', + 'spetches', + 'sphagnum', + 'sphenoid', + 'spherics', + 'spheroid', + 'spherule', + 'sphingid', + 'sphygmic', + 'spicated', + 'spiccato', + 'spicenut', + 'spicknel', + 'spicular', + 'spiculum', + 'spidered', + 'spikelet', + 'spilikin', + 'spillway', + 'spinelle', + 'spineted', + 'spinifex', + 'spinning', + 'spinster', + 'spinstry', + 'spirable', + 'spiracle', + 'spiraeic', + 'spirally', + 'spiricle', + 'spirifer', + 'spirited', + 'spirling', + 'spitball', + 'spitcurl', + 'spiteful', + 'spitfire', + 'spittoon', + 'spitzdog', + 'splasher', + 'splatter', + 'spleened', + 'splendid', + 'splendor', + 'splenial', + 'splenish', + 'splenium', + 'splenius', + 'splenoid', + 'splining', + 'splinter', + 'splitkey', + 'splitter', + 'splotchy', + 'splutter', + 'spoffish', + 'spoilful', + 'spoliate', + 'spondaic', + 'spondyle', + 'spongiae', + 'spongida', + 'sponging', + 'spongoid', + 'sponsion', + 'spontoon', + 'spoonful', + 'spoonily', + 'sporades', + 'sporadic', + 'sporosac', + 'sporozoa', + 'sportful', + 'sporting', + 'sportive', + 'sportula', + 'sportule', + 'spotcash', + 'spotless', + 'spousage', + 'spousess', + 'spraints', + 'spreader', + 'sprigged', + 'springal', + 'springer', + 'springle', + 'sprinkle', + 'sprinter', + 'spritely', + 'spruntly', + 'spuilzie', + 'spumeous', + 'spurgall', + 'spurging', + 'spurious', + 'spurless', + 'spurling', + 'spurrier', + 'spyglass', + 'squabash', + 'squabble', + 'squadron', + 'squaller', + 'squaloid', + 'squamata', + 'squamate', + 'squamoid', + 'squamose', + 'squamous', + 'squamula', + 'squamule', + 'squander', + 'squarely', + 'squarish', + 'squasher', + 'squatter', + 'squawman', + 'squeaker', + 'squealer', + 'squeegee', + 'squeezer', + 'squierie', + 'squiggle', + 'squilgee', + 'squinter', + 'squinzey', + 'squireen', + 'squirely', + 'squirrel', + 'squirter', + 'stabling', + 'stablish', + 'staccato', + 'stackage', + 'stacking', + 'stafette', + 'staffier', + 'staffish', + 'staffman', + 'staggard', + 'stagnant', + 'stagnate', + 'stagworm', + 'stahlian', + 'stahlism', + 'stairway', + 'stalking', + 'stallage', + 'stalling', + 'stallion', + 'stallman', + 'stalwart', + 'stamened', + 'staminal', + 'stampede', + 'stamping', + 'stanchel', + 'stancher', + 'stanchly', + 'standage', + 'standard', + 'standing', + 'standish', + 'stanhope', + 'stannary', + 'stannate', + 'stannine', + 'stannite', + 'stannoso', + 'stannous', + 'stannyel', + 'stanzaic', + 'stapelia', + 'starched', + 'starcher', + 'starchly', + 'starfish', + 'starless', + 'starlike', + 'starling', + 'starnose', + 'starosty', + 'startful', + 'starting', + 'startish', + 'starwort', + 'stasimon', + 'statable', + 'statedly', + 'stateful', + 'statical', + 'statuary', + 'statured', + 'stayedly', + 'staylace', + 'stayless', + 'staysail', + 'stayship', + 'steadily', + 'steading', + 'stealing', + 'stealthy', + 'steapsin', + 'stearate', + 'stearone', + 'steatite', + 'steatoma', + 'stedfast', + 'steeling', + 'steenbok', + 'steening', + 'steepish', + 'steepled', + 'steerage', + 'steering', + 'steeving', + 'steining', + 'steinkle', + 'stellary', + 'stellate', + 'stellify', + 'stellion', + 'stemless', + 'stemmery', + 'stenosis', + 'stenting', + 'stepdame', + 'stepping', + 'stercory', + 'sterling', + 'sternage', + 'sternite', + 'sternson', + 'sternway', + 'sterrink', + 'stibborn', + 'stibious', + 'stibnite', + 'sticcado', + 'stickful', + 'sticking', + 'stickler', + 'stiffish', + 'stigmata', + 'stilbene', + 'stilbite', + 'stiletto', + 'stillage', + 'stilling', + 'stillion', + 'stiltify', + 'stimulus', + 'stingily', + 'stinging', + 'stingray', + 'stinkard', + 'stinking', + 'stinkpot', + 'stipular', + 'stipuled', + 'stirious', + 'stirless', + 'stirrage', + 'stirring', + 'stitchel', + 'stitcher', + 'stoccade', + 'stoccado', + 'stockade', + 'stocking', + 'stockish', + 'stockman', + 'stoicism', + 'stoicity', + 'stomachy', + 'stomapod', + 'stomatic', + 'stonebow', + 'stooping', + 'stopcock', + 'stopless', + 'stoppage', + 'stopping', + 'stopship', + 'stormful', + 'stormily', + 'storming', + 'stoutish', + 'stovaine', + 'stowaway', + 'strabism', + 'straddle', + 'straggle', + 'straight', + 'strained', + 'strainer', + 'straiten', + 'straitly', + 'stramash', + 'stramony', + 'stranger', + 'strangle', + 'strapper', + 'strapple', + 'strategy', + 'stratify', + 'straught', + 'streaked', + 'streamer', + 'streight', + 'strelitz', + 'strenger', + 'strength', + 'strepent', + 'strewing', + 'striated', + 'striatum', + 'stricken', + 'strickle', + 'strictly', + 'strident', + 'strigate', + 'strigine', + 'strigose', + 'strigous', + 'striking', + 'stringed', + 'stringer', + 'stripper', + 'strippet', + 'striving', + 'strobila', + 'strobile', + 'strockle', + 'stroking', + 'stroller', + 'strombus', + 'strongly', + 'strontia', + 'strontic', + 'strophic', + 'strucken', + 'struggle', + 'strumose', + 'strumous', + 'strumpet', + 'struthio', + 'strutter', + 'struvite', + 'stubbled', + 'stubborn', + 'stuccoer', + 'studbook', + 'studdery', + 'studding', + 'studfish', + 'studious', + 'stuffing', + 'stultify', + 'stumbler', + 'stumpage', + 'stundist', + 'stunning', + 'stunsail', + 'stupeous', + 'stuprate', + 'sturdily', + 'sturgeon', + 'sturnoid', + 'sturtion', + 'stycerin', + 'styphnic', + 'styracin', + 'suadible', + 'suasible', + 'subacrid', + 'subacute', + 'subagent', + 'subahdar', + 'subbasal', + 'subbreed', + 'subclass', + 'subduple', + 'subdural', + 'subequal', + 'suberate', + 'suberite', + 'suberize', + 'suberone', + 'suberose', + 'suberous', + 'subgenus', + 'subgroup', + 'subimago', + 'subindex', + 'subinfer', + 'subitany', + 'sublease', + 'sublimed', + 'sublunar', + 'submerge', + 'submerse', + 'subnasal', + 'suborder', + 'suborner', + 'subovate', + 'suboxide', + 'subpoena', + 'subpolar', + 'subprior', + 'subpubic', + 'subrigid', + 'subserve', + 'subsizar', + 'substant', + 'substile', + 'substyle', + 'subtense', + 'subtepid', + 'subtilty', + 'subtlety', + 'subtonic', + 'subtract', + 'subtribe', + 'subtrude', + 'subtutor', + 'subulate', + 'suburban', + 'suburbed', + 'subverse', + 'subvocal', + 'subzonal', + 'succinct', + 'succinic', + 'succinyl', + 'succorer', + 'succubus', + 'suchwise', + 'suckfish', + 'suckling', + 'suctoria', + 'sudamina', + 'sudarium', + 'sudation', + 'sudatory', + 'suddenty', + 'sudorous', + 'sufferer', + 'sufflate', + 'suffrage', + 'suffrago', + 'sugaring', + 'suicidal', + 'suillage', + 'suilline', + 'suitable', + 'suitress', + 'sulcated', + 'sulliage', + 'sulphate', + 'sulphato', + 'sulphide', + 'sulphine', + 'sulphion', + 'sulphite', + 'sulphone', + 'sulphury', + 'sultanic', + 'sultanry', + 'sultrily', + 'sumatran', + 'sumerian', + 'summoner', + 'sumpitan', + 'sumption', + 'sunblink', + 'sunburst', + 'sundries', + 'sundrily', + 'sundrops', + 'sunglass', + 'sunlight', + 'sunproof', + 'sunshade', + 'sunshine', + 'sunshiny', + 'sunstone', + 'superadd', + 'superior', + 'superman', + 'supernal', + 'supertax', + 'supinity', + 'supplace', + 'supplant', + 'supplely', + 'supplial', + 'supplier', + 'supposal', + 'suppress', + 'supprise', + 'surbased', + 'surcease', + 'surement', + 'sureness', + 'surfacer', + 'surfboat', + 'surgeful', + 'surgical', + 'surmisal', + 'surmiser', + 'surmount', + 'surmulot', + 'suroxide', + 'surplice', + 'surprise', + 'surrebut', + 'surround', + 'surroyal', + 'sursolid', + 'surstyle', + 'surucucu', + 'survenue', + 'surveyal', + 'surveyor', + 'survival', + 'surviver', + 'survivor', + 'suspense', + 'suspiral', + 'suspired', + 'susurrus', + 'suwarrow', + 'suzerain', + 'swaddler', + 'swagsman', + 'swainish', + 'swanherd', + 'swanlike', + 'swanmark', + 'swannery', + 'swanskin', + 'swartish', + 'swashing', + 'swashway', + 'swastica', + 'swastika', + 'swearing', + 'sweatily', + 'sweating', + 'sweepage', + 'sweeping', + 'sweeting', + 'sweetish', + 'swelldom', + 'swelling', + 'swellish', + 'swiftlet', + 'swimming', + 'swindler', + 'swinesty', + 'switchel', + 'swooning', + 'swordick', + 'swording', + 'swordman', + 'sybarite', + 'sycamine', + 'sycamore', + 'syconium', + 'syenitic', + 'syllabic', + 'syllable', + 'syllabub', + 'syllabus', + 'sylphine', + 'sylphish', + 'sylvatic', + 'symbolic', + 'symmetry', + 'sympathy', + 'symphony', + 'symphyla', + 'symploce', + 'synarchy', + 'synastry', + 'syncline', + 'syncopal', + 'syndetic', + 'syndical', + 'syndrome', + 'synechia', + 'synedral', + 'syngraph', + 'synochal', + 'synochus', + 'synodist', + 'synomocy', + 'synonyma', + 'synonyme', + 'synonymy', + 'synopsis', + 'synoptic', + 'synovial', + 'syntaxis', + 'syntonic', + 'syntonin', + 'syphilis', + 'syracuse', + 'syringin', + 'syrphian', + 'systasis', + 'systemic', + 'systolic', + 'syzygial', + 'tabarder', + 'tabbinet', + 'tableman', + 'taborine', + 'taborite', + 'tabouret', + 'tabulata', + 'tabulate', + 'taciturn', + 'tackling', + 'tacksman', + 'tactable', + 'tactical', + 'tactless', + 'taeniada', + 'taeniata', + 'taenioid', + 'taeniola', + 'tafferer', + 'taffrail', + 'taglioni', + 'tahitian', + 'tailless', + 'tailrace', + 'tainture', + 'tajmahal', + 'talapoin', + 'talented', + 'talesman', + 'talewise', + 'talisman', + 'talliage', + 'tallness', + 'tallower', + 'tallwood', + 'tallyman', + 'talmudic', + 'talukdar', + 'tamanoir', + 'tamarack', + 'tamarind', + 'tamarisk', + 'tambreet', + 'tamburin', + 'tameable', + 'tameless', + 'tameness', + 'tamilian', + 'tamperer', + 'tamworth', + 'tangence', + 'tangency', + 'tangfish', + 'tangible', + 'tanistry', + 'tankling', + 'tankship', + 'tannable', + 'tannigen', + 'tantalic', + 'tantalum', + 'tantalus', + 'tantrism', + 'tapadera', + 'tapadero', + 'tapeline', + 'tapering', + 'tapestry', + 'tapeworm', + 'taphouse', + 'tapinage', + 'tapiroid', + 'taplings', + 'tarbogan', + 'tarboosh', + 'targeted', + 'tarlatan', + 'tarpeian', + 'tarragon', + 'tartaric', + 'tartarum', + 'tartarus', + 'tartness', + 'tartrate', + 'tartuffe', + 'taskwage', + 'taskwork', + 'tastable', + 'tasteful', + 'tatouhou', + 'tattlery', + 'tattling', + 'tatusiid', + 'taunting', + 'tauridor', + 'taurocol', + 'taurylic', + 'taverner', + 'tawdrily', + 'taxation', + 'taxiarch', + 'taxicorn', + 'taxology', + 'taxonomy', + 'taxpayer', + 'teaberry', + 'teaching', + 'teamster', + 'teamwork', + 'tearless', + 'teaseler', + 'teaspoon', + 'technics', + 'technism', + 'tectonic', + 'teelseed', + 'teemless', + 'teething', + 'teetotal', + 'teetotum', + 'teguexin', + 'tegument', + 'teinland', + 'teinture', + 'telegony', + 'telegram', + 'teleseme', + 'telestic', + 'tellable', + 'telltale', + 'tellural', + 'telluret', + 'telluric', + 'teloogoo', + 'telotype', + 'temerity', + 'temerous', + 'tempered', + 'temperer', + 'template', + 'temporal', + 'tempting', + 'temulent', + 'tenacity', + 'tenaille', + 'tenantry', + 'tendance', + 'tendence', + 'tendency', + 'tenderly', + 'tendment', + 'tenebrae', + 'tenement', + 'tenerity', + 'tenesmic', + 'tenesmus', + 'teniasis', + 'tenonian', + 'tenotome', + 'tenotomy', + 'tenpenny', + 'tensible', + 'tensiled', + 'tentacle', + 'tentifly', + 'tentwort', + 'tenuious', + 'teocalli', + 'teosinte', + 'tephrite', + 'tepidity', + 'teraphim', + 'teratoid', + 'teratoma', + 'tercelet', + 'terebate', + 'terebene', + 'teredine', + 'teretial', + 'teretous', + 'terminal', + 'terminer', + 'terminus', + 'termless', + 'terpinol', + 'terrapin', + 'terreity', + 'terreous', + 'terrible', + 'terrific', + 'tertiary', + 'tertiate', + 'terutero', + 'terzetto', + 'tesselar', + 'tesseral', + 'tessular', + 'testable', + 'testacea', + 'testamur', + 'testator', + 'testicle', + 'testiere', + 'tetanize', + 'tetanoid', + 'tethydan', + 'tetracid', + 'tetradic', + 'tetradon', + 'tetragon', + 'tetrapla', + 'tetrapod', + 'tetrarch', + 'tetrazin', + 'tetrical', + 'tetrinic', + 'tetrodon', + 'tetrolic', + 'teutonic', + 'texthand', + 'textrine', + 'textuary', + 'textuist', + 'textural', + 'thalamic', + 'thalamus', + 'thallate', + 'thallene', + 'thalline', + 'thallium', + 'thalloid', + 'thallous', + 'thanedom', + 'thankful', + 'thatcher', + 'thearchy', + 'theatine', + 'theatral', + 'theatric', + 'thebaine', + 'thegapes', + 'theiform', + 'theistic', + 'thematic', + 'theocrat', + 'theodicy', + 'theogony', + 'theology', + 'theorica', + 'theorist', + 'theorize', + 'theosoph', + 'therefor', + 'thereout', + 'theriaca', + 'thesicle', + 'thespian', + 'thetical', + 'theurgic', + 'thibetan', + 'thickish', + 'thickset', + 'thienone', + 'thievery', + 'thievish', + 'thinking', + 'thinness', + 'thinnish', + 'thionine', + 'thioxene', + 'thirlage', + 'thirster', + 'thirstle', + 'thirteen', + 'thlipsis', + 'thomaean', + 'thomaism', + 'thoracic', + 'thornbut', + 'thornset', + 'thorough', + 'thousand', + 'thracian', + 'thraldom', + 'thranite', + 'thrapple', + 'thrashel', + 'thrasher', + 'threaden', + 'threader', + 'threaten', + 'threnode', + 'threnody', + 'thresher', + 'thribble', + 'throdden', + 'thrombin', + 'thrombus', + 'throngly', + 'thropple', + 'throstle', + 'throttle', + 'throwing', + 'thrushel', + 'thrusher', + 'thruster', + 'thrustle', + 'thuggery', + 'thuggism', + 'thumbkin', + 'thumping', + 'thundery', + 'thurible', + 'thurling', + 'thursday', + 'thussock', + 'thwarter', + 'thwartly', + 'thwittle', + 'thyrsoid', + 'ticement', + 'ticklish', + 'tickseed', + 'ticktack', + 'tideland', + 'tideless', + 'tidesman', + 'tidiness', + 'tidology', + 'tidytips', + 'tigerine', + 'tigerish', + 'tilefish', + 'tileseed', + 'tillable', + 'timaline', + 'timbered', + 'timeless', + 'timeling', + 'timidity', + 'timidous', + 'timoneer', + 'timorous', + 'tincture', + 'tinkerly', + 'tinkling', + 'tinmouth', + 'tinnient', + 'tinnitus', + 'tinselly', + 'tinsmith', + 'tinstone', + 'tintamar', + 'tippling', + 'tipstaff', + 'tipstock', + 'tipulary', + 'tireless', + 'tireling', + 'tiresome', + 'tironian', + 'titanate', + 'titanite', + 'titanium', + 'titanous', + 'tithable', + 'tithonic', + 'tithymal', + 'titivate', + 'titmouse', + 'titrated', + 'titterel', + 'tittuppy', + 'titubate', + 'titulary', + 'toadfish', + 'toadflax', + 'toadhead', + 'toadyism', + 'toasting', + 'toboggan', + 'tocology', + 'tocororo', + 'together', + 'togidres', + 'tohubohu', + 'toilette', + 'toilless', + 'toilsome', + 'tolbooth', + 'tolerant', + 'tolerate', + 'tollable', + 'tollgate', + 'toluenyl', + 'tolylene', + 'tomahawk', + 'tombless', + 'tomentum', + 'tomnoddy', + 'tomorrow', + 'tonality', + 'toneless', + 'tongkang', + 'tonicity', + 'tonsilar', + 'tonsured', + 'toonwood', + 'toothful', + 'toothing', + 'toothlet', + 'toparchy', + 'topology', + 'toponomy', + 'toponymy', + 'toppiece', + 'topstone', + 'toreador', + 'toreutic', + 'torinese', + 'tornaria', + 'torosity', + 'torpidly', + 'torquate', + 'tortilla', + 'tortious', + 'tortoise', + 'tortuose', + 'tortuous', + 'torturer', + 'torulose', + 'torulous', + 'totality', + 'totalize', + 'totemism', + 'totemist', + 'totterer', + 'tottlish', + 'toucanet', + 'touchily', + 'touching', + 'toughish', + 'tournery', + 'tournois', + 'tournure', + 'towardly', + 'toweling', + 'towering', + 'townhall', + 'townless', + 'township', + 'townsman', + 'townward', + 'toxaemia', + 'toxicant', + 'toxicity', + 'toxifera', + 'toyhouse', + 'toyingly', + 'tracheal', + 'tracheid', + 'trachoma', + 'trachyte', + 'trackage', + 'trackman', + 'trackway', + 'tractate', + 'tractile', + 'traction', + 'tractite', + 'tractive', + 'tractory', + 'tractrix', + 'tradeful', + 'traditor', + 'traducer', + 'tragical', + 'tragopan', + 'trailing', + 'training', + 'trainoil', + 'traiteur', + 'traitory', + 'trajetry', + 'tramming', + 'trampler', + 'tramrail', + 'tramroad', + 'trangram', + 'tranquil', + 'transact', + 'transcur', + 'transept', + 'transfer', + 'transfix', + 'tranship', + 'transire', + 'transmew', + 'transmit', + 'transude', + 'transume', + 'trapball', + 'trapdoor', + 'traphole', + 'trappean', + 'trappist', + 'trappous', + 'trashily', + 'traulism', + 'traunter', + 'traveled', + 'traveler', + 'traverse', + 'travesty', + 'trawlnet', + 'treacher', + 'treasure', + 'treasury', + 'treatise', + 'treature', + 'trecento', + 'tredille', + 'treecalf', + 'treeless', + 'treenail', + 'tregetry', + 'tremando', + 'trembler', + 'tremella', + 'trencher', + 'trepeget', + 'trephine', + 'tresayle', + 'trespass', + 'tressful', + 'tressure', + 'tretable', + 'trething', + 'triality', + 'triamide', + 'triamine', + 'triander', + 'triangle', + 'triarchy', + 'triarian', + 'triassic', + 'tribasic', + 'tribolet', + 'tribrach', + 'tribular', + 'tribunal', + 'tributer', + 'trichina', + 'trichite', + 'trichome', + 'trichord', + 'trickery', + 'tricking', + 'trickish', + 'tricolor', + 'tricycle', + 'tridacna', + 'triddler', + 'triedral', + 'trifling', + 'trigenic', + 'triglyph', + 'trigness', + 'trigonal', + 'trigonia', + 'trigonid', + 'trigraph', + 'trigynia', + 'trihoral', + 'trilemma', + 'trilling', + 'trillion', + 'trillium', + 'trilobed', + 'trimeran', + 'trimeter', + 'trimming', + 'trimness', + 'trimorph', + 'trimurti', + 'trinerve', + 'tringoid', + 'trinodal', + 'trioecia', + 'triolein', + 'trioxide', + 'tripedal', + 'tripeman', + 'triphane', + 'triplite', + 'trippant', + 'tripping', + 'triptote', + 'triptych', + 'triskele', + 'trispast', + 'tristful', + 'tristoma', + 'trithing', + 'tritical', + 'triticin', + 'triticum', + 'tritovum', + 'triumvir', + 'triunity', + 'trivalve', + 'trochaic', + 'trochili', + 'troching', + 'trochisk', + 'trochite', + 'trochlea', + 'trochoid', + 'troilite', + 'trombone', + 'tronator', + 'troopial', + 'tropeine', + 'trophied', + 'tropical', + 'trossers', + 'trottoir', + 'troubler', + 'troupial', + 'trousers', + 'troutlet', + 'trouvere', + 'trouveur', + 'troweled', + 'trowsers', + 'truantly', + 'trubtall', + 'truchman', + 'truckage', + 'trucking', + 'truckler', + 'truckman', + 'truelove', + 'trueness', + 'truffled', + 'trugging', + 'trumpery', + 'trumpets', + 'truncate', + 'trunkful', + 'trunnion', + 'trussing', + 'trustful', + 'trustily', + 'trusting', + 'truthful', + 'tryptone', + 'trysting', + 'tsaritsa', + 'tubeform', + 'tubercle', + 'tuberose', + 'tuberous', + 'tubeworm', + 'tubicole', + 'tubicorn', + 'tubiform', + 'tubipora', + 'tubipore', + 'tubulate', + 'tubulose', + 'tubulous', + 'tubulure', + 'tuckahoe', + 'tulipist', + 'tullibee', + 'tumbling', + 'tumidity', + 'tumorous', + 'tumpline', + 'tumulate', + 'tumulose', + 'tumulous', + 'tumulter', + 'tuneless', + 'tungsten', + 'tungstic', + 'tunguses', + 'tungusic', + 'tunicary', + 'tunicata', + 'tunicate', + 'turanian', + 'turbaned', + 'turbidly', + 'turbinal', + 'turcoman', + 'turfless', + 'turgesce', + 'turkoman', + 'turlupin', + 'turmeric', + 'turmerol', + 'turnbull', + 'turncoat', + 'turndown', + 'turnover', + 'turnpike', + 'turnsole', + 'turnspit', + 'turonian', + 'turquois', + 'turreted', + 'turrical', + 'turtling', + 'tussocky', + 'tutelage', + 'tutelary', + 'tutorage', + 'tutoress', + 'tutorial', + 'tutorism', + 'tutorize', + 'twaddell', + 'twaddler', + 'twattler', + 'tweezers', + 'twelvemo', + 'tweyfold', + 'twigless', + 'twigsome', + 'twilight', + 'twinborn', + 'twinkler', + 'twinleaf', + 'twinlike', + 'twinling', + 'twinning', + 'twisting', + 'twitcher', + 'twitlark', + 'twopence', + 'twopenny', + 'twyblade', + 'tychonic', + 'tylopoda', + 'tympanal', + 'tympanic', + 'tympanum', + 'typhoean', + 'typifier', + 'typolite', + 'typology', + 'tyrannic', + 'tyrociny', + 'tyrolite', + 'tyronism', + 'tysonite', + 'tzaritza', + 'ubiquist', + 'ubiquity', + 'udalborn', + 'udometer', + 'uglesome', + 'ugliness', + 'ulcerate', + 'ulcerous', + 'ulcuscle', + 'ulterior', + 'ultimate', + 'ultimity', + 'ultraism', + 'ultraist', + 'ultrared', + 'umbecast', + 'umbellar', + 'umbellet', + 'umbellic', + 'umblepie', + 'umbonate', + 'umbratic', + 'umbrella', + 'umbrette', + 'umbriere', + 'umlauted', + 'umpirage', + 'umquhile', + 'unactive', + 'unafiled', + 'unallied', + 'unalmsed', + 'unanchor', + 'unaneled', + 'unargued', + 'unartful', + 'unattire', + 'unawares', + 'unbacked', + 'unbarbed', + 'unbarrel', + 'unbecome', + 'unbefool', + 'unbegilt', + 'unbelief', + 'unbenign', + 'unbenumb', + 'unbereft', + 'unbeseem', + 'unbeware', + 'unbiased', + 'unbidden', + 'unbishop', + 'unbloody', + 'unbonnet', + 'unbooked', + 'unbreast', + 'unbreech', + 'unbrewed', + 'unbridle', + 'unbroken', + 'unbuckle', + 'unbundle', + 'unburden', + 'unburrow', + 'unbusied', + 'unbutton', + 'uncalled', + 'uncapper', + 'uncastle', + 'uncaused', + 'uncenter', + 'uncentre', + 'unchancy', + 'uncharge', + 'unchaste', + 'unchurch', + 'unciatim', + 'unciform', + 'uncinata', + 'uncinate', + 'uncipher', + 'unclench', + 'unclinch', + 'unclosed', + 'unclothe', + 'unclutch', + 'uncoffle', + 'uncoined', + 'uncomely', + 'uncommon', + 'uncouple', + 'uncreate', + 'uncredit', + 'unctious', + 'unctuous', + 'uncypher', + 'undeadly', + 'undecane', + 'undecent', + 'undecide', + 'undecked', + 'undeeded', + 'undefine', + 'underact', + 'underaid', + 'underbid', + 'underbuy', + 'undercry', + 'undercut', + 'underdig', + 'underget', + 'undergod', + 'underhew', + 'underjaw', + 'underlay', + 'underlet', + 'underlie', + 'underlip', + 'underpay', + 'underpin', + 'underput', + 'underrun', + 'undersay', + 'underset', + 'undersky', + 'undertow', + 'undirect', + 'undouble', + 'undreamt', + 'undulant', + 'undulary', + 'undulate', + 'undulous', + 'unearned', + 'uneasily', + 'unequity', + 'unerring', + 'unexpert', + 'unfasten', + 'unfellow', + 'unfetter', + 'unfilial', + 'unflower', + 'unfolder', + 'unformed', + 'unfreeze', + 'unfriend', + 'ungainly', + 'ungentle', + 'ungifted', + 'ungotten', + 'ungowned', + 'unguical', + 'ungulata', + 'ungulate', + 'ungulous', + 'unhallow', + 'unharbor', + 'unhealth', + 'unheired', + 'unhelmed', + 'unhelmet', + 'unhonest', + 'unhoused', + 'unhusked', + 'uniaxial', + 'unideaed', + 'unifilar', + 'unilobar', + 'unionism', + 'unionist', + 'unipolar', + 'uniquity', + 'unisonal', + 'unitable', + 'unitedly', + 'univalve', + 'universe', + 'univocal', + 'unkemmed', + 'unkennel', + 'unkindly', + 'unknight', + 'unlawful', + 'unlicked', + 'unlikely', + 'unlimber', + 'unlisted', + 'unloader', + 'unlooked', + 'unloosen', + 'unlorded', + 'unlovely', + 'unmaiden', + 'unmanned', + 'unmantle', + 'unmartyr', + 'unmember', + 'unmingle', + 'unmuffle', + 'unmuzzle', + 'unnapped', + 'unnature', + 'unnestle', + 'unnethes', + 'unnooked', + 'unnotify', + 'unpacker', + 'unpaired', + 'unpalped', + 'unpannel', + 'unpastor', + 'unpathed', + 'unpeeled', + 'unpeered', + 'unpeople', + 'unpicked', + 'unpinion', + 'unpitied', + 'unplaced', + 'unplight', + 'unpoised', + 'unpoison', + 'unpolish', + 'unpolite', + 'unpolled', + 'unpraise', + 'unprayed', + 'unpreach', + 'unpriced', + 'unpriest', + 'unprince', + 'unprison', + 'unprofit', + 'unproper', + 'unpucker', + 'unpursed', + 'unreally', + 'unreason', + 'unreaved', + 'unriddle', + 'unringed', + 'unrioted', + 'unroofed', + 'unruffle', + 'unrumple', + 'unsadden', + 'unsaddle', + 'unsafety', + 'unseason', + 'unsecret', + 'unsecure', + 'unseemly', + 'unseldom', + 'unsensed', + 'unsettle', + 'unsexual', + 'unshaked', + 'unshaped', + 'unshapen', + 'unshelve', + 'unshroud', + 'unsister', + 'unslaked', + 'unsluice', + 'unsocket', + 'unsolder', + 'unsorted', + 'unsphere', + 'unspirit', + 'unsquire', + 'unstable', + 'unstarch', + 'unstitch', + 'unstrain', + 'unstring', + 'unsurety', + 'unswathe', + 'untackle', + 'untalked', + 'untangle', + 'untemper', + 'untenant', + 'untented', + 'unthread', + 'unthrift', + 'unthrone', + 'untimely', + 'untithed', + 'untitled', + 'untongue', + 'untoward', + 'untraded', + 'untruism', + 'unturned', + 'unvalued', + 'unveiler', + 'unvessel', + 'unvisard', + 'unwarily', + 'unwarped', + 'unwashed', + 'unwashen', + 'unwemmed', + 'unwieldy', + 'unwilled', + 'unwisdom', + 'unwisely', + 'unwonder', + 'unwonted', + 'unwormed', + 'unworthy', + 'unwroken', + 'unyolden', + 'upcaught', + 'upgather', + 'upgrowth', + 'upheaped', + 'upheaval', + 'upholder', + 'uplander', + 'upplight', + 'upridged', + 'uprising', + 'upsidown', + 'upsnatch', + 'upsodown', + 'upspring', + 'upstairs', + 'upsterte', + 'upstream', + 'upstreet', + 'upstroke', + 'upwreath', + 'uranitic', + 'urbanity', + 'urbanize', + 'urcelate', + 'urceolar', + 'urceolus', + 'urethane', + 'urethral', + 'urgently', + 'urinator', + 'urobilin', + 'urochord', + 'uropodal', + 'uroscopy', + 'urostege', + 'urosteon', + 'urostyle', + 'uroxanic', + 'urrhodin', + 'ursiform', + 'ursuline', + 'urticate', + 'usefully', + 'usherdom', + 'ustulate', + 'usufruct', + 'usurious', + 'usurpant', + 'utopical', + 'utterest', + 'uvitonic', + 'uvulitis', + 'uxorious', + 'vacantly', + 'vacation', + 'vaccinal', + 'vaccinia', + 'vadantes', + 'vadimony', + 'vagabond', + 'vagantes', + 'vaginant', + 'vaginate', + 'vaginati', + 'vaginula', + 'vaginule', + 'vagrancy', + 'vainness', + 'valencia', + 'valentia', + 'valerate', + 'valerian', + 'valerone', + 'valhalla', + 'valiance', + 'valiancy', + 'validate', + 'validity', + 'valkyria', + 'vallancy', + 'valorous', + 'valuable', + 'valuably', + 'valuator', + 'valvasor', + 'valvelet', + 'valvular', + 'valylene', + 'vambrace', + 'vamplate', + 'vanadate', + 'vanadite', + 'vanadium', + 'vanadous', + 'vandalic', + 'vanguard', + 'vanillic', + 'vanillin', + 'vanillyl', + 'vanquish', + 'vapidity', + 'vaporate', + 'vaporing', + 'vaporish', + 'vaporize', + 'vaporose', + 'vaporous', + 'vargueno', + 'variable', + 'variably', + 'variance', + 'varicose', + 'varicous', + 'varietal', + 'varietas', + 'variform', + 'variolar', + 'variolic', + 'variorum', + 'varletry', + 'vartabed', + 'varveled', + 'vascular', + 'vasculum', + 'vaseline', + 'vasiform', + 'vassalry', + 'vastness', + 'vaticide', + 'vaticine', + 'vaultage', + 'vaulting', + 'vauntful', + 'vavasory', + 'vedantic', + 'vegetate', + 'vegetism', + 'vegetive', + 'vegetous', + 'vehement', + 'vehicled', + 'veilless', + 'veinless', + 'velarium', + 'velleity', + 'velocity', + 'veltfare', + 'velutina', + 'velveret', + 'venality', + 'venantes', + 'venatica', + 'venation', + 'vendetta', + 'vendible', + 'venefice', + 'venemous', + 'venenate', + 'venenose', + 'venerate', + 'venereal', + 'venerean', + 'venerous', + 'venetian', + 'vengeful', + 'veniable', + 'venomous', + 'venosity', + 'venthole', + 'ventouse', + 'venturer', + 'venulose', + 'veracity', + 'veratria', + 'veratric', + 'veratrol', + 'veratrum', + 'verbally', + 'verbatim', + 'verbiage', + 'verdancy', + 'verderer', + 'verderor', + 'verditer', + 'verdured', + 'verecund', + 'vergaloo', + 'vergency', + 'vergette', + 'verifier', + 'verjuice', + 'vermetid', + 'vermetus', + 'verminly', + 'vernacle', + 'vernicle', + 'vernonin', + 'veronese', + 'veronica', + 'verrugas', + 'versable', + 'verseman', + 'versicle', + 'verteber', + 'vertebra', + 'vertebre', + 'vertebro', + 'vertical', + 'verticil', + 'verticle', + 'vertuous', + 'vesicant', + 'vesicate', + 'vesicula', + 'vesperal', + 'vespiary', + 'vespillo', + 'vestales', + 'vestiary', + 'vestment', + 'vestured', + 'vesuvian', + 'vesuvine', + 'vexation', + 'vexillar', + 'vexillum', + 'vexingly', + 'viameter', + 'viaticum', + 'vibrancy', + 'vibrator', + 'vibrissa', + 'viburnum', + 'vicarage', + 'vicarial', + 'vicarian', + 'vicenary', + 'vicinage', + 'vicinity', + 'victoria', + 'victress', + 'victrice', + 'victuals', + 'viennese', + 'viewless', + 'viewsome', + 'vigesimo', + 'vigilant', + 'vignette', + 'vigorite', + 'vigoroso', + 'vigorous', + 'vilifier', + 'vilipend', + 'villager', + 'villainy', + 'villakin', + 'villanel', + 'villatic', + 'vinatico', + 'vincible', + 'vincture', + 'vinculum', + 'vinegary', + 'vineyard', + 'vinnewed', + 'vinolent', + 'vinosity', + 'vinquish', + 'vintager', + 'violable', + 'violator', + 'violence', + 'violuric', + 'viperina', + 'viperine', + 'viperish', + 'viperoid', + 'viperous', + 'virgated', + 'virginal', + 'virginia', + 'viridine', + 'viridite', + 'viridity', + 'virility', + 'virtuate', + 'virtuoso', + 'virtuous', + 'virulent', + 'viscacha', + 'visceral', + 'viscount', + 'visigoth', + 'visional', + 'visioned', + 'visitant', + 'visiting', + 'vismajor', + 'vitaille', + 'vitalism', + 'vitalist', + 'vitality', + 'vitalize', + 'vitellin', + 'vitellus', + 'vitiligo', + 'vitrella', + 'vitreous', + 'vituline', + 'vivacity', + 'vivarium', + 'vivavoce', + 'vividity', + 'vivipara', + 'vivisect', + 'vixenish', + 'vizarded', + 'vizcacha', + 'vocalism', + 'vocalist', + 'vocality', + 'vocalize', + 'vocation', + 'vocative', + 'vodanium', + 'voiceful', + 'voidable', + 'voidance', + 'voidness', + 'voirdire', + 'volapuek', + 'volatile', + 'volcanic', + 'volition', + 'volitive', + 'volleyed', + 'volplane', + 'voltaism', + 'voltzite', + 'volubile', + 'volumist', + 'volupere', + 'volution', + 'volvulus', + 'vomerine', + 'vomicine', + 'vomicnut', + 'vomiting', + 'vomition', + 'vomitive', + 'vomitory', + 'vondsira', + 'voracity', + 'vortical', + 'vorticel', + 'votaress', + 'votarist', + 'voussoir', + 'vowelish', + 'vowelism', + 'vowelize', + 'voyageur', + 'vulcanic', + 'vulgarly', + 'vulnific', + 'vulpinic', + 'vulvitis', + 'wagering', + 'wagonage', + 'wagonful', + 'wailment', + 'wainable', + 'wainbote', + 'wainscot', + 'waitress', + 'wakening', + 'waketime', + 'walhalla', + 'walkable', + 'wallaroo', + 'wallbird', + 'wallhick', + 'walloons', + 'wallower', + 'wallwort', + 'wanderer', + 'wanderoo', + 'wantless', + 'wantonly', + 'wantrust', + 'wappened', + 'wardenry', + 'wardmote', + 'wardrobe', + 'wardroom', + 'wardship', + 'wardsman', + 'wareless', + 'wareroom', + 'warfarer', + 'warhable', + 'wariment', + 'wariness', + 'warkloom', + 'warmness', + 'warmouth', + 'warproof', + 'warragal', + 'warranty', + 'warrener', + 'wartless', + 'wartweed', + 'wartwort', + 'washable', + 'washbowl', + 'washdish', + 'washsale', + 'wasteful', + 'wastorel', + 'watchdog', + 'watchful', + 'watchman', + 'waterage', + 'waterbed', + 'waterbok', + 'waterbug', + 'watercan', + 'waterdog', + 'waterfox', + 'watergas', + 'watergod', + 'waterhen', + 'waterhog', + 'waterice', + 'watering', + 'waterish', + 'waterleg', + 'waterman', + 'wateroat', + 'waterpig', + 'waterpoa', + 'waterpot', + 'waterpox', + 'waterram', + 'waterrat', + 'waterway', + 'wattless', + 'wattling', + 'waveless', + 'waviness', + 'waxberry', + 'waxiness', + 'waxworks', + 'waybread', + 'wayfarer', + 'waylayer', + 'wayleway', + 'waymaker', + 'wayshaft', + 'waywiser', + 'weakener', + 'weakfish', + 'weakling', + 'weakness', + 'wealdish', + 'wealsman', + 'weanling', + 'weaponed', + 'weaponry', + 'wearable', + 'weariful', + 'weedless', + 'weetless', + 'weetweet', + 'weeviled', + 'wegotism', + 'wehrgeld', + 'wehrgelt', + 'wehrwolf', + 'weigelia', + 'weighage', + 'weighing', + 'welchman', + 'welcomer', + 'weldable', + 'welladay', + 'welldoer', + 'wellfare', + 'wellhead', + 'wellhole', + 'welsbach', + 'welshman', + 'weregild', + 'werewolf', + 'wesleyan', + 'westerly', + 'westling', + 'westmost', + 'westward', + 'wetnurse', + 'wetplate', + 'weyleway', + 'whacking', + 'whaleman', + 'whanghee', + 'whapping', + 'wharfage', + 'wharfing', + 'wharling', + 'whatever', + 'wheatear', + 'wheeling', + 'wheelman', + 'whenever', + 'whereout', + 'wheresoe', + 'wherever', + 'wheycure', + 'wheyface', + 'whiffing', + 'whiffler', + 'whiggery', + 'whiggish', + 'whiggism', + 'whigling', + 'whimbrel', + 'whimling', + 'whimwham', + 'whinchat', + 'whinyard', + 'whipcord', + 'whiplash', + 'whipping', + 'whipster', + 'whipworm', + 'whirlbat', + 'whirling', + 'whirlpit', + 'whirlwig', + 'whisking', + 'whistler', + 'whiteboy', + 'whitecap', + 'whitefly', + 'whitener', + 'whitetop', + 'whitflaw', + 'whitling', + 'whitsour', + 'whitster', + 'whittret', + 'whitwall', + 'whooping', + 'whopping', + 'whoredom', + 'whoreson', + 'wichitas', + 'wickedly', + 'wickered', + 'wideness', + 'wielding', + 'wifehood', + 'wifeless', + 'wifelike', + 'wildfire', + 'wildness', + 'wildwood', + 'wilfully', + 'wiliness', + 'williwaw', + 'willowed', + 'willower', + 'willsome', + 'willying', + 'willywaw', + 'windbore', + 'windfall', + 'windgall', + 'windlace', + 'windlass', + 'windless', + 'windmill', + 'windowed', + 'windpipe', + 'windward', + 'wineless', + 'wingfish', + 'wingless', + 'winnower', + 'winterly', + 'wiredraw', + 'wireless', + 'wirework', + 'wireworm', + 'wiriness', + 'wiseacre', + 'wiseling', + 'wiseness', + 'wishable', + 'wishbone', + 'wishedly', + 'wistaria', + 'witchery', + 'witching', + 'witchuck', + 'witcraft', + 'witeless', + 'withdraw', + 'withered', + 'withhold', + 'withvine', + 'withwind', + 'withwine', + 'wittolly', + 'wivehood', + 'wiveless', + 'wizardly', + 'wizardry', + 'wlatsome', + 'wodegeld', + 'woefully', + 'wolffian', + 'wolfling', + 'womanish', + 'womanize', + 'wondered', + 'wonderer', + 'wonderly', + 'wondrous', + 'wontless', + 'woodbind', + 'woodbine', + 'woodbury', + 'woodchat', + 'woodcock', + 'woodenly', + 'woodhack', + 'woodhole', + 'woodland', + 'woodless', + 'woodmeil', + 'woodness', + 'woodpeck', + 'woodrock', + 'woodroof', + 'woodruff', + 'woodsman', + 'woodtick', + 'woodwall', + 'woodward', + 'woodwork', + 'woodworm', + 'wooingly', + 'woolding', + 'woolenet', + 'woolfell', + 'woolhead', + 'woolpack', + 'woolsack', + 'woolward', + 'wordbook', + 'wordless', + 'wordplay', + 'wordsman', + 'workable', + 'workaday', + 'workfolk', + 'workless', + 'workroom', + 'workship', + 'workshop', + 'workways', + 'workwise', + 'workyday', + 'wormhole', + 'wormling', + 'wormseed', + 'wormwood', + 'worthful', + 'worthily', + 'woulding', + 'woundily', + 'wrackful', + 'wrangler', + 'wrannock', + 'wrappage', + 'wrathful', + 'wrathily', + 'wrawness', + 'wreakful', + 'wreathen', + 'wreckage', + 'wreckful', + 'wrecking', + 'wrestler', + 'wretched', + 'wriggler', + 'wringing', + 'wristlet', + 'writable', + 'wrongful', + 'wrongous', + 'wrymouth', + 'wurraluh', + 'wyandots', + 'xanthate', + 'xanthian', + 'xanthide', + 'xanthine', + 'xanthium', + 'xanthoma', + 'xanthose', + 'xanthous', + 'xenogamy', + 'xenotime', + 'xenurine', + 'xeraphim', + 'xeronate', + 'xiphioid', + 'xiphodon', + 'xylamide', + 'xylidine', + 'xylitone', + 'xylocopa', + 'xyloidin', + 'xylology', + 'xylonite', + 'xylorcin', + 'xylotile', + 'xylotomy', + 'xylotrya', + 'xylylene', + 'xystarch', + 'yachting', + 'yachtman', + 'yakamilk', + 'yardland', + 'yardwand', + 'yataghan', + 'ycurrent', + 'yeanling', + 'yearbook', + 'yearling', + 'yearnful', + 'yeldhall', + 'yeldrine', + 'yeomanly', + 'yeomanry', + 'yeorling', + 'yestreen', + 'ygdrasyl', + 'yielding', + 'yokemate', + 'yoncopin', + 'yorkrite', + 'youngger', + 'youngish', + 'youngmen', + 'youngone', + 'yourself', + 'youthful', + 'ypsiloid', + 'ytterbic', + 'yttrious', + 'yuletide', + 'zamindar', + 'zampogna', + 'zandmole', + 'zapatera', + 'zaratite', + 'zastrugi', + 'zealless', + 'zealotry', + 'zebrinny', + 'zemindar', + 'zenithal', + 'zeolitic', + 'zephyrus', + 'zeppelin', + 'zetetics', + 'zigzaggy', + 'zikkurat', + 'zincking', + 'ziphioid', + 'zirconia', + 'zirconic', + 'zoanthus', + 'zodiacal', + 'zoetrope', + 'zomboruk', + 'zoneless', + 'zoochemy', + 'zooecium', + 'zooecyst', + 'zooegamy', + 'zooegeny', + 'zooegony', + 'zooelogy', + 'zooenite', + 'zooenomy', + 'zooenule', + 'zooetomy', + 'zoogenic', + 'zoogloea', + 'zoolatry', + 'zoologer', + 'zoophaga', + 'zoophily', + 'zoophite', + 'zoophyta', + 'zoophyte', + 'zoosperm', + 'zoospore', + 'zopilote', + 'zuchetto', + 'zumology', + 'zwieback', + 'zylonite', + 'zymogene', + 'zymology' + ] +} + + +/***/ }), + +/***/ 252: +/***/ ((module) => { + +"use strict"; + +module.exports = asPromise; + +/** + * Callback as used by {@link util.asPromise}. + * @typedef asPromiseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {...*} params Additional arguments + * @returns {undefined} + */ + +/** + * Returns a promise from a node-style callback function. + * @memberof util + * @param {asPromiseCallback} fn Function to call + * @param {*} ctx Function context + * @param {...*} params Function arguments + * @returns {Promise<*>} Promisified function + */ +function asPromise(fn, ctx/*, varargs */) { + var params = new Array(arguments.length - 1), + offset = 0, + index = 2, + pending = true; + while (index < arguments.length) + params[offset++] = arguments[index++]; + return new Promise(function executor(resolve, reject) { + params[offset] = function callback(err/*, varargs */) { + if (pending) { + pending = false; + if (err) + reject(err); + else { + var params = new Array(arguments.length - 1), + offset = 0; + while (offset < params.length) + params[offset++] = arguments[offset]; + resolve.apply(null, params); + } + } + }; + try { + fn.apply(ctx || null, params); + } catch (err) { + if (pending) { + pending = false; + reject(err); + } + } + }); +} + + +/***/ }), + +/***/ 26718: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace + */ +var base64 = exports; + +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ +base64.length = function length(string) { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; +}; + +// Base64 encoding table +var b64 = new Array(64); + +// Base64 decoding table +var s64 = new Array(123); + +// 65..90, 97..122, 48..57, 43, 47 +for (var i = 0; i < 64;) + s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ +base64.encode = function encode(buffer, start, end) { + var parts = null, + chunk = []; + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer[start++]; + switch (j) { + case 0: + chunk[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + chunk[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + chunk[i++] = b64[t | b >> 6]; + chunk[i++] = b64[b & 63]; + j = 0; + break; + } + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (j) { + chunk[i++] = b64[t]; + chunk[i++] = 61; + if (j === 1) + chunk[i++] = 61; + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +var invalidEncoding = "invalid encoding"; + +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ +base64.decode = function decode(string, buffer, offset) { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = s64[c]) === undefined) + throw Error(invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer[offset++] = t << 2 | (c & 48) >> 4; + t = c; + j = 2; + break; + case 2: + buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; + t = c; + j = 3; + break; + case 3: + buffer[offset++] = (t & 3) << 6 | c; + j = 0; + break; + } + } + if (j === 1) + throw Error(invalidEncoding); + return offset - start; +}; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ +base64.test = function test(string) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); +}; + + +/***/ }), + +/***/ 58882: +/***/ ((module) => { + +"use strict"; + +module.exports = codegen; + +/** + * Begins generating a function. + * @memberof util + * @param {string[]} functionParams Function parameter names + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body + */ +function codegen(functionParams, functionName) { + + /* istanbul ignore if */ + if (typeof functionParams === "string") { + functionName = functionParams; + functionParams = undefined; + } + + var body = []; + + /** + * Appends code to the function's body or finishes generation. + * @typedef Codegen + * @type {function} + * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any + * @param {...*} [formatParams] Format parameters + * @returns {Codegen|Function} Itself or the generated function if finished + * @throws {Error} If format parameter counts do not match + */ + + function Codegen(formatStringOrScope) { + // note that explicit array handling below makes this ~50% faster + + // finish the function + if (typeof formatStringOrScope !== "string") { + var source = toString(); + if (codegen.verbose) + console.log("codegen: " + source); // eslint-disable-line no-console + source = "return " + source; + if (formatStringOrScope) { + var scopeKeys = Object.keys(formatStringOrScope), + scopeParams = new Array(scopeKeys.length + 1), + scopeValues = new Array(scopeKeys.length), + scopeOffset = 0; + while (scopeOffset < scopeKeys.length) { + scopeParams[scopeOffset] = scopeKeys[scopeOffset]; + scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]]; + } + scopeParams[scopeOffset] = source; + return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func + } + return Function(source)(); // eslint-disable-line no-new-func + } + + // otherwise append to body + var formatParams = new Array(arguments.length - 1), + formatOffset = 0; + while (formatOffset < formatParams.length) + formatParams[formatOffset] = arguments[++formatOffset]; + formatOffset = 0; + formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) { + var value = formatParams[formatOffset++]; + switch ($1) { + case "d": case "f": return String(Number(value)); + case "i": return String(Math.floor(value)); + case "j": return JSON.stringify(value); + case "s": return String(value); + } + return "%"; + }); + if (formatOffset !== formatParams.length) + throw Error("parameter count mismatch"); + body.push(formatStringOrScope); + return Codegen; + } + + function toString(functionNameOverride) { + return "function " + (functionNameOverride || functionName || "") + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}"; + } + + Codegen.toString = toString; + return Codegen; +} + +/** + * Begins generating a function. + * @memberof util + * @function codegen + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body + * @variation 2 + */ + +/** + * When set to `true`, codegen will log generated code to console. Useful for debugging. + * @name util.codegen.verbose + * @type {boolean} + */ +codegen.verbose = false; + + +/***/ }), + +/***/ 86850: +/***/ ((module) => { + +"use strict"; + +module.exports = EventEmitter; + +/** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor + */ +function EventEmitter() { + + /** + * Registered listeners. + * @type {Object.} + * @private + */ + this._listeners = {}; +} + +/** + * Registers an event listener. + * @param {string} evt Event name + * @param {function} fn Listener + * @param {*} [ctx] Listener context + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.on = function on(evt, fn, ctx) { + (this._listeners[evt] || (this._listeners[evt] = [])).push({ + fn : fn, + ctx : ctx || this + }); + return this; +}; + +/** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param {string} [evt] Event name. Removes all listeners if omitted. + * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.off = function off(evt, fn) { + if (evt === undefined) + this._listeners = {}; + else { + if (fn === undefined) + this._listeners[evt] = []; + else { + var listeners = this._listeners[evt]; + for (var i = 0; i < listeners.length;) + if (listeners[i].fn === fn) + listeners.splice(i, 1); + else + ++i; + } + } + return this; +}; + +/** + * Emits an event by calling its listeners with the specified arguments. + * @param {string} evt Event name + * @param {...*} args Arguments + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.emit = function emit(evt) { + var listeners = this._listeners[evt]; + if (listeners) { + var args = [], + i = 1; + for (; i < arguments.length;) + args.push(arguments[i++]); + for (i = 0; i < listeners.length;) + listeners[i].fn.apply(listeners[i++].ctx, args); + } + return this; +}; + + +/***/ }), + +/***/ 50663: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = fetch; + +var asPromise = __nccwpck_require__(252), + inquire = __nccwpck_require__(60094); + +var fs = inquire("fs"); + +/** + * Node-style callback as used by {@link util.fetch}. + * @typedef FetchCallback + * @type {function} + * @param {?Error} error Error, if any, otherwise `null` + * @param {string} [contents] File contents, if there hasn't been an error + * @returns {undefined} + */ + +/** + * Options as used by {@link util.fetch}. + * @typedef FetchOptions + * @type {Object} + * @property {boolean} [binary=false] Whether expecting a binary response + * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest + */ + +/** + * Fetches the contents of a file. + * @memberof util + * @param {string} filename File path or url + * @param {FetchOptions} options Fetch options + * @param {FetchCallback} callback Callback function + * @returns {undefined} + */ +function fetch(filename, options, callback) { + if (typeof options === "function") { + callback = options; + options = {}; + } else if (!options) + options = {}; + + if (!callback) + return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this + + // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found. + if (!options.xhr && fs && fs.readFile) + return fs.readFile(filename, function fetchReadFileCallback(err, contents) { + return err && typeof XMLHttpRequest !== "undefined" + ? fetch.xhr(filename, options, callback) + : err + ? callback(err) + : callback(null, options.binary ? contents : contents.toString("utf8")); + }); + + // use the XHR version otherwise. + return fetch.xhr(filename, options, callback); +} + +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ + +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchOptions} [options] Fetch options + * @returns {Promise} Promise + * @variation 3 + */ + +/**/ +fetch.xhr = function fetch_xhr(filename, options, callback) { + var xhr = new XMLHttpRequest(); + xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() { + + if (xhr.readyState !== 4) + return undefined; + + // local cors security errors return status 0 / empty string, too. afaik this cannot be + // reliably distinguished from an actually empty file for security reasons. feel free + // to send a pull request if you are aware of a solution. + if (xhr.status !== 0 && xhr.status !== 200) + return callback(Error("status " + xhr.status)); + + // if binary data is expected, make sure that some sort of array is returned, even if + // ArrayBuffers are not supported. the binary string fallback, however, is unsafe. + if (options.binary) { + var buffer = xhr.response; + if (!buffer) { + buffer = []; + for (var i = 0; i < xhr.responseText.length; ++i) + buffer.push(xhr.responseText.charCodeAt(i) & 255); + } + return callback(null, typeof Uint8Array !== "undefined" ? new Uint8Array(buffer) : buffer); + } + return callback(null, xhr.responseText); + }; + + if (options.binary) { + // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers + if ("overrideMimeType" in xhr) + xhr.overrideMimeType("text/plain; charset=x-user-defined"); + xhr.responseType = "arraybuffer"; + } + + xhr.open("GET", filename); + xhr.send(); +}; + + +/***/ }), + +/***/ 21843: +/***/ ((module) => { + +"use strict"; + + +module.exports = factory(factory); + +/** + * Reads / writes floats / doubles from / to buffers. + * @name util.float + * @namespace + */ + +/** + * Writes a 32 bit float to a buffer using little endian byte order. + * @name util.float.writeFloatLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 32 bit float to a buffer using big endian byte order. + * @name util.float.writeFloatBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 32 bit float from a buffer using little endian byte order. + * @name util.float.readFloatLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 32 bit float from a buffer using big endian byte order. + * @name util.float.readFloatBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Writes a 64 bit double to a buffer using little endian byte order. + * @name util.float.writeDoubleLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 64 bit double to a buffer using big endian byte order. + * @name util.float.writeDoubleBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 64 bit double from a buffer using little endian byte order. + * @name util.float.readDoubleLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 64 bit double from a buffer using big endian byte order. + * @name util.float.readDoubleBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +// Factory function for the purpose of node-based testing in modified global environments +function factory(exports) { + + // float: typed array + if (typeof Float32Array !== "undefined") (function() { + + var f32 = new Float32Array([ -0 ]), + f8b = new Uint8Array(f32.buffer), + le = f8b[3] === 128; + + function writeFloat_f32_cpy(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + } + + function writeFloat_f32_rev(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[3]; + buf[pos + 1] = f8b[2]; + buf[pos + 2] = f8b[1]; + buf[pos + 3] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; + /* istanbul ignore next */ + exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; + + function readFloat_f32_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + return f32[0]; + } + + function readFloat_f32_rev(buf, pos) { + f8b[3] = buf[pos ]; + f8b[2] = buf[pos + 1]; + f8b[1] = buf[pos + 2]; + f8b[0] = buf[pos + 3]; + return f32[0]; + } + + /* istanbul ignore next */ + exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; + /* istanbul ignore next */ + exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; + + // float: ieee754 + })(); else (function() { + + function writeFloat_ieee754(writeUint, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); + else if (isNaN(val)) + writeUint(2143289344, buf, pos); + else if (val > 3.4028234663852886e+38) // +-Infinity + writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); + else if (val < 1.1754943508222875e-38) // denormal + writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); + else { + var exponent = Math.floor(Math.log(val) / Math.LN2), + mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; + writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); + } + } + + exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); + exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); + + function readFloat_ieee754(readUint, buf, pos) { + var uint = readUint(buf, pos), + sign = (uint >> 31) * 2 + 1, + exponent = uint >>> 23 & 255, + mantissa = uint & 8388607; + return exponent === 255 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 1.401298464324817e-45 * mantissa + : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); + } + + exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); + exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); + + })(); + + // double: typed array + if (typeof Float64Array !== "undefined") (function() { + + var f64 = new Float64Array([-0]), + f8b = new Uint8Array(f64.buffer), + le = f8b[7] === 128; + + function writeDouble_f64_cpy(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + buf[pos + 4] = f8b[4]; + buf[pos + 5] = f8b[5]; + buf[pos + 6] = f8b[6]; + buf[pos + 7] = f8b[7]; + } + + function writeDouble_f64_rev(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[7]; + buf[pos + 1] = f8b[6]; + buf[pos + 2] = f8b[5]; + buf[pos + 3] = f8b[4]; + buf[pos + 4] = f8b[3]; + buf[pos + 5] = f8b[2]; + buf[pos + 6] = f8b[1]; + buf[pos + 7] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; + /* istanbul ignore next */ + exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; + + function readDouble_f64_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + f8b[4] = buf[pos + 4]; + f8b[5] = buf[pos + 5]; + f8b[6] = buf[pos + 6]; + f8b[7] = buf[pos + 7]; + return f64[0]; + } + + function readDouble_f64_rev(buf, pos) { + f8b[7] = buf[pos ]; + f8b[6] = buf[pos + 1]; + f8b[5] = buf[pos + 2]; + f8b[4] = buf[pos + 3]; + f8b[3] = buf[pos + 4]; + f8b[2] = buf[pos + 5]; + f8b[1] = buf[pos + 6]; + f8b[0] = buf[pos + 7]; + return f64[0]; + } + + /* istanbul ignore next */ + exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; + /* istanbul ignore next */ + exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; + + // double: ieee754 + })(); else (function() { + + function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) { + writeUint(0, buf, pos + off0); + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); + } else if (isNaN(val)) { + writeUint(0, buf, pos + off0); + writeUint(2146959360, buf, pos + off1); + } else if (val > 1.7976931348623157e+308) { // +-Infinity + writeUint(0, buf, pos + off0); + writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); + } else { + var mantissa; + if (val < 2.2250738585072014e-308) { // denormal + mantissa = val / 5e-324; + writeUint(mantissa >>> 0, buf, pos + off0); + writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); + } else { + var exponent = Math.floor(Math.log(val) / Math.LN2); + if (exponent === 1024) + exponent = 1023; + mantissa = val * Math.pow(2, -exponent); + writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); + writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); + } + } + } + + exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); + exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); + + function readDouble_ieee754(readUint, off0, off1, buf, pos) { + var lo = readUint(buf, pos + off0), + hi = readUint(buf, pos + off1); + var sign = (hi >> 31) * 2 + 1, + exponent = hi >>> 20 & 2047, + mantissa = 4294967296 * (hi & 1048575) + lo; + return exponent === 2047 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 5e-324 * mantissa + : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); + } + + exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); + exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); + + })(); + + return exports; +} + +// uint helpers + +function writeUintLE(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +function writeUintBE(val, buf, pos) { + buf[pos ] = val >>> 24; + buf[pos + 1] = val >>> 16 & 255; + buf[pos + 2] = val >>> 8 & 255; + buf[pos + 3] = val & 255; +} + +function readUintLE(buf, pos) { + return (buf[pos ] + | buf[pos + 1] << 8 + | buf[pos + 2] << 16 + | buf[pos + 3] << 24) >>> 0; +} + +function readUintBE(buf, pos) { + return (buf[pos ] << 24 + | buf[pos + 1] << 16 + | buf[pos + 2] << 8 + | buf[pos + 3]) >>> 0; +} + + +/***/ }), + +/***/ 60094: +/***/ ((module) => { + +"use strict"; + +module.exports = inquire; + +/** + * Requires a module only if available. + * @memberof util + * @param {string} moduleName Module to require + * @returns {?Object} Required module if available and not empty, otherwise `null` + */ +function inquire(moduleName) { + try { + var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval + if (mod && (mod.length || Object.keys(mod).length)) + return mod; + } catch (e) {} // eslint-disable-line no-empty + return null; +} + + +/***/ }), + +/***/ 24761: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +/** + * A minimal path module to resolve Unix, Windows and URL paths alike. + * @memberof util + * @namespace + */ +var path = exports; + +var isAbsolute = +/** + * Tests if the specified path is absolute. + * @param {string} path Path to test + * @returns {boolean} `true` if path is absolute + */ +path.isAbsolute = function isAbsolute(path) { + return /^(?:\/|\w+:)/.test(path); +}; + +var normalize = +/** + * Normalizes the specified path. + * @param {string} path Path to normalize + * @returns {string} Normalized path + */ +path.normalize = function normalize(path) { + path = path.replace(/\\/g, "/") + .replace(/\/{2,}/g, "/"); + var parts = path.split("/"), + absolute = isAbsolute(path), + prefix = ""; + if (absolute) + prefix = parts.shift() + "/"; + for (var i = 0; i < parts.length;) { + if (parts[i] === "..") { + if (i > 0 && parts[i - 1] !== "..") + parts.splice(--i, 2); + else if (absolute) + parts.splice(i, 1); + else + ++i; + } else if (parts[i] === ".") + parts.splice(i, 1); + else + ++i; + } + return prefix + parts.join("/"); +}; + +/** + * Resolves the specified include path against the specified origin path. + * @param {string} originPath Path to the origin file + * @param {string} includePath Include path relative to origin path + * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized + * @returns {string} Path to the include file + */ +path.resolve = function resolve(originPath, includePath, alreadyNormalized) { + if (!alreadyNormalized) + includePath = normalize(includePath); + if (isAbsolute(includePath)) + return includePath; + if (!alreadyNormalized) + originPath = normalize(originPath); + return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath; +}; + + +/***/ }), + +/***/ 47743: +/***/ ((module) => { + +"use strict"; + +module.exports = pool; + +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ + +/** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ + +/** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator + */ +function pool(alloc, slice, size) { + var SIZE = size || 8192; + var MAX = SIZE >>> 1; + var slab = null; + var offset = SIZE; + return function pool_alloc(size) { + if (size < 1 || size > MAX) + return alloc(size); + if (offset + size > SIZE) { + slab = alloc(SIZE); + offset = 0; + } + var buf = slice.call(slab, offset, offset += size); + if (offset & 7) // align to 32 bit + offset = (offset | 7) + 1; + return buf; + }; +} + + +/***/ }), + +/***/ 99049: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +/** + * A minimal UTF8 implementation for number arrays. + * @memberof util + * @namespace + */ +var utf8 = exports; + +/** + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length + */ +utf8.length = function utf8_length(string) { + var len = 0, + c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) + len += 1; + else if (c < 2048) + len += 2; + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } else + len += 3; + } + return len; +}; + +/** + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read + */ +utf8.read = function utf8_read(buffer, start, end) { + var len = end - start; + if (len < 1) + return ""; + var parts = null, + chunk = [], + i = 0, // char offset + t; // temporary + while (start < end) { + t = buffer[start++]; + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +/** + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written + */ +utf8.write = function utf8_write(string, buffer, offset) { + var start = offset, + c1, // character 1 + c2; // character 2 + for (var i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return offset - start; +}; + + +/***/ }), + +/***/ 9210: +/***/ ((module) => { + +/*! + * assertion-error + * Copyright(c) 2013 Jake Luer + * MIT Licensed + */ + +/*! + * Return a function that will copy properties from + * one object to another excluding any originally + * listed. Returned function will create a new `{}`. + * + * @param {String} excluded properties ... + * @return {Function} + */ + +function exclude () { + var excludes = [].slice.call(arguments); + + function excludeProps (res, obj) { + Object.keys(obj).forEach(function (key) { + if (!~excludes.indexOf(key)) res[key] = obj[key]; + }); + } + + return function extendExclude () { + var args = [].slice.call(arguments) + , i = 0 + , res = {}; + + for (; i < args.length; i++) { + excludeProps(res, args[i]); + } + + return res; + }; +}; + +/*! + * Primary Exports + */ + +module.exports = AssertionError; + +/** + * ### AssertionError + * + * An extension of the JavaScript `Error` constructor for + * assertion and validation scenarios. + * + * @param {String} message + * @param {Object} properties to include (optional) + * @param {callee} start stack function (optional) + */ + +function AssertionError (message, _props, ssf) { + var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON') + , props = extend(_props || {}); + + // default values + this.message = message || 'Unspecified AssertionError'; + this.showDiff = false; + + // copy from properties + for (var key in props) { + this[key] = props[key]; + } + + // capture stack trace + ssf = ssf || AssertionError; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, ssf); + } else { + try { + throw new Error(); + } catch(e) { + this.stack = e.stack; + } + } +} + +/*! + * Inherit from Error.prototype + */ + +AssertionError.prototype = Object.create(Error.prototype); + +/*! + * Statically set name + */ + +AssertionError.prototype.name = 'AssertionError'; + +/*! + * Ensure correct constructor + */ + +AssertionError.prototype.constructor = AssertionError; + +/** + * Allow errors to be converted to JSON for static transfer. + * + * @param {Boolean} include stack (default: `true`) + * @return {Object} object that can be `JSON.stringify` + */ + +AssertionError.prototype.toJSON = function (stack) { + var extend = exclude('constructor', 'toJSON', 'stack') + , props = extend({ name: this.name }, this); + + // include stack if exists and not turned off + if (false !== stack && this.stack) { + props.stack = this.stack; + } + + return props; +}; + + +/***/ }), + +/***/ 56964: +/***/ ((module) => { + +"use strict"; + + +function Queue(options) { + if (!(this instanceof Queue)) { + return new Queue(options); + } + + options = options || {}; + this.concurrency = options.concurrency || Infinity; + this.pending = 0; + this.jobs = []; + this.cbs = []; + this._done = done.bind(this); +} + +var arrayAddMethods = [ + 'push', + 'unshift', + 'splice' +]; + +arrayAddMethods.forEach(function(method) { + Queue.prototype[method] = function() { + var methodResult = Array.prototype[method].apply(this.jobs, arguments); + this._run(); + return methodResult; + }; +}); + +Object.defineProperty(Queue.prototype, 'length', { + get: function() { + return this.pending + this.jobs.length; + } +}); + +Queue.prototype._run = function() { + if (this.pending === this.concurrency) { + return; + } + if (this.jobs.length) { + var job = this.jobs.shift(); + this.pending++; + job(this._done); + this._run(); + } + + if (this.pending === 0) { + while (this.cbs.length !== 0) { + var cb = this.cbs.pop(); + process.nextTick(cb); + } + } +}; + +Queue.prototype.onDone = function(cb) { + if (typeof cb === 'function') { + this.cbs.push(cb); + this._run(); + } +}; + +function done() { + this.pending--; + this._run(); +} + +module.exports = Queue; + + +/***/ }), + +/***/ 14880: +/***/ ((module) => { + +/* + * Copyright 2010-2015 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. + */ + +//node.js deps + +//npm deps + +//app deps + +//begin module +module.exports = { + NO_KEY_OPTION: 'No "keyPath" or "privateKey" option supplied.', + NO_CERT_OPTION: 'No "certPath" or "clientCert" option supplied.', + NO_CA_OPTION: 'No "caPath" or "caCert" option supplied.', + INVALID_KEY_PATH_OPTION: 'Invalid "keyPath" option supplied.', + INVALID_CERT_PATH_OPTION: 'Invalid "certPath" option supplied.', + INVALID_CA_PATH_OPTION: 'Invalid "caPath" option supplied.', + INVALID_CLIENT_CERT_OPTION: 'Invalid "clientCert" option supplied.', + INVALID_PRIVATE_KEY_OPTION: 'Invalid "privateKey" option supplied.', + INVALID_CA_CERT_OPTION: 'Invalid "caCert" option supplied.' +}; + + +/***/ }), + +/***/ 35261: +/***/ ((module) => { + +/* + * Copyright 2010-2015 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. + */ + +//node.js deps + +//npm deps + +//app deps + +//begin module +/** + * This is the exposed module. + * This method determines if an object is undefined. + * + * @param {Object} value + * @access public + */ +module.exports = function(value) { + return typeof value === 'undefined' || value === null; +}; + + +/***/ }), + +/***/ 60242: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * Copyright 2010-2015 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. + */ + +//node.js deps +var filesys = __nccwpck_require__(35747); + +//npm deps + +//app deps +var isUndefined = __nccwpck_require__(35261); +var exceptions = __nccwpck_require__(14880); + +//begin module +/** + * This method is the exposed module; it validates and prepares the tls + * options as required for connection to the AWS IoT service. + * + * @param {Object} options + * @access public + */ +module.exports = function(options) { + + // verify certificate paths + if (isUndefined(options.keyPath) && isUndefined(options.privateKey)) { + throw new Error(exceptions.NO_KEY_OPTION); + } + if (isUndefined(options.certPath) && isUndefined(options.clientCert)) { + throw new Error(exceptions.NO_CERT_OPTION); + } + if (isUndefined(options.caPath) && isUndefined(options.caCert)) { + throw new Error(exceptions.NO_CA_OPTION); + } + // + // Certificates and private keys may be passed in files using options + // ending in 'Path', e.g. 'keyPath', 'certPath', and 'caPath'. In addition, + // they can also be passed in as buffers or files using the options + // 'privateKey', 'clientCert', and 'caCert'. This second set is the one + // that the AWS Console generates a JSON configuration document for. + // + if (!isUndefined(options.caCert)) { + if (Buffer.isBuffer(options.caCert)) { + options.ca = options.caCert; + } else { + if (filesys.existsSync(options.caCert)) { + options.ca = filesys.readFileSync(options.caCert); + } else { + throw new Error(exceptions.INVALID_CA_CERT_OPTION); + } + } + } + if (!isUndefined(options.privateKey)) { + if (Buffer.isBuffer(options.privateKey)) { + options.key = options.privateKey; + } else { + if (filesys.existsSync(options.privateKey)) { + options.key = filesys.readFileSync(options.privateKey); + } else { + throw new Error(exceptions.INVALID_PRIVATE_KEY_OPTION); + } + } + } + if (!isUndefined(options.clientCert)) { + if (Buffer.isBuffer(options.clientCert)) { + options.cert = options.clientCert; + } else { + if (filesys.existsSync(options.clientCert)) { + options.cert = filesys.readFileSync(options.clientCert); + } else { + throw new Error(exceptions.INVALID_CLIENT_CERT_OPTION); + } + } + } + + // Parse PEM files. Options ending in 'Path' must be files + // and will override options which do not end in 'Path'. + + if (filesys.existsSync(options.keyPath)) { + options.key = filesys.readFileSync(options.keyPath); + } else if (!isUndefined(options.keyPath)) { + throw new Error(exceptions.INVALID_KEY_PATH_OPTION); + } + if (filesys.existsSync(options.certPath)) { + options.cert = filesys.readFileSync(options.certPath); + } else if (!isUndefined(options.certPath)) { + throw new Error(exceptions.INVALID_CERT_PATH_OPTION); + } + if (filesys.existsSync(options.caPath)) { + options.ca = filesys.readFileSync(options.caPath); + } else if (!isUndefined(options.caPath)) { + throw new Error(exceptions.INVALID_CA_PATH_OPTION); + } + + // request certificate from partner + options.requestCert = true; + + // require certificate authentication + options.rejectUnauthorized = true; + +}; + + +/***/ }), + +/***/ 72592: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * Copyright 2010-2015 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. + */ + +//node.js deps +var events = __nccwpck_require__(28614); +var inherits = __nccwpck_require__(31669).inherits; + +//npm deps +var mqtt = __nccwpck_require__(38017); +var hmacSHA256 = __nccwpck_require__(74923); +var sha256 = __nccwpck_require__(63941); + +//app deps +var exceptions = __nccwpck_require__(12192); +var isUndefined = __nccwpck_require__(35261); +var tlsReader = __nccwpck_require__(60242); +var path = __nccwpck_require__(85622); +var fs = __nccwpck_require__(35747); + +//begin module +function makeTwoDigits(n) { + if (n > 9) { + return n; + } else { + return '0' + n; + } +} + +function getDateTimeString() { + var d = new Date(); + + // + // The additional ''s are used to force JavaScript to interpret the + // '+' operator as string concatenation rather than arithmetic. + // + return d.getUTCFullYear() + '' + + makeTwoDigits(d.getUTCMonth() + 1) + '' + + makeTwoDigits(d.getUTCDate()) + 'T' + '' + + makeTwoDigits(d.getUTCHours()) + '' + + makeTwoDigits(d.getUTCMinutes()) + '' + + makeTwoDigits(d.getUTCSeconds()) + 'Z'; +} + +function getDateString(dateTimeString) { + return dateTimeString.substring(0, dateTimeString.indexOf('T')); +} + +function getSignatureKey(key, dateStamp, regionName, serviceName) { + var kDate = hmacSHA256(dateStamp, 'AWS4' + key, { + asBytes: true + }); + var kRegion = hmacSHA256(regionName, kDate, { + asBytes: true + }); + var kService = hmacSHA256(serviceName, kRegion, { + asBytes: true + }); + var kSigning = hmacSHA256('aws4_request', kService, { + asBytes: true + }); + return kSigning; +} + +function signUrl(method, scheme, hostname, path, queryParams, accessId, secretKey, + region, serviceName, payload, today, now, debug, awsSTSToken) { + + var signedHeaders = 'host'; + + var canonicalHeaders = 'host:' + hostname.toLowerCase() + '\n'; + + var canonicalRequest = method + '\n' + // method + path + '\n' + // path + queryParams + '\n' + // query params + canonicalHeaders + // headers + '\n' + // required + signedHeaders + '\n' + // signed header list + sha256(payload, { + asBytes: true + }); // hash of payload (empty string) + + if (debug === true) { + console.log('canonical request: ' + canonicalRequest + '\n'); + } + + var hashedCanonicalRequest = sha256(canonicalRequest, { + asBytes: true + }); + + if (debug === true) { + console.log('hashed canonical request: ' + hashedCanonicalRequest + '\n'); + } + + var stringToSign = 'AWS4-HMAC-SHA256\n' + + now + '\n' + + today + '/' + region + '/' + serviceName + '/aws4_request\n' + + hashedCanonicalRequest; + + if (debug === true) { + console.log('string to sign: ' + stringToSign + '\n'); + } + + var signingKey = getSignatureKey(secretKey, today, region, serviceName); + + if (debug === true) { + console.log('signing key: ' + signingKey + '\n'); + } + + var signature = hmacSHA256(stringToSign, signingKey, { + asBytes: true + }); + + if (debug === true) { + console.log('signature: ' + signature + '\n'); + } + + var finalParams = queryParams + '&X-Amz-Signature=' + signature; + + if (!isUndefined(awsSTSToken)) { + finalParams += '&X-Amz-Security-Token=' + encodeURIComponent(awsSTSToken); + } + + var url = scheme + hostname + path + '?' + finalParams; + + if (debug === true) { + console.log('url: ' + url + '\n'); + } + + return url; +} + +function prepareWebSocketUrl(options, awsAccessId, awsSecretKey, awsSTSToken) { + var now = getDateTimeString(); + var today = getDateString(now); + var path = '/mqtt'; + var awsServiceName = 'iotdevicegateway'; + var queryParams = 'X-Amz-Algorithm=AWS4-HMAC-SHA256' + + '&X-Amz-Credential=' + awsAccessId + '%2F' + today + '%2F' + options.region + '%2F' + awsServiceName + '%2Faws4_request' + + '&X-Amz-Date=' + now + + '&X-Amz-SignedHeaders=host'; + var hostName = options.host; + + // Include the port number in the hostname if it's not + // the standard wss port (443). + // + if (!isUndefined(options.port) && options.port !== 443) { + hostName = options.host + ':' + options.port; + } + return signUrl('GET', 'wss://', hostName, path, queryParams, + awsAccessId, awsSecretKey, options.region, awsServiceName, '', today, now, options.debug, awsSTSToken); +} + +function prepareWebSocketCustomAuthUrl(options) { + var path = '/mqtt'; + var hostName = options.host; + + // Include the port number in the hostname if it's not + // the standard wss port (443). + // + if (!isUndefined(options.port) && options.port !== 443) { + hostName = options.host + ':' + options.port; + } + + return 'wss://' + hostName + path; +} + +function arrayEach(array, iterFunction) { + for (var idx in array) { + if (Object.prototype.hasOwnProperty.call(array, idx)) { + iterFunction.call(this, array[idx], parseInt(idx, 10)); + } + } +} + +function getCredentials(ini) { + //Get shared credential function from AWS SDK. + var map = {}; + var currentSection ={}; + 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]; + } 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; +} + +// +// This method is the exposed module; it validates the mqtt options, +// creates a secure mqtt connection via TLS, and returns the mqtt +// connection instance. +// +function DeviceClient(options) { + // + // Force instantiation using the 'new' operator; this will cause inherited + // constructors (e.g. the 'events' class) to be called. + // + if (!(this instanceof DeviceClient)) { + return new DeviceClient(options); + } + // + // A copy of 'this' for use inside of closures + // + var that = this; + + // + // Offline Operation + // + // The connection to AWS IoT can be in one of three states: + // + // 1) Inactive + // 2) Established + // 3) Stable + // + // During state 1), publish operations are placed in a queue + // ("filling") + // + // During states 2) and 3), any operations present in the queue + // are sent to the mqtt client for completion ("draining"). + // + // In all states, subscriptions are tracked in a cache + // + // A "draining interval" is used to specify the rate at which + // which operations are drained from the queue. + // + // +- - - - - - - - - - - - - - - - - - - - - - - - + + // | | + // + // | FILLING | + // + // | | + // +-----------------------------+ + // | | | | + // | | + // | v | | + // +- - Established Inactive - -+ + // | | ^ | + // | | + // | | | | + // +----------> Stable ----------+ + // | | + // + // | DRAINING | + // + // | | + // +- - - - - - - - - - - - - - - - - - - - - - - - + + // + // + // Draining Operation + // + // During draining, existing subscriptions are re-sent, + // followed by any publishes which occurred while offline. + // + + // + // Publish cache used during filling + // + var offlinePublishQueue = []; + var offlineQueueing = true; + var offlineQueueMaxSize = 0; + var offlineQueueDropBehavior = 'oldest'; // oldest or newest + offlinePublishQueue.length = 0; + + // + // Subscription queue for subscribe/unsubscribe requests received when offline + // We do not want an unbounded queue so for now limit to current max subs in AWS IoT + // + var offlineSubscriptionQueue = []; + var offlineSubscriptionQueueMaxSize = 50; + offlineSubscriptionQueue.length = 0; + + // + // Subscription cache; active if autoResubscribe === true + // + var activeSubscriptions = []; + var autoResubscribe = true; + activeSubscriptions.length = 0; + + // + // Cloned subscription cache; active during initial draining. + // + var clonedSubscriptions = []; + clonedSubscriptions.length = 0; + + // + // Contains the operational state of the connection + // + var connectionState = 'inactive'; + + // + // Used to time draining operations; active during draining. + // + var drainingTimer = null; + var drainTimeMs = 250; + + //Default keep alive time interval in seconds. + var defaultKeepalive = 300; + // + // These properties control the reconnect behavior of the MQTT Client. If + // the MQTT client becomes disconnected, it will attempt to reconnect after + // a quiet period; this quiet period doubles with each reconnection attempt, + // e.g. 1 seconds, 2 seconds, 2, 8, 16, 32, etc... up until a maximum + // reconnection time is reached. + // + // If a connection is active for the minimum connection time, the quiet + // period is reset to the initial value. + // + // baseReconnectTime: the time in seconds to wait before the first + // reconnect attempt + // + // minimumConnectionTime: the time in seconds that a connection must be + // active before resetting the current reconnection time to the base + // reconnection time + // + // maximumReconnectTime: the maximum time in seconds to wait between + // reconnect attempts + // + // The defaults for these values are: + // + // baseReconnectTime: 1 seconds + // minimumConnectionTime: 20 seconds + // maximumReconnectTime: 128 seconds + // + var baseReconnectTimeMs = 1000; + var minimumConnectionTimeMs = 20000; + var maximumReconnectTimeMs = 128000; + var currentReconnectTimeMs; + + // + // Used to measure the length of time the connection has been active to + // know if it's stable or not. Active beginning from receipt of a 'connect' + // event (e.g. received CONNACK) until 'minimumConnectionTimeMs' has elapsed. + // + var connectionTimer = null; + + // + // Credentials when authenticating via WebSocket/SigV4 + // + var awsAccessId; + var awsSecretKey; + var awsSTSToken; + // + // Validate options, set default reconnect period if not specified. + // + var metricPrefix = "?SDK=JavaScript&Version="; + var pjson = __nccwpck_require__(23240); + var sdkVersion = pjson.version; + var defaultUsername = metricPrefix + sdkVersion; + + if (isUndefined(options) || + Object.keys(options).length === 0) { + throw new Error(exceptions.INVALID_CONNECT_OPTIONS); + } + if (isUndefined(options.keepalive)) { + options.keepalive = defaultKeepalive; + } + // + // Metrics will be enabled by default unless the user explicitly disables it + // + if (isUndefined(options.enableMetrics) || options.enableMetrics === true){ + if (isUndefined(options.username)) { + options.username = defaultUsername; + } else { + options.username += defaultUsername; + } + } + if (!isUndefined(options.baseReconnectTimeMs)) { + baseReconnectTimeMs = options.baseReconnectTimeMs; + } + if (!isUndefined(options.minimumConnectionTimeMs)) { + minimumConnectionTimeMs = options.minimumConnectionTimeMs; + } + if (!isUndefined(options.maximumReconnectTimeMs)) { + maximumReconnectTimeMs = options.maximumReconnectTimeMs; + } + if (!isUndefined(options.drainTimeMs)) { + drainTimeMs = options.drainTimeMs; + } + if (!isUndefined(options.autoResubscribe)) { + autoResubscribe = options.autoResubscribe; + } + if (!isUndefined(options.offlineQueueing)) { + offlineQueueing = options.offlineQueueing; + } + if (!isUndefined(options.offlineQueueMaxSize)) { + offlineQueueMaxSize = options.offlineQueueMaxSize; + } + if (!isUndefined(options.offlineQueueDropBehavior)) { + offlineQueueDropBehavior = options.offlineQueueDropBehavior; + } + currentReconnectTimeMs = baseReconnectTimeMs; + options.reconnectPeriod = currentReconnectTimeMs; + options.fastDisconnectDetection = true; + // + //SDK has its own logic to deal with auto resubscribe + // + options.resubscribe = false; + + // + // Verify that the reconnection timing parameters make sense. + // + if (options.baseReconnectTimeMs <= 0) { + throw new Error(exceptions.INVALID_RECONNECT_TIMING); + } + if (maximumReconnectTimeMs < baseReconnectTimeMs) { + throw new Error(exceptions.INVALID_RECONNECT_TIMING); + } + if (minimumConnectionTimeMs < baseReconnectTimeMs) { + throw new Error(exceptions.INVALID_RECONNECT_TIMING); + } + // + // Verify that the other optional parameters make sense. + // + if (offlineQueueDropBehavior !== 'newest' && + offlineQueueDropBehavior !== 'oldest') { + throw new Error(exceptions.INVALID_OFFLINE_QUEUEING_PARAMETERS); + } + if (offlineQueueMaxSize < 0) { + throw new Error(exceptions.INVALID_OFFLINE_QUEUEING_PARAMETERS); + } + + // set protocol, do not override existing definitions if available + if (isUndefined(options.protocol)) { + options.protocol = 'mqtts'; + } + + if (isUndefined(options.host)) { + throw new Error(exceptions.INVALID_CONNECT_OPTIONS); + } + + if (options.protocol === 'mqtts') { + // set port, do not override existing definitions if available + if (isUndefined(options.port)) { + options.port = 8883; + } + + //read and map certificates + tlsReader(options); + } else if (options.protocol === 'wss' || options.protocol === 'wss-custom-auth') { + if (options.protocol === 'wss') { + // + // AWS access id and secret key + // It first check Input options and Environment variables + // If that not available, it will try to load credentials from default credential file + if (!isUndefined(options.accessKeyId)) { + awsAccessId = options.accessKeyId; + } else { + awsAccessId = process.env.AWS_ACCESS_KEY_ID; + } + if (!isUndefined(options.secretKey)) { + awsSecretKey = options.secretKey; + } else { + awsSecretKey = process.env.AWS_SECRET_ACCESS_KEY; + } + if (!isUndefined(options.sessionToken)) { + awsSTSToken = options.sessionToken; + } else { + awsSTSToken = process.env.AWS_SESSION_TOKEN; + } + if (isUndefined(awsAccessId) || isUndefined(awsSecretKey)) { + var filename; + try { + if (!isUndefined(options.filename)) { + filename = options.filename; + } else { + filename = _loadDefaultFilename(); + } + var user_profile = options.profile || process.env.AWS_PROFILE || 'default'; + var creds = getCredentials(fs.readFileSync(filename, 'utf-8')); + var profile = creds[user_profile]; + awsAccessId = profile.aws_access_key_id; + awsSecretKey = profile.aws_secret_access_key; + awsSTSToken = profile.aws_session_token; + } catch (e) { + console.log(e); + console.log('Failed to read credentials from ' + filename); + } + } + // AWS Access Key ID and AWS Secret Key must be defined + if (isUndefined(awsAccessId) || (isUndefined(awsSecretKey))) { + console.log('To connect via WebSocket/SigV4, AWS Access Key ID and AWS Secret Key must be passed either in options or as environment variables; see README.md'); + throw new Error(exceptions.INVALID_CONNECT_OPTIONS); + } + } else { + if (isUndefined(options.customAuthHeaders)) { + console.log('To authenticate with a custom authorizer, you must provide the required HTTP headers; see README.md'); + throw new Error(exceptions.INVALID_CONNECT_OPTIONS); + } + } + + if (!isUndefined(options.host) && isUndefined(options.region)) { + var pattern = /[a-zA-Z0-9]+\.iot\.([a-z]+-[a-z]+-[0-9]+)\.amazonaws\..+/; + var region = pattern.exec(options.host); + if (region === null) { + console.log('Host endpoint is not valid'); + throw new Error(exceptions.INVALID_CONNECT_OPTIONS); + } else { + options.region = region[1]; + } + } + // set port, do not override existing definitions if available + if (isUndefined(options.port)) { + options.port = 443; + } + // check websocketOptions and ensure that the protocol is defined + if (isUndefined(options.websocketOptions)) { + options.websocketOptions = { + protocol: 'mqttv3.1' + }; + } else { + options.websocketOptions.protocol = 'mqttv3.1'; + } + + if (options.protocol === 'wss-custom-auth') { + options.websocketOptions.headers = options.customAuthHeaders; + } + } + + if ((!isUndefined(options)) && (options.debug === true)) { + console.log(options); + console.log('attempting new mqtt connection...'); + } + //connect and return the client instance to map all mqttjs apis + + var protocols = {}; + protocols.mqtts = __nccwpck_require__(45515); + protocols.wss = __nccwpck_require__(90983); + + function _loadDefaultFilename() { + var home = process.env.HOME || + process.env.USERPROFILE || + (process.env.HOMEPATH ? ((process.env.HOMEDRIVE || 'C:/') + process.env.HOMEPATH) : null); + return path.join(home, '.aws', 'credentials'); + + } + function _addToSubscriptionCache(topic, options) { + var matches = activeSubscriptions.filter(function(element) { + return element.topic === topic; + }); + // + // Add the element only if it doesn't already exist. + // + if (matches.length === 0) { + activeSubscriptions.push({ + topic: topic, + options: options + }); + } + } + + function _deleteFromSubscriptionCache(topic, options) { + var remaining = activeSubscriptions.filter(function(element) { + return element.topic !== topic; + }); + activeSubscriptions = remaining; + } + + function _updateSubscriptionCache(operation, topics, options) { + var opFunc = null; + + // + // Don't cache subscriptions if auto-resubscribe is disabled + // + if (autoResubscribe === false) { + return; + } + if (operation === 'subscribe') { + opFunc = _addToSubscriptionCache; + } else if (operation === 'unsubscribe') { + opFunc = _deleteFromSubscriptionCache; + } + // + // Test to see if 'topics' is an array and if so, iterate. + // + if (Object.prototype.toString.call(topics) === '[object Array]') { + topics.forEach(function(item, index, array) { + opFunc(item, options); + }); + } else { + opFunc(topics, options); + } + } + + // + // Return true if the connection is currently in a 'filling' + // state + // + function _filling() { + return connectionState === 'inactive'; + } + + function _wrapper(client) { + var protocol = options.protocol; + if (protocol === 'wss') { + var url; + // + // If the access id and secret key are available, prepare the URL. + // Otherwise, set the url to an invalid value. + // + if (awsAccessId === '' || awsSecretKey === '') { + url = 'wss://no-credentials-available'; + } else { + url = prepareWebSocketUrl(options, awsAccessId, awsSecretKey, awsSTSToken); + } + + if (options.debug === true) { + console.log('using websockets, will connect to \'' + url + '\'...'); + } + + options.url = url; + } else if (protocol === 'wss-custom-auth') { + options.url = prepareWebSocketCustomAuthUrl(options); + if (options.debug === true) { + console.log('using websockets custom auth, will connect to \'' + options.url + '\'...'); + } + // Treat the request as a standard websocket request from here onwards + protocol = 'wss'; + } + return protocols[protocol](client, options); + } + + var device = new mqtt.MqttClient(_wrapper, options); + + //handle events from the mqtt client + + // + // Timeout expiry function for the connection timer; once a connection + // is stable, reset the current reconnection time to the base value. + // + function _markConnectionStable() { + currentReconnectTimeMs = baseReconnectTimeMs; + device.options.reconnectPeriod = currentReconnectTimeMs; + // + // Mark this timeout as expired + // + connectionTimer = null; + connectionState = 'stable'; + } + // + // Trim the offline queue if required; returns true if another + // element can be placed in the queue + // + function _trimOfflinePublishQueueIfNecessary() { + var rc = true; + + if ((offlineQueueMaxSize > 0) && + (offlinePublishQueue.length >= offlineQueueMaxSize)) { + // + // The queue has reached its maximum size, trim it + // according to the defined drop behavior. + // + if (offlineQueueDropBehavior === 'oldest') { + offlinePublishQueue.shift(); + } else { + rc = false; + } + } + return rc; + } + + // + // Timeout expiry function for the drain timer; once a connection + // has been established, begin draining cached transactions. + // + function _drainOperationQueue() { + + // + // Handle our active subscriptions first, using a cloned + // copy of the array. We shift them out one-by-one until + // all have been processed, leaving the official record + // of active subscriptions untouched. + // + var subscription = clonedSubscriptions.shift(); + + if (!isUndefined(subscription)) { + // + // If the 3rd argument (namely callback) is not present, we will + // use two-argument form to call mqtt.Client#subscribe(), which + // supports both subscribe(topics, options) and subscribe(topics, callback). + // + if (!isUndefined(subscription.callback)) { + device.subscribe(subscription.topic, subscription.options, subscription.callback); + } else { + device.subscribe(subscription.topic, subscription.options); + } + } else { + // + // If no remaining active subscriptions to process, + // then handle subscription requests queued while offline. + // + var req = offlineSubscriptionQueue.shift(); + + if (!isUndefined(req)) { + _updateSubscriptionCache(req.type, req.topics, req.options); + if (req.type === 'subscribe') { + if (!isUndefined(req.callback)) { + device.subscribe(req.topics, req.options, req.callback); + } else { + device.subscribe(req.topics, req.options); + } + } else if (req.type === 'unsubscribe') { + device.unsubscribe(req.topics, req.callback); + } + } else { + // + // If no active or queued subscriptions remaining to process, + // then handle queued publish operations. + // + var offlinePublishMessage = offlinePublishQueue.shift(); + + if (!isUndefined(offlinePublishMessage)) { + device.publish(offlinePublishMessage.topic, + offlinePublishMessage.message, + offlinePublishMessage.options, + offlinePublishMessage.callback); + } + if (offlinePublishQueue.length === 0) { + // + // The subscription and offlinePublishQueue queues are fully drained, + // cancel the draining timer. + // + clearInterval(drainingTimer); + drainingTimer = null; + } + } + } + } + // + // Event handling - *all* events generated by the mqtt.js client must be + // handled here, *and* propagated upwards. + // + + device.on('connect', function(connack) { + // + // If not already running, start the connection timer. + // + if (connectionTimer === null) { + connectionTimer = setTimeout(_markConnectionStable, + minimumConnectionTimeMs); + } + connectionState = 'established'; + // + // If not already running, start the draining timer and + // clone the active subscriptions. + // + if (drainingTimer === null) { + clonedSubscriptions = activeSubscriptions.slice(0); + drainingTimer = setInterval(_drainOperationQueue, + drainTimeMs); + } + that.emit('connect', connack); + }); + device.on('close', function(err) { + if (!isUndefined(err)) { + that.emit('error', err); + } + if ((!isUndefined(options)) && (options.debug === true)) { + console.log('connection lost - will attempt reconnection in ' + + device.options.reconnectPeriod / 1000 + ' seconds...'); + } + // + // Clear the connection and drain timers + // + clearTimeout(connectionTimer); + connectionTimer = null; + clearInterval(drainingTimer); + drainingTimer = null; + + // + // Mark the connection state as inactive + // + connectionState = 'inactive'; + + that.emit('close'); + }); + device.on('reconnect', function() { + // + // Update the current reconnect timeout; this will be the + // next timeout value used if this connect attempt fails. + // + currentReconnectTimeMs = currentReconnectTimeMs * 2; + currentReconnectTimeMs = Math.min(maximumReconnectTimeMs, currentReconnectTimeMs); + device.options.reconnectPeriod = currentReconnectTimeMs; + + that.emit('reconnect'); + }); + device.on('offline', function() { + that.emit('offline'); + }); + device.on('error', function(error) { + that.emit('error', error); + }); + device.on('packetsend', function(packet) { + that.emit('packetsend', packet); + }); + device.on('packetreceive', function(packet) { + that.emit('packetreceive', packet); + }); + device.on('message', function(topic, message, packet) { + that.emit('message', topic, message, packet); + }); + // + // The signatures of these methods *must* match those of the mqtt.js + // client. + // + this.publish = function(topic, message, options, callback) { + // + // If filling or still draining, push this publish operation + // into the offline operations queue; otherwise, perform it + // immediately. + // + if (offlineQueueing === true && (_filling() || drainingTimer !== null)) { + if (_trimOfflinePublishQueueIfNecessary()) { + offlinePublishQueue.push({ + topic: topic, + message: message, + options: options, + callback: callback + }); + } + } else { + if (offlineQueueing === true || !_filling()) { + device.publish(topic, message, options, callback); + } + } + }; + this.subscribe = function(topics, options, callback) { + if (!_filling() || autoResubscribe === false) { + _updateSubscriptionCache('subscribe', topics, options); // we do not store callback in active cache + // + // If the 3rd argument (namely callback) is not present, we will + // use two-argument form to call mqtt.Client#subscribe(), which + // supports both subscribe(topics, options) and subscribe(topics, callback). + // + if (!isUndefined(callback)) { + device.subscribe(topics, options, callback); + } else { + device.subscribe(topics, options); + } + } else { + // we're offline - queue this subscription request + if (offlineSubscriptionQueue.length < offlineSubscriptionQueueMaxSize) { + offlineSubscriptionQueue.push({ + type: 'subscribe', + topics: topics, + options: options, + callback: callback + }); + } else { + that.emit('error', new Error('Maximum queued offline subscription reached')); + } + } + }; + this.unsubscribe = function(topics, callback) { + if (!_filling() || autoResubscribe === false) { + _updateSubscriptionCache('unsubscribe', topics); + device.unsubscribe(topics, callback); + } else { + // we're offline - queue this unsubscribe request + if (offlineSubscriptionQueue.length < offlineSubscriptionQueueMaxSize) { + offlineSubscriptionQueue.push({ + type: 'unsubscribe', + topics: topics, + options: options, + callback: callback + }); + } + } + }; + this.end = function(force, callback) { + device.end(force, callback); + }; + + this.handleMessage = device.handleMessage.bind(device); + + device.handleMessage = function(packet, callback) { + that.handleMessage(packet, callback); + }; + + this.updateWebSocketCredentials = function(accessKeyId, secretKey, sessionToken, expiration) { + awsAccessId = accessKeyId; + awsSecretKey = secretKey; + awsSTSToken = sessionToken; + }; + this.getWebsocketHeaders = function() { + return options.websocketOptions.headers; + }; + // + // Call this function to update the custom auth headers + // + this.updateCustomAuthHeaders = function(newHeaders) { + options.websocketOptions.headers = newHeaders; + }; + // + // Used for integration testing only + // + this.simulateNetworkFailure = function() { + device.stream.emit('error', new Error('simulated connection error')); + device.stream.end(); + }; +} + +// +// Allow instances to listen in on events that we produce for them +// +inherits(DeviceClient, events.EventEmitter); + +module.exports = DeviceClient; +module.exports.DeviceClient = DeviceClient; + +// +// Exported for unit testing only +// +module.exports.prepareWebSocketUrl = prepareWebSocketUrl; +module.exports.prepareWebSocketCustomAuthUrl = prepareWebSocketCustomAuthUrl; + + +/***/ }), + +/***/ 12192: +/***/ ((module) => { + +/* + * Copyright 2010-2015 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. + */ + +//node.js deps + +//npm deps + +//app deps + +//begin module +module.exports = { + INVALID_CONNECT_OPTIONS: 'Invalid connect options supplied.', + INVALID_CLIENT_ID_OPTION: 'Invalid "clientId" (mqtt client id) option supplied.', + INVALID_RECONNECT_TIMING: 'Invalid reconnect timing options supplied.', + INVALID_OFFLINE_QUEUEING_PARAMETERS: 'Invalid offline queueing options supplied.' +}; + + +/***/ }), + +/***/ 45515: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * Copyright 2010-2015 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. + */ + +//node.js deps +var tls = __nccwpck_require__(4016); + +//npm deps + +//app deps + +function buildBuilder(mqttClient, opts) { + var connection; + + connection = tls.connect(opts); + + function handleTLSerrors(err) { + mqttClient.emit('error', err); + connection.end(); + } + + connection.on('secureConnect', function() { + if (!connection.authorized) { + connection.emit('error', new Error('TLS not authorized')); + } else { + connection.removeListener('error', handleTLSerrors); + } + }); + + connection.on('error', handleTLSerrors); + return connection; +} + +module.exports = buildBuilder; + + +/***/ }), + +/***/ 90983: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * Copyright 2010-2015 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. + */ + +//node.js deps + +//npm deps +const websocket = __nccwpck_require__(93777); + +//app deps + +function buildBuilder(client, opts) { + return websocket(opts.url, ['mqttv3.1'], opts.websocketOptions); +} + +module.exports = buildBuilder; + + +/***/ }), + +/***/ 92: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * Copyright 2010-2015 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. + */ + +/* + * Expose AWS IoT Embedded Javascript SDK modules + */ +module.exports.device = __nccwpck_require__(72592); +module.exports.thingShadow = __nccwpck_require__(43042); +module.exports.jobs = __nccwpck_require__(77880); + + +/***/ }), + +/***/ 77880: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * Copyright 2010-2017 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. + */ + +//node.js deps +var events = __nccwpck_require__(28614); +var inherits = __nccwpck_require__(31669).inherits; + +//npm deps + +//app deps +var deviceModule = __nccwpck_require__(72592); +var isUndefined = __nccwpck_require__(35261); + +// +// private functions +// + +function isJobTopic(topicTokens) { + // + // Job topics have the forms: + // + // $aws/things/{thingName}/jobs/# + // + return (topicTokens[0] === '$aws' && topicTokens[1] === 'things' && topicTokens[3] === 'jobs'); +} + +function buildJobTopic(thingName, jobId, operation) { + var result = '$aws/things/' + thingName + '/jobs/'; + + // check for omitted jobId and fixup parameters + if (isUndefined(operation)) { + operation = jobId; + } else { + result += jobId.toString() + '/'; + } + + result += operation; + + return result; +} + + +//begin module + +function jobsClient(options) { + // + // Force instantiation using the 'new' operator; this will cause inherited + // constructors (e.g. the 'events' class) to be called. + // + if (!(this instanceof jobsClient)) { + return new jobsClient(options); + } + + // + // A copy of 'this' for use inside of closures + // + var that = this; + + // + // Track job subscriptions + // + // [ + // { + // "thingName": "string", + // "operations": [ + // { + // "operationName": "string", // if null then treat as default + // "currentJob": job, + // "callback": callback + // } + // ] + // } + // ] + // + var jobSubscriptions = []; + + // + // Instantiate the device + // + var device = deviceModule.DeviceClient(options); + + // + // Private function to update job execution status for given thing + // + this._updateJobStatus = function(thingName, job, status, statusDetails, callback) { + // Check for omitted statusDetails and update parameters + if (typeof statusDetails === "function") { + callback = statusDetails; + statusDetails = undefined; + } + + if ((!isUndefined(options)) && (options.debug === true)) { + console.log('updateJobStatus:', { thingName: thingName, jobId: job.id, status: status, statusDetails: statusDetails }); + } + + device.publish(buildJobTopic(thingName, job.id, 'update'), JSON.stringify({ status: status, statusDetails: statusDetails}), null, function(err){ + if (isUndefined(err)) { + job.status = { status: status, statusDetails: statusDetails }; + } + + if (!isUndefined(callback)) { + callback(err); + } + }); + } + + // + // Private function to build job object for passing to callback supplied in subscribeToJobs + // + this._buildJobObject = function(thingName, jobExecution) { + if (isUndefined(jobExecution) || isUndefined(jobExecution.jobId)) { + return null; + } + + var job = {}; + + job.id = jobExecution.jobId; + job.document = jobExecution.jobDocument; + job.operation = job.document.operation; + job.status = { status: jobExecution.status, statusDetails: jobExecution.statusDetails }; + + job.inProgress = function(statusDetails, callback) { + that._updateJobStatus(thingName, job, 'IN_PROGRESS', statusDetails, callback); + } + + job.failed = function(statusDetails, callback) { + that._updateJobStatus(thingName, job, 'FAILED', statusDetails, callback); + } + + job.succeeded = function(statusDetails, callback) { + that._updateJobStatus(thingName, job, 'SUCCEEDED', statusDetails, callback); + } + + return job; + } + + // + // Private function to handle job messages and process them accordingly + // + this._handleMessages = function(topic, payload) { + var topicTokens = topic.split('/'); + + // If not a job topic emit to application and return + if (!isJobTopic(topicTokens)) { + that.emit('message', topic, payload); + return; + } + + var thingName = topicTokens[2]; + + var thing = jobSubscriptions.find(function(elem) { + return elem.thingName === thingName; + }); + + // Do nothing if thing not found in job subscriptions + if (isUndefined(thing)) { + return; + } + + var jobExecutionData = {}; + + try { + jobExecutionData = JSON.parse(payload.toString()); + } catch (err) { + if (options.debug === true) { + console.error('failed parsing JSON \'' + payload.toString() + '\', ' + err); + } + return; + } + + if (isUndefined(jobExecutionData.execution) || + isUndefined(jobExecutionData.execution.jobId) || + isUndefined(jobExecutionData.execution.jobDocument)) { + return; + } + + var operationName = jobExecutionData.execution.jobDocument.operation; + var operation = thing.operations.find(function(elem) { + return (isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName); + }); + + // If operation subscription not found by operation name then look for default operation subscription + if (isUndefined(operation)) { + operation = thing.operations.find(function(elem) { return (isUndefined(elem.operationName)); }); + + if (isUndefined(operation)) { + return; + } + } + + operation.callback(null, that._buildJobObject(thingName, jobExecutionData.execution)); + } + + this.subscribeToJobs = function(thingName, operationName, callback) { + // Check for omitted optional operationName and fixup parameters + if (isUndefined(callback)) { + callback = operationName; + operationName = null; + } + + if ((!isUndefined(options)) && (options.debug === true)) { + console.log('subscribeToJobs:', { thingName: thingName, operationName: operationName }); + } + + var thing = jobSubscriptions.find(function(elem) { + return elem.thingName === thingName; + }); + + // Check for previously unseen thing and add to job subscriptions + if (isUndefined(thing)) { + thing = { thingName: thingName, operations: [] }; + jobSubscriptions.push(thing); + + device.subscribe([ buildJobTopic(thingName, '$next/get/accepted'), buildJobTopic(thingName, 'notify-next') ], function(err, granted) { + if (!isUndefined(err)) { + callback(err); + } + }); + } + + // Find existing subscription for the given operationName + var operation = thing.operations.find(function(elem) { + return (isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName); + }); + + // If existing subscription found then update callback, otherwise create new entry in the thing's operations array + if (!isUndefined(operation)) { + operation.callback = callback; + } else { + operation = { operationName: operationName, callback: callback }; + thing.operations.push(operation); + } + } + + this.unsubscribeFromJobs = function(thingName, operationName, callback) { + // Check for omitted optional operationName and fixup parameters + if (isUndefined(callback)) { + callback = operationName; + operationName = null; + } + + if ((!isUndefined(options)) && (options.debug === true)) { + console.log('unsubscribeFromJobs:', { thingName: thingName, operationName: operationName }); + } + + var iThing = jobSubscriptions.findIndex(function(elem) { + return elem.thingName === thingName; + }); + + var notFoundError = new Error('subscription not found for given thing'); + + // Check for previously unseen thing and add to job subscriptions and publish to get to retrieve first job to be executed + if (iThing < 0) { + callback(notFoundError); + return; + } + + var iOperation = jobSubscriptions[iThing].operations.findIndex(function (elem) { + return (isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName); + }); + + if (iOperation < 0) { + callback(notFoundError); + return; + } + + jobSubscriptions[iThing].operations.splice(iOperation, 1); + + if (jobSubscriptions[iThing].operations.length === 0) { + jobSubscriptions.splice(iThing, 1); + device.unsubscribe([ buildJobTopic(thingName, '$next/get/accepted'), buildJobTopic(thingName, 'notify-next') ], callback); + return; + } + + callback(); + } + + this.startJobNotifications = function(thingName, callback) { + if ((!isUndefined(options)) && (options.debug === true)) { + console.log('startJobNotifications:', { thingName: thingName }); + } + + device.publish(buildJobTopic(thingName, '$next', 'get'), '{}', callback); + } + + device.on('connect', function() { + that.emit('connect'); + }); + device.on('close', function() { + that.emit('close'); + }); + device.on('reconnect', function() { + that.emit('reconnect'); + }); + device.on('offline', function() { + that.emit('offline'); + }); + device.on('error', function(error) { + that.emit('error', error); + }); + + device.on('message', that._handleMessages); + + this.publish = device.publish; + this.subscribe = device.subscribe; + this.unsubscribe = device.unsubscribe; + this.end = device.end; + this.handleMessage = device.handleMessage; + this.updateWebSocketCredentials = device.updateWebSocketCredentials; + + // + // Used for integration testing only + // + this.simulateNetworkFailure = device.simulateNetworkFailure; +} + +// +// Allow instances to listen in on events that we produce for them +// +inherits(jobsClient, events.EventEmitter); + +module.exports = jobsClient; + + +/***/ }), + +/***/ 43042: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * Copyright 2010-2015 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. + */ + +//node.js deps +var events = __nccwpck_require__(28614); +var inherits = __nccwpck_require__(31669).inherits; + +//npm deps + +//app deps +var deviceModule = __nccwpck_require__(72592); +var isUndefined = __nccwpck_require__(35261); + +// +// private functions +// +function buildThingShadowTopic(thingName, operation, type) { + if (!isUndefined(type)) { + return '$aws/things/' + thingName + '/shadow/' + operation + '/' + type; + } + return '$aws/things/' + thingName + '/shadow/' + operation; +} + +function isReservedTopic(topic) { + if (topic.substring(0, 12) === '$aws/things/') { + return true; + } + return false; +} + +function isThingShadowTopic(topicTokens, direction) { + var rc = false; + if (topicTokens[0] === '$aws') { + // + // Thing shadow topics have the form: + // + // $aws/things/{thingName}/shadow/{Operation}/{Status} + // + // Where {Operation} === update|get|delete + // And {Status} === accepted|rejected|delta + // + if ((topicTokens[1] === 'things') && + (topicTokens[3] === 'shadow') && + ((topicTokens[4] === 'update') || + (topicTokens[4] === 'get') || + (topicTokens[4] === 'delete'))) { + // + // Looks good so far; now check the direction and see if + // still makes sense. + // + if (direction === 'subscribe') { + if (((topicTokens[5] === 'accepted') || + (topicTokens[5] === 'rejected') || + (topicTokens[5] === 'delta')) && + (topicTokens.length === 6)) { + rc = true; + } + } else // direction === 'publish' + { + if (topicTokens.length === 5) { + rc = true; + } + } + } + } + return rc; +} + +//begin module + +function ThingShadowsClient(deviceOptions, thingShadowOptions) { + // + // Force instantiation using the 'new' operator; this will cause inherited + // constructors (e.g. the 'events' class) to be called. + // + if (!(this instanceof ThingShadowsClient)) { + return new ThingShadowsClient(deviceOptions, thingShadowOptions); + } + + // + // A copy of 'this' for use inside of closures + // + var that = this; + + // + // Track Thing Shadow registrations in here. + // + var thingShadows = [{}]; + + // + // Implements for every operation, used to construct clientToken. + // + var operationCount = 0; + + // + // Operation timeout (milliseconds). If no accepted or rejected response + // to a thing operation is received within this time, subscriptions + // to the accepted and rejected sub-topics for a thing are cancelled. + // + var operationTimeout = 10000; /* milliseconds */ + + // + // Variable used by the testing API setConnectionStatus() to simulate + // network connectivity failures. + // + var connected = true; + + // + // Instantiate the device. + // + var device = deviceModule.DeviceClient(deviceOptions); + + if (!isUndefined(thingShadowOptions)) { + if (!isUndefined(thingShadowOptions.operationTimeout)) { + operationTimeout = thingShadowOptions.operationTimeout; + } + } + + // + // Private function to subscribe and unsubscribe from topics. + // + this._handleSubscriptions = function(thingName, topicSpecs, devFunction, callback) { + var topics = []; + + // + // Build an array of topic names. + // + for (var i = 0, topicsLen = topicSpecs.length; i < topicsLen; i++) { + for (var j = 0, opsLen = topicSpecs[i].operations.length; j < opsLen; j++) { + for (var k = 0, statLen = topicSpecs[i].statii.length; k < statLen; k++) { + topics.push(buildThingShadowTopic(thingName, + topicSpecs[i].operations[j], + topicSpecs[i].statii[k])); + } + } + } + + if (thingShadows[thingName].debug === true) { + console.log(devFunction + ' on ' + topics); + } + // + // Subscribe/unsubscribe from the topics and perform callback when complete. + // + var args = []; + args.push(topics); + if (devFunction === 'subscribe') { + // QoS only applicable for subscribe + args.push({ + qos: thingShadows[thingName].qos + }); + // add our callback to check the SUBACK response for granted subscriptions + args.push(function(err, granted) { + if (!isUndefined(callback)) { + if (err) { + callback(err); + return; + } + // + // Check to see if we got all topic subscriptions granted. + // + var failedTopics = []; + for (var k = 0, grantedLen = granted.length; k < grantedLen; k++) { + // + // 128 is 0x80 - Failure from the MQTT lib. + // + if (granted[k].qos === 128) { + failedTopics.push(granted[k]); + } + } + + if (failedTopics.length > 0) { + callback('Not all subscriptions were granted', failedTopics); + return; + } + + // all subscriptions were granted + callback(); + } + }); + } else { + if (!isUndefined(callback)) { + args.push(callback); + } + } + + device[devFunction].apply(device, args); + }; + + // + // Private function to handle messages and dispatch them accordingly. + // + this._handleMessages = function(thingName, operation, operationStatus, payload) { + var stateObject = {}; + try { + stateObject = JSON.parse(payload.toString()); + } catch (err) { + if (deviceOptions.debug === true) { + console.error('failed parsing JSON \'' + payload.toString() + '\', ' + err); + } + return; + } + var clientToken = stateObject.clientToken; + var version = stateObject.version; + // + // Remove the properties 'clientToken' and 'version' from the stateObject; + // these properties are internal to this class. + // + delete stateObject.clientToken; + //Expose shadow version from raw object + //delete stateObject.version; + // + // Update the thing version on every accepted or delta message which + // contains it. + // + if ((!isUndefined(version)) && (operationStatus !== 'rejected')) { + // + // The thing shadow version is incremented by AWS IoT and should always + // increase. Do not update our local version if the received version is + // less than our version. + // + if ((isUndefined(thingShadows[thingName].version)) || + (version >= thingShadows[thingName].version)) { + thingShadows[thingName].version = version; + } else { + // + // We've received a message from AWS IoT with a version number lower than + // we would expect. There are two things that can cause this: + // + // 1) The shadow has been deleted (version # reverts to 1 in this case.) + // 2) The message has arrived out-of-order. + // + // For case 1) we can look at the operation to determine that this + // is the case and notify the client if appropriate. For case 2, + // we will not process it unless the client has specifically expressed + // an interested in these messages by setting 'discardStale' to false. + // + if (operation !== 'delete' && thingShadows[thingName].discardStale === true) { + if (deviceOptions.debug === true) { + console.warn('out-of-date version \'' + version + '\' on \'' + + thingName + '\' (local version \'' + + thingShadows[thingName].version + '\')'); + } + return; + } + } + } + // + // If this is a 'delta' message, emit an event for it and return. + // + if (operationStatus === 'delta') { + this.emit('delta', thingName, stateObject); + return; + } + // + // only accepted/rejected messages past this point + // =============================================== + // If this is an unkown clientToken (e.g., it doesn't have a corresponding + // client token property, the shadow has been modified by another client. + // If it's an update/accepted or delete/accepted, update the shadow and + // notify the client. + // + if (isUndefined(thingShadows[thingName].clientToken) || + thingShadows[thingName].clientToken !== clientToken) { + if ((operationStatus === 'accepted') && (operation !== 'get')) { + // + // This is a foreign update or delete accepted, update our + // shadow with the latest state and send a notification. + // + this.emit('foreignStateChange', thingName, operation, stateObject); + } + return; + } + // + // A response has been received, so cancel any outstanding timeout on this + // thingName/clientToken, delete the timeout handle, and unsubscribe from + // all sub-topics. + // + clearTimeout( + thingShadows[thingName].timeout); + + delete thingShadows[thingName].timeout; + // + // Delete the operation's client token. + // + delete thingShadows[thingName].clientToken; + // + // Mark this operation as complete. + // + thingShadows[thingName].pending = false; + + // + // Unsubscribe from the 'accepted' and 'rejected' sub-topics unless we are + // persistently subscribed to this thing shadow. + // + if (thingShadows[thingName].persistentSubscribe === false) { + this._handleSubscriptions(thingName, [{ + operations: [operation], + statii: ['accepted', 'rejected'] + }], 'unsubscribe'); + } + + // + // Emit an event detailing the operation status; the clientToken is included + // as an argument so that the application can correlate status events to + // the operations they are associated with. + // + this.emit('status', thingName, operationStatus, clientToken, stateObject); + }; + + device.on('connect', function() { + that.emit('connect'); + }); + device.on('close', function() { + that.emit('close'); + }); + device.on('reconnect', function() { + that.emit('reconnect'); + }); + device.on('offline', function() { + that.emit('offline'); + }); + device.on('error', function(error) { + that.emit('error', error); + }); + device.on('packetsend', function(packet) { + that.emit('packetsend', packet); + }); + device.on('packetreceive', function(packet) { + that.emit('packetreceive', packet); + }); + device.on('message', function(topic, payload) { + + if (connected === true) { + // + // Parse the topic to determine what to do with it. + // + var topicTokens = topic.split('/'); + // + // First, do a rough check to see if we should continue or not. + // + if (isThingShadowTopic(topicTokens, 'subscribe')) { + // + // This looks like a valid Thing topic, so see if the Thing is in the + // registered Thing table. + // + if (thingShadows.hasOwnProperty(topicTokens[2])) { + // + // This is a registered Thing, so perform message handling on it. + // + that._handleMessages(topicTokens[2], // thingName + topicTokens[4], // operation + topicTokens[5], // status + payload); + } + // + // Any messages received for unregistered Things fall here and are ignored. + // + } else { + // + // This isn't a Thing topic, so pass it along to the instance if they have + // indicated they want to handle it. + // + that.emit('message', topic, payload); + } + } + }); + + this._thingOperation = function(thingName, operation, stateObject) { + var rc = null; + + if (thingShadows.hasOwnProperty(thingName)) { + // + // Don't allow a new operation if an existing one is still in process. + // + if (thingShadows[thingName].pending === false) { + // + // Starting a new operation + // + thingShadows[thingName].pending = true; + // + // If not provided, construct a clientToken from the clientId and a rolling + // operation count. The clientToken is transmitted in any published stateObject + // and is returned to the caller for each operation. Applications can use + // clientToken values to correlate received responses or timeouts with + // the original operations. + // + var clientToken; + + if (isUndefined(stateObject.clientToken)) { + // + // AWS IoT restricts client tokens to 64 bytes, so use only the last 48 + // characters of the client ID when constructing a client token. + // + var clientIdLength = deviceOptions.clientId.length; + + if (clientIdLength > 48) { + clientToken = deviceOptions.clientId.substr(clientIdLength - 48) + '-' + operationCount++; + } else { + clientToken = deviceOptions.clientId + '-' + operationCount++; + } + } else { + clientToken = stateObject.clientToken; + } + // + // Remember the client token for this operation; it will be + // deleted when the operation completes or times out. + // + thingShadows[thingName].clientToken = clientToken; + + var publishTopic = buildThingShadowTopic(thingName, + operation); + // + // Subscribe to the 'accepted' and 'rejected' sub-topics for this get + // operation and set a timeout beyond which they will be unsubscribed if + // no messages have been received for either of them. + // + thingShadows[thingName].timeout = setTimeout( + function(thingName, clientToken) { + // + // Timed-out. Unsubscribe from the 'accepted' and 'rejected' sub-topics unless + // we are persistently subscribing to this thing shadow. + // + if (thingShadows[thingName].persistentSubscribe === false) { + that._handleSubscriptions(thingName, [{ + operations: [operation], + statii: ['accepted', 'rejected'] + }], 'unsubscribe'); + } + // + // Mark this operation as complete. + // + thingShadows[thingName].pending = false; + + // + // Delete the timeout handle and client token for this thingName. + // + delete thingShadows[thingName].timeout; + delete thingShadows[thingName].clientToken; + + // + // Emit an event for the timeout; the clientToken is included as an argument + // so that the application can correlate timeout events to the operations + // they are associated with. + // + that.emit('timeout', thingName, clientToken); + }, operationTimeout, + thingName, clientToken); + // + // Subscribe to the 'accepted' and 'rejected' sub-topics unless we are + // persistently subscribing, in which case we can publish to the topic immediately + // since we are already subscribed to all applicable sub-topics. + // + if (thingShadows[thingName].persistentSubscribe === false) { + this._handleSubscriptions(thingName, [{ + operations: [operation], + statii: ['accepted', 'rejected'], + }], 'subscribe', + function(err, failedTopics) { + if (!isUndefined(err) || !isUndefined(failedTopics)) { + console.warn('failed subscription to accepted/rejected topics'); + return; + } + + // + // If 'stateObject' is defined, publish it to the publish topic for this + // thingName+operation. + // + if (!isUndefined(stateObject)) { + // + // Add the version # (if known and versioning is enabled) and + // 'clientToken' properties to the stateObject. + // + if (!isUndefined(thingShadows[thingName].version) && + thingShadows[thingName].enableVersioning) { + stateObject.version = thingShadows[thingName].version; + } + stateObject.clientToken = clientToken; + + device.publish(publishTopic, + JSON.stringify(stateObject), { + qos: thingShadows[thingName].qos + }); + if (!(isUndefined(thingShadows[thingName])) && + thingShadows[thingName].debug === true) { + console.log('publishing \'' + JSON.stringify(stateObject) + + ' on \'' + publishTopic + '\''); + } + } + }); + } else { + // + // Add the version # (if known and versioning is enabled) and + // 'clientToken' properties to the stateObject. + // + if (!isUndefined(thingShadows[thingName].version) && + thingShadows[thingName].enableVersioning) { + stateObject.version = thingShadows[thingName].version; + } + stateObject.clientToken = clientToken; + + device.publish(publishTopic, + JSON.stringify(stateObject), { + qos: thingShadows[thingName].qos + }); + if (thingShadows[thingName].debug === true) { + console.log('publishing \'' + JSON.stringify(stateObject) + + ' on \'' + publishTopic + '\''); + } + } + rc = clientToken; // return the clientToken to the caller + } else { + if (deviceOptions.debug === true) { + console.error(operation + ' still in progress on thing: ', thingName); + } + } + } else { + if (deviceOptions.debug === true) { + console.error('attempting to ' + operation + ' unknown thing: ', thingName); + } + } + return rc; + }; + + this.register = function(thingName, options, callback) { + + if (!thingShadows.hasOwnProperty(thingName)) { + // + // Initialize the registration entry for this thing; because the version # is + // not yet known, do not add the property for it yet. The version number + // property will be added after the first accepted update from AWS IoT. + // + var ignoreDeltas = false; + var topicSpecs = []; + thingShadows[thingName] = { + persistentSubscribe: true, + debug: false, + discardStale: true, + enableVersioning: true, + qos: 0, + pending: true + }; + if (typeof options === 'function') { + callback = options; + options = null; + } + if (!isUndefined(options)) { + if (!isUndefined(options.ignoreDeltas)) { + ignoreDeltas = options.ignoreDeltas; + } + if (!isUndefined(options.persistentSubscribe)) { + thingShadows[thingName].persistentSubscribe = options.persistentSubscribe; + } + if (!isUndefined(options.debug)) { + thingShadows[thingName].debug = options.debug; + } + if (!isUndefined(options.discardStale)) { + thingShadows[thingName].discardStale = options.discardStale; + } + if (!isUndefined(options.enableVersioning)) { + thingShadows[thingName].enableVersioning = options.enableVersioning; + } + if (!isUndefined(options.qos)) { + thingShadows[thingName].qos = options.qos; + } + } + // + // Always listen for deltas unless requested otherwise. + // + if (ignoreDeltas === false) { + topicSpecs.push({ + operations: ['update'], + statii: ['delta'] + }); + } + // + // If we are persistently subscribing, we subscribe to everything we could ever + // possibly be interested in. This will provide us the ability to publish + // without waiting at the cost of potentially increased irrelevant traffic + // which the application will need to filter out. + // + if (thingShadows[thingName].persistentSubscribe === true) { + topicSpecs.push({ + operations: ['update', 'get', 'delete'], + statii: ['accepted', 'rejected'] + }); + } + + if (topicSpecs.length > 0) { + this._handleSubscriptions(thingName, topicSpecs, 'subscribe', function(err, failedTopics) { + if (isUndefined(err) && isUndefined(failedTopics)) { + thingShadows[thingName].pending = false; + } + if (!isUndefined(callback)) { + callback(err, failedTopics); + } + }); + } else { + thingShadows[thingName].pending = false; + if (!isUndefined(callback)) { + callback(); + } + } + + } else { + if (deviceOptions.debug === true) { + console.error('thing already registered: ', thingName); + } + } + }; + + this.unregister = function(thingName) { + if (thingShadows.hasOwnProperty(thingName)) { + var topicSpecs = []; + + // + // If an operation is outstanding, it will have a timeout set; when it + // expires any accept/reject sub-topic subscriptions for the thing will be + // deleted. If any messages arrive after the thing has been deleted, they + // will simply be ignored as it no longer exists in the thing registrations. + // The only sub-topic we need to unsubscribe from is the delta sub-topic, + // which is always active. + // + topicSpecs.push({ + operations: ['update'], + statii: ['delta'] + }); + // + // If we are persistently subscribing, we subscribe to everything we could ever + // possibly be interested in; this means that when it's time to unregister + // interest in a thing, we need to unsubscribe from all of these topics. + // + if (thingShadows[thingName].persistentSubscribe === true) { + topicSpecs.push({ + operations: ['update', 'get', 'delete'], + statii: ['accepted', 'rejected'] + }); + } + + this._handleSubscriptions(thingName, topicSpecs, 'unsubscribe'); + + // + // Delete any pending timeout + // + if (!isUndefined(thingShadows[thingName].timeout)) { + clearTimeout(thingShadows[thingName].timeout); + } + // + // Delete the thing from the Thing registrations. + // + delete thingShadows[thingName]; + } else { + if (deviceOptions.debug === true) { + console.error('attempting to unregister unknown thing: ', thingName); + } + } + }; + + // + // Perform an update operation on the given thing shadow. + // + this.update = function(thingName, stateObject) { + var rc = null; + // + // Verify that the message does not contain a property named 'version', + // as these property is reserved for use within this class. + // + if (isUndefined(stateObject.version)) { + rc = that._thingOperation(thingName, 'update', stateObject); + } else { + console.error('message can\'t contain \'version\' property'); + } + return rc; + }; + + // + // Perform a get operation on the given thing shadow; allow the user + // to specify their own client token if they don't want to use the + // default. + // + this.get = function(thingName, clientToken) { + var stateObject = {}; + if (!isUndefined(clientToken)) { + stateObject.clientToken = clientToken; + } + return that._thingOperation(thingName, 'get', stateObject); + }; + + // + // Perform a delete operation on the given thing shadow. + // + this.delete = function(thingName, clientToken) { + var stateObject = {}; + if (!isUndefined(clientToken)) { + stateObject.clientToken = clientToken; + } + return that._thingOperation(thingName, 'delete', stateObject); + }; + // + // Publish on non-thing topics. + // + this.publish = function(topic, message, options, callback) { + if (!isReservedTopic(topic)) { + device.publish(topic, message, options, callback); + } else { + throw ('cannot publish to reserved topic \'' + topic + '\''); + } + }; + + // + // Subscribe to non-thing topics. + // + this.subscribe = function(topics, options, callback) { + var topicsArray = []; + if (typeof topics === 'string') { + topicsArray.push(topics); + } else if (typeof topics === 'object' && topics.length) { + topicsArray = topics; + } + for (var i = 0; i < topicsArray.length; i++) { + if (isReservedTopic(topicsArray[i])) { + throw ('cannot subscribe to topic array since one of them is a reserved topic \'' + topicsArray[i] + '\''); + } + } + device.subscribe(topicsArray, options, callback); + }; + // + // Unsubscribe from non-thing topics. + // + this.unsubscribe = function(topics, callback) { + var topicsArray = []; + if (typeof topics === 'string') { + topicsArray.push(topics); + } else if (typeof topics === 'object' && topics.length) { + topicsArray = topics; + } + for (var i = 0; i < topicsArray.length; i++) { + if (isReservedTopic(topicsArray[i])) { + throw ('cannot unsubscribe from topic array since one of them is a reserved topic \'' + topicsArray[i] + '\''); + } + } + device.unsubscribe(topicsArray, callback); + }; + // + // Close the device connection; this will be passed through to + // the device class. + // + this.end = function(force, callback) { + device.end(force, callback); + }; + // + // Call this function to update the credentials used when + // connecting via WebSocket/SigV4; this will be passed through + // to the device class. + // + this.updateWebSocketCredentials = function(accessKeyId, secretKey, sessionToken, expiration) { + device.updateWebSocketCredentials(accessKeyId, secretKey, sessionToken, expiration); + }; + // + // Call this function to update the custom auth headers + // This will be passed through to the device class + // + this.updateCustomAuthHeaders = function(newHeaders) { + device.updateCustomAuthHeaders(newHeaders); + }; + + // + // This is an unpublished API used for testing. + // + this.setConnectionStatus = function(connectionStatus) { + connected = connectionStatus; + }; + events.EventEmitter.call(this); +} + +// +// Allow instances to listen in on events that we produce for them +// +inherits(ThingShadowsClient, events.EventEmitter); + +module.exports = ThingShadowsClient; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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__(0), + 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) +}; + +/***/ }), + +/***/ 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; + 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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__(36456); + 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; + 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); + 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']); +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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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__(29668); + 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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']); +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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 0: +/***/ ((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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 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'); + } + + 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]; + } + } + + 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 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' + */ +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'. + */ + 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' + }, + + /** + * 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.830.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__(39925); +__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'], 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 10 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; + } + } + + 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.')); + } + } 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); + } + 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); + } + + 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); + } +}; + +/** + * @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'); + } + 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' + ); + } + + 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; + } + + if (number < 0) { + negate(bytes); + } + + 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); + } + + 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; + } + for (var i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) { + break; + } + } +} + +/** + * @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); + }); + + 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(), + { + 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 + + '\'. 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() { + if (connectTimeoutId) { + clearTimeout(connectTimeoutId); + connectTimeoutId = null; + } + if (stream.didCallback) return; stream.didCallback = true; + errCallback.apply(stream, arguments); + }); + + var expect = httpRequest.headers.Expect || httpRequest.headers.expect; + if (expect === '100-continue') { + stream.on('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) { + 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; + + 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; + +/** + * 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 hostname of the instance metadata service + */ + host: '169.254.169.254', + + /** + * @!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) { + 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 || '/'; + var httpRequest = new AWS.HttpRequest('http://' + this.host + 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; + + +/***/ }), + +/***/ 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' + ); + + 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; }); + } + + 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); + +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; + +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(); } +]; + +// 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 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 = iniLoader.loadFrom(toCheck.shift()); + var profile = configFile[env.AWS_PROFILE || AWS.util.defaultProfile]; + region = profile && profile.region; + } + } + return region; + } +}); + +// 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 (params === undefined) return; + + if (payloadShape.type === 'structure') { + req.httpRequest.body = builder.build(params, payloadShape); + applyContentTypeHeader(req); + } else { // non-JSON payload + req.httpRequest.body = params; + if (payloadShape.type === 'binary' || payloadShape.isStreaming) { + applyContentTypeHeader(req, true); + } + } + } else { + var body = builder.build(req.params, input); + if (body !== '{}' || req.httpRequest.method !== 'GET') { //don't send empty body for GET method + req.httpRequest.body = body; + } + applyContentTypeHeader(req); + } +} + +function applyContentTypeHeader(req, isBinary) { + var operation = req.service.api.operations[req.operation]; + var input = operation.input; + + 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 HEAD/DELETE + if (['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); + } +}; + + +/***/ }), + +/***/ 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); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!key) continue; + + if (Object.prototype.hasOwnProperty.call(regionConfig.rules, key)) { + var config = regionConfig.rules[key]; + if (typeof config === 'string') { + config = regionConfig.patterns[config]; + } + + // set dualstack endpoint + if (service.config.useDualstack && util.isDualstackAvailable(service)) { + config = util.copy(config); + config.endpoint = config.endpoint.replace( + /{service}\.({region}\.)?/, + '{service}.dualstack.{region}.' + ); + } + + // 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.isGlobalEndpoint) { + if (service.signingRegion) { + region = service.signingRegion; + } else { + 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); + + +/***/ }), + +/***/ 39925: +/***/ ((__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 { + var service = self.service; + var config = AWS.util.copy(service._originalConfig || {}); + config.signatureVersion = service.getSignatureVersion(); + self.service = new service.constructor.__super__(config); + self.service.config.params = + AWS.util.merge(self.service.config.params || {}, params); + } + }, + + /** + * @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; + +/** + * 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'); + } + 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; + } + +}); + + +/***/ }), + +/***/ 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); + } + } + +}); + + +/***/ }), + +/***/ 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); +__nccwpck_require__(16612); + /** + * @api private + */ + var crossRegionOperations = ['copyDBSnapshot', 'createDBInstanceReadReplica', 'createDBCluster', 'copyDBClusterSnapshot', 'startDBInstanceAutomatedBackupsReplication']; + + AWS.util.update(AWS.RDS.prototype, { + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + if (crossRegionOperations.indexOf(request.operation) !== -1 && + request.params.SourceRegion) { + request.params = AWS.util.copy(request.params); + if (request.params.PreSignedUrl || + request.params.SourceRegion === this.config.region) { + delete request.params.SourceRegion; + } else { + var doesParamValidation = !!this.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', this.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(); + } + }); + } + }); + + +/***/ }), + +/***/ 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); + } + } +}); + + +/***/ }), + +/***/ 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 + ]; + +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() { + var _super = AWS.Service.prototype.getSigningName; + return (this._parsedArn && this._parsedArn.service) + ? this._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.service._parsedArn = AWS.util.ARN.parse(request.params.Bucket); + + request.removeListener('validate', this.validateBucketName); + request.removeListener('build', this.populateURI); + if (request.service._parsedArn.service === 's3') { + request.addListener('validate', s3util.validateS3AccessPointArn); + request.addListener('validate', this.validateArnResourceType); + } else if (request.service._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 }); + } + }, + + /** + * Validate resource-type supplied in S3 ARN + */ + validateArnResourceType: function validateArnResourceType(req) { + var resource = req.service._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.useDualstack) { + 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.service._parsedArn; + + var isOutpostArn = accessPointArn.service === 's3-outposts'; + + var outpostsSuffix = isOutpostArn ? '.' + accessPointArn.outpostId: ''; + var serviceName = isOutpostArn ? 's3-outposts': 's3-accesspoint'; + var dualStackSuffix = !isOutpostArn && req.service.config.useDualstack ? '.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 + dualStackSuffix, + 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); + } + } + }, + + /** + * @api private + */ + computableChecksumOperations: { + putBucketCors: true, + putBucketLifecycle: true, + putBucketLifecycleConfiguration: true, + putBucketTagging: true, + deleteObjects: true, + putBucketReplication: true, + putObjectLegalHold: true, + putObjectRetention: true, + putObjectLockConfiguration: true + }, + + /** + * Checks whether checksums should be computed for the request. + * If the request requires checksums to be computed, this will always + * return true, otherwise 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) { + if (this.computableChecksumOperations[req.operation]) return true; + if (!this.config.computeChecksums) return false; + + // TODO: compute checksums for Stream objects + if (!AWS.util.Buffer.isBuffer(req.httpRequest.body) && + typeof req.httpRequest.body !== 'string') { + return false; + } + + var rules = req.service.api.operations[req.operation].input.members; + + // Sha256 signing disabled, and not a presigned url + if (req.service.shouldDisableBodySigning(req) && !Object.prototype.hasOwnProperty.call(req.httpRequest.headers, 'presigned-expires')) { + if (rules.ContentMD5 && !req.params.ContentMD5) { + return true; + } + } + + // V4 signer uses SHA256 signatures so only compute MD5 if it is required + if (req.service.getSignerClass(req) === AWS.Signers.V4) { + if (rules.ContentMD5 && !rules.ContentMD5.required) return false; + } + + if (rules.ContentMD5 && !req.params.ContentMD5) return true; + }, + + /** + * A listener that computes the Content-MD5 and sets it in the header. + * @see AWS.S3.willComputeChecksums + * @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); + }, + + /** + * @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.service._parsedArn = AWS.util.ARN.parse(request.params['Bucket']); + request.service.signingName = request.service._parsedArn.service; + request.addListener('validate', this.validateOutpostsBucketArn); + request.addListener('validate', s3util.validateOutpostsArn); + request.addListener('afterBuild', this.addOutpostIdHeader); + } else if (isArnInName) { + request.service._parsedArn = AWS.util.ARN.parse(request.params['Name']); + request.service.signingName = request.service._parsedArn.service; + request.addListener('validate', s3util.validateOutpostsAccessPointArn); + request.addListener('validate', s3util.validateOutpostsArn); + request.addListener('afterBuild', this.addOutpostIdHeader); + } + + if (isArnInBucket || isArnInName) { + request.addListener('validate', s3util.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.service.signingName = 's3-outposts'; + request.addListener('build', this.populateEndpointForOutpostId); + } + }, + + /** + * Adds outpostId header + */ + addOutpostIdHeader: function addOutpostIdHeader(req) { + req.httpRequest.headers['x-amz-outpost-id'] = req.service._parsedArn.outpostId; + }, + + /** + * Validate Outposts ARN supplied in Bucket parameter is a valid bucket name + */ + validateOutpostsBucketArn: function validateOutpostsBucketArn(req) { + var parsedArn = req.service._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.service._parsedArn.bucket = bucket; + }, + + /** + * @api private + */ + populateParamFromArn: function populateParamFromArn(req) { + var parsedArn = req.service._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.service._parsedArn; + + var endpoint = req.httpRequest.endpoint; + var useArnRegion = req.service.config.s3UseArnRegion; + + endpoint.hostname = [ + 's3-outposts', + 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; + endpoint.hostname = [ + 's3-outposts', + 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 + */ + validateArnAccountWithParams: function validateArnAccountWithParams(req) { + var params = req.params; + var inputModel = req.service.api.operations[req.operation].input; + if (inputModel.members.AccountId) { + var parsedArn = req.service._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() { + var _super = AWS.Service.prototype.getSigningName; + return (this.signingName) + ? this.signingName + : _super.call(this); + }, +}); + + +/***/ }), + +/***/ 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.service._parsedArn; + + if (parsedArn.service !== 's3' && parsedArn.service !== 's3-outposts') { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'expect \'s3\' or \'s3-outposts\' in ARN service component' + }); + } + }, + + /** + * Validate account ID from ARN supplied in Bucket parameter is a valid account + */ + validateArnAccount: function validateArnAccount(req) { + var parsedArn = req.service._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.service._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.service._parsedArn.accessPoint = accessPoint; + }, + + /** + * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN + */ + validateOutpostsArn: function validateOutpostsArn(req) { + var parsedArn = req.service._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.service._parsedArn.outpostId = outpostId; + }, + + /** + * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN + */ + validateOutpostsAccessPointArn: function validateOutpostsAccessPointArn(req) { + var parsedArn = req.service._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.service._parsedArn.accessPoint = accessPoint; + }, + + /** + * Validate region field in ARN supplied in Bucket parameter is a valid region + */ + validateArnRegion: function validateArnRegion(req) { + var useArnRegion = s3util.loadUseArnRegionConfig(req); + var regionFromArn = req.service._parsedArn.region; + var clientRegion = req.service.config.region; + + if (!regionFromArn) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'ARN region is empty' + }); + } + + if ( + clientRegion.indexOf('fips') >= 0 || + regionFromArn.indexOf('fips') >= 0 + ) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: 'ARN endpoint is not compatible with FIPS region' + }); + } + + 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.service._parsedArn.service === 's3-outposts' && req.service.config.useDualstack) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: 'useDualstack config 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() && this.serviceName === 's3' && !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__(71062).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, '>'); +} + +/** + * @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 +}; + + +/***/ }), + +/***/ 71062: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var v1 = __nccwpck_require__(68207); +var v4 = __nccwpck_require__(54151); + +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; + +module.exports = uuid; + + +/***/ }), + +/***/ 50367: +/***/ ((module) => { + +/** + * 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); +} + +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(''); +} + +module.exports = bytesToUuid; + + +/***/ }), + +/***/ 91734: +/***/ ((module, __unused_webpack_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); +}; + + +/***/ }), + +/***/ 68207: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var rng = __nccwpck_require__(91734); +var bytesToUuid = __nccwpck_require__(50367); + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +var _nodeId; +var _clockseq; + +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; + +// See https://github.com/broofa/node-uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + 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 + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; + } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + 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 + // 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; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf ? buf : bytesToUuid(b); +} + +module.exports = v1; + + +/***/ }), + +/***/ 54151: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var rng = __nccwpck_require__(91734); +var bytesToUuid = __nccwpck_require__(50367); + +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; + + +/***/ }), + +/***/ 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(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 = 0; i < records.length; i++) { + var record = records[i]; + if (record.Expire < now) { + 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; + +/***/ }), + +/***/ 77710: +/***/ ((__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 + }); + LRUCache.prototype.prependToList = function (node) { + if (!this.headerNode) { + this.tailNode = node; + } + else { + this.headerNode.prev = node; + node.next = this.headerNode; + } + 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; + +/***/ }), + +/***/ 33086: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var Backoff = __nccwpck_require__(18845); +var ExponentialBackoffStrategy = __nccwpck_require__(86059); +var FibonacciBackoffStrategy = __nccwpck_require__(77267); +var FunctionCall = __nccwpck_require__(5237); + +module.exports.Backoff = Backoff; +module.exports.FunctionCall = FunctionCall; +module.exports.FibonacciStrategy = FibonacciBackoffStrategy; +module.exports.ExponentialStrategy = ExponentialBackoffStrategy; + +// Constructs a Fibonacci backoff. +module.exports.fibonacci = function(options) { + return new Backoff(new FibonacciBackoffStrategy(options)); +}; + +// Constructs an exponential backoff. +module.exports.exponential = function(options) { + return new Backoff(new ExponentialBackoffStrategy(options)); +}; + +// Constructs a FunctionCall for the given function and arguments. +module.exports.call = function(fn, vargs, callback) { + var args = Array.prototype.slice.call(arguments); + fn = args[0]; + vargs = args.slice(1, args.length - 1); + callback = args[args.length - 1]; + return new FunctionCall(fn, vargs, callback); +}; + + +/***/ }), + +/***/ 18845: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var events = __nccwpck_require__(28614); +var precond = __nccwpck_require__(21231); +var util = __nccwpck_require__(31669); + +// A class to hold the state of a backoff operation. Accepts a backoff strategy +// to generate the backoff delays. +function Backoff(backoffStrategy) { + events.EventEmitter.call(this); + + this.backoffStrategy_ = backoffStrategy; + this.maxNumberOfRetry_ = -1; + this.backoffNumber_ = 0; + this.backoffDelay_ = 0; + this.timeoutID_ = -1; + + this.handlers = { + backoff: this.onBackoff_.bind(this) + }; +} +util.inherits(Backoff, events.EventEmitter); + +// Sets a limit, greater than 0, on the maximum number of backoffs. A 'fail' +// event will be emitted when the limit is reached. +Backoff.prototype.failAfter = function(maxNumberOfRetry) { + precond.checkArgument(maxNumberOfRetry > 0, + 'Expected a maximum number of retry greater than 0 but got %s.', + maxNumberOfRetry); + + this.maxNumberOfRetry_ = maxNumberOfRetry; +}; + +// Starts a backoff operation. Accepts an optional parameter to let the +// listeners know why the backoff operation was started. +Backoff.prototype.backoff = function(err) { + precond.checkState(this.timeoutID_ === -1, 'Backoff in progress.'); + + if (this.backoffNumber_ === this.maxNumberOfRetry_) { + this.emit('fail', err); + this.reset(); + } else { + this.backoffDelay_ = this.backoffStrategy_.next(); + this.timeoutID_ = setTimeout(this.handlers.backoff, this.backoffDelay_); + this.emit('backoff', this.backoffNumber_, this.backoffDelay_, err); + } +}; + +// Handles the backoff timeout completion. +Backoff.prototype.onBackoff_ = function() { + this.timeoutID_ = -1; + this.emit('ready', this.backoffNumber_, this.backoffDelay_); + this.backoffNumber_++; +}; + +// Stops any backoff operation and resets the backoff delay to its inital value. +Backoff.prototype.reset = function() { + this.backoffNumber_ = 0; + this.backoffStrategy_.reset(); + clearTimeout(this.timeoutID_); + this.timeoutID_ = -1; +}; + +module.exports = Backoff; + + +/***/ }), + +/***/ 5237: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var events = __nccwpck_require__(28614); +var precond = __nccwpck_require__(21231); +var util = __nccwpck_require__(31669); + +var Backoff = __nccwpck_require__(18845); +var FibonacciBackoffStrategy = __nccwpck_require__(77267); + +// Wraps a function to be called in a backoff loop. +function FunctionCall(fn, args, callback) { + events.EventEmitter.call(this); + + precond.checkIsFunction(fn, 'Expected fn to be a function.'); + precond.checkIsArray(args, 'Expected args to be an array.'); + precond.checkIsFunction(callback, 'Expected callback to be a function.'); + + this.function_ = fn; + this.arguments_ = args; + this.callback_ = callback; + this.lastResult_ = []; + this.numRetries_ = 0; + + this.backoff_ = null; + this.strategy_ = null; + this.failAfter_ = -1; + this.retryPredicate_ = FunctionCall.DEFAULT_RETRY_PREDICATE_; + + this.state_ = FunctionCall.State_.PENDING; +} +util.inherits(FunctionCall, events.EventEmitter); + +// States in which the call can be. +FunctionCall.State_ = { + // Call isn't started yet. + PENDING: 0, + // Call is in progress. + RUNNING: 1, + // Call completed successfully which means that either the wrapped function + // returned successfully or the maximal number of backoffs was reached. + COMPLETED: 2, + // The call was aborted. + ABORTED: 3 +}; + +// The default retry predicate which considers any error as retriable. +FunctionCall.DEFAULT_RETRY_PREDICATE_ = function(err) { + return true; +}; + +// Checks whether the call is pending. +FunctionCall.prototype.isPending = function() { + return this.state_ == FunctionCall.State_.PENDING; +}; + +// Checks whether the call is in progress. +FunctionCall.prototype.isRunning = function() { + return this.state_ == FunctionCall.State_.RUNNING; +}; + +// Checks whether the call is completed. +FunctionCall.prototype.isCompleted = function() { + return this.state_ == FunctionCall.State_.COMPLETED; +}; + +// Checks whether the call is aborted. +FunctionCall.prototype.isAborted = function() { + return this.state_ == FunctionCall.State_.ABORTED; +}; + +// Sets the backoff strategy to use. Can only be called before the call is +// started otherwise an exception will be thrown. +FunctionCall.prototype.setStrategy = function(strategy) { + precond.checkState(this.isPending(), 'FunctionCall in progress.'); + this.strategy_ = strategy; + return this; // Return this for chaining. +}; + +// Sets the predicate which will be used to determine whether the errors +// returned from the wrapped function should be retried or not, e.g. a +// network error would be retriable while a type error would stop the +// function call. +FunctionCall.prototype.retryIf = function(retryPredicate) { + precond.checkState(this.isPending(), 'FunctionCall in progress.'); + this.retryPredicate_ = retryPredicate; + return this; +}; + +// Returns all intermediary results returned by the wrapped function since +// the initial call. +FunctionCall.prototype.getLastResult = function() { + return this.lastResult_.concat(); +}; + +// Returns the number of times the wrapped function call was retried. +FunctionCall.prototype.getNumRetries = function() { + return this.numRetries_; +}; + +// Sets the backoff limit. +FunctionCall.prototype.failAfter = function(maxNumberOfRetry) { + precond.checkState(this.isPending(), 'FunctionCall in progress.'); + this.failAfter_ = maxNumberOfRetry; + return this; // Return this for chaining. +}; + +// Aborts the call. +FunctionCall.prototype.abort = function() { + if (this.isCompleted() || this.isAborted()) { + return; + } + + if (this.isRunning()) { + this.backoff_.reset(); + } + + this.state_ = FunctionCall.State_.ABORTED; + this.lastResult_ = [new Error('Backoff aborted.')]; + this.emit('abort'); + this.doCallback_(); +}; + +// Initiates the call to the wrapped function. Accepts an optional factory +// function used to create the backoff instance; used when testing. +FunctionCall.prototype.start = function(backoffFactory) { + precond.checkState(!this.isAborted(), 'FunctionCall is aborted.'); + precond.checkState(this.isPending(), 'FunctionCall already started.'); + + var strategy = this.strategy_ || new FibonacciBackoffStrategy(); + + this.backoff_ = backoffFactory ? + backoffFactory(strategy) : + new Backoff(strategy); + + this.backoff_.on('ready', this.doCall_.bind(this, true /* isRetry */)); + this.backoff_.on('fail', this.doCallback_.bind(this)); + this.backoff_.on('backoff', this.handleBackoff_.bind(this)); + + if (this.failAfter_ > 0) { + this.backoff_.failAfter(this.failAfter_); + } + + this.state_ = FunctionCall.State_.RUNNING; + this.doCall_(false /* isRetry */); +}; + +// Calls the wrapped function. +FunctionCall.prototype.doCall_ = function(isRetry) { + if (isRetry) { + this.numRetries_++; + } + var eventArgs = ['call'].concat(this.arguments_); + events.EventEmitter.prototype.emit.apply(this, eventArgs); + var callback = this.handleFunctionCallback_.bind(this); + this.function_.apply(null, this.arguments_.concat(callback)); +}; + +// Calls the wrapped function's callback with the last result returned by the +// wrapped function. +FunctionCall.prototype.doCallback_ = function() { + this.callback_.apply(null, this.lastResult_); +}; + +// Handles wrapped function's completion. This method acts as a replacement +// for the original callback function. +FunctionCall.prototype.handleFunctionCallback_ = function() { + if (this.isAborted()) { + return; + } + + var args = Array.prototype.slice.call(arguments); + this.lastResult_ = args; // Save last callback arguments. + events.EventEmitter.prototype.emit.apply(this, ['callback'].concat(args)); + + var err = args[0]; + if (err && this.retryPredicate_(err)) { + this.backoff_.backoff(err); + } else { + this.state_ = FunctionCall.State_.COMPLETED; + this.doCallback_(); + } +}; + +// Handles the backoff event by reemitting it. +FunctionCall.prototype.handleBackoff_ = function(number, delay, err) { + this.emit('backoff', number, delay, err); +}; + +module.exports = FunctionCall; + + +/***/ }), + +/***/ 86059: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var util = __nccwpck_require__(31669); +var precond = __nccwpck_require__(21231); + +var BackoffStrategy = __nccwpck_require__(97104); + +// Exponential backoff strategy. +function ExponentialBackoffStrategy(options) { + BackoffStrategy.call(this, options); + this.backoffDelay_ = 0; + this.nextBackoffDelay_ = this.getInitialDelay(); + this.factor_ = ExponentialBackoffStrategy.DEFAULT_FACTOR; + + if (options && options.factor !== undefined) { + precond.checkArgument(options.factor > 1, + 'Exponential factor should be greater than 1 but got %s.', + options.factor); + this.factor_ = options.factor; + } +} +util.inherits(ExponentialBackoffStrategy, BackoffStrategy); + +// Default multiplication factor used to compute the next backoff delay from +// the current one. The value can be overridden by passing a custom factor as +// part of the options. +ExponentialBackoffStrategy.DEFAULT_FACTOR = 2; + +ExponentialBackoffStrategy.prototype.next_ = function() { + this.backoffDelay_ = Math.min(this.nextBackoffDelay_, this.getMaxDelay()); + this.nextBackoffDelay_ = this.backoffDelay_ * this.factor_; + return this.backoffDelay_; +}; + +ExponentialBackoffStrategy.prototype.reset_ = function() { + this.backoffDelay_ = 0; + this.nextBackoffDelay_ = this.getInitialDelay(); +}; + +module.exports = ExponentialBackoffStrategy; + + +/***/ }), + +/***/ 77267: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var util = __nccwpck_require__(31669); + +var BackoffStrategy = __nccwpck_require__(97104); + +// Fibonacci backoff strategy. +function FibonacciBackoffStrategy(options) { + BackoffStrategy.call(this, options); + this.backoffDelay_ = 0; + this.nextBackoffDelay_ = this.getInitialDelay(); +} +util.inherits(FibonacciBackoffStrategy, BackoffStrategy); + +FibonacciBackoffStrategy.prototype.next_ = function() { + var backoffDelay = Math.min(this.nextBackoffDelay_, this.getMaxDelay()); + this.nextBackoffDelay_ += this.backoffDelay_; + this.backoffDelay_ = backoffDelay; + return backoffDelay; +}; + +FibonacciBackoffStrategy.prototype.reset_ = function() { + this.nextBackoffDelay_ = this.getInitialDelay(); + this.backoffDelay_ = 0; +}; + +module.exports = FibonacciBackoffStrategy; + + +/***/ }), + +/***/ 97104: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var events = __nccwpck_require__(28614); +var util = __nccwpck_require__(31669); + +function isDef(value) { + return value !== undefined && value !== null; +} + +// Abstract class defining the skeleton for the backoff strategies. Accepts an +// object holding the options for the backoff strategy: +// +// * `randomisationFactor`: The randomisation factor which must be between 0 +// and 1 where 1 equates to a randomization factor of 100% and 0 to no +// randomization. +// * `initialDelay`: The backoff initial delay in milliseconds. +// * `maxDelay`: The backoff maximal delay in milliseconds. +function BackoffStrategy(options) { + options = options || {}; + + if (isDef(options.initialDelay) && options.initialDelay < 1) { + throw new Error('The initial timeout must be greater than 0.'); + } else if (isDef(options.maxDelay) && options.maxDelay < 1) { + throw new Error('The maximal timeout must be greater than 0.'); + } + + this.initialDelay_ = options.initialDelay || 100; + this.maxDelay_ = options.maxDelay || 10000; + + if (this.maxDelay_ <= this.initialDelay_) { + throw new Error('The maximal backoff delay must be ' + + 'greater than the initial backoff delay.'); + } + + if (isDef(options.randomisationFactor) && + (options.randomisationFactor < 0 || options.randomisationFactor > 1)) { + throw new Error('The randomisation factor must be between 0 and 1.'); + } + + this.randomisationFactor_ = options.randomisationFactor || 0; +} + +// Gets the maximal backoff delay. +BackoffStrategy.prototype.getMaxDelay = function() { + return this.maxDelay_; +}; + +// Gets the initial backoff delay. +BackoffStrategy.prototype.getInitialDelay = function() { + return this.initialDelay_; +}; + +// Template method that computes and returns the next backoff delay in +// milliseconds. +BackoffStrategy.prototype.next = function() { + var backoffDelay = this.next_(); + var randomisationMultiple = 1 + Math.random() * this.randomisationFactor_; + var randomizedDelay = Math.round(backoffDelay * randomisationMultiple); + return randomizedDelay; +}; + +// Computes and returns the next backoff delay. Intended to be overridden by +// subclasses. +BackoffStrategy.prototype.next_ = function() { + throw new Error('BackoffStrategy.next_() unimplemented.'); +}; + +// Template method that resets the backoff delay to its initial value. +BackoffStrategy.prototype.reset = function() { + this.reset_(); +}; + +// Resets the backoff delay to its initial value. Intended to be overridden by +// subclasses. +BackoffStrategy.prototype.reset_ = function() { + throw new Error('BackoffStrategy.reset_() unimplemented.'); +}; + +module.exports = BackoffStrategy; + + +/***/ }), + +/***/ 9417: +/***/ ((module) => { + +"use strict"; + +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} + + +/***/ }), + +/***/ 35490: +/***/ ((module) => { + +"use strict"; + +module.exports = function(Promise) { +var SomePromiseArray = Promise._SomePromiseArray; +function any(promises) { + var ret = new SomePromiseArray(promises); + var promise = ret.promise(); + ret.setHowMany(1); + ret.setUnwrap(); + ret.init(); + return promise; +} + +Promise.any = function (promises) { + return any(promises); +}; + +Promise.prototype.any = function () { + return any(this); +}; + +}; + + +/***/ }), + +/***/ 38061: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var firstLineError; +try {throw new Error(); } catch (e) {firstLineError = e;} +var schedule = __nccwpck_require__(76203); +var Queue = __nccwpck_require__(30878); + +function Async() { + this._customScheduler = false; + this._isTickUsed = false; + this._lateQueue = new Queue(16); + this._normalQueue = new Queue(16); + this._haveDrainedQueues = false; + var self = this; + this.drainQueues = function () { + self._drainQueues(); + }; + this._schedule = schedule; +} + +Async.prototype.setScheduler = function(fn) { + var prev = this._schedule; + this._schedule = fn; + this._customScheduler = true; + return prev; +}; + +Async.prototype.hasCustomScheduler = function() { + return this._customScheduler; +}; + +Async.prototype.haveItemsQueued = function () { + return this._isTickUsed || this._haveDrainedQueues; +}; + + +Async.prototype.fatalError = function(e, isNode) { + if (isNode) { + process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) + + "\n"); + process.exit(2); + } else { + this.throwLater(e); + } +}; + +Async.prototype.throwLater = function(fn, arg) { + if (arguments.length === 1) { + arg = fn; + fn = function () { throw arg; }; + } + if (typeof setTimeout !== "undefined") { + setTimeout(function() { + fn(arg); + }, 0); + } else try { + this._schedule(function() { + fn(arg); + }); + } catch (e) { + throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } +}; + +function AsyncInvokeLater(fn, receiver, arg) { + this._lateQueue.push(fn, receiver, arg); + this._queueTick(); +} + +function AsyncInvoke(fn, receiver, arg) { + this._normalQueue.push(fn, receiver, arg); + this._queueTick(); +} + +function AsyncSettlePromises(promise) { + this._normalQueue._pushOne(promise); + this._queueTick(); +} + +Async.prototype.invokeLater = AsyncInvokeLater; +Async.prototype.invoke = AsyncInvoke; +Async.prototype.settlePromises = AsyncSettlePromises; + + +function _drainQueue(queue) { + while (queue.length() > 0) { + _drainQueueStep(queue); + } +} + +function _drainQueueStep(queue) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + } else { + var receiver = queue.shift(); + var arg = queue.shift(); + fn.call(receiver, arg); + } +} + +Async.prototype._drainQueues = function () { + _drainQueue(this._normalQueue); + this._reset(); + this._haveDrainedQueues = true; + _drainQueue(this._lateQueue); +}; + +Async.prototype._queueTick = function () { + if (!this._isTickUsed) { + this._isTickUsed = true; + this._schedule(this.drainQueues); + } +}; + +Async.prototype._reset = function () { + this._isTickUsed = false; +}; + +module.exports = Async; +module.exports.firstLineError = firstLineError; + + +/***/ }), + +/***/ 13767: +/***/ ((module) => { + +"use strict"; + +module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) { +var calledBind = false; +var rejectThis = function(_, e) { + this._reject(e); +}; + +var targetRejected = function(e, context) { + context.promiseRejectionQueued = true; + context.bindingPromise._then(rejectThis, rejectThis, null, this, e); +}; + +var bindingResolved = function(thisArg, context) { + if (((this._bitField & 50397184) === 0)) { + this._resolveCallback(context.target); + } +}; + +var bindingRejected = function(e, context) { + if (!context.promiseRejectionQueued) this._reject(e); +}; + +Promise.prototype.bind = function (thisArg) { + if (!calledBind) { + calledBind = true; + Promise.prototype._propagateFrom = debug.propagateFromFunction(); + Promise.prototype._boundValue = debug.boundValueFunction(); + } + var maybePromise = tryConvertToPromise(thisArg); + var ret = new Promise(INTERNAL); + ret._propagateFrom(this, 1); + var target = this._target(); + ret._setBoundTo(maybePromise); + if (maybePromise instanceof Promise) { + var context = { + promiseRejectionQueued: false, + promise: ret, + target: target, + bindingPromise: maybePromise + }; + target._then(INTERNAL, targetRejected, undefined, ret, context); + maybePromise._then( + bindingResolved, bindingRejected, undefined, ret, context); + ret._setOnCancel(maybePromise); + } else { + ret._resolveCallback(target); + } + return ret; +}; + +Promise.prototype._setBoundTo = function (obj) { + if (obj !== undefined) { + this._bitField = this._bitField | 2097152; + this._boundTo = obj; + } else { + this._bitField = this._bitField & (~2097152); + } +}; + +Promise.prototype._isBound = function () { + return (this._bitField & 2097152) === 2097152; +}; + +Promise.bind = function (thisArg, value) { + return Promise.resolve(value).bind(thisArg); +}; +}; + + +/***/ }), + +/***/ 78710: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var old; +if (typeof Promise !== "undefined") old = Promise; +function noConflict() { + try { if (Promise === bluebird) Promise = old; } + catch (e) {} + return bluebird; +} +var bluebird = __nccwpck_require__(63694)(); +bluebird.noConflict = noConflict; +module.exports = bluebird; + + +/***/ }), + +/***/ 70924: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var cr = Object.create; +if (cr) { + var callerCache = cr(null); + var getterCache = cr(null); + callerCache[" size"] = getterCache[" size"] = 0; +} + +module.exports = function(Promise) { +var util = __nccwpck_require__(37448); +var canEvaluate = util.canEvaluate; +var isIdentifier = util.isIdentifier; + +var getMethodCaller; +var getGetter; +if (true) { +var makeMethodCaller = function (methodName) { + return new Function("ensureMethod", " \n\ + return function(obj) { \n\ + 'use strict' \n\ + var len = this.length; \n\ + ensureMethod(obj, 'methodName'); \n\ + switch(len) { \n\ + case 1: return obj.methodName(this[0]); \n\ + case 2: return obj.methodName(this[0], this[1]); \n\ + case 3: return obj.methodName(this[0], this[1], this[2]); \n\ + case 0: return obj.methodName(); \n\ + default: \n\ + return obj.methodName.apply(obj, this); \n\ + } \n\ + }; \n\ + ".replace(/methodName/g, methodName))(ensureMethod); +}; + +var makeGetter = function (propertyName) { + return new Function("obj", " \n\ + 'use strict'; \n\ + return obj.propertyName; \n\ + ".replace("propertyName", propertyName)); +}; + +var getCompiled = function(name, compiler, cache) { + var ret = cache[name]; + if (typeof ret !== "function") { + if (!isIdentifier(name)) { + return null; + } + ret = compiler(name); + cache[name] = ret; + cache[" size"]++; + if (cache[" size"] > 512) { + var keys = Object.keys(cache); + for (var i = 0; i < 256; ++i) delete cache[keys[i]]; + cache[" size"] = keys.length - 256; + } + } + return ret; +}; + +getMethodCaller = function(name) { + return getCompiled(name, makeMethodCaller, callerCache); +}; + +getGetter = function(name) { + return getCompiled(name, makeGetter, getterCache); +}; +} + +function ensureMethod(obj, methodName) { + var fn; + if (obj != null) fn = obj[methodName]; + if (typeof fn !== "function") { + var message = "Object " + util.classString(obj) + " has no method '" + + util.toString(methodName) + "'"; + throw new Promise.TypeError(message); + } + return fn; +} + +function caller(obj) { + var methodName = this.pop(); + var fn = ensureMethod(obj, methodName); + return fn.apply(obj, this); +} +Promise.prototype.call = function (methodName) { + var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}; + if (true) { + if (canEvaluate) { + var maybeCaller = getMethodCaller(methodName); + if (maybeCaller !== null) { + return this._then( + maybeCaller, undefined, undefined, args, undefined); + } + } + } + args.push(methodName); + return this._then(caller, undefined, undefined, args, undefined); +}; + +function namedGetter(obj) { + return obj[this]; +} +function indexedGetter(obj) { + var index = +this; + if (index < 0) index = Math.max(0, index + obj.length); + return obj[index]; +} +Promise.prototype.get = function (propertyName) { + var isIndex = (typeof propertyName === "number"); + var getter; + if (!isIndex) { + if (canEvaluate) { + var maybeGetter = getGetter(propertyName); + getter = maybeGetter !== null ? maybeGetter : namedGetter; + } else { + getter = namedGetter; + } + } else { + getter = indexedGetter; + } + return this._then(getter, undefined, undefined, propertyName, undefined); +}; +}; + + +/***/ }), + +/***/ 6616: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise, PromiseArray, apiRejection, debug) { +var util = __nccwpck_require__(37448); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +Promise.prototype["break"] = Promise.prototype.cancel = function() { + if (!debug.cancellation()) return this._warn("cancellation is disabled"); + + var promise = this; + var child = promise; + while (promise._isCancellable()) { + if (!promise._cancelBy(child)) { + if (child._isFollowing()) { + child._followee().cancel(); + } else { + child._cancelBranched(); + } + break; + } + + var parent = promise._cancellationParent; + if (parent == null || !parent._isCancellable()) { + if (promise._isFollowing()) { + promise._followee().cancel(); + } else { + promise._cancelBranched(); + } + break; + } else { + if (promise._isFollowing()) promise._followee().cancel(); + promise._setWillBeCancelled(); + child = promise; + promise = parent; + } + } +}; + +Promise.prototype._branchHasCancelled = function() { + this._branchesRemainingToCancel--; +}; + +Promise.prototype._enoughBranchesHaveCancelled = function() { + return this._branchesRemainingToCancel === undefined || + this._branchesRemainingToCancel <= 0; +}; + +Promise.prototype._cancelBy = function(canceller) { + if (canceller === this) { + this._branchesRemainingToCancel = 0; + this._invokeOnCancel(); + return true; + } else { + this._branchHasCancelled(); + if (this._enoughBranchesHaveCancelled()) { + this._invokeOnCancel(); + return true; + } + } + return false; +}; + +Promise.prototype._cancelBranched = function() { + if (this._enoughBranchesHaveCancelled()) { + this._cancel(); + } +}; + +Promise.prototype._cancel = function() { + if (!this._isCancellable()) return; + this._setCancelled(); + async.invoke(this._cancelPromises, this, undefined); +}; + +Promise.prototype._cancelPromises = function() { + if (this._length() > 0) this._settlePromises(); +}; + +Promise.prototype._unsetOnCancel = function() { + this._onCancelField = undefined; +}; + +Promise.prototype._isCancellable = function() { + return this.isPending() && !this._isCancelled(); +}; + +Promise.prototype.isCancellable = function() { + return this.isPending() && !this.isCancelled(); +}; + +Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) { + if (util.isArray(onCancelCallback)) { + for (var i = 0; i < onCancelCallback.length; ++i) { + this._doInvokeOnCancel(onCancelCallback[i], internalOnly); + } + } else if (onCancelCallback !== undefined) { + if (typeof onCancelCallback === "function") { + if (!internalOnly) { + var e = tryCatch(onCancelCallback).call(this._boundValue()); + if (e === errorObj) { + this._attachExtraTrace(e.e); + async.throwLater(e.e); + } + } + } else { + onCancelCallback._resultCancelled(this); + } + } +}; + +Promise.prototype._invokeOnCancel = function() { + var onCancelCallback = this._onCancel(); + this._unsetOnCancel(); + async.invoke(this._doInvokeOnCancel, this, onCancelCallback); +}; + +Promise.prototype._invokeInternalOnCancel = function() { + if (this._isCancellable()) { + this._doInvokeOnCancel(this._onCancel(), true); + this._unsetOnCancel(); + } +}; + +Promise.prototype._resultCancelled = function() { + this.cancel(); +}; + +}; + + +/***/ }), + +/***/ 8985: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(NEXT_FILTER) { +var util = __nccwpck_require__(37448); +var getKeys = __nccwpck_require__(43062).keys; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function catchFilter(instances, cb, promise) { + return function(e) { + var boundTo = promise._boundValue(); + predicateLoop: for (var i = 0; i < instances.length; ++i) { + var item = instances[i]; + + if (item === Error || + (item != null && item.prototype instanceof Error)) { + if (e instanceof item) { + return tryCatch(cb).call(boundTo, e); + } + } else if (typeof item === "function") { + var matchesPredicate = tryCatch(item).call(boundTo, e); + if (matchesPredicate === errorObj) { + return matchesPredicate; + } else if (matchesPredicate) { + return tryCatch(cb).call(boundTo, e); + } + } else if (util.isObject(e)) { + var keys = getKeys(item); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + if (item[key] != e[key]) { + continue predicateLoop; + } + } + return tryCatch(cb).call(boundTo, e); + } + } + return NEXT_FILTER; + }; +} + +return catchFilter; +}; + + +/***/ }), + +/***/ 65422: +/***/ ((module) => { + +"use strict"; + +module.exports = function(Promise) { +var longStackTraces = false; +var contextStack = []; + +Promise.prototype._promiseCreated = function() {}; +Promise.prototype._pushContext = function() {}; +Promise.prototype._popContext = function() {return null;}; +Promise._peekContext = Promise.prototype._peekContext = function() {}; + +function Context() { + this._trace = new Context.CapturedTrace(peekContext()); +} +Context.prototype._pushContext = function () { + if (this._trace !== undefined) { + this._trace._promiseCreated = null; + contextStack.push(this._trace); + } +}; + +Context.prototype._popContext = function () { + if (this._trace !== undefined) { + var trace = contextStack.pop(); + var ret = trace._promiseCreated; + trace._promiseCreated = null; + return ret; + } + return null; +}; + +function createContext() { + if (longStackTraces) return new Context(); +} + +function peekContext() { + var lastIndex = contextStack.length - 1; + if (lastIndex >= 0) { + return contextStack[lastIndex]; + } + return undefined; +} +Context.CapturedTrace = null; +Context.create = createContext; +Context.deactivateLongStackTraces = function() {}; +Context.activateLongStackTraces = function() { + var Promise_pushContext = Promise.prototype._pushContext; + var Promise_popContext = Promise.prototype._popContext; + var Promise_PeekContext = Promise._peekContext; + var Promise_peekContext = Promise.prototype._peekContext; + var Promise_promiseCreated = Promise.prototype._promiseCreated; + Context.deactivateLongStackTraces = function() { + Promise.prototype._pushContext = Promise_pushContext; + Promise.prototype._popContext = Promise_popContext; + Promise._peekContext = Promise_PeekContext; + Promise.prototype._peekContext = Promise_peekContext; + Promise.prototype._promiseCreated = Promise_promiseCreated; + longStackTraces = false; + }; + longStackTraces = true; + Promise.prototype._pushContext = Context.prototype._pushContext; + Promise.prototype._popContext = Context.prototype._popContext; + Promise._peekContext = Promise.prototype._peekContext = peekContext; + Promise.prototype._promiseCreated = function() { + var ctx = this._peekContext(); + if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this; + }; +}; +return Context; +}; + + +/***/ }), + +/***/ 26004: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise, Context, + enableAsyncHooks, disableAsyncHooks) { +var async = Promise._async; +var Warning = __nccwpck_require__(35816).Warning; +var util = __nccwpck_require__(37448); +var es5 = __nccwpck_require__(43062); +var canAttachTrace = util.canAttachTrace; +var unhandledRejectionHandled; +var possiblyUnhandledRejection; +var bluebirdFramePattern = + /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/; +var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/; +var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/; +var stackFramePattern = null; +var formatStack = null; +var indentStackFrames = false; +var printWarning; +var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 && + ( false || + util.env("BLUEBIRD_DEBUG") || + util.env("NODE_ENV") === "development")); + +var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 && + (debugging || util.env("BLUEBIRD_WARNINGS"))); + +var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && + (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES"))); + +var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && + (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN")); + +var deferUnhandledRejectionCheck; +(function() { + var promises = []; + + function unhandledRejectionCheck() { + for (var i = 0; i < promises.length; ++i) { + promises[i]._notifyUnhandledRejection(); + } + unhandledRejectionClear(); + } + + function unhandledRejectionClear() { + promises.length = 0; + } + + deferUnhandledRejectionCheck = function(promise) { + promises.push(promise); + setTimeout(unhandledRejectionCheck, 1); + }; + + es5.defineProperty(Promise, "_unhandledRejectionCheck", { + value: unhandledRejectionCheck + }); + es5.defineProperty(Promise, "_unhandledRejectionClear", { + value: unhandledRejectionClear + }); +})(); + +Promise.prototype.suppressUnhandledRejections = function() { + var target = this._target(); + target._bitField = ((target._bitField & (~1048576)) | + 524288); +}; + +Promise.prototype._ensurePossibleRejectionHandled = function () { + if ((this._bitField & 524288) !== 0) return; + this._setRejectionIsUnhandled(); + deferUnhandledRejectionCheck(this); +}; + +Promise.prototype._notifyUnhandledRejectionIsHandled = function () { + fireRejectionEvent("rejectionHandled", + unhandledRejectionHandled, undefined, this); +}; + +Promise.prototype._setReturnedNonUndefined = function() { + this._bitField = this._bitField | 268435456; +}; + +Promise.prototype._returnedNonUndefined = function() { + return (this._bitField & 268435456) !== 0; +}; + +Promise.prototype._notifyUnhandledRejection = function () { + if (this._isRejectionUnhandled()) { + var reason = this._settledValue(); + this._setUnhandledRejectionIsNotified(); + fireRejectionEvent("unhandledRejection", + possiblyUnhandledRejection, reason, this); + } +}; + +Promise.prototype._setUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField | 262144; +}; + +Promise.prototype._unsetUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField & (~262144); +}; + +Promise.prototype._isUnhandledRejectionNotified = function () { + return (this._bitField & 262144) > 0; +}; + +Promise.prototype._setRejectionIsUnhandled = function () { + this._bitField = this._bitField | 1048576; +}; + +Promise.prototype._unsetRejectionIsUnhandled = function () { + this._bitField = this._bitField & (~1048576); + if (this._isUnhandledRejectionNotified()) { + this._unsetUnhandledRejectionIsNotified(); + this._notifyUnhandledRejectionIsHandled(); + } +}; + +Promise.prototype._isRejectionUnhandled = function () { + return (this._bitField & 1048576) > 0; +}; + +Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) { + return warn(message, shouldUseOwnTrace, promise || this); +}; + +Promise.onPossiblyUnhandledRejection = function (fn) { + var context = Promise._getContext(); + possiblyUnhandledRejection = util.contextBind(context, fn); +}; + +Promise.onUnhandledRejectionHandled = function (fn) { + var context = Promise._getContext(); + unhandledRejectionHandled = util.contextBind(context, fn); +}; + +var disableLongStackTraces = function() {}; +Promise.longStackTraces = function () { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (!config.longStackTraces && longStackTracesIsSupported()) { + var Promise_captureStackTrace = Promise.prototype._captureStackTrace; + var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace; + var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace; + config.longStackTraces = true; + disableLongStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + Promise.prototype._captureStackTrace = Promise_captureStackTrace; + Promise.prototype._attachExtraTrace = Promise_attachExtraTrace; + Promise.prototype._dereferenceTrace = Promise_dereferenceTrace; + Context.deactivateLongStackTraces(); + config.longStackTraces = false; + }; + Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace; + Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace; + Context.activateLongStackTraces(); + } +}; + +Promise.hasLongStackTraces = function () { + return config.longStackTraces && longStackTracesIsSupported(); +}; + + +var legacyHandlers = { + unhandledrejection: { + before: function() { + var ret = util.global.onunhandledrejection; + util.global.onunhandledrejection = null; + return ret; + }, + after: function(fn) { + util.global.onunhandledrejection = fn; + } + }, + rejectionhandled: { + before: function() { + var ret = util.global.onrejectionhandled; + util.global.onrejectionhandled = null; + return ret; + }, + after: function(fn) { + util.global.onrejectionhandled = fn; + } + } +}; + +var fireDomEvent = (function() { + var dispatch = function(legacy, e) { + if (legacy) { + var fn; + try { + fn = legacy.before(); + return !util.global.dispatchEvent(e); + } finally { + legacy.after(fn); + } + } else { + return !util.global.dispatchEvent(e); + } + }; + try { + if (typeof CustomEvent === "function") { + var event = new CustomEvent("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + name = name.toLowerCase(); + var eventData = { + detail: event, + cancelable: true + }; + var domEvent = new CustomEvent(name, eventData); + es5.defineProperty( + domEvent, "promise", {value: event.promise}); + es5.defineProperty( + domEvent, "reason", {value: event.reason}); + + return dispatch(legacyHandlers[name], domEvent); + }; + } else if (typeof Event === "function") { + var event = new Event("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + name = name.toLowerCase(); + var domEvent = new Event(name, { + cancelable: true + }); + domEvent.detail = event; + es5.defineProperty(domEvent, "promise", {value: event.promise}); + es5.defineProperty(domEvent, "reason", {value: event.reason}); + return dispatch(legacyHandlers[name], domEvent); + }; + } else { + var event = document.createEvent("CustomEvent"); + event.initCustomEvent("testingtheevent", false, true, {}); + util.global.dispatchEvent(event); + return function(name, event) { + name = name.toLowerCase(); + var domEvent = document.createEvent("CustomEvent"); + domEvent.initCustomEvent(name, false, true, + event); + return dispatch(legacyHandlers[name], domEvent); + }; + } + } catch (e) {} + return function() { + return false; + }; +})(); + +var fireGlobalEvent = (function() { + if (util.isNode) { + return function() { + return process.emit.apply(process, arguments); + }; + } else { + if (!util.global) { + return function() { + return false; + }; + } + return function(name) { + var methodName = "on" + name.toLowerCase(); + var method = util.global[methodName]; + if (!method) return false; + method.apply(util.global, [].slice.call(arguments, 1)); + return true; + }; + } +})(); + +function generatePromiseLifecycleEventObject(name, promise) { + return {promise: promise}; +} + +var eventToObjectGenerator = { + promiseCreated: generatePromiseLifecycleEventObject, + promiseFulfilled: generatePromiseLifecycleEventObject, + promiseRejected: generatePromiseLifecycleEventObject, + promiseResolved: generatePromiseLifecycleEventObject, + promiseCancelled: generatePromiseLifecycleEventObject, + promiseChained: function(name, promise, child) { + return {promise: promise, child: child}; + }, + warning: function(name, warning) { + return {warning: warning}; + }, + unhandledRejection: function (name, reason, promise) { + return {reason: reason, promise: promise}; + }, + rejectionHandled: generatePromiseLifecycleEventObject +}; + +var activeFireEvent = function (name) { + var globalEventFired = false; + try { + globalEventFired = fireGlobalEvent.apply(null, arguments); + } catch (e) { + async.throwLater(e); + globalEventFired = true; + } + + var domEventFired = false; + try { + domEventFired = fireDomEvent(name, + eventToObjectGenerator[name].apply(null, arguments)); + } catch (e) { + async.throwLater(e); + domEventFired = true; + } + + return domEventFired || globalEventFired; +}; + +Promise.config = function(opts) { + opts = Object(opts); + if ("longStackTraces" in opts) { + if (opts.longStackTraces) { + Promise.longStackTraces(); + } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) { + disableLongStackTraces(); + } + } + if ("warnings" in opts) { + var warningsOption = opts.warnings; + config.warnings = !!warningsOption; + wForgottenReturn = config.warnings; + + if (util.isObject(warningsOption)) { + if ("wForgottenReturn" in warningsOption) { + wForgottenReturn = !!warningsOption.wForgottenReturn; + } + } + } + if ("cancellation" in opts && opts.cancellation && !config.cancellation) { + if (async.haveItemsQueued()) { + throw new Error( + "cannot enable cancellation after promises are in use"); + } + Promise.prototype._clearCancellationData = + cancellationClearCancellationData; + Promise.prototype._propagateFrom = cancellationPropagateFrom; + Promise.prototype._onCancel = cancellationOnCancel; + Promise.prototype._setOnCancel = cancellationSetOnCancel; + Promise.prototype._attachCancellationCallback = + cancellationAttachCancellationCallback; + Promise.prototype._execute = cancellationExecute; + propagateFromFunction = cancellationPropagateFrom; + config.cancellation = true; + } + if ("monitoring" in opts) { + if (opts.monitoring && !config.monitoring) { + config.monitoring = true; + Promise.prototype._fireEvent = activeFireEvent; + } else if (!opts.monitoring && config.monitoring) { + config.monitoring = false; + Promise.prototype._fireEvent = defaultFireEvent; + } + } + if ("asyncHooks" in opts && util.nodeSupportsAsyncResource) { + var prev = config.asyncHooks; + var cur = !!opts.asyncHooks; + if (prev !== cur) { + config.asyncHooks = cur; + if (cur) { + enableAsyncHooks(); + } else { + disableAsyncHooks(); + } + } + } + return Promise; +}; + +function defaultFireEvent() { return false; } + +Promise.prototype._fireEvent = defaultFireEvent; +Promise.prototype._execute = function(executor, resolve, reject) { + try { + executor(resolve, reject); + } catch (e) { + return e; + } +}; +Promise.prototype._onCancel = function () {}; +Promise.prototype._setOnCancel = function (handler) { ; }; +Promise.prototype._attachCancellationCallback = function(onCancel) { + ; +}; +Promise.prototype._captureStackTrace = function () {}; +Promise.prototype._attachExtraTrace = function () {}; +Promise.prototype._dereferenceTrace = function () {}; +Promise.prototype._clearCancellationData = function() {}; +Promise.prototype._propagateFrom = function (parent, flags) { + ; + ; +}; + +function cancellationExecute(executor, resolve, reject) { + var promise = this; + try { + executor(resolve, reject, function(onCancel) { + if (typeof onCancel !== "function") { + throw new TypeError("onCancel must be a function, got: " + + util.toString(onCancel)); + } + promise._attachCancellationCallback(onCancel); + }); + } catch (e) { + return e; + } +} + +function cancellationAttachCancellationCallback(onCancel) { + if (!this._isCancellable()) return this; + + var previousOnCancel = this._onCancel(); + if (previousOnCancel !== undefined) { + if (util.isArray(previousOnCancel)) { + previousOnCancel.push(onCancel); + } else { + this._setOnCancel([previousOnCancel, onCancel]); + } + } else { + this._setOnCancel(onCancel); + } +} + +function cancellationOnCancel() { + return this._onCancelField; +} + +function cancellationSetOnCancel(onCancel) { + this._onCancelField = onCancel; +} + +function cancellationClearCancellationData() { + this._cancellationParent = undefined; + this._onCancelField = undefined; +} + +function cancellationPropagateFrom(parent, flags) { + if ((flags & 1) !== 0) { + this._cancellationParent = parent; + var branchesRemainingToCancel = parent._branchesRemainingToCancel; + if (branchesRemainingToCancel === undefined) { + branchesRemainingToCancel = 0; + } + parent._branchesRemainingToCancel = branchesRemainingToCancel + 1; + } + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} + +function bindingPropagateFrom(parent, flags) { + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} +var propagateFromFunction = bindingPropagateFrom; + +function boundValueFunction() { + var ret = this._boundTo; + if (ret !== undefined) { + if (ret instanceof Promise) { + if (ret.isFulfilled()) { + return ret.value(); + } else { + return undefined; + } + } + } + return ret; +} + +function longStackTracesCaptureStackTrace() { + this._trace = new CapturedTrace(this._peekContext()); +} + +function longStackTracesAttachExtraTrace(error, ignoreSelf) { + if (canAttachTrace(error)) { + var trace = this._trace; + if (trace !== undefined) { + if (ignoreSelf) trace = trace._parent; + } + if (trace !== undefined) { + trace.attachExtraTrace(error); + } else if (!error.__stackCleaned__) { + var parsed = parseStackAndMessage(error); + util.notEnumerableProp(error, "stack", + parsed.message + "\n" + parsed.stack.join("\n")); + util.notEnumerableProp(error, "__stackCleaned__", true); + } + } +} + +function longStackTracesDereferenceTrace() { + this._trace = undefined; +} + +function checkForgottenReturns(returnValue, promiseCreated, name, promise, + parent) { + if (returnValue === undefined && promiseCreated !== null && + wForgottenReturn) { + if (parent !== undefined && parent._returnedNonUndefined()) return; + if ((promise._bitField & 65535) === 0) return; + + if (name) name = name + " "; + var handlerLine = ""; + var creatorLine = ""; + if (promiseCreated._trace) { + var traceLines = promiseCreated._trace.stack.split("\n"); + var stack = cleanStack(traceLines); + for (var i = stack.length - 1; i >= 0; --i) { + var line = stack[i]; + if (!nodeFramePattern.test(line)) { + var lineMatches = line.match(parseLinePattern); + if (lineMatches) { + handlerLine = "at " + lineMatches[1] + + ":" + lineMatches[2] + ":" + lineMatches[3] + " "; + } + break; + } + } + + if (stack.length > 0) { + var firstUserLine = stack[0]; + for (var i = 0; i < traceLines.length; ++i) { + + if (traceLines[i] === firstUserLine) { + if (i > 0) { + creatorLine = "\n" + traceLines[i - 1]; + } + break; + } + } + + } + } + var msg = "a promise was created in a " + name + + "handler " + handlerLine + "but was not returned from it, " + + "see http://goo.gl/rRqMUw" + + creatorLine; + promise._warn(msg, true, promiseCreated); + } +} + +function deprecated(name, replacement) { + var message = name + + " is deprecated and will be removed in a future version."; + if (replacement) message += " Use " + replacement + " instead."; + return warn(message); +} + +function warn(message, shouldUseOwnTrace, promise) { + if (!config.warnings) return; + var warning = new Warning(message); + var ctx; + if (shouldUseOwnTrace) { + promise._attachExtraTrace(warning); + } else if (config.longStackTraces && (ctx = Promise._peekContext())) { + ctx.attachExtraTrace(warning); + } else { + var parsed = parseStackAndMessage(warning); + warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); + } + + if (!activeFireEvent("warning", warning)) { + formatAndLogError(warning, "", true); + } +} + +function reconstructStack(message, stacks) { + for (var i = 0; i < stacks.length - 1; ++i) { + stacks[i].push("From previous event:"); + stacks[i] = stacks[i].join("\n"); + } + if (i < stacks.length) { + stacks[i] = stacks[i].join("\n"); + } + return message + "\n" + stacks.join("\n"); +} + +function removeDuplicateOrEmptyJumps(stacks) { + for (var i = 0; i < stacks.length; ++i) { + if (stacks[i].length === 0 || + ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) { + stacks.splice(i, 1); + i--; + } + } +} + +function removeCommonRoots(stacks) { + var current = stacks[0]; + for (var i = 1; i < stacks.length; ++i) { + var prev = stacks[i]; + var currentLastIndex = current.length - 1; + var currentLastLine = current[currentLastIndex]; + var commonRootMeetPoint = -1; + + for (var j = prev.length - 1; j >= 0; --j) { + if (prev[j] === currentLastLine) { + commonRootMeetPoint = j; + break; + } + } + + for (var j = commonRootMeetPoint; j >= 0; --j) { + var line = prev[j]; + if (current[currentLastIndex] === line) { + current.pop(); + currentLastIndex--; + } else { + break; + } + } + current = prev; + } +} + +function cleanStack(stack) { + var ret = []; + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + var isTraceLine = " (No stack trace)" === line || + stackFramePattern.test(line); + var isInternalFrame = isTraceLine && shouldIgnore(line); + if (isTraceLine && !isInternalFrame) { + if (indentStackFrames && line.charAt(0) !== " ") { + line = " " + line; + } + ret.push(line); + } + } + return ret; +} + +function stackFramesAsArray(error) { + var stack = error.stack.replace(/\s+$/g, "").split("\n"); + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + if (" (No stack trace)" === line || stackFramePattern.test(line)) { + break; + } + } + if (i > 0 && error.name != "SyntaxError") { + stack = stack.slice(i); + } + return stack; +} + +function parseStackAndMessage(error) { + var stack = error.stack; + var message = error.toString(); + stack = typeof stack === "string" && stack.length > 0 + ? stackFramesAsArray(error) : [" (No stack trace)"]; + return { + message: message, + stack: error.name == "SyntaxError" ? stack : cleanStack(stack) + }; +} + +function formatAndLogError(error, title, isSoft) { + if (typeof console !== "undefined") { + var message; + if (util.isObject(error)) { + var stack = error.stack; + message = title + formatStack(stack, error); + } else { + message = title + String(error); + } + if (typeof printWarning === "function") { + printWarning(message, isSoft); + } else if (typeof console.log === "function" || + typeof console.log === "object") { + console.log(message); + } + } +} + +function fireRejectionEvent(name, localHandler, reason, promise) { + var localEventFired = false; + try { + if (typeof localHandler === "function") { + localEventFired = true; + if (name === "rejectionHandled") { + localHandler(promise); + } else { + localHandler(reason, promise); + } + } + } catch (e) { + async.throwLater(e); + } + + if (name === "unhandledRejection") { + if (!activeFireEvent(name, reason, promise) && !localEventFired) { + formatAndLogError(reason, "Unhandled rejection "); + } + } else { + activeFireEvent(name, promise); + } +} + +function formatNonError(obj) { + var str; + if (typeof obj === "function") { + str = "[function " + + (obj.name || "anonymous") + + "]"; + } else { + str = obj && typeof obj.toString === "function" + ? obj.toString() : util.toString(obj); + var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; + if (ruselessToString.test(str)) { + try { + var newStr = JSON.stringify(obj); + str = newStr; + } + catch(e) { + + } + } + if (str.length === 0) { + str = "(empty array)"; + } + } + return ("(<" + snip(str) + ">, no stack trace)"); +} + +function snip(str) { + var maxChars = 41; + if (str.length < maxChars) { + return str; + } + return str.substr(0, maxChars - 3) + "..."; +} + +function longStackTracesIsSupported() { + return typeof captureStackTrace === "function"; +} + +var shouldIgnore = function() { return false; }; +var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; +function parseLineInfo(line) { + var matches = line.match(parseLineInfoRegex); + if (matches) { + return { + fileName: matches[1], + line: parseInt(matches[2], 10) + }; + } +} + +function setBounds(firstLineError, lastLineError) { + if (!longStackTracesIsSupported()) return; + var firstStackLines = (firstLineError.stack || "").split("\n"); + var lastStackLines = (lastLineError.stack || "").split("\n"); + var firstIndex = -1; + var lastIndex = -1; + var firstFileName; + var lastFileName; + for (var i = 0; i < firstStackLines.length; ++i) { + var result = parseLineInfo(firstStackLines[i]); + if (result) { + firstFileName = result.fileName; + firstIndex = result.line; + break; + } + } + for (var i = 0; i < lastStackLines.length; ++i) { + var result = parseLineInfo(lastStackLines[i]); + if (result) { + lastFileName = result.fileName; + lastIndex = result.line; + break; + } + } + if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || + firstFileName !== lastFileName || firstIndex >= lastIndex) { + return; + } + + shouldIgnore = function(line) { + if (bluebirdFramePattern.test(line)) return true; + var info = parseLineInfo(line); + if (info) { + if (info.fileName === firstFileName && + (firstIndex <= info.line && info.line <= lastIndex)) { + return true; + } + } + return false; + }; +} + +function CapturedTrace(parent) { + this._parent = parent; + this._promisesCreated = 0; + var length = this._length = 1 + (parent === undefined ? 0 : parent._length); + captureStackTrace(this, CapturedTrace); + if (length > 32) this.uncycle(); +} +util.inherits(CapturedTrace, Error); +Context.CapturedTrace = CapturedTrace; + +CapturedTrace.prototype.uncycle = function() { + var length = this._length; + if (length < 2) return; + var nodes = []; + var stackToIndex = {}; + + for (var i = 0, node = this; node !== undefined; ++i) { + nodes.push(node); + node = node._parent; + } + length = this._length = i; + for (var i = length - 1; i >= 0; --i) { + var stack = nodes[i].stack; + if (stackToIndex[stack] === undefined) { + stackToIndex[stack] = i; + } + } + for (var i = 0; i < length; ++i) { + var currentStack = nodes[i].stack; + var index = stackToIndex[currentStack]; + if (index !== undefined && index !== i) { + if (index > 0) { + nodes[index - 1]._parent = undefined; + nodes[index - 1]._length = 1; + } + nodes[i]._parent = undefined; + nodes[i]._length = 1; + var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; + + if (index < length - 1) { + cycleEdgeNode._parent = nodes[index + 1]; + cycleEdgeNode._parent.uncycle(); + cycleEdgeNode._length = + cycleEdgeNode._parent._length + 1; + } else { + cycleEdgeNode._parent = undefined; + cycleEdgeNode._length = 1; + } + var currentChildLength = cycleEdgeNode._length + 1; + for (var j = i - 2; j >= 0; --j) { + nodes[j]._length = currentChildLength; + currentChildLength++; + } + return; + } + } +}; + +CapturedTrace.prototype.attachExtraTrace = function(error) { + if (error.__stackCleaned__) return; + this.uncycle(); + var parsed = parseStackAndMessage(error); + var message = parsed.message; + var stacks = [parsed.stack]; + + var trace = this; + while (trace !== undefined) { + stacks.push(cleanStack(trace.stack.split("\n"))); + trace = trace._parent; + } + removeCommonRoots(stacks); + removeDuplicateOrEmptyJumps(stacks); + util.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); + util.notEnumerableProp(error, "__stackCleaned__", true); +}; + +var captureStackTrace = (function stackDetection() { + var v8stackFramePattern = /^\s*at\s*/; + var v8stackFormatter = function(stack, error) { + if (typeof stack === "string") return stack; + + if (error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + if (typeof Error.stackTraceLimit === "number" && + typeof Error.captureStackTrace === "function") { + Error.stackTraceLimit += 6; + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + var captureStackTrace = Error.captureStackTrace; + + shouldIgnore = function(line) { + return bluebirdFramePattern.test(line); + }; + return function(receiver, ignoreUntil) { + Error.stackTraceLimit += 6; + captureStackTrace(receiver, ignoreUntil); + Error.stackTraceLimit -= 6; + }; + } + var err = new Error(); + + if (typeof err.stack === "string" && + err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { + stackFramePattern = /@/; + formatStack = v8stackFormatter; + indentStackFrames = true; + return function captureStackTrace(o) { + o.stack = new Error().stack; + }; + } + + var hasStackAfterThrow; + try { throw new Error(); } + catch(e) { + hasStackAfterThrow = ("stack" in e); + } + if (!("stack" in err) && hasStackAfterThrow && + typeof Error.stackTraceLimit === "number") { + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + return function captureStackTrace(o) { + Error.stackTraceLimit += 6; + try { throw new Error(); } + catch(e) { o.stack = e.stack; } + Error.stackTraceLimit -= 6; + }; + } + + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + + if ((typeof error === "object" || + typeof error === "function") && + error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + return null; + +})([]); + +if (typeof console !== "undefined" && typeof console.warn !== "undefined") { + printWarning = function (message) { + console.warn(message); + }; + if (util.isNode && process.stderr.isTTY) { + printWarning = function(message, isSoft) { + var color = isSoft ? "\u001b[33m" : "\u001b[31m"; + console.warn(color + message + "\u001b[0m\n"); + }; + } else if (!util.isNode && typeof (new Error().stack) === "string") { + printWarning = function(message, isSoft) { + console.warn("%c" + message, + isSoft ? "color: darkorange" : "color: red"); + }; + } +} + +var config = { + warnings: warnings, + longStackTraces: false, + cancellation: false, + monitoring: false, + asyncHooks: false +}; + +if (longStackTraces) Promise.longStackTraces(); + +return { + asyncHooks: function() { + return config.asyncHooks; + }, + longStackTraces: function() { + return config.longStackTraces; + }, + warnings: function() { + return config.warnings; + }, + cancellation: function() { + return config.cancellation; + }, + monitoring: function() { + return config.monitoring; + }, + propagateFromFunction: function() { + return propagateFromFunction; + }, + boundValueFunction: function() { + return boundValueFunction; + }, + checkForgottenReturns: checkForgottenReturns, + setBounds: setBounds, + warn: warn, + deprecated: deprecated, + CapturedTrace: CapturedTrace, + fireDomEvent: fireDomEvent, + fireGlobalEvent: fireGlobalEvent +}; +}; + + +/***/ }), + +/***/ 8277: +/***/ ((module) => { + +"use strict"; + +module.exports = function(Promise) { +function returner() { + return this.value; +} +function thrower() { + throw this.reason; +} + +Promise.prototype["return"] = +Promise.prototype.thenReturn = function (value) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + returner, undefined, undefined, {value: value}, undefined); +}; + +Promise.prototype["throw"] = +Promise.prototype.thenThrow = function (reason) { + return this._then( + thrower, undefined, undefined, {reason: reason}, undefined); +}; + +Promise.prototype.catchThrow = function (reason) { + if (arguments.length <= 1) { + return this._then( + undefined, thrower, undefined, {reason: reason}, undefined); + } else { + var _reason = arguments[1]; + var handler = function() {throw _reason;}; + return this.caught(reason, handler); + } +}; + +Promise.prototype.catchReturn = function (value) { + if (arguments.length <= 1) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + undefined, returner, undefined, {value: value}, undefined); + } else { + var _value = arguments[1]; + if (_value instanceof Promise) _value.suppressUnhandledRejections(); + var handler = function() {return _value;}; + return this.caught(value, handler); + } +}; +}; + + +/***/ }), + +/***/ 90838: +/***/ ((module) => { + +"use strict"; + +module.exports = function(Promise, INTERNAL) { +var PromiseReduce = Promise.reduce; +var PromiseAll = Promise.all; + +function promiseAllThis() { + return PromiseAll(this); +} + +function PromiseMapSeries(promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, INTERNAL); +} + +Promise.prototype.each = function (fn) { + return PromiseReduce(this, fn, INTERNAL, 0) + ._then(promiseAllThis, undefined, undefined, this, undefined); +}; + +Promise.prototype.mapSeries = function (fn) { + return PromiseReduce(this, fn, INTERNAL, INTERNAL); +}; + +Promise.each = function (promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, 0) + ._then(promiseAllThis, undefined, undefined, promises, undefined); +}; + +Promise.mapSeries = PromiseMapSeries; +}; + + + +/***/ }), + +/***/ 35816: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var es5 = __nccwpck_require__(43062); +var Objectfreeze = es5.freeze; +var util = __nccwpck_require__(37448); +var inherits = util.inherits; +var notEnumerableProp = util.notEnumerableProp; + +function subError(nameProperty, defaultMessage) { + function SubError(message) { + if (!(this instanceof SubError)) return new SubError(message); + notEnumerableProp(this, "message", + typeof message === "string" ? message : defaultMessage); + notEnumerableProp(this, "name", nameProperty); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + Error.call(this); + } + } + inherits(SubError, Error); + return SubError; +} + +var _TypeError, _RangeError; +var Warning = subError("Warning", "warning"); +var CancellationError = subError("CancellationError", "cancellation error"); +var TimeoutError = subError("TimeoutError", "timeout error"); +var AggregateError = subError("AggregateError", "aggregate error"); +try { + _TypeError = TypeError; + _RangeError = RangeError; +} catch(e) { + _TypeError = subError("TypeError", "type error"); + _RangeError = subError("RangeError", "range error"); +} + +var methods = ("join pop push shift unshift slice filter forEach some " + + "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" "); + +for (var i = 0; i < methods.length; ++i) { + if (typeof Array.prototype[methods[i]] === "function") { + AggregateError.prototype[methods[i]] = Array.prototype[methods[i]]; + } +} + +es5.defineProperty(AggregateError.prototype, "length", { + value: 0, + configurable: false, + writable: true, + enumerable: true +}); +AggregateError.prototype["isOperational"] = true; +var level = 0; +AggregateError.prototype.toString = function() { + var indent = Array(level * 4 + 1).join(" "); + var ret = "\n" + indent + "AggregateError of:" + "\n"; + level++; + indent = Array(level * 4 + 1).join(" "); + for (var i = 0; i < this.length; ++i) { + var str = this[i] === this ? "[Circular AggregateError]" : this[i] + ""; + var lines = str.split("\n"); + for (var j = 0; j < lines.length; ++j) { + lines[j] = indent + lines[j]; + } + str = lines.join("\n"); + ret += str + "\n"; + } + level--; + return ret; +}; + +function OperationalError(message) { + if (!(this instanceof OperationalError)) + return new OperationalError(message); + notEnumerableProp(this, "name", "OperationalError"); + notEnumerableProp(this, "message", message); + this.cause = message; + this["isOperational"] = true; + + if (message instanceof Error) { + notEnumerableProp(this, "message", message.message); + notEnumerableProp(this, "stack", message.stack); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + +} +inherits(OperationalError, Error); + +var errorTypes = Error["__BluebirdErrorTypes__"]; +if (!errorTypes) { + errorTypes = Objectfreeze({ + CancellationError: CancellationError, + TimeoutError: TimeoutError, + OperationalError: OperationalError, + RejectionError: OperationalError, + AggregateError: AggregateError + }); + es5.defineProperty(Error, "__BluebirdErrorTypes__", { + value: errorTypes, + writable: false, + enumerable: false, + configurable: false + }); +} + +module.exports = { + Error: Error, + TypeError: _TypeError, + RangeError: _RangeError, + CancellationError: errorTypes.CancellationError, + OperationalError: errorTypes.OperationalError, + TimeoutError: errorTypes.TimeoutError, + AggregateError: errorTypes.AggregateError, + Warning: Warning +}; + + +/***/ }), + +/***/ 43062: +/***/ ((module) => { + +var isES5 = (function(){ + "use strict"; + return this === undefined; +})(); + +if (isES5) { + module.exports = { + freeze: Object.freeze, + defineProperty: Object.defineProperty, + getDescriptor: Object.getOwnPropertyDescriptor, + keys: Object.keys, + names: Object.getOwnPropertyNames, + getPrototypeOf: Object.getPrototypeOf, + isArray: Array.isArray, + isES5: isES5, + propertyIsWritable: function(obj, prop) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!(!descriptor || descriptor.writable || descriptor.set); + } + }; +} else { + var has = {}.hasOwnProperty; + var str = {}.toString; + var proto = {}.constructor.prototype; + + var ObjectKeys = function (o) { + var ret = []; + for (var key in o) { + if (has.call(o, key)) { + ret.push(key); + } + } + return ret; + }; + + var ObjectGetDescriptor = function(o, key) { + return {value: o[key]}; + }; + + var ObjectDefineProperty = function (o, key, desc) { + o[key] = desc.value; + return o; + }; + + var ObjectFreeze = function (obj) { + return obj; + }; + + var ObjectGetPrototypeOf = function (obj) { + try { + return Object(obj).constructor.prototype; + } + catch (e) { + return proto; + } + }; + + var ArrayIsArray = function (obj) { + try { + return str.call(obj) === "[object Array]"; + } + catch(e) { + return false; + } + }; + + module.exports = { + isArray: ArrayIsArray, + keys: ObjectKeys, + names: ObjectKeys, + defineProperty: ObjectDefineProperty, + getDescriptor: ObjectGetDescriptor, + freeze: ObjectFreeze, + getPrototypeOf: ObjectGetPrototypeOf, + isES5: isES5, + propertyIsWritable: function() { + return true; + } + }; +} + + +/***/ }), + +/***/ 42223: +/***/ ((module) => { + +"use strict"; + +module.exports = function(Promise, INTERNAL) { +var PromiseMap = Promise.map; + +Promise.prototype.filter = function (fn, options) { + return PromiseMap(this, fn, options, INTERNAL); +}; + +Promise.filter = function (promises, fn, options) { + return PromiseMap(promises, fn, options, INTERNAL); +}; +}; + + +/***/ }), + +/***/ 57304: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) { +var util = __nccwpck_require__(37448); +var CancellationError = Promise.CancellationError; +var errorObj = util.errorObj; +var catchFilter = __nccwpck_require__(8985)(NEXT_FILTER); + +function PassThroughHandlerContext(promise, type, handler) { + this.promise = promise; + this.type = type; + this.handler = handler; + this.called = false; + this.cancelPromise = null; +} + +PassThroughHandlerContext.prototype.isFinallyHandler = function() { + return this.type === 0; +}; + +function FinallyHandlerCancelReaction(finallyHandler) { + this.finallyHandler = finallyHandler; +} + +FinallyHandlerCancelReaction.prototype._resultCancelled = function() { + checkCancel(this.finallyHandler); +}; + +function checkCancel(ctx, reason) { + if (ctx.cancelPromise != null) { + if (arguments.length > 1) { + ctx.cancelPromise._reject(reason); + } else { + ctx.cancelPromise._cancel(); + } + ctx.cancelPromise = null; + return true; + } + return false; +} + +function succeed() { + return finallyHandler.call(this, this.promise._target()._settledValue()); +} +function fail(reason) { + if (checkCancel(this, reason)) return; + errorObj.e = reason; + return errorObj; +} +function finallyHandler(reasonOrValue) { + var promise = this.promise; + var handler = this.handler; + + if (!this.called) { + this.called = true; + var ret = this.isFinallyHandler() + ? handler.call(promise._boundValue()) + : handler.call(promise._boundValue(), reasonOrValue); + if (ret === NEXT_FILTER) { + return ret; + } else if (ret !== undefined) { + promise._setReturnedNonUndefined(); + var maybePromise = tryConvertToPromise(ret, promise); + if (maybePromise instanceof Promise) { + if (this.cancelPromise != null) { + if (maybePromise._isCancelled()) { + var reason = + new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + errorObj.e = reason; + return errorObj; + } else if (maybePromise.isPending()) { + maybePromise._attachCancellationCallback( + new FinallyHandlerCancelReaction(this)); + } + } + return maybePromise._then( + succeed, fail, undefined, this, undefined); + } + } + } + + if (promise.isRejected()) { + checkCancel(this); + errorObj.e = reasonOrValue; + return errorObj; + } else { + checkCancel(this); + return reasonOrValue; + } +} + +Promise.prototype._passThrough = function(handler, type, success, fail) { + if (typeof handler !== "function") return this.then(); + return this._then(success, + fail, + undefined, + new PassThroughHandlerContext(this, type, handler), + undefined); +}; + +Promise.prototype.lastly = +Promise.prototype["finally"] = function (handler) { + return this._passThrough(handler, + 0, + finallyHandler, + finallyHandler); +}; + + +Promise.prototype.tap = function (handler) { + return this._passThrough(handler, 1, finallyHandler); +}; + +Promise.prototype.tapCatch = function (handlerOrPredicate) { + var len = arguments.length; + if(len === 1) { + return this._passThrough(handlerOrPredicate, + 1, + undefined, + finallyHandler); + } else { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return Promise.reject(new TypeError( + "tapCatch statement predicate: " + + "expecting an object but got " + util.classString(item) + )); + } + } + catchInstances.length = j; + var handler = arguments[i]; + return this._passThrough(catchFilter(catchInstances, handler, this), + 1, + undefined, + finallyHandler); + } + +}; + +return PassThroughHandlerContext; +}; + + +/***/ }), + +/***/ 28619: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise, + apiRejection, + INTERNAL, + tryConvertToPromise, + Proxyable, + debug) { +var errors = __nccwpck_require__(35816); +var TypeError = errors.TypeError; +var util = __nccwpck_require__(37448); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +var yieldHandlers = []; + +function promiseFromYieldHandler(value, yieldHandlers, traceParent) { + for (var i = 0; i < yieldHandlers.length; ++i) { + traceParent._pushContext(); + var result = tryCatch(yieldHandlers[i])(value); + traceParent._popContext(); + if (result === errorObj) { + traceParent._pushContext(); + var ret = Promise.reject(errorObj.e); + traceParent._popContext(); + return ret; + } + var maybePromise = tryConvertToPromise(result, traceParent); + if (maybePromise instanceof Promise) return maybePromise; + } + return null; +} + +function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) { + if (debug.cancellation()) { + var internal = new Promise(INTERNAL); + var _finallyPromise = this._finallyPromise = new Promise(INTERNAL); + this._promise = internal.lastly(function() { + return _finallyPromise; + }); + internal._captureStackTrace(); + internal._setOnCancel(this); + } else { + var promise = this._promise = new Promise(INTERNAL); + promise._captureStackTrace(); + } + this._stack = stack; + this._generatorFunction = generatorFunction; + this._receiver = receiver; + this._generator = undefined; + this._yieldHandlers = typeof yieldHandler === "function" + ? [yieldHandler].concat(yieldHandlers) + : yieldHandlers; + this._yieldedPromise = null; + this._cancellationPhase = false; +} +util.inherits(PromiseSpawn, Proxyable); + +PromiseSpawn.prototype._isResolved = function() { + return this._promise === null; +}; + +PromiseSpawn.prototype._cleanup = function() { + this._promise = this._generator = null; + if (debug.cancellation() && this._finallyPromise !== null) { + this._finallyPromise._fulfill(); + this._finallyPromise = null; + } +}; + +PromiseSpawn.prototype._promiseCancelled = function() { + if (this._isResolved()) return; + var implementsReturn = typeof this._generator["return"] !== "undefined"; + + var result; + if (!implementsReturn) { + var reason = new Promise.CancellationError( + "generator .return() sentinel"); + Promise.coroutine.returnSentinel = reason; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + result = tryCatch(this._generator["throw"]).call(this._generator, + reason); + this._promise._popContext(); + } else { + this._promise._pushContext(); + result = tryCatch(this._generator["return"]).call(this._generator, + undefined); + this._promise._popContext(); + } + this._cancellationPhase = true; + this._yieldedPromise = null; + this._continue(result); +}; + +PromiseSpawn.prototype._promiseFulfilled = function(value) { + this._yieldedPromise = null; + this._promise._pushContext(); + var result = tryCatch(this._generator.next).call(this._generator, value); + this._promise._popContext(); + this._continue(result); +}; + +PromiseSpawn.prototype._promiseRejected = function(reason) { + this._yieldedPromise = null; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + var result = tryCatch(this._generator["throw"]) + .call(this._generator, reason); + this._promise._popContext(); + this._continue(result); +}; + +PromiseSpawn.prototype._resultCancelled = function() { + if (this._yieldedPromise instanceof Promise) { + var promise = this._yieldedPromise; + this._yieldedPromise = null; + promise.cancel(); + } +}; + +PromiseSpawn.prototype.promise = function () { + return this._promise; +}; + +PromiseSpawn.prototype._run = function () { + this._generator = this._generatorFunction.call(this._receiver); + this._receiver = + this._generatorFunction = undefined; + this._promiseFulfilled(undefined); +}; + +PromiseSpawn.prototype._continue = function (result) { + var promise = this._promise; + if (result === errorObj) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._rejectCallback(result.e, false); + } + } + + var value = result.value; + if (result.done === true) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._resolveCallback(value); + } + } else { + var maybePromise = tryConvertToPromise(value, this._promise); + if (!(maybePromise instanceof Promise)) { + maybePromise = + promiseFromYieldHandler(maybePromise, + this._yieldHandlers, + this._promise); + if (maybePromise === null) { + this._promiseRejected( + new TypeError( + "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) + + "From coroutine:\u000a" + + this._stack.split("\n").slice(1, -7).join("\n") + ) + ); + return; + } + } + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + this._yieldedPromise = maybePromise; + maybePromise._proxy(this, null); + } else if (((bitField & 33554432) !== 0)) { + Promise._async.invoke( + this._promiseFulfilled, this, maybePromise._value() + ); + } else if (((bitField & 16777216) !== 0)) { + Promise._async.invoke( + this._promiseRejected, this, maybePromise._reason() + ); + } else { + this._promiseCancelled(); + } + } +}; + +Promise.coroutine = function (generatorFunction, options) { + if (typeof generatorFunction !== "function") { + throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var yieldHandler = Object(options).yieldHandler; + var PromiseSpawn$ = PromiseSpawn; + var stack = new Error().stack; + return function () { + var generator = generatorFunction.apply(this, arguments); + var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler, + stack); + var ret = spawn.promise(); + spawn._generator = generator; + spawn._promiseFulfilled(undefined); + return ret; + }; +}; + +Promise.coroutine.addYieldHandler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + yieldHandlers.push(fn); +}; + +Promise.spawn = function (generatorFunction) { + debug.deprecated("Promise.spawn()", "Promise.coroutine()"); + if (typeof generatorFunction !== "function") { + return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var spawn = new PromiseSpawn(generatorFunction, this); + var ret = spawn.promise(); + spawn._run(Promise.spawn); + return ret; +}; +}; + + +/***/ }), + +/***/ 25248: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = +function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async) { +var util = __nccwpck_require__(37448); +var canEvaluate = util.canEvaluate; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var reject; + +if (true) { +if (canEvaluate) { + var thenCallback = function(i) { + return new Function("value", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = value; \n\ + holder.checkFulfillment(this); \n\ + ".replace(/Index/g, i)); + }; + + var promiseSetter = function(i) { + return new Function("promise", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = promise; \n\ + ".replace(/Index/g, i)); + }; + + var generateHolderClass = function(total) { + var props = new Array(total); + for (var i = 0; i < props.length; ++i) { + props[i] = "this.p" + (i+1); + } + var assignment = props.join(" = ") + " = null;"; + var cancellationCode= "var promise;\n" + props.map(function(prop) { + return " \n\ + promise = " + prop + "; \n\ + if (promise instanceof Promise) { \n\ + promise.cancel(); \n\ + } \n\ + "; + }).join("\n"); + var passedArguments = props.join(", "); + var name = "Holder$" + total; + + + var code = "return function(tryCatch, errorObj, Promise, async) { \n\ + 'use strict'; \n\ + function [TheName](fn) { \n\ + [TheProperties] \n\ + this.fn = fn; \n\ + this.asyncNeeded = true; \n\ + this.now = 0; \n\ + } \n\ + \n\ + [TheName].prototype._callFunction = function(promise) { \n\ + promise._pushContext(); \n\ + var ret = tryCatch(this.fn)([ThePassedArguments]); \n\ + promise._popContext(); \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(ret.e, false); \n\ + } else { \n\ + promise._resolveCallback(ret); \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype.checkFulfillment = function(promise) { \n\ + var now = ++this.now; \n\ + if (now === [TheTotal]) { \n\ + if (this.asyncNeeded) { \n\ + async.invoke(this._callFunction, this, promise); \n\ + } else { \n\ + this._callFunction(promise); \n\ + } \n\ + \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype._resultCancelled = function() { \n\ + [CancellationCode] \n\ + }; \n\ + \n\ + return [TheName]; \n\ + }(tryCatch, errorObj, Promise, async); \n\ + "; + + code = code.replace(/\[TheName\]/g, name) + .replace(/\[TheTotal\]/g, total) + .replace(/\[ThePassedArguments\]/g, passedArguments) + .replace(/\[TheProperties\]/g, assignment) + .replace(/\[CancellationCode\]/g, cancellationCode); + + return new Function("tryCatch", "errorObj", "Promise", "async", code) + (tryCatch, errorObj, Promise, async); + }; + + var holderClasses = []; + var thenCallbacks = []; + var promiseSetters = []; + + for (var i = 0; i < 8; ++i) { + holderClasses.push(generateHolderClass(i + 1)); + thenCallbacks.push(thenCallback(i + 1)); + promiseSetters.push(promiseSetter(i + 1)); + } + + reject = function (reason) { + this._reject(reason); + }; +}} + +Promise.join = function () { + var last = arguments.length - 1; + var fn; + if (last > 0 && typeof arguments[last] === "function") { + fn = arguments[last]; + if (true) { + if (last <= 8 && canEvaluate) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var HolderClass = holderClasses[last - 1]; + var holder = new HolderClass(fn); + var callbacks = thenCallbacks; + + for (var i = 0; i < last; ++i) { + var maybePromise = tryConvertToPromise(arguments[i], ret); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + maybePromise._then(callbacks[i], reject, + undefined, ret, holder); + promiseSetters[i](maybePromise, holder); + holder.asyncNeeded = false; + } else if (((bitField & 33554432) !== 0)) { + callbacks[i].call(ret, + maybePromise._value(), holder); + } else if (((bitField & 16777216) !== 0)) { + ret._reject(maybePromise._reason()); + } else { + ret._cancel(); + } + } else { + callbacks[i].call(ret, maybePromise, holder); + } + } + + if (!ret._isFateSealed()) { + if (holder.asyncNeeded) { + var context = Promise._getContext(); + holder.fn = util.contextBind(context, holder.fn); + } + ret._setAsyncGuaranteed(); + ret._setOnCancel(holder); + } + return ret; + } + } + } + var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len ; ++$_i) {args[$_i] = arguments[$_i ];}; + if (fn) args.pop(); + var ret = new PromiseArray(args).promise(); + return fn !== undefined ? ret.spread(fn) : ret; +}; + +}; + + +/***/ }), + +/***/ 98150: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise, + PromiseArray, + apiRejection, + tryConvertToPromise, + INTERNAL, + debug) { +var util = __nccwpck_require__(37448); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +function MappingPromiseArray(promises, fn, limit, _filter) { + this.constructor$(promises); + this._promise._captureStackTrace(); + var context = Promise._getContext(); + this._callback = util.contextBind(context, fn); + this._preservedValues = _filter === INTERNAL + ? new Array(this.length()) + : null; + this._limit = limit; + this._inFlight = 0; + this._queue = []; + async.invoke(this._asyncInit, this, undefined); + if (util.isArray(promises)) { + for (var i = 0; i < promises.length; ++i) { + var maybePromise = promises[i]; + if (maybePromise instanceof Promise) { + maybePromise.suppressUnhandledRejections(); + } + } + } +} +util.inherits(MappingPromiseArray, PromiseArray); + +MappingPromiseArray.prototype._asyncInit = function() { + this._init$(undefined, -2); +}; + +MappingPromiseArray.prototype._init = function () {}; + +MappingPromiseArray.prototype._promiseFulfilled = function (value, index) { + var values = this._values; + var length = this.length(); + var preservedValues = this._preservedValues; + var limit = this._limit; + + if (index < 0) { + index = (index * -1) - 1; + values[index] = value; + if (limit >= 1) { + this._inFlight--; + this._drainQueue(); + if (this._isResolved()) return true; + } + } else { + if (limit >= 1 && this._inFlight >= limit) { + values[index] = value; + this._queue.push(index); + return false; + } + if (preservedValues !== null) preservedValues[index] = value; + + var promise = this._promise; + var callback = this._callback; + var receiver = promise._boundValue(); + promise._pushContext(); + var ret = tryCatch(callback).call(receiver, value, index, length); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, + promiseCreated, + preservedValues !== null ? "Promise.filter" : "Promise.map", + promise + ); + if (ret === errorObj) { + this._reject(ret.e); + return true; + } + + var maybePromise = tryConvertToPromise(ret, this._promise); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + if (limit >= 1) this._inFlight++; + values[index] = maybePromise; + maybePromise._proxy(this, (index + 1) * -1); + return false; + } else if (((bitField & 33554432) !== 0)) { + ret = maybePromise._value(); + } else if (((bitField & 16777216) !== 0)) { + this._reject(maybePromise._reason()); + return true; + } else { + this._cancel(); + return true; + } + } + values[index] = ret; + } + var totalResolved = ++this._totalResolved; + if (totalResolved >= length) { + if (preservedValues !== null) { + this._filter(values, preservedValues); + } else { + this._resolve(values); + } + return true; + } + return false; +}; + +MappingPromiseArray.prototype._drainQueue = function () { + var queue = this._queue; + var limit = this._limit; + var values = this._values; + while (queue.length > 0 && this._inFlight < limit) { + if (this._isResolved()) return; + var index = queue.pop(); + this._promiseFulfilled(values[index], index); + } +}; + +MappingPromiseArray.prototype._filter = function (booleans, values) { + var len = values.length; + var ret = new Array(len); + var j = 0; + for (var i = 0; i < len; ++i) { + if (booleans[i]) ret[j++] = values[i]; + } + ret.length = j; + this._resolve(ret); +}; + +MappingPromiseArray.prototype.preservedValues = function () { + return this._preservedValues; +}; + +function map(promises, fn, options, _filter) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + + var limit = 0; + if (options !== undefined) { + if (typeof options === "object" && options !== null) { + if (typeof options.concurrency !== "number") { + return Promise.reject( + new TypeError("'concurrency' must be a number but it is " + + util.classString(options.concurrency))); + } + limit = options.concurrency; + } else { + return Promise.reject(new TypeError( + "options argument must be an object but it is " + + util.classString(options))); + } + } + limit = typeof limit === "number" && + isFinite(limit) && limit >= 1 ? limit : 0; + return new MappingPromiseArray(promises, fn, limit, _filter).promise(); +} + +Promise.prototype.map = function (fn, options) { + return map(this, fn, options, null); +}; + +Promise.map = function (promises, fn, options, _filter) { + return map(promises, fn, options, _filter); +}; + + +}; + + +/***/ }), + +/***/ 97415: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = +function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) { +var util = __nccwpck_require__(37448); +var tryCatch = util.tryCatch; + +Promise.method = function (fn) { + if (typeof fn !== "function") { + throw new Promise.TypeError("expecting a function but got " + util.classString(fn)); + } + return function () { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value = tryCatch(fn).apply(this, arguments); + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.method", ret); + ret._resolveFromSyncValue(value); + return ret; + }; +}; + +Promise.attempt = Promise["try"] = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value; + if (arguments.length > 1) { + debug.deprecated("calling Promise.try with more than 1 argument"); + var arg = arguments[1]; + var ctx = arguments[2]; + value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg) + : tryCatch(fn).call(ctx, arg); + } else { + value = tryCatch(fn)(); + } + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.try", ret); + ret._resolveFromSyncValue(value); + return ret; +}; + +Promise.prototype._resolveFromSyncValue = function (value) { + if (value === util.errorObj) { + this._rejectCallback(value.e, false); + } else { + this._resolveCallback(value, true); + } +}; +}; + + +/***/ }), + +/***/ 4315: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var util = __nccwpck_require__(37448); +var maybeWrapAsError = util.maybeWrapAsError; +var errors = __nccwpck_require__(35816); +var OperationalError = errors.OperationalError; +var es5 = __nccwpck_require__(43062); + +function isUntypedError(obj) { + return obj instanceof Error && + es5.getPrototypeOf(obj) === Error.prototype; +} + +var rErrorKey = /^(?:name|message|stack|cause)$/; +function wrapAsOperationalError(obj) { + var ret; + if (isUntypedError(obj)) { + ret = new OperationalError(obj); + ret.name = obj.name; + ret.message = obj.message; + ret.stack = obj.stack; + var keys = es5.keys(obj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (!rErrorKey.test(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + util.markAsOriginatingFromRejection(obj); + return obj; +} + +function nodebackForPromise(promise, multiArgs) { + return function(err, value) { + if (promise === null) return; + if (err) { + var wrapped = wrapAsOperationalError(maybeWrapAsError(err)); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } else if (!multiArgs) { + promise._fulfill(value); + } else { + var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}; + promise._fulfill(args); + } + promise = null; + }; +} + +module.exports = nodebackForPromise; + + +/***/ }), + +/***/ 35447: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise) { +var util = __nccwpck_require__(37448); +var async = Promise._async; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function spreadAdapter(val, nodeback) { + var promise = this; + if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback); + var ret = + tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val)); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} + +function successAdapter(val, nodeback) { + var promise = this; + var receiver = promise._boundValue(); + var ret = val === undefined + ? tryCatch(nodeback).call(receiver, null) + : tryCatch(nodeback).call(receiver, null, val); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} +function errorAdapter(reason, nodeback) { + var promise = this; + if (!reason) { + var newReason = new Error(reason + ""); + newReason.cause = reason; + reason = newReason; + } + var ret = tryCatch(nodeback).call(promise._boundValue(), reason); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} + +Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback, + options) { + if (typeof nodeback == "function") { + var adapter = successAdapter; + if (options !== undefined && Object(options).spread) { + adapter = spreadAdapter; + } + this._then( + adapter, + errorAdapter, + undefined, + this, + nodeback + ); + } + return this; +}; +}; + + +/***/ }), + +/***/ 63694: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function() { +var makeSelfResolutionError = function () { + return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var reflectHandler = function() { + return new Promise.PromiseInspection(this._target()); +}; +var apiRejection = function(msg) { + return Promise.reject(new TypeError(msg)); +}; +function Proxyable() {} +var UNDEFINED_BINDING = {}; +var util = __nccwpck_require__(37448); +util.setReflectHandler(reflectHandler); + +var getDomain = function() { + var domain = process.domain; + if (domain === undefined) { + return null; + } + return domain; +}; +var getContextDefault = function() { + return null; +}; +var getContextDomain = function() { + return { + domain: getDomain(), + async: null + }; +}; +var AsyncResource = util.isNode && util.nodeSupportsAsyncResource ? + __nccwpck_require__(77303).AsyncResource : null; +var getContextAsyncHooks = function() { + return { + domain: getDomain(), + async: new AsyncResource("Bluebird::Promise") + }; +}; +var getContext = util.isNode ? getContextDomain : getContextDefault; +util.notEnumerableProp(Promise, "_getContext", getContext); +var enableAsyncHooks = function() { + getContext = getContextAsyncHooks; + util.notEnumerableProp(Promise, "_getContext", getContextAsyncHooks); +}; +var disableAsyncHooks = function() { + getContext = getContextDomain; + util.notEnumerableProp(Promise, "_getContext", getContextDomain); +}; + +var es5 = __nccwpck_require__(43062); +var Async = __nccwpck_require__(38061); +var async = new Async(); +es5.defineProperty(Promise, "_async", {value: async}); +var errors = __nccwpck_require__(35816); +var TypeError = Promise.TypeError = errors.TypeError; +Promise.RangeError = errors.RangeError; +var CancellationError = Promise.CancellationError = errors.CancellationError; +Promise.TimeoutError = errors.TimeoutError; +Promise.OperationalError = errors.OperationalError; +Promise.RejectionError = errors.OperationalError; +Promise.AggregateError = errors.AggregateError; +var INTERNAL = function(){}; +var APPLY = {}; +var NEXT_FILTER = {}; +var tryConvertToPromise = __nccwpck_require__(29787)(Promise, INTERNAL); +var PromiseArray = + __nccwpck_require__(85307)(Promise, INTERNAL, + tryConvertToPromise, apiRejection, Proxyable); +var Context = __nccwpck_require__(65422)(Promise); + /*jshint unused:false*/ +var createContext = Context.create; + +var debug = __nccwpck_require__(26004)(Promise, Context, + enableAsyncHooks, disableAsyncHooks); +var CapturedTrace = debug.CapturedTrace; +var PassThroughHandlerContext = + __nccwpck_require__(57304)(Promise, tryConvertToPromise, NEXT_FILTER); +var catchFilter = __nccwpck_require__(8985)(NEXT_FILTER); +var nodebackForPromise = __nccwpck_require__(4315); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +function check(self, executor) { + if (self == null || self.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (typeof executor !== "function") { + throw new TypeError("expecting a function but got " + util.classString(executor)); + } + +} + +function Promise(executor) { + if (executor !== INTERNAL) { + check(this, executor); + } + this._bitField = 0; + this._fulfillmentHandler0 = undefined; + this._rejectionHandler0 = undefined; + this._promise0 = undefined; + this._receiver0 = undefined; + this._resolveFromExecutor(executor); + this._promiseCreated(); + this._fireEvent("promiseCreated", this); +} + +Promise.prototype.toString = function () { + return "[object Promise]"; +}; + +Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { + var len = arguments.length; + if (len > 1) { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return apiRejection("Catch statement predicate: " + + "expecting an object but got " + util.classString(item)); + } + } + catchInstances.length = j; + fn = arguments[i]; + + if (typeof fn !== "function") { + throw new TypeError("The last argument to .catch() " + + "must be a function, got " + util.toString(fn)); + } + return this.then(undefined, catchFilter(catchInstances, fn, this)); + } + return this.then(undefined, fn); +}; + +Promise.prototype.reflect = function () { + return this._then(reflectHandler, + reflectHandler, undefined, this, undefined); +}; + +Promise.prototype.then = function (didFulfill, didReject) { + if (debug.warnings() && arguments.length > 0 && + typeof didFulfill !== "function" && + typeof didReject !== "function") { + var msg = ".then() only accepts functions but was passed: " + + util.classString(didFulfill); + if (arguments.length > 1) { + msg += ", " + util.classString(didReject); + } + this._warn(msg); + } + return this._then(didFulfill, didReject, undefined, undefined, undefined); +}; + +Promise.prototype.done = function (didFulfill, didReject) { + var promise = + this._then(didFulfill, didReject, undefined, undefined, undefined); + promise._setIsFinal(); +}; + +Promise.prototype.spread = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + return this.all()._then(fn, undefined, undefined, APPLY, undefined); +}; + +Promise.prototype.toJSON = function () { + var ret = { + isFulfilled: false, + isRejected: false, + fulfillmentValue: undefined, + rejectionReason: undefined + }; + if (this.isFulfilled()) { + ret.fulfillmentValue = this.value(); + ret.isFulfilled = true; + } else if (this.isRejected()) { + ret.rejectionReason = this.reason(); + ret.isRejected = true; + } + return ret; +}; + +Promise.prototype.all = function () { + if (arguments.length > 0) { + this._warn(".all() was passed arguments but it does not take any"); + } + return new PromiseArray(this).promise(); +}; + +Promise.prototype.error = function (fn) { + return this.caught(util.originatesFromRejection, fn); +}; + +Promise.getNewLibraryCopy = module.exports; + +Promise.is = function (val) { + return val instanceof Promise; +}; + +Promise.fromNode = Promise.fromCallback = function(fn) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs + : false; + var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs)); + if (result === errorObj) { + ret._rejectCallback(result.e, true); + } + if (!ret._isFateSealed()) ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.all = function (promises) { + return new PromiseArray(promises).promise(); +}; + +Promise.cast = function (obj) { + var ret = tryConvertToPromise(obj); + if (!(ret instanceof Promise)) { + ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._setFulfilled(); + ret._rejectionHandler0 = obj; + } + return ret; +}; + +Promise.resolve = Promise.fulfilled = Promise.cast; + +Promise.reject = Promise.rejected = function (reason) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._rejectCallback(reason, true); + return ret; +}; + +Promise.setScheduler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + return async.setScheduler(fn); +}; + +Promise.prototype._then = function ( + didFulfill, + didReject, + _, receiver, + internalData +) { + var haveInternalData = internalData !== undefined; + var promise = haveInternalData ? internalData : new Promise(INTERNAL); + var target = this._target(); + var bitField = target._bitField; + + if (!haveInternalData) { + promise._propagateFrom(this, 3); + promise._captureStackTrace(); + if (receiver === undefined && + ((this._bitField & 2097152) !== 0)) { + if (!((bitField & 50397184) === 0)) { + receiver = this._boundValue(); + } else { + receiver = target === this ? undefined : this._boundTo; + } + } + this._fireEvent("promiseChained", this, promise); + } + + var context = getContext(); + if (!((bitField & 50397184) === 0)) { + var handler, value, settler = target._settlePromiseCtx; + if (((bitField & 33554432) !== 0)) { + value = target._rejectionHandler0; + handler = didFulfill; + } else if (((bitField & 16777216) !== 0)) { + value = target._fulfillmentHandler0; + handler = didReject; + target._unsetRejectionIsUnhandled(); + } else { + settler = target._settlePromiseLateCancellationObserver; + value = new CancellationError("late cancellation observer"); + target._attachExtraTrace(value); + handler = didReject; + } + + async.invoke(settler, target, { + handler: util.contextBind(context, handler), + promise: promise, + receiver: receiver, + value: value + }); + } else { + target._addCallbacks(didFulfill, didReject, promise, + receiver, context); + } + + return promise; +}; + +Promise.prototype._length = function () { + return this._bitField & 65535; +}; + +Promise.prototype._isFateSealed = function () { + return (this._bitField & 117506048) !== 0; +}; + +Promise.prototype._isFollowing = function () { + return (this._bitField & 67108864) === 67108864; +}; + +Promise.prototype._setLength = function (len) { + this._bitField = (this._bitField & -65536) | + (len & 65535); +}; + +Promise.prototype._setFulfilled = function () { + this._bitField = this._bitField | 33554432; + this._fireEvent("promiseFulfilled", this); +}; + +Promise.prototype._setRejected = function () { + this._bitField = this._bitField | 16777216; + this._fireEvent("promiseRejected", this); +}; + +Promise.prototype._setFollowing = function () { + this._bitField = this._bitField | 67108864; + this._fireEvent("promiseResolved", this); +}; + +Promise.prototype._setIsFinal = function () { + this._bitField = this._bitField | 4194304; +}; + +Promise.prototype._isFinal = function () { + return (this._bitField & 4194304) > 0; +}; + +Promise.prototype._unsetCancelled = function() { + this._bitField = this._bitField & (~65536); +}; + +Promise.prototype._setCancelled = function() { + this._bitField = this._bitField | 65536; + this._fireEvent("promiseCancelled", this); +}; + +Promise.prototype._setWillBeCancelled = function() { + this._bitField = this._bitField | 8388608; +}; + +Promise.prototype._setAsyncGuaranteed = function() { + if (async.hasCustomScheduler()) return; + var bitField = this._bitField; + this._bitField = bitField | + (((bitField & 536870912) >> 2) ^ + 134217728); +}; + +Promise.prototype._setNoAsyncGuarantee = function() { + this._bitField = (this._bitField | 536870912) & + (~134217728); +}; + +Promise.prototype._receiverAt = function (index) { + var ret = index === 0 ? this._receiver0 : this[ + index * 4 - 4 + 3]; + if (ret === UNDEFINED_BINDING) { + return undefined; + } else if (ret === undefined && this._isBound()) { + return this._boundValue(); + } + return ret; +}; + +Promise.prototype._promiseAt = function (index) { + return this[ + index * 4 - 4 + 2]; +}; + +Promise.prototype._fulfillmentHandlerAt = function (index) { + return this[ + index * 4 - 4 + 0]; +}; + +Promise.prototype._rejectionHandlerAt = function (index) { + return this[ + index * 4 - 4 + 1]; +}; + +Promise.prototype._boundValue = function() {}; + +Promise.prototype._migrateCallback0 = function (follower) { + var bitField = follower._bitField; + var fulfill = follower._fulfillmentHandler0; + var reject = follower._rejectionHandler0; + var promise = follower._promise0; + var receiver = follower._receiverAt(0); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._migrateCallbackAt = function (follower, index) { + var fulfill = follower._fulfillmentHandlerAt(index); + var reject = follower._rejectionHandlerAt(index); + var promise = follower._promiseAt(index); + var receiver = follower._receiverAt(index); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._addCallbacks = function ( + fulfill, + reject, + promise, + receiver, + context +) { + var index = this._length(); + + if (index >= 65535 - 4) { + index = 0; + this._setLength(0); + } + + if (index === 0) { + this._promise0 = promise; + this._receiver0 = receiver; + if (typeof fulfill === "function") { + this._fulfillmentHandler0 = util.contextBind(context, fulfill); + } + if (typeof reject === "function") { + this._rejectionHandler0 = util.contextBind(context, reject); + } + } else { + var base = index * 4 - 4; + this[base + 2] = promise; + this[base + 3] = receiver; + if (typeof fulfill === "function") { + this[base + 0] = + util.contextBind(context, fulfill); + } + if (typeof reject === "function") { + this[base + 1] = + util.contextBind(context, reject); + } + } + this._setLength(index + 1); + return index; +}; + +Promise.prototype._proxy = function (proxyable, arg) { + this._addCallbacks(undefined, undefined, arg, proxyable, null); +}; + +Promise.prototype._resolveCallback = function(value, shouldBind) { + if (((this._bitField & 117506048) !== 0)) return; + if (value === this) + return this._rejectCallback(makeSelfResolutionError(), false); + var maybePromise = tryConvertToPromise(value, this); + if (!(maybePromise instanceof Promise)) return this._fulfill(value); + + if (shouldBind) this._propagateFrom(maybePromise, 2); + + + var promise = maybePromise._target(); + + if (promise === this) { + this._reject(makeSelfResolutionError()); + return; + } + + var bitField = promise._bitField; + if (((bitField & 50397184) === 0)) { + var len = this._length(); + if (len > 0) promise._migrateCallback0(this); + for (var i = 1; i < len; ++i) { + promise._migrateCallbackAt(this, i); + } + this._setFollowing(); + this._setLength(0); + this._setFollowee(maybePromise); + } else if (((bitField & 33554432) !== 0)) { + this._fulfill(promise._value()); + } else if (((bitField & 16777216) !== 0)) { + this._reject(promise._reason()); + } else { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + this._reject(reason); + } +}; + +Promise.prototype._rejectCallback = +function(reason, synchronous, ignoreNonErrorWarnings) { + var trace = util.ensureErrorObject(reason); + var hasStack = trace === reason; + if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) { + var message = "a promise was rejected with a non-error: " + + util.classString(reason); + this._warn(message, true); + } + this._attachExtraTrace(trace, synchronous ? hasStack : false); + this._reject(reason); +}; + +Promise.prototype._resolveFromExecutor = function (executor) { + if (executor === INTERNAL) return; + var promise = this; + this._captureStackTrace(); + this._pushContext(); + var synchronous = true; + var r = this._execute(executor, function(value) { + promise._resolveCallback(value); + }, function (reason) { + promise._rejectCallback(reason, synchronous); + }); + synchronous = false; + this._popContext(); + + if (r !== undefined) { + promise._rejectCallback(r, true); + } +}; + +Promise.prototype._settlePromiseFromHandler = function ( + handler, receiver, value, promise +) { + var bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + promise._pushContext(); + var x; + if (receiver === APPLY) { + if (!value || typeof value.length !== "number") { + x = errorObj; + x.e = new TypeError("cannot .spread() a non-array: " + + util.classString(value)); + } else { + x = tryCatch(handler).apply(this._boundValue(), value); + } + } else { + x = tryCatch(handler).call(receiver, value); + } + var promiseCreated = promise._popContext(); + bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + + if (x === NEXT_FILTER) { + promise._reject(value); + } else if (x === errorObj) { + promise._rejectCallback(x.e, false); + } else { + debug.checkForgottenReturns(x, promiseCreated, "", promise, this); + promise._resolveCallback(x); + } +}; + +Promise.prototype._target = function() { + var ret = this; + while (ret._isFollowing()) ret = ret._followee(); + return ret; +}; + +Promise.prototype._followee = function() { + return this._rejectionHandler0; +}; + +Promise.prototype._setFollowee = function(promise) { + this._rejectionHandler0 = promise; +}; + +Promise.prototype._settlePromise = function(promise, handler, receiver, value) { + var isPromise = promise instanceof Promise; + var bitField = this._bitField; + var asyncGuaranteed = ((bitField & 134217728) !== 0); + if (((bitField & 65536) !== 0)) { + if (isPromise) promise._invokeInternalOnCancel(); + + if (receiver instanceof PassThroughHandlerContext && + receiver.isFinallyHandler()) { + receiver.cancelPromise = promise; + if (tryCatch(handler).call(receiver, value) === errorObj) { + promise._reject(errorObj.e); + } + } else if (handler === reflectHandler) { + promise._fulfill(reflectHandler.call(receiver)); + } else if (receiver instanceof Proxyable) { + receiver._promiseCancelled(promise); + } else if (isPromise || promise instanceof PromiseArray) { + promise._cancel(); + } else { + receiver.cancel(); + } + } else if (typeof handler === "function") { + if (!isPromise) { + handler.call(receiver, value, promise); + } else { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (receiver instanceof Proxyable) { + if (!receiver._isResolved()) { + if (((bitField & 33554432) !== 0)) { + receiver._promiseFulfilled(value, promise); + } else { + receiver._promiseRejected(value, promise); + } + } + } else if (isPromise) { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + if (((bitField & 33554432) !== 0)) { + promise._fulfill(value); + } else { + promise._reject(value); + } + } +}; + +Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) { + var handler = ctx.handler; + var promise = ctx.promise; + var receiver = ctx.receiver; + var value = ctx.value; + if (typeof handler === "function") { + if (!(promise instanceof Promise)) { + handler.call(receiver, value, promise); + } else { + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (promise instanceof Promise) { + promise._reject(value); + } +}; + +Promise.prototype._settlePromiseCtx = function(ctx) { + this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value); +}; + +Promise.prototype._settlePromise0 = function(handler, value, bitField) { + var promise = this._promise0; + var receiver = this._receiverAt(0); + this._promise0 = undefined; + this._receiver0 = undefined; + this._settlePromise(promise, handler, receiver, value); +}; + +Promise.prototype._clearCallbackDataAtIndex = function(index) { + var base = index * 4 - 4; + this[base + 2] = + this[base + 3] = + this[base + 0] = + this[base + 1] = undefined; +}; + +Promise.prototype._fulfill = function (value) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + if (value === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._reject(err); + } + this._setFulfilled(); + this._rejectionHandler0 = value; + + if ((bitField & 65535) > 0) { + if (((bitField & 134217728) !== 0)) { + this._settlePromises(); + } else { + async.settlePromises(this); + } + this._dereferenceTrace(); + } +}; + +Promise.prototype._reject = function (reason) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + this._setRejected(); + this._fulfillmentHandler0 = reason; + + if (this._isFinal()) { + return async.fatalError(reason, util.isNode); + } + + if ((bitField & 65535) > 0) { + async.settlePromises(this); + } else { + this._ensurePossibleRejectionHandled(); + } +}; + +Promise.prototype._fulfillPromises = function (len, value) { + for (var i = 1; i < len; i++) { + var handler = this._fulfillmentHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, value); + } +}; + +Promise.prototype._rejectPromises = function (len, reason) { + for (var i = 1; i < len; i++) { + var handler = this._rejectionHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, reason); + } +}; + +Promise.prototype._settlePromises = function () { + var bitField = this._bitField; + var len = (bitField & 65535); + + if (len > 0) { + if (((bitField & 16842752) !== 0)) { + var reason = this._fulfillmentHandler0; + this._settlePromise0(this._rejectionHandler0, reason, bitField); + this._rejectPromises(len, reason); + } else { + var value = this._rejectionHandler0; + this._settlePromise0(this._fulfillmentHandler0, value, bitField); + this._fulfillPromises(len, value); + } + this._setLength(0); + } + this._clearCancellationData(); +}; + +Promise.prototype._settledValue = function() { + var bitField = this._bitField; + if (((bitField & 33554432) !== 0)) { + return this._rejectionHandler0; + } else if (((bitField & 16777216) !== 0)) { + return this._fulfillmentHandler0; + } +}; + +if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + es5.defineProperty(Promise.prototype, Symbol.toStringTag, { + get: function () { + return "Object"; + } + }); +} + +function deferResolve(v) {this.promise._resolveCallback(v);} +function deferReject(v) {this.promise._rejectCallback(v, false);} + +Promise.defer = Promise.pending = function() { + debug.deprecated("Promise.defer", "new Promise"); + var promise = new Promise(INTERNAL); + return { + promise: promise, + resolve: deferResolve, + reject: deferReject + }; +}; + +util.notEnumerableProp(Promise, + "_makeSelfResolutionError", + makeSelfResolutionError); + +__nccwpck_require__(97415)(Promise, INTERNAL, tryConvertToPromise, apiRejection, + debug); +__nccwpck_require__(13767)(Promise, INTERNAL, tryConvertToPromise, debug); +__nccwpck_require__(6616)(Promise, PromiseArray, apiRejection, debug); +__nccwpck_require__(8277)(Promise); +__nccwpck_require__(46653)(Promise); +__nccwpck_require__(25248)( + Promise, PromiseArray, tryConvertToPromise, INTERNAL, async); +Promise.Promise = Promise; +Promise.version = "3.7.2"; +__nccwpck_require__(70924)(Promise); +__nccwpck_require__(28619)(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug); +__nccwpck_require__(98150)(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +__nccwpck_require__(35447)(Promise); +__nccwpck_require__(33047)(Promise, INTERNAL); +__nccwpck_require__(95261)(Promise, PromiseArray, tryConvertToPromise, apiRejection); +__nccwpck_require__(10256)(Promise, INTERNAL, tryConvertToPromise, apiRejection); +__nccwpck_require__(48959)(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +__nccwpck_require__(76087)(Promise, PromiseArray, debug); +__nccwpck_require__(21156)(Promise, PromiseArray, apiRejection); +__nccwpck_require__(32114)(Promise, INTERNAL, debug); +__nccwpck_require__(880)(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); +__nccwpck_require__(35490)(Promise); +__nccwpck_require__(90838)(Promise, INTERNAL); +__nccwpck_require__(42223)(Promise, INTERNAL); + + util.toFastProperties(Promise); + util.toFastProperties(Promise.prototype); + function fillTypes(value) { + var p = new Promise(INTERNAL); + p._fulfillmentHandler0 = value; + p._rejectionHandler0 = value; + p._promise0 = value; + p._receiver0 = value; + } + // Complete slack tracking, opt out of field-type tracking and + // stabilize map + fillTypes({a: 1}); + fillTypes({b: 2}); + fillTypes({c: 3}); + fillTypes(1); + fillTypes(function(){}); + fillTypes(undefined); + fillTypes(false); + fillTypes(new Promise(INTERNAL)); + debug.setBounds(Async.firstLineError, util.lastLineError); + return Promise; + +}; + + +/***/ }), + +/***/ 85307: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise, INTERNAL, tryConvertToPromise, + apiRejection, Proxyable) { +var util = __nccwpck_require__(37448); +var isArray = util.isArray; + +function toResolutionValue(val) { + switch(val) { + case -2: return []; + case -3: return {}; + case -6: return new Map(); + } +} + +function PromiseArray(values) { + var promise = this._promise = new Promise(INTERNAL); + if (values instanceof Promise) { + promise._propagateFrom(values, 3); + values.suppressUnhandledRejections(); + } + promise._setOnCancel(this); + this._values = values; + this._length = 0; + this._totalResolved = 0; + this._init(undefined, -2); +} +util.inherits(PromiseArray, Proxyable); + +PromiseArray.prototype.length = function () { + return this._length; +}; + +PromiseArray.prototype.promise = function () { + return this._promise; +}; + +PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) { + var values = tryConvertToPromise(this._values, this._promise); + if (values instanceof Promise) { + values = values._target(); + var bitField = values._bitField; + ; + this._values = values; + + if (((bitField & 50397184) === 0)) { + this._promise._setAsyncGuaranteed(); + return values._then( + init, + this._reject, + undefined, + this, + resolveValueIfEmpty + ); + } else if (((bitField & 33554432) !== 0)) { + values = values._value(); + } else if (((bitField & 16777216) !== 0)) { + return this._reject(values._reason()); + } else { + return this._cancel(); + } + } + values = util.asArray(values); + if (values === null) { + var err = apiRejection( + "expecting an array or an iterable object but got " + util.classString(values)).reason(); + this._promise._rejectCallback(err, false); + return; + } + + if (values.length === 0) { + if (resolveValueIfEmpty === -5) { + this._resolveEmptyArray(); + } + else { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + } + return; + } + this._iterate(values); +}; + +PromiseArray.prototype._iterate = function(values) { + var len = this.getActualLength(values.length); + this._length = len; + this._values = this.shouldCopyValues() ? new Array(len) : this._values; + var result = this._promise; + var isResolved = false; + var bitField = null; + for (var i = 0; i < len; ++i) { + var maybePromise = tryConvertToPromise(values[i], result); + + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + bitField = maybePromise._bitField; + } else { + bitField = null; + } + + if (isResolved) { + if (bitField !== null) { + maybePromise.suppressUnhandledRejections(); + } + } else if (bitField !== null) { + if (((bitField & 50397184) === 0)) { + maybePromise._proxy(this, i); + this._values[i] = maybePromise; + } else if (((bitField & 33554432) !== 0)) { + isResolved = this._promiseFulfilled(maybePromise._value(), i); + } else if (((bitField & 16777216) !== 0)) { + isResolved = this._promiseRejected(maybePromise._reason(), i); + } else { + isResolved = this._promiseCancelled(i); + } + } else { + isResolved = this._promiseFulfilled(maybePromise, i); + } + } + if (!isResolved) result._setAsyncGuaranteed(); +}; + +PromiseArray.prototype._isResolved = function () { + return this._values === null; +}; + +PromiseArray.prototype._resolve = function (value) { + this._values = null; + this._promise._fulfill(value); +}; + +PromiseArray.prototype._cancel = function() { + if (this._isResolved() || !this._promise._isCancellable()) return; + this._values = null; + this._promise._cancel(); +}; + +PromiseArray.prototype._reject = function (reason) { + this._values = null; + this._promise._rejectCallback(reason, false); +}; + +PromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +PromiseArray.prototype._promiseCancelled = function() { + this._cancel(); + return true; +}; + +PromiseArray.prototype._promiseRejected = function (reason) { + this._totalResolved++; + this._reject(reason); + return true; +}; + +PromiseArray.prototype._resultCancelled = function() { + if (this._isResolved()) return; + var values = this._values; + this._cancel(); + if (values instanceof Promise) { + values.cancel(); + } else { + for (var i = 0; i < values.length; ++i) { + if (values[i] instanceof Promise) { + values[i].cancel(); + } + } + } +}; + +PromiseArray.prototype.shouldCopyValues = function () { + return true; +}; + +PromiseArray.prototype.getActualLength = function (len) { + return len; +}; + +return PromiseArray; +}; + + +/***/ }), + +/***/ 33047: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise, INTERNAL) { +var THIS = {}; +var util = __nccwpck_require__(37448); +var nodebackForPromise = __nccwpck_require__(4315); +var withAppended = util.withAppended; +var maybeWrapAsError = util.maybeWrapAsError; +var canEvaluate = util.canEvaluate; +var TypeError = __nccwpck_require__(35816).TypeError; +var defaultSuffix = "Async"; +var defaultPromisified = {__isPromisified__: true}; +var noCopyProps = [ + "arity", "length", + "name", + "arguments", + "caller", + "callee", + "prototype", + "__isPromisified__" +]; +var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$"); + +var defaultFilter = function(name) { + return util.isIdentifier(name) && + name.charAt(0) !== "_" && + name !== "constructor"; +}; + +function propsFilter(key) { + return !noCopyPropsPattern.test(key); +} + +function isPromisified(fn) { + try { + return fn.__isPromisified__ === true; + } + catch (e) { + return false; + } +} + +function hasPromisified(obj, key, suffix) { + var val = util.getDataPropertyOrDefault(obj, key + suffix, + defaultPromisified); + return val ? isPromisified(val) : false; +} +function checkValid(ret, suffix, suffixRegexp) { + for (var i = 0; i < ret.length; i += 2) { + var key = ret[i]; + if (suffixRegexp.test(key)) { + var keyWithoutAsyncSuffix = key.replace(suffixRegexp, ""); + for (var j = 0; j < ret.length; j += 2) { + if (ret[j] === keyWithoutAsyncSuffix) { + throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a" + .replace("%s", suffix)); + } + } + } + } +} + +function promisifiableMethods(obj, suffix, suffixRegexp, filter) { + var keys = util.inheritedDataKeys(obj); + var ret = []; + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var value = obj[key]; + var passesDefaultFilter = filter === defaultFilter + ? true : defaultFilter(key, value, obj); + if (typeof value === "function" && + !isPromisified(value) && + !hasPromisified(obj, key, suffix) && + filter(key, value, obj, passesDefaultFilter)) { + ret.push(key, value); + } + } + checkValid(ret, suffix, suffixRegexp); + return ret; +} + +var escapeIdentRegex = function(str) { + return str.replace(/([$])/, "\\$"); +}; + +var makeNodePromisifiedEval; +if (true) { +var switchCaseArgumentOrder = function(likelyArgumentCount) { + var ret = [likelyArgumentCount]; + var min = Math.max(0, likelyArgumentCount - 1 - 3); + for(var i = likelyArgumentCount - 1; i >= min; --i) { + ret.push(i); + } + for(var i = likelyArgumentCount + 1; i <= 3; ++i) { + ret.push(i); + } + return ret; +}; + +var argumentSequence = function(argumentCount) { + return util.filledRange(argumentCount, "_arg", ""); +}; + +var parameterDeclaration = function(parameterCount) { + return util.filledRange( + Math.max(parameterCount, 3), "_arg", ""); +}; + +var parameterCount = function(fn) { + if (typeof fn.length === "number") { + return Math.max(Math.min(fn.length, 1023 + 1), 0); + } + return 0; +}; + +makeNodePromisifiedEval = +function(callback, receiver, originalName, fn, _, multiArgs) { + var newParameterCount = Math.max(0, parameterCount(fn) - 1); + var argumentOrder = switchCaseArgumentOrder(newParameterCount); + var shouldProxyThis = typeof callback === "string" || receiver === THIS; + + function generateCallForArgumentCount(count) { + var args = argumentSequence(count).join(", "); + var comma = count > 0 ? ", " : ""; + var ret; + if (shouldProxyThis) { + ret = "ret = callback.call(this, {{args}}, nodeback); break;\n"; + } else { + ret = receiver === undefined + ? "ret = callback({{args}}, nodeback); break;\n" + : "ret = callback.call(receiver, {{args}}, nodeback); break;\n"; + } + return ret.replace("{{args}}", args).replace(", ", comma); + } + + function generateArgumentSwitchCase() { + var ret = ""; + for (var i = 0; i < argumentOrder.length; ++i) { + ret += "case " + argumentOrder[i] +":" + + generateCallForArgumentCount(argumentOrder[i]); + } + + ret += " \n\ + default: \n\ + var args = new Array(len + 1); \n\ + var i = 0; \n\ + for (var i = 0; i < len; ++i) { \n\ + args[i] = arguments[i]; \n\ + } \n\ + args[i] = nodeback; \n\ + [CodeForCall] \n\ + break; \n\ + ".replace("[CodeForCall]", (shouldProxyThis + ? "ret = callback.apply(this, args);\n" + : "ret = callback.apply(receiver, args);\n")); + return ret; + } + + var getFunctionCode = typeof callback === "string" + ? ("this != null ? this['"+callback+"'] : fn") + : "fn"; + var body = "'use strict'; \n\ + var ret = function (Parameters) { \n\ + 'use strict'; \n\ + var len = arguments.length; \n\ + var promise = new Promise(INTERNAL); \n\ + promise._captureStackTrace(); \n\ + var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\ + var ret; \n\ + var callback = tryCatch([GetFunctionCode]); \n\ + switch(len) { \n\ + [CodeForSwitchCase] \n\ + } \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\ + } \n\ + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\ + return promise; \n\ + }; \n\ + notEnumerableProp(ret, '__isPromisified__', true); \n\ + return ret; \n\ + ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase()) + .replace("[GetFunctionCode]", getFunctionCode); + body = body.replace("Parameters", parameterDeclaration(newParameterCount)); + return new Function("Promise", + "fn", + "receiver", + "withAppended", + "maybeWrapAsError", + "nodebackForPromise", + "tryCatch", + "errorObj", + "notEnumerableProp", + "INTERNAL", + body)( + Promise, + fn, + receiver, + withAppended, + maybeWrapAsError, + nodebackForPromise, + util.tryCatch, + util.errorObj, + util.notEnumerableProp, + INTERNAL); +}; +} + +function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) { + var defaultThis = (function() {return this;})(); + var method = callback; + if (typeof method === "string") { + callback = fn; + } + function promisified() { + var _receiver = receiver; + if (receiver === THIS) _receiver = this; + var promise = new Promise(INTERNAL); + promise._captureStackTrace(); + var cb = typeof method === "string" && this !== defaultThis + ? this[method] : callback; + var fn = nodebackForPromise(promise, multiArgs); + try { + cb.apply(_receiver, withAppended(arguments, fn)); + } catch(e) { + promise._rejectCallback(maybeWrapAsError(e), true, true); + } + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); + return promise; + } + util.notEnumerableProp(promisified, "__isPromisified__", true); + return promisified; +} + +var makeNodePromisified = canEvaluate + ? makeNodePromisifiedEval + : makeNodePromisifiedClosure; + +function promisifyAll(obj, suffix, filter, promisifier, multiArgs) { + var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$"); + var methods = + promisifiableMethods(obj, suffix, suffixRegexp, filter); + + for (var i = 0, len = methods.length; i < len; i+= 2) { + var key = methods[i]; + var fn = methods[i+1]; + var promisifiedKey = key + suffix; + if (promisifier === makeNodePromisified) { + obj[promisifiedKey] = + makeNodePromisified(key, THIS, key, fn, suffix, multiArgs); + } else { + var promisified = promisifier(fn, function() { + return makeNodePromisified(key, THIS, key, + fn, suffix, multiArgs); + }); + util.notEnumerableProp(promisified, "__isPromisified__", true); + obj[promisifiedKey] = promisified; + } + } + util.toFastProperties(obj); + return obj; +} + +function promisify(callback, receiver, multiArgs) { + return makeNodePromisified(callback, receiver, undefined, + callback, null, multiArgs); +} + +Promise.promisify = function (fn, options) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + if (isPromisified(fn)) { + return fn; + } + options = Object(options); + var receiver = options.context === undefined ? THIS : options.context; + var multiArgs = !!options.multiArgs; + var ret = promisify(fn, receiver, multiArgs); + util.copyDescriptors(fn, ret, propsFilter); + return ret; +}; + +Promise.promisifyAll = function (target, options) { + if (typeof target !== "function" && typeof target !== "object") { + throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + options = Object(options); + var multiArgs = !!options.multiArgs; + var suffix = options.suffix; + if (typeof suffix !== "string") suffix = defaultSuffix; + var filter = options.filter; + if (typeof filter !== "function") filter = defaultFilter; + var promisifier = options.promisifier; + if (typeof promisifier !== "function") promisifier = makeNodePromisified; + + if (!util.isIdentifier(suffix)) { + throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + + var keys = util.inheritedDataKeys(target); + for (var i = 0; i < keys.length; ++i) { + var value = target[keys[i]]; + if (keys[i] !== "constructor" && + util.isClass(value)) { + promisifyAll(value.prototype, suffix, filter, promisifier, + multiArgs); + promisifyAll(value, suffix, filter, promisifier, multiArgs); + } + } + + return promisifyAll(target, suffix, filter, promisifier, multiArgs); +}; +}; + + + +/***/ }), + +/***/ 95261: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function( + Promise, PromiseArray, tryConvertToPromise, apiRejection) { +var util = __nccwpck_require__(37448); +var isObject = util.isObject; +var es5 = __nccwpck_require__(43062); +var Es6Map; +if (typeof Map === "function") Es6Map = Map; + +var mapToEntries = (function() { + var index = 0; + var size = 0; + + function extractEntry(value, key) { + this[index] = value; + this[index + size] = key; + index++; + } + + return function mapToEntries(map) { + size = map.size; + index = 0; + var ret = new Array(map.size * 2); + map.forEach(extractEntry, ret); + return ret; + }; +})(); + +var entriesToMap = function(entries) { + var ret = new Es6Map(); + var length = entries.length / 2 | 0; + for (var i = 0; i < length; ++i) { + var key = entries[length + i]; + var value = entries[i]; + ret.set(key, value); + } + return ret; +}; + +function PropertiesPromiseArray(obj) { + var isMap = false; + var entries; + if (Es6Map !== undefined && obj instanceof Es6Map) { + entries = mapToEntries(obj); + isMap = true; + } else { + var keys = es5.keys(obj); + var len = keys.length; + entries = new Array(len * 2); + for (var i = 0; i < len; ++i) { + var key = keys[i]; + entries[i] = obj[key]; + entries[i + len] = key; + } + } + this.constructor$(entries); + this._isMap = isMap; + this._init$(undefined, isMap ? -6 : -3); +} +util.inherits(PropertiesPromiseArray, PromiseArray); + +PropertiesPromiseArray.prototype._init = function () {}; + +PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + var val; + if (this._isMap) { + val = entriesToMap(this._values); + } else { + val = {}; + var keyOffset = this.length(); + for (var i = 0, len = this.length(); i < len; ++i) { + val[this._values[i + keyOffset]] = this._values[i]; + } + } + this._resolve(val); + return true; + } + return false; +}; + +PropertiesPromiseArray.prototype.shouldCopyValues = function () { + return false; +}; + +PropertiesPromiseArray.prototype.getActualLength = function (len) { + return len >> 1; +}; + +function props(promises) { + var ret; + var castValue = tryConvertToPromise(promises); + + if (!isObject(castValue)) { + return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } else if (castValue instanceof Promise) { + ret = castValue._then( + Promise.props, undefined, undefined, undefined, undefined); + } else { + ret = new PropertiesPromiseArray(castValue).promise(); + } + + if (castValue instanceof Promise) { + ret._propagateFrom(castValue, 2); + } + return ret; +} + +Promise.prototype.props = function () { + return props(this); +}; + +Promise.props = function (promises) { + return props(promises); +}; +}; + + +/***/ }), + +/***/ 30878: +/***/ ((module) => { + +"use strict"; + +function arrayMove(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + src[j + srcIndex] = void 0; + } +} + +function Queue(capacity) { + this._capacity = capacity; + this._length = 0; + this._front = 0; +} + +Queue.prototype._willBeOverCapacity = function (size) { + return this._capacity < size; +}; + +Queue.prototype._pushOne = function (arg) { + var length = this.length(); + this._checkCapacity(length + 1); + var i = (this._front + length) & (this._capacity - 1); + this[i] = arg; + this._length = length + 1; +}; + +Queue.prototype.push = function (fn, receiver, arg) { + var length = this.length() + 3; + if (this._willBeOverCapacity(length)) { + this._pushOne(fn); + this._pushOne(receiver); + this._pushOne(arg); + return; + } + var j = this._front + length - 3; + this._checkCapacity(length); + var wrapMask = this._capacity - 1; + this[(j + 0) & wrapMask] = fn; + this[(j + 1) & wrapMask] = receiver; + this[(j + 2) & wrapMask] = arg; + this._length = length; +}; + +Queue.prototype.shift = function () { + var front = this._front, + ret = this[front]; + + this[front] = undefined; + this._front = (front + 1) & (this._capacity - 1); + this._length--; + return ret; +}; + +Queue.prototype.length = function () { + return this._length; +}; + +Queue.prototype._checkCapacity = function (size) { + if (this._capacity < size) { + this._resizeTo(this._capacity << 1); + } +}; + +Queue.prototype._resizeTo = function (capacity) { + var oldCapacity = this._capacity; + this._capacity = capacity; + var front = this._front; + var length = this._length; + var moveItemsCount = (front + length) & (oldCapacity - 1); + arrayMove(this, 0, this, oldCapacity, moveItemsCount); +}; + +module.exports = Queue; + + +/***/ }), + +/***/ 10256: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function( + Promise, INTERNAL, tryConvertToPromise, apiRejection) { +var util = __nccwpck_require__(37448); + +var raceLater = function (promise) { + return promise.then(function(array) { + return race(array, promise); + }); +}; + +function race(promises, parent) { + var maybePromise = tryConvertToPromise(promises); + + if (maybePromise instanceof Promise) { + return raceLater(maybePromise); + } else { + promises = util.asArray(promises); + if (promises === null) + return apiRejection("expecting an array or an iterable object but got " + util.classString(promises)); + } + + var ret = new Promise(INTERNAL); + if (parent !== undefined) { + ret._propagateFrom(parent, 3); + } + var fulfill = ret._fulfill; + var reject = ret._reject; + for (var i = 0, len = promises.length; i < len; ++i) { + var val = promises[i]; + + if (val === undefined && !(i in promises)) { + continue; + } + + Promise.cast(val)._then(fulfill, reject, undefined, ret, null); + } + return ret; +} + +Promise.race = function (promises) { + return race(promises, undefined); +}; + +Promise.prototype.race = function () { + return race(this, undefined); +}; + +}; + + +/***/ }), + +/***/ 48959: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise, + PromiseArray, + apiRejection, + tryConvertToPromise, + INTERNAL, + debug) { +var util = __nccwpck_require__(37448); +var tryCatch = util.tryCatch; + +function ReductionPromiseArray(promises, fn, initialValue, _each) { + this.constructor$(promises); + var context = Promise._getContext(); + this._fn = util.contextBind(context, fn); + if (initialValue !== undefined) { + initialValue = Promise.resolve(initialValue); + initialValue._attachCancellationCallback(this); + } + this._initialValue = initialValue; + this._currentCancellable = null; + if(_each === INTERNAL) { + this._eachValues = Array(this._length); + } else if (_each === 0) { + this._eachValues = null; + } else { + this._eachValues = undefined; + } + this._promise._captureStackTrace(); + this._init$(undefined, -5); +} +util.inherits(ReductionPromiseArray, PromiseArray); + +ReductionPromiseArray.prototype._gotAccum = function(accum) { + if (this._eachValues !== undefined && + this._eachValues !== null && + accum !== INTERNAL) { + this._eachValues.push(accum); + } +}; + +ReductionPromiseArray.prototype._eachComplete = function(value) { + if (this._eachValues !== null) { + this._eachValues.push(value); + } + return this._eachValues; +}; + +ReductionPromiseArray.prototype._init = function() {}; + +ReductionPromiseArray.prototype._resolveEmptyArray = function() { + this._resolve(this._eachValues !== undefined ? this._eachValues + : this._initialValue); +}; + +ReductionPromiseArray.prototype.shouldCopyValues = function () { + return false; +}; + +ReductionPromiseArray.prototype._resolve = function(value) { + this._promise._resolveCallback(value); + this._values = null; +}; + +ReductionPromiseArray.prototype._resultCancelled = function(sender) { + if (sender === this._initialValue) return this._cancel(); + if (this._isResolved()) return; + this._resultCancelled$(); + if (this._currentCancellable instanceof Promise) { + this._currentCancellable.cancel(); + } + if (this._initialValue instanceof Promise) { + this._initialValue.cancel(); + } +}; + +ReductionPromiseArray.prototype._iterate = function (values) { + this._values = values; + var value; + var i; + var length = values.length; + if (this._initialValue !== undefined) { + value = this._initialValue; + i = 0; + } else { + value = Promise.resolve(values[0]); + i = 1; + } + + this._currentCancellable = value; + + for (var j = i; j < length; ++j) { + var maybePromise = values[j]; + if (maybePromise instanceof Promise) { + maybePromise.suppressUnhandledRejections(); + } + } + + if (!value.isRejected()) { + for (; i < length; ++i) { + var ctx = { + accum: null, + value: values[i], + index: i, + length: length, + array: this + }; + + value = value._then(gotAccum, undefined, undefined, ctx, undefined); + + if ((i & 127) === 0) { + value._setNoAsyncGuarantee(); + } + } + } + + if (this._eachValues !== undefined) { + value = value + ._then(this._eachComplete, undefined, undefined, this, undefined); + } + value._then(completed, completed, undefined, value, this); +}; + +Promise.prototype.reduce = function (fn, initialValue) { + return reduce(this, fn, initialValue, null); +}; + +Promise.reduce = function (promises, fn, initialValue, _each) { + return reduce(promises, fn, initialValue, _each); +}; + +function completed(valueOrReason, array) { + if (this.isFulfilled()) { + array._resolve(valueOrReason); + } else { + array._reject(valueOrReason); + } +} + +function reduce(promises, fn, initialValue, _each) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var array = new ReductionPromiseArray(promises, fn, initialValue, _each); + return array.promise(); +} + +function gotAccum(accum) { + this.accum = accum; + this.array._gotAccum(accum); + var value = tryConvertToPromise(this.value, this.array._promise); + if (value instanceof Promise) { + this.array._currentCancellable = value; + return value._then(gotValue, undefined, undefined, this, undefined); + } else { + return gotValue.call(this, value); + } +} + +function gotValue(value) { + var array = this.array; + var promise = array._promise; + var fn = tryCatch(array._fn); + promise._pushContext(); + var ret; + if (array._eachValues !== undefined) { + ret = fn.call(promise._boundValue(), value, this.index, this.length); + } else { + ret = fn.call(promise._boundValue(), + this.accum, value, this.index, this.length); + } + if (ret instanceof Promise) { + array._currentCancellable = ret; + } + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, + promiseCreated, + array._eachValues !== undefined ? "Promise.each" : "Promise.reduce", + promise + ); + return ret; +} +}; + + +/***/ }), + +/***/ 76203: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var util = __nccwpck_require__(37448); +var schedule; +var noAsyncScheduler = function() { + throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var NativePromise = util.getNativePromise(); +if (util.isNode && typeof MutationObserver === "undefined") { + var GlobalSetImmediate = global.setImmediate; + var ProcessNextTick = process.nextTick; + schedule = util.isRecentNode + ? function(fn) { GlobalSetImmediate.call(global, fn); } + : function(fn) { ProcessNextTick.call(process, fn); }; +} else if (typeof NativePromise === "function" && + typeof NativePromise.resolve === "function") { + var nativePromise = NativePromise.resolve(); + schedule = function(fn) { + nativePromise.then(fn); + }; +} else if ((typeof MutationObserver !== "undefined") && + !(typeof window !== "undefined" && + window.navigator && + (window.navigator.standalone || window.cordova)) && + ("classList" in document.documentElement)) { + schedule = (function() { + var div = document.createElement("div"); + var opts = {attributes: true}; + var toggleScheduled = false; + var div2 = document.createElement("div"); + var o2 = new MutationObserver(function() { + div.classList.toggle("foo"); + toggleScheduled = false; + }); + o2.observe(div2, opts); + + var scheduleToggle = function() { + if (toggleScheduled) return; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; + + return function schedule(fn) { + var o = new MutationObserver(function() { + o.disconnect(); + fn(); + }); + o.observe(div, opts); + scheduleToggle(); + }; + })(); +} else if (typeof setImmediate !== "undefined") { + schedule = function (fn) { + setImmediate(fn); + }; +} else if (typeof setTimeout !== "undefined") { + schedule = function (fn) { + setTimeout(fn, 0); + }; +} else { + schedule = noAsyncScheduler; +} +module.exports = schedule; + + +/***/ }), + +/***/ 76087: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = + function(Promise, PromiseArray, debug) { +var PromiseInspection = Promise.PromiseInspection; +var util = __nccwpck_require__(37448); + +function SettledPromiseArray(values) { + this.constructor$(values); +} +util.inherits(SettledPromiseArray, PromiseArray); + +SettledPromiseArray.prototype._promiseResolved = function (index, inspection) { + this._values[index] = inspection; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +SettledPromiseArray.prototype._promiseFulfilled = function (value, index) { + var ret = new PromiseInspection(); + ret._bitField = 33554432; + ret._settledValueField = value; + return this._promiseResolved(index, ret); +}; +SettledPromiseArray.prototype._promiseRejected = function (reason, index) { + var ret = new PromiseInspection(); + ret._bitField = 16777216; + ret._settledValueField = reason; + return this._promiseResolved(index, ret); +}; + +Promise.settle = function (promises) { + debug.deprecated(".settle()", ".reflect()"); + return new SettledPromiseArray(promises).promise(); +}; + +Promise.allSettled = function (promises) { + return new SettledPromiseArray(promises).promise(); +}; + +Promise.prototype.settle = function () { + return Promise.settle(this); +}; +}; + + +/***/ }), + +/***/ 21156: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = +function(Promise, PromiseArray, apiRejection) { +var util = __nccwpck_require__(37448); +var RangeError = __nccwpck_require__(35816).RangeError; +var AggregateError = __nccwpck_require__(35816).AggregateError; +var isArray = util.isArray; +var CANCELLATION = {}; + + +function SomePromiseArray(values) { + this.constructor$(values); + this._howMany = 0; + this._unwrap = false; + this._initialized = false; +} +util.inherits(SomePromiseArray, PromiseArray); + +SomePromiseArray.prototype._init = function () { + if (!this._initialized) { + return; + } + if (this._howMany === 0) { + this._resolve([]); + return; + } + this._init$(undefined, -5); + var isArrayResolved = isArray(this._values); + if (!this._isResolved() && + isArrayResolved && + this._howMany > this._canPossiblyFulfill()) { + this._reject(this._getRangeError(this.length())); + } +}; + +SomePromiseArray.prototype.init = function () { + this._initialized = true; + this._init(); +}; + +SomePromiseArray.prototype.setUnwrap = function () { + this._unwrap = true; +}; + +SomePromiseArray.prototype.howMany = function () { + return this._howMany; +}; + +SomePromiseArray.prototype.setHowMany = function (count) { + this._howMany = count; +}; + +SomePromiseArray.prototype._promiseFulfilled = function (value) { + this._addFulfilled(value); + if (this._fulfilled() === this.howMany()) { + this._values.length = this.howMany(); + if (this.howMany() === 1 && this._unwrap) { + this._resolve(this._values[0]); + } else { + this._resolve(this._values); + } + return true; + } + return false; + +}; +SomePromiseArray.prototype._promiseRejected = function (reason) { + this._addRejected(reason); + return this._checkOutcome(); +}; + +SomePromiseArray.prototype._promiseCancelled = function () { + if (this._values instanceof Promise || this._values == null) { + return this._cancel(); + } + this._addRejected(CANCELLATION); + return this._checkOutcome(); +}; + +SomePromiseArray.prototype._checkOutcome = function() { + if (this.howMany() > this._canPossiblyFulfill()) { + var e = new AggregateError(); + for (var i = this.length(); i < this._values.length; ++i) { + if (this._values[i] !== CANCELLATION) { + e.push(this._values[i]); + } + } + if (e.length > 0) { + this._reject(e); + } else { + this._cancel(); + } + return true; + } + return false; +}; + +SomePromiseArray.prototype._fulfilled = function () { + return this._totalResolved; +}; + +SomePromiseArray.prototype._rejected = function () { + return this._values.length - this.length(); +}; + +SomePromiseArray.prototype._addRejected = function (reason) { + this._values.push(reason); +}; + +SomePromiseArray.prototype._addFulfilled = function (value) { + this._values[this._totalResolved++] = value; +}; + +SomePromiseArray.prototype._canPossiblyFulfill = function () { + return this.length() - this._rejected(); +}; + +SomePromiseArray.prototype._getRangeError = function (count) { + var message = "Input array must contain at least " + + this._howMany + " items but contains only " + count + " items"; + return new RangeError(message); +}; + +SomePromiseArray.prototype._resolveEmptyArray = function () { + this._reject(this._getRangeError(0)); +}; + +function some(promises, howMany) { + if ((howMany | 0) !== howMany || howMany < 0) { + return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var ret = new SomePromiseArray(promises); + var promise = ret.promise(); + ret.setHowMany(howMany); + ret.init(); + return promise; +} + +Promise.some = function (promises, howMany) { + return some(promises, howMany); +}; + +Promise.prototype.some = function (howMany) { + return some(this, howMany); +}; + +Promise._SomePromiseArray = SomePromiseArray; +}; + + +/***/ }), + +/***/ 46653: +/***/ ((module) => { + +"use strict"; + +module.exports = function(Promise) { +function PromiseInspection(promise) { + if (promise !== undefined) { + promise = promise._target(); + this._bitField = promise._bitField; + this._settledValueField = promise._isFateSealed() + ? promise._settledValue() : undefined; + } + else { + this._bitField = 0; + this._settledValueField = undefined; + } +} + +PromiseInspection.prototype._settledValue = function() { + return this._settledValueField; +}; + +var value = PromiseInspection.prototype.value = function () { + if (!this.isFulfilled()) { + throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var reason = PromiseInspection.prototype.error = +PromiseInspection.prototype.reason = function () { + if (!this.isRejected()) { + throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var isFulfilled = PromiseInspection.prototype.isFulfilled = function() { + return (this._bitField & 33554432) !== 0; +}; + +var isRejected = PromiseInspection.prototype.isRejected = function () { + return (this._bitField & 16777216) !== 0; +}; + +var isPending = PromiseInspection.prototype.isPending = function () { + return (this._bitField & 50397184) === 0; +}; + +var isResolved = PromiseInspection.prototype.isResolved = function () { + return (this._bitField & 50331648) !== 0; +}; + +PromiseInspection.prototype.isCancelled = function() { + return (this._bitField & 8454144) !== 0; +}; + +Promise.prototype.__isCancelled = function() { + return (this._bitField & 65536) === 65536; +}; + +Promise.prototype._isCancelled = function() { + return this._target().__isCancelled(); +}; + +Promise.prototype.isCancelled = function() { + return (this._target()._bitField & 8454144) !== 0; +}; + +Promise.prototype.isPending = function() { + return isPending.call(this._target()); +}; + +Promise.prototype.isRejected = function() { + return isRejected.call(this._target()); +}; + +Promise.prototype.isFulfilled = function() { + return isFulfilled.call(this._target()); +}; + +Promise.prototype.isResolved = function() { + return isResolved.call(this._target()); +}; + +Promise.prototype.value = function() { + return value.call(this._target()); +}; + +Promise.prototype.reason = function() { + var target = this._target(); + target._unsetRejectionIsUnhandled(); + return reason.call(target); +}; + +Promise.prototype._value = function() { + return this._settledValue(); +}; + +Promise.prototype._reason = function() { + this._unsetRejectionIsUnhandled(); + return this._settledValue(); +}; + +Promise.PromiseInspection = PromiseInspection; +}; + + +/***/ }), + +/***/ 29787: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise, INTERNAL) { +var util = __nccwpck_require__(37448); +var errorObj = util.errorObj; +var isObject = util.isObject; + +function tryConvertToPromise(obj, context) { + if (isObject(obj)) { + if (obj instanceof Promise) return obj; + var then = getThen(obj); + if (then === errorObj) { + if (context) context._pushContext(); + var ret = Promise.reject(then.e); + if (context) context._popContext(); + return ret; + } else if (typeof then === "function") { + if (isAnyBluebirdPromise(obj)) { + var ret = new Promise(INTERNAL); + obj._then( + ret._fulfill, + ret._reject, + undefined, + ret, + null + ); + return ret; + } + return doThenable(obj, then, context); + } + } + return obj; +} + +function doGetThen(obj) { + return obj.then; +} + +function getThen(obj) { + try { + return doGetThen(obj); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} + +var hasProp = {}.hasOwnProperty; +function isAnyBluebirdPromise(obj) { + try { + return hasProp.call(obj, "_promise0"); + } catch (e) { + return false; + } +} + +function doThenable(x, then, context) { + var promise = new Promise(INTERNAL); + var ret = promise; + if (context) context._pushContext(); + promise._captureStackTrace(); + if (context) context._popContext(); + var synchronous = true; + var result = util.tryCatch(then).call(x, resolve, reject); + synchronous = false; + + if (promise && result === errorObj) { + promise._rejectCallback(result.e, true, true); + promise = null; + } + + function resolve(value) { + if (!promise) return; + promise._resolveCallback(value); + promise = null; + } + + function reject(reason) { + if (!promise) return; + promise._rejectCallback(reason, synchronous, true); + promise = null; + } + return ret; +} + +return tryConvertToPromise; +}; + + +/***/ }), + +/***/ 32114: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function(Promise, INTERNAL, debug) { +var util = __nccwpck_require__(37448); +var TimeoutError = Promise.TimeoutError; + +function HandleWrapper(handle) { + this.handle = handle; +} + +HandleWrapper.prototype._resultCancelled = function() { + clearTimeout(this.handle); +}; + +var afterValue = function(value) { return delay(+this).thenReturn(value); }; +var delay = Promise.delay = function (ms, value) { + var ret; + var handle; + if (value !== undefined) { + ret = Promise.resolve(value) + ._then(afterValue, null, null, ms, undefined); + if (debug.cancellation() && value instanceof Promise) { + ret._setOnCancel(value); + } + } else { + ret = new Promise(INTERNAL); + handle = setTimeout(function() { ret._fulfill(); }, +ms); + if (debug.cancellation()) { + ret._setOnCancel(new HandleWrapper(handle)); + } + ret._captureStackTrace(); + } + ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.prototype.delay = function (ms) { + return delay(ms, this); +}; + +var afterTimeout = function (promise, message, parent) { + var err; + if (typeof message !== "string") { + if (message instanceof Error) { + err = message; + } else { + err = new TimeoutError("operation timed out"); + } + } else { + err = new TimeoutError(message); + } + util.markAsOriginatingFromRejection(err); + promise._attachExtraTrace(err); + promise._reject(err); + + if (parent != null) { + parent.cancel(); + } +}; + +function successClear(value) { + clearTimeout(this.handle); + return value; +} + +function failureClear(reason) { + clearTimeout(this.handle); + throw reason; +} + +Promise.prototype.timeout = function (ms, message) { + ms = +ms; + var ret, parent; + + var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() { + if (ret.isPending()) { + afterTimeout(ret, message, parent); + } + }, ms)); + + if (debug.cancellation()) { + parent = this.then(); + ret = parent._then(successClear, failureClear, + undefined, handleWrapper, undefined); + ret._setOnCancel(handleWrapper); + } else { + ret = this._then(successClear, failureClear, + undefined, handleWrapper, undefined); + } + + return ret; +}; + +}; + + +/***/ }), + +/***/ 880: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = function (Promise, apiRejection, tryConvertToPromise, + createContext, INTERNAL, debug) { + var util = __nccwpck_require__(37448); + var TypeError = __nccwpck_require__(35816).TypeError; + var inherits = __nccwpck_require__(37448).inherits; + var errorObj = util.errorObj; + var tryCatch = util.tryCatch; + var NULL = {}; + + function thrower(e) { + setTimeout(function(){throw e;}, 0); + } + + function castPreservingDisposable(thenable) { + var maybePromise = tryConvertToPromise(thenable); + if (maybePromise !== thenable && + typeof thenable._isDisposable === "function" && + typeof thenable._getDisposer === "function" && + thenable._isDisposable()) { + maybePromise._setDisposable(thenable._getDisposer()); + } + return maybePromise; + } + function dispose(resources, inspection) { + var i = 0; + var len = resources.length; + var ret = new Promise(INTERNAL); + function iterator() { + if (i >= len) return ret._fulfill(); + var maybePromise = castPreservingDisposable(resources[i++]); + if (maybePromise instanceof Promise && + maybePromise._isDisposable()) { + try { + maybePromise = tryConvertToPromise( + maybePromise._getDisposer().tryDispose(inspection), + resources.promise); + } catch (e) { + return thrower(e); + } + if (maybePromise instanceof Promise) { + return maybePromise._then(iterator, thrower, + null, null, null); + } + } + iterator(); + } + iterator(); + return ret; + } + + function Disposer(data, promise, context) { + this._data = data; + this._promise = promise; + this._context = context; + } + + Disposer.prototype.data = function () { + return this._data; + }; + + Disposer.prototype.promise = function () { + return this._promise; + }; + + Disposer.prototype.resource = function () { + if (this.promise().isFulfilled()) { + return this.promise().value(); + } + return NULL; + }; + + Disposer.prototype.tryDispose = function(inspection) { + var resource = this.resource(); + var context = this._context; + if (context !== undefined) context._pushContext(); + var ret = resource !== NULL + ? this.doDispose(resource, inspection) : null; + if (context !== undefined) context._popContext(); + this._promise._unsetDisposable(); + this._data = null; + return ret; + }; + + Disposer.isDisposer = function (d) { + return (d != null && + typeof d.resource === "function" && + typeof d.tryDispose === "function"); + }; + + function FunctionDisposer(fn, promise, context) { + this.constructor$(fn, promise, context); + } + inherits(FunctionDisposer, Disposer); + + FunctionDisposer.prototype.doDispose = function (resource, inspection) { + var fn = this.data(); + return fn.call(resource, resource, inspection); + }; + + function maybeUnwrapDisposer(value) { + if (Disposer.isDisposer(value)) { + this.resources[this.index]._setDisposable(value); + return value.promise(); + } + return value; + } + + function ResourceList(length) { + this.length = length; + this.promise = null; + this[length-1] = null; + } + + ResourceList.prototype._resultCancelled = function() { + var len = this.length; + for (var i = 0; i < len; ++i) { + var item = this[i]; + if (item instanceof Promise) { + item.cancel(); + } + } + }; + + Promise.using = function () { + var len = arguments.length; + if (len < 2) return apiRejection( + "you must pass at least 2 arguments to Promise.using"); + var fn = arguments[len - 1]; + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var input; + var spreadArgs = true; + if (len === 2 && Array.isArray(arguments[0])) { + input = arguments[0]; + len = input.length; + spreadArgs = false; + } else { + input = arguments; + len--; + } + var resources = new ResourceList(len); + for (var i = 0; i < len; ++i) { + var resource = input[i]; + if (Disposer.isDisposer(resource)) { + var disposer = resource; + resource = resource.promise(); + resource._setDisposable(disposer); + } else { + var maybePromise = tryConvertToPromise(resource); + if (maybePromise instanceof Promise) { + resource = + maybePromise._then(maybeUnwrapDisposer, null, null, { + resources: resources, + index: i + }, undefined); + } + } + resources[i] = resource; + } + + var reflectedResources = new Array(resources.length); + for (var i = 0; i < reflectedResources.length; ++i) { + reflectedResources[i] = Promise.resolve(resources[i]).reflect(); + } + + var resultPromise = Promise.all(reflectedResources) + .then(function(inspections) { + for (var i = 0; i < inspections.length; ++i) { + var inspection = inspections[i]; + if (inspection.isRejected()) { + errorObj.e = inspection.error(); + return errorObj; + } else if (!inspection.isFulfilled()) { + resultPromise.cancel(); + return; + } + inspections[i] = inspection.value(); + } + promise._pushContext(); + + fn = tryCatch(fn); + var ret = spreadArgs + ? fn.apply(undefined, inspections) : fn(inspections); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, promiseCreated, "Promise.using", promise); + return ret; + }); + + var promise = resultPromise.lastly(function() { + var inspection = new Promise.PromiseInspection(resultPromise); + return dispose(resources, inspection); + }); + resources.promise = promise; + promise._setOnCancel(resources); + return promise; + }; + + Promise.prototype._setDisposable = function (disposer) { + this._bitField = this._bitField | 131072; + this._disposer = disposer; + }; + + Promise.prototype._isDisposable = function () { + return (this._bitField & 131072) > 0; + }; + + Promise.prototype._getDisposer = function () { + return this._disposer; + }; + + Promise.prototype._unsetDisposable = function () { + this._bitField = this._bitField & (~131072); + this._disposer = undefined; + }; + + Promise.prototype.disposer = function (fn) { + if (typeof fn === "function") { + return new FunctionDisposer(fn, this, createContext()); + } + throw new TypeError(); + }; + +}; + + +/***/ }), + +/***/ 37448: +/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { + +"use strict"; + +var es5 = __nccwpck_require__(43062); +var canEvaluate = typeof navigator == "undefined"; + +var errorObj = {e: {}}; +var tryCatchTarget; +var globalObject = typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + this !== undefined ? this : null; + +function tryCatcher() { + try { + var target = tryCatchTarget; + tryCatchTarget = null; + return target.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} +function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; +} + +var inherits = function(Child, Parent) { + var hasProp = {}.hasOwnProperty; + + function T() { + this.constructor = Child; + this.constructor$ = Parent; + for (var propertyName in Parent.prototype) { + if (hasProp.call(Parent.prototype, propertyName) && + propertyName.charAt(propertyName.length-1) !== "$" + ) { + this[propertyName + "$"] = Parent.prototype[propertyName]; + } + } + } + T.prototype = Parent.prototype; + Child.prototype = new T(); + return Child.prototype; +}; + + +function isPrimitive(val) { + return val == null || val === true || val === false || + typeof val === "string" || typeof val === "number"; + +} + +function isObject(value) { + return typeof value === "function" || + typeof value === "object" && value !== null; +} + +function maybeWrapAsError(maybeError) { + if (!isPrimitive(maybeError)) return maybeError; + + return new Error(safeToString(maybeError)); +} + +function withAppended(target, appendee) { + var len = target.length; + var ret = new Array(len + 1); + var i; + for (i = 0; i < len; ++i) { + ret[i] = target[i]; + } + ret[i] = appendee; + return ret; +} + +function getDataPropertyOrDefault(obj, key, defaultValue) { + if (es5.isES5) { + var desc = Object.getOwnPropertyDescriptor(obj, key); + + if (desc != null) { + return desc.get == null && desc.set == null + ? desc.value + : defaultValue; + } + } else { + return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; + } +} + +function notEnumerableProp(obj, name, value) { + if (isPrimitive(obj)) return obj; + var descriptor = { + value: value, + configurable: true, + enumerable: false, + writable: true + }; + es5.defineProperty(obj, name, descriptor); + return obj; +} + +function thrower(r) { + throw r; +} + +var inheritedDataKeys = (function() { + var excludedPrototypes = [ + Array.prototype, + Object.prototype, + Function.prototype + ]; + + var isExcludedProto = function(val) { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (excludedPrototypes[i] === val) { + return true; + } + } + return false; + }; + + if (es5.isES5) { + var getKeys = Object.getOwnPropertyNames; + return function(obj) { + var ret = []; + var visitedKeys = Object.create(null); + while (obj != null && !isExcludedProto(obj)) { + var keys; + try { + keys = getKeys(obj); + } catch (e) { + return ret; + } + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (visitedKeys[key]) continue; + visitedKeys[key] = true; + var desc = Object.getOwnPropertyDescriptor(obj, key); + if (desc != null && desc.get == null && desc.set == null) { + ret.push(key); + } + } + obj = es5.getPrototypeOf(obj); + } + return ret; + }; + } else { + var hasProp = {}.hasOwnProperty; + return function(obj) { + if (isExcludedProto(obj)) return []; + var ret = []; + + /*jshint forin:false */ + enumeration: for (var key in obj) { + if (hasProp.call(obj, key)) { + ret.push(key); + } else { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (hasProp.call(excludedPrototypes[i], key)) { + continue enumeration; + } + } + ret.push(key); + } + } + return ret; + }; + } + +})(); + +var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; +function isClass(fn) { + try { + if (typeof fn === "function") { + var keys = es5.names(fn.prototype); + + var hasMethods = es5.isES5 && keys.length > 1; + var hasMethodsOtherThanConstructor = keys.length > 0 && + !(keys.length === 1 && keys[0] === "constructor"); + var hasThisAssignmentAndStaticMethods = + thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; + + if (hasMethods || hasMethodsOtherThanConstructor || + hasThisAssignmentAndStaticMethods) { + return true; + } + } + return false; + } catch (e) { + return false; + } +} + +function toFastProperties(obj) { + /*jshint -W027,-W055,-W031*/ + function FakeConstructor() {} + FakeConstructor.prototype = obj; + var receiver = new FakeConstructor(); + function ic() { + return typeof receiver.foo; + } + ic(); + ic(); + return obj; + eval(obj); +} + +var rident = /^[a-z$_][a-z$_0-9]*$/i; +function isIdentifier(str) { + return rident.test(str); +} + +function filledRange(count, prefix, suffix) { + var ret = new Array(count); + for(var i = 0; i < count; ++i) { + ret[i] = prefix + i + suffix; + } + return ret; +} + +function safeToString(obj) { + try { + return obj + ""; + } catch (e) { + return "[no string representation]"; + } +} + +function isError(obj) { + return obj instanceof Error || + (obj !== null && + typeof obj === "object" && + typeof obj.message === "string" && + typeof obj.name === "string"); +} + +function markAsOriginatingFromRejection(e) { + try { + notEnumerableProp(e, "isOperational", true); + } + catch(ignore) {} +} + +function originatesFromRejection(e) { + if (e == null) return false; + return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || + e["isOperational"] === true); +} + +function canAttachTrace(obj) { + return isError(obj) && es5.propertyIsWritable(obj, "stack"); +} + +var ensureErrorObject = (function() { + if (!("stack" in new Error())) { + return function(value) { + if (canAttachTrace(value)) return value; + try {throw new Error(safeToString(value));} + catch(err) {return err;} + }; + } else { + return function(value) { + if (canAttachTrace(value)) return value; + return new Error(safeToString(value)); + }; + } +})(); + +function classString(obj) { + return {}.toString.call(obj); +} + +function copyDescriptors(from, to, filter) { + var keys = es5.names(from); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (filter(key)) { + try { + es5.defineProperty(to, key, es5.getDescriptor(from, key)); + } catch (ignore) {} + } + } +} + +var asArray = function(v) { + if (es5.isArray(v)) { + return v; + } + return null; +}; + +if (typeof Symbol !== "undefined" && Symbol.iterator) { + var ArrayFrom = typeof Array.from === "function" ? function(v) { + return Array.from(v); + } : function(v) { + var ret = []; + var it = v[Symbol.iterator](); + var itResult; + while (!((itResult = it.next()).done)) { + ret.push(itResult.value); + } + return ret; + }; + + asArray = function(v) { + if (es5.isArray(v)) { + return v; + } else if (v != null && typeof v[Symbol.iterator] === "function") { + return ArrayFrom(v); + } + return null; + }; +} + +var isNode = typeof process !== "undefined" && + classString(process).toLowerCase() === "[object process]"; + +var hasEnvVariables = typeof process !== "undefined" && + typeof process.env !== "undefined"; + +function env(key) { + return hasEnvVariables ? process.env[key] : undefined; +} + +function getNativePromise() { + if (typeof Promise === "function") { + try { + var promise = new Promise(function(){}); + if (classString(promise) === "[object Promise]") { + return Promise; + } + } catch (e) {} + } +} + +var reflectHandler; +function contextBind(ctx, cb) { + if (ctx === null || + typeof cb !== "function" || + cb === reflectHandler) { + return cb; + } + + if (ctx.domain !== null) { + cb = ctx.domain.bind(cb); + } + + var async = ctx.async; + if (async !== null) { + var old = cb; + cb = function() { + var $_len = arguments.length + 2;var args = new Array($_len); for(var $_i = 2; $_i < $_len ; ++$_i) {args[$_i] = arguments[$_i - 2];}; + args[0] = old; + args[1] = this; + return async.runInAsyncScope.apply(async, args); + }; + } + return cb; +} + +var ret = { + setReflectHandler: function(fn) { + reflectHandler = fn; + }, + isClass: isClass, + isIdentifier: isIdentifier, + inheritedDataKeys: inheritedDataKeys, + getDataPropertyOrDefault: getDataPropertyOrDefault, + thrower: thrower, + isArray: es5.isArray, + asArray: asArray, + notEnumerableProp: notEnumerableProp, + isPrimitive: isPrimitive, + isObject: isObject, + isError: isError, + canEvaluate: canEvaluate, + errorObj: errorObj, + tryCatch: tryCatch, + inherits: inherits, + withAppended: withAppended, + maybeWrapAsError: maybeWrapAsError, + toFastProperties: toFastProperties, + filledRange: filledRange, + toString: safeToString, + canAttachTrace: canAttachTrace, + ensureErrorObject: ensureErrorObject, + originatesFromRejection: originatesFromRejection, + markAsOriginatingFromRejection: markAsOriginatingFromRejection, + classString: classString, + copyDescriptors: copyDescriptors, + isNode: isNode, + hasEnvVariables: hasEnvVariables, + env: env, + global: globalObject, + getNativePromise: getNativePromise, + contextBind: contextBind +}; +ret.isRecentNode = ret.isNode && (function() { + var version; + if (process.versions && process.versions.node) { + version = process.versions.node.split(".").map(Number); + } else if (process.version) { + version = process.version.split(".").map(Number); + } + return (version[0] === 0 && version[1] > 10) || (version[0] > 0); +})(); +ret.nodeSupportsAsyncResource = ret.isNode && (function() { + var supportsAsync = false; + try { + var res = __nccwpck_require__(77303).AsyncResource; + supportsAsync = typeof res.prototype.runInAsyncScope === "function"; + } catch (e) { + supportsAsync = false; + } + return supportsAsync; +})(); + +if (ret.isNode) ret.toFastProperties(process); + +try {throw new Error(); } catch (e) {ret.lastLineError = e;} +module.exports = ret; + + +/***/ }), + +/***/ 33717: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var concatMap = __nccwpck_require__(86891); +var balanced = __nccwpck_require__(9417); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + + + +/***/ }), + +/***/ 93018: +/***/ ((module) => { + +var toString = Object.prototype.toString + +var isModern = ( + typeof Buffer.alloc === 'function' && + typeof Buffer.allocUnsafe === 'function' && + typeof Buffer.from === 'function' +) + +function isArrayBuffer (input) { + return toString.call(input).slice(8, -1) === 'ArrayBuffer' +} + +function fromArrayBuffer (obj, byteOffset, length) { + byteOffset >>>= 0 + + var maxLength = obj.byteLength - byteOffset + + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds") + } + + if (length === undefined) { + length = maxLength + } else { + length >>>= 0 + + if (length > maxLength) { + throw new RangeError("'length' is out of bounds") + } + } + + return isModern + ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) + : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + return isModern + ? Buffer.from(string, encoding) + : new Buffer(string, encoding) +} + +function bufferFrom (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + return isModern + ? Buffer.from(value) + : new Buffer(value) +} + +module.exports = bufferFrom + + +/***/ }), + +/***/ 42456: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Writable = __nccwpck_require__(51642).Writable +var inherits = __nccwpck_require__(44124) + +function CallbackStream (options, callback) { + if (!(this instanceof CallbackStream)) { + return new CallbackStream(options, callback) + } + + if (typeof options === 'function') { + callback = options + options = {} + } + + Writable.call(this, options) + + this.results = [] + this.callback = callback + + this.on('finish', deliversCallback) + this.once('pipe', handlePipe) +} + +function deliversCallback () { + this.callback(null, this.results) +} + +function handlePipe (source) { + source.on('error', this.callback) +} + +inherits(CallbackStream, Writable) + +CallbackStream.prototype._write = function (data, encoding, done) { + this.results.push(data) + done() +} + +CallbackStream.obj = function (options, callback) { + if (typeof options === 'function') { + callback = options + options = {} + } + + options.objectMode = true + + return new CallbackStream(options, callback) +} + +module.exports = CallbackStream + + +/***/ }), + +/***/ 43370: +/***/ (function(module) { + +(function() { + (function(chaiSubset) { + if (true) { + return module.exports = chaiSubset; + } else {} + })(function(chai, utils) { + var Assertion = chai.Assertion; + var assertionPrototype = Assertion.prototype; + + Assertion.addMethod('containSubset', function (expected) { + var actual = utils.flag(this, 'object'); + var showDiff = chai.config.showDiff; + + assertionPrototype.assert.call(this, + compare(expected, actual), + 'expected #{act} to contain subset #{exp}', + 'expected #{act} to not contain subset #{exp}', + expected, + actual, + showDiff + ); + }); + + chai.assert.containSubset = function(val, exp, msg) { + new chai.Assertion(val, msg).to.be.containSubset(exp); + }; + + function compare(expected, actual) { + if (expected === actual) { + return true; + } + if (typeof(actual) !== typeof(expected)) { + return false; + } + if (typeof(expected) !== 'object' || expected === null) { + return expected === actual; + } + if (!!expected && !actual) { + return false; + } + + if (Array.isArray(expected)) { + if (typeof(actual.length) !== 'number') { + return false; + } + var aa = Array.prototype.slice.call(actual); + return expected.every(function (exp) { + return aa.some(function (act) { + return compare(exp, act); + }); + }); + } + + if (expected instanceof Date) { + if (actual instanceof Date) { + return expected.getTime() === actual.getTime(); + } else { + return false; + } + } + + return Object.keys(expected).every(function (key) { + var eo = expected[key]; + var ao = actual[key]; + if (typeof(eo) === 'object' && eo !== null && ao !== null) { + return compare(eo, ao); + } + if (typeof(eo) === 'function') { + return eo(ao); + } + return ao === eo; + }); + } + }); + +}).call(this); + + + +/***/ }), + +/***/ 80630: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(6343); + + +/***/ }), + +/***/ 6343: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +var used = []; + +/*! + * Chai version + */ + +exports.version = '4.2.0'; + +/*! + * Assertion Error + */ + +exports.AssertionError = __nccwpck_require__(9210); + +/*! + * Utils for plugins (not exported) + */ + +var util = __nccwpck_require__(73890); + +/** + * # .use(function) + * + * Provides a way to extend the internals of Chai. + * + * @param {Function} + * @returns {this} for chaining + * @api public + */ + +exports.use = function (fn) { + if (!~used.indexOf(fn)) { + fn(exports, util); + used.push(fn); + } + + return exports; +}; + +/*! + * Utility Functions + */ + +exports.util = util; + +/*! + * Configuration + */ + +var config = __nccwpck_require__(35072); +exports.config = config; + +/*! + * Primary `Assertion` prototype + */ + +var assertion = __nccwpck_require__(58913); +exports.use(assertion); + +/*! + * Core Assertions + */ + +var core = __nccwpck_require__(9624); +exports.use(core); + +/*! + * Expect interface + */ + +var expect = __nccwpck_require__(861); +exports.use(expect); + +/*! + * Should interface + */ + +var should = __nccwpck_require__(61644); +exports.use(should); + +/*! + * Assert interface + */ + +var assert = __nccwpck_require__(39542); +exports.use(assert); + + +/***/ }), + +/***/ 58913: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * chai + * http://chaijs.com + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +var config = __nccwpck_require__(35072); + +module.exports = function (_chai, util) { + /*! + * Module dependencies. + */ + + var AssertionError = _chai.AssertionError + , flag = util.flag; + + /*! + * Module export. + */ + + _chai.Assertion = Assertion; + + /*! + * Assertion Constructor + * + * Creates object for chaining. + * + * `Assertion` objects contain metadata in the form of flags. Three flags can + * be assigned during instantiation by passing arguments to this constructor: + * + * - `object`: This flag contains the target of the assertion. For example, in + * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will + * contain `numKittens` so that the `equal` assertion can reference it when + * needed. + * + * - `message`: This flag contains an optional custom error message to be + * prepended to the error message that's generated by the assertion when it + * fails. + * + * - `ssfi`: This flag stands for "start stack function indicator". It + * contains a function reference that serves as the starting point for + * removing frames from the stack trace of the error that's created by the + * assertion when it fails. The goal is to provide a cleaner stack trace to + * end users by removing Chai's internal functions. Note that it only works + * in environments that support `Error.captureStackTrace`, and only when + * `Chai.config.includeStack` hasn't been set to `false`. + * + * - `lockSsfi`: This flag controls whether or not the given `ssfi` flag + * should retain its current value, even as assertions are chained off of + * this object. This is usually set to `true` when creating a new assertion + * from within another assertion. It's also temporarily set to `true` before + * an overwritten assertion gets called by the overwriting assertion. + * + * @param {Mixed} obj target of the assertion + * @param {String} msg (optional) custom error message + * @param {Function} ssfi (optional) starting point for removing stack frames + * @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked + * @api private + */ + + function Assertion (obj, msg, ssfi, lockSsfi) { + flag(this, 'ssfi', ssfi || Assertion); + flag(this, 'lockSsfi', lockSsfi); + flag(this, 'object', obj); + flag(this, 'message', msg); + + return util.proxify(this); + } + + Object.defineProperty(Assertion, 'includeStack', { + get: function() { + console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); + return config.includeStack; + }, + set: function(value) { + console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); + config.includeStack = value; + } + }); + + Object.defineProperty(Assertion, 'showDiff', { + get: function() { + console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); + return config.showDiff; + }, + set: function(value) { + console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); + config.showDiff = value; + } + }); + + Assertion.addProperty = function (name, fn) { + util.addProperty(this.prototype, name, fn); + }; + + Assertion.addMethod = function (name, fn) { + util.addMethod(this.prototype, name, fn); + }; + + Assertion.addChainableMethod = function (name, fn, chainingBehavior) { + util.addChainableMethod(this.prototype, name, fn, chainingBehavior); + }; + + Assertion.overwriteProperty = function (name, fn) { + util.overwriteProperty(this.prototype, name, fn); + }; + + Assertion.overwriteMethod = function (name, fn) { + util.overwriteMethod(this.prototype, name, fn); + }; + + Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) { + util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior); + }; + + /** + * ### .assert(expression, message, negateMessage, expected, actual, showDiff) + * + * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass. + * + * @name assert + * @param {Philosophical} expression to be tested + * @param {String|Function} message or function that returns message to display if expression fails + * @param {String|Function} negatedMessage or function that returns negatedMessage to display if negated expression fails + * @param {Mixed} expected value (remember to check for negation) + * @param {Mixed} actual (optional) will default to `this.obj` + * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails + * @api private + */ + + Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) { + var ok = util.test(this, arguments); + if (false !== showDiff) showDiff = true; + if (undefined === expected && undefined === _actual) showDiff = false; + if (true !== config.showDiff) showDiff = false; + + if (!ok) { + msg = util.getMessage(this, arguments); + var actual = util.getActual(this, arguments); + throw new AssertionError(msg, { + actual: actual + , expected: expected + , showDiff: showDiff + }, (config.includeStack) ? this.assert : flag(this, 'ssfi')); + } + }; + + /*! + * ### ._obj + * + * Quick reference to stored `actual` value for plugin developers. + * + * @api private + */ + + Object.defineProperty(Assertion.prototype, '_obj', + { get: function () { + return flag(this, 'object'); + } + , set: function (val) { + flag(this, 'object', val); + } + }); +}; + + +/***/ }), + +/***/ 35072: +/***/ ((module) => { + +module.exports = { + + /** + * ### config.includeStack + * + * User configurable property, influences whether stack trace + * is included in Assertion error message. Default of false + * suppresses stack trace in the error message. + * + * chai.config.includeStack = true; // enable stack on error + * + * @param {Boolean} + * @api public + */ + + includeStack: false, + + /** + * ### config.showDiff + * + * User configurable property, influences whether or not + * the `showDiff` flag should be included in the thrown + * AssertionErrors. `false` will always be `false`; `true` + * will be true when the assertion has requested a diff + * be shown. + * + * @param {Boolean} + * @api public + */ + + showDiff: true, + + /** + * ### config.truncateThreshold + * + * User configurable property, sets length threshold for actual and + * expected values in assertion errors. If this threshold is exceeded, for + * example for large data structures, the value is replaced with something + * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`. + * + * Set it to zero if you want to disable truncating altogether. + * + * This is especially userful when doing assertions on arrays: having this + * set to a reasonable large value makes the failure messages readily + * inspectable. + * + * chai.config.truncateThreshold = 0; // disable truncating + * + * @param {Number} + * @api public + */ + + truncateThreshold: 40, + + /** + * ### config.useProxy + * + * User configurable property, defines if chai will use a Proxy to throw + * an error when a non-existent property is read, which protects users + * from typos when using property-based assertions. + * + * Set it to false if you want to disable this feature. + * + * chai.config.useProxy = false; // disable use of Proxy + * + * This feature is automatically disabled regardless of this config value + * in environments that don't support proxies. + * + * @param {Boolean} + * @api public + */ + + useProxy: true, + + /** + * ### config.proxyExcludedKeys + * + * User configurable property, defines which properties should be ignored + * instead of throwing an error if they do not exist on the assertion. + * This is only applied if the environment Chai is running in supports proxies and + * if the `useProxy` configuration setting is enabled. + * By default, `then` and `inspect` will not throw an error if they do not exist on the + * assertion object because the `.inspect` property is read by `util.inspect` (for example, when + * using `console.log` on the assertion object) and `.then` is necessary for promise type-checking. + * + * // By default these keys will not throw an error if they do not exist on the assertion object + * chai.config.proxyExcludedKeys = ['then', 'inspect']; + * + * @param {Array} + * @api public + */ + + proxyExcludedKeys: ['then', 'catch', 'inspect', 'toJSON'] +}; + + +/***/ }), + +/***/ 9624: +/***/ ((module) => { + +/*! + * chai + * http://chaijs.com + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, _) { + var Assertion = chai.Assertion + , AssertionError = chai.AssertionError + , flag = _.flag; + + /** + * ### Language Chains + * + * The following are provided as chainable getters to improve the readability + * of your assertions. + * + * **Chains** + * + * - to + * - be + * - been + * - is + * - that + * - which + * - and + * - has + * - have + * - with + * - at + * - of + * - same + * - but + * - does + * - still + * + * @name language chains + * @namespace BDD + * @api public + */ + + [ 'to', 'be', 'been', 'is' + , 'and', 'has', 'have', 'with' + , 'that', 'which', 'at', 'of' + , 'same', 'but', 'does', 'still' ].forEach(function (chain) { + Assertion.addProperty(chain); + }); + + /** + * ### .not + * + * Negates all assertions that follow in the chain. + * + * expect(function () {}).to.not.throw(); + * expect({a: 1}).to.not.have.property('b'); + * expect([1, 2]).to.be.an('array').that.does.not.include(3); + * + * Just because you can negate any assertion with `.not` doesn't mean you + * should. With great power comes great responsibility. It's often best to + * assert that the one expected output was produced, rather than asserting + * that one of countless unexpected outputs wasn't produced. See individual + * assertions for specific guidance. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.not.equal(1); // Not recommended + * + * @name not + * @namespace BDD + * @api public + */ + + Assertion.addProperty('not', function () { + flag(this, 'negate', true); + }); + + /** + * ### .deep + * + * Causes all `.equal`, `.include`, `.members`, `.keys`, and `.property` + * assertions that follow in the chain to use deep equality instead of strict + * (`===`) equality. See the `deep-eql` project page for info on the deep + * equality algorithm: https://github.com/chaijs/deep-eql. + * + * // Target object deeply (but not strictly) equals `{a: 1}` + * expect({a: 1}).to.deep.equal({a: 1}); + * expect({a: 1}).to.not.equal({a: 1}); + * + * // Target array deeply (but not strictly) includes `{a: 1}` + * expect([{a: 1}]).to.deep.include({a: 1}); + * expect([{a: 1}]).to.not.include({a: 1}); + * + * // Target object deeply (but not strictly) includes `x: {a: 1}` + * expect({x: {a: 1}}).to.deep.include({x: {a: 1}}); + * expect({x: {a: 1}}).to.not.include({x: {a: 1}}); + * + * // Target array deeply (but not strictly) has member `{a: 1}` + * expect([{a: 1}]).to.have.deep.members([{a: 1}]); + * expect([{a: 1}]).to.not.have.members([{a: 1}]); + * + * // Target set deeply (but not strictly) has key `{a: 1}` + * expect(new Set([{a: 1}])).to.have.deep.keys([{a: 1}]); + * expect(new Set([{a: 1}])).to.not.have.keys([{a: 1}]); + * + * // Target object deeply (but not strictly) has property `x: {a: 1}` + * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1}); + * expect({x: {a: 1}}).to.not.have.property('x', {a: 1}); + * + * @name deep + * @namespace BDD + * @api public + */ + + Assertion.addProperty('deep', function () { + flag(this, 'deep', true); + }); + + /** + * ### .nested + * + * Enables dot- and bracket-notation in all `.property` and `.include` + * assertions that follow in the chain. + * + * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]'); + * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'}); + * + * If `.` or `[]` are part of an actual property name, they can be escaped by + * adding two backslashes before them. + * + * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\.a.\\[b\\]'); + * expect({'.a': {'[b]': 'x'}}).to.nested.include({'\\.a.\\[b\\]': 'x'}); + * + * `.nested` cannot be combined with `.own`. + * + * @name nested + * @namespace BDD + * @api public + */ + + Assertion.addProperty('nested', function () { + flag(this, 'nested', true); + }); + + /** + * ### .own + * + * Causes all `.property` and `.include` assertions that follow in the chain + * to ignore inherited properties. + * + * Object.prototype.b = 2; + * + * expect({a: 1}).to.have.own.property('a'); + * expect({a: 1}).to.have.property('b'); + * expect({a: 1}).to.not.have.own.property('b'); + * + * expect({a: 1}).to.own.include({a: 1}); + * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2}); + * + * `.own` cannot be combined with `.nested`. + * + * @name own + * @namespace BDD + * @api public + */ + + Assertion.addProperty('own', function () { + flag(this, 'own', true); + }); + + /** + * ### .ordered + * + * Causes all `.members` assertions that follow in the chain to require that + * members be in the same order. + * + * expect([1, 2]).to.have.ordered.members([1, 2]) + * .but.not.have.ordered.members([2, 1]); + * + * When `.include` and `.ordered` are combined, the ordering begins at the + * start of both arrays. + * + * expect([1, 2, 3]).to.include.ordered.members([1, 2]) + * .but.not.include.ordered.members([2, 3]); + * + * @name ordered + * @namespace BDD + * @api public + */ + + Assertion.addProperty('ordered', function () { + flag(this, 'ordered', true); + }); + + /** + * ### .any + * + * Causes all `.keys` assertions that follow in the chain to only require that + * the target have at least one of the given keys. This is the opposite of + * `.all`, which requires that the target have all of the given keys. + * + * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd'); + * + * See the `.keys` doc for guidance on when to use `.any` or `.all`. + * + * @name any + * @namespace BDD + * @api public + */ + + Assertion.addProperty('any', function () { + flag(this, 'any', true); + flag(this, 'all', false); + }); + + /** + * ### .all + * + * Causes all `.keys` assertions that follow in the chain to require that the + * target have all of the given keys. This is the opposite of `.any`, which + * only requires that the target have at least one of the given keys. + * + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); + * + * Note that `.all` is used by default when neither `.all` nor `.any` are + * added earlier in the chain. However, it's often best to add `.all` anyway + * because it improves readability. + * + * See the `.keys` doc for guidance on when to use `.any` or `.all`. + * + * @name all + * @namespace BDD + * @api public + */ + + Assertion.addProperty('all', function () { + flag(this, 'all', true); + flag(this, 'any', false); + }); + + /** + * ### .a(type[, msg]) + * + * Asserts that the target's type is equal to the given string `type`. Types + * are case insensitive. See the `type-detect` project page for info on the + * type detection algorithm: https://github.com/chaijs/type-detect. + * + * expect('foo').to.be.a('string'); + * expect({a: 1}).to.be.an('object'); + * expect(null).to.be.a('null'); + * expect(undefined).to.be.an('undefined'); + * expect(new Error).to.be.an('error'); + * expect(Promise.resolve()).to.be.a('promise'); + * expect(new Float32Array).to.be.a('float32array'); + * expect(Symbol()).to.be.a('symbol'); + * + * `.a` supports objects that have a custom type set via `Symbol.toStringTag`. + * + * var myObj = { + * [Symbol.toStringTag]: 'myCustomType' + * }; + * + * expect(myObj).to.be.a('myCustomType').but.not.an('object'); + * + * It's often best to use `.a` to check a target's type before making more + * assertions on the same target. That way, you avoid unexpected behavior from + * any assertion that does different things based on the target's type. + * + * expect([1, 2, 3]).to.be.an('array').that.includes(2); + * expect([]).to.be.an('array').that.is.empty; + * + * Add `.not` earlier in the chain to negate `.a`. However, it's often best to + * assert that the target is the expected type, rather than asserting that it + * isn't one of many unexpected types. + * + * expect('foo').to.be.a('string'); // Recommended + * expect('foo').to.not.be.an('array'); // Not recommended + * + * `.a` accepts an optional `msg` argument which is a custom error message to + * show when the assertion fails. The message can also be given as the second + * argument to `expect`. + * + * expect(1).to.be.a('string', 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.a('string'); + * + * `.a` can also be used as a language chain to improve the readability of + * your assertions. + * + * expect({b: 2}).to.have.a.property('b'); + * + * The alias `.an` can be used interchangeably with `.a`. + * + * @name a + * @alias an + * @param {String} type + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function an (type, msg) { + if (msg) flag(this, 'message', msg); + type = type.toLowerCase(); + var obj = flag(this, 'object') + , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a '; + + this.assert( + type === _.type(obj).toLowerCase() + , 'expected #{this} to be ' + article + type + , 'expected #{this} not to be ' + article + type + ); + } + + Assertion.addChainableMethod('an', an); + Assertion.addChainableMethod('a', an); + + /** + * ### .include(val[, msg]) + * + * When the target is a string, `.include` asserts that the given string `val` + * is a substring of the target. + * + * expect('foobar').to.include('foo'); + * + * When the target is an array, `.include` asserts that the given `val` is a + * member of the target. + * + * expect([1, 2, 3]).to.include(2); + * + * When the target is an object, `.include` asserts that the given object + * `val`'s properties are a subset of the target's properties. + * + * expect({a: 1, b: 2, c: 3}).to.include({a: 1, b: 2}); + * + * When the target is a Set or WeakSet, `.include` asserts that the given `val` is a + * member of the target. SameValueZero equality algorithm is used. + * + * expect(new Set([1, 2])).to.include(2); + * + * When the target is a Map, `.include` asserts that the given `val` is one of + * the values of the target. SameValueZero equality algorithm is used. + * + * expect(new Map([['a', 1], ['b', 2]])).to.include(2); + * + * Because `.include` does different things based on the target's type, it's + * important to check the target's type before using `.include`. See the `.a` + * doc for info on testing a target's type. + * + * expect([1, 2, 3]).to.be.an('array').that.includes(2); + * + * By default, strict (`===`) equality is used to compare array members and + * object properties. Add `.deep` earlier in the chain to use deep equality + * instead (WeakSet targets are not supported). See the `deep-eql` project + * page for info on the deep equality algorithm: https://github.com/chaijs/deep-eql. + * + * // Target array deeply (but not strictly) includes `{a: 1}` + * expect([{a: 1}]).to.deep.include({a: 1}); + * expect([{a: 1}]).to.not.include({a: 1}); + * + * // Target object deeply (but not strictly) includes `x: {a: 1}` + * expect({x: {a: 1}}).to.deep.include({x: {a: 1}}); + * expect({x: {a: 1}}).to.not.include({x: {a: 1}}); + * + * By default, all of the target's properties are searched when working with + * objects. This includes properties that are inherited and/or non-enumerable. + * Add `.own` earlier in the chain to exclude the target's inherited + * properties from the search. + * + * Object.prototype.b = 2; + * + * expect({a: 1}).to.own.include({a: 1}); + * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2}); + * + * Note that a target object is always only searched for `val`'s own + * enumerable properties. + * + * `.deep` and `.own` can be combined. + * + * expect({a: {b: 2}}).to.deep.own.include({a: {b: 2}}); + * + * Add `.nested` earlier in the chain to enable dot- and bracket-notation when + * referencing nested properties. + * + * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'}); + * + * If `.` or `[]` are part of an actual property name, they can be escaped by + * adding two backslashes before them. + * + * expect({'.a': {'[b]': 2}}).to.nested.include({'\\.a.\\[b\\]': 2}); + * + * `.deep` and `.nested` can be combined. + * + * expect({a: {b: [{c: 3}]}}).to.deep.nested.include({'a.b[0]': {c: 3}}); + * + * `.own` and `.nested` cannot be combined. + * + * Add `.not` earlier in the chain to negate `.include`. + * + * expect('foobar').to.not.include('taco'); + * expect([1, 2, 3]).to.not.include(4); + * + * However, it's dangerous to negate `.include` when the target is an object. + * The problem is that it creates uncertain expectations by asserting that the + * target object doesn't have all of `val`'s key/value pairs but may or may + * not have some of them. It's often best to identify the exact output that's + * expected, and then write an assertion that only accepts that exact output. + * + * When the target object isn't even expected to have `val`'s keys, it's + * often best to assert exactly that. + * + * expect({c: 3}).to.not.have.any.keys('a', 'b'); // Recommended + * expect({c: 3}).to.not.include({a: 1, b: 2}); // Not recommended + * + * When the target object is expected to have `val`'s keys, it's often best to + * assert that each of the properties has its expected value, rather than + * asserting that each property doesn't have one of many unexpected values. + * + * expect({a: 3, b: 4}).to.include({a: 3, b: 4}); // Recommended + * expect({a: 3, b: 4}).to.not.include({a: 1, b: 2}); // Not recommended + * + * `.include` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect([1, 2, 3]).to.include(4, 'nooo why fail??'); + * expect([1, 2, 3], 'nooo why fail??').to.include(4); + * + * `.include` can also be used as a language chain, causing all `.members` and + * `.keys` assertions that follow in the chain to require the target to be a + * superset of the expected set, rather than an identical set. Note that + * `.members` ignores duplicates in the subset when `.include` is added. + * + * // Target object's keys are a superset of ['a', 'b'] but not identical + * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b'); + * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b'); + * + * // Target array is a superset of [1, 2] but not identical + * expect([1, 2, 3]).to.include.members([1, 2]); + * expect([1, 2, 3]).to.not.have.members([1, 2]); + * + * // Duplicates in the subset are ignored + * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]); + * + * Note that adding `.any` earlier in the chain causes the `.keys` assertion + * to ignore `.include`. + * + * // Both assertions are identical + * expect({a: 1}).to.include.any.keys('a', 'b'); + * expect({a: 1}).to.have.any.keys('a', 'b'); + * + * The aliases `.includes`, `.contain`, and `.contains` can be used + * interchangeably with `.include`. + * + * @name include + * @alias contain + * @alias includes + * @alias contains + * @param {Mixed} val + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function SameValueZero(a, b) { + return (_.isNaN(a) && _.isNaN(b)) || a === b; + } + + function includeChainingBehavior () { + flag(this, 'contains', true); + } + + function include (val, msg) { + if (msg) flag(this, 'message', msg); + + var obj = flag(this, 'object') + , objType = _.type(obj).toLowerCase() + , flagMsg = flag(this, 'message') + , negate = flag(this, 'negate') + , ssfi = flag(this, 'ssfi') + , isDeep = flag(this, 'deep') + , descriptor = isDeep ? 'deep ' : ''; + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + var included = false; + + switch (objType) { + case 'string': + included = obj.indexOf(val) !== -1; + break; + + case 'weakset': + if (isDeep) { + throw new AssertionError( + flagMsg + 'unable to use .deep.include with WeakSet', + undefined, + ssfi + ); + } + + included = obj.has(val); + break; + + case 'map': + var isEql = isDeep ? _.eql : SameValueZero; + obj.forEach(function (item) { + included = included || isEql(item, val); + }); + break; + + case 'set': + if (isDeep) { + obj.forEach(function (item) { + included = included || _.eql(item, val); + }); + } else { + included = obj.has(val); + } + break; + + case 'array': + if (isDeep) { + included = obj.some(function (item) { + return _.eql(item, val); + }) + } else { + included = obj.indexOf(val) !== -1; + } + break; + + default: + // This block is for asserting a subset of properties in an object. + // `_.expectTypes` isn't used here because `.include` should work with + // objects with a custom `@@toStringTag`. + if (val !== Object(val)) { + throw new AssertionError( + flagMsg + 'object tested must be an array, a map, an object,' + + ' a set, a string, or a weakset, but ' + objType + ' given', + undefined, + ssfi + ); + } + + var props = Object.keys(val) + , firstErr = null + , numErrs = 0; + + props.forEach(function (prop) { + var propAssertion = new Assertion(obj); + _.transferFlags(this, propAssertion, true); + flag(propAssertion, 'lockSsfi', true); + + if (!negate || props.length === 1) { + propAssertion.property(prop, val[prop]); + return; + } + + try { + propAssertion.property(prop, val[prop]); + } catch (err) { + if (!_.checkError.compatibleConstructor(err, AssertionError)) { + throw err; + } + if (firstErr === null) firstErr = err; + numErrs++; + } + }, this); + + // When validating .not.include with multiple properties, we only want + // to throw an assertion error if all of the properties are included, + // in which case we throw the first property assertion error that we + // encountered. + if (negate && props.length > 1 && numErrs === props.length) { + throw firstErr; + } + return; + } + + // Assert inclusion in collection or substring in a string. + this.assert( + included + , 'expected #{this} to ' + descriptor + 'include ' + _.inspect(val) + , 'expected #{this} to not ' + descriptor + 'include ' + _.inspect(val)); + } + + Assertion.addChainableMethod('include', include, includeChainingBehavior); + Assertion.addChainableMethod('contain', include, includeChainingBehavior); + Assertion.addChainableMethod('contains', include, includeChainingBehavior); + Assertion.addChainableMethod('includes', include, includeChainingBehavior); + + /** + * ### .ok + * + * Asserts that the target is a truthy value (considered `true` in boolean context). + * However, it's often best to assert that the target is strictly (`===`) or + * deeply equal to its expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.ok; // Not recommended + * + * expect(true).to.be.true; // Recommended + * expect(true).to.be.ok; // Not recommended + * + * Add `.not` earlier in the chain to negate `.ok`. + * + * expect(0).to.equal(0); // Recommended + * expect(0).to.not.be.ok; // Not recommended + * + * expect(false).to.be.false; // Recommended + * expect(false).to.not.be.ok; // Not recommended + * + * expect(null).to.be.null; // Recommended + * expect(null).to.not.be.ok; // Not recommended + * + * expect(undefined).to.be.undefined; // Recommended + * expect(undefined).to.not.be.ok; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(false, 'nooo why fail??').to.be.ok; + * + * @name ok + * @namespace BDD + * @api public + */ + + Assertion.addProperty('ok', function () { + this.assert( + flag(this, 'object') + , 'expected #{this} to be truthy' + , 'expected #{this} to be falsy'); + }); + + /** + * ### .true + * + * Asserts that the target is strictly (`===`) equal to `true`. + * + * expect(true).to.be.true; + * + * Add `.not` earlier in the chain to negate `.true`. However, it's often best + * to assert that the target is equal to its expected value, rather than not + * equal to `true`. + * + * expect(false).to.be.false; // Recommended + * expect(false).to.not.be.true; // Not recommended + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.true; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(false, 'nooo why fail??').to.be.true; + * + * @name true + * @namespace BDD + * @api public + */ + + Assertion.addProperty('true', function () { + this.assert( + true === flag(this, 'object') + , 'expected #{this} to be true' + , 'expected #{this} to be false' + , flag(this, 'negate') ? false : true + ); + }); + + /** + * ### .false + * + * Asserts that the target is strictly (`===`) equal to `false`. + * + * expect(false).to.be.false; + * + * Add `.not` earlier in the chain to negate `.false`. However, it's often + * best to assert that the target is equal to its expected value, rather than + * not equal to `false`. + * + * expect(true).to.be.true; // Recommended + * expect(true).to.not.be.false; // Not recommended + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.false; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(true, 'nooo why fail??').to.be.false; + * + * @name false + * @namespace BDD + * @api public + */ + + Assertion.addProperty('false', function () { + this.assert( + false === flag(this, 'object') + , 'expected #{this} to be false' + , 'expected #{this} to be true' + , flag(this, 'negate') ? true : false + ); + }); + + /** + * ### .null + * + * Asserts that the target is strictly (`===`) equal to `null`. + * + * expect(null).to.be.null; + * + * Add `.not` earlier in the chain to negate `.null`. However, it's often best + * to assert that the target is equal to its expected value, rather than not + * equal to `null`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.null; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(42, 'nooo why fail??').to.be.null; + * + * @name null + * @namespace BDD + * @api public + */ + + Assertion.addProperty('null', function () { + this.assert( + null === flag(this, 'object') + , 'expected #{this} to be null' + , 'expected #{this} not to be null' + ); + }); + + /** + * ### .undefined + * + * Asserts that the target is strictly (`===`) equal to `undefined`. + * + * expect(undefined).to.be.undefined; + * + * Add `.not` earlier in the chain to negate `.undefined`. However, it's often + * best to assert that the target is equal to its expected value, rather than + * not equal to `undefined`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.undefined; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(42, 'nooo why fail??').to.be.undefined; + * + * @name undefined + * @namespace BDD + * @api public + */ + + Assertion.addProperty('undefined', function () { + this.assert( + undefined === flag(this, 'object') + , 'expected #{this} to be undefined' + , 'expected #{this} not to be undefined' + ); + }); + + /** + * ### .NaN + * + * Asserts that the target is exactly `NaN`. + * + * expect(NaN).to.be.NaN; + * + * Add `.not` earlier in the chain to negate `.NaN`. However, it's often best + * to assert that the target is equal to its expected value, rather than not + * equal to `NaN`. + * + * expect('foo').to.equal('foo'); // Recommended + * expect('foo').to.not.be.NaN; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(42, 'nooo why fail??').to.be.NaN; + * + * @name NaN + * @namespace BDD + * @api public + */ + + Assertion.addProperty('NaN', function () { + this.assert( + _.isNaN(flag(this, 'object')) + , 'expected #{this} to be NaN' + , 'expected #{this} not to be NaN' + ); + }); + + /** + * ### .exist + * + * Asserts that the target is not strictly (`===`) equal to either `null` or + * `undefined`. However, it's often best to assert that the target is equal to + * its expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.exist; // Not recommended + * + * expect(0).to.equal(0); // Recommended + * expect(0).to.exist; // Not recommended + * + * Add `.not` earlier in the chain to negate `.exist`. + * + * expect(null).to.be.null; // Recommended + * expect(null).to.not.exist; // Not recommended + * + * expect(undefined).to.be.undefined; // Recommended + * expect(undefined).to.not.exist; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(null, 'nooo why fail??').to.exist; + * + * @name exist + * @namespace BDD + * @api public + */ + + Assertion.addProperty('exist', function () { + var val = flag(this, 'object'); + this.assert( + val !== null && val !== undefined + , 'expected #{this} to exist' + , 'expected #{this} to not exist' + ); + }); + + /** + * ### .empty + * + * When the target is a string or array, `.empty` asserts that the target's + * `length` property is strictly (`===`) equal to `0`. + * + * expect([]).to.be.empty; + * expect('').to.be.empty; + * + * When the target is a map or set, `.empty` asserts that the target's `size` + * property is strictly equal to `0`. + * + * expect(new Set()).to.be.empty; + * expect(new Map()).to.be.empty; + * + * When the target is a non-function object, `.empty` asserts that the target + * doesn't have any own enumerable properties. Properties with Symbol-based + * keys are excluded from the count. + * + * expect({}).to.be.empty; + * + * Because `.empty` does different things based on the target's type, it's + * important to check the target's type before using `.empty`. See the `.a` + * doc for info on testing a target's type. + * + * expect([]).to.be.an('array').that.is.empty; + * + * Add `.not` earlier in the chain to negate `.empty`. However, it's often + * best to assert that the target contains its expected number of values, + * rather than asserting that it's not empty. + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.not.be.empty; // Not recommended + * + * expect(new Set([1, 2, 3])).to.have.property('size', 3); // Recommended + * expect(new Set([1, 2, 3])).to.not.be.empty; // Not recommended + * + * expect(Object.keys({a: 1})).to.have.lengthOf(1); // Recommended + * expect({a: 1}).to.not.be.empty; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect([1, 2, 3], 'nooo why fail??').to.be.empty; + * + * @name empty + * @namespace BDD + * @api public + */ + + Assertion.addProperty('empty', function () { + var val = flag(this, 'object') + , ssfi = flag(this, 'ssfi') + , flagMsg = flag(this, 'message') + , itemsCount; + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + switch (_.type(val).toLowerCase()) { + case 'array': + case 'string': + itemsCount = val.length; + break; + case 'map': + case 'set': + itemsCount = val.size; + break; + case 'weakmap': + case 'weakset': + throw new AssertionError( + flagMsg + '.empty was passed a weak collection', + undefined, + ssfi + ); + case 'function': + var msg = flagMsg + '.empty was passed a function ' + _.getName(val); + throw new AssertionError(msg.trim(), undefined, ssfi); + default: + if (val !== Object(val)) { + throw new AssertionError( + flagMsg + '.empty was passed non-string primitive ' + _.inspect(val), + undefined, + ssfi + ); + } + itemsCount = Object.keys(val).length; + } + + this.assert( + 0 === itemsCount + , 'expected #{this} to be empty' + , 'expected #{this} not to be empty' + ); + }); + + /** + * ### .arguments + * + * Asserts that the target is an `arguments` object. + * + * function test () { + * expect(arguments).to.be.arguments; + * } + * + * test(); + * + * Add `.not` earlier in the chain to negate `.arguments`. However, it's often + * best to assert which type the target is expected to be, rather than + * asserting that its not an `arguments` object. + * + * expect('foo').to.be.a('string'); // Recommended + * expect('foo').to.not.be.arguments; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({}, 'nooo why fail??').to.be.arguments; + * + * The alias `.Arguments` can be used interchangeably with `.arguments`. + * + * @name arguments + * @alias Arguments + * @namespace BDD + * @api public + */ + + function checkArguments () { + var obj = flag(this, 'object') + , type = _.type(obj); + this.assert( + 'Arguments' === type + , 'expected #{this} to be arguments but got ' + type + , 'expected #{this} to not be arguments' + ); + } + + Assertion.addProperty('arguments', checkArguments); + Assertion.addProperty('Arguments', checkArguments); + + /** + * ### .equal(val[, msg]) + * + * Asserts that the target is strictly (`===`) equal to the given `val`. + * + * expect(1).to.equal(1); + * expect('foo').to.equal('foo'); + * + * Add `.deep` earlier in the chain to use deep equality instead. See the + * `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target object deeply (but not strictly) equals `{a: 1}` + * expect({a: 1}).to.deep.equal({a: 1}); + * expect({a: 1}).to.not.equal({a: 1}); + * + * // Target array deeply (but not strictly) equals `[1, 2]` + * expect([1, 2]).to.deep.equal([1, 2]); + * expect([1, 2]).to.not.equal([1, 2]); + * + * Add `.not` earlier in the chain to negate `.equal`. However, it's often + * best to assert that the target is equal to its expected value, rather than + * not equal to one of countless unexpected values. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.equal(2); // Not recommended + * + * `.equal` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.equal(2, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.equal(2); + * + * The aliases `.equals` and `eq` can be used interchangeably with `.equal`. + * + * @name equal + * @alias equals + * @alias eq + * @param {Mixed} val + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertEqual (val, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + if (flag(this, 'deep')) { + var prevLockSsfi = flag(this, 'lockSsfi'); + flag(this, 'lockSsfi', true); + this.eql(val); + flag(this, 'lockSsfi', prevLockSsfi); + } else { + this.assert( + val === obj + , 'expected #{this} to equal #{exp}' + , 'expected #{this} to not equal #{exp}' + , val + , this._obj + , true + ); + } + } + + Assertion.addMethod('equal', assertEqual); + Assertion.addMethod('equals', assertEqual); + Assertion.addMethod('eq', assertEqual); + + /** + * ### .eql(obj[, msg]) + * + * Asserts that the target is deeply equal to the given `obj`. See the + * `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target object is deeply (but not strictly) equal to {a: 1} + * expect({a: 1}).to.eql({a: 1}).but.not.equal({a: 1}); + * + * // Target array is deeply (but not strictly) equal to [1, 2] + * expect([1, 2]).to.eql([1, 2]).but.not.equal([1, 2]); + * + * Add `.not` earlier in the chain to negate `.eql`. However, it's often best + * to assert that the target is deeply equal to its expected value, rather + * than not deeply equal to one of countless unexpected values. + * + * expect({a: 1}).to.eql({a: 1}); // Recommended + * expect({a: 1}).to.not.eql({b: 2}); // Not recommended + * + * `.eql` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect({a: 1}).to.eql({b: 2}, 'nooo why fail??'); + * expect({a: 1}, 'nooo why fail??').to.eql({b: 2}); + * + * The alias `.eqls` can be used interchangeably with `.eql`. + * + * The `.deep.equal` assertion is almost identical to `.eql` but with one + * difference: `.deep.equal` causes deep equality comparisons to also be used + * for any other assertions that follow in the chain. + * + * @name eql + * @alias eqls + * @param {Mixed} obj + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertEql(obj, msg) { + if (msg) flag(this, 'message', msg); + this.assert( + _.eql(obj, flag(this, 'object')) + , 'expected #{this} to deeply equal #{exp}' + , 'expected #{this} to not deeply equal #{exp}' + , obj + , this._obj + , true + ); + } + + Assertion.addMethod('eql', assertEql); + Assertion.addMethod('eqls', assertEql); + + /** + * ### .above(n[, msg]) + * + * Asserts that the target is a number or a date greater than the given number or date `n` respectively. + * However, it's often best to assert that the target is equal to its expected + * value. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.be.above(1); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is greater than the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.above(2); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.above(2); // Not recommended + * + * Add `.not` earlier in the chain to negate `.above`. + * + * expect(2).to.equal(2); // Recommended + * expect(1).to.not.be.above(2); // Not recommended + * + * `.above` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.be.above(2, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.above(2); + * + * The aliases `.gt` and `.greaterThan` can be used interchangeably with + * `.above`. + * + * @name above + * @alias gt + * @alias greaterThan + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertAbove (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to above must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to above must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount > n + , 'expected #{this} to have a ' + descriptor + ' above #{exp} but got #{act}' + , 'expected #{this} to not have a ' + descriptor + ' above #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj > n + , 'expected #{this} to be above #{exp}' + , 'expected #{this} to be at most #{exp}' + , n + ); + } + } + + Assertion.addMethod('above', assertAbove); + Assertion.addMethod('gt', assertAbove); + Assertion.addMethod('greaterThan', assertAbove); + + /** + * ### .least(n[, msg]) + * + * Asserts that the target is a number or a date greater than or equal to the given + * number or date `n` respectively. However, it's often best to assert that the target is equal to + * its expected value. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.be.at.least(1); // Not recommended + * expect(2).to.be.at.least(2); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is greater than or equal to the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.at.least(2); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.at.least(2); // Not recommended + * + * Add `.not` earlier in the chain to negate `.least`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.at.least(2); // Not recommended + * + * `.least` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.be.at.least(2, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.at.least(2); + * + * The alias `.gte` can be used interchangeably with `.least`. + * + * @name least + * @alias gte + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertLeast (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to least must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to least must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount >= n + , 'expected #{this} to have a ' + descriptor + ' at least #{exp} but got #{act}' + , 'expected #{this} to have a ' + descriptor + ' below #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj >= n + , 'expected #{this} to be at least #{exp}' + , 'expected #{this} to be below #{exp}' + , n + ); + } + } + + Assertion.addMethod('least', assertLeast); + Assertion.addMethod('gte', assertLeast); + + /** + * ### .below(n[, msg]) + * + * Asserts that the target is a number or a date less than the given number or date `n` respectively. + * However, it's often best to assert that the target is equal to its expected + * value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.below(2); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is less than the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.below(4); // Not recommended + * + * expect([1, 2, 3]).to.have.length(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.below(4); // Not recommended + * + * Add `.not` earlier in the chain to negate `.below`. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.not.be.below(1); // Not recommended + * + * `.below` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(2).to.be.below(1, 'nooo why fail??'); + * expect(2, 'nooo why fail??').to.be.below(1); + * + * The aliases `.lt` and `.lessThan` can be used interchangeably with + * `.below`. + * + * @name below + * @alias lt + * @alias lessThan + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertBelow (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to below must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to below must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount < n + , 'expected #{this} to have a ' + descriptor + ' below #{exp} but got #{act}' + , 'expected #{this} to not have a ' + descriptor + ' below #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj < n + , 'expected #{this} to be below #{exp}' + , 'expected #{this} to be at least #{exp}' + , n + ); + } + } + + Assertion.addMethod('below', assertBelow); + Assertion.addMethod('lt', assertBelow); + Assertion.addMethod('lessThan', assertBelow); + + /** + * ### .most(n[, msg]) + * + * Asserts that the target is a number or a date less than or equal to the given number + * or date `n` respectively. However, it's often best to assert that the target is equal to its + * expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.at.most(2); // Not recommended + * expect(1).to.be.at.most(1); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is less than or equal to the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.at.most(4); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.at.most(4); // Not recommended + * + * Add `.not` earlier in the chain to negate `.most`. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.not.be.at.most(1); // Not recommended + * + * `.most` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(2).to.be.at.most(1, 'nooo why fail??'); + * expect(2, 'nooo why fail??').to.be.at.most(1); + * + * The alias `.lte` can be used interchangeably with `.most`. + * + * @name most + * @alias lte + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertMost (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to most must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to most must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount <= n + , 'expected #{this} to have a ' + descriptor + ' at most #{exp} but got #{act}' + , 'expected #{this} to have a ' + descriptor + ' above #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj <= n + , 'expected #{this} to be at most #{exp}' + , 'expected #{this} to be above #{exp}' + , n + ); + } + } + + Assertion.addMethod('most', assertMost); + Assertion.addMethod('lte', assertMost); + + /** + * ### .within(start, finish[, msg]) + * + * Asserts that the target is a number or a date greater than or equal to the given + * number or date `start`, and less than or equal to the given number or date `finish` respectively. + * However, it's often best to assert that the target is equal to its expected + * value. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.be.within(1, 3); // Not recommended + * expect(2).to.be.within(2, 3); // Not recommended + * expect(2).to.be.within(1, 2); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is greater than or equal to the given number `start`, and less + * than or equal to the given number `finish`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.within(2, 4); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.within(2, 4); // Not recommended + * + * Add `.not` earlier in the chain to negate `.within`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.within(2, 4); // Not recommended + * + * `.within` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(4).to.be.within(1, 3, 'nooo why fail??'); + * expect(4, 'nooo why fail??').to.be.within(1, 3); + * + * @name within + * @param {Number} start lower bound inclusive + * @param {Number} finish upper bound inclusive + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + Assertion.addMethod('within', function (start, finish, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , startType = _.type(start).toLowerCase() + , finishType = _.type(finish).toLowerCase() + , errorMessage + , shouldThrow = true + , range = (startType === 'date' && finishType === 'date') + ? start.toUTCString() + '..' + finish.toUTCString() + : start + '..' + finish; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && (startType !== 'date' || finishType !== 'date'))) { + errorMessage = msgPrefix + 'the arguments to within must be dates'; + } else if ((startType !== 'number' || finishType !== 'number') && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the arguments to within must be numbers'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount >= start && itemsCount <= finish + , 'expected #{this} to have a ' + descriptor + ' within ' + range + , 'expected #{this} to not have a ' + descriptor + ' within ' + range + ); + } else { + this.assert( + obj >= start && obj <= finish + , 'expected #{this} to be within ' + range + , 'expected #{this} to not be within ' + range + ); + } + }); + + /** + * ### .instanceof(constructor[, msg]) + * + * Asserts that the target is an instance of the given `constructor`. + * + * function Cat () { } + * + * expect(new Cat()).to.be.an.instanceof(Cat); + * expect([1, 2]).to.be.an.instanceof(Array); + * + * Add `.not` earlier in the chain to negate `.instanceof`. + * + * expect({a: 1}).to.not.be.an.instanceof(Array); + * + * `.instanceof` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(1).to.be.an.instanceof(Array, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.an.instanceof(Array); + * + * Due to limitations in ES5, `.instanceof` may not always work as expected + * when using a transpiler such as Babel or TypeScript. In particular, it may + * produce unexpected results when subclassing built-in object such as + * `Array`, `Error`, and `Map`. See your transpiler's docs for details: + * + * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes)) + * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work)) + * + * The alias `.instanceOf` can be used interchangeably with `.instanceof`. + * + * @name instanceof + * @param {Constructor} constructor + * @param {String} msg _optional_ + * @alias instanceOf + * @namespace BDD + * @api public + */ + + function assertInstanceOf (constructor, msg) { + if (msg) flag(this, 'message', msg); + + var target = flag(this, 'object') + var ssfi = flag(this, 'ssfi'); + var flagMsg = flag(this, 'message'); + + try { + var isInstanceOf = target instanceof constructor; + } catch (err) { + if (err instanceof TypeError) { + flagMsg = flagMsg ? flagMsg + ': ' : ''; + throw new AssertionError( + flagMsg + 'The instanceof assertion needs a constructor but ' + + _.type(constructor) + ' was given.', + undefined, + ssfi + ); + } + throw err; + } + + var name = _.getName(constructor); + if (name === null) { + name = 'an unnamed constructor'; + } + + this.assert( + isInstanceOf + , 'expected #{this} to be an instance of ' + name + , 'expected #{this} to not be an instance of ' + name + ); + }; + + Assertion.addMethod('instanceof', assertInstanceOf); + Assertion.addMethod('instanceOf', assertInstanceOf); + + /** + * ### .property(name[, val[, msg]]) + * + * Asserts that the target has a property with the given key `name`. + * + * expect({a: 1}).to.have.property('a'); + * + * When `val` is provided, `.property` also asserts that the property's value + * is equal to the given `val`. + * + * expect({a: 1}).to.have.property('a', 1); + * + * By default, strict (`===`) equality is used. Add `.deep` earlier in the + * chain to use deep equality instead. See the `deep-eql` project page for + * info on the deep equality algorithm: https://github.com/chaijs/deep-eql. + * + * // Target object deeply (but not strictly) has property `x: {a: 1}` + * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1}); + * expect({x: {a: 1}}).to.not.have.property('x', {a: 1}); + * + * The target's enumerable and non-enumerable properties are always included + * in the search. By default, both own and inherited properties are included. + * Add `.own` earlier in the chain to exclude inherited properties from the + * search. + * + * Object.prototype.b = 2; + * + * expect({a: 1}).to.have.own.property('a'); + * expect({a: 1}).to.have.own.property('a', 1); + * expect({a: 1}).to.have.property('b'); + * expect({a: 1}).to.not.have.own.property('b'); + * + * `.deep` and `.own` can be combined. + * + * expect({x: {a: 1}}).to.have.deep.own.property('x', {a: 1}); + * + * Add `.nested` earlier in the chain to enable dot- and bracket-notation when + * referencing nested properties. + * + * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]'); + * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]', 'y'); + * + * If `.` or `[]` are part of an actual property name, they can be escaped by + * adding two backslashes before them. + * + * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\.a.\\[b\\]'); + * + * `.deep` and `.nested` can be combined. + * + * expect({a: {b: [{c: 3}]}}) + * .to.have.deep.nested.property('a.b[0]', {c: 3}); + * + * `.own` and `.nested` cannot be combined. + * + * Add `.not` earlier in the chain to negate `.property`. + * + * expect({a: 1}).to.not.have.property('b'); + * + * However, it's dangerous to negate `.property` when providing `val`. The + * problem is that it creates uncertain expectations by asserting that the + * target either doesn't have a property with the given key `name`, or that it + * does have a property with the given key `name` but its value isn't equal to + * the given `val`. It's often best to identify the exact output that's + * expected, and then write an assertion that only accepts that exact output. + * + * When the target isn't expected to have a property with the given key + * `name`, it's often best to assert exactly that. + * + * expect({b: 2}).to.not.have.property('a'); // Recommended + * expect({b: 2}).to.not.have.property('a', 1); // Not recommended + * + * When the target is expected to have a property with the given key `name`, + * it's often best to assert that the property has its expected value, rather + * than asserting that it doesn't have one of many unexpected values. + * + * expect({a: 3}).to.have.property('a', 3); // Recommended + * expect({a: 3}).to.not.have.property('a', 1); // Not recommended + * + * `.property` changes the target of any assertions that follow in the chain + * to be the value of the property from the original target object. + * + * expect({a: 1}).to.have.property('a').that.is.a('number'); + * + * `.property` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing `val`, only use the + * second form. + * + * // Recommended + * expect({a: 1}).to.have.property('a', 2, 'nooo why fail??'); + * expect({a: 1}, 'nooo why fail??').to.have.property('a', 2); + * expect({a: 1}, 'nooo why fail??').to.have.property('b'); + * + * // Not recommended + * expect({a: 1}).to.have.property('b', undefined, 'nooo why fail??'); + * + * The above assertion isn't the same thing as not providing `val`. Instead, + * it's asserting that the target object has a `b` property that's equal to + * `undefined`. + * + * The assertions `.ownProperty` and `.haveOwnProperty` can be used + * interchangeably with `.own.property`. + * + * @name property + * @param {String} name + * @param {Mixed} val (optional) + * @param {String} msg _optional_ + * @returns value of property for chaining + * @namespace BDD + * @api public + */ + + function assertProperty (name, val, msg) { + if (msg) flag(this, 'message', msg); + + var isNested = flag(this, 'nested') + , isOwn = flag(this, 'own') + , flagMsg = flag(this, 'message') + , obj = flag(this, 'object') + , ssfi = flag(this, 'ssfi') + , nameType = typeof name; + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + if (isNested) { + if (nameType !== 'string') { + throw new AssertionError( + flagMsg + 'the argument to property must be a string when using nested syntax', + undefined, + ssfi + ); + } + } else { + if (nameType !== 'string' && nameType !== 'number' && nameType !== 'symbol') { + throw new AssertionError( + flagMsg + 'the argument to property must be a string, number, or symbol', + undefined, + ssfi + ); + } + } + + if (isNested && isOwn) { + throw new AssertionError( + flagMsg + 'The "nested" and "own" flags cannot be combined.', + undefined, + ssfi + ); + } + + if (obj === null || obj === undefined) { + throw new AssertionError( + flagMsg + 'Target cannot be null or undefined.', + undefined, + ssfi + ); + } + + var isDeep = flag(this, 'deep') + , negate = flag(this, 'negate') + , pathInfo = isNested ? _.getPathInfo(obj, name) : null + , value = isNested ? pathInfo.value : obj[name]; + + var descriptor = ''; + if (isDeep) descriptor += 'deep '; + if (isOwn) descriptor += 'own '; + if (isNested) descriptor += 'nested '; + descriptor += 'property '; + + var hasProperty; + if (isOwn) hasProperty = Object.prototype.hasOwnProperty.call(obj, name); + else if (isNested) hasProperty = pathInfo.exists; + else hasProperty = _.hasProperty(obj, name); + + // When performing a negated assertion for both name and val, merely having + // a property with the given name isn't enough to cause the assertion to + // fail. It must both have a property with the given name, and the value of + // that property must equal the given val. Therefore, skip this assertion in + // favor of the next. + if (!negate || arguments.length === 1) { + this.assert( + hasProperty + , 'expected #{this} to have ' + descriptor + _.inspect(name) + , 'expected #{this} to not have ' + descriptor + _.inspect(name)); + } + + if (arguments.length > 1) { + this.assert( + hasProperty && (isDeep ? _.eql(val, value) : val === value) + , 'expected #{this} to have ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}' + , 'expected #{this} to not have ' + descriptor + _.inspect(name) + ' of #{act}' + , val + , value + ); + } + + flag(this, 'object', value); + } + + Assertion.addMethod('property', assertProperty); + + function assertOwnProperty (name, value, msg) { + flag(this, 'own', true); + assertProperty.apply(this, arguments); + } + + Assertion.addMethod('ownProperty', assertOwnProperty); + Assertion.addMethod('haveOwnProperty', assertOwnProperty); + + /** + * ### .ownPropertyDescriptor(name[, descriptor[, msg]]) + * + * Asserts that the target has its own property descriptor with the given key + * `name`. Enumerable and non-enumerable properties are included in the + * search. + * + * expect({a: 1}).to.have.ownPropertyDescriptor('a'); + * + * When `descriptor` is provided, `.ownPropertyDescriptor` also asserts that + * the property's descriptor is deeply equal to the given `descriptor`. See + * the `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * expect({a: 1}).to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, + * }); + * + * Add `.not` earlier in the chain to negate `.ownPropertyDescriptor`. + * + * expect({a: 1}).to.not.have.ownPropertyDescriptor('b'); + * + * However, it's dangerous to negate `.ownPropertyDescriptor` when providing + * a `descriptor`. The problem is that it creates uncertain expectations by + * asserting that the target either doesn't have a property descriptor with + * the given key `name`, or that it does have a property descriptor with the + * given key `name` but its not deeply equal to the given `descriptor`. It's + * often best to identify the exact output that's expected, and then write an + * assertion that only accepts that exact output. + * + * When the target isn't expected to have a property descriptor with the given + * key `name`, it's often best to assert exactly that. + * + * // Recommended + * expect({b: 2}).to.not.have.ownPropertyDescriptor('a'); + * + * // Not recommended + * expect({b: 2}).to.not.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, + * }); + * + * When the target is expected to have a property descriptor with the given + * key `name`, it's often best to assert that the property has its expected + * descriptor, rather than asserting that it doesn't have one of many + * unexpected descriptors. + * + * // Recommended + * expect({a: 3}).to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 3, + * }); + * + * // Not recommended + * expect({a: 3}).to.not.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, + * }); + * + * `.ownPropertyDescriptor` changes the target of any assertions that follow + * in the chain to be the value of the property descriptor from the original + * target object. + * + * expect({a: 1}).to.have.ownPropertyDescriptor('a') + * .that.has.property('enumerable', true); + * + * `.ownPropertyDescriptor` accepts an optional `msg` argument which is a + * custom error message to show when the assertion fails. The message can also + * be given as the second argument to `expect`. When not providing + * `descriptor`, only use the second form. + * + * // Recommended + * expect({a: 1}).to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 2, + * }, 'nooo why fail??'); + * + * // Recommended + * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 2, + * }); + * + * // Recommended + * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('b'); + * + * // Not recommended + * expect({a: 1}) + * .to.have.ownPropertyDescriptor('b', undefined, 'nooo why fail??'); + * + * The above assertion isn't the same thing as not providing `descriptor`. + * Instead, it's asserting that the target object has a `b` property + * descriptor that's deeply equal to `undefined`. + * + * The alias `.haveOwnPropertyDescriptor` can be used interchangeably with + * `.ownPropertyDescriptor`. + * + * @name ownPropertyDescriptor + * @alias haveOwnPropertyDescriptor + * @param {String} name + * @param {Object} descriptor _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertOwnPropertyDescriptor (name, descriptor, msg) { + if (typeof descriptor === 'string') { + msg = descriptor; + descriptor = null; + } + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name); + if (actualDescriptor && descriptor) { + this.assert( + _.eql(descriptor, actualDescriptor) + , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor) + , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor) + , descriptor + , actualDescriptor + , true + ); + } else { + this.assert( + actualDescriptor + , 'expected #{this} to have an own property descriptor for ' + _.inspect(name) + , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name) + ); + } + flag(this, 'object', actualDescriptor); + } + + Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor); + Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor); + + /** + * ### .lengthOf(n[, msg]) + * + * Asserts that the target's `length` or `size` is equal to the given number + * `n`. + * + * expect([1, 2, 3]).to.have.lengthOf(3); + * expect('foo').to.have.lengthOf(3); + * expect(new Set([1, 2, 3])).to.have.lengthOf(3); + * expect(new Map([['a', 1], ['b', 2], ['c', 3]])).to.have.lengthOf(3); + * + * Add `.not` earlier in the chain to negate `.lengthOf`. However, it's often + * best to assert that the target's `length` property is equal to its expected + * value, rather than not equal to one of many unexpected values. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.not.have.lengthOf(4); // Not recommended + * + * `.lengthOf` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect([1, 2, 3]).to.have.lengthOf(2, 'nooo why fail??'); + * expect([1, 2, 3], 'nooo why fail??').to.have.lengthOf(2); + * + * `.lengthOf` can also be used as a language chain, causing all `.above`, + * `.below`, `.least`, `.most`, and `.within` assertions that follow in the + * chain to use the target's `length` property as the target. However, it's + * often best to assert that the target's `length` property is equal to its + * expected length, rather than asserting that its `length` property falls + * within some range of values. + * + * // Recommended + * expect([1, 2, 3]).to.have.lengthOf(3); + * + * // Not recommended + * expect([1, 2, 3]).to.have.lengthOf.above(2); + * expect([1, 2, 3]).to.have.lengthOf.below(4); + * expect([1, 2, 3]).to.have.lengthOf.at.least(3); + * expect([1, 2, 3]).to.have.lengthOf.at.most(3); + * expect([1, 2, 3]).to.have.lengthOf.within(2,4); + * + * Due to a compatibility issue, the alias `.length` can't be chained directly + * off of an uninvoked method such as `.a`. Therefore, `.length` can't be used + * interchangeably with `.lengthOf` in every situation. It's recommended to + * always use `.lengthOf` instead of `.length`. + * + * expect([1, 2, 3]).to.have.a.length(3); // incompatible; throws error + * expect([1, 2, 3]).to.have.a.lengthOf(3); // passes as expected + * + * @name lengthOf + * @alias length + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertLengthChain () { + flag(this, 'doLength', true); + } + + function assertLength (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , objType = _.type(obj).toLowerCase() + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi') + , descriptor = 'length' + , itemsCount; + + switch (objType) { + case 'map': + case 'set': + descriptor = 'size'; + itemsCount = obj.size; + break; + default: + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + itemsCount = obj.length; + } + + this.assert( + itemsCount == n + , 'expected #{this} to have a ' + descriptor + ' of #{exp} but got #{act}' + , 'expected #{this} to not have a ' + descriptor + ' of #{act}' + , n + , itemsCount + ); + } + + Assertion.addChainableMethod('length', assertLength, assertLengthChain); + Assertion.addChainableMethod('lengthOf', assertLength, assertLengthChain); + + /** + * ### .match(re[, msg]) + * + * Asserts that the target matches the given regular expression `re`. + * + * expect('foobar').to.match(/^foo/); + * + * Add `.not` earlier in the chain to negate `.match`. + * + * expect('foobar').to.not.match(/taco/); + * + * `.match` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect('foobar').to.match(/taco/, 'nooo why fail??'); + * expect('foobar', 'nooo why fail??').to.match(/taco/); + * + * The alias `.matches` can be used interchangeably with `.match`. + * + * @name match + * @alias matches + * @param {RegExp} re + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + function assertMatch(re, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + this.assert( + re.exec(obj) + , 'expected #{this} to match ' + re + , 'expected #{this} not to match ' + re + ); + } + + Assertion.addMethod('match', assertMatch); + Assertion.addMethod('matches', assertMatch); + + /** + * ### .string(str[, msg]) + * + * Asserts that the target string contains the given substring `str`. + * + * expect('foobar').to.have.string('bar'); + * + * Add `.not` earlier in the chain to negate `.string`. + * + * expect('foobar').to.not.have.string('taco'); + * + * `.string` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect('foobar').to.have.string('taco', 'nooo why fail??'); + * expect('foobar', 'nooo why fail??').to.have.string('taco'); + * + * @name string + * @param {String} str + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + Assertion.addMethod('string', function (str, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(obj, flagMsg, ssfi, true).is.a('string'); + + this.assert( + ~obj.indexOf(str) + , 'expected #{this} to contain ' + _.inspect(str) + , 'expected #{this} to not contain ' + _.inspect(str) + ); + }); + + /** + * ### .keys(key1[, key2[, ...]]) + * + * Asserts that the target object, array, map, or set has the given keys. Only + * the target's own inherited properties are included in the search. + * + * When the target is an object or array, keys can be provided as one or more + * string arguments, a single array argument, or a single object argument. In + * the latter case, only the keys in the given object matter; the values are + * ignored. + * + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); + * expect(['x', 'y']).to.have.all.keys(0, 1); + * + * expect({a: 1, b: 2}).to.have.all.keys(['a', 'b']); + * expect(['x', 'y']).to.have.all.keys([0, 1]); + * + * expect({a: 1, b: 2}).to.have.all.keys({a: 4, b: 5}); // ignore 4 and 5 + * expect(['x', 'y']).to.have.all.keys({0: 4, 1: 5}); // ignore 4 and 5 + * + * When the target is a map or set, each key must be provided as a separate + * argument. + * + * expect(new Map([['a', 1], ['b', 2]])).to.have.all.keys('a', 'b'); + * expect(new Set(['a', 'b'])).to.have.all.keys('a', 'b'); + * + * Because `.keys` does different things based on the target's type, it's + * important to check the target's type before using `.keys`. See the `.a` doc + * for info on testing a target's type. + * + * expect({a: 1, b: 2}).to.be.an('object').that.has.all.keys('a', 'b'); + * + * By default, strict (`===`) equality is used to compare keys of maps and + * sets. Add `.deep` earlier in the chain to use deep equality instead. See + * the `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target set deeply (but not strictly) has key `{a: 1}` + * expect(new Set([{a: 1}])).to.have.all.deep.keys([{a: 1}]); + * expect(new Set([{a: 1}])).to.not.have.all.keys([{a: 1}]); + * + * By default, the target must have all of the given keys and no more. Add + * `.any` earlier in the chain to only require that the target have at least + * one of the given keys. Also, add `.not` earlier in the chain to negate + * `.keys`. It's often best to add `.any` when negating `.keys`, and to use + * `.all` when asserting `.keys` without negation. + * + * When negating `.keys`, `.any` is preferred because `.not.any.keys` asserts + * exactly what's expected of the output, whereas `.not.all.keys` creates + * uncertain expectations. + * + * // Recommended; asserts that target doesn't have any of the given keys + * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd'); + * + * // Not recommended; asserts that target doesn't have all of the given + * // keys but may or may not have some of them + * expect({a: 1, b: 2}).to.not.have.all.keys('c', 'd'); + * + * When asserting `.keys` without negation, `.all` is preferred because + * `.all.keys` asserts exactly what's expected of the output, whereas + * `.any.keys` creates uncertain expectations. + * + * // Recommended; asserts that target has all the given keys + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); + * + * // Not recommended; asserts that target has at least one of the given + * // keys but may or may not have more of them + * expect({a: 1, b: 2}).to.have.any.keys('a', 'b'); + * + * Note that `.all` is used by default when neither `.all` nor `.any` appear + * earlier in the chain. However, it's often best to add `.all` anyway because + * it improves readability. + * + * // Both assertions are identical + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); // Recommended + * expect({a: 1, b: 2}).to.have.keys('a', 'b'); // Not recommended + * + * Add `.include` earlier in the chain to require that the target's keys be a + * superset of the expected keys, rather than identical sets. + * + * // Target object's keys are a superset of ['a', 'b'] but not identical + * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b'); + * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b'); + * + * However, if `.any` and `.include` are combined, only the `.any` takes + * effect. The `.include` is ignored in this case. + * + * // Both assertions are identical + * expect({a: 1}).to.have.any.keys('a', 'b'); + * expect({a: 1}).to.include.any.keys('a', 'b'); + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({a: 1}, 'nooo why fail??').to.have.key('b'); + * + * The alias `.key` can be used interchangeably with `.keys`. + * + * @name keys + * @alias key + * @param {...String|Array|Object} keys + * @namespace BDD + * @api public + */ + + function assertKeys (keys) { + var obj = flag(this, 'object') + , objType = _.type(obj) + , keysType = _.type(keys) + , ssfi = flag(this, 'ssfi') + , isDeep = flag(this, 'deep') + , str + , deepStr = '' + , actual + , ok = true + , flagMsg = flag(this, 'message'); + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + var mixedArgsMsg = flagMsg + 'when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments'; + + if (objType === 'Map' || objType === 'Set') { + deepStr = isDeep ? 'deeply ' : ''; + actual = []; + + // Map and Set '.keys' aren't supported in IE 11. Therefore, use .forEach. + obj.forEach(function (val, key) { actual.push(key) }); + + if (keysType !== 'Array') { + keys = Array.prototype.slice.call(arguments); + } + } else { + actual = _.getOwnEnumerableProperties(obj); + + switch (keysType) { + case 'Array': + if (arguments.length > 1) { + throw new AssertionError(mixedArgsMsg, undefined, ssfi); + } + break; + case 'Object': + if (arguments.length > 1) { + throw new AssertionError(mixedArgsMsg, undefined, ssfi); + } + keys = Object.keys(keys); + break; + default: + keys = Array.prototype.slice.call(arguments); + } + + // Only stringify non-Symbols because Symbols would become "Symbol()" + keys = keys.map(function (val) { + return typeof val === 'symbol' ? val : String(val); + }); + } + + if (!keys.length) { + throw new AssertionError(flagMsg + 'keys required', undefined, ssfi); + } + + var len = keys.length + , any = flag(this, 'any') + , all = flag(this, 'all') + , expected = keys; + + if (!any && !all) { + all = true; + } + + // Has any + if (any) { + ok = expected.some(function(expectedKey) { + return actual.some(function(actualKey) { + if (isDeep) { + return _.eql(expectedKey, actualKey); + } else { + return expectedKey === actualKey; + } + }); + }); + } + + // Has all + if (all) { + ok = expected.every(function(expectedKey) { + return actual.some(function(actualKey) { + if (isDeep) { + return _.eql(expectedKey, actualKey); + } else { + return expectedKey === actualKey; + } + }); + }); + + if (!flag(this, 'contains')) { + ok = ok && keys.length == actual.length; + } + } + + // Key string + if (len > 1) { + keys = keys.map(function(key) { + return _.inspect(key); + }); + var last = keys.pop(); + if (all) { + str = keys.join(', ') + ', and ' + last; + } + if (any) { + str = keys.join(', ') + ', or ' + last; + } + } else { + str = _.inspect(keys[0]); + } + + // Form + str = (len > 1 ? 'keys ' : 'key ') + str; + + // Have / include + str = (flag(this, 'contains') ? 'contain ' : 'have ') + str; + + // Assertion + this.assert( + ok + , 'expected #{this} to ' + deepStr + str + , 'expected #{this} to not ' + deepStr + str + , expected.slice(0).sort(_.compareByInspect) + , actual.sort(_.compareByInspect) + , true + ); + } + + Assertion.addMethod('keys', assertKeys); + Assertion.addMethod('key', assertKeys); + + /** + * ### .throw([errorLike], [errMsgMatcher], [msg]) + * + * When no arguments are provided, `.throw` invokes the target function and + * asserts that an error is thrown. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(); + * + * When one argument is provided, and it's an error constructor, `.throw` + * invokes the target function and asserts that an error is thrown that's an + * instance of that error constructor. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(TypeError); + * + * When one argument is provided, and it's an error instance, `.throw` invokes + * the target function and asserts that an error is thrown that's strictly + * (`===`) equal to that error instance. + * + * var err = new TypeError('Illegal salmon!'); + * var badFn = function () { throw err; }; + * + * expect(badFn).to.throw(err); + * + * When one argument is provided, and it's a string, `.throw` invokes the + * target function and asserts that an error is thrown with a message that + * contains that string. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw('salmon'); + * + * When one argument is provided, and it's a regular expression, `.throw` + * invokes the target function and asserts that an error is thrown with a + * message that matches that regular expression. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(/salmon/); + * + * When two arguments are provided, and the first is an error instance or + * constructor, and the second is a string or regular expression, `.throw` + * invokes the function and asserts that an error is thrown that fulfills both + * conditions as described above. + * + * var err = new TypeError('Illegal salmon!'); + * var badFn = function () { throw err; }; + * + * expect(badFn).to.throw(TypeError, 'salmon'); + * expect(badFn).to.throw(TypeError, /salmon/); + * expect(badFn).to.throw(err, 'salmon'); + * expect(badFn).to.throw(err, /salmon/); + * + * Add `.not` earlier in the chain to negate `.throw`. + * + * var goodFn = function () {}; + * + * expect(goodFn).to.not.throw(); + * + * However, it's dangerous to negate `.throw` when providing any arguments. + * The problem is that it creates uncertain expectations by asserting that the + * target either doesn't throw an error, or that it throws an error but of a + * different type than the given type, or that it throws an error of the given + * type but with a message that doesn't include the given string. It's often + * best to identify the exact output that's expected, and then write an + * assertion that only accepts that exact output. + * + * When the target isn't expected to throw an error, it's often best to assert + * exactly that. + * + * var goodFn = function () {}; + * + * expect(goodFn).to.not.throw(); // Recommended + * expect(goodFn).to.not.throw(ReferenceError, 'x'); // Not recommended + * + * When the target is expected to throw an error, it's often best to assert + * that the error is of its expected type, and has a message that includes an + * expected string, rather than asserting that it doesn't have one of many + * unexpected types, and doesn't have a message that includes some string. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(TypeError, 'salmon'); // Recommended + * expect(badFn).to.not.throw(ReferenceError, 'x'); // Not recommended + * + * `.throw` changes the target of any assertions that follow in the chain to + * be the error object that's thrown. + * + * var err = new TypeError('Illegal salmon!'); + * err.code = 42; + * var badFn = function () { throw err; }; + * + * expect(badFn).to.throw(TypeError).with.property('code', 42); + * + * `.throw` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. When not providing two arguments, always use + * the second form. + * + * var goodFn = function () {}; + * + * expect(goodFn).to.throw(TypeError, 'x', 'nooo why fail??'); + * expect(goodFn, 'nooo why fail??').to.throw(); + * + * Due to limitations in ES5, `.throw` may not always work as expected when + * using a transpiler such as Babel or TypeScript. In particular, it may + * produce unexpected results when subclassing the built-in `Error` object and + * then passing the subclassed constructor to `.throw`. See your transpiler's + * docs for details: + * + * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes)) + * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work)) + * + * Beware of some common mistakes when using the `throw` assertion. One common + * mistake is to accidentally invoke the function yourself instead of letting + * the `throw` assertion invoke the function for you. For example, when + * testing if a function named `fn` throws, provide `fn` instead of `fn()` as + * the target for the assertion. + * + * expect(fn).to.throw(); // Good! Tests `fn` as desired + * expect(fn()).to.throw(); // Bad! Tests result of `fn()`, not `fn` + * + * If you need to assert that your function `fn` throws when passed certain + * arguments, then wrap a call to `fn` inside of another function. + * + * expect(function () { fn(42); }).to.throw(); // Function expression + * expect(() => fn(42)).to.throw(); // ES6 arrow function + * + * Another common mistake is to provide an object method (or any stand-alone + * function that relies on `this`) as the target of the assertion. Doing so is + * problematic because the `this` context will be lost when the function is + * invoked by `.throw`; there's no way for it to know what `this` is supposed + * to be. There are two ways around this problem. One solution is to wrap the + * method or function call inside of another function. Another solution is to + * use `bind`. + * + * expect(function () { cat.meow(); }).to.throw(); // Function expression + * expect(() => cat.meow()).to.throw(); // ES6 arrow function + * expect(cat.meow.bind(cat)).to.throw(); // Bind + * + * Finally, it's worth mentioning that it's a best practice in JavaScript to + * only throw `Error` and derivatives of `Error` such as `ReferenceError`, + * `TypeError`, and user-defined objects that extend `Error`. No other type of + * value will generate a stack trace when initialized. With that said, the + * `throw` assertion does technically support any type of value being thrown, + * not just `Error` and its derivatives. + * + * The aliases `.throws` and `.Throw` can be used interchangeably with + * `.throw`. + * + * @name throw + * @alias throws + * @alias Throw + * @param {Error|ErrorConstructor} errorLike + * @param {String|RegExp} errMsgMatcher error message + * @param {String} msg _optional_ + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @returns error for chaining (null if no error) + * @namespace BDD + * @api public + */ + + function assertThrows (errorLike, errMsgMatcher, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , ssfi = flag(this, 'ssfi') + , flagMsg = flag(this, 'message') + , negate = flag(this, 'negate') || false; + new Assertion(obj, flagMsg, ssfi, true).is.a('function'); + + if (errorLike instanceof RegExp || typeof errorLike === 'string') { + errMsgMatcher = errorLike; + errorLike = null; + } + + var caughtErr; + try { + obj(); + } catch (err) { + caughtErr = err; + } + + // If we have the negate flag enabled and at least one valid argument it means we do expect an error + // but we want it to match a given set of criteria + var everyArgIsUndefined = errorLike === undefined && errMsgMatcher === undefined; + + // If we've got the negate flag enabled and both args, we should only fail if both aren't compatible + // See Issue #551 and PR #683@GitHub + var everyArgIsDefined = Boolean(errorLike && errMsgMatcher); + var errorLikeFail = false; + var errMsgMatcherFail = false; + + // Checking if error was thrown + if (everyArgIsUndefined || !everyArgIsUndefined && !negate) { + // We need this to display results correctly according to their types + var errorLikeString = 'an error'; + if (errorLike instanceof Error) { + errorLikeString = '#{exp}'; + } else if (errorLike) { + errorLikeString = _.checkError.getConstructorName(errorLike); + } + + this.assert( + caughtErr + , 'expected #{this} to throw ' + errorLikeString + , 'expected #{this} to not throw an error but #{act} was thrown' + , errorLike && errorLike.toString() + , (caughtErr instanceof Error ? + caughtErr.toString() : (typeof caughtErr === 'string' ? caughtErr : caughtErr && + _.checkError.getConstructorName(caughtErr))) + ); + } + + if (errorLike && caughtErr) { + // We should compare instances only if `errorLike` is an instance of `Error` + if (errorLike instanceof Error) { + var isCompatibleInstance = _.checkError.compatibleInstance(caughtErr, errorLike); + + if (isCompatibleInstance === negate) { + // These checks were created to ensure we won't fail too soon when we've got both args and a negate + // See Issue #551 and PR #683@GitHub + if (everyArgIsDefined && negate) { + errorLikeFail = true; + } else { + this.assert( + negate + , 'expected #{this} to throw #{exp} but #{act} was thrown' + , 'expected #{this} to not throw #{exp}' + (caughtErr && !negate ? ' but #{act} was thrown' : '') + , errorLike.toString() + , caughtErr.toString() + ); + } + } + } + + var isCompatibleConstructor = _.checkError.compatibleConstructor(caughtErr, errorLike); + if (isCompatibleConstructor === negate) { + if (everyArgIsDefined && negate) { + errorLikeFail = true; + } else { + this.assert( + negate + , 'expected #{this} to throw #{exp} but #{act} was thrown' + , 'expected #{this} to not throw #{exp}' + (caughtErr ? ' but #{act} was thrown' : '') + , (errorLike instanceof Error ? errorLike.toString() : errorLike && _.checkError.getConstructorName(errorLike)) + , (caughtErr instanceof Error ? caughtErr.toString() : caughtErr && _.checkError.getConstructorName(caughtErr)) + ); + } + } + } + + if (caughtErr && errMsgMatcher !== undefined && errMsgMatcher !== null) { + // Here we check compatible messages + var placeholder = 'including'; + if (errMsgMatcher instanceof RegExp) { + placeholder = 'matching' + } + + var isCompatibleMessage = _.checkError.compatibleMessage(caughtErr, errMsgMatcher); + if (isCompatibleMessage === negate) { + if (everyArgIsDefined && negate) { + errMsgMatcherFail = true; + } else { + this.assert( + negate + , 'expected #{this} to throw error ' + placeholder + ' #{exp} but got #{act}' + , 'expected #{this} to throw error not ' + placeholder + ' #{exp}' + , errMsgMatcher + , _.checkError.getMessage(caughtErr) + ); + } + } + } + + // If both assertions failed and both should've matched we throw an error + if (errorLikeFail && errMsgMatcherFail) { + this.assert( + negate + , 'expected #{this} to throw #{exp} but #{act} was thrown' + , 'expected #{this} to not throw #{exp}' + (caughtErr ? ' but #{act} was thrown' : '') + , (errorLike instanceof Error ? errorLike.toString() : errorLike && _.checkError.getConstructorName(errorLike)) + , (caughtErr instanceof Error ? caughtErr.toString() : caughtErr && _.checkError.getConstructorName(caughtErr)) + ); + } + + flag(this, 'object', caughtErr); + }; + + Assertion.addMethod('throw', assertThrows); + Assertion.addMethod('throws', assertThrows); + Assertion.addMethod('Throw', assertThrows); + + /** + * ### .respondTo(method[, msg]) + * + * When the target is a non-function object, `.respondTo` asserts that the + * target has a method with the given name `method`. The method can be own or + * inherited, and it can be enumerable or non-enumerable. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * + * expect(new Cat()).to.respondTo('meow'); + * + * When the target is a function, `.respondTo` asserts that the target's + * `prototype` property has a method with the given name `method`. Again, the + * method can be own or inherited, and it can be enumerable or non-enumerable. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * + * expect(Cat).to.respondTo('meow'); + * + * Add `.itself` earlier in the chain to force `.respondTo` to treat the + * target as a non-function object, even if it's a function. Thus, it asserts + * that the target has a method with the given name `method`, rather than + * asserting that the target's `prototype` property has a method with the + * given name `method`. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * Cat.hiss = function () {}; + * + * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow'); + * + * When not adding `.itself`, it's important to check the target's type before + * using `.respondTo`. See the `.a` doc for info on checking a target's type. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * + * expect(new Cat()).to.be.an('object').that.respondsTo('meow'); + * + * Add `.not` earlier in the chain to negate `.respondTo`. + * + * function Dog () {} + * Dog.prototype.bark = function () {}; + * + * expect(new Dog()).to.not.respondTo('meow'); + * + * `.respondTo` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect({}).to.respondTo('meow', 'nooo why fail??'); + * expect({}, 'nooo why fail??').to.respondTo('meow'); + * + * The alias `.respondsTo` can be used interchangeably with `.respondTo`. + * + * @name respondTo + * @alias respondsTo + * @param {String} method + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function respondTo (method, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , itself = flag(this, 'itself') + , context = ('function' === typeof obj && !itself) + ? obj.prototype[method] + : obj[method]; + + this.assert( + 'function' === typeof context + , 'expected #{this} to respond to ' + _.inspect(method) + , 'expected #{this} to not respond to ' + _.inspect(method) + ); + } + + Assertion.addMethod('respondTo', respondTo); + Assertion.addMethod('respondsTo', respondTo); + + /** + * ### .itself + * + * Forces all `.respondTo` assertions that follow in the chain to behave as if + * the target is a non-function object, even if it's a function. Thus, it + * causes `.respondTo` to assert that the target has a method with the given + * name, rather than asserting that the target's `prototype` property has a + * method with the given name. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * Cat.hiss = function () {}; + * + * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow'); + * + * @name itself + * @namespace BDD + * @api public + */ + + Assertion.addProperty('itself', function () { + flag(this, 'itself', true); + }); + + /** + * ### .satisfy(matcher[, msg]) + * + * Invokes the given `matcher` function with the target being passed as the + * first argument, and asserts that the value returned is truthy. + * + * expect(1).to.satisfy(function(num) { + * return num > 0; + * }); + * + * Add `.not` earlier in the chain to negate `.satisfy`. + * + * expect(1).to.not.satisfy(function(num) { + * return num > 2; + * }); + * + * `.satisfy` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(1).to.satisfy(function(num) { + * return num > 2; + * }, 'nooo why fail??'); + * + * expect(1, 'nooo why fail??').to.satisfy(function(num) { + * return num > 2; + * }); + * + * The alias `.satisfies` can be used interchangeably with `.satisfy`. + * + * @name satisfy + * @alias satisfies + * @param {Function} matcher + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function satisfy (matcher, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + var result = matcher(obj); + this.assert( + result + , 'expected #{this} to satisfy ' + _.objDisplay(matcher) + , 'expected #{this} to not satisfy' + _.objDisplay(matcher) + , flag(this, 'negate') ? false : true + , result + ); + } + + Assertion.addMethod('satisfy', satisfy); + Assertion.addMethod('satisfies', satisfy); + + /** + * ### .closeTo(expected, delta[, msg]) + * + * Asserts that the target is a number that's within a given +/- `delta` range + * of the given number `expected`. However, it's often best to assert that the + * target is equal to its expected value. + * + * // Recommended + * expect(1.5).to.equal(1.5); + * + * // Not recommended + * expect(1.5).to.be.closeTo(1, 0.5); + * expect(1.5).to.be.closeTo(2, 0.5); + * expect(1.5).to.be.closeTo(1, 1); + * + * Add `.not` earlier in the chain to negate `.closeTo`. + * + * expect(1.5).to.equal(1.5); // Recommended + * expect(1.5).to.not.be.closeTo(3, 1); // Not recommended + * + * `.closeTo` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(1.5).to.be.closeTo(3, 1, 'nooo why fail??'); + * expect(1.5, 'nooo why fail??').to.be.closeTo(3, 1); + * + * The alias `.approximately` can be used interchangeably with `.closeTo`. + * + * @name closeTo + * @alias approximately + * @param {Number} expected + * @param {Number} delta + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function closeTo(expected, delta, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + + new Assertion(obj, flagMsg, ssfi, true).is.a('number'); + if (typeof expected !== 'number' || typeof delta !== 'number') { + flagMsg = flagMsg ? flagMsg + ': ' : ''; + throw new AssertionError( + flagMsg + 'the arguments to closeTo or approximately must be numbers', + undefined, + ssfi + ); + } + + this.assert( + Math.abs(obj - expected) <= delta + , 'expected #{this} to be close to ' + expected + ' +/- ' + delta + , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta + ); + } + + Assertion.addMethod('closeTo', closeTo); + Assertion.addMethod('approximately', closeTo); + + // Note: Duplicates are ignored if testing for inclusion instead of sameness. + function isSubsetOf(subset, superset, cmp, contains, ordered) { + if (!contains) { + if (subset.length !== superset.length) return false; + superset = superset.slice(); + } + + return subset.every(function(elem, idx) { + if (ordered) return cmp ? cmp(elem, superset[idx]) : elem === superset[idx]; + + if (!cmp) { + var matchIdx = superset.indexOf(elem); + if (matchIdx === -1) return false; + + // Remove match from superset so not counted twice if duplicate in subset. + if (!contains) superset.splice(matchIdx, 1); + return true; + } + + return superset.some(function(elem2, matchIdx) { + if (!cmp(elem, elem2)) return false; + + // Remove match from superset so not counted twice if duplicate in subset. + if (!contains) superset.splice(matchIdx, 1); + return true; + }); + }); + } + + /** + * ### .members(set[, msg]) + * + * Asserts that the target array has the same members as the given array + * `set`. + * + * expect([1, 2, 3]).to.have.members([2, 1, 3]); + * expect([1, 2, 2]).to.have.members([2, 1, 2]); + * + * By default, members are compared using strict (`===`) equality. Add `.deep` + * earlier in the chain to use deep equality instead. See the `deep-eql` + * project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target array deeply (but not strictly) has member `{a: 1}` + * expect([{a: 1}]).to.have.deep.members([{a: 1}]); + * expect([{a: 1}]).to.not.have.members([{a: 1}]); + * + * By default, order doesn't matter. Add `.ordered` earlier in the chain to + * require that members appear in the same order. + * + * expect([1, 2, 3]).to.have.ordered.members([1, 2, 3]); + * expect([1, 2, 3]).to.have.members([2, 1, 3]) + * .but.not.ordered.members([2, 1, 3]); + * + * By default, both arrays must be the same size. Add `.include` earlier in + * the chain to require that the target's members be a superset of the + * expected members. Note that duplicates are ignored in the subset when + * `.include` is added. + * + * // Target array is a superset of [1, 2] but not identical + * expect([1, 2, 3]).to.include.members([1, 2]); + * expect([1, 2, 3]).to.not.have.members([1, 2]); + * + * // Duplicates in the subset are ignored + * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]); + * + * `.deep`, `.ordered`, and `.include` can all be combined. However, if + * `.include` and `.ordered` are combined, the ordering begins at the start of + * both arrays. + * + * expect([{a: 1}, {b: 2}, {c: 3}]) + * .to.include.deep.ordered.members([{a: 1}, {b: 2}]) + * .but.not.include.deep.ordered.members([{b: 2}, {c: 3}]); + * + * Add `.not` earlier in the chain to negate `.members`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the target array doesn't have all of the same members as + * the given array `set` but may or may not have some of them. It's often best + * to identify the exact output that's expected, and then write an assertion + * that only accepts that exact output. + * + * expect([1, 2]).to.not.include(3).and.not.include(4); // Recommended + * expect([1, 2]).to.not.have.members([3, 4]); // Not recommended + * + * `.members` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect([1, 2]).to.have.members([1, 2, 3], 'nooo why fail??'); + * expect([1, 2], 'nooo why fail??').to.have.members([1, 2, 3]); + * + * @name members + * @param {Array} set + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + Assertion.addMethod('members', function (subset, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + + new Assertion(obj, flagMsg, ssfi, true).to.be.an('array'); + new Assertion(subset, flagMsg, ssfi, true).to.be.an('array'); + + var contains = flag(this, 'contains'); + var ordered = flag(this, 'ordered'); + + var subject, failMsg, failNegateMsg; + + if (contains) { + subject = ordered ? 'an ordered superset' : 'a superset'; + failMsg = 'expected #{this} to be ' + subject + ' of #{exp}'; + failNegateMsg = 'expected #{this} to not be ' + subject + ' of #{exp}'; + } else { + subject = ordered ? 'ordered members' : 'members'; + failMsg = 'expected #{this} to have the same ' + subject + ' as #{exp}'; + failNegateMsg = 'expected #{this} to not have the same ' + subject + ' as #{exp}'; + } + + var cmp = flag(this, 'deep') ? _.eql : undefined; + + this.assert( + isSubsetOf(subset, obj, cmp, contains, ordered) + , failMsg + , failNegateMsg + , subset + , obj + , true + ); + }); + + /** + * ### .oneOf(list[, msg]) + * + * Asserts that the target is a member of the given array `list`. However, + * it's often best to assert that the target is equal to its expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.oneOf([1, 2, 3]); // Not recommended + * + * Comparisons are performed using strict (`===`) equality. + * + * Add `.not` earlier in the chain to negate `.oneOf`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.oneOf([2, 3, 4]); // Not recommended + * + * `.oneOf` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.be.oneOf([2, 3, 4], 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.oneOf([2, 3, 4]); + * + * @name oneOf + * @param {Array<*>} list + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function oneOf (list, msg) { + if (msg) flag(this, 'message', msg); + var expected = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(list, flagMsg, ssfi, true).to.be.an('array'); + + this.assert( + list.indexOf(expected) > -1 + , 'expected #{this} to be one of #{exp}' + , 'expected #{this} to not be one of #{exp}' + , list + , expected + ); + } + + Assertion.addMethod('oneOf', oneOf); + + /** + * ### .change(subject[, prop[, msg]]) + * + * When one argument is provided, `.change` asserts that the given function + * `subject` returns a different value when it's invoked before the target + * function compared to when it's invoked afterward. However, it's often best + * to assert that `subject` is equal to its expected value. + * + * var dots = '' + * , addDot = function () { dots += '.'; } + * , getDots = function () { return dots; }; + * + * // Recommended + * expect(getDots()).to.equal(''); + * addDot(); + * expect(getDots()).to.equal('.'); + * + * // Not recommended + * expect(addDot).to.change(getDots); + * + * When two arguments are provided, `.change` asserts that the value of the + * given object `subject`'s `prop` property is different before invoking the + * target function compared to afterward. + * + * var myObj = {dots: ''} + * , addDot = function () { myObj.dots += '.'; }; + * + * // Recommended + * expect(myObj).to.have.property('dots', ''); + * addDot(); + * expect(myObj).to.have.property('dots', '.'); + * + * // Not recommended + * expect(addDot).to.change(myObj, 'dots'); + * + * Strict (`===`) equality is used to compare before and after values. + * + * Add `.not` earlier in the chain to negate `.change`. + * + * var dots = '' + * , noop = function () {} + * , getDots = function () { return dots; }; + * + * expect(noop).to.not.change(getDots); + * + * var myObj = {dots: ''} + * , noop = function () {}; + * + * expect(noop).to.not.change(myObj, 'dots'); + * + * `.change` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing two arguments, always + * use the second form. + * + * var myObj = {dots: ''} + * , addDot = function () { myObj.dots += '.'; }; + * + * expect(addDot).to.not.change(myObj, 'dots', 'nooo why fail??'); + * + * var dots = '' + * , addDot = function () { dots += '.'; } + * , getDots = function () { return dots; }; + * + * expect(addDot, 'nooo why fail??').to.not.change(getDots); + * + * `.change` also causes all `.by` assertions that follow in the chain to + * assert how much a numeric subject was increased or decreased by. However, + * it's dangerous to use `.change.by`. The problem is that it creates + * uncertain expectations by asserting that the subject either increases by + * the given delta, or that it decreases by the given delta. It's often best + * to identify the exact output that's expected, and then write an assertion + * that only accepts that exact output. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; } + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * The alias `.changes` can be used interchangeably with `.change`. + * + * @name change + * @alias changes + * @param {String} subject + * @param {String} prop name _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertChanges (subject, prop, msg) { + if (msg) flag(this, 'message', msg); + var fn = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(fn, flagMsg, ssfi, true).is.a('function'); + + var initial; + if (!prop) { + new Assertion(subject, flagMsg, ssfi, true).is.a('function'); + initial = subject(); + } else { + new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop); + initial = subject[prop]; + } + + fn(); + + var final = prop === undefined || prop === null ? subject() : subject[prop]; + var msgObj = prop === undefined || prop === null ? initial : '.' + prop; + + // This gets flagged because of the .by(delta) assertion + flag(this, 'deltaMsgObj', msgObj); + flag(this, 'initialDeltaValue', initial); + flag(this, 'finalDeltaValue', final); + flag(this, 'deltaBehavior', 'change'); + flag(this, 'realDelta', final !== initial); + + this.assert( + initial !== final + , 'expected ' + msgObj + ' to change' + , 'expected ' + msgObj + ' to not change' + ); + } + + Assertion.addMethod('change', assertChanges); + Assertion.addMethod('changes', assertChanges); + + /** + * ### .increase(subject[, prop[, msg]]) + * + * When one argument is provided, `.increase` asserts that the given function + * `subject` returns a greater number when it's invoked after invoking the + * target function compared to when it's invoked beforehand. `.increase` also + * causes all `.by` assertions that follow in the chain to assert how much + * greater of a number is returned. It's often best to assert that the return + * value increased by the expected amount, rather than asserting it increased + * by any amount. + * + * var val = 1 + * , addTwo = function () { val += 2; } + * , getVal = function () { return val; }; + * + * expect(addTwo).to.increase(getVal).by(2); // Recommended + * expect(addTwo).to.increase(getVal); // Not recommended + * + * When two arguments are provided, `.increase` asserts that the value of the + * given object `subject`'s `prop` property is greater after invoking the + * target function compared to beforehand. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.increase(myObj, 'val'); // Not recommended + * + * Add `.not` earlier in the chain to negate `.increase`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the subject either decreases, or that it stays the same. + * It's often best to identify the exact output that's expected, and then + * write an assertion that only accepts that exact output. + * + * When the subject is expected to decrease, it's often best to assert that it + * decreased by the expected amount. + * + * var myObj = {val: 1} + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.not.increase(myObj, 'val'); // Not recommended + * + * When the subject is expected to stay the same, it's often best to assert + * exactly that. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.not.change(myObj, 'val'); // Recommended + * expect(noop).to.not.increase(myObj, 'val'); // Not recommended + * + * `.increase` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing two arguments, always + * use the second form. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.increase(myObj, 'val', 'nooo why fail??'); + * + * var val = 1 + * , noop = function () {} + * , getVal = function () { return val; }; + * + * expect(noop, 'nooo why fail??').to.increase(getVal); + * + * The alias `.increases` can be used interchangeably with `.increase`. + * + * @name increase + * @alias increases + * @param {String|Function} subject + * @param {String} prop name _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertIncreases (subject, prop, msg) { + if (msg) flag(this, 'message', msg); + var fn = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(fn, flagMsg, ssfi, true).is.a('function'); + + var initial; + if (!prop) { + new Assertion(subject, flagMsg, ssfi, true).is.a('function'); + initial = subject(); + } else { + new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop); + initial = subject[prop]; + } + + // Make sure that the target is a number + new Assertion(initial, flagMsg, ssfi, true).is.a('number'); + + fn(); + + var final = prop === undefined || prop === null ? subject() : subject[prop]; + var msgObj = prop === undefined || prop === null ? initial : '.' + prop; + + flag(this, 'deltaMsgObj', msgObj); + flag(this, 'initialDeltaValue', initial); + flag(this, 'finalDeltaValue', final); + flag(this, 'deltaBehavior', 'increase'); + flag(this, 'realDelta', final - initial); + + this.assert( + final - initial > 0 + , 'expected ' + msgObj + ' to increase' + , 'expected ' + msgObj + ' to not increase' + ); + } + + Assertion.addMethod('increase', assertIncreases); + Assertion.addMethod('increases', assertIncreases); + + /** + * ### .decrease(subject[, prop[, msg]]) + * + * When one argument is provided, `.decrease` asserts that the given function + * `subject` returns a lesser number when it's invoked after invoking the + * target function compared to when it's invoked beforehand. `.decrease` also + * causes all `.by` assertions that follow in the chain to assert how much + * lesser of a number is returned. It's often best to assert that the return + * value decreased by the expected amount, rather than asserting it decreased + * by any amount. + * + * var val = 1 + * , subtractTwo = function () { val -= 2; } + * , getVal = function () { return val; }; + * + * expect(subtractTwo).to.decrease(getVal).by(2); // Recommended + * expect(subtractTwo).to.decrease(getVal); // Not recommended + * + * When two arguments are provided, `.decrease` asserts that the value of the + * given object `subject`'s `prop` property is lesser after invoking the + * target function compared to beforehand. + * + * var myObj = {val: 1} + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.decrease(myObj, 'val'); // Not recommended + * + * Add `.not` earlier in the chain to negate `.decrease`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the subject either increases, or that it stays the same. + * It's often best to identify the exact output that's expected, and then + * write an assertion that only accepts that exact output. + * + * When the subject is expected to increase, it's often best to assert that it + * increased by the expected amount. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.not.decrease(myObj, 'val'); // Not recommended + * + * When the subject is expected to stay the same, it's often best to assert + * exactly that. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.not.change(myObj, 'val'); // Recommended + * expect(noop).to.not.decrease(myObj, 'val'); // Not recommended + * + * `.decrease` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing two arguments, always + * use the second form. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.decrease(myObj, 'val', 'nooo why fail??'); + * + * var val = 1 + * , noop = function () {} + * , getVal = function () { return val; }; + * + * expect(noop, 'nooo why fail??').to.decrease(getVal); + * + * The alias `.decreases` can be used interchangeably with `.decrease`. + * + * @name decrease + * @alias decreases + * @param {String|Function} subject + * @param {String} prop name _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertDecreases (subject, prop, msg) { + if (msg) flag(this, 'message', msg); + var fn = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(fn, flagMsg, ssfi, true).is.a('function'); + + var initial; + if (!prop) { + new Assertion(subject, flagMsg, ssfi, true).is.a('function'); + initial = subject(); + } else { + new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop); + initial = subject[prop]; + } + + // Make sure that the target is a number + new Assertion(initial, flagMsg, ssfi, true).is.a('number'); + + fn(); + + var final = prop === undefined || prop === null ? subject() : subject[prop]; + var msgObj = prop === undefined || prop === null ? initial : '.' + prop; + + flag(this, 'deltaMsgObj', msgObj); + flag(this, 'initialDeltaValue', initial); + flag(this, 'finalDeltaValue', final); + flag(this, 'deltaBehavior', 'decrease'); + flag(this, 'realDelta', initial - final); + + this.assert( + final - initial < 0 + , 'expected ' + msgObj + ' to decrease' + , 'expected ' + msgObj + ' to not decrease' + ); + } + + Assertion.addMethod('decrease', assertDecreases); + Assertion.addMethod('decreases', assertDecreases); + + /** + * ### .by(delta[, msg]) + * + * When following an `.increase` assertion in the chain, `.by` asserts that + * the subject of the `.increase` assertion increased by the given `delta`. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); + * + * When following a `.decrease` assertion in the chain, `.by` asserts that the + * subject of the `.decrease` assertion decreased by the given `delta`. + * + * var myObj = {val: 1} + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); + * + * When following a `.change` assertion in the chain, `.by` asserts that the + * subject of the `.change` assertion either increased or decreased by the + * given `delta`. However, it's dangerous to use `.change.by`. The problem is + * that it creates uncertain expectations. It's often best to identify the + * exact output that's expected, and then write an assertion that only accepts + * that exact output. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; } + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * Add `.not` earlier in the chain to negate `.by`. However, it's often best + * to assert that the subject changed by its expected delta, rather than + * asserting that it didn't change by one of countless unexpected deltas. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * // Recommended + * expect(addTwo).to.increase(myObj, 'val').by(2); + * + * // Not recommended + * expect(addTwo).to.increase(myObj, 'val').but.not.by(3); + * + * `.by` accepts an optional `msg` argument which is a custom error message to + * show when the assertion fails. The message can also be given as the second + * argument to `expect`. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(3, 'nooo why fail??'); + * expect(addTwo, 'nooo why fail??').to.increase(myObj, 'val').by(3); + * + * @name by + * @param {Number} delta + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertDelta(delta, msg) { + if (msg) flag(this, 'message', msg); + + var msgObj = flag(this, 'deltaMsgObj'); + var initial = flag(this, 'initialDeltaValue'); + var final = flag(this, 'finalDeltaValue'); + var behavior = flag(this, 'deltaBehavior'); + var realDelta = flag(this, 'realDelta'); + + var expression; + if (behavior === 'change') { + expression = Math.abs(final - initial) === Math.abs(delta); + } else { + expression = realDelta === Math.abs(delta); + } + + this.assert( + expression + , 'expected ' + msgObj + ' to ' + behavior + ' by ' + delta + , 'expected ' + msgObj + ' to not ' + behavior + ' by ' + delta + ); + } + + Assertion.addMethod('by', assertDelta); + + /** + * ### .extensible + * + * Asserts that the target is extensible, which means that new properties can + * be added to it. Primitives are never extensible. + * + * expect({a: 1}).to.be.extensible; + * + * Add `.not` earlier in the chain to negate `.extensible`. + * + * var nonExtensibleObject = Object.preventExtensions({}) + * , sealedObject = Object.seal({}) + * , frozenObject = Object.freeze({}); + * + * expect(nonExtensibleObject).to.not.be.extensible; + * expect(sealedObject).to.not.be.extensible; + * expect(frozenObject).to.not.be.extensible; + * expect(1).to.not.be.extensible; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(1, 'nooo why fail??').to.be.extensible; + * + * @name extensible + * @namespace BDD + * @api public + */ + + Assertion.addProperty('extensible', function() { + var obj = flag(this, 'object'); + + // In ES5, if the argument to this method is a primitive, then it will cause a TypeError. + // In ES6, a non-object argument will be treated as if it was a non-extensible ordinary object, simply return false. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible + // The following provides ES6 behavior for ES5 environments. + + var isExtensible = obj === Object(obj) && Object.isExtensible(obj); + + this.assert( + isExtensible + , 'expected #{this} to be extensible' + , 'expected #{this} to not be extensible' + ); + }); + + /** + * ### .sealed + * + * Asserts that the target is sealed, which means that new properties can't be + * added to it, and its existing properties can't be reconfigured or deleted. + * However, it's possible that its existing properties can still be reassigned + * to different values. Primitives are always sealed. + * + * var sealedObject = Object.seal({}); + * var frozenObject = Object.freeze({}); + * + * expect(sealedObject).to.be.sealed; + * expect(frozenObject).to.be.sealed; + * expect(1).to.be.sealed; + * + * Add `.not` earlier in the chain to negate `.sealed`. + * + * expect({a: 1}).to.not.be.sealed; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({a: 1}, 'nooo why fail??').to.be.sealed; + * + * @name sealed + * @namespace BDD + * @api public + */ + + Assertion.addProperty('sealed', function() { + var obj = flag(this, 'object'); + + // In ES5, if the argument to this method is a primitive, then it will cause a TypeError. + // In ES6, a non-object argument will be treated as if it was a sealed ordinary object, simply return true. + // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed + // The following provides ES6 behavior for ES5 environments. + + var isSealed = obj === Object(obj) ? Object.isSealed(obj) : true; + + this.assert( + isSealed + , 'expected #{this} to be sealed' + , 'expected #{this} to not be sealed' + ); + }); + + /** + * ### .frozen + * + * Asserts that the target is frozen, which means that new properties can't be + * added to it, and its existing properties can't be reassigned to different + * values, reconfigured, or deleted. Primitives are always frozen. + * + * var frozenObject = Object.freeze({}); + * + * expect(frozenObject).to.be.frozen; + * expect(1).to.be.frozen; + * + * Add `.not` earlier in the chain to negate `.frozen`. + * + * expect({a: 1}).to.not.be.frozen; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({a: 1}, 'nooo why fail??').to.be.frozen; + * + * @name frozen + * @namespace BDD + * @api public + */ + + Assertion.addProperty('frozen', function() { + var obj = flag(this, 'object'); + + // In ES5, if the argument to this method is a primitive, then it will cause a TypeError. + // In ES6, a non-object argument will be treated as if it was a frozen ordinary object, simply return true. + // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen + // The following provides ES6 behavior for ES5 environments. + + var isFrozen = obj === Object(obj) ? Object.isFrozen(obj) : true; + + this.assert( + isFrozen + , 'expected #{this} to be frozen' + , 'expected #{this} to not be frozen' + ); + }); + + /** + * ### .finite + * + * Asserts that the target is a number, and isn't `NaN` or positive/negative + * `Infinity`. + * + * expect(1).to.be.finite; + * + * Add `.not` earlier in the chain to negate `.finite`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the subject either isn't a number, or that it's `NaN`, or + * that it's positive `Infinity`, or that it's negative `Infinity`. It's often + * best to identify the exact output that's expected, and then write an + * assertion that only accepts that exact output. + * + * When the target isn't expected to be a number, it's often best to assert + * that it's the expected type, rather than asserting that it isn't one of + * many unexpected types. + * + * expect('foo').to.be.a('string'); // Recommended + * expect('foo').to.not.be.finite; // Not recommended + * + * When the target is expected to be `NaN`, it's often best to assert exactly + * that. + * + * expect(NaN).to.be.NaN; // Recommended + * expect(NaN).to.not.be.finite; // Not recommended + * + * When the target is expected to be positive infinity, it's often best to + * assert exactly that. + * + * expect(Infinity).to.equal(Infinity); // Recommended + * expect(Infinity).to.not.be.finite; // Not recommended + * + * When the target is expected to be negative infinity, it's often best to + * assert exactly that. + * + * expect(-Infinity).to.equal(-Infinity); // Recommended + * expect(-Infinity).to.not.be.finite; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect('foo', 'nooo why fail??').to.be.finite; + * + * @name finite + * @namespace BDD + * @api public + */ + + Assertion.addProperty('finite', function(msg) { + var obj = flag(this, 'object'); + + this.assert( + typeof obj === 'number' && isFinite(obj) + , 'expected #{this} to be a finite number' + , 'expected #{this} to not be a finite number' + ); + }); +}; + + +/***/ }), + +/***/ 39542: +/***/ ((module) => { + +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, util) { + /*! + * Chai dependencies. + */ + + var Assertion = chai.Assertion + , flag = util.flag; + + /*! + * Module export. + */ + + /** + * ### assert(expression, message) + * + * Write your own test expressions. + * + * assert('foo' !== 'bar', 'foo is not bar'); + * assert(Array.isArray([]), 'empty arrays are arrays'); + * + * @param {Mixed} expression to test for truthiness + * @param {String} message to display on error + * @name assert + * @namespace Assert + * @api public + */ + + var assert = chai.assert = function (express, errmsg) { + var test = new Assertion(null, null, chai.assert, true); + test.assert( + express + , errmsg + , '[ negation message unavailable ]' + ); + }; + + /** + * ### .fail([message]) + * ### .fail(actual, expected, [message], [operator]) + * + * Throw a failure. Node.js `assert` module-compatible. + * + * assert.fail(); + * assert.fail("custom error message"); + * assert.fail(1, 2); + * assert.fail(1, 2, "custom error message"); + * assert.fail(1, 2, "custom error message", ">"); + * assert.fail(1, 2, undefined, ">"); + * + * @name fail + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @param {String} operator + * @namespace Assert + * @api public + */ + + assert.fail = function (actual, expected, message, operator) { + if (arguments.length < 2) { + // Comply with Node's fail([message]) interface + + message = actual; + actual = undefined; + } + + message = message || 'assert.fail()'; + throw new chai.AssertionError(message, { + actual: actual + , expected: expected + , operator: operator + }, assert.fail); + }; + + /** + * ### .isOk(object, [message]) + * + * Asserts that `object` is truthy. + * + * assert.isOk('everything', 'everything is ok'); + * assert.isOk(false, 'this will fail'); + * + * @name isOk + * @alias ok + * @param {Mixed} object to test + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isOk = function (val, msg) { + new Assertion(val, msg, assert.isOk, true).is.ok; + }; + + /** + * ### .isNotOk(object, [message]) + * + * Asserts that `object` is falsy. + * + * assert.isNotOk('everything', 'this will fail'); + * assert.isNotOk(false, 'this will pass'); + * + * @name isNotOk + * @alias notOk + * @param {Mixed} object to test + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotOk = function (val, msg) { + new Assertion(val, msg, assert.isNotOk, true).is.not.ok; + }; + + /** + * ### .equal(actual, expected, [message]) + * + * Asserts non-strict equality (`==`) of `actual` and `expected`. + * + * assert.equal(3, '3', '== coerces values to strings'); + * + * @name equal + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.equal = function (act, exp, msg) { + var test = new Assertion(act, msg, assert.equal, true); + + test.assert( + exp == flag(test, 'object') + , 'expected #{this} to equal #{exp}' + , 'expected #{this} to not equal #{act}' + , exp + , act + , true + ); + }; + + /** + * ### .notEqual(actual, expected, [message]) + * + * Asserts non-strict inequality (`!=`) of `actual` and `expected`. + * + * assert.notEqual(3, 4, 'these numbers are not equal'); + * + * @name notEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notEqual = function (act, exp, msg) { + var test = new Assertion(act, msg, assert.notEqual, true); + + test.assert( + exp != flag(test, 'object') + , 'expected #{this} to not equal #{exp}' + , 'expected #{this} to equal #{act}' + , exp + , act + , true + ); + }; + + /** + * ### .strictEqual(actual, expected, [message]) + * + * Asserts strict equality (`===`) of `actual` and `expected`. + * + * assert.strictEqual(true, true, 'these booleans are strictly equal'); + * + * @name strictEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.strictEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.strictEqual, true).to.equal(exp); + }; + + /** + * ### .notStrictEqual(actual, expected, [message]) + * + * Asserts strict inequality (`!==`) of `actual` and `expected`. + * + * assert.notStrictEqual(3, '3', 'no coercion for strict equality'); + * + * @name notStrictEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notStrictEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.notStrictEqual, true).to.not.equal(exp); + }; + + /** + * ### .deepEqual(actual, expected, [message]) + * + * Asserts that `actual` is deeply equal to `expected`. + * + * assert.deepEqual({ tea: 'green' }, { tea: 'green' }); + * + * @name deepEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @alias deepStrictEqual + * @namespace Assert + * @api public + */ + + assert.deepEqual = assert.deepStrictEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.deepEqual, true).to.eql(exp); + }; + + /** + * ### .notDeepEqual(actual, expected, [message]) + * + * Assert that `actual` is not deeply equal to `expected`. + * + * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' }); + * + * @name notDeepEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.notDeepEqual, true).to.not.eql(exp); + }; + + /** + * ### .isAbove(valueToCheck, valueToBeAbove, [message]) + * + * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove`. + * + * assert.isAbove(5, 2, '5 is strictly greater than 2'); + * + * @name isAbove + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeAbove + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isAbove = function (val, abv, msg) { + new Assertion(val, msg, assert.isAbove, true).to.be.above(abv); + }; + + /** + * ### .isAtLeast(valueToCheck, valueToBeAtLeast, [message]) + * + * Asserts `valueToCheck` is greater than or equal to (>=) `valueToBeAtLeast`. + * + * assert.isAtLeast(5, 2, '5 is greater or equal to 2'); + * assert.isAtLeast(3, 3, '3 is greater or equal to 3'); + * + * @name isAtLeast + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeAtLeast + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isAtLeast = function (val, atlst, msg) { + new Assertion(val, msg, assert.isAtLeast, true).to.be.least(atlst); + }; + + /** + * ### .isBelow(valueToCheck, valueToBeBelow, [message]) + * + * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow`. + * + * assert.isBelow(3, 6, '3 is strictly less than 6'); + * + * @name isBelow + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeBelow + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isBelow = function (val, blw, msg) { + new Assertion(val, msg, assert.isBelow, true).to.be.below(blw); + }; + + /** + * ### .isAtMost(valueToCheck, valueToBeAtMost, [message]) + * + * Asserts `valueToCheck` is less than or equal to (<=) `valueToBeAtMost`. + * + * assert.isAtMost(3, 6, '3 is less than or equal to 6'); + * assert.isAtMost(4, 4, '4 is less than or equal to 4'); + * + * @name isAtMost + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeAtMost + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isAtMost = function (val, atmst, msg) { + new Assertion(val, msg, assert.isAtMost, true).to.be.most(atmst); + }; + + /** + * ### .isTrue(value, [message]) + * + * Asserts that `value` is true. + * + * var teaServed = true; + * assert.isTrue(teaServed, 'the tea has been served'); + * + * @name isTrue + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isTrue = function (val, msg) { + new Assertion(val, msg, assert.isTrue, true).is['true']; + }; + + /** + * ### .isNotTrue(value, [message]) + * + * Asserts that `value` is not true. + * + * var tea = 'tasty chai'; + * assert.isNotTrue(tea, 'great, time for tea!'); + * + * @name isNotTrue + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotTrue = function (val, msg) { + new Assertion(val, msg, assert.isNotTrue, true).to.not.equal(true); + }; + + /** + * ### .isFalse(value, [message]) + * + * Asserts that `value` is false. + * + * var teaServed = false; + * assert.isFalse(teaServed, 'no tea yet? hmm...'); + * + * @name isFalse + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isFalse = function (val, msg) { + new Assertion(val, msg, assert.isFalse, true).is['false']; + }; + + /** + * ### .isNotFalse(value, [message]) + * + * Asserts that `value` is not false. + * + * var tea = 'tasty chai'; + * assert.isNotFalse(tea, 'great, time for tea!'); + * + * @name isNotFalse + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotFalse = function (val, msg) { + new Assertion(val, msg, assert.isNotFalse, true).to.not.equal(false); + }; + + /** + * ### .isNull(value, [message]) + * + * Asserts that `value` is null. + * + * assert.isNull(err, 'there was no error'); + * + * @name isNull + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNull = function (val, msg) { + new Assertion(val, msg, assert.isNull, true).to.equal(null); + }; + + /** + * ### .isNotNull(value, [message]) + * + * Asserts that `value` is not null. + * + * var tea = 'tasty chai'; + * assert.isNotNull(tea, 'great, time for tea!'); + * + * @name isNotNull + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotNull = function (val, msg) { + new Assertion(val, msg, assert.isNotNull, true).to.not.equal(null); + }; + + /** + * ### .isNaN + * + * Asserts that value is NaN. + * + * assert.isNaN(NaN, 'NaN is NaN'); + * + * @name isNaN + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNaN = function (val, msg) { + new Assertion(val, msg, assert.isNaN, true).to.be.NaN; + }; + + /** + * ### .isNotNaN + * + * Asserts that value is not NaN. + * + * assert.isNotNaN(4, '4 is not NaN'); + * + * @name isNotNaN + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + assert.isNotNaN = function (val, msg) { + new Assertion(val, msg, assert.isNotNaN, true).not.to.be.NaN; + }; + + /** + * ### .exists + * + * Asserts that the target is neither `null` nor `undefined`. + * + * var foo = 'hi'; + * + * assert.exists(foo, 'foo is neither `null` nor `undefined`'); + * + * @name exists + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.exists = function (val, msg) { + new Assertion(val, msg, assert.exists, true).to.exist; + }; + + /** + * ### .notExists + * + * Asserts that the target is either `null` or `undefined`. + * + * var bar = null + * , baz; + * + * assert.notExists(bar); + * assert.notExists(baz, 'baz is either null or undefined'); + * + * @name notExists + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notExists = function (val, msg) { + new Assertion(val, msg, assert.notExists, true).to.not.exist; + }; + + /** + * ### .isUndefined(value, [message]) + * + * Asserts that `value` is `undefined`. + * + * var tea; + * assert.isUndefined(tea, 'no tea defined'); + * + * @name isUndefined + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isUndefined = function (val, msg) { + new Assertion(val, msg, assert.isUndefined, true).to.equal(undefined); + }; + + /** + * ### .isDefined(value, [message]) + * + * Asserts that `value` is not `undefined`. + * + * var tea = 'cup of chai'; + * assert.isDefined(tea, 'tea has been defined'); + * + * @name isDefined + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isDefined = function (val, msg) { + new Assertion(val, msg, assert.isDefined, true).to.not.equal(undefined); + }; + + /** + * ### .isFunction(value, [message]) + * + * Asserts that `value` is a function. + * + * function serveTea() { return 'cup of tea'; }; + * assert.isFunction(serveTea, 'great, we can have tea now'); + * + * @name isFunction + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isFunction = function (val, msg) { + new Assertion(val, msg, assert.isFunction, true).to.be.a('function'); + }; + + /** + * ### .isNotFunction(value, [message]) + * + * Asserts that `value` is _not_ a function. + * + * var serveTea = [ 'heat', 'pour', 'sip' ]; + * assert.isNotFunction(serveTea, 'great, we have listed the steps'); + * + * @name isNotFunction + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotFunction = function (val, msg) { + new Assertion(val, msg, assert.isNotFunction, true).to.not.be.a('function'); + }; + + /** + * ### .isObject(value, [message]) + * + * Asserts that `value` is an object of type 'Object' (as revealed by `Object.prototype.toString`). + * _The assertion does not match subclassed objects._ + * + * var selection = { name: 'Chai', serve: 'with spices' }; + * assert.isObject(selection, 'tea selection is an object'); + * + * @name isObject + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isObject = function (val, msg) { + new Assertion(val, msg, assert.isObject, true).to.be.a('object'); + }; + + /** + * ### .isNotObject(value, [message]) + * + * Asserts that `value` is _not_ an object of type 'Object' (as revealed by `Object.prototype.toString`). + * + * var selection = 'chai' + * assert.isNotObject(selection, 'tea selection is not an object'); + * assert.isNotObject(null, 'null is not an object'); + * + * @name isNotObject + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotObject = function (val, msg) { + new Assertion(val, msg, assert.isNotObject, true).to.not.be.a('object'); + }; + + /** + * ### .isArray(value, [message]) + * + * Asserts that `value` is an array. + * + * var menu = [ 'green', 'chai', 'oolong' ]; + * assert.isArray(menu, 'what kind of tea do we want?'); + * + * @name isArray + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isArray = function (val, msg) { + new Assertion(val, msg, assert.isArray, true).to.be.an('array'); + }; + + /** + * ### .isNotArray(value, [message]) + * + * Asserts that `value` is _not_ an array. + * + * var menu = 'green|chai|oolong'; + * assert.isNotArray(menu, 'what kind of tea do we want?'); + * + * @name isNotArray + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotArray = function (val, msg) { + new Assertion(val, msg, assert.isNotArray, true).to.not.be.an('array'); + }; + + /** + * ### .isString(value, [message]) + * + * Asserts that `value` is a string. + * + * var teaOrder = 'chai'; + * assert.isString(teaOrder, 'order placed'); + * + * @name isString + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isString = function (val, msg) { + new Assertion(val, msg, assert.isString, true).to.be.a('string'); + }; + + /** + * ### .isNotString(value, [message]) + * + * Asserts that `value` is _not_ a string. + * + * var teaOrder = 4; + * assert.isNotString(teaOrder, 'order placed'); + * + * @name isNotString + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotString = function (val, msg) { + new Assertion(val, msg, assert.isNotString, true).to.not.be.a('string'); + }; + + /** + * ### .isNumber(value, [message]) + * + * Asserts that `value` is a number. + * + * var cups = 2; + * assert.isNumber(cups, 'how many cups'); + * + * @name isNumber + * @param {Number} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNumber = function (val, msg) { + new Assertion(val, msg, assert.isNumber, true).to.be.a('number'); + }; + + /** + * ### .isNotNumber(value, [message]) + * + * Asserts that `value` is _not_ a number. + * + * var cups = '2 cups please'; + * assert.isNotNumber(cups, 'how many cups'); + * + * @name isNotNumber + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotNumber = function (val, msg) { + new Assertion(val, msg, assert.isNotNumber, true).to.not.be.a('number'); + }; + + /** + * ### .isFinite(value, [message]) + * + * Asserts that `value` is a finite number. Unlike `.isNumber`, this will fail for `NaN` and `Infinity`. + * + * var cups = 2; + * assert.isFinite(cups, 'how many cups'); + * + * assert.isFinite(NaN); // throws + * + * @name isFinite + * @param {Number} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isFinite = function (val, msg) { + new Assertion(val, msg, assert.isFinite, true).to.be.finite; + }; + + /** + * ### .isBoolean(value, [message]) + * + * Asserts that `value` is a boolean. + * + * var teaReady = true + * , teaServed = false; + * + * assert.isBoolean(teaReady, 'is the tea ready'); + * assert.isBoolean(teaServed, 'has tea been served'); + * + * @name isBoolean + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isBoolean = function (val, msg) { + new Assertion(val, msg, assert.isBoolean, true).to.be.a('boolean'); + }; + + /** + * ### .isNotBoolean(value, [message]) + * + * Asserts that `value` is _not_ a boolean. + * + * var teaReady = 'yep' + * , teaServed = 'nope'; + * + * assert.isNotBoolean(teaReady, 'is the tea ready'); + * assert.isNotBoolean(teaServed, 'has tea been served'); + * + * @name isNotBoolean + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotBoolean = function (val, msg) { + new Assertion(val, msg, assert.isNotBoolean, true).to.not.be.a('boolean'); + }; + + /** + * ### .typeOf(value, name, [message]) + * + * Asserts that `value`'s type is `name`, as determined by + * `Object.prototype.toString`. + * + * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object'); + * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array'); + * assert.typeOf('tea', 'string', 'we have a string'); + * assert.typeOf(/tea/, 'regexp', 'we have a regular expression'); + * assert.typeOf(null, 'null', 'we have a null'); + * assert.typeOf(undefined, 'undefined', 'we have an undefined'); + * + * @name typeOf + * @param {Mixed} value + * @param {String} name + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.typeOf = function (val, type, msg) { + new Assertion(val, msg, assert.typeOf, true).to.be.a(type); + }; + + /** + * ### .notTypeOf(value, name, [message]) + * + * Asserts that `value`'s type is _not_ `name`, as determined by + * `Object.prototype.toString`. + * + * assert.notTypeOf('tea', 'number', 'strings are not numbers'); + * + * @name notTypeOf + * @param {Mixed} value + * @param {String} typeof name + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notTypeOf = function (val, type, msg) { + new Assertion(val, msg, assert.notTypeOf, true).to.not.be.a(type); + }; + + /** + * ### .instanceOf(object, constructor, [message]) + * + * Asserts that `value` is an instance of `constructor`. + * + * var Tea = function (name) { this.name = name; } + * , chai = new Tea('chai'); + * + * assert.instanceOf(chai, Tea, 'chai is an instance of tea'); + * + * @name instanceOf + * @param {Object} object + * @param {Constructor} constructor + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.instanceOf = function (val, type, msg) { + new Assertion(val, msg, assert.instanceOf, true).to.be.instanceOf(type); + }; + + /** + * ### .notInstanceOf(object, constructor, [message]) + * + * Asserts `value` is not an instance of `constructor`. + * + * var Tea = function (name) { this.name = name; } + * , chai = new String('chai'); + * + * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea'); + * + * @name notInstanceOf + * @param {Object} object + * @param {Constructor} constructor + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notInstanceOf = function (val, type, msg) { + new Assertion(val, msg, assert.notInstanceOf, true) + .to.not.be.instanceOf(type); + }; + + /** + * ### .include(haystack, needle, [message]) + * + * Asserts that `haystack` includes `needle`. Can be used to assert the + * inclusion of a value in an array, a substring in a string, or a subset of + * properties in an object. + * + * assert.include([1,2,3], 2, 'array contains value'); + * assert.include('foobar', 'foo', 'string contains substring'); + * assert.include({ foo: 'bar', hello: 'universe' }, { foo: 'bar' }, 'object contains property'); + * + * Strict equality (===) is used. When asserting the inclusion of a value in + * an array, the array is searched for an element that's strictly equal to the + * given value. When asserting a subset of properties in an object, the object + * is searched for the given property keys, checking that each one is present + * and strictly equal to the given property value. For instance: + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.include([obj1, obj2], obj1); + * assert.include({foo: obj1, bar: obj2}, {foo: obj1}); + * assert.include({foo: obj1, bar: obj2}, {foo: obj1, bar: obj2}); + * + * @name include + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.include = function (exp, inc, msg) { + new Assertion(exp, msg, assert.include, true).include(inc); + }; + + /** + * ### .notInclude(haystack, needle, [message]) + * + * Asserts that `haystack` does not include `needle`. Can be used to assert + * the absence of a value in an array, a substring in a string, or a subset of + * properties in an object. + * + * assert.notInclude([1,2,3], 4, "array doesn't contain value"); + * assert.notInclude('foobar', 'baz', "string doesn't contain substring"); + * assert.notInclude({ foo: 'bar', hello: 'universe' }, { foo: 'baz' }, 'object doesn't contain property'); + * + * Strict equality (===) is used. When asserting the absence of a value in an + * array, the array is searched to confirm the absence of an element that's + * strictly equal to the given value. When asserting a subset of properties in + * an object, the object is searched to confirm that at least one of the given + * property keys is either not present or not strictly equal to the given + * property value. For instance: + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.notInclude([obj1, obj2], {a: 1}); + * assert.notInclude({foo: obj1, bar: obj2}, {foo: {a: 1}}); + * assert.notInclude({foo: obj1, bar: obj2}, {foo: obj1, bar: {b: 2}}); + * + * @name notInclude + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.notInclude, true).not.include(inc); + }; + + /** + * ### .deepInclude(haystack, needle, [message]) + * + * Asserts that `haystack` includes `needle`. Can be used to assert the + * inclusion of a value in an array or a subset of properties in an object. + * Deep equality is used. + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.deepInclude([obj1, obj2], {a: 1}); + * assert.deepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}}); + * assert.deepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 2}}); + * + * @name deepInclude + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.deepInclude, true).deep.include(inc); + }; + + /** + * ### .notDeepInclude(haystack, needle, [message]) + * + * Asserts that `haystack` does not include `needle`. Can be used to assert + * the absence of a value in an array or a subset of properties in an object. + * Deep equality is used. + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.notDeepInclude([obj1, obj2], {a: 9}); + * assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 9}}); + * assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 9}}); + * + * @name notDeepInclude + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.notDeepInclude, true).not.deep.include(inc); + }; + + /** + * ### .nestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.nestedInclude({'.a': {'b': 'x'}}, {'\\.a.[b]': 'x'}); + * assert.nestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'x'}); + * + * @name nestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.nestedInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.nestedInclude, true).nested.include(inc); + }; + + /** + * ### .notNestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' does not include 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.notNestedInclude({'.a': {'b': 'x'}}, {'\\.a.b': 'y'}); + * assert.notNestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'y'}); + * + * @name notNestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notNestedInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.notNestedInclude, true) + .not.nested.include(inc); + }; + + /** + * ### .deepNestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object while checking for deep equality. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.deepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}}); + * assert.deepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {x: 1}}); + * + * @name deepNestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepNestedInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.deepNestedInclude, true) + .deep.nested.include(inc); + }; + + /** + * ### .notDeepNestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' does not include 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object while checking for deep equality. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.notDeepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {y: 1}}) + * assert.notDeepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {y: 2}}); + * + * @name notDeepNestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepNestedInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.notDeepNestedInclude, true) + .not.deep.nested.include(inc); + }; + + /** + * ### .ownInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object while ignoring inherited properties. + * + * assert.ownInclude({ a: 1 }, { a: 1 }); + * + * @name ownInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.ownInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.ownInclude, true).own.include(inc); + }; + + /** + * ### .notOwnInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object while ignoring inherited properties. + * + * Object.prototype.b = 2; + * + * assert.notOwnInclude({ a: 1 }, { b: 2 }); + * + * @name notOwnInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notOwnInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.notOwnInclude, true).not.own.include(inc); + }; + + /** + * ### .deepOwnInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object while ignoring inherited properties and checking for deep equality. + * + * assert.deepOwnInclude({a: {b: 2}}, {a: {b: 2}}); + * + * @name deepOwnInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepOwnInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.deepOwnInclude, true) + .deep.own.include(inc); + }; + + /** + * ### .notDeepOwnInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object while ignoring inherited properties and checking for deep equality. + * + * assert.notDeepOwnInclude({a: {b: 2}}, {a: {c: 3}}); + * + * @name notDeepOwnInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepOwnInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.notDeepOwnInclude, true) + .not.deep.own.include(inc); + }; + + /** + * ### .match(value, regexp, [message]) + * + * Asserts that `value` matches the regular expression `regexp`. + * + * assert.match('foobar', /^foo/, 'regexp matches'); + * + * @name match + * @param {Mixed} value + * @param {RegExp} regexp + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.match = function (exp, re, msg) { + new Assertion(exp, msg, assert.match, true).to.match(re); + }; + + /** + * ### .notMatch(value, regexp, [message]) + * + * Asserts that `value` does not match the regular expression `regexp`. + * + * assert.notMatch('foobar', /^foo/, 'regexp does not match'); + * + * @name notMatch + * @param {Mixed} value + * @param {RegExp} regexp + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notMatch = function (exp, re, msg) { + new Assertion(exp, msg, assert.notMatch, true).to.not.match(re); + }; + + /** + * ### .property(object, property, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property`. + * + * assert.property({ tea: { green: 'matcha' }}, 'tea'); + * assert.property({ tea: { green: 'matcha' }}, 'toString'); + * + * @name property + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.property = function (obj, prop, msg) { + new Assertion(obj, msg, assert.property, true).to.have.property(prop); + }; + + /** + * ### .notProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a direct or inherited property named + * by `property`. + * + * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee'); + * + * @name notProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.notProperty, true) + .to.not.have.property(prop); + }; + + /** + * ### .propertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property` with a value given by `value`. Uses a strict equality check + * (===). + * + * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good'); + * + * @name propertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.propertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.propertyVal, true) + .to.have.property(prop, val); + }; + + /** + * ### .notPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct or inherited property named + * by `property` with value given by `value`. Uses a strict equality check + * (===). + * + * assert.notPropertyVal({ tea: 'is good' }, 'tea', 'is bad'); + * assert.notPropertyVal({ tea: 'is good' }, 'coffee', 'is good'); + * + * @name notPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notPropertyVal, true) + .to.not.have.property(prop, val); + }; + + /** + * ### .deepPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property` with a value given by `value`. Uses a deep equality check. + * + * assert.deepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' }); + * + * @name deepPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.deepPropertyVal, true) + .to.have.deep.property(prop, val); + }; + + /** + * ### .notDeepPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct or inherited property named + * by `property` with value given by `value`. Uses a deep equality check. + * + * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { black: 'matcha' }); + * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' }); + * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' }); + * + * @name notDeepPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notDeepPropertyVal, true) + .to.not.have.deep.property(prop, val); + }; + + /** + * ### .ownProperty(object, property, [message]) + * + * Asserts that `object` has a direct property named by `property`. Inherited + * properties aren't checked. + * + * assert.ownProperty({ tea: { green: 'matcha' }}, 'tea'); + * + * @name ownProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @api public + */ + + assert.ownProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.ownProperty, true) + .to.have.own.property(prop); + }; + + /** + * ### .notOwnProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a direct property named by + * `property`. Inherited properties aren't checked. + * + * assert.notOwnProperty({ tea: { green: 'matcha' }}, 'coffee'); + * assert.notOwnProperty({}, 'toString'); + * + * @name notOwnProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @api public + */ + + assert.notOwnProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.notOwnProperty, true) + .to.not.have.own.property(prop); + }; + + /** + * ### .ownPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct property named by `property` and a value + * equal to the provided `value`. Uses a strict equality check (===). + * Inherited properties aren't checked. + * + * assert.ownPropertyVal({ coffee: 'is good'}, 'coffee', 'is good'); + * + * @name ownPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.ownPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.ownPropertyVal, true) + .to.have.own.property(prop, value); + }; + + /** + * ### .notOwnPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct property named by `property` + * with a value equal to the provided `value`. Uses a strict equality check + * (===). Inherited properties aren't checked. + * + * assert.notOwnPropertyVal({ tea: 'is better'}, 'tea', 'is worse'); + * assert.notOwnPropertyVal({}, 'toString', Object.prototype.toString); + * + * @name notOwnPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.notOwnPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.notOwnPropertyVal, true) + .to.not.have.own.property(prop, value); + }; + + /** + * ### .deepOwnPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct property named by `property` and a value + * equal to the provided `value`. Uses a deep equality check. Inherited + * properties aren't checked. + * + * assert.deepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' }); + * + * @name deepOwnPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.deepOwnPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.deepOwnPropertyVal, true) + .to.have.deep.own.property(prop, value); + }; + + /** + * ### .notDeepOwnPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct property named by `property` + * with a value equal to the provided `value`. Uses a deep equality check. + * Inherited properties aren't checked. + * + * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { black: 'matcha' }); + * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' }); + * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' }); + * assert.notDeepOwnPropertyVal({}, 'toString', Object.prototype.toString); + * + * @name notDeepOwnPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.notDeepOwnPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.notDeepOwnPropertyVal, true) + .to.not.have.deep.own.property(prop, value); + }; + + /** + * ### .nestedProperty(object, property, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property`, which can be a string using dot- and bracket-notation for + * nested reference. + * + * assert.nestedProperty({ tea: { green: 'matcha' }}, 'tea.green'); + * + * @name nestedProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.nestedProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.nestedProperty, true) + .to.have.nested.property(prop); + }; + + /** + * ### .notNestedProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a property named by `property`, which + * can be a string using dot- and bracket-notation for nested reference. The + * property cannot exist on the object nor anywhere in its prototype chain. + * + * assert.notNestedProperty({ tea: { green: 'matcha' }}, 'tea.oolong'); + * + * @name notNestedProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notNestedProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.notNestedProperty, true) + .to.not.have.nested.property(prop); + }; + + /** + * ### .nestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a property named by `property` with value given + * by `value`. `property` can use dot- and bracket-notation for nested + * reference. Uses a strict equality check (===). + * + * assert.nestedPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha'); + * + * @name nestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.nestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.nestedPropertyVal, true) + .to.have.nested.property(prop, val); + }; + + /** + * ### .notNestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a property named by `property` with + * value given by `value`. `property` can use dot- and bracket-notation for + * nested reference. Uses a strict equality check (===). + * + * assert.notNestedPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha'); + * assert.notNestedPropertyVal({ tea: { green: 'matcha' }}, 'coffee.green', 'matcha'); + * + * @name notNestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notNestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notNestedPropertyVal, true) + .to.not.have.nested.property(prop, val); + }; + + /** + * ### .deepNestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a property named by `property` with a value given + * by `value`. `property` can use dot- and bracket-notation for nested + * reference. Uses a deep equality check. + * + * assert.deepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { matcha: 'yum' }); + * + * @name deepNestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepNestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.deepNestedPropertyVal, true) + .to.have.deep.nested.property(prop, val); + }; + + /** + * ### .notDeepNestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a property named by `property` with + * value given by `value`. `property` can use dot- and bracket-notation for + * nested reference. Uses a deep equality check. + * + * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { oolong: 'yum' }); + * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { matcha: 'yuck' }); + * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.black', { matcha: 'yum' }); + * + * @name notDeepNestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepNestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notDeepNestedPropertyVal, true) + .to.not.have.deep.nested.property(prop, val); + } + + /** + * ### .lengthOf(object, length, [message]) + * + * Asserts that `object` has a `length` or `size` with the expected value. + * + * assert.lengthOf([1,2,3], 3, 'array has length of 3'); + * assert.lengthOf('foobar', 6, 'string has length of 6'); + * assert.lengthOf(new Set([1,2,3]), 3, 'set has size of 3'); + * assert.lengthOf(new Map([['a',1],['b',2],['c',3]]), 3, 'map has size of 3'); + * + * @name lengthOf + * @param {Mixed} object + * @param {Number} length + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.lengthOf = function (exp, len, msg) { + new Assertion(exp, msg, assert.lengthOf, true).to.have.lengthOf(len); + }; + + /** + * ### .hasAnyKeys(object, [keys], [message]) + * + * Asserts that `object` has at least one of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAnyKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'iDontExist', 'baz']); + * assert.hasAnyKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, iDontExist: 99, baz: 1337}); + * assert.hasAnyKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); + * assert.hasAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']); + * + * @name hasAnyKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAnyKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAnyKeys, true).to.have.any.keys(keys); + } + + /** + * ### .hasAllKeys(object, [keys], [message]) + * + * Asserts that `object` has all and only all of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']); + * assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337]); + * assert.hasAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); + * assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']); + * + * @name hasAllKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAllKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAllKeys, true).to.have.all.keys(keys); + } + + /** + * ### .containsAllKeys(object, [keys], [message]) + * + * Asserts that `object` has all of the `keys` provided but may have more keys not listed. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'baz']); + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']); + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, baz: 1337}); + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337}); + * assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}]); + * assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); + * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}]); + * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']); + * + * @name containsAllKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.containsAllKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.containsAllKeys, true) + .to.contain.all.keys(keys); + } + + /** + * ### .doesNotHaveAnyKeys(object, [keys], [message]) + * + * Asserts that `object` has none of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']); + * assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'}); + * assert.doesNotHaveAnyKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']); + * assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']); + * + * @name doesNotHaveAnyKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAnyKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAnyKeys, true) + .to.not.have.any.keys(keys); + } + + /** + * ### .doesNotHaveAllKeys(object, [keys], [message]) + * + * Asserts that `object` does not have at least one of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']); + * assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'}); + * assert.doesNotHaveAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']); + * assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']); + * + * @name doesNotHaveAllKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAllKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAllKeys, true) + .to.not.have.all.keys(keys); + } + + /** + * ### .hasAnyDeepKeys(object, [keys], [message]) + * + * Asserts that `object` has at least one of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {one: 'one'}); + * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), [{one: 'one'}, {two: 'two'}]); + * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]); + * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {one: 'one'}); + * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {three: 'three'}]); + * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); + * + * @name doesNotHaveAllKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAnyDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAnyDeepKeys, true) + .to.have.any.deep.keys(keys); + } + + /** + * ### .hasAllDeepKeys(object, [keys], [message]) + * + * Asserts that `object` has all and only all of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAllDeepKeys(new Map([[{one: 'one'}, 'valueOne']]), {one: 'one'}); + * assert.hasAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]); + * assert.hasAllDeepKeys(new Set([{one: 'one'}]), {one: 'one'}); + * assert.hasAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); + * + * @name hasAllDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAllDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAllDeepKeys, true) + .to.have.all.deep.keys(keys); + } + + /** + * ### .containsAllDeepKeys(object, [keys], [message]) + * + * Asserts that `object` contains all of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.containsAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {one: 'one'}); + * assert.containsAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]); + * assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {one: 'one'}); + * assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); + * + * @name containsAllDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.containsAllDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.containsAllDeepKeys, true) + .to.contain.all.deep.keys(keys); + } + + /** + * ### .doesNotHaveAnyDeepKeys(object, [keys], [message]) + * + * Asserts that `object` has none of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {thisDoesNot: 'exist'}); + * assert.doesNotHaveAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{twenty: 'twenty'}, {fifty: 'fifty'}]); + * assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {twenty: 'twenty'}); + * assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{twenty: 'twenty'}, {fifty: 'fifty'}]); + * + * @name doesNotHaveAnyDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAnyDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAnyDeepKeys, true) + .to.not.have.any.deep.keys(keys); + } + + /** + * ### .doesNotHaveAllDeepKeys(object, [keys], [message]) + * + * Asserts that `object` does not have at least one of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {thisDoesNot: 'exist'}); + * assert.doesNotHaveAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{twenty: 'twenty'}, {one: 'one'}]); + * assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {twenty: 'twenty'}); + * assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {fifty: 'fifty'}]); + * + * @name doesNotHaveAllDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAllDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAllDeepKeys, true) + .to.not.have.all.deep.keys(keys); + } + + /** + * ### .throws(fn, [errorLike/string/regexp], [string/regexp], [message]) + * + * If `errorLike` is an `Error` constructor, asserts that `fn` will throw an error that is an + * instance of `errorLike`. + * If `errorLike` is an `Error` instance, asserts that the error thrown is the same + * instance as `errorLike`. + * If `errMsgMatcher` is provided, it also asserts that the error thrown will have a + * message matching `errMsgMatcher`. + * + * assert.throws(fn, 'Error thrown must have this msg'); + * assert.throws(fn, /Error thrown must have a msg that matches this/); + * assert.throws(fn, ReferenceError); + * assert.throws(fn, errorInstance); + * assert.throws(fn, ReferenceError, 'Error thrown must be a ReferenceError and have this msg'); + * assert.throws(fn, errorInstance, 'Error thrown must be the same errorInstance and have this msg'); + * assert.throws(fn, ReferenceError, /Error thrown must be a ReferenceError and match this/); + * assert.throws(fn, errorInstance, /Error thrown must be the same errorInstance and match this/); + * + * @name throws + * @alias throw + * @alias Throw + * @param {Function} fn + * @param {ErrorConstructor|Error} errorLike + * @param {RegExp|String} errMsgMatcher + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Assert + * @api public + */ + + assert.throws = function (fn, errorLike, errMsgMatcher, msg) { + if ('string' === typeof errorLike || errorLike instanceof RegExp) { + errMsgMatcher = errorLike; + errorLike = null; + } + + var assertErr = new Assertion(fn, msg, assert.throws, true) + .to.throw(errorLike, errMsgMatcher); + return flag(assertErr, 'object'); + }; + + /** + * ### .doesNotThrow(fn, [errorLike/string/regexp], [string/regexp], [message]) + * + * If `errorLike` is an `Error` constructor, asserts that `fn` will _not_ throw an error that is an + * instance of `errorLike`. + * If `errorLike` is an `Error` instance, asserts that the error thrown is _not_ the same + * instance as `errorLike`. + * If `errMsgMatcher` is provided, it also asserts that the error thrown will _not_ have a + * message matching `errMsgMatcher`. + * + * assert.doesNotThrow(fn, 'Any Error thrown must not have this message'); + * assert.doesNotThrow(fn, /Any Error thrown must not match this/); + * assert.doesNotThrow(fn, Error); + * assert.doesNotThrow(fn, errorInstance); + * assert.doesNotThrow(fn, Error, 'Error must not have this message'); + * assert.doesNotThrow(fn, errorInstance, 'Error must not have this message'); + * assert.doesNotThrow(fn, Error, /Error must not match this/); + * assert.doesNotThrow(fn, errorInstance, /Error must not match this/); + * + * @name doesNotThrow + * @param {Function} fn + * @param {ErrorConstructor} errorLike + * @param {RegExp|String} errMsgMatcher + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Assert + * @api public + */ + + assert.doesNotThrow = function (fn, errorLike, errMsgMatcher, msg) { + if ('string' === typeof errorLike || errorLike instanceof RegExp) { + errMsgMatcher = errorLike; + errorLike = null; + } + + new Assertion(fn, msg, assert.doesNotThrow, true) + .to.not.throw(errorLike, errMsgMatcher); + }; + + /** + * ### .operator(val1, operator, val2, [message]) + * + * Compares two values using `operator`. + * + * assert.operator(1, '<', 2, 'everything is ok'); + * assert.operator(1, '>', 2, 'this will fail'); + * + * @name operator + * @param {Mixed} val1 + * @param {String} operator + * @param {Mixed} val2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.operator = function (val, operator, val2, msg) { + var ok; + switch(operator) { + case '==': + ok = val == val2; + break; + case '===': + ok = val === val2; + break; + case '>': + ok = val > val2; + break; + case '>=': + ok = val >= val2; + break; + case '<': + ok = val < val2; + break; + case '<=': + ok = val <= val2; + break; + case '!=': + ok = val != val2; + break; + case '!==': + ok = val !== val2; + break; + default: + msg = msg ? msg + ': ' : msg; + throw new chai.AssertionError( + msg + 'Invalid operator "' + operator + '"', + undefined, + assert.operator + ); + } + var test = new Assertion(ok, msg, assert.operator, true); + test.assert( + true === flag(test, 'object') + , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2) + , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) ); + }; + + /** + * ### .closeTo(actual, expected, delta, [message]) + * + * Asserts that the target is equal `expected`, to within a +/- `delta` range. + * + * assert.closeTo(1.5, 1, 0.5, 'numbers are close'); + * + * @name closeTo + * @param {Number} actual + * @param {Number} expected + * @param {Number} delta + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.closeTo = function (act, exp, delta, msg) { + new Assertion(act, msg, assert.closeTo, true).to.be.closeTo(exp, delta); + }; + + /** + * ### .approximately(actual, expected, delta, [message]) + * + * Asserts that the target is equal `expected`, to within a +/- `delta` range. + * + * assert.approximately(1.5, 1, 0.5, 'numbers are close'); + * + * @name approximately + * @param {Number} actual + * @param {Number} expected + * @param {Number} delta + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.approximately = function (act, exp, delta, msg) { + new Assertion(act, msg, assert.approximately, true) + .to.be.approximately(exp, delta); + }; + + /** + * ### .sameMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in any order. Uses a + * strict equality check (===). + * + * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members'); + * + * @name sameMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameMembers, true) + .to.have.same.members(set2); + } + + /** + * ### .notSameMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in any order. + * Uses a strict equality check (===). + * + * assert.notSameMembers([ 1, 2, 3 ], [ 5, 1, 3 ], 'not same members'); + * + * @name notSameMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameMembers, true) + .to.not.have.same.members(set2); + } + + /** + * ### .sameDeepMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in any order. Uses a + * deep equality check. + * + * assert.sameDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [{ b: 2 }, { a: 1 }, { c: 3 }], 'same deep members'); + * + * @name sameDeepMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameDeepMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameDeepMembers, true) + .to.have.same.deep.members(set2); + } + + /** + * ### .notSameDeepMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in any order. + * Uses a deep equality check. + * + * assert.notSameDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [{ b: 2 }, { a: 1 }, { f: 5 }], 'not same deep members'); + * + * @name notSameDeepMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameDeepMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameDeepMembers, true) + .to.not.have.same.deep.members(set2); + } + + /** + * ### .sameOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in the same order. + * Uses a strict equality check (===). + * + * assert.sameOrderedMembers([ 1, 2, 3 ], [ 1, 2, 3 ], 'same ordered members'); + * + * @name sameOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameOrderedMembers, true) + .to.have.same.ordered.members(set2); + } + + /** + * ### .notSameOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in the same + * order. Uses a strict equality check (===). + * + * assert.notSameOrderedMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'not same ordered members'); + * + * @name notSameOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameOrderedMembers, true) + .to.not.have.same.ordered.members(set2); + } + + /** + * ### .sameDeepOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in the same order. + * Uses a deep equality check. + * + * assert.sameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 }, { c: 3 } ], 'same deep ordered members'); + * + * @name sameDeepOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameDeepOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameDeepOrderedMembers, true) + .to.have.same.deep.ordered.members(set2); + } + + /** + * ### .notSameDeepOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in the same + * order. Uses a deep equality check. + * + * assert.notSameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 }, { z: 5 } ], 'not same deep ordered members'); + * assert.notSameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 }, { c: 3 } ], 'not same deep ordered members'); + * + * @name notSameDeepOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameDeepOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameDeepOrderedMembers, true) + .to.not.have.same.deep.ordered.members(set2); + } + + /** + * ### .includeMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in any order. Uses a + * strict equality check (===). Duplicates are ignored. + * + * assert.includeMembers([ 1, 2, 3 ], [ 2, 1, 2 ], 'include members'); + * + * @name includeMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeMembers, true) + .to.include.members(subset); + } + + /** + * ### .notIncludeMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in any order. Uses a + * strict equality check (===). Duplicates are ignored. + * + * assert.notIncludeMembers([ 1, 2, 3 ], [ 5, 1 ], 'not include members'); + * + * @name notIncludeMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeMembers, true) + .to.not.include.members(subset); + } + + /** + * ### .includeDeepMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in any order. Uses a deep + * equality check. Duplicates are ignored. + * + * assert.includeDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 }, { b: 2 } ], 'include deep members'); + * + * @name includeDeepMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeDeepMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeDeepMembers, true) + .to.include.deep.members(subset); + } + + /** + * ### .notIncludeDeepMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in any order. Uses a + * deep equality check. Duplicates are ignored. + * + * assert.notIncludeDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { f: 5 } ], 'not include deep members'); + * + * @name notIncludeDeepMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeDeepMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeDeepMembers, true) + .to.not.include.deep.members(subset); + } + + /** + * ### .includeOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in the same order + * beginning with the first element in `superset`. Uses a strict equality + * check (===). + * + * assert.includeOrderedMembers([ 1, 2, 3 ], [ 1, 2 ], 'include ordered members'); + * + * @name includeOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeOrderedMembers, true) + .to.include.ordered.members(subset); + } + + /** + * ### .notIncludeOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in the same order + * beginning with the first element in `superset`. Uses a strict equality + * check (===). + * + * assert.notIncludeOrderedMembers([ 1, 2, 3 ], [ 2, 1 ], 'not include ordered members'); + * assert.notIncludeOrderedMembers([ 1, 2, 3 ], [ 2, 3 ], 'not include ordered members'); + * + * @name notIncludeOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeOrderedMembers, true) + .to.not.include.ordered.members(subset); + } + + /** + * ### .includeDeepOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in the same order + * beginning with the first element in `superset`. Uses a deep equality + * check. + * + * assert.includeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 } ], 'include deep ordered members'); + * + * @name includeDeepOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeDeepOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeDeepOrderedMembers, true) + .to.include.deep.ordered.members(subset); + } + + /** + * ### .notIncludeDeepOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in the same order + * beginning with the first element in `superset`. Uses a deep equality + * check. + * + * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { f: 5 } ], 'not include deep ordered members'); + * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 } ], 'not include deep ordered members'); + * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { c: 3 } ], 'not include deep ordered members'); + * + * @name notIncludeDeepOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeDeepOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeDeepOrderedMembers, true) + .to.not.include.deep.ordered.members(subset); + } + + /** + * ### .oneOf(inList, list, [message]) + * + * Asserts that non-object, non-array value `inList` appears in the flat array `list`. + * + * assert.oneOf(1, [ 2, 1 ], 'Not found in list'); + * + * @name oneOf + * @param {*} inList + * @param {Array<*>} list + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.oneOf = function (inList, list, msg) { + new Assertion(inList, msg, assert.oneOf, true).to.be.oneOf(list); + } + + /** + * ### .changes(function, object, property, [message]) + * + * Asserts that a function changes the value of a property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 22 }; + * assert.changes(fn, obj, 'val'); + * + * @name changes + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.changes = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + new Assertion(fn, msg, assert.changes, true).to.change(obj, prop); + } + + /** + * ### .changesBy(function, object, property, delta, [message]) + * + * Asserts that a function changes the value of a property by an amount (delta). + * + * var obj = { val: 10 }; + * var fn = function() { obj.val += 2 }; + * assert.changesBy(fn, obj, 'val', 2); + * + * @name changesBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.changesBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.changesBy, true) + .to.change(obj, prop).by(delta); + } + + /** + * ### .doesNotChange(function, object, property, [message]) + * + * Asserts that a function does not change the value of a property. + * + * var obj = { val: 10 }; + * var fn = function() { console.log('foo'); }; + * assert.doesNotChange(fn, obj, 'val'); + * + * @name doesNotChange + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotChange = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotChange, true) + .to.not.change(obj, prop); + } + + /** + * ### .changesButNotBy(function, object, property, delta, [message]) + * + * Asserts that a function does not change the value of a property or of a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val += 10 }; + * assert.changesButNotBy(fn, obj, 'val', 5); + * + * @name changesButNotBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.changesButNotBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.changesButNotBy, true) + .to.change(obj, prop).but.not.by(delta); + } + + /** + * ### .increases(function, object, property, [message]) + * + * Asserts that a function increases a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 13 }; + * assert.increases(fn, obj, 'val'); + * + * @name increases + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.increases = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.increases, true) + .to.increase(obj, prop); + } + + /** + * ### .increasesBy(function, object, property, delta, [message]) + * + * Asserts that a function increases a numeric object property or a function's return value by an amount (delta). + * + * var obj = { val: 10 }; + * var fn = function() { obj.val += 10 }; + * assert.increasesBy(fn, obj, 'val', 10); + * + * @name increasesBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.increasesBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.increasesBy, true) + .to.increase(obj, prop).by(delta); + } + + /** + * ### .doesNotIncrease(function, object, property, [message]) + * + * Asserts that a function does not increase a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 8 }; + * assert.doesNotIncrease(fn, obj, 'val'); + * + * @name doesNotIncrease + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotIncrease = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotIncrease, true) + .to.not.increase(obj, prop); + } + + /** + * ### .increasesButNotBy(function, object, property, [message]) + * + * Asserts that a function does not increase a numeric object property or function's return value by an amount (delta). + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 15 }; + * assert.increasesButNotBy(fn, obj, 'val', 10); + * + * @name increasesButNotBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.increasesButNotBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.increasesButNotBy, true) + .to.increase(obj, prop).but.not.by(delta); + } + + /** + * ### .decreases(function, object, property, [message]) + * + * Asserts that a function decreases a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 5 }; + * assert.decreases(fn, obj, 'val'); + * + * @name decreases + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.decreases = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.decreases, true) + .to.decrease(obj, prop); + } + + /** + * ### .decreasesBy(function, object, property, delta, [message]) + * + * Asserts that a function decreases a numeric object property or a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val -= 5 }; + * assert.decreasesBy(fn, obj, 'val', 5); + * + * @name decreasesBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.decreasesBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.decreasesBy, true) + .to.decrease(obj, prop).by(delta); + } + + /** + * ### .doesNotDecrease(function, object, property, [message]) + * + * Asserts that a function does not decreases a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 15 }; + * assert.doesNotDecrease(fn, obj, 'val'); + * + * @name doesNotDecrease + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotDecrease = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotDecrease, true) + .to.not.decrease(obj, prop); + } + + /** + * ### .doesNotDecreaseBy(function, object, property, delta, [message]) + * + * Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 5 }; + * assert.doesNotDecreaseBy(fn, obj, 'val', 1); + * + * @name doesNotDecrease + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotDecreaseBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotDecreaseBy, true) + .to.not.decrease(obj, prop).by(delta); + } + + /** + * ### .decreasesButNotBy(function, object, property, delta, [message]) + * + * Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 5 }; + * assert.decreasesButNotBy(fn, obj, 'val', 1); + * + * @name decreasesButNotBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.decreasesButNotBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.decreasesButNotBy, true) + .to.decrease(obj, prop).but.not.by(delta); + } + + /*! + * ### .ifError(object) + * + * Asserts if value is not a false value, and throws if it is a true value. + * This is added to allow for chai to be a drop-in replacement for Node's + * assert class. + * + * var err = new Error('I am a custom error'); + * assert.ifError(err); // Rethrows err! + * + * @name ifError + * @param {Object} object + * @namespace Assert + * @api public + */ + + assert.ifError = function (val) { + if (val) { + throw(val); + } + }; + + /** + * ### .isExtensible(object) + * + * Asserts that `object` is extensible (can have new properties added to it). + * + * assert.isExtensible({}); + * + * @name isExtensible + * @alias extensible + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isExtensible = function (obj, msg) { + new Assertion(obj, msg, assert.isExtensible, true).to.be.extensible; + }; + + /** + * ### .isNotExtensible(object) + * + * Asserts that `object` is _not_ extensible. + * + * var nonExtensibleObject = Object.preventExtensions({}); + * var sealedObject = Object.seal({}); + * var frozenObject = Object.freeze({}); + * + * assert.isNotExtensible(nonExtensibleObject); + * assert.isNotExtensible(sealedObject); + * assert.isNotExtensible(frozenObject); + * + * @name isNotExtensible + * @alias notExtensible + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotExtensible = function (obj, msg) { + new Assertion(obj, msg, assert.isNotExtensible, true).to.not.be.extensible; + }; + + /** + * ### .isSealed(object) + * + * Asserts that `object` is sealed (cannot have new properties added to it + * and its existing properties cannot be removed). + * + * var sealedObject = Object.seal({}); + * var frozenObject = Object.seal({}); + * + * assert.isSealed(sealedObject); + * assert.isSealed(frozenObject); + * + * @name isSealed + * @alias sealed + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isSealed = function (obj, msg) { + new Assertion(obj, msg, assert.isSealed, true).to.be.sealed; + }; + + /** + * ### .isNotSealed(object) + * + * Asserts that `object` is _not_ sealed. + * + * assert.isNotSealed({}); + * + * @name isNotSealed + * @alias notSealed + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotSealed = function (obj, msg) { + new Assertion(obj, msg, assert.isNotSealed, true).to.not.be.sealed; + }; + + /** + * ### .isFrozen(object) + * + * Asserts that `object` is frozen (cannot have new properties added to it + * and its existing properties cannot be modified). + * + * var frozenObject = Object.freeze({}); + * assert.frozen(frozenObject); + * + * @name isFrozen + * @alias frozen + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isFrozen = function (obj, msg) { + new Assertion(obj, msg, assert.isFrozen, true).to.be.frozen; + }; + + /** + * ### .isNotFrozen(object) + * + * Asserts that `object` is _not_ frozen. + * + * assert.isNotFrozen({}); + * + * @name isNotFrozen + * @alias notFrozen + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotFrozen = function (obj, msg) { + new Assertion(obj, msg, assert.isNotFrozen, true).to.not.be.frozen; + }; + + /** + * ### .isEmpty(target) + * + * Asserts that the target does not contain any values. + * For arrays and strings, it checks the `length` property. + * For `Map` and `Set` instances, it checks the `size` property. + * For non-function objects, it gets the count of own + * enumerable string keys. + * + * assert.isEmpty([]); + * assert.isEmpty(''); + * assert.isEmpty(new Map); + * assert.isEmpty({}); + * + * @name isEmpty + * @alias empty + * @param {Object|Array|String|Map|Set} target + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isEmpty = function(val, msg) { + new Assertion(val, msg, assert.isEmpty, true).to.be.empty; + }; + + /** + * ### .isNotEmpty(target) + * + * Asserts that the target contains values. + * For arrays and strings, it checks the `length` property. + * For `Map` and `Set` instances, it checks the `size` property. + * For non-function objects, it gets the count of own + * enumerable string keys. + * + * assert.isNotEmpty([1, 2]); + * assert.isNotEmpty('34'); + * assert.isNotEmpty(new Set([5, 6])); + * assert.isNotEmpty({ key: 7 }); + * + * @name isNotEmpty + * @alias notEmpty + * @param {Object|Array|String|Map|Set} target + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotEmpty = function(val, msg) { + new Assertion(val, msg, assert.isNotEmpty, true).to.not.be.empty; + }; + + /*! + * Aliases. + */ + + (function alias(name, as){ + assert[as] = assert[name]; + return alias; + }) + ('isOk', 'ok') + ('isNotOk', 'notOk') + ('throws', 'throw') + ('throws', 'Throw') + ('isExtensible', 'extensible') + ('isNotExtensible', 'notExtensible') + ('isSealed', 'sealed') + ('isNotSealed', 'notSealed') + ('isFrozen', 'frozen') + ('isNotFrozen', 'notFrozen') + ('isEmpty', 'empty') + ('isNotEmpty', 'notEmpty'); +}; + + +/***/ }), + +/***/ 861: +/***/ ((module) => { + +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, util) { + chai.expect = function (val, message) { + return new chai.Assertion(val, message); + }; + + /** + * ### .fail([message]) + * ### .fail(actual, expected, [message], [operator]) + * + * Throw a failure. + * + * expect.fail(); + * expect.fail("custom error message"); + * expect.fail(1, 2); + * expect.fail(1, 2, "custom error message"); + * expect.fail(1, 2, "custom error message", ">"); + * expect.fail(1, 2, undefined, ">"); + * + * @name fail + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @param {String} operator + * @namespace BDD + * @api public + */ + + chai.expect.fail = function (actual, expected, message, operator) { + if (arguments.length < 2) { + message = actual; + actual = undefined; + } + + message = message || 'expect.fail()'; + throw new chai.AssertionError(message, { + actual: actual + , expected: expected + , operator: operator + }, chai.expect.fail); + }; +}; + + +/***/ }), + +/***/ 61644: +/***/ ((module) => { + +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, util) { + var Assertion = chai.Assertion; + + function loadShould () { + // explicitly define this method as function as to have it's name to include as `ssfi` + function shouldGetter() { + if (this instanceof String + || this instanceof Number + || this instanceof Boolean + || typeof Symbol === 'function' && this instanceof Symbol) { + return new Assertion(this.valueOf(), null, shouldGetter); + } + return new Assertion(this, null, shouldGetter); + } + function shouldSetter(value) { + // See https://github.com/chaijs/chai/issues/86: this makes + // `whatever.should = someValue` actually set `someValue`, which is + // especially useful for `global.should = require('chai').should()`. + // + // Note that we have to use [[DefineProperty]] instead of [[Put]] + // since otherwise we would trigger this very setter! + Object.defineProperty(this, 'should', { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } + // modify Object.prototype to have `should` + Object.defineProperty(Object.prototype, 'should', { + set: shouldSetter + , get: shouldGetter + , configurable: true + }); + + var should = {}; + + /** + * ### .fail([message]) + * ### .fail(actual, expected, [message], [operator]) + * + * Throw a failure. + * + * should.fail(); + * should.fail("custom error message"); + * should.fail(1, 2); + * should.fail(1, 2, "custom error message"); + * should.fail(1, 2, "custom error message", ">"); + * should.fail(1, 2, undefined, ">"); + * + * + * @name fail + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @param {String} operator + * @namespace BDD + * @api public + */ + + should.fail = function (actual, expected, message, operator) { + if (arguments.length < 2) { + message = actual; + actual = undefined; + } + + message = message || 'should.fail()'; + throw new chai.AssertionError(message, { + actual: actual + , expected: expected + , operator: operator + }, should.fail); + }; + + /** + * ### .equal(actual, expected, [message]) + * + * Asserts non-strict equality (`==`) of `actual` and `expected`. + * + * should.equal(3, '3', '== coerces values to strings'); + * + * @name equal + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Should + * @api public + */ + + should.equal = function (val1, val2, msg) { + new Assertion(val1, msg).to.equal(val2); + }; + + /** + * ### .throw(function, [constructor/string/regexp], [string/regexp], [message]) + * + * Asserts that `function` will throw an error that is an instance of + * `constructor`, or alternately that it will throw an error with message + * matching `regexp`. + * + * should.throw(fn, 'function throws a reference error'); + * should.throw(fn, /function throws a reference error/); + * should.throw(fn, ReferenceError); + * should.throw(fn, ReferenceError, 'function throws a reference error'); + * should.throw(fn, ReferenceError, /function throws a reference error/); + * + * @name throw + * @alias Throw + * @param {Function} function + * @param {ErrorConstructor} constructor + * @param {RegExp} regexp + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Should + * @api public + */ + + should.Throw = function (fn, errt, errs, msg) { + new Assertion(fn, msg).to.Throw(errt, errs); + }; + + /** + * ### .exist + * + * Asserts that the target is neither `null` nor `undefined`. + * + * var foo = 'hi'; + * + * should.exist(foo, 'foo exists'); + * + * @name exist + * @namespace Should + * @api public + */ + + should.exist = function (val, msg) { + new Assertion(val, msg).to.exist; + } + + // negation + should.not = {} + + /** + * ### .not.equal(actual, expected, [message]) + * + * Asserts non-strict inequality (`!=`) of `actual` and `expected`. + * + * should.not.equal(3, 4, 'these numbers are not equal'); + * + * @name not.equal + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Should + * @api public + */ + + should.not.equal = function (val1, val2, msg) { + new Assertion(val1, msg).to.not.equal(val2); + }; + + /** + * ### .throw(function, [constructor/regexp], [message]) + * + * Asserts that `function` will _not_ throw an error that is an instance of + * `constructor`, or alternately that it will not throw an error with message + * matching `regexp`. + * + * should.not.throw(fn, Error, 'function does not throw'); + * + * @name not.throw + * @alias not.Throw + * @param {Function} function + * @param {ErrorConstructor} constructor + * @param {RegExp} regexp + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Should + * @api public + */ + + should.not.Throw = function (fn, errt, errs, msg) { + new Assertion(fn, msg).to.not.Throw(errt, errs); + }; + + /** + * ### .not.exist + * + * Asserts that the target is neither `null` nor `undefined`. + * + * var bar = null; + * + * should.not.exist(bar, 'bar does not exist'); + * + * @name not.exist + * @namespace Should + * @api public + */ + + should.not.exist = function (val, msg) { + new Assertion(val, msg).to.not.exist; + } + + should['throw'] = should['Throw']; + should.not['throw'] = should.not['Throw']; + + return should; + }; + + chai.should = loadShould; + chai.Should = loadShould; +}; + + +/***/ }), + +/***/ 30647: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - addChainingMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var addLengthGuard = __nccwpck_require__(45664); +var chai = __nccwpck_require__(6343); +var flag = __nccwpck_require__(36982); +var proxify = __nccwpck_require__(67034); +var transferFlags = __nccwpck_require__(58745); + +/*! + * Module variables + */ + +// Check whether `Object.setPrototypeOf` is supported +var canSetPrototype = typeof Object.setPrototypeOf === 'function'; + +// Without `Object.setPrototypeOf` support, this module will need to add properties to a function. +// However, some of functions' own props are not configurable and should be skipped. +var testFn = function() {}; +var excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) { + var propDesc = Object.getOwnPropertyDescriptor(testFn, name); + + // Note: PhantomJS 1.x includes `callee` as one of `testFn`'s own properties, + // but then returns `undefined` as the property descriptor for `callee`. As a + // workaround, we perform an otherwise unnecessary type-check for `propDesc`, + // and then filter it out if it's not an object as it should be. + if (typeof propDesc !== 'object') + return true; + + return !propDesc.configurable; +}); + +// Cache `Function` properties +var call = Function.prototype.call, + apply = Function.prototype.apply; + +/** + * ### .addChainableMethod(ctx, name, method, chainingBehavior) + * + * Adds a method to an object, such that the method can also be chained. + * + * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.equal(str); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior); + * + * The result can then be used as both a method assertion, executing both `method` and + * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`. + * + * expect(fooStr).to.be.foo('bar'); + * expect(fooStr).to.be.foo.equal('foo'); + * + * @param {Object} ctx object to which the method is added + * @param {String} name of method to add + * @param {Function} method function to be used for `name`, when called + * @param {Function} chainingBehavior function to be called every time the property is accessed + * @namespace Utils + * @name addChainableMethod + * @api public + */ + +module.exports = function addChainableMethod(ctx, name, method, chainingBehavior) { + if (typeof chainingBehavior !== 'function') { + chainingBehavior = function () { }; + } + + var chainableBehavior = { + method: method + , chainingBehavior: chainingBehavior + }; + + // save the methods so we can overwrite them later, if we need to. + if (!ctx.__methods) { + ctx.__methods = {}; + } + ctx.__methods[name] = chainableBehavior; + + Object.defineProperty(ctx, name, + { get: function chainableMethodGetter() { + chainableBehavior.chainingBehavior.call(this); + + var chainableMethodWrapper = function () { + // Setting the `ssfi` flag to `chainableMethodWrapper` causes this + // function to be the starting point for removing implementation + // frames from the stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if + // the `lockSsfi` flag isn't set. + // + // If the `lockSsfi` flag is set, then this assertion is being + // invoked from inside of another assertion. In this case, the `ssfi` + // flag has already been set by the outer assertion. + // + // Note that overwriting a chainable method merely replaces the saved + // methods in `ctx.__methods` instead of completely replacing the + // overwritten assertion. Therefore, an overwriting assertion won't + // set the `ssfi` or `lockSsfi` flags. + if (!flag(this, 'lockSsfi')) { + flag(this, 'ssfi', chainableMethodWrapper); + } + + var result = chainableBehavior.method.apply(this, arguments); + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; + + addLengthGuard(chainableMethodWrapper, name, true); + + // Use `Object.setPrototypeOf` if available + if (canSetPrototype) { + // Inherit all properties from the object by replacing the `Function` prototype + var prototype = Object.create(this); + // Restore the `call` and `apply` methods from `Function` + prototype.call = call; + prototype.apply = apply; + Object.setPrototypeOf(chainableMethodWrapper, prototype); + } + // Otherwise, redefine all properties (slow!) + else { + var asserterNames = Object.getOwnPropertyNames(ctx); + asserterNames.forEach(function (asserterName) { + if (excludeNames.indexOf(asserterName) !== -1) { + return; + } + + var pd = Object.getOwnPropertyDescriptor(ctx, asserterName); + Object.defineProperty(chainableMethodWrapper, asserterName, pd); + }); + } + + transferFlags(this, chainableMethodWrapper); + return proxify(chainableMethodWrapper); + } + , configurable: true + }); +}; + + +/***/ }), + +/***/ 45664: +/***/ ((module) => { + +var fnLengthDesc = Object.getOwnPropertyDescriptor(function () {}, 'length'); + +/*! + * Chai - addLengthGuard utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .addLengthGuard(fn, assertionName, isChainable) + * + * Define `length` as a getter on the given uninvoked method assertion. The + * getter acts as a guard against chaining `length` directly off of an uninvoked + * method assertion, which is a problem because it references `function`'s + * built-in `length` property instead of Chai's `length` assertion. When the + * getter catches the user making this mistake, it throws an error with a + * helpful message. + * + * There are two ways in which this mistake can be made. The first way is by + * chaining the `length` assertion directly off of an uninvoked chainable + * method. In this case, Chai suggests that the user use `lengthOf` instead. The + * second way is by chaining the `length` assertion directly off of an uninvoked + * non-chainable method. Non-chainable methods must be invoked prior to + * chaining. In this case, Chai suggests that the user consult the docs for the + * given assertion. + * + * If the `length` property of functions is unconfigurable, then return `fn` + * without modification. + * + * Note that in ES6, the function's `length` property is configurable, so once + * support for legacy environments is dropped, Chai's `length` property can + * replace the built-in function's `length` property, and this length guard will + * no longer be necessary. In the mean time, maintaining consistency across all + * environments is the priority. + * + * @param {Function} fn + * @param {String} assertionName + * @param {Boolean} isChainable + * @namespace Utils + * @name addLengthGuard + */ + +module.exports = function addLengthGuard (fn, assertionName, isChainable) { + if (!fnLengthDesc.configurable) return fn; + + Object.defineProperty(fn, 'length', { + get: function () { + if (isChainable) { + throw Error('Invalid Chai property: ' + assertionName + '.length. Due' + + ' to a compatibility issue, "length" cannot directly follow "' + + assertionName + '". Use "' + assertionName + '.lengthOf" instead.'); + } + + throw Error('Invalid Chai property: ' + assertionName + '.length. See' + + ' docs for proper usage of "' + assertionName + '".'); + } + }); + + return fn; +}; + + +/***/ }), + +/***/ 45808: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - addMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var addLengthGuard = __nccwpck_require__(45664); +var chai = __nccwpck_require__(6343); +var flag = __nccwpck_require__(36982); +var proxify = __nccwpck_require__(67034); +var transferFlags = __nccwpck_require__(58745); + +/** + * ### .addMethod(ctx, name, method) + * + * Adds a method to the prototype of an object. + * + * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.equal(str); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addMethod('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(fooStr).to.be.foo('bar'); + * + * @param {Object} ctx object to which the method is added + * @param {String} name of method to add + * @param {Function} method function to be used for name + * @namespace Utils + * @name addMethod + * @api public + */ + +module.exports = function addMethod(ctx, name, method) { + var methodWrapper = function () { + // Setting the `ssfi` flag to `methodWrapper` causes this function to be the + // starting point for removing implementation frames from the stack trace of + // a failed assertion. + // + // However, we only want to use this function as the starting point if the + // `lockSsfi` flag isn't set. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked from + // inside of another assertion. In the first case, the `ssfi` flag has + // already been set by the overwriting assertion. In the second case, the + // `ssfi` flag has already been set by the outer assertion. + if (!flag(this, 'lockSsfi')) { + flag(this, 'ssfi', methodWrapper); + } + + var result = method.apply(this, arguments); + if (result !== undefined) + return result; + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; + + addLengthGuard(methodWrapper, name, false); + ctx[name] = proxify(methodWrapper, name); +}; + + +/***/ }), + +/***/ 65318: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - addProperty utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var chai = __nccwpck_require__(6343); +var flag = __nccwpck_require__(36982); +var isProxyEnabled = __nccwpck_require__(86121); +var transferFlags = __nccwpck_require__(58745); + +/** + * ### .addProperty(ctx, name, getter) + * + * Adds a property to the prototype of an object. + * + * utils.addProperty(chai.Assertion.prototype, 'foo', function () { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.instanceof(Foo); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addProperty('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.be.foo; + * + * @param {Object} ctx object to which the property is added + * @param {String} name of property to add + * @param {Function} getter function to be used for name + * @namespace Utils + * @name addProperty + * @api public + */ + +module.exports = function addProperty(ctx, name, getter) { + getter = getter === undefined ? function () {} : getter; + + Object.defineProperty(ctx, name, + { get: function propertyGetter() { + // Setting the `ssfi` flag to `propertyGetter` causes this function to + // be the starting point for removing implementation frames from the + // stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if + // the `lockSsfi` flag isn't set and proxy protection is disabled. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked + // from inside of another assertion. In the first case, the `ssfi` flag + // has already been set by the overwriting assertion. In the second + // case, the `ssfi` flag has already been set by the outer assertion. + // + // If proxy protection is enabled, then the `ssfi` flag has already been + // set by the proxy getter. + if (!isProxyEnabled() && !flag(this, 'lockSsfi')) { + flag(this, 'ssfi', propertyGetter); + } + + var result = getter.call(this); + if (result !== undefined) + return result; + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + } + , configurable: true + }); +}; + + +/***/ }), + +/***/ 30428: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - compareByInspect utility + * Copyright(c) 2011-2016 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var inspect = __nccwpck_require__(72414); + +/** + * ### .compareByInspect(mixed, mixed) + * + * To be used as a compareFunction with Array.prototype.sort. Compares elements + * using inspect instead of default behavior of using toString so that Symbols + * and objects with irregular/missing toString can still be sorted without a + * TypeError. + * + * @param {Mixed} first element to compare + * @param {Mixed} second element to compare + * @returns {Number} -1 if 'a' should come before 'b'; otherwise 1 + * @name compareByInspect + * @namespace Utils + * @api public + */ + +module.exports = function compareByInspect(a, b) { + return inspect(a) < inspect(b) ? -1 : 1; +}; + + +/***/ }), + +/***/ 4642: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - expectTypes utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .expectTypes(obj, types) + * + * Ensures that the object being tested against is of a valid type. + * + * utils.expectTypes(this, ['array', 'object', 'string']); + * + * @param {Mixed} obj constructed Assertion + * @param {Array} type A list of allowed types for this assertion + * @namespace Utils + * @name expectTypes + * @api public + */ + +var AssertionError = __nccwpck_require__(9210); +var flag = __nccwpck_require__(36982); +var type = __nccwpck_require__(4919); + +module.exports = function expectTypes(obj, types) { + var flagMsg = flag(obj, 'message'); + var ssfi = flag(obj, 'ssfi'); + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + obj = flag(obj, 'object'); + types = types.map(function (t) { return t.toLowerCase(); }); + types.sort(); + + // Transforms ['lorem', 'ipsum'] into 'a lorem, or an ipsum' + var str = types.map(function (t, index) { + var art = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(t.charAt(0)) ? 'an' : 'a'; + var or = types.length > 1 && index === types.length - 1 ? 'or ' : ''; + return or + art + ' ' + t; + }).join(', '); + + var objType = type(obj).toLowerCase(); + + if (!types.some(function (expected) { return objType === expected; })) { + throw new AssertionError( + flagMsg + 'object tested must be ' + str + ', but ' + objType + ' given', + undefined, + ssfi + ); + } +}; + + +/***/ }), + +/***/ 36982: +/***/ ((module) => { + +/*! + * Chai - flag utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .flag(object, key, [value]) + * + * Get or set a flag value on an object. If a + * value is provided it will be set, else it will + * return the currently set value or `undefined` if + * the value is not set. + * + * utils.flag(this, 'foo', 'bar'); // setter + * utils.flag(this, 'foo'); // getter, returns `bar` + * + * @param {Object} object constructed Assertion + * @param {String} key + * @param {Mixed} value (optional) + * @namespace Utils + * @name flag + * @api private + */ + +module.exports = function flag(obj, key, value) { + var flags = obj.__flags || (obj.__flags = Object.create(null)); + if (arguments.length === 3) { + flags[key] = value; + } else { + return flags[key]; + } +}; + + +/***/ }), + +/***/ 319: +/***/ ((module) => { + +/*! + * Chai - getActual utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .getActual(object, [actual]) + * + * Returns the `actual` value for an Assertion. + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + * @namespace Utils + * @name getActual + */ + +module.exports = function getActual(obj, args) { + return args.length > 4 ? args[4] : obj._obj; +}; + + +/***/ }), + +/***/ 26364: +/***/ ((module) => { + +/*! + * Chai - getEnumerableProperties utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .getEnumerableProperties(object) + * + * This allows the retrieval of enumerable property names of an object, + * inherited or not. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getEnumerableProperties + * @api public + */ + +module.exports = function getEnumerableProperties(object) { + var result = []; + for (var name in object) { + result.push(name); + } + return result; +}; + + +/***/ }), + +/***/ 90103: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - message composition utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var flag = __nccwpck_require__(36982) + , getActual = __nccwpck_require__(319) + , objDisplay = __nccwpck_require__(72856); + +/** + * ### .getMessage(object, message, negateMessage) + * + * Construct the error message based on flags + * and template tags. Template tags will return + * a stringified inspection of the object referenced. + * + * Message template tags: + * - `#{this}` current asserted object + * - `#{act}` actual value + * - `#{exp}` expected value + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + * @namespace Utils + * @name getMessage + * @api public + */ + +module.exports = function getMessage(obj, args) { + var negate = flag(obj, 'negate') + , val = flag(obj, 'object') + , expected = args[3] + , actual = getActual(obj, args) + , msg = negate ? args[2] : args[1] + , flagMsg = flag(obj, 'message'); + + if(typeof msg === "function") msg = msg(); + msg = msg || ''; + msg = msg + .replace(/#\{this\}/g, function () { return objDisplay(val); }) + .replace(/#\{act\}/g, function () { return objDisplay(actual); }) + .replace(/#\{exp\}/g, function () { return objDisplay(expected); }); + + return flagMsg ? flagMsg + ': ' + msg : msg; +}; + + +/***/ }), + +/***/ 22450: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - getOwnEnumerableProperties utility + * Copyright(c) 2011-2016 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var getOwnEnumerablePropertySymbols = __nccwpck_require__(12539); + +/** + * ### .getOwnEnumerableProperties(object) + * + * This allows the retrieval of directly-owned enumerable property names and + * symbols of an object. This function is necessary because Object.keys only + * returns enumerable property names, not enumerable property symbols. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getOwnEnumerableProperties + * @api public + */ + +module.exports = function getOwnEnumerableProperties(obj) { + return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj)); +}; + + +/***/ }), + +/***/ 12539: +/***/ ((module) => { + +/*! + * Chai - getOwnEnumerablePropertySymbols utility + * Copyright(c) 2011-2016 Jake Luer + * MIT Licensed + */ + +/** + * ### .getOwnEnumerablePropertySymbols(object) + * + * This allows the retrieval of directly-owned enumerable property symbols of an + * object. This function is necessary because Object.getOwnPropertySymbols + * returns both enumerable and non-enumerable property symbols. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getOwnEnumerablePropertySymbols + * @api public + */ + +module.exports = function getOwnEnumerablePropertySymbols(obj) { + if (typeof Object.getOwnPropertySymbols !== 'function') return []; + + return Object.getOwnPropertySymbols(obj).filter(function (sym) { + return Object.getOwnPropertyDescriptor(obj, sym).enumerable; + }); +}; + + +/***/ }), + +/***/ 15710: +/***/ ((module) => { + +/*! + * Chai - getProperties utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .getProperties(object) + * + * This allows the retrieval of property names of an object, enumerable or not, + * inherited or not. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getProperties + * @api public + */ + +module.exports = function getProperties(object) { + var result = Object.getOwnPropertyNames(object); + + function addProperty(property) { + if (result.indexOf(property) === -1) { + result.push(property); + } + } + + var proto = Object.getPrototypeOf(object); + while (proto !== null) { + Object.getOwnPropertyNames(proto).forEach(addProperty); + proto = Object.getPrototypeOf(proto); + } + + return result; +}; + + +/***/ }), + +/***/ 73890: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +/*! + * chai + * Copyright(c) 2011 Jake Luer + * MIT Licensed + */ + +/*! + * Dependencies that are used for multiple exports are required here only once + */ + +var pathval = __nccwpck_require__(26401); + +/*! + * test utility + */ + +exports.test = __nccwpck_require__(58782); + +/*! + * type utility + */ + +exports.type = __nccwpck_require__(4919); + +/*! + * expectTypes utility + */ +exports.expectTypes = __nccwpck_require__(4642); + +/*! + * message utility + */ + +exports.getMessage = __nccwpck_require__(90103); + +/*! + * actual utility + */ + +exports.getActual = __nccwpck_require__(319); + +/*! + * Inspect util + */ + +exports.inspect = __nccwpck_require__(72414); + +/*! + * Object Display util + */ + +exports.objDisplay = __nccwpck_require__(72856); + +/*! + * Flag utility + */ + +exports.flag = __nccwpck_require__(36982); + +/*! + * Flag transferring utility + */ + +exports.transferFlags = __nccwpck_require__(58745); + +/*! + * Deep equal utility + */ + +exports.eql = __nccwpck_require__(3588); + +/*! + * Deep path info + */ + +exports.getPathInfo = pathval.getPathInfo; + +/*! + * Check if a property exists + */ + +exports.hasProperty = pathval.hasProperty; + +/*! + * Function name + */ + +exports.getName = __nccwpck_require__(21144); + +/*! + * add Property + */ + +exports.addProperty = __nccwpck_require__(65318); + +/*! + * add Method + */ + +exports.addMethod = __nccwpck_require__(45808); + +/*! + * overwrite Property + */ + +exports.overwriteProperty = __nccwpck_require__(20834); + +/*! + * overwrite Method + */ + +exports.overwriteMethod = __nccwpck_require__(71143); + +/*! + * Add a chainable method + */ + +exports.addChainableMethod = __nccwpck_require__(30647); + +/*! + * Overwrite chainable method + */ + +exports.overwriteChainableMethod = __nccwpck_require__(30153); + +/*! + * Compare by inspect method + */ + +exports.compareByInspect = __nccwpck_require__(30428); + +/*! + * Get own enumerable property symbols method + */ + +exports.getOwnEnumerablePropertySymbols = __nccwpck_require__(12539); + +/*! + * Get own enumerable properties method + */ + +exports.getOwnEnumerableProperties = __nccwpck_require__(22450); + +/*! + * Checks error against a given set of criteria + */ + +exports.checkError = __nccwpck_require__(54015); + +/*! + * Proxify util + */ + +exports.proxify = __nccwpck_require__(67034); + +/*! + * addLengthGuard util + */ + +exports.addLengthGuard = __nccwpck_require__(45664); + +/*! + * isProxyEnabled helper + */ + +exports.isProxyEnabled = __nccwpck_require__(86121); + +/*! + * isNaN method + */ + +exports.isNaN = __nccwpck_require__(52708); + + +/***/ }), + +/***/ 72414: +/***/ ((module, exports, __nccwpck_require__) => { + +// This is (almost) directly from Node.js utils +// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js + +var getName = __nccwpck_require__(21144); +var getProperties = __nccwpck_require__(15710); +var getEnumerableProperties = __nccwpck_require__(26364); +var config = __nccwpck_require__(35072); + +module.exports = inspect; + +/** + * ### .inspect(obj, [showHidden], [depth], [colors]) + * + * Echoes the value of a value. Tries to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Boolean} showHidden Flag that shows hidden (not enumerable) + * properties of objects. Default is false. + * @param {Number} depth Depth in which to descend in object. Default is 2. + * @param {Boolean} colors Flag to turn on ANSI escape codes to color the + * output. Default is false (no coloring). + * @namespace Utils + * @name inspect + */ +function inspect(obj, showHidden, depth, colors) { + var ctx = { + showHidden: showHidden, + seen: [], + stylize: function (str) { return str; } + }; + return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth)); +} + +// Returns true if object is a DOM element. +var isDOMElement = function (object) { + if (typeof HTMLElement === 'object') { + return object instanceof HTMLElement; + } else { + return object && + typeof object === 'object' && + 'nodeType' in object && + object.nodeType === 1 && + typeof object.nodeName === 'string'; + } +}; + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (value && typeof value.inspect === 'function' && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (typeof ret !== 'string') { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // If this is a DOM element, try to get the outer HTML. + if (isDOMElement(value)) { + if ('outerHTML' in value) { + return value.outerHTML; + // This value does not have an outerHTML attribute, + // it could still be an XML element + } else { + // Attempt to serialize it + try { + if (document.xmlVersion) { + var xmlSerializer = new XMLSerializer(); + return xmlSerializer.serializeToString(value); + } else { + // Firefox 11- do not support outerHTML + // It does, however, support innerHTML + // Use the following to render the element + var ns = "http://www.w3.org/1999/xhtml"; + var container = document.createElementNS(ns, '_'); + + container.appendChild(value.cloneNode(false)); + var html = container.innerHTML + .replace('><', '>' + value.innerHTML + '<'); + container.innerHTML = ''; + return html; + } + } catch (err) { + // This could be a non-native DOM implementation, + // continue with the normal flow: + // printing the element as if it is an object. + } + } + } + + // Look up the keys of the object. + var visibleKeys = getEnumerableProperties(value); + var keys = ctx.showHidden ? getProperties(value) : visibleKeys; + + var name, nameSuffix; + + // Some type of object without properties can be shortcut. + // In IE, errors have a single `stack` property, or if they are vanilla `Error`, + // a `stack` plus `description` property; ignore those for consistency. + if (keys.length === 0 || (isError(value) && ( + (keys.length === 1 && keys[0] === 'stack') || + (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack') + ))) { + if (typeof value === 'function') { + name = getName(value); + nameSuffix = name ? ': ' + name : ''; + return ctx.stylize('[Function' + nameSuffix + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toUTCString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '' + , array = false + , typedArray = false + , braces = ['{', '}']; + + if (isTypedArray(value)) { + typedArray = true; + braces = ['[', ']']; + } + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (typeof value === 'function') { + name = getName(value); + nameSuffix = name ? ': ' + name : ''; + base = ' [Function' + nameSuffix + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + return formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else if (typedArray) { + return formatTypedArray(value); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + +function formatPrimitive(ctx, value) { + switch (typeof value) { + case 'undefined': + return ctx.stylize('undefined', 'undefined'); + + case 'string': + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + + case 'number': + if (value === 0 && (1/value) === -Infinity) { + return ctx.stylize('-0', 'number'); + } + return ctx.stylize('' + value, 'number'); + + case 'boolean': + return ctx.stylize('' + value, 'boolean'); + + case 'symbol': + return ctx.stylize(value.toString(), 'symbol'); + } + // For some reason typeof null is "object", so special case here. + if (value === null) { + return ctx.stylize('null', 'null'); + } +} + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (Object.prototype.hasOwnProperty.call(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + +function formatTypedArray(value) { + var str = '[ '; + + for (var i = 0; i < value.length; ++i) { + if (str.length >= config.truncateThreshold - 7) { + str += '...'; + break; + } + str += value[i] + ', '; + } + str += ' ]'; + + // Removing trailing `, ` if the array was not truncated + if (str.indexOf(', ]') !== -1) { + str = str.replace(', ]', ' ]'); + } + + return str; +} + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name; + var propDescriptor = Object.getOwnPropertyDescriptor(value, key); + var str; + + if (propDescriptor) { + if (propDescriptor.get) { + if (propDescriptor.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (propDescriptor.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + } + if (visibleKeys.indexOf(key) < 0) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(value[key]) < 0) { + if (recurseTimes === null) { + str = formatValue(ctx, value[key], null); + } else { + str = formatValue(ctx, value[key], recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (typeof name === 'undefined') { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + +function reduceToSingleString(output, base, braces) { + var length = output.reduce(function(prev, cur) { + return prev + cur.length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + +function isTypedArray(ar) { + // Unfortunately there's no way to check if an object is a TypedArray + // We have to check if it's one of these types + return (typeof ar === 'object' && /\w+Array]$/.test(objectToString(ar))); +} + +function isArray(ar) { + return Array.isArray(ar) || + (typeof ar === 'object' && objectToString(ar) === '[object Array]'); +} + +function isRegExp(re) { + return typeof re === 'object' && objectToString(re) === '[object RegExp]'; +} + +function isDate(d) { + return typeof d === 'object' && objectToString(d) === '[object Date]'; +} + +function isError(e) { + return typeof e === 'object' && objectToString(e) === '[object Error]'; +} + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +/***/ }), + +/***/ 52708: +/***/ ((module) => { + +/*! + * Chai - isNaN utility + * Copyright(c) 2012-2015 Sakthipriyan Vairamani + * MIT Licensed + */ + +/** + * ### .isNaN(value) + * + * Checks if the given value is NaN or not. + * + * utils.isNaN(NaN); // true + * + * @param {Value} The value which has to be checked if it is NaN + * @name isNaN + * @api private + */ + +function isNaN(value) { + // Refer http://www.ecma-international.org/ecma-262/6.0/#sec-isnan-number + // section's NOTE. + return value !== value; +} + +// If ECMAScript 6's Number.isNaN is present, prefer that. +module.exports = Number.isNaN || isNaN; + + +/***/ }), + +/***/ 86121: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var config = __nccwpck_require__(35072); + +/*! + * Chai - isProxyEnabled helper + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .isProxyEnabled() + * + * Helper function to check if Chai's proxy protection feature is enabled. If + * proxies are unsupported or disabled via the user's Chai config, then return + * false. Otherwise, return true. + * + * @namespace Utils + * @name isProxyEnabled + */ + +module.exports = function isProxyEnabled() { + return config.useProxy && + typeof Proxy !== 'undefined' && + typeof Reflect !== 'undefined'; +}; + + +/***/ }), + +/***/ 72856: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - flag utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var inspect = __nccwpck_require__(72414); +var config = __nccwpck_require__(35072); + +/** + * ### .objDisplay(object) + * + * Determines if an object or an array matches + * criteria to be inspected in-line for error + * messages or should be truncated. + * + * @param {Mixed} javascript object to inspect + * @name objDisplay + * @namespace Utils + * @api public + */ + +module.exports = function objDisplay(obj) { + var str = inspect(obj) + , type = Object.prototype.toString.call(obj); + + if (config.truncateThreshold && str.length >= config.truncateThreshold) { + if (type === '[object Function]') { + return !obj.name || obj.name === '' + ? '[Function]' + : '[Function: ' + obj.name + ']'; + } else if (type === '[object Array]') { + return '[ Array(' + obj.length + ') ]'; + } else if (type === '[object Object]') { + var keys = Object.keys(obj) + , kstr = keys.length > 2 + ? keys.splice(0, 2).join(', ') + ', ...' + : keys.join(', '); + return '{ Object (' + kstr + ') }'; + } else { + return str; + } + } else { + return str; + } +}; + + +/***/ }), + +/***/ 30153: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - overwriteChainableMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var chai = __nccwpck_require__(6343); +var transferFlags = __nccwpck_require__(58745); + +/** + * ### .overwriteChainableMethod(ctx, name, method, chainingBehavior) + * + * Overwrites an already existing chainable method + * and provides access to the previous function or + * property. Must return functions to be used for + * name. + * + * utils.overwriteChainableMethod(chai.Assertion.prototype, 'lengthOf', + * function (_super) { + * } + * , function (_super) { + * } + * ); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteChainableMethod('foo', fn, fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.have.lengthOf(3); + * expect(myFoo).to.have.lengthOf.above(3); + * + * @param {Object} ctx object whose method / property is to be overwritten + * @param {String} name of method / property to overwrite + * @param {Function} method function that returns a function to be used for name + * @param {Function} chainingBehavior function that returns a function to be used for property + * @namespace Utils + * @name overwriteChainableMethod + * @api public + */ + +module.exports = function overwriteChainableMethod(ctx, name, method, chainingBehavior) { + var chainableBehavior = ctx.__methods[name]; + + var _chainingBehavior = chainableBehavior.chainingBehavior; + chainableBehavior.chainingBehavior = function overwritingChainableMethodGetter() { + var result = chainingBehavior(_chainingBehavior).call(this); + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; + + var _method = chainableBehavior.method; + chainableBehavior.method = function overwritingChainableMethodWrapper() { + var result = method(_method).apply(this, arguments); + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; +}; + + +/***/ }), + +/***/ 71143: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - overwriteMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var addLengthGuard = __nccwpck_require__(45664); +var chai = __nccwpck_require__(6343); +var flag = __nccwpck_require__(36982); +var proxify = __nccwpck_require__(67034); +var transferFlags = __nccwpck_require__(58745); + +/** + * ### .overwriteMethod(ctx, name, fn) + * + * Overwrites an already existing method and provides + * access to previous function. Must return function + * to be used for name. + * + * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { + * return function (str) { + * var obj = utils.flag(this, 'object'); + * if (obj instanceof Foo) { + * new chai.Assertion(obj.value).to.equal(str); + * } else { + * _super.apply(this, arguments); + * } + * } + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteMethod('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.equal('bar'); + * + * @param {Object} ctx object whose method is to be overwritten + * @param {String} name of method to overwrite + * @param {Function} method function that returns a function to be used for name + * @namespace Utils + * @name overwriteMethod + * @api public + */ + +module.exports = function overwriteMethod(ctx, name, method) { + var _method = ctx[name] + , _super = function () { + throw new Error(name + ' is not a function'); + }; + + if (_method && 'function' === typeof _method) + _super = _method; + + var overwritingMethodWrapper = function () { + // Setting the `ssfi` flag to `overwritingMethodWrapper` causes this + // function to be the starting point for removing implementation frames from + // the stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if the + // `lockSsfi` flag isn't set. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked from + // inside of another assertion. In the first case, the `ssfi` flag has + // already been set by the overwriting assertion. In the second case, the + // `ssfi` flag has already been set by the outer assertion. + if (!flag(this, 'lockSsfi')) { + flag(this, 'ssfi', overwritingMethodWrapper); + } + + // Setting the `lockSsfi` flag to `true` prevents the overwritten assertion + // from changing the `ssfi` flag. By this point, the `ssfi` flag is already + // set to the correct starting point for this assertion. + var origLockSsfi = flag(this, 'lockSsfi'); + flag(this, 'lockSsfi', true); + var result = method(_super).apply(this, arguments); + flag(this, 'lockSsfi', origLockSsfi); + + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + } + + addLengthGuard(overwritingMethodWrapper, name, false); + ctx[name] = proxify(overwritingMethodWrapper, name); +}; + + +/***/ }), + +/***/ 20834: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - overwriteProperty utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var chai = __nccwpck_require__(6343); +var flag = __nccwpck_require__(36982); +var isProxyEnabled = __nccwpck_require__(86121); +var transferFlags = __nccwpck_require__(58745); + +/** + * ### .overwriteProperty(ctx, name, fn) + * + * Overwrites an already existing property getter and provides + * access to previous value. Must return function to use as getter. + * + * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { + * return function () { + * var obj = utils.flag(this, 'object'); + * if (obj instanceof Foo) { + * new chai.Assertion(obj.name).to.equal('bar'); + * } else { + * _super.call(this); + * } + * } + * }); + * + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteProperty('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.be.ok; + * + * @param {Object} ctx object whose property is to be overwritten + * @param {String} name of property to overwrite + * @param {Function} getter function that returns a getter function to be used for name + * @namespace Utils + * @name overwriteProperty + * @api public + */ + +module.exports = function overwriteProperty(ctx, name, getter) { + var _get = Object.getOwnPropertyDescriptor(ctx, name) + , _super = function () {}; + + if (_get && 'function' === typeof _get.get) + _super = _get.get + + Object.defineProperty(ctx, name, + { get: function overwritingPropertyGetter() { + // Setting the `ssfi` flag to `overwritingPropertyGetter` causes this + // function to be the starting point for removing implementation frames + // from the stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if + // the `lockSsfi` flag isn't set and proxy protection is disabled. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked + // from inside of another assertion. In the first case, the `ssfi` flag + // has already been set by the overwriting assertion. In the second + // case, the `ssfi` flag has already been set by the outer assertion. + // + // If proxy protection is enabled, then the `ssfi` flag has already been + // set by the proxy getter. + if (!isProxyEnabled() && !flag(this, 'lockSsfi')) { + flag(this, 'ssfi', overwritingPropertyGetter); + } + + // Setting the `lockSsfi` flag to `true` prevents the overwritten + // assertion from changing the `ssfi` flag. By this point, the `ssfi` + // flag is already set to the correct starting point for this assertion. + var origLockSsfi = flag(this, 'lockSsfi'); + flag(this, 'lockSsfi', true); + var result = getter(_super).call(this); + flag(this, 'lockSsfi', origLockSsfi); + + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + } + , configurable: true + }); +}; + + +/***/ }), + +/***/ 67034: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var config = __nccwpck_require__(35072); +var flag = __nccwpck_require__(36982); +var getProperties = __nccwpck_require__(15710); +var isProxyEnabled = __nccwpck_require__(86121); + +/*! + * Chai - proxify utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .proxify(object) + * + * Return a proxy of given object that throws an error when a non-existent + * property is read. By default, the root cause is assumed to be a misspelled + * property, and thus an attempt is made to offer a reasonable suggestion from + * the list of existing properties. However, if a nonChainableMethodName is + * provided, then the root cause is instead a failure to invoke a non-chainable + * method prior to reading the non-existent property. + * + * If proxies are unsupported or disabled via the user's Chai config, then + * return object without modification. + * + * @param {Object} obj + * @param {String} nonChainableMethodName + * @namespace Utils + * @name proxify + */ + +var builtins = ['__flags', '__methods', '_obj', 'assert']; + +module.exports = function proxify(obj, nonChainableMethodName) { + if (!isProxyEnabled()) return obj; + + return new Proxy(obj, { + get: function proxyGetter(target, property) { + // This check is here because we should not throw errors on Symbol properties + // such as `Symbol.toStringTag`. + // The values for which an error should be thrown can be configured using + // the `config.proxyExcludedKeys` setting. + if (typeof property === 'string' && + config.proxyExcludedKeys.indexOf(property) === -1 && + !Reflect.has(target, property)) { + // Special message for invalid property access of non-chainable methods. + if (nonChainableMethodName) { + throw Error('Invalid Chai property: ' + nonChainableMethodName + '.' + + property + '. See docs for proper usage of "' + + nonChainableMethodName + '".'); + } + + // If the property is reasonably close to an existing Chai property, + // suggest that property to the user. Only suggest properties with a + // distance less than 4. + var suggestion = null; + var suggestionDistance = 4; + getProperties(target).forEach(function(prop) { + if ( + !Object.prototype.hasOwnProperty(prop) && + builtins.indexOf(prop) === -1 + ) { + var dist = stringDistanceCapped( + property, + prop, + suggestionDistance + ); + if (dist < suggestionDistance) { + suggestion = prop; + suggestionDistance = dist; + } + } + }); + + if (suggestion !== null) { + throw Error('Invalid Chai property: ' + property + + '. Did you mean "' + suggestion + '"?'); + } else { + throw Error('Invalid Chai property: ' + property); + } + } + + // Use this proxy getter as the starting point for removing implementation + // frames from the stack trace of a failed assertion. For property + // assertions, this prevents the proxy getter from showing up in the stack + // trace since it's invoked before the property getter. For method and + // chainable method assertions, this flag will end up getting changed to + // the method wrapper, which is good since this frame will no longer be in + // the stack once the method is invoked. Note that Chai builtin assertion + // properties such as `__flags` are skipped since this is only meant to + // capture the starting point of an assertion. This step is also skipped + // if the `lockSsfi` flag is set, thus indicating that this assertion is + // being called from within another assertion. In that case, the `ssfi` + // flag is already set to the outer assertion's starting point. + if (builtins.indexOf(property) === -1 && !flag(target, 'lockSsfi')) { + flag(target, 'ssfi', proxyGetter); + } + + return Reflect.get(target, property); + } + }); +}; + +/** + * # stringDistanceCapped(strA, strB, cap) + * Return the Levenshtein distance between two strings, but no more than cap. + * @param {string} strA + * @param {string} strB + * @param {number} number + * @return {number} min(string distance between strA and strB, cap) + * @api private + */ + +function stringDistanceCapped(strA, strB, cap) { + if (Math.abs(strA.length - strB.length) >= cap) { + return cap; + } + + var memo = []; + // `memo` is a two-dimensional array containing distances. + // memo[i][j] is the distance between strA.slice(0, i) and + // strB.slice(0, j). + for (var i = 0; i <= strA.length; i++) { + memo[i] = Array(strB.length + 1).fill(0); + memo[i][0] = i; + } + for (var j = 0; j < strB.length; j++) { + memo[0][j] = j; + } + + for (var i = 1; i <= strA.length; i++) { + var ch = strA.charCodeAt(i - 1); + for (var j = 1; j <= strB.length; j++) { + if (Math.abs(i - j) >= cap) { + memo[i][j] = cap; + continue; + } + memo[i][j] = Math.min( + memo[i - 1][j] + 1, + memo[i][j - 1] + 1, + memo[i - 1][j - 1] + + (ch === strB.charCodeAt(j - 1) ? 0 : 1) + ); + } + } + + return memo[strA.length][strB.length]; +} + + +/***/ }), + +/***/ 58782: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * Chai - test utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var flag = __nccwpck_require__(36982); + +/** + * ### .test(object, expression) + * + * Test and object for expression. + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + * @namespace Utils + * @name test + */ + +module.exports = function test(obj, args) { + var negate = flag(obj, 'negate') + , expr = args[0]; + return negate ? !expr : expr; +}; + + +/***/ }), + +/***/ 58745: +/***/ ((module) => { + +/*! + * Chai - transferFlags utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .transferFlags(assertion, object, includeAll = true) + * + * Transfer all the flags for `assertion` to `object`. If + * `includeAll` is set to `false`, then the base Chai + * assertion flags (namely `object`, `ssfi`, `lockSsfi`, + * and `message`) will not be transferred. + * + * + * var newAssertion = new Assertion(); + * utils.transferFlags(assertion, newAssertion); + * + * var anotherAssertion = new Assertion(myObj); + * utils.transferFlags(assertion, anotherAssertion, false); + * + * @param {Assertion} assertion the assertion to transfer the flags from + * @param {Object} object the object to transfer the flags to; usually a new assertion + * @param {Boolean} includeAll + * @namespace Utils + * @name transferFlags + * @api private + */ + +module.exports = function transferFlags(assertion, object, includeAll) { + var flags = assertion.__flags || (assertion.__flags = Object.create(null)); + + if (!object.__flags) { + object.__flags = Object.create(null); + } + + includeAll = arguments.length === 3 ? includeAll : true; + + for (var flag in flags) { + if (includeAll || + (flag !== 'object' && flag !== 'ssfi' && flag !== 'lockSsfi' && flag != 'message')) { + object.__flags[flag] = flags[flag]; + } + } +}; + + +/***/ }), + +/***/ 16734: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +/* module decorator */ module = __nccwpck_require__.nmd(module); + + +const wrapAnsi16 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => (...args) => { + const rgb = fn(...args); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +const ansi2ansi = n => n; +const rgb2rgb = (r, g, b) => [r, g, b]; + +const setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + + return value; + }, + enumerable: true, + configurable: true + }); +}; + +/** @type {typeof import('color-convert')} */ +let colorConvert; +const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === undefined) { + colorConvert = __nccwpck_require__(45121); + } + + const offset = isBackground ? 10 : 0; + const styles = {}; + + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === 'object') { + styles[name] = wrap(suite[targetSpace], offset); + } + } + + return styles; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Alias bright black as gray (and grey) + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); + setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); + + +/***/ }), + +/***/ 68159: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* MIT license */ +/* eslint-disable no-mixed-operators */ +const cssKeywords = __nccwpck_require__(24057); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +const reverseKeywords = {}; +for (const key of Object.keys(cssKeywords)) { + reverseKeywords[cssKeywords[key]] = key; +} + +const convert = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +module.exports = convert; + +// Hide .channels and .labels properties +for (const model of Object.keys(convert)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + const {channels, labels} = convert[model]; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); +} + +convert.rgb.hsl = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const min = Math.min(r, g, b); + const max = Math.max(r, g, b); + const delta = max - min; + let h; + let s; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + const l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + let rdif; + let gdif; + let bdif; + let h; + let s; + + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const v = Math.max(r, g, b); + const diff = v - Math.min(r, g, b); + const diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = 0; + s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + const r = rgb[0]; + const g = rgb[1]; + let b = rgb[2]; + const h = convert.rgb.hsl(rgb)[0]; + const w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + + const k = Math.min(1 - r, 1 - g, 1 - b); + const c = (1 - r - k) / (1 - k) || 0; + const m = (1 - g - k) / (1 - k) || 0; + const y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +function comparativeDistance(x, y) { + /* + See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + */ + return ( + ((x[0] - y[0]) ** 2) + + ((x[1] - y[1]) ** 2) + + ((x[2] - y[2]) ** 2) + ); +} + +convert.rgb.keyword = function (rgb) { + const reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + let currentClosestDistance = Infinity; + let currentClosestKeyword; + + for (const keyword of Object.keys(cssKeywords)) { + const value = cssKeywords[keyword]; + + // Compute comparative distance + const distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + let r = rgb[0] / 255; + let g = rgb[1] / 255; + let b = rgb[2] / 255; + + // Assume sRGB + r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); + g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); + b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); + + const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + const xyz = convert.rgb.xyz(rgb); + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + const h = hsl[0] / 360; + const s = hsl[1] / 100; + const l = hsl[2] / 100; + let t2; + let t3; + let val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + const t1 = 2 * l - t2; + + const rgb = [0, 0, 0]; + for (let i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + const h = hsl[0]; + let s = hsl[1] / 100; + let l = hsl[2] / 100; + let smin = s; + const lmin = Math.max(l, 0.01); + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + const v = (l + s) / 2; + const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + const h = hsv[0] / 60; + const s = hsv[1] / 100; + let v = hsv[2] / 100; + const hi = Math.floor(h) % 6; + + const f = h - Math.floor(h); + const p = 255 * v * (1 - s); + const q = 255 * v * (1 - (s * f)); + const t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + const h = hsv[0]; + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const vmin = Math.max(v, 0.01); + let sl; + let l; + + l = (2 - s) * v; + const lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + const h = hwb[0] / 360; + let wh = hwb[1] / 100; + let bl = hwb[2] / 100; + const ratio = wh + bl; + let f; + + // Wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + const i = Math.floor(6 * h); + const v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + const n = wh + f * (v - wh); // Linear interpolation + + let r; + let g; + let b; + /* eslint-disable max-statements-per-line,no-multi-spaces */ + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + /* eslint-enable max-statements-per-line,no-multi-spaces */ + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + const c = cmyk[0] / 100; + const m = cmyk[1] / 100; + const y = cmyk[2] / 100; + const k = cmyk[3] / 100; + + const r = 1 - Math.min(1, c * (1 - k) + k); + const g = 1 - Math.min(1, m * (1 - k) + k); + const b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + const x = xyz[0] / 100; + const y = xyz[1] / 100; + const z = xyz[2] / 100; + let r; + let g; + let b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // Assume sRGB + r = r > 0.0031308 + ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let x; + let y; + let z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + const y2 = y ** 3; + const x2 = x ** 3; + const z2 = z ** 3; + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let h; + + const hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + const c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + const l = lch[0]; + const c = lch[1]; + const h = lch[2]; + + const hr = h / 360 * 2 * Math.PI; + const a = c * Math.cos(hr); + const b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args, saturation = null) { + const [r, g, b] = args; + let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + let ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // Optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + const r = args[0]; + const g = args[1]; + const b = args[2]; + + // We use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + const ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + let color = args % 10; + + // Handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + const mult = (~~(args > 50) + 1) * 0.5; + const r = ((color & 1) * mult) * 255; + const g = (((color >> 1) & 1) * mult) * 255; + const b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // Handle greyscale + if (args >= 232) { + const c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + let rem; + const r = Math.floor(args / 36) / 5 * 255; + const g = Math.floor((rem = args % 36) / 6) / 5 * 255; + const b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + const integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + let colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(char => { + return char + char; + }).join(''); + } + + const integer = parseInt(colorString, 16); + const r = (integer >> 16) & 0xFF; + const g = (integer >> 8) & 0xFF; + const b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const max = Math.max(Math.max(r, g), b); + const min = Math.min(Math.min(r, g), b); + const chroma = (max - min); + let grayscale; + let hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + const s = hsl[1] / 100; + const l = hsl[2] / 100; + + const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); + + let f = 0; + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + const s = hsv[1] / 100; + const v = hsv[2] / 100; + + const c = s * v; + let f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + const h = hcg[0] / 360; + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + const pure = [0, 0, 0]; + const hi = (h % 1) * 6; + const v = hi % 1; + const w = 1 - v; + let mg = 0; + + /* eslint-disable max-statements-per-line */ + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + /* eslint-enable max-statements-per-line */ + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const v = c + g * (1.0 - c); + let f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const l = g * (1.0 - c) + 0.5 * c; + let s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + const w = hwb[1] / 100; + const b = hwb[2] / 100; + const v = 1 - b; + const c = v - w; + let g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hsv = convert.gray.hsl; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + const val = Math.round(gray[0] / 100 * 255) & 0xFF; + const integer = (val << 16) + (val << 8) + val; + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + const val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; + + +/***/ }), + +/***/ 45121: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const conversions = __nccwpck_require__(68159); +const route = __nccwpck_require__(24663); + +const convert = {}; + +const models = Object.keys(conversions); + +function wrapRaw(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + return fn(args); + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + const result = fn(args); + + // We're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (let len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(fromModel => { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + const routes = route(fromModel); + const routeModels = Object.keys(routes); + + routeModels.forEach(toModel => { + const fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; + + +/***/ }), + +/***/ 24663: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const conversions = __nccwpck_require__(68159); + +/* + This function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + const graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + const models = Object.keys(conversions); + + for (let len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + const graph = buildGraph(); + const queue = [fromModel]; // Unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + const current = queue.pop(); + const adjacents = Object.keys(conversions[current]); + + for (let len = adjacents.length, i = 0; i < len; i++) { + const adjacent = adjacents[i]; + const node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + const path = [graph[toModel].parent, toModel]; + let fn = conversions[graph[toModel].parent][toModel]; + + let cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +module.exports = function (fromModel) { + const graph = deriveBFS(fromModel); + const conversion = {}; + + const models = Object.keys(graph); + for (let len = models.length, i = 0; i < len; i++) { + const toModel = models[i]; + const node = graph[toModel]; + + if (node.parent === null) { + // No possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + + + +/***/ }), + +/***/ 24057: +/***/ ((module) => { + +"use strict"; + + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + + +/***/ }), + +/***/ 78818: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const ansiStyles = __nccwpck_require__(16734); +const {stdout: stdoutColor, stderr: stderrColor} = __nccwpck_require__(59318); +const { + stringReplaceAll, + stringEncaseCRLFWithFirstIndex +} = __nccwpck_require__(82415); + +const {isArray} = Array; + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = [ + 'ansi', + 'ansi', + 'ansi256', + 'ansi16m' +]; + +const styles = Object.create(null); + +const applyOptions = (object, options = {}) => { + if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { + throw new Error('The `level` option should be an integer from 0 to 3'); + } + + // Detect level if not set manually + const colorLevel = stdoutColor ? stdoutColor.level : 0; + object.level = options.level === undefined ? colorLevel : options.level; +}; + +class ChalkClass { + constructor(options) { + // eslint-disable-next-line no-constructor-return + return chalkFactory(options); + } +} + +const chalkFactory = options => { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_); + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = () => { + throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.'); + }; + + chalk.template.Instance = ChalkClass; + + return chalk.template; +}; + +function Chalk(options) { + return chalkFactory(options); +} + +for (const [styleName, style] of Object.entries(ansiStyles)) { + styles[styleName] = { + get() { + const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); + Object.defineProperty(this, styleName, {value: builder}); + return builder; + } + }; +} + +styles.visible = { + get() { + const builder = createBuilder(this, this._styler, true); + Object.defineProperty(this, 'visible', {value: builder}); + return builder; + } +}; + +const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256']; + +for (const model of usedModels) { + styles[model] = { + get() { + const {level} = this; + return function (...arguments_) { + const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); + return createBuilder(this, styler, this._isEmpty); + }; + } + }; +} + +for (const model of usedModels) { + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const {level} = this; + return function (...arguments_) { + const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); + return createBuilder(this, styler, this._isEmpty); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, { + ...styles, + level: { + enumerable: true, + get() { + return this._generator.level; + }, + set(level) { + this._generator.level = level; + } + } +}); + +const createStyler = (open, close, parent) => { + let openAll; + let closeAll; + if (parent === undefined) { + openAll = open; + closeAll = close; + } else { + openAll = parent.openAll + open; + closeAll = close + parent.closeAll; + } + + return { + open, + close, + openAll, + closeAll, + parent + }; +}; + +const createBuilder = (self, _styler, _isEmpty) => { + const builder = (...arguments_) => { + if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) { + // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}` + return applyStyle(builder, chalkTag(builder, ...arguments_)); + } + + // Single argument is hot path, implicit coercion is faster than anything + // eslint-disable-next-line no-implicit-coercion + return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' ')); + }; + + // We alter the prototype because we must return a function, but there is + // no way to create a function with a different prototype + Object.setPrototypeOf(builder, proto); + + builder._generator = self; + builder._styler = _styler; + builder._isEmpty = _isEmpty; + + return builder; +}; + +const applyStyle = (self, string) => { + if (self.level <= 0 || !string) { + return self._isEmpty ? '' : string; + } + + let styler = self._styler; + + if (styler === undefined) { + return string; + } + + const {openAll, closeAll} = styler; + if (string.indexOf('\u001B') !== -1) { + while (styler !== undefined) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + string = stringReplaceAll(string, styler.close, styler.open); + + styler = styler.parent; + } + } + + // We can move both next actions out of loop, because remaining actions in loop won't have + // any/visible effect on parts we add here. Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92 + const lfIndex = string.indexOf('\n'); + if (lfIndex !== -1) { + string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); + } + + return openAll + string + closeAll; +}; + +let template; +const chalkTag = (chalk, ...strings) => { + const [firstString] = strings; + + if (!isArray(firstString) || !isArray(firstString.raw)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return strings.join(' '); + } + + const arguments_ = strings.slice(1); + const parts = [firstString.raw[0]]; + + for (let i = 1; i < firstString.length; i++) { + parts.push( + String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'), + String(firstString.raw[i]) + ); + } + + if (template === undefined) { + template = __nccwpck_require__(20500); + } + + return template(chalk, parts.join('')); +}; + +Object.defineProperties(Chalk.prototype, styles); + +const chalk = Chalk(); // eslint-disable-line new-cap +chalk.supportsColor = stdoutColor; +chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap +chalk.stderr.supportsColor = stderrColor; + +module.exports = chalk; + + +/***/ }), + +/***/ 20500: +/***/ ((module) => { + +"use strict"; + +const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; +const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; +const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; +const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; + +const ESCAPES = new Map([ + ['n', '\n'], + ['r', '\r'], + ['t', '\t'], + ['b', '\b'], + ['f', '\f'], + ['v', '\v'], + ['0', '\0'], + ['\\', '\\'], + ['e', '\u001B'], + ['a', '\u0007'] +]); + +function unescape(c) { + const u = c[0] === 'u'; + const bracket = c[1] === '{'; + + if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + if (u && bracket) { + return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); + } + + return ESCAPES.get(c) || c; +} + +function parseArguments(name, arguments_) { + const results = []; + const chunks = arguments_.trim().split(/\s*,\s*/g); + let matches; + + for (const chunk of chunks) { + const number = Number(chunk); + if (!Number.isNaN(number)) { + results.push(number); + } else if ((matches = chunk.match(STRING_REGEX))) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + + return results; +} + +function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + + const results = []; + let matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + + if (matches[2]) { + const args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; +} + +function buildStyle(chalk, styles) { + const enabled = {}; + + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + + let current = chalk; + for (const [styleName, styles] of Object.entries(enabled)) { + if (!Array.isArray(styles)) { + continue; + } + + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + + current = styles.length > 0 ? current[styleName](...styles) : current[styleName]; + } + + return current; +} + +module.exports = (chalk, temporary) => { + const styles = []; + const chunks = []; + let chunk = []; + + // eslint-disable-next-line max-params + temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { + if (escapeCharacter) { + chunk.push(unescape(escapeCharacter)); + } else if (style) { + const string = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); + styles.push({inverse, styles: parseStyle(style)}); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(character); + } + }); + + chunks.push(chunk.join('')); + + if (styles.length > 0) { + const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMessage); + } + + return chunks.join(''); +}; + + +/***/ }), + +/***/ 82415: +/***/ ((module) => { + +"use strict"; + + +const stringReplaceAll = (string, substring, replacer) => { + let index = string.indexOf(substring); + if (index === -1) { + return string; + } + + const substringLength = substring.length; + let endIndex = 0; + let returnValue = ''; + do { + returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; + endIndex = index + substringLength; + index = string.indexOf(substring, endIndex); + } while (index !== -1); + + returnValue += string.substr(endIndex); + return returnValue; +}; + +const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { + let endIndex = 0; + let returnValue = ''; + do { + const gotCR = string[index - 1] === '\r'; + returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix; + endIndex = index + 1; + index = string.indexOf('\n', endIndex); + } while (index !== -1); + + returnValue += string.substr(endIndex); + return returnValue; +}; + +module.exports = { + stringReplaceAll, + stringEncaseCRLFWithFirstIndex +}; + + +/***/ }), + +/***/ 54015: +/***/ ((module) => { + +"use strict"; + + +/* ! + * Chai - checkError utility + * Copyright(c) 2012-2016 Jake Luer + * MIT Licensed + */ + +/** + * ### .checkError + * + * Checks that an error conforms to a given set of criteria and/or retrieves information about it. + * + * @api public + */ + +/** + * ### .compatibleInstance(thrown, errorLike) + * + * Checks if two instances are compatible (strict equal). + * Returns false if errorLike is not an instance of Error, because instances + * can only be compatible if they're both error instances. + * + * @name compatibleInstance + * @param {Error} thrown error + * @param {Error|ErrorConstructor} errorLike object to compare against + * @namespace Utils + * @api public + */ + +function compatibleInstance(thrown, errorLike) { + return errorLike instanceof Error && thrown === errorLike; +} + +/** + * ### .compatibleConstructor(thrown, errorLike) + * + * Checks if two constructors are compatible. + * This function can receive either an error constructor or + * an error instance as the `errorLike` argument. + * Constructors are compatible if they're the same or if one is + * an instance of another. + * + * @name compatibleConstructor + * @param {Error} thrown error + * @param {Error|ErrorConstructor} errorLike object to compare against + * @namespace Utils + * @api public + */ + +function compatibleConstructor(thrown, errorLike) { + if (errorLike instanceof Error) { + // If `errorLike` is an instance of any error we compare their constructors + return thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor; + } else if (errorLike.prototype instanceof Error || errorLike === Error) { + // If `errorLike` is a constructor that inherits from Error, we compare `thrown` to `errorLike` directly + return thrown.constructor === errorLike || thrown instanceof errorLike; + } + + return false; +} + +/** + * ### .compatibleMessage(thrown, errMatcher) + * + * Checks if an error's message is compatible with a matcher (String or RegExp). + * If the message contains the String or passes the RegExp test, + * it is considered compatible. + * + * @name compatibleMessage + * @param {Error} thrown error + * @param {String|RegExp} errMatcher to look for into the message + * @namespace Utils + * @api public + */ + +function compatibleMessage(thrown, errMatcher) { + var comparisonString = typeof thrown === 'string' ? thrown : thrown.message; + if (errMatcher instanceof RegExp) { + return errMatcher.test(comparisonString); + } else if (typeof errMatcher === 'string') { + return comparisonString.indexOf(errMatcher) !== -1; // eslint-disable-line no-magic-numbers + } + + return false; +} + +/** + * ### .getFunctionName(constructorFn) + * + * Returns the name of a function. + * This also includes a polyfill function if `constructorFn.name` is not defined. + * + * @name getFunctionName + * @param {Function} constructorFn + * @namespace Utils + * @api private + */ + +var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\(\/]+)/; +function getFunctionName(constructorFn) { + var name = ''; + if (typeof constructorFn.name === 'undefined') { + // Here we run a polyfill if constructorFn.name is not defined + var match = String(constructorFn).match(functionNameMatch); + if (match) { + name = match[1]; + } + } else { + name = constructorFn.name; + } + + return name; +} + +/** + * ### .getConstructorName(errorLike) + * + * Gets the constructor name for an Error instance or constructor itself. + * + * @name getConstructorName + * @param {Error|ErrorConstructor} errorLike + * @namespace Utils + * @api public + */ + +function getConstructorName(errorLike) { + var constructorName = errorLike; + if (errorLike instanceof Error) { + constructorName = getFunctionName(errorLike.constructor); + } else if (typeof errorLike === 'function') { + // If `err` is not an instance of Error it is an error constructor itself or another function. + // If we've got a common function we get its name, otherwise we may need to create a new instance + // of the error just in case it's a poorly-constructed error. Please see chaijs/chai/issues/45 to know more. + constructorName = getFunctionName(errorLike).trim() || + getFunctionName(new errorLike()); // eslint-disable-line new-cap + } + + return constructorName; +} + +/** + * ### .getMessage(errorLike) + * + * Gets the error message from an error. + * If `err` is a String itself, we return it. + * If the error has no message, we return an empty string. + * + * @name getMessage + * @param {Error|String} errorLike + * @namespace Utils + * @api public + */ + +function getMessage(errorLike) { + var msg = ''; + if (errorLike && errorLike.message) { + msg = errorLike.message; + } else if (typeof errorLike === 'string') { + msg = errorLike; + } + + return msg; +} + +module.exports = { + compatibleInstance: compatibleInstance, + compatibleConstructor: compatibleConstructor, + compatibleMessage: compatibleMessage, + getMessage: getMessage, + getConstructorName: getConstructorName, +}; + + +/***/ }), + +/***/ 53665: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +/* +The MIT License (MIT) + +Copyright (c) 2014 Matteo Collina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + + + +var leven = __nccwpck_require__(9232) + +function commist () { + var commands = [] + + function lookup (array) { + if (typeof array === 'string') { array = array.split(' ') } + + return commands.map(function (cmd) { + return cmd.match(array) + }).filter(function (match) { + return match.partsNotMatched === 0 + }).sort(function (a, b) { + if (a.inputNotMatched > b.inputNotMatched) { return 1 } + + if (a.inputNotMatched === b.inputNotMatched && a.totalDistance > b.totalDistance) { return 1 } + + return -1 + }).map(function (match) { + return match.cmd + }) + } + + function parse (args) { + var matching = lookup(args) + + if (matching.length > 0) { + matching[0].call(args) + + // return null if there is nothing left to do + return null + } + + return args + } + + function register (inputCommand, func) { + var commandOptions = { + command: inputCommand, + strict: false, + func: func + } + + if (typeof inputCommand === 'object') { + commandOptions = Object.assign(commandOptions, inputCommand) + } + + var matching = lookup(commandOptions.command) + + matching.forEach(function (match) { + if (match.string === commandOptions.command) { throw new Error('command already registered: ' + commandOptions.command) } + }) + + commands.push(new Command(commandOptions)) + + return this + } + + return { + register: register, + parse: parse, + lookup: lookup + } +} + +function Command (options) { + this.string = options.command + this.strict = options.strict + this.parts = this.string.split(' ') + this.length = this.parts.length + this.func = options.func + + this.parts.forEach(function (part) { + if (part.length < 3) { throw new Error('command words must be at least 3 chars: ' + options.command) } + }) +} + +Command.prototype.call = function call (argv) { + this.func(argv.slice(this.length)) +} + +Command.prototype.match = function match (string) { + return new CommandMatch(this, string) +} + +function CommandMatch (cmd, array) { + this.cmd = cmd + this.distances = cmd.parts.map(function (elem, i) { + if (array[i] !== undefined) { + if (cmd.strict) { + return elem === array[i] ? 0 : undefined + } else { + return leven(elem, array[i]) + } + } else { return undefined } + }).filter(function (distance, i) { + return distance !== undefined && distance < cmd.parts[i].length - 2 + }) + + this.partsNotMatched = cmd.length - this.distances.length + this.inputNotMatched = array.length - this.distances.length + this.totalDistance = this.distances.reduce(function (acc, i) { return acc + i }, 0) +} + +module.exports = commist + + +/***/ }), + +/***/ 86891: +/***/ ((module) => { + +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + + +/***/ }), + +/***/ 25107: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Writable = __nccwpck_require__(51642).Writable +var inherits = __nccwpck_require__(44124) +var bufferFrom = __nccwpck_require__(93018) + +if (typeof Uint8Array === 'undefined') { + var U8 = __nccwpck_require__(5027)/* .Uint8Array */ .U2 +} else { + var U8 = Uint8Array +} + +function ConcatStream(opts, cb) { + if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb) + + if (typeof opts === 'function') { + cb = opts + opts = {} + } + if (!opts) opts = {} + + var encoding = opts.encoding + var shouldInferEncoding = false + + if (!encoding) { + shouldInferEncoding = true + } else { + encoding = String(encoding).toLowerCase() + if (encoding === 'u8' || encoding === 'uint8') { + encoding = 'uint8array' + } + } + + Writable.call(this, { objectMode: true }) + + this.encoding = encoding + this.shouldInferEncoding = shouldInferEncoding + + if (cb) this.on('finish', function () { cb(this.getBody()) }) + this.body = [] +} + +module.exports = ConcatStream +inherits(ConcatStream, Writable) + +ConcatStream.prototype._write = function(chunk, enc, next) { + this.body.push(chunk) + next() +} + +ConcatStream.prototype.inferEncoding = function (buff) { + var firstBuffer = buff === undefined ? this.body[0] : buff; + if (Buffer.isBuffer(firstBuffer)) return 'buffer' + if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array' + if (Array.isArray(firstBuffer)) return 'array' + if (typeof firstBuffer === 'string') return 'string' + if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object' + return 'buffer' +} + +ConcatStream.prototype.getBody = function () { + if (!this.encoding && this.body.length === 0) return [] + if (this.shouldInferEncoding) this.encoding = this.inferEncoding() + if (this.encoding === 'array') return arrayConcat(this.body) + if (this.encoding === 'string') return stringConcat(this.body) + if (this.encoding === 'buffer') return bufferConcat(this.body) + if (this.encoding === 'uint8array') return u8Concat(this.body) + return this.body +} + +var isArray = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]' +} + +function isArrayish (arr) { + return /Array\]$/.test(Object.prototype.toString.call(arr)) +} + +function isBufferish (p) { + return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function') +} + +function stringConcat (parts) { + var strings = [] + var needsToString = false + for (var i = 0; i < parts.length; i++) { + var p = parts[i] + if (typeof p === 'string') { + strings.push(p) + } else if (Buffer.isBuffer(p)) { + strings.push(p) + } else if (isBufferish(p)) { + strings.push(bufferFrom(p)) + } else { + strings.push(bufferFrom(String(p))) + } + } + if (Buffer.isBuffer(parts[0])) { + strings = Buffer.concat(strings) + strings = strings.toString('utf8') + } else { + strings = strings.join('') + } + return strings +} + +function bufferConcat (parts) { + var bufs = [] + for (var i = 0; i < parts.length; i++) { + var p = parts[i] + if (Buffer.isBuffer(p)) { + bufs.push(p) + } else if (isBufferish(p)) { + bufs.push(bufferFrom(p)) + } else { + bufs.push(bufferFrom(String(p))) + } + } + return Buffer.concat(bufs) +} + +function arrayConcat (parts) { + var res = [] + for (var i = 0; i < parts.length; i++) { + res.push.apply(res, parts[i]) + } + return res +} + +function u8Concat (parts) { + var len = 0 + for (var i = 0; i < parts.length; i++) { + if (typeof parts[i] === 'string') { + parts[i] = bufferFrom(parts[i]) + } + len += parts[i].length + } + var u8 = new U8(len) + for (var i = 0, offset = 0; i < parts.length; i++) { + var part = parts[i] + for (var j = 0; j < part.length; j++) { + u8[offset++] = part[j] + } + } + return u8 +} + + +/***/ }), + +/***/ 95898: +/***/ ((__unused_webpack_module, exports) => { + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +/***/ }), + +/***/ 56220: +/***/ ((module) => { + +// create-error.js 0.3.1 +// (c) 2013 Tim Griesser +// This source may be freely distributed under the MIT license. +(function(factory) { + +"use strict"; + +// A simple utility for subclassing the "Error" +// object in multiple environments, while maintaining +// relevant stack traces, messages, and prototypes. +factory(function() { + +var toString = Object.prototype.toString; + +// Creates an new error type with a "name", +// and any additional properties that should be set +// on the error instance. +return function() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; ++i) { + args[i] = arguments[i]; + } + var name = getName(args); + var target = getTarget(args); + var properties = getProps(args); + function ErrorCtor(message, obj) { + attachProps(this, properties); + attachProps(this, obj); + this.message = (message || this.message); + if (message instanceof Error) { + this.message = message.message; + this.stack = message.stack; + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + function Err() { this.constructor = ErrorCtor; } + Err.prototype = target['prototype']; + ErrorCtor.prototype = new Err(); + ErrorCtor.prototype.name = ('' + name) || 'CustomError'; + return ErrorCtor; +}; + +// Just a few helpers to clean up the function above +// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers +function getName(args) { + if (args.length === 0) return ''; + return isError(args[0]) ? (args[1] || '') : args[0]; +} +function getTarget(args) { + if (args.length === 0) return Error; + return isError(args[0]) ? args[0] : Error; +} +function getProps(args) { + if (args.length === 0) return null; + return isError(args[0]) ? args[2] : args[1]; +} +function inheritedKeys(obj) { + var ret = []; + for (var key in obj) { + ret.push(key); + } + return ret; +} + +// Right now we're just assuming that a function in the first argument is an error. +function isError(obj) { + return (typeof obj === "function"); +} + +// We don't need the full underscore check here, since it should either be +// an object-literal, or nothing at all. +function isObject(obj) { + return (obj && typeof obj === "object" && toString.call(obj) === "[object Object]"); +} + +// Used to attach attributes to the error object in the constructor. +function attachProps(context, target) { + if (isObject(target)) { + var keys = inheritedKeys(target); + for (var i = 0, l = keys.length; i < l; ++i) { + context[keys[i]] = clone(target[keys[i]]); + } + } +} + +// Don't need the full-out "clone" mechanism here, since if you're +// trying to set things other than empty arrays/objects on your +// sub-classed `Error` object, you're probably doing it wrong. +function clone(target) { + if (target == null || typeof target !== "object") return target; + var cloned = target.constructor ? target.constructor() : Object.create(null); + for (var attr in target) { + if (target.hasOwnProperty(attr)) { + cloned[attr] = target[attr]; + } + } + return cloned; +} + +}); + +// Boilerplate UMD definition block... +})(function(createErrorLib) { + if (typeof define === "function" && define.amd) { + define(createErrorLib); + } else if (true) { + module.exports = createErrorLib(); + } else { var createError, lastcreateError, root; } +}); + + +/***/ }), + +/***/ 425: +/***/ (function(module, exports) { + +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(); + } + else {} +}(this, function () { + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + function F() {} + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + F.prototype = this; + var subtype = new F(); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init')) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + var r = (function (m_w) { + var m_w = m_w; + var m_z = 0x3ade68b1; + var mask = 0xffffffff; + + return function () { + m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; + m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; + var result = ((m_z << 0x10) + m_w) & mask; + result /= 0x100000000; + result += 0.5; + return result * (Math.random() > .5 ? 1 : -1); + } + }); + + for (var i = 0, rcache; i < nBytes; i += 4) { + var _r = r((rcache || Math.random()) * 0x100000000); + + rcache = _r() * 0x3ade67b7; + words.push((_r() * 0x100000000) | 0); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + return CryptoJS; + +})); + +/***/ }), + +/***/ 74923: +/***/ (function(module, exports, __nccwpck_require__) { + +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__nccwpck_require__(425), __nccwpck_require__(63941), __nccwpck_require__(1192)); + } + else {} +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA256; + +})); + +/***/ }), + +/***/ 1192: +/***/ (function(module, exports, __nccwpck_require__) { + +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(__nccwpck_require__(425)); + } + else {} +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); + + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } + + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); + }()); + + +})); + +/***/ }), + +/***/ 63941: +/***/ (function(module, exports, __nccwpck_require__) { + +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(__nccwpck_require__(425)); + } + else {} +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + return CryptoJS.SHA256; + +})); + +/***/ }), + +/***/ 24615: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var stream_1 = __nccwpck_require__(92413); +var protobufjs_1 = __nccwpck_require__(85881); +/** + * Transforms a binary stream to a stream of message objects + */ +var BinaryToMessageStream = /** @class */ (function (_super) { + __extends(BinaryToMessageStream, _super); + function BinaryToMessageStream(decodeDelimited) { + var _this = _super.call(this, { objectMode: true }) || this; + _this.decodeDelimited = decodeDelimited; + _this.buffer = Buffer.alloc(0); + return _this; + } + BinaryToMessageStream.prototype._transform = function (chunk, encoding, callback) { + this.buffer = Buffer.concat([this.buffer, chunk]); + while (true) { + try { + var reader = protobufjs_1.Reader.create(this.buffer); + var message = this.decodeDelimited(reader); + this.push(message); + this.buffer = this.buffer.slice(reader.pos); + } + catch (err) { + if (err instanceof RangeError) { + // The buffer doesn't have all the data yet. Keep reading. + break; + } + else { + throw err; + } + } + } + callback(); + }; + return BinaryToMessageStream; +}(stream_1.Transform)); +exports.default = BinaryToMessageStream; +//# sourceMappingURL=BinaryToMessageStream.js.map + +/***/ }), + +/***/ 39145: +/***/ (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 v4_1 = __importDefault(__nccwpck_require__(80824)); +function uuid() { + return function () { return v4_1.default(); }; +} +exports.uuid = uuid; +function incrementing() { + var next = 0; + return function () { return (next++).toString(); }; +} +exports.incrementing = incrementing; +//# sourceMappingURL=IdGenerator.js.map + +/***/ }), + +/***/ 61592: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var stream_1 = __nccwpck_require__(92413); +/** + * Transforms a stream of message objects to binary + */ +var MessageToBinaryStream = /** @class */ (function (_super) { + __extends(MessageToBinaryStream, _super); + function MessageToBinaryStream() { + return _super.call(this, { objectMode: true }) || this; + } + MessageToBinaryStream.prototype._transform = function (message, encoding, callback) { + // @ts-ignore + var chunk = message.constructor.encodeDelimited(message).finish(); + this.push(chunk); + callback(); + }; + return MessageToBinaryStream; +}(stream_1.Transform)); +exports.default = MessageToBinaryStream; +//# sourceMappingURL=MessageToBinaryStream.js.map + +/***/ }), + +/***/ 54620: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var stream_1 = __nccwpck_require__(92413); +/** + * Transforms a stream of message objects to NDJSON + */ +var MessageToNdjsonStream = /** @class */ (function (_super) { + __extends(MessageToNdjsonStream, _super); + function MessageToNdjsonStream() { + return _super.call(this, { + writableObjectMode: true, + readableObjectMode: true, + }) || this; + } + MessageToNdjsonStream.prototype._transform = function (message, encoding, callback) { + // @ts-ignore + if (!message.constructor.toObject) { + return callback(new Error("Not a protobuf object: " + JSON.stringify(message))); + } + // @ts-ignore + var object = message.constructor.toObject(message, { + defaults: false, + enums: String, + arrays: false, + objects: false, + }); + // This reviver omits printing fields with empty values + // This is to make it behave the same as Golang's protobuf->JSON converter + var json = JSON.stringify(object, function (key, value) { + return value === '' ? undefined : value; + }); + this.push(json + '\n'); + callback(); + }; + return MessageToNdjsonStream; +}(stream_1.Transform)); +exports.default = MessageToNdjsonStream; +//# sourceMappingURL=MessageToNdjsonStream.js.map + +/***/ }), + +/***/ 55734: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __values = (this && this.__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."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var stream_1 = __nccwpck_require__(92413); +/** + * Transforms an NDJSON stream to a stream of message objects + */ +var NdjsonToMessageStream = /** @class */ (function (_super) { + __extends(NdjsonToMessageStream, _super); + function NdjsonToMessageStream(fromObject) { + var _this = _super.call(this, { objectMode: true }) || this; + _this.fromObject = fromObject; + return _this; + } + NdjsonToMessageStream.prototype._transform = function (chunk, encoding, callback) { + var e_1, _a; + if (this.buffer === undefined) { + this.buffer = ''; + } + this.buffer += chunk; + var lines = this.buffer.split('\n'); + this.buffer = lines.pop(); + try { + for (var lines_1 = __values(lines), lines_1_1 = lines_1.next(); !lines_1_1.done; lines_1_1 = lines_1.next()) { + var line = lines_1_1.value; + this.push(this.fromObject(JSON.parse(line))); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (lines_1_1 && !lines_1_1.done && (_a = lines_1.return)) _a.call(lines_1); + } + finally { if (e_1) throw e_1.error; } + } + callback(); + }; + NdjsonToMessageStream.prototype._flush = function (callback) { + if (this.buffer) { + this.push(this.fromObject(JSON.parse(this.buffer))); + } + callback(); + }; + return NdjsonToMessageStream; +}(stream_1.Transform)); +exports.default = NdjsonToMessageStream; +//# sourceMappingURL=NdjsonToMessageStream.js.map + +/***/ }), + +/***/ 34321: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var index_1 = __nccwpck_require__(56106); +var MILLISECONDS_PER_SECOND = 1000; +var NANOSECONDS_PER_MILLISECOND = 1000000; +function millisecondsSinceEpochToTimestamp(millisecondsSinceEpoch) { + return new index_1.messages.Timestamp(toSecondsAndNanos(millisecondsSinceEpoch)); +} +exports.millisecondsSinceEpochToTimestamp = millisecondsSinceEpochToTimestamp; +function millisecondsToDuration(durationInMilliseconds) { + return new index_1.messages.Duration(toSecondsAndNanos(durationInMilliseconds)); +} +exports.millisecondsToDuration = millisecondsToDuration; +function timestampToMillisecondsSinceEpoch(timestamp) { + var nanos = timestamp.nanos, seconds = timestamp.seconds; + return toMillis(seconds, nanos); +} +exports.timestampToMillisecondsSinceEpoch = timestampToMillisecondsSinceEpoch; +function durationToMilliseconds(duration) { + var nanos = duration.nanos, seconds = duration.seconds; + return toMillis(seconds, nanos); +} +exports.durationToMilliseconds = durationToMilliseconds; +function toSecondsAndNanos(milliseconds) { + var seconds = Math.floor(milliseconds / MILLISECONDS_PER_SECOND); + var nanos = Math.floor(Math.floor(milliseconds % MILLISECONDS_PER_SECOND) * + NANOSECONDS_PER_MILLISECOND); + return { seconds: seconds, nanos: nanos }; +} +function toMillis(seconds, nanos) { + var secondMillis; + if (typeof seconds === 'number') { + secondMillis = seconds * MILLISECONDS_PER_SECOND; + } + else { + secondMillis = seconds + .multiply(MILLISECONDS_PER_SECOND) + .toNumber(); + } + var nanoMillis = nanos / NANOSECONDS_PER_MILLISECOND; + return Math.floor(secondMillis + nanoMillis); +} +//# sourceMappingURL=TimeConversion.js.map + +/***/ }), + +/***/ 32364: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ + + +var $protobuf = __nccwpck_require__(96916); + +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +$root.io = (function() { + + /** + * Namespace io. + * @exports io + * @namespace + */ + var io = {}; + + io.cucumber = (function() { + + /** + * Namespace cucumber. + * @memberof io + * @namespace + */ + var cucumber = {}; + + cucumber.messages = (function() { + + /** + * Namespace messages. + * @memberof io.cucumber + * @namespace + */ + var messages = {}; + + messages.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof io.cucumber.messages + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof io.cucumber.messages + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {io.cucumber.messages.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof io.cucumber.messages.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof io.cucumber.messages.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Timestamp + * @static + * @param {io.cucumber.messages.ITimestamp=} [properties] Properties to set + * @returns {io.cucumber.messages.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link io.cucumber.messages.Timestamp.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Timestamp + * @static + * @param {io.cucumber.messages.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link io.cucumber.messages.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Timestamp + * @static + * @param {io.cucumber.messages.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof io.cucumber.messages.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Timestamp) + return object; + var message = new $root.io.cucumber.messages.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Timestamp + * @static + * @param {io.cucumber.messages.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + messages.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof io.cucumber.messages + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof io.cucumber.messages + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {io.cucumber.messages.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof io.cucumber.messages.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof io.cucumber.messages.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Duration + * @static + * @param {io.cucumber.messages.IDuration=} [properties] Properties to set + * @returns {io.cucumber.messages.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link io.cucumber.messages.Duration.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Duration + * @static + * @param {io.cucumber.messages.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link io.cucumber.messages.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Duration + * @static + * @param {io.cucumber.messages.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof io.cucumber.messages.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Duration + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Duration) + return object; + var message = new $root.io.cucumber.messages.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Duration + * @static + * @param {io.cucumber.messages.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + messages.Envelope = (function() { + + /** + * Properties of an Envelope. + * @memberof io.cucumber.messages + * @interface IEnvelope + * @property {io.cucumber.messages.ISource|null} [source] Envelope source + * @property {io.cucumber.messages.IGherkinDocument|null} [gherkinDocument] Envelope gherkinDocument + * @property {io.cucumber.messages.IPickle|null} [pickle] Envelope pickle + * @property {io.cucumber.messages.IAttachment|null} [attachment] Envelope attachment + * @property {io.cucumber.messages.ITestCaseStarted|null} [testCaseStarted] Envelope testCaseStarted + * @property {io.cucumber.messages.ITestStepStarted|null} [testStepStarted] Envelope testStepStarted + * @property {io.cucumber.messages.ITestStepFinished|null} [testStepFinished] Envelope testStepFinished + * @property {io.cucumber.messages.ITestCaseFinished|null} [testCaseFinished] Envelope testCaseFinished + * @property {io.cucumber.messages.IPickleAccepted|null} [pickleAccepted] Envelope pickleAccepted + * @property {io.cucumber.messages.IPickleRejected|null} [pickleRejected] Envelope pickleRejected + * @property {io.cucumber.messages.ITestCasePrepared|null} [testCasePrepared] Envelope testCasePrepared + * @property {io.cucumber.messages.ITestRunStarted|null} [testRunStarted] Envelope testRunStarted + * @property {io.cucumber.messages.ITestRunFinished|null} [testRunFinished] Envelope testRunFinished + * @property {io.cucumber.messages.ICommandStart|null} [commandStart] Envelope commandStart + * @property {io.cucumber.messages.ICommandActionComplete|null} [commandActionComplete] Envelope commandActionComplete + * @property {io.cucumber.messages.ICommandRunBeforeTestRunHooks|null} [commandRunBeforeTestRunHooks] Envelope commandRunBeforeTestRunHooks + * @property {io.cucumber.messages.ICommandInitializeTestCase|null} [commandInitializeTestCase] Envelope commandInitializeTestCase + * @property {io.cucumber.messages.ICommandRunBeforeTestCaseHook|null} [commandRunBeforeTestCaseHook] Envelope commandRunBeforeTestCaseHook + * @property {io.cucumber.messages.ICommandRunTestStep|null} [commandRunTestStep] Envelope commandRunTestStep + * @property {io.cucumber.messages.ICommandRunAfterTestCaseHook|null} [commandRunAfterTestCaseHook] Envelope commandRunAfterTestCaseHook + * @property {io.cucumber.messages.ICommandRunAfterTestRunHooks|null} [commandRunAfterTestRunHooks] Envelope commandRunAfterTestRunHooks + * @property {io.cucumber.messages.ICommandGenerateSnippet|null} [commandGenerateSnippet] Envelope commandGenerateSnippet + * @property {string|null} [commandError] Envelope commandError + * @property {io.cucumber.messages.ITestCase|null} [testCase] Envelope testCase + * @property {io.cucumber.messages.IStepDefinition|null} [stepDefinition] Envelope stepDefinition + * @property {io.cucumber.messages.IHook|null} [hook] Envelope hook + */ + + /** + * Constructs a new Envelope. + * @memberof io.cucumber.messages + * @classdesc All the messages that are passed between different components/processes are Envelope + * messages. + * @implements IEnvelope + * @constructor + * @param {io.cucumber.messages.IEnvelope=} [properties] Properties to set + */ + function Envelope(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Envelope source. + * @member {io.cucumber.messages.ISource|null|undefined} source + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.source = null; + + /** + * Envelope gherkinDocument. + * @member {io.cucumber.messages.IGherkinDocument|null|undefined} gherkinDocument + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.gherkinDocument = null; + + /** + * Envelope pickle. + * @member {io.cucumber.messages.IPickle|null|undefined} pickle + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.pickle = null; + + /** + * Envelope attachment. + * @member {io.cucumber.messages.IAttachment|null|undefined} attachment + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.attachment = null; + + /** + * Envelope testCaseStarted. + * @member {io.cucumber.messages.ITestCaseStarted|null|undefined} testCaseStarted + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.testCaseStarted = null; + + /** + * Envelope testStepStarted. + * @member {io.cucumber.messages.ITestStepStarted|null|undefined} testStepStarted + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.testStepStarted = null; + + /** + * Envelope testStepFinished. + * @member {io.cucumber.messages.ITestStepFinished|null|undefined} testStepFinished + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.testStepFinished = null; + + /** + * Envelope testCaseFinished. + * @member {io.cucumber.messages.ITestCaseFinished|null|undefined} testCaseFinished + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.testCaseFinished = null; + + /** + * Envelope pickleAccepted. + * @member {io.cucumber.messages.IPickleAccepted|null|undefined} pickleAccepted + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.pickleAccepted = null; + + /** + * Envelope pickleRejected. + * @member {io.cucumber.messages.IPickleRejected|null|undefined} pickleRejected + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.pickleRejected = null; + + /** + * Envelope testCasePrepared. + * @member {io.cucumber.messages.ITestCasePrepared|null|undefined} testCasePrepared + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.testCasePrepared = null; + + /** + * Envelope testRunStarted. + * @member {io.cucumber.messages.ITestRunStarted|null|undefined} testRunStarted + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.testRunStarted = null; + + /** + * Envelope testRunFinished. + * @member {io.cucumber.messages.ITestRunFinished|null|undefined} testRunFinished + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.testRunFinished = null; + + /** + * Envelope commandStart. + * @member {io.cucumber.messages.ICommandStart|null|undefined} commandStart + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.commandStart = null; + + /** + * Envelope commandActionComplete. + * @member {io.cucumber.messages.ICommandActionComplete|null|undefined} commandActionComplete + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.commandActionComplete = null; + + /** + * Envelope commandRunBeforeTestRunHooks. + * @member {io.cucumber.messages.ICommandRunBeforeTestRunHooks|null|undefined} commandRunBeforeTestRunHooks + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.commandRunBeforeTestRunHooks = null; + + /** + * Envelope commandInitializeTestCase. + * @member {io.cucumber.messages.ICommandInitializeTestCase|null|undefined} commandInitializeTestCase + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.commandInitializeTestCase = null; + + /** + * Envelope commandRunBeforeTestCaseHook. + * @member {io.cucumber.messages.ICommandRunBeforeTestCaseHook|null|undefined} commandRunBeforeTestCaseHook + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.commandRunBeforeTestCaseHook = null; + + /** + * Envelope commandRunTestStep. + * @member {io.cucumber.messages.ICommandRunTestStep|null|undefined} commandRunTestStep + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.commandRunTestStep = null; + + /** + * Envelope commandRunAfterTestCaseHook. + * @member {io.cucumber.messages.ICommandRunAfterTestCaseHook|null|undefined} commandRunAfterTestCaseHook + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.commandRunAfterTestCaseHook = null; + + /** + * Envelope commandRunAfterTestRunHooks. + * @member {io.cucumber.messages.ICommandRunAfterTestRunHooks|null|undefined} commandRunAfterTestRunHooks + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.commandRunAfterTestRunHooks = null; + + /** + * Envelope commandGenerateSnippet. + * @member {io.cucumber.messages.ICommandGenerateSnippet|null|undefined} commandGenerateSnippet + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.commandGenerateSnippet = null; + + /** + * Envelope commandError. + * @member {string} commandError + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.commandError = ""; + + /** + * Envelope testCase. + * @member {io.cucumber.messages.ITestCase|null|undefined} testCase + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.testCase = null; + + /** + * Envelope stepDefinition. + * @member {io.cucumber.messages.IStepDefinition|null|undefined} stepDefinition + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.stepDefinition = null; + + /** + * Envelope hook. + * @member {io.cucumber.messages.IHook|null|undefined} hook + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Envelope.prototype.hook = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Envelope message. + * @member {"source"|"gherkinDocument"|"pickle"|"attachment"|"testCaseStarted"|"testStepStarted"|"testStepFinished"|"testCaseFinished"|"pickleAccepted"|"pickleRejected"|"testCasePrepared"|"testRunStarted"|"testRunFinished"|"commandStart"|"commandActionComplete"|"commandRunBeforeTestRunHooks"|"commandInitializeTestCase"|"commandRunBeforeTestCaseHook"|"commandRunTestStep"|"commandRunAfterTestCaseHook"|"commandRunAfterTestRunHooks"|"commandGenerateSnippet"|"commandError"|"testCase"|"stepDefinition"|"hook"|undefined} message + * @memberof io.cucumber.messages.Envelope + * @instance + */ + Object.defineProperty(Envelope.prototype, "message", { + get: $util.oneOfGetter($oneOfFields = ["source", "gherkinDocument", "pickle", "attachment", "testCaseStarted", "testStepStarted", "testStepFinished", "testCaseFinished", "pickleAccepted", "pickleRejected", "testCasePrepared", "testRunStarted", "testRunFinished", "commandStart", "commandActionComplete", "commandRunBeforeTestRunHooks", "commandInitializeTestCase", "commandRunBeforeTestCaseHook", "commandRunTestStep", "commandRunAfterTestCaseHook", "commandRunAfterTestRunHooks", "commandGenerateSnippet", "commandError", "testCase", "stepDefinition", "hook"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Envelope instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Envelope + * @static + * @param {io.cucumber.messages.IEnvelope=} [properties] Properties to set + * @returns {io.cucumber.messages.Envelope} Envelope instance + */ + Envelope.create = function create(properties) { + return new Envelope(properties); + }; + + /** + * Encodes the specified Envelope message. Does not implicitly {@link io.cucumber.messages.Envelope.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Envelope + * @static + * @param {io.cucumber.messages.IEnvelope} message Envelope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Envelope.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && message.hasOwnProperty("source")) + $root.io.cucumber.messages.Source.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gherkinDocument != null && message.hasOwnProperty("gherkinDocument")) + $root.io.cucumber.messages.GherkinDocument.encode(message.gherkinDocument, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pickle != null && message.hasOwnProperty("pickle")) + $root.io.cucumber.messages.Pickle.encode(message.pickle, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.attachment != null && message.hasOwnProperty("attachment")) + $root.io.cucumber.messages.Attachment.encode(message.attachment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.testCaseStarted != null && message.hasOwnProperty("testCaseStarted")) + $root.io.cucumber.messages.TestCaseStarted.encode(message.testCaseStarted, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.testStepStarted != null && message.hasOwnProperty("testStepStarted")) + $root.io.cucumber.messages.TestStepStarted.encode(message.testStepStarted, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.testStepFinished != null && message.hasOwnProperty("testStepFinished")) + $root.io.cucumber.messages.TestStepFinished.encode(message.testStepFinished, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.testCaseFinished != null && message.hasOwnProperty("testCaseFinished")) + $root.io.cucumber.messages.TestCaseFinished.encode(message.testCaseFinished, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.pickleAccepted != null && message.hasOwnProperty("pickleAccepted")) + $root.io.cucumber.messages.PickleAccepted.encode(message.pickleAccepted, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.pickleRejected != null && message.hasOwnProperty("pickleRejected")) + $root.io.cucumber.messages.PickleRejected.encode(message.pickleRejected, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.testCasePrepared != null && message.hasOwnProperty("testCasePrepared")) + $root.io.cucumber.messages.TestCasePrepared.encode(message.testCasePrepared, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.testRunStarted != null && message.hasOwnProperty("testRunStarted")) + $root.io.cucumber.messages.TestRunStarted.encode(message.testRunStarted, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.testRunFinished != null && message.hasOwnProperty("testRunFinished")) + $root.io.cucumber.messages.TestRunFinished.encode(message.testRunFinished, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.commandStart != null && message.hasOwnProperty("commandStart")) + $root.io.cucumber.messages.CommandStart.encode(message.commandStart, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.commandActionComplete != null && message.hasOwnProperty("commandActionComplete")) + $root.io.cucumber.messages.CommandActionComplete.encode(message.commandActionComplete, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.commandRunBeforeTestRunHooks != null && message.hasOwnProperty("commandRunBeforeTestRunHooks")) + $root.io.cucumber.messages.CommandRunBeforeTestRunHooks.encode(message.commandRunBeforeTestRunHooks, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.commandInitializeTestCase != null && message.hasOwnProperty("commandInitializeTestCase")) + $root.io.cucumber.messages.CommandInitializeTestCase.encode(message.commandInitializeTestCase, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.commandRunBeforeTestCaseHook != null && message.hasOwnProperty("commandRunBeforeTestCaseHook")) + $root.io.cucumber.messages.CommandRunBeforeTestCaseHook.encode(message.commandRunBeforeTestCaseHook, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.commandRunTestStep != null && message.hasOwnProperty("commandRunTestStep")) + $root.io.cucumber.messages.CommandRunTestStep.encode(message.commandRunTestStep, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.commandRunAfterTestCaseHook != null && message.hasOwnProperty("commandRunAfterTestCaseHook")) + $root.io.cucumber.messages.CommandRunAfterTestCaseHook.encode(message.commandRunAfterTestCaseHook, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.commandRunAfterTestRunHooks != null && message.hasOwnProperty("commandRunAfterTestRunHooks")) + $root.io.cucumber.messages.CommandRunAfterTestRunHooks.encode(message.commandRunAfterTestRunHooks, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.commandGenerateSnippet != null && message.hasOwnProperty("commandGenerateSnippet")) + $root.io.cucumber.messages.CommandGenerateSnippet.encode(message.commandGenerateSnippet, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.commandError != null && message.hasOwnProperty("commandError")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.commandError); + if (message.testCase != null && message.hasOwnProperty("testCase")) + $root.io.cucumber.messages.TestCase.encode(message.testCase, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.stepDefinition != null && message.hasOwnProperty("stepDefinition")) + $root.io.cucumber.messages.StepDefinition.encode(message.stepDefinition, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.hook != null && message.hasOwnProperty("hook")) + $root.io.cucumber.messages.Hook.encode(message.hook, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Envelope message, length delimited. Does not implicitly {@link io.cucumber.messages.Envelope.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Envelope + * @static + * @param {io.cucumber.messages.IEnvelope} message Envelope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Envelope.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Envelope message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Envelope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Envelope} Envelope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Envelope.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Envelope(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.io.cucumber.messages.Source.decode(reader, reader.uint32()); + break; + case 2: + message.gherkinDocument = $root.io.cucumber.messages.GherkinDocument.decode(reader, reader.uint32()); + break; + case 3: + message.pickle = $root.io.cucumber.messages.Pickle.decode(reader, reader.uint32()); + break; + case 4: + message.attachment = $root.io.cucumber.messages.Attachment.decode(reader, reader.uint32()); + break; + case 5: + message.testCaseStarted = $root.io.cucumber.messages.TestCaseStarted.decode(reader, reader.uint32()); + break; + case 6: + message.testStepStarted = $root.io.cucumber.messages.TestStepStarted.decode(reader, reader.uint32()); + break; + case 7: + message.testStepFinished = $root.io.cucumber.messages.TestStepFinished.decode(reader, reader.uint32()); + break; + case 8: + message.testCaseFinished = $root.io.cucumber.messages.TestCaseFinished.decode(reader, reader.uint32()); + break; + case 9: + message.pickleAccepted = $root.io.cucumber.messages.PickleAccepted.decode(reader, reader.uint32()); + break; + case 10: + message.pickleRejected = $root.io.cucumber.messages.PickleRejected.decode(reader, reader.uint32()); + break; + case 11: + message.testCasePrepared = $root.io.cucumber.messages.TestCasePrepared.decode(reader, reader.uint32()); + break; + case 12: + message.testRunStarted = $root.io.cucumber.messages.TestRunStarted.decode(reader, reader.uint32()); + break; + case 13: + message.testRunFinished = $root.io.cucumber.messages.TestRunFinished.decode(reader, reader.uint32()); + break; + case 14: + message.commandStart = $root.io.cucumber.messages.CommandStart.decode(reader, reader.uint32()); + break; + case 15: + message.commandActionComplete = $root.io.cucumber.messages.CommandActionComplete.decode(reader, reader.uint32()); + break; + case 16: + message.commandRunBeforeTestRunHooks = $root.io.cucumber.messages.CommandRunBeforeTestRunHooks.decode(reader, reader.uint32()); + break; + case 17: + message.commandInitializeTestCase = $root.io.cucumber.messages.CommandInitializeTestCase.decode(reader, reader.uint32()); + break; + case 18: + message.commandRunBeforeTestCaseHook = $root.io.cucumber.messages.CommandRunBeforeTestCaseHook.decode(reader, reader.uint32()); + break; + case 19: + message.commandRunTestStep = $root.io.cucumber.messages.CommandRunTestStep.decode(reader, reader.uint32()); + break; + case 20: + message.commandRunAfterTestCaseHook = $root.io.cucumber.messages.CommandRunAfterTestCaseHook.decode(reader, reader.uint32()); + break; + case 21: + message.commandRunAfterTestRunHooks = $root.io.cucumber.messages.CommandRunAfterTestRunHooks.decode(reader, reader.uint32()); + break; + case 22: + message.commandGenerateSnippet = $root.io.cucumber.messages.CommandGenerateSnippet.decode(reader, reader.uint32()); + break; + case 23: + message.commandError = reader.string(); + break; + case 24: + message.testCase = $root.io.cucumber.messages.TestCase.decode(reader, reader.uint32()); + break; + case 25: + message.stepDefinition = $root.io.cucumber.messages.StepDefinition.decode(reader, reader.uint32()); + break; + case 26: + message.hook = $root.io.cucumber.messages.Hook.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Envelope message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Envelope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Envelope} Envelope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Envelope.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Envelope message. + * @function verify + * @memberof io.cucumber.messages.Envelope + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Envelope.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.source != null && message.hasOwnProperty("source")) { + properties.message = 1; + { + var error = $root.io.cucumber.messages.Source.verify(message.source); + if (error) + return "source." + error; + } + } + if (message.gherkinDocument != null && message.hasOwnProperty("gherkinDocument")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.GherkinDocument.verify(message.gherkinDocument); + if (error) + return "gherkinDocument." + error; + } + } + if (message.pickle != null && message.hasOwnProperty("pickle")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.Pickle.verify(message.pickle); + if (error) + return "pickle." + error; + } + } + if (message.attachment != null && message.hasOwnProperty("attachment")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.Attachment.verify(message.attachment); + if (error) + return "attachment." + error; + } + } + if (message.testCaseStarted != null && message.hasOwnProperty("testCaseStarted")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.TestCaseStarted.verify(message.testCaseStarted); + if (error) + return "testCaseStarted." + error; + } + } + if (message.testStepStarted != null && message.hasOwnProperty("testStepStarted")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.TestStepStarted.verify(message.testStepStarted); + if (error) + return "testStepStarted." + error; + } + } + if (message.testStepFinished != null && message.hasOwnProperty("testStepFinished")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.TestStepFinished.verify(message.testStepFinished); + if (error) + return "testStepFinished." + error; + } + } + if (message.testCaseFinished != null && message.hasOwnProperty("testCaseFinished")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.TestCaseFinished.verify(message.testCaseFinished); + if (error) + return "testCaseFinished." + error; + } + } + if (message.pickleAccepted != null && message.hasOwnProperty("pickleAccepted")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.PickleAccepted.verify(message.pickleAccepted); + if (error) + return "pickleAccepted." + error; + } + } + if (message.pickleRejected != null && message.hasOwnProperty("pickleRejected")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.PickleRejected.verify(message.pickleRejected); + if (error) + return "pickleRejected." + error; + } + } + if (message.testCasePrepared != null && message.hasOwnProperty("testCasePrepared")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.TestCasePrepared.verify(message.testCasePrepared); + if (error) + return "testCasePrepared." + error; + } + } + if (message.testRunStarted != null && message.hasOwnProperty("testRunStarted")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.TestRunStarted.verify(message.testRunStarted); + if (error) + return "testRunStarted." + error; + } + } + if (message.testRunFinished != null && message.hasOwnProperty("testRunFinished")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.TestRunFinished.verify(message.testRunFinished); + if (error) + return "testRunFinished." + error; + } + } + if (message.commandStart != null && message.hasOwnProperty("commandStart")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.CommandStart.verify(message.commandStart); + if (error) + return "commandStart." + error; + } + } + if (message.commandActionComplete != null && message.hasOwnProperty("commandActionComplete")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.CommandActionComplete.verify(message.commandActionComplete); + if (error) + return "commandActionComplete." + error; + } + } + if (message.commandRunBeforeTestRunHooks != null && message.hasOwnProperty("commandRunBeforeTestRunHooks")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.CommandRunBeforeTestRunHooks.verify(message.commandRunBeforeTestRunHooks); + if (error) + return "commandRunBeforeTestRunHooks." + error; + } + } + if (message.commandInitializeTestCase != null && message.hasOwnProperty("commandInitializeTestCase")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.CommandInitializeTestCase.verify(message.commandInitializeTestCase); + if (error) + return "commandInitializeTestCase." + error; + } + } + if (message.commandRunBeforeTestCaseHook != null && message.hasOwnProperty("commandRunBeforeTestCaseHook")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.CommandRunBeforeTestCaseHook.verify(message.commandRunBeforeTestCaseHook); + if (error) + return "commandRunBeforeTestCaseHook." + error; + } + } + if (message.commandRunTestStep != null && message.hasOwnProperty("commandRunTestStep")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.CommandRunTestStep.verify(message.commandRunTestStep); + if (error) + return "commandRunTestStep." + error; + } + } + if (message.commandRunAfterTestCaseHook != null && message.hasOwnProperty("commandRunAfterTestCaseHook")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.CommandRunAfterTestCaseHook.verify(message.commandRunAfterTestCaseHook); + if (error) + return "commandRunAfterTestCaseHook." + error; + } + } + if (message.commandRunAfterTestRunHooks != null && message.hasOwnProperty("commandRunAfterTestRunHooks")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.CommandRunAfterTestRunHooks.verify(message.commandRunAfterTestRunHooks); + if (error) + return "commandRunAfterTestRunHooks." + error; + } + } + if (message.commandGenerateSnippet != null && message.hasOwnProperty("commandGenerateSnippet")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.CommandGenerateSnippet.verify(message.commandGenerateSnippet); + if (error) + return "commandGenerateSnippet." + error; + } + } + if (message.commandError != null && message.hasOwnProperty("commandError")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + if (!$util.isString(message.commandError)) + return "commandError: string expected"; + } + if (message.testCase != null && message.hasOwnProperty("testCase")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.TestCase.verify(message.testCase); + if (error) + return "testCase." + error; + } + } + if (message.stepDefinition != null && message.hasOwnProperty("stepDefinition")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.StepDefinition.verify(message.stepDefinition); + if (error) + return "stepDefinition." + error; + } + } + if (message.hook != null && message.hasOwnProperty("hook")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.Hook.verify(message.hook); + if (error) + return "hook." + error; + } + } + return null; + }; + + /** + * Creates an Envelope message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Envelope + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Envelope} Envelope + */ + Envelope.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Envelope) + return object; + var message = new $root.io.cucumber.messages.Envelope(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".io.cucumber.messages.Envelope.source: object expected"); + message.source = $root.io.cucumber.messages.Source.fromObject(object.source); + } + if (object.gherkinDocument != null) { + if (typeof object.gherkinDocument !== "object") + throw TypeError(".io.cucumber.messages.Envelope.gherkinDocument: object expected"); + message.gherkinDocument = $root.io.cucumber.messages.GherkinDocument.fromObject(object.gherkinDocument); + } + if (object.pickle != null) { + if (typeof object.pickle !== "object") + throw TypeError(".io.cucumber.messages.Envelope.pickle: object expected"); + message.pickle = $root.io.cucumber.messages.Pickle.fromObject(object.pickle); + } + if (object.attachment != null) { + if (typeof object.attachment !== "object") + throw TypeError(".io.cucumber.messages.Envelope.attachment: object expected"); + message.attachment = $root.io.cucumber.messages.Attachment.fromObject(object.attachment); + } + if (object.testCaseStarted != null) { + if (typeof object.testCaseStarted !== "object") + throw TypeError(".io.cucumber.messages.Envelope.testCaseStarted: object expected"); + message.testCaseStarted = $root.io.cucumber.messages.TestCaseStarted.fromObject(object.testCaseStarted); + } + if (object.testStepStarted != null) { + if (typeof object.testStepStarted !== "object") + throw TypeError(".io.cucumber.messages.Envelope.testStepStarted: object expected"); + message.testStepStarted = $root.io.cucumber.messages.TestStepStarted.fromObject(object.testStepStarted); + } + if (object.testStepFinished != null) { + if (typeof object.testStepFinished !== "object") + throw TypeError(".io.cucumber.messages.Envelope.testStepFinished: object expected"); + message.testStepFinished = $root.io.cucumber.messages.TestStepFinished.fromObject(object.testStepFinished); + } + if (object.testCaseFinished != null) { + if (typeof object.testCaseFinished !== "object") + throw TypeError(".io.cucumber.messages.Envelope.testCaseFinished: object expected"); + message.testCaseFinished = $root.io.cucumber.messages.TestCaseFinished.fromObject(object.testCaseFinished); + } + if (object.pickleAccepted != null) { + if (typeof object.pickleAccepted !== "object") + throw TypeError(".io.cucumber.messages.Envelope.pickleAccepted: object expected"); + message.pickleAccepted = $root.io.cucumber.messages.PickleAccepted.fromObject(object.pickleAccepted); + } + if (object.pickleRejected != null) { + if (typeof object.pickleRejected !== "object") + throw TypeError(".io.cucumber.messages.Envelope.pickleRejected: object expected"); + message.pickleRejected = $root.io.cucumber.messages.PickleRejected.fromObject(object.pickleRejected); + } + if (object.testCasePrepared != null) { + if (typeof object.testCasePrepared !== "object") + throw TypeError(".io.cucumber.messages.Envelope.testCasePrepared: object expected"); + message.testCasePrepared = $root.io.cucumber.messages.TestCasePrepared.fromObject(object.testCasePrepared); + } + if (object.testRunStarted != null) { + if (typeof object.testRunStarted !== "object") + throw TypeError(".io.cucumber.messages.Envelope.testRunStarted: object expected"); + message.testRunStarted = $root.io.cucumber.messages.TestRunStarted.fromObject(object.testRunStarted); + } + if (object.testRunFinished != null) { + if (typeof object.testRunFinished !== "object") + throw TypeError(".io.cucumber.messages.Envelope.testRunFinished: object expected"); + message.testRunFinished = $root.io.cucumber.messages.TestRunFinished.fromObject(object.testRunFinished); + } + if (object.commandStart != null) { + if (typeof object.commandStart !== "object") + throw TypeError(".io.cucumber.messages.Envelope.commandStart: object expected"); + message.commandStart = $root.io.cucumber.messages.CommandStart.fromObject(object.commandStart); + } + if (object.commandActionComplete != null) { + if (typeof object.commandActionComplete !== "object") + throw TypeError(".io.cucumber.messages.Envelope.commandActionComplete: object expected"); + message.commandActionComplete = $root.io.cucumber.messages.CommandActionComplete.fromObject(object.commandActionComplete); + } + if (object.commandRunBeforeTestRunHooks != null) { + if (typeof object.commandRunBeforeTestRunHooks !== "object") + throw TypeError(".io.cucumber.messages.Envelope.commandRunBeforeTestRunHooks: object expected"); + message.commandRunBeforeTestRunHooks = $root.io.cucumber.messages.CommandRunBeforeTestRunHooks.fromObject(object.commandRunBeforeTestRunHooks); + } + if (object.commandInitializeTestCase != null) { + if (typeof object.commandInitializeTestCase !== "object") + throw TypeError(".io.cucumber.messages.Envelope.commandInitializeTestCase: object expected"); + message.commandInitializeTestCase = $root.io.cucumber.messages.CommandInitializeTestCase.fromObject(object.commandInitializeTestCase); + } + if (object.commandRunBeforeTestCaseHook != null) { + if (typeof object.commandRunBeforeTestCaseHook !== "object") + throw TypeError(".io.cucumber.messages.Envelope.commandRunBeforeTestCaseHook: object expected"); + message.commandRunBeforeTestCaseHook = $root.io.cucumber.messages.CommandRunBeforeTestCaseHook.fromObject(object.commandRunBeforeTestCaseHook); + } + if (object.commandRunTestStep != null) { + if (typeof object.commandRunTestStep !== "object") + throw TypeError(".io.cucumber.messages.Envelope.commandRunTestStep: object expected"); + message.commandRunTestStep = $root.io.cucumber.messages.CommandRunTestStep.fromObject(object.commandRunTestStep); + } + if (object.commandRunAfterTestCaseHook != null) { + if (typeof object.commandRunAfterTestCaseHook !== "object") + throw TypeError(".io.cucumber.messages.Envelope.commandRunAfterTestCaseHook: object expected"); + message.commandRunAfterTestCaseHook = $root.io.cucumber.messages.CommandRunAfterTestCaseHook.fromObject(object.commandRunAfterTestCaseHook); + } + if (object.commandRunAfterTestRunHooks != null) { + if (typeof object.commandRunAfterTestRunHooks !== "object") + throw TypeError(".io.cucumber.messages.Envelope.commandRunAfterTestRunHooks: object expected"); + message.commandRunAfterTestRunHooks = $root.io.cucumber.messages.CommandRunAfterTestRunHooks.fromObject(object.commandRunAfterTestRunHooks); + } + if (object.commandGenerateSnippet != null) { + if (typeof object.commandGenerateSnippet !== "object") + throw TypeError(".io.cucumber.messages.Envelope.commandGenerateSnippet: object expected"); + message.commandGenerateSnippet = $root.io.cucumber.messages.CommandGenerateSnippet.fromObject(object.commandGenerateSnippet); + } + if (object.commandError != null) + message.commandError = String(object.commandError); + if (object.testCase != null) { + if (typeof object.testCase !== "object") + throw TypeError(".io.cucumber.messages.Envelope.testCase: object expected"); + message.testCase = $root.io.cucumber.messages.TestCase.fromObject(object.testCase); + } + if (object.stepDefinition != null) { + if (typeof object.stepDefinition !== "object") + throw TypeError(".io.cucumber.messages.Envelope.stepDefinition: object expected"); + message.stepDefinition = $root.io.cucumber.messages.StepDefinition.fromObject(object.stepDefinition); + } + if (object.hook != null) { + if (typeof object.hook !== "object") + throw TypeError(".io.cucumber.messages.Envelope.hook: object expected"); + message.hook = $root.io.cucumber.messages.Hook.fromObject(object.hook); + } + return message; + }; + + /** + * Creates a plain object from an Envelope message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Envelope + * @static + * @param {io.cucumber.messages.Envelope} message Envelope + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Envelope.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.source != null && message.hasOwnProperty("source")) { + object.source = $root.io.cucumber.messages.Source.toObject(message.source, options); + if (options.oneofs) + object.message = "source"; + } + if (message.gherkinDocument != null && message.hasOwnProperty("gherkinDocument")) { + object.gherkinDocument = $root.io.cucumber.messages.GherkinDocument.toObject(message.gherkinDocument, options); + if (options.oneofs) + object.message = "gherkinDocument"; + } + if (message.pickle != null && message.hasOwnProperty("pickle")) { + object.pickle = $root.io.cucumber.messages.Pickle.toObject(message.pickle, options); + if (options.oneofs) + object.message = "pickle"; + } + if (message.attachment != null && message.hasOwnProperty("attachment")) { + object.attachment = $root.io.cucumber.messages.Attachment.toObject(message.attachment, options); + if (options.oneofs) + object.message = "attachment"; + } + if (message.testCaseStarted != null && message.hasOwnProperty("testCaseStarted")) { + object.testCaseStarted = $root.io.cucumber.messages.TestCaseStarted.toObject(message.testCaseStarted, options); + if (options.oneofs) + object.message = "testCaseStarted"; + } + if (message.testStepStarted != null && message.hasOwnProperty("testStepStarted")) { + object.testStepStarted = $root.io.cucumber.messages.TestStepStarted.toObject(message.testStepStarted, options); + if (options.oneofs) + object.message = "testStepStarted"; + } + if (message.testStepFinished != null && message.hasOwnProperty("testStepFinished")) { + object.testStepFinished = $root.io.cucumber.messages.TestStepFinished.toObject(message.testStepFinished, options); + if (options.oneofs) + object.message = "testStepFinished"; + } + if (message.testCaseFinished != null && message.hasOwnProperty("testCaseFinished")) { + object.testCaseFinished = $root.io.cucumber.messages.TestCaseFinished.toObject(message.testCaseFinished, options); + if (options.oneofs) + object.message = "testCaseFinished"; + } + if (message.pickleAccepted != null && message.hasOwnProperty("pickleAccepted")) { + object.pickleAccepted = $root.io.cucumber.messages.PickleAccepted.toObject(message.pickleAccepted, options); + if (options.oneofs) + object.message = "pickleAccepted"; + } + if (message.pickleRejected != null && message.hasOwnProperty("pickleRejected")) { + object.pickleRejected = $root.io.cucumber.messages.PickleRejected.toObject(message.pickleRejected, options); + if (options.oneofs) + object.message = "pickleRejected"; + } + if (message.testCasePrepared != null && message.hasOwnProperty("testCasePrepared")) { + object.testCasePrepared = $root.io.cucumber.messages.TestCasePrepared.toObject(message.testCasePrepared, options); + if (options.oneofs) + object.message = "testCasePrepared"; + } + if (message.testRunStarted != null && message.hasOwnProperty("testRunStarted")) { + object.testRunStarted = $root.io.cucumber.messages.TestRunStarted.toObject(message.testRunStarted, options); + if (options.oneofs) + object.message = "testRunStarted"; + } + if (message.testRunFinished != null && message.hasOwnProperty("testRunFinished")) { + object.testRunFinished = $root.io.cucumber.messages.TestRunFinished.toObject(message.testRunFinished, options); + if (options.oneofs) + object.message = "testRunFinished"; + } + if (message.commandStart != null && message.hasOwnProperty("commandStart")) { + object.commandStart = $root.io.cucumber.messages.CommandStart.toObject(message.commandStart, options); + if (options.oneofs) + object.message = "commandStart"; + } + if (message.commandActionComplete != null && message.hasOwnProperty("commandActionComplete")) { + object.commandActionComplete = $root.io.cucumber.messages.CommandActionComplete.toObject(message.commandActionComplete, options); + if (options.oneofs) + object.message = "commandActionComplete"; + } + if (message.commandRunBeforeTestRunHooks != null && message.hasOwnProperty("commandRunBeforeTestRunHooks")) { + object.commandRunBeforeTestRunHooks = $root.io.cucumber.messages.CommandRunBeforeTestRunHooks.toObject(message.commandRunBeforeTestRunHooks, options); + if (options.oneofs) + object.message = "commandRunBeforeTestRunHooks"; + } + if (message.commandInitializeTestCase != null && message.hasOwnProperty("commandInitializeTestCase")) { + object.commandInitializeTestCase = $root.io.cucumber.messages.CommandInitializeTestCase.toObject(message.commandInitializeTestCase, options); + if (options.oneofs) + object.message = "commandInitializeTestCase"; + } + if (message.commandRunBeforeTestCaseHook != null && message.hasOwnProperty("commandRunBeforeTestCaseHook")) { + object.commandRunBeforeTestCaseHook = $root.io.cucumber.messages.CommandRunBeforeTestCaseHook.toObject(message.commandRunBeforeTestCaseHook, options); + if (options.oneofs) + object.message = "commandRunBeforeTestCaseHook"; + } + if (message.commandRunTestStep != null && message.hasOwnProperty("commandRunTestStep")) { + object.commandRunTestStep = $root.io.cucumber.messages.CommandRunTestStep.toObject(message.commandRunTestStep, options); + if (options.oneofs) + object.message = "commandRunTestStep"; + } + if (message.commandRunAfterTestCaseHook != null && message.hasOwnProperty("commandRunAfterTestCaseHook")) { + object.commandRunAfterTestCaseHook = $root.io.cucumber.messages.CommandRunAfterTestCaseHook.toObject(message.commandRunAfterTestCaseHook, options); + if (options.oneofs) + object.message = "commandRunAfterTestCaseHook"; + } + if (message.commandRunAfterTestRunHooks != null && message.hasOwnProperty("commandRunAfterTestRunHooks")) { + object.commandRunAfterTestRunHooks = $root.io.cucumber.messages.CommandRunAfterTestRunHooks.toObject(message.commandRunAfterTestRunHooks, options); + if (options.oneofs) + object.message = "commandRunAfterTestRunHooks"; + } + if (message.commandGenerateSnippet != null && message.hasOwnProperty("commandGenerateSnippet")) { + object.commandGenerateSnippet = $root.io.cucumber.messages.CommandGenerateSnippet.toObject(message.commandGenerateSnippet, options); + if (options.oneofs) + object.message = "commandGenerateSnippet"; + } + if (message.commandError != null && message.hasOwnProperty("commandError")) { + object.commandError = message.commandError; + if (options.oneofs) + object.message = "commandError"; + } + if (message.testCase != null && message.hasOwnProperty("testCase")) { + object.testCase = $root.io.cucumber.messages.TestCase.toObject(message.testCase, options); + if (options.oneofs) + object.message = "testCase"; + } + if (message.stepDefinition != null && message.hasOwnProperty("stepDefinition")) { + object.stepDefinition = $root.io.cucumber.messages.StepDefinition.toObject(message.stepDefinition, options); + if (options.oneofs) + object.message = "stepDefinition"; + } + if (message.hook != null && message.hasOwnProperty("hook")) { + object.hook = $root.io.cucumber.messages.Hook.toObject(message.hook, options); + if (options.oneofs) + object.message = "hook"; + } + return object; + }; + + /** + * Converts this Envelope to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Envelope + * @instance + * @returns {Object.} JSON object + */ + Envelope.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Envelope; + })(); + + messages.Location = (function() { + + /** + * Properties of a Location. + * @memberof io.cucumber.messages + * @interface ILocation + * @property {number|null} [line] Location line + * @property {number|null} [column] Location column + */ + + /** + * Constructs a new Location. + * @memberof io.cucumber.messages + * @classdesc Points to a line and a column in a text file + * @implements ILocation + * @constructor + * @param {io.cucumber.messages.ILocation=} [properties] Properties to set + */ + function Location(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location line. + * @member {number} line + * @memberof io.cucumber.messages.Location + * @instance + */ + Location.prototype.line = 0; + + /** + * Location column. + * @member {number} column + * @memberof io.cucumber.messages.Location + * @instance + */ + Location.prototype.column = 0; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Location + * @static + * @param {io.cucumber.messages.ILocation=} [properties] Properties to set + * @returns {io.cucumber.messages.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link io.cucumber.messages.Location.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Location + * @static + * @param {io.cucumber.messages.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.line != null && message.hasOwnProperty("line")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.line); + if (message.column != null && message.hasOwnProperty("column")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.column); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link io.cucumber.messages.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Location + * @static + * @param {io.cucumber.messages.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.line = reader.uint32(); + break; + case 2: + message.column = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof io.cucumber.messages.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.line != null && message.hasOwnProperty("line")) + if (!$util.isInteger(message.line)) + return "line: integer expected"; + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isInteger(message.column)) + return "column: integer expected"; + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Location + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Location) + return object; + var message = new $root.io.cucumber.messages.Location(); + if (object.line != null) + message.line = object.line >>> 0; + if (object.column != null) + message.column = object.column >>> 0; + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Location + * @static + * @param {io.cucumber.messages.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.line = 0; + object.column = 0; + } + if (message.line != null && message.hasOwnProperty("line")) + object.line = message.line; + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + messages.SourceReference = (function() { + + /** + * Properties of a SourceReference. + * @memberof io.cucumber.messages + * @interface ISourceReference + * @property {string|null} [uri] SourceReference uri + * @property {io.cucumber.messages.ILocation|null} [location] SourceReference location + */ + + /** + * Constructs a new SourceReference. + * @memberof io.cucumber.messages + * @classdesc Points to a [Source](#io.cucumber.messages.Source) identified by `uri` and a + * [Location](#io.cucumber.messages.Location) within that file. + * @implements ISourceReference + * @constructor + * @param {io.cucumber.messages.ISourceReference=} [properties] Properties to set + */ + function SourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceReference uri. + * @member {string} uri + * @memberof io.cucumber.messages.SourceReference + * @instance + */ + SourceReference.prototype.uri = ""; + + /** + * SourceReference location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.SourceReference + * @instance + */ + SourceReference.prototype.location = null; + + /** + * Creates a new SourceReference instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.SourceReference + * @static + * @param {io.cucumber.messages.ISourceReference=} [properties] Properties to set + * @returns {io.cucumber.messages.SourceReference} SourceReference instance + */ + SourceReference.create = function create(properties) { + return new SourceReference(properties); + }; + + /** + * Encodes the specified SourceReference message. Does not implicitly {@link io.cucumber.messages.SourceReference.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.SourceReference + * @static + * @param {io.cucumber.messages.ISourceReference} message SourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && message.hasOwnProperty("uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceReference message, length delimited. Does not implicitly {@link io.cucumber.messages.SourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.SourceReference + * @static + * @param {io.cucumber.messages.ISourceReference} message SourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceReference message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.SourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.SourceReference} SourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.SourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + case 2: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.SourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.SourceReference} SourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceReference message. + * @function verify + * @memberof io.cucumber.messages.SourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + return null; + }; + + /** + * Creates a SourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.SourceReference + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.SourceReference} SourceReference + */ + SourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.SourceReference) + return object; + var message = new $root.io.cucumber.messages.SourceReference(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.SourceReference.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + return message; + }; + + /** + * Creates a plain object from a SourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.SourceReference + * @static + * @param {io.cucumber.messages.SourceReference} message SourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.location = null; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + return object; + }; + + /** + * Converts this SourceReference to JSON. + * @function toJSON + * @memberof io.cucumber.messages.SourceReference + * @instance + * @returns {Object.} JSON object + */ + SourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SourceReference; + })(); + + messages.Media = (function() { + + /** + * Properties of a Media. + * @memberof io.cucumber.messages + * @interface IMedia + * @property {io.cucumber.messages.Media.Encoding|null} [encoding] Media encoding + * @property {string|null} [contentType] The content type of the data. This can be any valid + * [IANA Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml) + * as well as Cucumber-specific media types such as `text/x.cucumber.gherkin+plain` + * and `text/x.cucumber.stacktrace+plain` + */ + + /** + * Constructs a new Media. + * @memberof io.cucumber.messages + * @classdesc Meta information about encoded contents + * @implements IMedia + * @constructor + * @param {io.cucumber.messages.IMedia=} [properties] Properties to set + */ + function Media(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Media encoding. + * @member {io.cucumber.messages.Media.Encoding} encoding + * @memberof io.cucumber.messages.Media + * @instance + */ + Media.prototype.encoding = 0; + + /** + * The content type of the data. This can be any valid + * [IANA Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml) + * as well as Cucumber-specific media types such as `text/x.cucumber.gherkin+plain` + * and `text/x.cucumber.stacktrace+plain` + * @member {string} contentType + * @memberof io.cucumber.messages.Media + * @instance + */ + Media.prototype.contentType = ""; + + /** + * Creates a new Media instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Media + * @static + * @param {io.cucumber.messages.IMedia=} [properties] Properties to set + * @returns {io.cucumber.messages.Media} Media instance + */ + Media.create = function create(properties) { + return new Media(properties); + }; + + /** + * Encodes the specified Media message. Does not implicitly {@link io.cucumber.messages.Media.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Media + * @static + * @param {io.cucumber.messages.IMedia} message Media message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Media.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && message.hasOwnProperty("encoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encoding); + if (message.contentType != null && message.hasOwnProperty("contentType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.contentType); + return writer; + }; + + /** + * Encodes the specified Media message, length delimited. Does not implicitly {@link io.cucumber.messages.Media.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Media + * @static + * @param {io.cucumber.messages.IMedia} message Media message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Media.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Media message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Media + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Media} Media + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Media.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Media(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.int32(); + break; + case 2: + message.contentType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Media message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Media + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Media} Media + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Media.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Media message. + * @function verify + * @memberof io.cucumber.messages.Media + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Media.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + switch (message.encoding) { + default: + return "encoding: enum value expected"; + case 0: + case 1: + break; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + if (!$util.isString(message.contentType)) + return "contentType: string expected"; + return null; + }; + + /** + * Creates a Media message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Media + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Media} Media + */ + Media.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Media) + return object; + var message = new $root.io.cucumber.messages.Media(); + switch (object.encoding) { + case "BASE64": + case 0: + message.encoding = 0; + break; + case "UTF8": + case 1: + message.encoding = 1; + break; + } + if (object.contentType != null) + message.contentType = String(object.contentType); + return message; + }; + + /** + * Creates a plain object from a Media message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Media + * @static + * @param {io.cucumber.messages.Media} message Media + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Media.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = options.enums === String ? "BASE64" : 0; + object.contentType = ""; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = options.enums === String ? $root.io.cucumber.messages.Media.Encoding[message.encoding] : message.encoding; + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = message.contentType; + return object; + }; + + /** + * Converts this Media to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Media + * @instance + * @returns {Object.} JSON object + */ + Media.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Encoding enum. + * @name io.cucumber.messages.Media.Encoding + * @enum {string} + * @property {number} BASE64=0 BASE64 value + * @property {number} UTF8=1 UTF8 value + */ + Media.Encoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BASE64"] = 0; + values[valuesById[1] = "UTF8"] = 1; + return values; + })(); + + return Media; + })(); + + messages.Source = (function() { + + /** + * Properties of a Source. + * @memberof io.cucumber.messages + * @interface ISource + * @property {string|null} [uri] The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) + * of the source, typically a file path relative to the root directory + * @property {string|null} [data] Source data + * @property {io.cucumber.messages.IMedia|null} [media] Source media + */ + + /** + * Constructs a new Source. + * @memberof io.cucumber.messages + * @classdesc A source file, typically a Gherkin document + * @implements ISource + * @constructor + * @param {io.cucumber.messages.ISource=} [properties] Properties to set + */ + function Source(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) + * of the source, typically a file path relative to the root directory + * @member {string} uri + * @memberof io.cucumber.messages.Source + * @instance + */ + Source.prototype.uri = ""; + + /** + * Source data. + * @member {string} data + * @memberof io.cucumber.messages.Source + * @instance + */ + Source.prototype.data = ""; + + /** + * Source media. + * @member {io.cucumber.messages.IMedia|null|undefined} media + * @memberof io.cucumber.messages.Source + * @instance + */ + Source.prototype.media = null; + + /** + * Creates a new Source instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Source + * @static + * @param {io.cucumber.messages.ISource=} [properties] Properties to set + * @returns {io.cucumber.messages.Source} Source instance + */ + Source.create = function create(properties) { + return new Source(properties); + }; + + /** + * Encodes the specified Source message. Does not implicitly {@link io.cucumber.messages.Source.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Source + * @static + * @param {io.cucumber.messages.ISource} message Source message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Source.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && message.hasOwnProperty("uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.data != null && message.hasOwnProperty("data")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.data); + if (message.media != null && message.hasOwnProperty("media")) + $root.io.cucumber.messages.Media.encode(message.media, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Source message, length delimited. Does not implicitly {@link io.cucumber.messages.Source.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Source + * @static + * @param {io.cucumber.messages.ISource} message Source message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Source.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Source message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Source + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Source} Source + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Source.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Source(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + case 2: + message.data = reader.string(); + break; + case 3: + message.media = $root.io.cucumber.messages.Media.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Source message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Source + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Source} Source + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Source.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Source message. + * @function verify + * @memberof io.cucumber.messages.Source + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Source.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!$util.isString(message.data)) + return "data: string expected"; + if (message.media != null && message.hasOwnProperty("media")) { + var error = $root.io.cucumber.messages.Media.verify(message.media); + if (error) + return "media." + error; + } + return null; + }; + + /** + * Creates a Source message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Source + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Source} Source + */ + Source.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Source) + return object; + var message = new $root.io.cucumber.messages.Source(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.data != null) + message.data = String(object.data); + if (object.media != null) { + if (typeof object.media !== "object") + throw TypeError(".io.cucumber.messages.Source.media: object expected"); + message.media = $root.io.cucumber.messages.Media.fromObject(object.media); + } + return message; + }; + + /** + * Creates a plain object from a Source message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Source + * @static + * @param {io.cucumber.messages.Source} message Source + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Source.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.data = ""; + object.media = null; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.data != null && message.hasOwnProperty("data")) + object.data = message.data; + if (message.media != null && message.hasOwnProperty("media")) + object.media = $root.io.cucumber.messages.Media.toObject(message.media, options); + return object; + }; + + /** + * Converts this Source to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Source + * @instance + * @returns {Object.} JSON object + */ + Source.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Source; + })(); + + messages.GherkinDocument = (function() { + + /** + * Properties of a GherkinDocument. + * @memberof io.cucumber.messages + * @interface IGherkinDocument + * @property {string|null} [uri] The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) + * of the source, typically a file path relative to the root directory + * @property {io.cucumber.messages.GherkinDocument.IFeature|null} [feature] GherkinDocument feature + * @property {Array.|null} [comments] GherkinDocument comments + */ + + /** + * Constructs a new GherkinDocument. + * @memberof io.cucumber.messages + * @classdesc The [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) of a Gherkin document. + * Cucumber implementations should *not* depend on `GherkinDocument` or any of its + * children for execution - use [Pickle](#io.cucumber.messages.Pickle) instead. + * + * The only consumers of `GherkinDocument` should only be formatters that produce + * "rich" output, resembling the original Gherkin document. + * @implements IGherkinDocument + * @constructor + * @param {io.cucumber.messages.IGherkinDocument=} [properties] Properties to set + */ + function GherkinDocument(properties) { + this.comments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) + * of the source, typically a file path relative to the root directory + * @member {string} uri + * @memberof io.cucumber.messages.GherkinDocument + * @instance + */ + GherkinDocument.prototype.uri = ""; + + /** + * GherkinDocument feature. + * @member {io.cucumber.messages.GherkinDocument.IFeature|null|undefined} feature + * @memberof io.cucumber.messages.GherkinDocument + * @instance + */ + GherkinDocument.prototype.feature = null; + + /** + * GherkinDocument comments. + * @member {Array.} comments + * @memberof io.cucumber.messages.GherkinDocument + * @instance + */ + GherkinDocument.prototype.comments = $util.emptyArray; + + /** + * Creates a new GherkinDocument instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument + * @static + * @param {io.cucumber.messages.IGherkinDocument=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument} GherkinDocument instance + */ + GherkinDocument.create = function create(properties) { + return new GherkinDocument(properties); + }; + + /** + * Encodes the specified GherkinDocument message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument + * @static + * @param {io.cucumber.messages.IGherkinDocument} message GherkinDocument message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GherkinDocument.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && message.hasOwnProperty("uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.feature != null && message.hasOwnProperty("feature")) + $root.io.cucumber.messages.GherkinDocument.Feature.encode(message.feature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.comments != null && message.comments.length) + for (var i = 0; i < message.comments.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Comment.encode(message.comments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GherkinDocument message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument + * @static + * @param {io.cucumber.messages.IGherkinDocument} message GherkinDocument message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GherkinDocument.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GherkinDocument message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument} GherkinDocument + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GherkinDocument.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + case 2: + message.feature = $root.io.cucumber.messages.GherkinDocument.Feature.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.comments && message.comments.length)) + message.comments = []; + message.comments.push($root.io.cucumber.messages.GherkinDocument.Comment.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GherkinDocument message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument} GherkinDocument + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GherkinDocument.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GherkinDocument message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GherkinDocument.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.feature != null && message.hasOwnProperty("feature")) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.verify(message.feature); + if (error) + return "feature." + error; + } + if (message.comments != null && message.hasOwnProperty("comments")) { + if (!Array.isArray(message.comments)) + return "comments: array expected"; + for (var i = 0; i < message.comments.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Comment.verify(message.comments[i]); + if (error) + return "comments." + error; + } + } + return null; + }; + + /** + * Creates a GherkinDocument message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument} GherkinDocument + */ + GherkinDocument.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.feature != null) { + if (typeof object.feature !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.feature: object expected"); + message.feature = $root.io.cucumber.messages.GherkinDocument.Feature.fromObject(object.feature); + } + if (object.comments) { + if (!Array.isArray(object.comments)) + throw TypeError(".io.cucumber.messages.GherkinDocument.comments: array expected"); + message.comments = []; + for (var i = 0; i < object.comments.length; ++i) { + if (typeof object.comments[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.comments: object expected"); + message.comments[i] = $root.io.cucumber.messages.GherkinDocument.Comment.fromObject(object.comments[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GherkinDocument message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument + * @static + * @param {io.cucumber.messages.GherkinDocument} message GherkinDocument + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GherkinDocument.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.comments = []; + if (options.defaults) { + object.uri = ""; + object.feature = null; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.feature != null && message.hasOwnProperty("feature")) + object.feature = $root.io.cucumber.messages.GherkinDocument.Feature.toObject(message.feature, options); + if (message.comments && message.comments.length) { + object.comments = []; + for (var j = 0; j < message.comments.length; ++j) + object.comments[j] = $root.io.cucumber.messages.GherkinDocument.Comment.toObject(message.comments[j], options); + } + return object; + }; + + /** + * Converts this GherkinDocument to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument + * @instance + * @returns {Object.} JSON object + */ + GherkinDocument.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GherkinDocument.Comment = (function() { + + /** + * Properties of a Comment. + * @memberof io.cucumber.messages.GherkinDocument + * @interface IComment + * @property {io.cucumber.messages.ILocation|null} [location] Comment location + * @property {string|null} [text] Comment text + */ + + /** + * Constructs a new Comment. + * @memberof io.cucumber.messages.GherkinDocument + * @classdesc A comment in a Gherkin document + * @implements IComment + * @constructor + * @param {io.cucumber.messages.GherkinDocument.IComment=} [properties] Properties to set + */ + function Comment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Comment location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @instance + */ + Comment.prototype.location = null; + + /** + * Comment text. + * @member {string} text + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @instance + */ + Comment.prototype.text = ""; + + /** + * Creates a new Comment instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @static + * @param {io.cucumber.messages.GherkinDocument.IComment=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Comment} Comment instance + */ + Comment.create = function create(properties) { + return new Comment(properties); + }; + + /** + * Encodes the specified Comment message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Comment.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @static + * @param {io.cucumber.messages.GherkinDocument.IComment} message Comment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Comment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.text != null && message.hasOwnProperty("text")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); + return writer; + }; + + /** + * Encodes the specified Comment message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Comment.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @static + * @param {io.cucumber.messages.GherkinDocument.IComment} message Comment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Comment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Comment message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Comment} Comment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Comment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Comment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + message.text = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Comment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Comment} Comment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Comment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Comment message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Comment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates a Comment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Comment} Comment + */ + Comment.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Comment) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Comment(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Comment.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from a Comment message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @static + * @param {io.cucumber.messages.GherkinDocument.Comment} message Comment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Comment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.text = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this Comment to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Comment + * @instance + * @returns {Object.} JSON object + */ + Comment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Comment; + })(); + + GherkinDocument.Feature = (function() { + + /** + * Properties of a Feature. + * @memberof io.cucumber.messages.GherkinDocument + * @interface IFeature + * @property {io.cucumber.messages.ILocation|null} [location] Feature location + * @property {Array.|null} [tags] Feature tags + * @property {string|null} [language] Feature language + * @property {string|null} [keyword] Feature keyword + * @property {string|null} [name] Feature name + * @property {string|null} [description] Feature description + * @property {Array.|null} [children] Feature children + */ + + /** + * Constructs a new Feature. + * @memberof io.cucumber.messages.GherkinDocument + * @classdesc The top level node in the AST + * @implements IFeature + * @constructor + * @param {io.cucumber.messages.GherkinDocument.IFeature=} [properties] Properties to set + */ + function Feature(properties) { + this.tags = []; + this.children = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Feature location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @instance + */ + Feature.prototype.location = null; + + /** + * Feature tags. + * @member {Array.} tags + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @instance + */ + Feature.prototype.tags = $util.emptyArray; + + /** + * Feature language. + * @member {string} language + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @instance + */ + Feature.prototype.language = ""; + + /** + * Feature keyword. + * @member {string} keyword + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @instance + */ + Feature.prototype.keyword = ""; + + /** + * Feature name. + * @member {string} name + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @instance + */ + Feature.prototype.name = ""; + + /** + * Feature description. + * @member {string} description + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @instance + */ + Feature.prototype.description = ""; + + /** + * Feature children. + * @member {Array.} children + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @instance + */ + Feature.prototype.children = $util.emptyArray; + + /** + * Creates a new Feature instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @static + * @param {io.cucumber.messages.GherkinDocument.IFeature=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature} Feature instance + */ + Feature.create = function create(properties) { + return new Feature(properties); + }; + + /** + * Encodes the specified Feature message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @static + * @param {io.cucumber.messages.GherkinDocument.IFeature} message Feature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.Tag.encode(message.tags[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.language); + if (message.keyword != null && message.hasOwnProperty("keyword")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.keyword); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.children != null && message.children.length) + for (var i = 0; i < message.children.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.encode(message.children[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Feature message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @static + * @param {io.cucumber.messages.GherkinDocument.IFeature} message Feature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Feature message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature} Feature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feature.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.io.cucumber.messages.GherkinDocument.Feature.Tag.decode(reader, reader.uint32())); + break; + case 3: + message.language = reader.string(); + break; + case 4: + message.keyword = reader.string(); + break; + case 5: + message.name = reader.string(); + break; + case 6: + message.description = reader.string(); + break; + case 7: + if (!(message.children && message.children.length)) + message.children = []; + message.children.push($root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Feature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature} Feature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Feature message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Feature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Tag.verify(message.tags[i]); + if (error) + return "tags." + error; + } + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + if (message.keyword != null && message.hasOwnProperty("keyword")) + if (!$util.isString(message.keyword)) + return "keyword: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.children != null && message.hasOwnProperty("children")) { + if (!Array.isArray(message.children)) + return "children: array expected"; + for (var i = 0; i < message.children.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.verify(message.children[i]); + if (error) + return "children." + error; + } + } + return null; + }; + + /** + * Creates a Feature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature} Feature + */ + Feature.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) { + if (typeof object.tags[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.tags: object expected"); + message.tags[i] = $root.io.cucumber.messages.GherkinDocument.Feature.Tag.fromObject(object.tags[i]); + } + } + if (object.language != null) + message.language = String(object.language); + if (object.keyword != null) + message.keyword = String(object.keyword); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.children) { + if (!Array.isArray(object.children)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.children: array expected"); + message.children = []; + for (var i = 0; i < object.children.length; ++i) { + if (typeof object.children[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.children: object expected"); + message.children[i] = $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.fromObject(object.children[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Feature message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature} message Feature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Feature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tags = []; + object.children = []; + } + if (options.defaults) { + object.location = null; + object.language = ""; + object.keyword = ""; + object.name = ""; + object.description = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.io.cucumber.messages.GherkinDocument.Feature.Tag.toObject(message.tags[j], options); + } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + if (message.keyword != null && message.hasOwnProperty("keyword")) + object.keyword = message.keyword; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.children && message.children.length) { + object.children = []; + for (var j = 0; j < message.children.length; ++j) + object.children[j] = $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.toObject(message.children[j], options); + } + return object; + }; + + /** + * Converts this Feature to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @instance + * @returns {Object.} JSON object + */ + Feature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Feature.Tag = (function() { + + /** + * Properties of a Tag. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @interface ITag + * @property {io.cucumber.messages.ILocation|null} [location] Tag location + * @property {string|null} [name] Tag name + * @property {string|null} [id] Tag id + */ + + /** + * Constructs a new Tag. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @classdesc A tag + * @implements ITag + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.ITag=} [properties] Properties to set + */ + function Tag(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tag location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @instance + */ + Tag.prototype.location = null; + + /** + * Tag name. + * @member {string} name + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @instance + */ + Tag.prototype.name = ""; + + /** + * Tag id. + * @member {string} id + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @instance + */ + Tag.prototype.id = ""; + + /** + * Creates a new Tag instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.ITag=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.Tag} Tag instance + */ + Tag.create = function create(properties) { + return new Tag(properties); + }; + + /** + * Encodes the specified Tag message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Tag.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.ITag} message Tag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tag.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); + return writer; + }; + + /** + * Encodes the specified Tag message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Tag.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.ITag} message Tag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tag message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tag.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.Tag(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + message.name = reader.string(); + break; + case 3: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tag message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tag.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.Tag} Tag + */ + Tag.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.Tag) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.Tag(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Tag.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Tag} message Tag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.name = ""; + object.id = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this Tag to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.Tag + * @instance + * @returns {Object.} JSON object + */ + Tag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Tag; + })(); + + Feature.FeatureChild = (function() { + + /** + * Properties of a FeatureChild. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @interface IFeatureChild + * @property {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.IRule|null} [rule] FeatureChild rule + * @property {io.cucumber.messages.GherkinDocument.Feature.IBackground|null} [background] FeatureChild background + * @property {io.cucumber.messages.GherkinDocument.Feature.IScenario|null} [scenario] FeatureChild scenario + */ + + /** + * Constructs a new FeatureChild. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @classdesc A child node of a `Feature` node + * @implements IFeatureChild + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.IFeatureChild=} [properties] Properties to set + */ + function FeatureChild(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureChild rule. + * @member {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.IRule|null|undefined} rule + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @instance + */ + FeatureChild.prototype.rule = null; + + /** + * FeatureChild background. + * @member {io.cucumber.messages.GherkinDocument.Feature.IBackground|null|undefined} background + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @instance + */ + FeatureChild.prototype.background = null; + + /** + * FeatureChild scenario. + * @member {io.cucumber.messages.GherkinDocument.Feature.IScenario|null|undefined} scenario + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @instance + */ + FeatureChild.prototype.scenario = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FeatureChild value. + * @member {"rule"|"background"|"scenario"|undefined} value + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @instance + */ + Object.defineProperty(FeatureChild.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["rule", "background", "scenario"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeatureChild instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IFeatureChild=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild} FeatureChild instance + */ + FeatureChild.create = function create(properties) { + return new FeatureChild(properties); + }; + + /** + * Encodes the specified FeatureChild message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.FeatureChild.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IFeatureChild} message FeatureChild message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureChild.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rule != null && message.hasOwnProperty("rule")) + $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule.encode(message.rule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.background != null && message.hasOwnProperty("background")) + $root.io.cucumber.messages.GherkinDocument.Feature.Background.encode(message.background, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.scenario != null && message.hasOwnProperty("scenario")) + $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.encode(message.scenario, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeatureChild message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.FeatureChild.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IFeatureChild} message FeatureChild message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureChild.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureChild message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild} FeatureChild + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureChild.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rule = $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule.decode(reader, reader.uint32()); + break; + case 2: + message.background = $root.io.cucumber.messages.GherkinDocument.Feature.Background.decode(reader, reader.uint32()); + break; + case 3: + message.scenario = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureChild message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild} FeatureChild + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureChild.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureChild message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureChild.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rule != null && message.hasOwnProperty("rule")) { + properties.value = 1; + { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule.verify(message.rule); + if (error) + return "rule." + error; + } + } + if (message.background != null && message.hasOwnProperty("background")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Background.verify(message.background); + if (error) + return "background." + error; + } + } + if (message.scenario != null && message.hasOwnProperty("scenario")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.verify(message.scenario); + if (error) + return "scenario." + error; + } + } + return null; + }; + + /** + * Creates a FeatureChild message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild} FeatureChild + */ + FeatureChild.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild(); + if (object.rule != null) { + if (typeof object.rule !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.FeatureChild.rule: object expected"); + message.rule = $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule.fromObject(object.rule); + } + if (object.background != null) { + if (typeof object.background !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.FeatureChild.background: object expected"); + message.background = $root.io.cucumber.messages.GherkinDocument.Feature.Background.fromObject(object.background); + } + if (object.scenario != null) { + if (typeof object.scenario !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.FeatureChild.scenario: object expected"); + message.scenario = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.fromObject(object.scenario); + } + return message; + }; + + /** + * Creates a plain object from a FeatureChild message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild} message FeatureChild + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureChild.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rule != null && message.hasOwnProperty("rule")) { + object.rule = $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule.toObject(message.rule, options); + if (options.oneofs) + object.value = "rule"; + } + if (message.background != null && message.hasOwnProperty("background")) { + object.background = $root.io.cucumber.messages.GherkinDocument.Feature.Background.toObject(message.background, options); + if (options.oneofs) + object.value = "background"; + } + if (message.scenario != null && message.hasOwnProperty("scenario")) { + object.scenario = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.toObject(message.scenario, options); + if (options.oneofs) + object.value = "scenario"; + } + return object; + }; + + /** + * Converts this FeatureChild to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @instance + * @returns {Object.} JSON object + */ + FeatureChild.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + FeatureChild.Rule = (function() { + + /** + * Properties of a Rule. + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @interface IRule + * @property {io.cucumber.messages.ILocation|null} [location] Rule location + * @property {string|null} [keyword] Rule keyword + * @property {string|null} [name] Rule name + * @property {string|null} [description] Rule description + * @property {Array.|null} [children] Rule children + */ + + /** + * Constructs a new Rule. + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @classdesc A `Rule` node + * @implements IRule + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.IRule=} [properties] Properties to set + */ + function Rule(properties) { + this.children = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rule location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @instance + */ + Rule.prototype.location = null; + + /** + * Rule keyword. + * @member {string} keyword + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @instance + */ + Rule.prototype.keyword = ""; + + /** + * Rule name. + * @member {string} name + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @instance + */ + Rule.prototype.name = ""; + + /** + * Rule description. + * @member {string} description + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @instance + */ + Rule.prototype.description = ""; + + /** + * Rule children. + * @member {Array.} children + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @instance + */ + Rule.prototype.children = $util.emptyArray; + + /** + * Creates a new Rule instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.IRule=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule} Rule instance + */ + Rule.create = function create(properties) { + return new Rule(properties); + }; + + /** + * Encodes the specified Rule message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.IRule} message Rule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyword != null && message.hasOwnProperty("keyword")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyword); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.children != null && message.children.length) + for (var i = 0; i < message.children.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild.encode(message.children[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Rule message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.IRule} message Rule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rule message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule} Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + message.keyword = reader.string(); + break; + case 3: + message.name = reader.string(); + break; + case 4: + message.description = reader.string(); + break; + case 5: + if (!(message.children && message.children.length)) + message.children = []; + message.children.push($root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Rule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule} Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rule message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.keyword != null && message.hasOwnProperty("keyword")) + if (!$util.isString(message.keyword)) + return "keyword: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.children != null && message.hasOwnProperty("children")) { + if (!Array.isArray(message.children)) + return "children: array expected"; + for (var i = 0; i < message.children.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild.verify(message.children[i]); + if (error) + return "children." + error; + } + } + return null; + }; + + /** + * Creates a Rule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule} Rule + */ + Rule.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.keyword != null) + message.keyword = String(object.keyword); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.children) { + if (!Array.isArray(object.children)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule.children: array expected"); + message.children = []; + for (var i = 0; i < object.children.length; ++i) { + if (typeof object.children[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule.children: object expected"); + message.children[i] = $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild.fromObject(object.children[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Rule message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule} message Rule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.children = []; + if (options.defaults) { + object.location = null; + object.keyword = ""; + object.name = ""; + object.description = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.keyword != null && message.hasOwnProperty("keyword")) + object.keyword = message.keyword; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.children && message.children.length) { + object.children = []; + for (var j = 0; j < message.children.length; ++j) + object.children[j] = $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild.toObject(message.children[j], options); + } + return object; + }; + + /** + * Converts this Rule to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.Rule + * @instance + * @returns {Object.} JSON object + */ + Rule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Rule; + })(); + + FeatureChild.RuleChild = (function() { + + /** + * Properties of a RuleChild. + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @interface IRuleChild + * @property {io.cucumber.messages.GherkinDocument.Feature.IBackground|null} [background] RuleChild background + * @property {io.cucumber.messages.GherkinDocument.Feature.IScenario|null} [scenario] RuleChild scenario + */ + + /** + * Constructs a new RuleChild. + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild + * @classdesc Represents a RuleChild. + * @implements IRuleChild + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.IRuleChild=} [properties] Properties to set + */ + function RuleChild(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RuleChild background. + * @member {io.cucumber.messages.GherkinDocument.Feature.IBackground|null|undefined} background + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @instance + */ + RuleChild.prototype.background = null; + + /** + * RuleChild scenario. + * @member {io.cucumber.messages.GherkinDocument.Feature.IScenario|null|undefined} scenario + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @instance + */ + RuleChild.prototype.scenario = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RuleChild value. + * @member {"background"|"scenario"|undefined} value + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @instance + */ + Object.defineProperty(RuleChild.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["background", "scenario"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RuleChild instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.IRuleChild=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild} RuleChild instance + */ + RuleChild.create = function create(properties) { + return new RuleChild(properties); + }; + + /** + * Encodes the specified RuleChild message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.IRuleChild} message RuleChild message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuleChild.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.background != null && message.hasOwnProperty("background")) + $root.io.cucumber.messages.GherkinDocument.Feature.Background.encode(message.background, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.scenario != null && message.hasOwnProperty("scenario")) + $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.encode(message.scenario, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RuleChild message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.IRuleChild} message RuleChild message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuleChild.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RuleChild message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild} RuleChild + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuleChild.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.background = $root.io.cucumber.messages.GherkinDocument.Feature.Background.decode(reader, reader.uint32()); + break; + case 2: + message.scenario = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RuleChild message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild} RuleChild + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuleChild.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RuleChild message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RuleChild.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.background != null && message.hasOwnProperty("background")) { + properties.value = 1; + { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Background.verify(message.background); + if (error) + return "background." + error; + } + } + if (message.scenario != null && message.hasOwnProperty("scenario")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.verify(message.scenario); + if (error) + return "scenario." + error; + } + } + return null; + }; + + /** + * Creates a RuleChild message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild} RuleChild + */ + RuleChild.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild(); + if (object.background != null) { + if (typeof object.background !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild.background: object expected"); + message.background = $root.io.cucumber.messages.GherkinDocument.Feature.Background.fromObject(object.background); + } + if (object.scenario != null) { + if (typeof object.scenario !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild.scenario: object expected"); + message.scenario = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.fromObject(object.scenario); + } + return message; + }; + + /** + * Creates a plain object from a RuleChild message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild} message RuleChild + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RuleChild.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.background != null && message.hasOwnProperty("background")) { + object.background = $root.io.cucumber.messages.GherkinDocument.Feature.Background.toObject(message.background, options); + if (options.oneofs) + object.value = "background"; + } + if (message.scenario != null && message.hasOwnProperty("scenario")) { + object.scenario = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.toObject(message.scenario, options); + if (options.oneofs) + object.value = "scenario"; + } + return object; + }; + + /** + * Converts this RuleChild to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.FeatureChild.RuleChild + * @instance + * @returns {Object.} JSON object + */ + RuleChild.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RuleChild; + })(); + + return FeatureChild; + })(); + + Feature.Background = (function() { + + /** + * Properties of a Background. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @interface IBackground + * @property {io.cucumber.messages.ILocation|null} [location] Background location + * @property {string|null} [keyword] Background keyword + * @property {string|null} [name] Background name + * @property {string|null} [description] Background description + * @property {Array.|null} [steps] Background steps + */ + + /** + * Constructs a new Background. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @classdesc Represents a Background. + * @implements IBackground + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.IBackground=} [properties] Properties to set + */ + function Background(properties) { + this.steps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Background location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @instance + */ + Background.prototype.location = null; + + /** + * Background keyword. + * @member {string} keyword + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @instance + */ + Background.prototype.keyword = ""; + + /** + * Background name. + * @member {string} name + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @instance + */ + Background.prototype.name = ""; + + /** + * Background description. + * @member {string} description + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @instance + */ + Background.prototype.description = ""; + + /** + * Background steps. + * @member {Array.} steps + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @instance + */ + Background.prototype.steps = $util.emptyArray; + + /** + * Creates a new Background instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IBackground=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.Background} Background instance + */ + Background.create = function create(properties) { + return new Background(properties); + }; + + /** + * Encodes the specified Background message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Background.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IBackground} message Background message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Background.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyword != null && message.hasOwnProperty("keyword")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyword); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.Step.encode(message.steps[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Background message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Background.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IBackground} message Background message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Background.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Background message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.Background} Background + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Background.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.Background(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + message.keyword = reader.string(); + break; + case 3: + message.name = reader.string(); + break; + case 4: + message.description = reader.string(); + break; + case 5: + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.io.cucumber.messages.GherkinDocument.Feature.Step.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Background message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.Background} Background + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Background.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Background message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Background.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.keyword != null && message.hasOwnProperty("keyword")) + if (!$util.isString(message.keyword)) + return "keyword: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Step.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + return null; + }; + + /** + * Creates a Background message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.Background} Background + */ + Background.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.Background) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.Background(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Background.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.keyword != null) + message.keyword = String(object.keyword); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Background.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Background.steps: object expected"); + message.steps[i] = $root.io.cucumber.messages.GherkinDocument.Feature.Step.fromObject(object.steps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Background message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Background} message Background + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Background.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) { + object.location = null; + object.keyword = ""; + object.name = ""; + object.description = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.keyword != null && message.hasOwnProperty("keyword")) + object.keyword = message.keyword; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.io.cucumber.messages.GherkinDocument.Feature.Step.toObject(message.steps[j], options); + } + return object; + }; + + /** + * Converts this Background to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.Background + * @instance + * @returns {Object.} JSON object + */ + Background.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Background; + })(); + + Feature.Scenario = (function() { + + /** + * Properties of a Scenario. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @interface IScenario + * @property {io.cucumber.messages.ILocation|null} [location] Scenario location + * @property {Array.|null} [tags] Scenario tags + * @property {string|null} [keyword] Scenario keyword + * @property {string|null} [name] Scenario name + * @property {string|null} [description] Scenario description + * @property {Array.|null} [steps] Scenario steps + * @property {Array.|null} [examples] Scenario examples + * @property {string|null} [id] Scenario id + */ + + /** + * Constructs a new Scenario. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @classdesc Represents a Scenario. + * @implements IScenario + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.IScenario=} [properties] Properties to set + */ + function Scenario(properties) { + this.tags = []; + this.steps = []; + this.examples = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Scenario location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @instance + */ + Scenario.prototype.location = null; + + /** + * Scenario tags. + * @member {Array.} tags + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @instance + */ + Scenario.prototype.tags = $util.emptyArray; + + /** + * Scenario keyword. + * @member {string} keyword + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @instance + */ + Scenario.prototype.keyword = ""; + + /** + * Scenario name. + * @member {string} name + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @instance + */ + Scenario.prototype.name = ""; + + /** + * Scenario description. + * @member {string} description + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @instance + */ + Scenario.prototype.description = ""; + + /** + * Scenario steps. + * @member {Array.} steps + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @instance + */ + Scenario.prototype.steps = $util.emptyArray; + + /** + * Scenario examples. + * @member {Array.} examples + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @instance + */ + Scenario.prototype.examples = $util.emptyArray; + + /** + * Scenario id. + * @member {string} id + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @instance + */ + Scenario.prototype.id = ""; + + /** + * Creates a new Scenario instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IScenario=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.Scenario} Scenario instance + */ + Scenario.create = function create(properties) { + return new Scenario(properties); + }; + + /** + * Encodes the specified Scenario message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Scenario.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IScenario} message Scenario message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scenario.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.Tag.encode(message.tags[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyword != null && message.hasOwnProperty("keyword")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyword); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.Step.encode(message.steps[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.examples != null && message.examples.length) + for (var i = 0; i < message.examples.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.encode(message.examples[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.id); + return writer; + }; + + /** + * Encodes the specified Scenario message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Scenario.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IScenario} message Scenario message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scenario.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Scenario message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.Scenario} Scenario + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scenario.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.Scenario(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.io.cucumber.messages.GherkinDocument.Feature.Tag.decode(reader, reader.uint32())); + break; + case 3: + message.keyword = reader.string(); + break; + case 4: + message.name = reader.string(); + break; + case 5: + message.description = reader.string(); + break; + case 6: + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.io.cucumber.messages.GherkinDocument.Feature.Step.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.examples && message.examples.length)) + message.examples = []; + message.examples.push($root.io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.decode(reader, reader.uint32())); + break; + case 8: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Scenario message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.Scenario} Scenario + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scenario.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Scenario message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Scenario.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Tag.verify(message.tags[i]); + if (error) + return "tags." + error; + } + } + if (message.keyword != null && message.hasOwnProperty("keyword")) + if (!$util.isString(message.keyword)) + return "keyword: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Step.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + if (message.examples != null && message.hasOwnProperty("examples")) { + if (!Array.isArray(message.examples)) + return "examples: array expected"; + for (var i = 0; i < message.examples.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.verify(message.examples[i]); + if (error) + return "examples." + error; + } + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a Scenario message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.Scenario} Scenario + */ + Scenario.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.Scenario) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.Scenario(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) { + if (typeof object.tags[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.tags: object expected"); + message.tags[i] = $root.io.cucumber.messages.GherkinDocument.Feature.Tag.fromObject(object.tags[i]); + } + } + if (object.keyword != null) + message.keyword = String(object.keyword); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.steps: object expected"); + message.steps[i] = $root.io.cucumber.messages.GherkinDocument.Feature.Step.fromObject(object.steps[i]); + } + } + if (object.examples) { + if (!Array.isArray(object.examples)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.examples: array expected"); + message.examples = []; + for (var i = 0; i < object.examples.length; ++i) { + if (typeof object.examples[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.examples: object expected"); + message.examples[i] = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.fromObject(object.examples[i]); + } + } + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a Scenario message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Scenario} message Scenario + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Scenario.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tags = []; + object.steps = []; + object.examples = []; + } + if (options.defaults) { + object.location = null; + object.keyword = ""; + object.name = ""; + object.description = ""; + object.id = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.io.cucumber.messages.GherkinDocument.Feature.Tag.toObject(message.tags[j], options); + } + if (message.keyword != null && message.hasOwnProperty("keyword")) + object.keyword = message.keyword; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.io.cucumber.messages.GherkinDocument.Feature.Step.toObject(message.steps[j], options); + } + if (message.examples && message.examples.length) { + object.examples = []; + for (var j = 0; j < message.examples.length; ++j) + object.examples[j] = $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.toObject(message.examples[j], options); + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this Scenario to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @instance + * @returns {Object.} JSON object + */ + Scenario.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Scenario.Examples = (function() { + + /** + * Properties of an Examples. + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @interface IExamples + * @property {io.cucumber.messages.ILocation|null} [location] Examples location + * @property {Array.|null} [tags] Examples tags + * @property {string|null} [keyword] Examples keyword + * @property {string|null} [name] Examples name + * @property {string|null} [description] Examples description + * @property {io.cucumber.messages.GherkinDocument.Feature.ITableRow|null} [tableHeader] Examples tableHeader + * @property {Array.|null} [tableBody] Examples tableBody + */ + + /** + * Constructs a new Examples. + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario + * @classdesc Represents an Examples. + * @implements IExamples + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.Scenario.IExamples=} [properties] Properties to set + */ + function Examples(properties) { + this.tags = []; + this.tableBody = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Examples location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @instance + */ + Examples.prototype.location = null; + + /** + * Examples tags. + * @member {Array.} tags + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @instance + */ + Examples.prototype.tags = $util.emptyArray; + + /** + * Examples keyword. + * @member {string} keyword + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @instance + */ + Examples.prototype.keyword = ""; + + /** + * Examples name. + * @member {string} name + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @instance + */ + Examples.prototype.name = ""; + + /** + * Examples description. + * @member {string} description + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @instance + */ + Examples.prototype.description = ""; + + /** + * Examples tableHeader. + * @member {io.cucumber.messages.GherkinDocument.Feature.ITableRow|null|undefined} tableHeader + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @instance + */ + Examples.prototype.tableHeader = null; + + /** + * Examples tableBody. + * @member {Array.} tableBody + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @instance + */ + Examples.prototype.tableBody = $util.emptyArray; + + /** + * Creates a new Examples instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Scenario.IExamples=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples} Examples instance + */ + Examples.create = function create(properties) { + return new Examples(properties); + }; + + /** + * Encodes the specified Examples message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Scenario.IExamples} message Examples message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Examples.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.Tag.encode(message.tags[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyword != null && message.hasOwnProperty("keyword")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyword); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.tableHeader != null && message.hasOwnProperty("tableHeader")) + $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.encode(message.tableHeader, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.tableBody != null && message.tableBody.length) + for (var i = 0; i < message.tableBody.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.encode(message.tableBody[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Examples message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Scenario.IExamples} message Examples message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Examples.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Examples message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples} Examples + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Examples.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.io.cucumber.messages.GherkinDocument.Feature.Tag.decode(reader, reader.uint32())); + break; + case 3: + message.keyword = reader.string(); + break; + case 4: + message.name = reader.string(); + break; + case 5: + message.description = reader.string(); + break; + case 6: + message.tableHeader = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.tableBody && message.tableBody.length)) + message.tableBody = []; + message.tableBody.push($root.io.cucumber.messages.GherkinDocument.Feature.TableRow.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Examples message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples} Examples + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Examples.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Examples message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Examples.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Tag.verify(message.tags[i]); + if (error) + return "tags." + error; + } + } + if (message.keyword != null && message.hasOwnProperty("keyword")) + if (!$util.isString(message.keyword)) + return "keyword: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.tableHeader != null && message.hasOwnProperty("tableHeader")) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.verify(message.tableHeader); + if (error) + return "tableHeader." + error; + } + if (message.tableBody != null && message.hasOwnProperty("tableBody")) { + if (!Array.isArray(message.tableBody)) + return "tableBody: array expected"; + for (var i = 0; i < message.tableBody.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.verify(message.tableBody[i]); + if (error) + return "tableBody." + error; + } + } + return null; + }; + + /** + * Creates an Examples message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples} Examples + */ + Examples.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) { + if (typeof object.tags[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.tags: object expected"); + message.tags[i] = $root.io.cucumber.messages.GherkinDocument.Feature.Tag.fromObject(object.tags[i]); + } + } + if (object.keyword != null) + message.keyword = String(object.keyword); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.tableHeader != null) { + if (typeof object.tableHeader !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.tableHeader: object expected"); + message.tableHeader = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.fromObject(object.tableHeader); + } + if (object.tableBody) { + if (!Array.isArray(object.tableBody)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.tableBody: array expected"); + message.tableBody = []; + for (var i = 0; i < object.tableBody.length; ++i) { + if (typeof object.tableBody[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples.tableBody: object expected"); + message.tableBody[i] = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.fromObject(object.tableBody[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Examples message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples} message Examples + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Examples.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tags = []; + object.tableBody = []; + } + if (options.defaults) { + object.location = null; + object.keyword = ""; + object.name = ""; + object.description = ""; + object.tableHeader = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.io.cucumber.messages.GherkinDocument.Feature.Tag.toObject(message.tags[j], options); + } + if (message.keyword != null && message.hasOwnProperty("keyword")) + object.keyword = message.keyword; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.tableHeader != null && message.hasOwnProperty("tableHeader")) + object.tableHeader = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.toObject(message.tableHeader, options); + if (message.tableBody && message.tableBody.length) { + object.tableBody = []; + for (var j = 0; j < message.tableBody.length; ++j) + object.tableBody[j] = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.toObject(message.tableBody[j], options); + } + return object; + }; + + /** + * Converts this Examples to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.Scenario.Examples + * @instance + * @returns {Object.} JSON object + */ + Examples.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Examples; + })(); + + return Scenario; + })(); + + Feature.TableRow = (function() { + + /** + * Properties of a TableRow. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @interface ITableRow + * @property {io.cucumber.messages.ILocation|null} [location] TableRow location + * @property {Array.|null} [cells] TableRow cells + * @property {string|null} [id] TableRow id + */ + + /** + * Constructs a new TableRow. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @classdesc Represents a TableRow. + * @implements ITableRow + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.ITableRow=} [properties] Properties to set + */ + function TableRow(properties) { + this.cells = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableRow location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @instance + */ + TableRow.prototype.location = null; + + /** + * TableRow cells. + * @member {Array.} cells + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @instance + */ + TableRow.prototype.cells = $util.emptyArray; + + /** + * TableRow id. + * @member {string} id + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @instance + */ + TableRow.prototype.id = ""; + + /** + * Creates a new TableRow instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.ITableRow=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.TableRow} TableRow instance + */ + TableRow.create = function create(properties) { + return new TableRow(properties); + }; + + /** + * Encodes the specified TableRow message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.TableRow.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.ITableRow} message TableRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell.encode(message.cells[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); + return writer; + }; + + /** + * Encodes the specified TableRow message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.TableRow.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.ITableRow} message TableRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableRow message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.TableRow} TableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableRow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.TableRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push($root.io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell.decode(reader, reader.uint32())); + break; + case 3: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.TableRow} TableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableRow message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell.verify(message.cells[i]); + if (error) + return "cells." + error; + } + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a TableRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.TableRow} TableRow + */ + TableRow.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.TableRow) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.TableRow(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.TableRow.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.TableRow.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) { + if (typeof object.cells[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.TableRow.cells: object expected"); + message.cells[i] = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell.fromObject(object.cells[i]); + } + } + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a TableRow message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.TableRow} message TableRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cells = []; + if (options.defaults) { + object.location = null; + object.id = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell.toObject(message.cells[j], options); + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this TableRow to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @instance + * @returns {Object.} JSON object + */ + TableRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TableRow.TableCell = (function() { + + /** + * Properties of a TableCell. + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @interface ITableCell + * @property {io.cucumber.messages.ILocation|null} [location] TableCell location + * @property {string|null} [value] TableCell value + */ + + /** + * Constructs a new TableCell. + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow + * @classdesc Represents a TableCell. + * @implements ITableCell + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.TableRow.ITableCell=} [properties] Properties to set + */ + function TableCell(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableCell location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @instance + */ + TableCell.prototype.location = null; + + /** + * TableCell value. + * @member {string} value + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @instance + */ + TableCell.prototype.value = ""; + + /** + * Creates a new TableCell instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.TableRow.ITableCell=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell} TableCell instance + */ + TableCell.create = function create(properties) { + return new TableCell(properties); + }; + + /** + * Encodes the specified TableCell message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.TableRow.ITableCell} message TableCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableCell.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified TableCell message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.TableRow.ITableCell} message TableCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableCell.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableCell message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell} TableCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableCell.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableCell message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell} TableCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableCell.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableCell message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableCell.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a TableCell message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell} TableCell + */ + TableCell.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a TableCell message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell} message TableCell + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableCell.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.value = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this TableCell to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.TableRow.TableCell + * @instance + * @returns {Object.} JSON object + */ + TableCell.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TableCell; + })(); + + return TableRow; + })(); + + Feature.Step = (function() { + + /** + * Properties of a Step. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @interface IStep + * @property {io.cucumber.messages.ILocation|null} [location] Step location + * @property {string|null} [keyword] Step keyword + * @property {string|null} [text] Step text + * @property {io.cucumber.messages.GherkinDocument.Feature.Step.IDocString|null} [docString] Step docString + * @property {io.cucumber.messages.GherkinDocument.Feature.Step.IDataTable|null} [dataTable] Step dataTable + * @property {string|null} [id] Step id + */ + + /** + * Constructs a new Step. + * @memberof io.cucumber.messages.GherkinDocument.Feature + * @classdesc Represents a Step. + * @implements IStep + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.IStep=} [properties] Properties to set + */ + function Step(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Step location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @instance + */ + Step.prototype.location = null; + + /** + * Step keyword. + * @member {string} keyword + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @instance + */ + Step.prototype.keyword = ""; + + /** + * Step text. + * @member {string} text + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @instance + */ + Step.prototype.text = ""; + + /** + * Step docString. + * @member {io.cucumber.messages.GherkinDocument.Feature.Step.IDocString|null|undefined} docString + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @instance + */ + Step.prototype.docString = null; + + /** + * Step dataTable. + * @member {io.cucumber.messages.GherkinDocument.Feature.Step.IDataTable|null|undefined} dataTable + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @instance + */ + Step.prototype.dataTable = null; + + /** + * Step id. + * @member {string} id + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @instance + */ + Step.prototype.id = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Step argument. + * @member {"docString"|"dataTable"|undefined} argument + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @instance + */ + Object.defineProperty(Step.prototype, "argument", { + get: $util.oneOfGetter($oneOfFields = ["docString", "dataTable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Step instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IStep=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step} Step instance + */ + Step.create = function create(properties) { + return new Step(properties); + }; + + /** + * Encodes the specified Step message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Step.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyword != null && message.hasOwnProperty("keyword")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyword); + if (message.text != null && message.hasOwnProperty("text")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.text); + if (message.docString != null && message.hasOwnProperty("docString")) + $root.io.cucumber.messages.GherkinDocument.Feature.Step.DocString.encode(message.docString, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dataTable != null && message.hasOwnProperty("dataTable")) + $root.io.cucumber.messages.GherkinDocument.Feature.Step.DataTable.encode(message.dataTable, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.id); + return writer; + }; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Step.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Step message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.Step(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + message.keyword = reader.string(); + break; + case 3: + message.text = reader.string(); + break; + case 5: + message.docString = $root.io.cucumber.messages.GherkinDocument.Feature.Step.DocString.decode(reader, reader.uint32()); + break; + case 6: + message.dataTable = $root.io.cucumber.messages.GherkinDocument.Feature.Step.DataTable.decode(reader, reader.uint32()); + break; + case 7: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Step message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Step.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.keyword != null && message.hasOwnProperty("keyword")) + if (!$util.isString(message.keyword)) + return "keyword: string expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.docString != null && message.hasOwnProperty("docString")) { + properties.argument = 1; + { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Step.DocString.verify(message.docString); + if (error) + return "docString." + error; + } + } + if (message.dataTable != null && message.hasOwnProperty("dataTable")) { + if (properties.argument === 1) + return "argument: multiple values"; + properties.argument = 1; + { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.Step.DataTable.verify(message.dataTable); + if (error) + return "dataTable." + error; + } + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step} Step + */ + Step.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.Step) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.Step(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Step.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.keyword != null) + message.keyword = String(object.keyword); + if (object.text != null) + message.text = String(object.text); + if (object.docString != null) { + if (typeof object.docString !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Step.docString: object expected"); + message.docString = $root.io.cucumber.messages.GherkinDocument.Feature.Step.DocString.fromObject(object.docString); + } + if (object.dataTable != null) { + if (typeof object.dataTable !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Step.dataTable: object expected"); + message.dataTable = $root.io.cucumber.messages.GherkinDocument.Feature.Step.DataTable.fromObject(object.dataTable); + } + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Step} message Step + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Step.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.keyword = ""; + object.text = ""; + object.id = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.keyword != null && message.hasOwnProperty("keyword")) + object.keyword = message.keyword; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.docString != null && message.hasOwnProperty("docString")) { + object.docString = $root.io.cucumber.messages.GherkinDocument.Feature.Step.DocString.toObject(message.docString, options); + if (options.oneofs) + object.argument = "docString"; + } + if (message.dataTable != null && message.hasOwnProperty("dataTable")) { + object.dataTable = $root.io.cucumber.messages.GherkinDocument.Feature.Step.DataTable.toObject(message.dataTable, options); + if (options.oneofs) + object.argument = "dataTable"; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this Step to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @instance + * @returns {Object.} JSON object + */ + Step.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Step.DataTable = (function() { + + /** + * Properties of a DataTable. + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @interface IDataTable + * @property {io.cucumber.messages.ILocation|null} [location] DataTable location + * @property {Array.|null} [rows] DataTable rows + */ + + /** + * Constructs a new DataTable. + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @classdesc Represents a DataTable. + * @implements IDataTable + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.Step.IDataTable=} [properties] Properties to set + */ + function DataTable(properties) { + this.rows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataTable location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @instance + */ + DataTable.prototype.location = null; + + /** + * DataTable rows. + * @member {Array.} rows + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @instance + */ + DataTable.prototype.rows = $util.emptyArray; + + /** + * Creates a new DataTable instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Step.IDataTable=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step.DataTable} DataTable instance + */ + DataTable.create = function create(properties) { + return new DataTable(properties); + }; + + /** + * Encodes the specified DataTable message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Step.DataTable.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Step.IDataTable} message DataTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.encode(message.rows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataTable message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Step.DataTable.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Step.IDataTable} message DataTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataTable message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step.DataTable} DataTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTable.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.Step.DataTable(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.io.cucumber.messages.GherkinDocument.Feature.TableRow.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step.DataTable} DataTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataTable message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataTable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + return null; + }; + + /** + * Creates a DataTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step.DataTable} DataTable + */ + DataTable.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.Step.DataTable) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.Step.DataTable(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Step.DataTable.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Step.DataTable.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Step.DataTable.rows: object expected"); + message.rows[i] = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.fromObject(object.rows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataTable message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Step.DataTable} message DataTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataTable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rows = []; + if (options.defaults) + object.location = null; + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.io.cucumber.messages.GherkinDocument.Feature.TableRow.toObject(message.rows[j], options); + } + return object; + }; + + /** + * Converts this DataTable to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DataTable + * @instance + * @returns {Object.} JSON object + */ + DataTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DataTable; + })(); + + Step.DocString = (function() { + + /** + * Properties of a DocString. + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @interface IDocString + * @property {io.cucumber.messages.ILocation|null} [location] DocString location + * @property {string|null} [contentType] DocString contentType + * @property {string|null} [content] DocString content + * @property {string|null} [delimiter] DocString delimiter + */ + + /** + * Constructs a new DocString. + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step + * @classdesc Represents a DocString. + * @implements IDocString + * @constructor + * @param {io.cucumber.messages.GherkinDocument.Feature.Step.IDocString=} [properties] Properties to set + */ + function DocString(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DocString location. + * @member {io.cucumber.messages.ILocation|null|undefined} location + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @instance + */ + DocString.prototype.location = null; + + /** + * DocString contentType. + * @member {string} contentType + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @instance + */ + DocString.prototype.contentType = ""; + + /** + * DocString content. + * @member {string} content + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @instance + */ + DocString.prototype.content = ""; + + /** + * DocString delimiter. + * @member {string} delimiter + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @instance + */ + DocString.prototype.delimiter = ""; + + /** + * Creates a new DocString instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Step.IDocString=} [properties] Properties to set + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step.DocString} DocString instance + */ + DocString.create = function create(properties) { + return new DocString(properties); + }; + + /** + * Encodes the specified DocString message. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Step.DocString.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Step.IDocString} message DocString message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocString.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + $root.io.cucumber.messages.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.contentType != null && message.hasOwnProperty("contentType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.contentType); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.content); + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.delimiter); + return writer; + }; + + /** + * Encodes the specified DocString message, length delimited. Does not implicitly {@link io.cucumber.messages.GherkinDocument.Feature.Step.DocString.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Step.IDocString} message DocString message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocString.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocString message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step.DocString} DocString + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocString.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GherkinDocument.Feature.Step.DocString(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = $root.io.cucumber.messages.Location.decode(reader, reader.uint32()); + break; + case 2: + message.contentType = reader.string(); + break; + case 3: + message.content = reader.string(); + break; + case 4: + message.delimiter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocString message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step.DocString} DocString + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocString.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocString message. + * @function verify + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocString.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.io.cucumber.messages.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + if (!$util.isString(message.contentType)) + return "contentType: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + return null; + }; + + /** + * Creates a DocString message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GherkinDocument.Feature.Step.DocString} DocString + */ + DocString.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GherkinDocument.Feature.Step.DocString) + return object; + var message = new $root.io.cucumber.messages.GherkinDocument.Feature.Step.DocString(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".io.cucumber.messages.GherkinDocument.Feature.Step.DocString.location: object expected"); + message.location = $root.io.cucumber.messages.Location.fromObject(object.location); + } + if (object.contentType != null) + message.contentType = String(object.contentType); + if (object.content != null) + message.content = String(object.content); + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + return message; + }; + + /** + * Creates a plain object from a DocString message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @static + * @param {io.cucumber.messages.GherkinDocument.Feature.Step.DocString} message DocString + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocString.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.contentType = ""; + object.content = ""; + object.delimiter = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.io.cucumber.messages.Location.toObject(message.location, options); + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = message.contentType; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + return object; + }; + + /** + * Converts this DocString to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GherkinDocument.Feature.Step.DocString + * @instance + * @returns {Object.} JSON object + */ + DocString.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DocString; + })(); + + return Step; + })(); + + return Feature; + })(); + + return GherkinDocument; + })(); + + messages.Attachment = (function() { + + /** + * Properties of an Attachment. + * @memberof io.cucumber.messages + * @interface IAttachment + * @property {io.cucumber.messages.ISourceReference|null} [source] Attachment source + * @property {string|null} [data] Attachment data + * @property {io.cucumber.messages.IMedia|null} [media] Attachment media + * @property {string|null} [testStepId] Attachment testStepId + * @property {string|null} [testCaseStartedId] Attachment testCaseStartedId + */ + + /** + * Constructs a new Attachment. + * @memberof io.cucumber.messages + * @classdesc An attachment represents any kind of data associated with a line in a + * [Source](#io.cucumber.messages.Source) file. It can be used for: + * + * * Syntax errors during parse time + * * Screenshots captured and attached during execution + * * Logs captured and attached during execution + * + * It is not to be used for runtime errors raised/thrown during execution. This + * is captured in `TestResult`. + * @implements IAttachment + * @constructor + * @param {io.cucumber.messages.IAttachment=} [properties] Properties to set + */ + function Attachment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Attachment source. + * @member {io.cucumber.messages.ISourceReference|null|undefined} source + * @memberof io.cucumber.messages.Attachment + * @instance + */ + Attachment.prototype.source = null; + + /** + * Attachment data. + * @member {string} data + * @memberof io.cucumber.messages.Attachment + * @instance + */ + Attachment.prototype.data = ""; + + /** + * Attachment media. + * @member {io.cucumber.messages.IMedia|null|undefined} media + * @memberof io.cucumber.messages.Attachment + * @instance + */ + Attachment.prototype.media = null; + + /** + * Attachment testStepId. + * @member {string} testStepId + * @memberof io.cucumber.messages.Attachment + * @instance + */ + Attachment.prototype.testStepId = ""; + + /** + * Attachment testCaseStartedId. + * @member {string} testCaseStartedId + * @memberof io.cucumber.messages.Attachment + * @instance + */ + Attachment.prototype.testCaseStartedId = ""; + + /** + * Creates a new Attachment instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Attachment + * @static + * @param {io.cucumber.messages.IAttachment=} [properties] Properties to set + * @returns {io.cucumber.messages.Attachment} Attachment instance + */ + Attachment.create = function create(properties) { + return new Attachment(properties); + }; + + /** + * Encodes the specified Attachment message. Does not implicitly {@link io.cucumber.messages.Attachment.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Attachment + * @static + * @param {io.cucumber.messages.IAttachment} message Attachment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attachment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && message.hasOwnProperty("source")) + $root.io.cucumber.messages.SourceReference.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.data != null && message.hasOwnProperty("data")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.data); + if (message.media != null && message.hasOwnProperty("media")) + $root.io.cucumber.messages.Media.encode(message.media, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.testStepId != null && message.hasOwnProperty("testStepId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.testStepId); + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.testCaseStartedId); + return writer; + }; + + /** + * Encodes the specified Attachment message, length delimited. Does not implicitly {@link io.cucumber.messages.Attachment.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Attachment + * @static + * @param {io.cucumber.messages.IAttachment} message Attachment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attachment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Attachment message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Attachment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Attachment} Attachment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attachment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Attachment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.io.cucumber.messages.SourceReference.decode(reader, reader.uint32()); + break; + case 2: + message.data = reader.string(); + break; + case 3: + message.media = $root.io.cucumber.messages.Media.decode(reader, reader.uint32()); + break; + case 4: + message.testStepId = reader.string(); + break; + case 5: + message.testCaseStartedId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Attachment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Attachment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Attachment} Attachment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attachment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Attachment message. + * @function verify + * @memberof io.cucumber.messages.Attachment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Attachment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.io.cucumber.messages.SourceReference.verify(message.source); + if (error) + return "source." + error; + } + if (message.data != null && message.hasOwnProperty("data")) + if (!$util.isString(message.data)) + return "data: string expected"; + if (message.media != null && message.hasOwnProperty("media")) { + var error = $root.io.cucumber.messages.Media.verify(message.media); + if (error) + return "media." + error; + } + if (message.testStepId != null && message.hasOwnProperty("testStepId")) + if (!$util.isString(message.testStepId)) + return "testStepId: string expected"; + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + if (!$util.isString(message.testCaseStartedId)) + return "testCaseStartedId: string expected"; + return null; + }; + + /** + * Creates an Attachment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Attachment + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Attachment} Attachment + */ + Attachment.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Attachment) + return object; + var message = new $root.io.cucumber.messages.Attachment(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".io.cucumber.messages.Attachment.source: object expected"); + message.source = $root.io.cucumber.messages.SourceReference.fromObject(object.source); + } + if (object.data != null) + message.data = String(object.data); + if (object.media != null) { + if (typeof object.media !== "object") + throw TypeError(".io.cucumber.messages.Attachment.media: object expected"); + message.media = $root.io.cucumber.messages.Media.fromObject(object.media); + } + if (object.testStepId != null) + message.testStepId = String(object.testStepId); + if (object.testCaseStartedId != null) + message.testCaseStartedId = String(object.testCaseStartedId); + return message; + }; + + /** + * Creates a plain object from an Attachment message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Attachment + * @static + * @param {io.cucumber.messages.Attachment} message Attachment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Attachment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.data = ""; + object.media = null; + object.testStepId = ""; + object.testCaseStartedId = ""; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.io.cucumber.messages.SourceReference.toObject(message.source, options); + if (message.data != null && message.hasOwnProperty("data")) + object.data = message.data; + if (message.media != null && message.hasOwnProperty("media")) + object.media = $root.io.cucumber.messages.Media.toObject(message.media, options); + if (message.testStepId != null && message.hasOwnProperty("testStepId")) + object.testStepId = message.testStepId; + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + object.testCaseStartedId = message.testCaseStartedId; + return object; + }; + + /** + * Converts this Attachment to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Attachment + * @instance + * @returns {Object.} JSON object + */ + Attachment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Attachment; + })(); + + messages.Pickle = (function() { + + /** + * Properties of a Pickle. + * @memberof io.cucumber.messages + * @interface IPickle + * @property {string|null} [id] A unique id for the pickle. This is a [SHA1](https://en.wikipedia.org/wiki/SHA-1) hash + * from the source data and the `locations` of the pickle. + * This ID will change if source the file is modified. + * @property {string|null} [uri] Pickle uri + * @property {string|null} [name] Pickle name + * @property {string|null} [language] Pickle language + * @property {Array.|null} [steps] Pickle steps + * @property {Array.|null} [tags] One or more tags. If this pickle is constructed from a Gherkin document, + * It includes inherited tags from the `Feature` as well. + * @property {Array.|null} [astNodeIds] Points to the AST node locations of the pickle. The last one represents the unique + * id of the pickle. A pickle constructed from `Examples` will have the first + * id originating from the `Scenario` AST node, and the second from the `TableRow` AST node. + */ + + /** + * Constructs a new Pickle. + * @memberof io.cucumber.messages + * @classdesc A `Pickle` represents a test case Cucumber can *execute*. It is typically derived + * from another format, such as [GherkinDocument](#io.cucumber.messages.GherkinDocument). + * In the future a `Pickle` may be derived from other formats such as Markdown or + * Excel files. + * + * By making `Pickle` the main data structure Cucumber uses for execution, the + * implementation of Cucumber itself becomes simpler, as it doesn't have to deal + * with the complex structure of a [GherkinDocument](#io.cucumber.messages.GherkinDocument). + * @implements IPickle + * @constructor + * @param {io.cucumber.messages.IPickle=} [properties] Properties to set + */ + function Pickle(properties) { + this.steps = []; + this.tags = []; + this.astNodeIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * A unique id for the pickle. This is a [SHA1](https://en.wikipedia.org/wiki/SHA-1) hash + * from the source data and the `locations` of the pickle. + * This ID will change if source the file is modified. + * @member {string} id + * @memberof io.cucumber.messages.Pickle + * @instance + */ + Pickle.prototype.id = ""; + + /** + * Pickle uri. + * @member {string} uri + * @memberof io.cucumber.messages.Pickle + * @instance + */ + Pickle.prototype.uri = ""; + + /** + * Pickle name. + * @member {string} name + * @memberof io.cucumber.messages.Pickle + * @instance + */ + Pickle.prototype.name = ""; + + /** + * Pickle language. + * @member {string} language + * @memberof io.cucumber.messages.Pickle + * @instance + */ + Pickle.prototype.language = ""; + + /** + * Pickle steps. + * @member {Array.} steps + * @memberof io.cucumber.messages.Pickle + * @instance + */ + Pickle.prototype.steps = $util.emptyArray; + + /** + * One or more tags. If this pickle is constructed from a Gherkin document, + * It includes inherited tags from the `Feature` as well. + * @member {Array.} tags + * @memberof io.cucumber.messages.Pickle + * @instance + */ + Pickle.prototype.tags = $util.emptyArray; + + /** + * Points to the AST node locations of the pickle. The last one represents the unique + * id of the pickle. A pickle constructed from `Examples` will have the first + * id originating from the `Scenario` AST node, and the second from the `TableRow` AST node. + * @member {Array.} astNodeIds + * @memberof io.cucumber.messages.Pickle + * @instance + */ + Pickle.prototype.astNodeIds = $util.emptyArray; + + /** + * Creates a new Pickle instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Pickle + * @static + * @param {io.cucumber.messages.IPickle=} [properties] Properties to set + * @returns {io.cucumber.messages.Pickle} Pickle instance + */ + Pickle.create = function create(properties) { + return new Pickle(properties); + }; + + /** + * Encodes the specified Pickle message. Does not implicitly {@link io.cucumber.messages.Pickle.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Pickle + * @static + * @param {io.cucumber.messages.IPickle} message Pickle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pickle.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.uri != null && message.hasOwnProperty("uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.language); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.io.cucumber.messages.Pickle.PickleStep.encode(message.steps[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.io.cucumber.messages.Pickle.PickleTag.encode(message.tags[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.astNodeIds != null && message.astNodeIds.length) + for (var i = 0; i < message.astNodeIds.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.astNodeIds[i]); + return writer; + }; + + /** + * Encodes the specified Pickle message, length delimited. Does not implicitly {@link io.cucumber.messages.Pickle.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Pickle + * @static + * @param {io.cucumber.messages.IPickle} message Pickle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pickle.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pickle message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Pickle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Pickle} Pickle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pickle.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Pickle(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.uri = reader.string(); + break; + case 3: + message.name = reader.string(); + break; + case 4: + message.language = reader.string(); + break; + case 5: + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.io.cucumber.messages.Pickle.PickleStep.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.io.cucumber.messages.Pickle.PickleTag.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.astNodeIds && message.astNodeIds.length)) + message.astNodeIds = []; + message.astNodeIds.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pickle message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Pickle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Pickle} Pickle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pickle.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pickle message. + * @function verify + * @memberof io.cucumber.messages.Pickle + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pickle.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.io.cucumber.messages.Pickle.PickleStep.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.io.cucumber.messages.Pickle.PickleTag.verify(message.tags[i]); + if (error) + return "tags." + error; + } + } + if (message.astNodeIds != null && message.hasOwnProperty("astNodeIds")) { + if (!Array.isArray(message.astNodeIds)) + return "astNodeIds: array expected"; + for (var i = 0; i < message.astNodeIds.length; ++i) + if (!$util.isString(message.astNodeIds[i])) + return "astNodeIds: string[] expected"; + } + return null; + }; + + /** + * Creates a Pickle message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Pickle + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Pickle} Pickle + */ + Pickle.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Pickle) + return object; + var message = new $root.io.cucumber.messages.Pickle(); + if (object.id != null) + message.id = String(object.id); + if (object.uri != null) + message.uri = String(object.uri); + if (object.name != null) + message.name = String(object.name); + if (object.language != null) + message.language = String(object.language); + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".io.cucumber.messages.Pickle.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".io.cucumber.messages.Pickle.steps: object expected"); + message.steps[i] = $root.io.cucumber.messages.Pickle.PickleStep.fromObject(object.steps[i]); + } + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".io.cucumber.messages.Pickle.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) { + if (typeof object.tags[i] !== "object") + throw TypeError(".io.cucumber.messages.Pickle.tags: object expected"); + message.tags[i] = $root.io.cucumber.messages.Pickle.PickleTag.fromObject(object.tags[i]); + } + } + if (object.astNodeIds) { + if (!Array.isArray(object.astNodeIds)) + throw TypeError(".io.cucumber.messages.Pickle.astNodeIds: array expected"); + message.astNodeIds = []; + for (var i = 0; i < object.astNodeIds.length; ++i) + message.astNodeIds[i] = String(object.astNodeIds[i]); + } + return message; + }; + + /** + * Creates a plain object from a Pickle message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Pickle + * @static + * @param {io.cucumber.messages.Pickle} message Pickle + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pickle.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.steps = []; + object.tags = []; + object.astNodeIds = []; + } + if (options.defaults) { + object.id = ""; + object.uri = ""; + object.name = ""; + object.language = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.io.cucumber.messages.Pickle.PickleStep.toObject(message.steps[j], options); + } + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.io.cucumber.messages.Pickle.PickleTag.toObject(message.tags[j], options); + } + if (message.astNodeIds && message.astNodeIds.length) { + object.astNodeIds = []; + for (var j = 0; j < message.astNodeIds.length; ++j) + object.astNodeIds[j] = message.astNodeIds[j]; + } + return object; + }; + + /** + * Converts this Pickle to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Pickle + * @instance + * @returns {Object.} JSON object + */ + Pickle.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Pickle.PickleTag = (function() { + + /** + * Properties of a PickleTag. + * @memberof io.cucumber.messages.Pickle + * @interface IPickleTag + * @property {string|null} [name] PickleTag name + * @property {string|null} [astNodeId] PickleTag astNodeId + */ + + /** + * Constructs a new PickleTag. + * @memberof io.cucumber.messages.Pickle + * @classdesc A tag + * @implements IPickleTag + * @constructor + * @param {io.cucumber.messages.Pickle.IPickleTag=} [properties] Properties to set + */ + function PickleTag(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickleTag name. + * @member {string} name + * @memberof io.cucumber.messages.Pickle.PickleTag + * @instance + */ + PickleTag.prototype.name = ""; + + /** + * PickleTag astNodeId. + * @member {string} astNodeId + * @memberof io.cucumber.messages.Pickle.PickleTag + * @instance + */ + PickleTag.prototype.astNodeId = ""; + + /** + * Creates a new PickleTag instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Pickle.PickleTag + * @static + * @param {io.cucumber.messages.Pickle.IPickleTag=} [properties] Properties to set + * @returns {io.cucumber.messages.Pickle.PickleTag} PickleTag instance + */ + PickleTag.create = function create(properties) { + return new PickleTag(properties); + }; + + /** + * Encodes the specified PickleTag message. Does not implicitly {@link io.cucumber.messages.Pickle.PickleTag.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Pickle.PickleTag + * @static + * @param {io.cucumber.messages.Pickle.IPickleTag} message PickleTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleTag.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.astNodeId != null && message.hasOwnProperty("astNodeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.astNodeId); + return writer; + }; + + /** + * Encodes the specified PickleTag message, length delimited. Does not implicitly {@link io.cucumber.messages.Pickle.PickleTag.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Pickle.PickleTag + * @static + * @param {io.cucumber.messages.Pickle.IPickleTag} message PickleTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleTag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickleTag message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Pickle.PickleTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Pickle.PickleTag} PickleTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleTag.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Pickle.PickleTag(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.astNodeId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickleTag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Pickle.PickleTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Pickle.PickleTag} PickleTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleTag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickleTag message. + * @function verify + * @memberof io.cucumber.messages.Pickle.PickleTag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickleTag.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.astNodeId != null && message.hasOwnProperty("astNodeId")) + if (!$util.isString(message.astNodeId)) + return "astNodeId: string expected"; + return null; + }; + + /** + * Creates a PickleTag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Pickle.PickleTag + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Pickle.PickleTag} PickleTag + */ + PickleTag.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Pickle.PickleTag) + return object; + var message = new $root.io.cucumber.messages.Pickle.PickleTag(); + if (object.name != null) + message.name = String(object.name); + if (object.astNodeId != null) + message.astNodeId = String(object.astNodeId); + return message; + }; + + /** + * Creates a plain object from a PickleTag message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Pickle.PickleTag + * @static + * @param {io.cucumber.messages.Pickle.PickleTag} message PickleTag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickleTag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.astNodeId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.astNodeId != null && message.hasOwnProperty("astNodeId")) + object.astNodeId = message.astNodeId; + return object; + }; + + /** + * Converts this PickleTag to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Pickle.PickleTag + * @instance + * @returns {Object.} JSON object + */ + PickleTag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PickleTag; + })(); + + Pickle.PickleStep = (function() { + + /** + * Properties of a PickleStep. + * @memberof io.cucumber.messages.Pickle + * @interface IPickleStep + * @property {string|null} [text] PickleStep text + * @property {io.cucumber.messages.IPickleStepArgument|null} [argument] PickleStep argument + * @property {string|null} [id] PickleStep id + * @property {Array.|null} [astNodeIds] PickleStep astNodeIds + */ + + /** + * Constructs a new PickleStep. + * @memberof io.cucumber.messages.Pickle + * @classdesc An executable step + * @implements IPickleStep + * @constructor + * @param {io.cucumber.messages.Pickle.IPickleStep=} [properties] Properties to set + */ + function PickleStep(properties) { + this.astNodeIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickleStep text. + * @member {string} text + * @memberof io.cucumber.messages.Pickle.PickleStep + * @instance + */ + PickleStep.prototype.text = ""; + + /** + * PickleStep argument. + * @member {io.cucumber.messages.IPickleStepArgument|null|undefined} argument + * @memberof io.cucumber.messages.Pickle.PickleStep + * @instance + */ + PickleStep.prototype.argument = null; + + /** + * PickleStep id. + * @member {string} id + * @memberof io.cucumber.messages.Pickle.PickleStep + * @instance + */ + PickleStep.prototype.id = ""; + + /** + * PickleStep astNodeIds. + * @member {Array.} astNodeIds + * @memberof io.cucumber.messages.Pickle.PickleStep + * @instance + */ + PickleStep.prototype.astNodeIds = $util.emptyArray; + + /** + * Creates a new PickleStep instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Pickle.PickleStep + * @static + * @param {io.cucumber.messages.Pickle.IPickleStep=} [properties] Properties to set + * @returns {io.cucumber.messages.Pickle.PickleStep} PickleStep instance + */ + PickleStep.create = function create(properties) { + return new PickleStep(properties); + }; + + /** + * Encodes the specified PickleStep message. Does not implicitly {@link io.cucumber.messages.Pickle.PickleStep.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Pickle.PickleStep + * @static + * @param {io.cucumber.messages.Pickle.IPickleStep} message PickleStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.hasOwnProperty("text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.argument != null && message.hasOwnProperty("argument")) + $root.io.cucumber.messages.PickleStepArgument.encode(message.argument, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); + if (message.astNodeIds != null && message.astNodeIds.length) + for (var i = 0; i < message.astNodeIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.astNodeIds[i]); + return writer; + }; + + /** + * Encodes the specified PickleStep message, length delimited. Does not implicitly {@link io.cucumber.messages.Pickle.PickleStep.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Pickle.PickleStep + * @static + * @param {io.cucumber.messages.Pickle.IPickleStep} message PickleStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickleStep message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Pickle.PickleStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Pickle.PickleStep} PickleStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Pickle.PickleStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + message.argument = $root.io.cucumber.messages.PickleStepArgument.decode(reader, reader.uint32()); + break; + case 3: + message.id = reader.string(); + break; + case 4: + if (!(message.astNodeIds && message.astNodeIds.length)) + message.astNodeIds = []; + message.astNodeIds.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickleStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Pickle.PickleStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Pickle.PickleStep} PickleStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickleStep message. + * @function verify + * @memberof io.cucumber.messages.Pickle.PickleStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickleStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.argument != null && message.hasOwnProperty("argument")) { + var error = $root.io.cucumber.messages.PickleStepArgument.verify(message.argument); + if (error) + return "argument." + error; + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.astNodeIds != null && message.hasOwnProperty("astNodeIds")) { + if (!Array.isArray(message.astNodeIds)) + return "astNodeIds: array expected"; + for (var i = 0; i < message.astNodeIds.length; ++i) + if (!$util.isString(message.astNodeIds[i])) + return "astNodeIds: string[] expected"; + } + return null; + }; + + /** + * Creates a PickleStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Pickle.PickleStep + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Pickle.PickleStep} PickleStep + */ + PickleStep.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Pickle.PickleStep) + return object; + var message = new $root.io.cucumber.messages.Pickle.PickleStep(); + if (object.text != null) + message.text = String(object.text); + if (object.argument != null) { + if (typeof object.argument !== "object") + throw TypeError(".io.cucumber.messages.Pickle.PickleStep.argument: object expected"); + message.argument = $root.io.cucumber.messages.PickleStepArgument.fromObject(object.argument); + } + if (object.id != null) + message.id = String(object.id); + if (object.astNodeIds) { + if (!Array.isArray(object.astNodeIds)) + throw TypeError(".io.cucumber.messages.Pickle.PickleStep.astNodeIds: array expected"); + message.astNodeIds = []; + for (var i = 0; i < object.astNodeIds.length; ++i) + message.astNodeIds[i] = String(object.astNodeIds[i]); + } + return message; + }; + + /** + * Creates a plain object from a PickleStep message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Pickle.PickleStep + * @static + * @param {io.cucumber.messages.Pickle.PickleStep} message PickleStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickleStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.astNodeIds = []; + if (options.defaults) { + object.text = ""; + object.argument = null; + object.id = ""; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.argument != null && message.hasOwnProperty("argument")) + object.argument = $root.io.cucumber.messages.PickleStepArgument.toObject(message.argument, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.astNodeIds && message.astNodeIds.length) { + object.astNodeIds = []; + for (var j = 0; j < message.astNodeIds.length; ++j) + object.astNodeIds[j] = message.astNodeIds[j]; + } + return object; + }; + + /** + * Converts this PickleStep to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Pickle.PickleStep + * @instance + * @returns {Object.} JSON object + */ + PickleStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PickleStep; + })(); + + return Pickle; + })(); + + messages.PickleStepArgument = (function() { + + /** + * Properties of a PickleStepArgument. + * @memberof io.cucumber.messages + * @interface IPickleStepArgument + * @property {io.cucumber.messages.PickleStepArgument.IPickleDocString|null} [docString] PickleStepArgument docString + * @property {io.cucumber.messages.PickleStepArgument.IPickleTable|null} [dataTable] PickleStepArgument dataTable + */ + + /** + * Constructs a new PickleStepArgument. + * @memberof io.cucumber.messages + * @classdesc A wrapper for either a doc string or a table. + * @implements IPickleStepArgument + * @constructor + * @param {io.cucumber.messages.IPickleStepArgument=} [properties] Properties to set + */ + function PickleStepArgument(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickleStepArgument docString. + * @member {io.cucumber.messages.PickleStepArgument.IPickleDocString|null|undefined} docString + * @memberof io.cucumber.messages.PickleStepArgument + * @instance + */ + PickleStepArgument.prototype.docString = null; + + /** + * PickleStepArgument dataTable. + * @member {io.cucumber.messages.PickleStepArgument.IPickleTable|null|undefined} dataTable + * @memberof io.cucumber.messages.PickleStepArgument + * @instance + */ + PickleStepArgument.prototype.dataTable = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PickleStepArgument message. + * @member {"docString"|"dataTable"|undefined} message + * @memberof io.cucumber.messages.PickleStepArgument + * @instance + */ + Object.defineProperty(PickleStepArgument.prototype, "message", { + get: $util.oneOfGetter($oneOfFields = ["docString", "dataTable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PickleStepArgument instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.PickleStepArgument + * @static + * @param {io.cucumber.messages.IPickleStepArgument=} [properties] Properties to set + * @returns {io.cucumber.messages.PickleStepArgument} PickleStepArgument instance + */ + PickleStepArgument.create = function create(properties) { + return new PickleStepArgument(properties); + }; + + /** + * Encodes the specified PickleStepArgument message. Does not implicitly {@link io.cucumber.messages.PickleStepArgument.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.PickleStepArgument + * @static + * @param {io.cucumber.messages.IPickleStepArgument} message PickleStepArgument message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleStepArgument.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.docString != null && message.hasOwnProperty("docString")) + $root.io.cucumber.messages.PickleStepArgument.PickleDocString.encode(message.docString, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dataTable != null && message.hasOwnProperty("dataTable")) + $root.io.cucumber.messages.PickleStepArgument.PickleTable.encode(message.dataTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PickleStepArgument message, length delimited. Does not implicitly {@link io.cucumber.messages.PickleStepArgument.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.PickleStepArgument + * @static + * @param {io.cucumber.messages.IPickleStepArgument} message PickleStepArgument message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleStepArgument.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickleStepArgument message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.PickleStepArgument + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.PickleStepArgument} PickleStepArgument + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleStepArgument.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.PickleStepArgument(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.docString = $root.io.cucumber.messages.PickleStepArgument.PickleDocString.decode(reader, reader.uint32()); + break; + case 2: + message.dataTable = $root.io.cucumber.messages.PickleStepArgument.PickleTable.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickleStepArgument message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.PickleStepArgument + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.PickleStepArgument} PickleStepArgument + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleStepArgument.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickleStepArgument message. + * @function verify + * @memberof io.cucumber.messages.PickleStepArgument + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickleStepArgument.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.docString != null && message.hasOwnProperty("docString")) { + properties.message = 1; + { + var error = $root.io.cucumber.messages.PickleStepArgument.PickleDocString.verify(message.docString); + if (error) + return "docString." + error; + } + } + if (message.dataTable != null && message.hasOwnProperty("dataTable")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.io.cucumber.messages.PickleStepArgument.PickleTable.verify(message.dataTable); + if (error) + return "dataTable." + error; + } + } + return null; + }; + + /** + * Creates a PickleStepArgument message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.PickleStepArgument + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.PickleStepArgument} PickleStepArgument + */ + PickleStepArgument.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.PickleStepArgument) + return object; + var message = new $root.io.cucumber.messages.PickleStepArgument(); + if (object.docString != null) { + if (typeof object.docString !== "object") + throw TypeError(".io.cucumber.messages.PickleStepArgument.docString: object expected"); + message.docString = $root.io.cucumber.messages.PickleStepArgument.PickleDocString.fromObject(object.docString); + } + if (object.dataTable != null) { + if (typeof object.dataTable !== "object") + throw TypeError(".io.cucumber.messages.PickleStepArgument.dataTable: object expected"); + message.dataTable = $root.io.cucumber.messages.PickleStepArgument.PickleTable.fromObject(object.dataTable); + } + return message; + }; + + /** + * Creates a plain object from a PickleStepArgument message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.PickleStepArgument + * @static + * @param {io.cucumber.messages.PickleStepArgument} message PickleStepArgument + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickleStepArgument.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.docString != null && message.hasOwnProperty("docString")) { + object.docString = $root.io.cucumber.messages.PickleStepArgument.PickleDocString.toObject(message.docString, options); + if (options.oneofs) + object.message = "docString"; + } + if (message.dataTable != null && message.hasOwnProperty("dataTable")) { + object.dataTable = $root.io.cucumber.messages.PickleStepArgument.PickleTable.toObject(message.dataTable, options); + if (options.oneofs) + object.message = "dataTable"; + } + return object; + }; + + /** + * Converts this PickleStepArgument to JSON. + * @function toJSON + * @memberof io.cucumber.messages.PickleStepArgument + * @instance + * @returns {Object.} JSON object + */ + PickleStepArgument.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + PickleStepArgument.PickleDocString = (function() { + + /** + * Properties of a PickleDocString. + * @memberof io.cucumber.messages.PickleStepArgument + * @interface IPickleDocString + * @property {string|null} [contentType] PickleDocString contentType + * @property {string|null} [content] PickleDocString content + */ + + /** + * Constructs a new PickleDocString. + * @memberof io.cucumber.messages.PickleStepArgument + * @classdesc Represents a PickleDocString. + * @implements IPickleDocString + * @constructor + * @param {io.cucumber.messages.PickleStepArgument.IPickleDocString=} [properties] Properties to set + */ + function PickleDocString(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickleDocString contentType. + * @member {string} contentType + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @instance + */ + PickleDocString.prototype.contentType = ""; + + /** + * PickleDocString content. + * @member {string} content + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @instance + */ + PickleDocString.prototype.content = ""; + + /** + * Creates a new PickleDocString instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @static + * @param {io.cucumber.messages.PickleStepArgument.IPickleDocString=} [properties] Properties to set + * @returns {io.cucumber.messages.PickleStepArgument.PickleDocString} PickleDocString instance + */ + PickleDocString.create = function create(properties) { + return new PickleDocString(properties); + }; + + /** + * Encodes the specified PickleDocString message. Does not implicitly {@link io.cucumber.messages.PickleStepArgument.PickleDocString.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @static + * @param {io.cucumber.messages.PickleStepArgument.IPickleDocString} message PickleDocString message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleDocString.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contentType != null && message.hasOwnProperty("contentType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.contentType); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + return writer; + }; + + /** + * Encodes the specified PickleDocString message, length delimited. Does not implicitly {@link io.cucumber.messages.PickleStepArgument.PickleDocString.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @static + * @param {io.cucumber.messages.PickleStepArgument.IPickleDocString} message PickleDocString message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleDocString.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickleDocString message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.PickleStepArgument.PickleDocString} PickleDocString + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleDocString.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.PickleStepArgument.PickleDocString(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.contentType = reader.string(); + break; + case 2: + message.content = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickleDocString message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.PickleStepArgument.PickleDocString} PickleDocString + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleDocString.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickleDocString message. + * @function verify + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickleDocString.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contentType != null && message.hasOwnProperty("contentType")) + if (!$util.isString(message.contentType)) + return "contentType: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + return null; + }; + + /** + * Creates a PickleDocString message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.PickleStepArgument.PickleDocString} PickleDocString + */ + PickleDocString.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.PickleStepArgument.PickleDocString) + return object; + var message = new $root.io.cucumber.messages.PickleStepArgument.PickleDocString(); + if (object.contentType != null) + message.contentType = String(object.contentType); + if (object.content != null) + message.content = String(object.content); + return message; + }; + + /** + * Creates a plain object from a PickleDocString message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @static + * @param {io.cucumber.messages.PickleStepArgument.PickleDocString} message PickleDocString + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickleDocString.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.contentType = ""; + object.content = ""; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = message.contentType; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + return object; + }; + + /** + * Converts this PickleDocString to JSON. + * @function toJSON + * @memberof io.cucumber.messages.PickleStepArgument.PickleDocString + * @instance + * @returns {Object.} JSON object + */ + PickleDocString.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PickleDocString; + })(); + + PickleStepArgument.PickleTable = (function() { + + /** + * Properties of a PickleTable. + * @memberof io.cucumber.messages.PickleStepArgument + * @interface IPickleTable + * @property {Array.|null} [rows] PickleTable rows + */ + + /** + * Constructs a new PickleTable. + * @memberof io.cucumber.messages.PickleStepArgument + * @classdesc Represents a PickleTable. + * @implements IPickleTable + * @constructor + * @param {io.cucumber.messages.PickleStepArgument.IPickleTable=} [properties] Properties to set + */ + function PickleTable(properties) { + this.rows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickleTable rows. + * @member {Array.} rows + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @instance + */ + PickleTable.prototype.rows = $util.emptyArray; + + /** + * Creates a new PickleTable instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @static + * @param {io.cucumber.messages.PickleStepArgument.IPickleTable=} [properties] Properties to set + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable} PickleTable instance + */ + PickleTable.create = function create(properties) { + return new PickleTable(properties); + }; + + /** + * Encodes the specified PickleTable message. Does not implicitly {@link io.cucumber.messages.PickleStepArgument.PickleTable.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @static + * @param {io.cucumber.messages.PickleStepArgument.IPickleTable} message PickleTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleTable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PickleTable message, length delimited. Does not implicitly {@link io.cucumber.messages.PickleStepArgument.PickleTable.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @static + * @param {io.cucumber.messages.PickleStepArgument.IPickleTable} message PickleTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleTable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickleTable message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable} PickleTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleTable.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.PickleStepArgument.PickleTable(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickleTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable} PickleTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickleTable message. + * @function verify + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickleTable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + return null; + }; + + /** + * Creates a PickleTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable} PickleTable + */ + PickleTable.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.PickleStepArgument.PickleTable) + return object; + var message = new $root.io.cucumber.messages.PickleStepArgument.PickleTable(); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".io.cucumber.messages.PickleStepArgument.PickleTable.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".io.cucumber.messages.PickleStepArgument.PickleTable.rows: object expected"); + message.rows[i] = $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.fromObject(object.rows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PickleTable message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @static + * @param {io.cucumber.messages.PickleStepArgument.PickleTable} message PickleTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickleTable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rows = []; + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.toObject(message.rows[j], options); + } + return object; + }; + + /** + * Converts this PickleTable to JSON. + * @function toJSON + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @instance + * @returns {Object.} JSON object + */ + PickleTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + PickleTable.PickleTableRow = (function() { + + /** + * Properties of a PickleTableRow. + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @interface IPickleTableRow + * @property {Array.|null} [cells] PickleTableRow cells + */ + + /** + * Constructs a new PickleTableRow. + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable + * @classdesc Represents a PickleTableRow. + * @implements IPickleTableRow + * @constructor + * @param {io.cucumber.messages.PickleStepArgument.PickleTable.IPickleTableRow=} [properties] Properties to set + */ + function PickleTableRow(properties) { + this.cells = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickleTableRow cells. + * @member {Array.} cells + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @instance + */ + PickleTableRow.prototype.cells = $util.emptyArray; + + /** + * Creates a new PickleTableRow instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @static + * @param {io.cucumber.messages.PickleStepArgument.PickleTable.IPickleTableRow=} [properties] Properties to set + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow} PickleTableRow instance + */ + PickleTableRow.create = function create(properties) { + return new PickleTableRow(properties); + }; + + /** + * Encodes the specified PickleTableRow message. Does not implicitly {@link io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @static + * @param {io.cucumber.messages.PickleStepArgument.PickleTable.IPickleTableRow} message PickleTableRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleTableRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell.encode(message.cells[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PickleTableRow message, length delimited. Does not implicitly {@link io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @static + * @param {io.cucumber.messages.PickleStepArgument.PickleTable.IPickleTableRow} message PickleTableRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleTableRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickleTableRow message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow} PickleTableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleTableRow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push($root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickleTableRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow} PickleTableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleTableRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickleTableRow message. + * @function verify + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickleTableRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) { + var error = $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell.verify(message.cells[i]); + if (error) + return "cells." + error; + } + } + return null; + }; + + /** + * Creates a PickleTableRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow} PickleTableRow + */ + PickleTableRow.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow) + return object; + var message = new $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow(); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) { + if (typeof object.cells[i] !== "object") + throw TypeError(".io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.cells: object expected"); + message.cells[i] = $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell.fromObject(object.cells[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PickleTableRow message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @static + * @param {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow} message PickleTableRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickleTableRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cells = []; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell.toObject(message.cells[j], options); + } + return object; + }; + + /** + * Converts this PickleTableRow to JSON. + * @function toJSON + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @instance + * @returns {Object.} JSON object + */ + PickleTableRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + PickleTableRow.PickleTableCell = (function() { + + /** + * Properties of a PickleTableCell. + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @interface IPickleTableCell + * @property {string|null} [value] PickleTableCell value + */ + + /** + * Constructs a new PickleTableCell. + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow + * @classdesc Represents a PickleTableCell. + * @implements IPickleTableCell + * @constructor + * @param {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.IPickleTableCell=} [properties] Properties to set + */ + function PickleTableCell(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickleTableCell value. + * @member {string} value + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell + * @instance + */ + PickleTableCell.prototype.value = ""; + + /** + * Creates a new PickleTableCell instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell + * @static + * @param {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.IPickleTableCell=} [properties] Properties to set + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell} PickleTableCell instance + */ + PickleTableCell.create = function create(properties) { + return new PickleTableCell(properties); + }; + + /** + * Encodes the specified PickleTableCell message. Does not implicitly {@link io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell + * @static + * @param {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.IPickleTableCell} message PickleTableCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleTableCell.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified PickleTableCell message, length delimited. Does not implicitly {@link io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell + * @static + * @param {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.IPickleTableCell} message PickleTableCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleTableCell.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickleTableCell message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell} PickleTableCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleTableCell.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickleTableCell message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell} PickleTableCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleTableCell.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickleTableCell message. + * @function verify + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickleTableCell.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a PickleTableCell message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell} PickleTableCell + */ + PickleTableCell.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell) + return object; + var message = new $root.io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a PickleTableCell message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell + * @static + * @param {io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell} message PickleTableCell + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickleTableCell.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this PickleTableCell to JSON. + * @function toJSON + * @memberof io.cucumber.messages.PickleStepArgument.PickleTable.PickleTableRow.PickleTableCell + * @instance + * @returns {Object.} JSON object + */ + PickleTableCell.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PickleTableCell; + })(); + + return PickleTableRow; + })(); + + return PickleTable; + })(); + + return PickleStepArgument; + })(); + + messages.TestCase = (function() { + + /** + * Properties of a TestCase. + * @memberof io.cucumber.messages + * @interface ITestCase + * @property {string|null} [id] TestCase id + * @property {string|null} [pickleId] TestCase pickleId + * @property {Array.|null} [testSteps] TestCase testSteps + */ + + /** + * Constructs a new TestCase. + * @memberof io.cucumber.messages + * @classdesc Represents a TestCase. + * @implements ITestCase + * @constructor + * @param {io.cucumber.messages.ITestCase=} [properties] Properties to set + */ + function TestCase(properties) { + this.testSteps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestCase id. + * @member {string} id + * @memberof io.cucumber.messages.TestCase + * @instance + */ + TestCase.prototype.id = ""; + + /** + * TestCase pickleId. + * @member {string} pickleId + * @memberof io.cucumber.messages.TestCase + * @instance + */ + TestCase.prototype.pickleId = ""; + + /** + * TestCase testSteps. + * @member {Array.} testSteps + * @memberof io.cucumber.messages.TestCase + * @instance + */ + TestCase.prototype.testSteps = $util.emptyArray; + + /** + * Creates a new TestCase instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestCase + * @static + * @param {io.cucumber.messages.ITestCase=} [properties] Properties to set + * @returns {io.cucumber.messages.TestCase} TestCase instance + */ + TestCase.create = function create(properties) { + return new TestCase(properties); + }; + + /** + * Encodes the specified TestCase message. Does not implicitly {@link io.cucumber.messages.TestCase.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestCase + * @static + * @param {io.cucumber.messages.ITestCase} message TestCase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pickleId); + if (message.testSteps != null && message.testSteps.length) + for (var i = 0; i < message.testSteps.length; ++i) + $root.io.cucumber.messages.TestCase.TestStep.encode(message.testSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TestCase message, length delimited. Does not implicitly {@link io.cucumber.messages.TestCase.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestCase + * @static + * @param {io.cucumber.messages.ITestCase} message TestCase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestCase message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestCase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestCase} TestCase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCase.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestCase(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.pickleId = reader.string(); + break; + case 3: + if (!(message.testSteps && message.testSteps.length)) + message.testSteps = []; + message.testSteps.push($root.io.cucumber.messages.TestCase.TestStep.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestCase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestCase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestCase} TestCase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestCase message. + * @function verify + * @memberof io.cucumber.messages.TestCase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestCase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + if (!$util.isString(message.pickleId)) + return "pickleId: string expected"; + if (message.testSteps != null && message.hasOwnProperty("testSteps")) { + if (!Array.isArray(message.testSteps)) + return "testSteps: array expected"; + for (var i = 0; i < message.testSteps.length; ++i) { + var error = $root.io.cucumber.messages.TestCase.TestStep.verify(message.testSteps[i]); + if (error) + return "testSteps." + error; + } + } + return null; + }; + + /** + * Creates a TestCase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestCase + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestCase} TestCase + */ + TestCase.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestCase) + return object; + var message = new $root.io.cucumber.messages.TestCase(); + if (object.id != null) + message.id = String(object.id); + if (object.pickleId != null) + message.pickleId = String(object.pickleId); + if (object.testSteps) { + if (!Array.isArray(object.testSteps)) + throw TypeError(".io.cucumber.messages.TestCase.testSteps: array expected"); + message.testSteps = []; + for (var i = 0; i < object.testSteps.length; ++i) { + if (typeof object.testSteps[i] !== "object") + throw TypeError(".io.cucumber.messages.TestCase.testSteps: object expected"); + message.testSteps[i] = $root.io.cucumber.messages.TestCase.TestStep.fromObject(object.testSteps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TestCase message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestCase + * @static + * @param {io.cucumber.messages.TestCase} message TestCase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestCase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.testSteps = []; + if (options.defaults) { + object.id = ""; + object.pickleId = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + object.pickleId = message.pickleId; + if (message.testSteps && message.testSteps.length) { + object.testSteps = []; + for (var j = 0; j < message.testSteps.length; ++j) + object.testSteps[j] = $root.io.cucumber.messages.TestCase.TestStep.toObject(message.testSteps[j], options); + } + return object; + }; + + /** + * Converts this TestCase to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestCase + * @instance + * @returns {Object.} JSON object + */ + TestCase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TestCase.TestStep = (function() { + + /** + * Properties of a TestStep. + * @memberof io.cucumber.messages.TestCase + * @interface ITestStep + * @property {string|null} [id] TestStep id + * @property {string|null} [pickleStepId] TestStep pickleStepId + * @property {Array.|null} [stepDefinitionIds] TestStep stepDefinitionIds + * @property {Array.|null} [stepMatchArguments] TestStep stepMatchArguments + * @property {string|null} [hookId] TestStep hookId + */ + + /** + * Constructs a new TestStep. + * @memberof io.cucumber.messages.TestCase + * @classdesc Represents a TestStep. + * @implements ITestStep + * @constructor + * @param {io.cucumber.messages.TestCase.ITestStep=} [properties] Properties to set + */ + function TestStep(properties) { + this.stepDefinitionIds = []; + this.stepMatchArguments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestStep id. + * @member {string} id + * @memberof io.cucumber.messages.TestCase.TestStep + * @instance + */ + TestStep.prototype.id = ""; + + /** + * TestStep pickleStepId. + * @member {string} pickleStepId + * @memberof io.cucumber.messages.TestCase.TestStep + * @instance + */ + TestStep.prototype.pickleStepId = ""; + + /** + * TestStep stepDefinitionIds. + * @member {Array.} stepDefinitionIds + * @memberof io.cucumber.messages.TestCase.TestStep + * @instance + */ + TestStep.prototype.stepDefinitionIds = $util.emptyArray; + + /** + * TestStep stepMatchArguments. + * @member {Array.} stepMatchArguments + * @memberof io.cucumber.messages.TestCase.TestStep + * @instance + */ + TestStep.prototype.stepMatchArguments = $util.emptyArray; + + /** + * TestStep hookId. + * @member {string} hookId + * @memberof io.cucumber.messages.TestCase.TestStep + * @instance + */ + TestStep.prototype.hookId = ""; + + /** + * Creates a new TestStep instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestCase.TestStep + * @static + * @param {io.cucumber.messages.TestCase.ITestStep=} [properties] Properties to set + * @returns {io.cucumber.messages.TestCase.TestStep} TestStep instance + */ + TestStep.create = function create(properties) { + return new TestStep(properties); + }; + + /** + * Encodes the specified TestStep message. Does not implicitly {@link io.cucumber.messages.TestCase.TestStep.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestCase.TestStep + * @static + * @param {io.cucumber.messages.TestCase.ITestStep} message TestStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.pickleStepId != null && message.hasOwnProperty("pickleStepId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pickleStepId); + if (message.stepDefinitionIds != null && message.stepDefinitionIds.length) + for (var i = 0; i < message.stepDefinitionIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stepDefinitionIds[i]); + if (message.stepMatchArguments != null && message.stepMatchArguments.length) + for (var i = 0; i < message.stepMatchArguments.length; ++i) + $root.io.cucumber.messages.StepMatchArgument.encode(message.stepMatchArguments[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.hookId != null && message.hasOwnProperty("hookId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.hookId); + return writer; + }; + + /** + * Encodes the specified TestStep message, length delimited. Does not implicitly {@link io.cucumber.messages.TestCase.TestStep.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestCase.TestStep + * @static + * @param {io.cucumber.messages.TestCase.ITestStep} message TestStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestStep message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestCase.TestStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestCase.TestStep} TestStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestCase.TestStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.pickleStepId = reader.string(); + break; + case 3: + if (!(message.stepDefinitionIds && message.stepDefinitionIds.length)) + message.stepDefinitionIds = []; + message.stepDefinitionIds.push(reader.string()); + break; + case 4: + if (!(message.stepMatchArguments && message.stepMatchArguments.length)) + message.stepMatchArguments = []; + message.stepMatchArguments.push($root.io.cucumber.messages.StepMatchArgument.decode(reader, reader.uint32())); + break; + case 5: + message.hookId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestCase.TestStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestCase.TestStep} TestStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestStep message. + * @function verify + * @memberof io.cucumber.messages.TestCase.TestStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.pickleStepId != null && message.hasOwnProperty("pickleStepId")) + if (!$util.isString(message.pickleStepId)) + return "pickleStepId: string expected"; + if (message.stepDefinitionIds != null && message.hasOwnProperty("stepDefinitionIds")) { + if (!Array.isArray(message.stepDefinitionIds)) + return "stepDefinitionIds: array expected"; + for (var i = 0; i < message.stepDefinitionIds.length; ++i) + if (!$util.isString(message.stepDefinitionIds[i])) + return "stepDefinitionIds: string[] expected"; + } + if (message.stepMatchArguments != null && message.hasOwnProperty("stepMatchArguments")) { + if (!Array.isArray(message.stepMatchArguments)) + return "stepMatchArguments: array expected"; + for (var i = 0; i < message.stepMatchArguments.length; ++i) { + var error = $root.io.cucumber.messages.StepMatchArgument.verify(message.stepMatchArguments[i]); + if (error) + return "stepMatchArguments." + error; + } + } + if (message.hookId != null && message.hasOwnProperty("hookId")) + if (!$util.isString(message.hookId)) + return "hookId: string expected"; + return null; + }; + + /** + * Creates a TestStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestCase.TestStep + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestCase.TestStep} TestStep + */ + TestStep.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestCase.TestStep) + return object; + var message = new $root.io.cucumber.messages.TestCase.TestStep(); + if (object.id != null) + message.id = String(object.id); + if (object.pickleStepId != null) + message.pickleStepId = String(object.pickleStepId); + if (object.stepDefinitionIds) { + if (!Array.isArray(object.stepDefinitionIds)) + throw TypeError(".io.cucumber.messages.TestCase.TestStep.stepDefinitionIds: array expected"); + message.stepDefinitionIds = []; + for (var i = 0; i < object.stepDefinitionIds.length; ++i) + message.stepDefinitionIds[i] = String(object.stepDefinitionIds[i]); + } + if (object.stepMatchArguments) { + if (!Array.isArray(object.stepMatchArguments)) + throw TypeError(".io.cucumber.messages.TestCase.TestStep.stepMatchArguments: array expected"); + message.stepMatchArguments = []; + for (var i = 0; i < object.stepMatchArguments.length; ++i) { + if (typeof object.stepMatchArguments[i] !== "object") + throw TypeError(".io.cucumber.messages.TestCase.TestStep.stepMatchArguments: object expected"); + message.stepMatchArguments[i] = $root.io.cucumber.messages.StepMatchArgument.fromObject(object.stepMatchArguments[i]); + } + } + if (object.hookId != null) + message.hookId = String(object.hookId); + return message; + }; + + /** + * Creates a plain object from a TestStep message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestCase.TestStep + * @static + * @param {io.cucumber.messages.TestCase.TestStep} message TestStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.stepDefinitionIds = []; + object.stepMatchArguments = []; + } + if (options.defaults) { + object.id = ""; + object.pickleStepId = ""; + object.hookId = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.pickleStepId != null && message.hasOwnProperty("pickleStepId")) + object.pickleStepId = message.pickleStepId; + if (message.stepDefinitionIds && message.stepDefinitionIds.length) { + object.stepDefinitionIds = []; + for (var j = 0; j < message.stepDefinitionIds.length; ++j) + object.stepDefinitionIds[j] = message.stepDefinitionIds[j]; + } + if (message.stepMatchArguments && message.stepMatchArguments.length) { + object.stepMatchArguments = []; + for (var j = 0; j < message.stepMatchArguments.length; ++j) + object.stepMatchArguments[j] = $root.io.cucumber.messages.StepMatchArgument.toObject(message.stepMatchArguments[j], options); + } + if (message.hookId != null && message.hasOwnProperty("hookId")) + object.hookId = message.hookId; + return object; + }; + + /** + * Converts this TestStep to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestCase.TestStep + * @instance + * @returns {Object.} JSON object + */ + TestStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TestStep; + })(); + + return TestCase; + })(); + + messages.PickleAccepted = (function() { + + /** + * Properties of a PickleAccepted. + * @memberof io.cucumber.messages + * @interface IPickleAccepted + * @property {string|null} [pickleId] PickleAccepted pickleId + */ + + /** + * Constructs a new PickleAccepted. + * @memberof io.cucumber.messages + * @classdesc Represents a PickleAccepted. + * @implements IPickleAccepted + * @constructor + * @param {io.cucumber.messages.IPickleAccepted=} [properties] Properties to set + */ + function PickleAccepted(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickleAccepted pickleId. + * @member {string} pickleId + * @memberof io.cucumber.messages.PickleAccepted + * @instance + */ + PickleAccepted.prototype.pickleId = ""; + + /** + * Creates a new PickleAccepted instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.PickleAccepted + * @static + * @param {io.cucumber.messages.IPickleAccepted=} [properties] Properties to set + * @returns {io.cucumber.messages.PickleAccepted} PickleAccepted instance + */ + PickleAccepted.create = function create(properties) { + return new PickleAccepted(properties); + }; + + /** + * Encodes the specified PickleAccepted message. Does not implicitly {@link io.cucumber.messages.PickleAccepted.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.PickleAccepted + * @static + * @param {io.cucumber.messages.IPickleAccepted} message PickleAccepted message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleAccepted.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pickleId); + return writer; + }; + + /** + * Encodes the specified PickleAccepted message, length delimited. Does not implicitly {@link io.cucumber.messages.PickleAccepted.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.PickleAccepted + * @static + * @param {io.cucumber.messages.IPickleAccepted} message PickleAccepted message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleAccepted.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickleAccepted message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.PickleAccepted + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.PickleAccepted} PickleAccepted + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleAccepted.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.PickleAccepted(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pickleId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickleAccepted message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.PickleAccepted + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.PickleAccepted} PickleAccepted + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleAccepted.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickleAccepted message. + * @function verify + * @memberof io.cucumber.messages.PickleAccepted + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickleAccepted.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + if (!$util.isString(message.pickleId)) + return "pickleId: string expected"; + return null; + }; + + /** + * Creates a PickleAccepted message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.PickleAccepted + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.PickleAccepted} PickleAccepted + */ + PickleAccepted.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.PickleAccepted) + return object; + var message = new $root.io.cucumber.messages.PickleAccepted(); + if (object.pickleId != null) + message.pickleId = String(object.pickleId); + return message; + }; + + /** + * Creates a plain object from a PickleAccepted message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.PickleAccepted + * @static + * @param {io.cucumber.messages.PickleAccepted} message PickleAccepted + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickleAccepted.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pickleId = ""; + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + object.pickleId = message.pickleId; + return object; + }; + + /** + * Converts this PickleAccepted to JSON. + * @function toJSON + * @memberof io.cucumber.messages.PickleAccepted + * @instance + * @returns {Object.} JSON object + */ + PickleAccepted.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PickleAccepted; + })(); + + messages.PickleRejected = (function() { + + /** + * Properties of a PickleRejected. + * @memberof io.cucumber.messages + * @interface IPickleRejected + * @property {string|null} [pickleId] PickleRejected pickleId + */ + + /** + * Constructs a new PickleRejected. + * @memberof io.cucumber.messages + * @classdesc Represents a PickleRejected. + * @implements IPickleRejected + * @constructor + * @param {io.cucumber.messages.IPickleRejected=} [properties] Properties to set + */ + function PickleRejected(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickleRejected pickleId. + * @member {string} pickleId + * @memberof io.cucumber.messages.PickleRejected + * @instance + */ + PickleRejected.prototype.pickleId = ""; + + /** + * Creates a new PickleRejected instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.PickleRejected + * @static + * @param {io.cucumber.messages.IPickleRejected=} [properties] Properties to set + * @returns {io.cucumber.messages.PickleRejected} PickleRejected instance + */ + PickleRejected.create = function create(properties) { + return new PickleRejected(properties); + }; + + /** + * Encodes the specified PickleRejected message. Does not implicitly {@link io.cucumber.messages.PickleRejected.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.PickleRejected + * @static + * @param {io.cucumber.messages.IPickleRejected} message PickleRejected message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleRejected.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pickleId); + return writer; + }; + + /** + * Encodes the specified PickleRejected message, length delimited. Does not implicitly {@link io.cucumber.messages.PickleRejected.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.PickleRejected + * @static + * @param {io.cucumber.messages.IPickleRejected} message PickleRejected message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickleRejected.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickleRejected message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.PickleRejected + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.PickleRejected} PickleRejected + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleRejected.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.PickleRejected(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.pickleId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickleRejected message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.PickleRejected + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.PickleRejected} PickleRejected + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickleRejected.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickleRejected message. + * @function verify + * @memberof io.cucumber.messages.PickleRejected + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickleRejected.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + if (!$util.isString(message.pickleId)) + return "pickleId: string expected"; + return null; + }; + + /** + * Creates a PickleRejected message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.PickleRejected + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.PickleRejected} PickleRejected + */ + PickleRejected.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.PickleRejected) + return object; + var message = new $root.io.cucumber.messages.PickleRejected(); + if (object.pickleId != null) + message.pickleId = String(object.pickleId); + return message; + }; + + /** + * Creates a plain object from a PickleRejected message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.PickleRejected + * @static + * @param {io.cucumber.messages.PickleRejected} message PickleRejected + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickleRejected.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pickleId = ""; + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + object.pickleId = message.pickleId; + return object; + }; + + /** + * Converts this PickleRejected to JSON. + * @function toJSON + * @memberof io.cucumber.messages.PickleRejected + * @instance + * @returns {Object.} JSON object + */ + PickleRejected.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PickleRejected; + })(); + + messages.TestRunStarted = (function() { + + /** + * Properties of a TestRunStarted. + * @memberof io.cucumber.messages + * @interface ITestRunStarted + * @property {io.cucumber.messages.ITimestamp|null} [timestamp] TestRunStarted timestamp + */ + + /** + * Constructs a new TestRunStarted. + * @memberof io.cucumber.messages + * @classdesc Represents a TestRunStarted. + * @implements ITestRunStarted + * @constructor + * @param {io.cucumber.messages.ITestRunStarted=} [properties] Properties to set + */ + function TestRunStarted(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestRunStarted timestamp. + * @member {io.cucumber.messages.ITimestamp|null|undefined} timestamp + * @memberof io.cucumber.messages.TestRunStarted + * @instance + */ + TestRunStarted.prototype.timestamp = null; + + /** + * Creates a new TestRunStarted instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestRunStarted + * @static + * @param {io.cucumber.messages.ITestRunStarted=} [properties] Properties to set + * @returns {io.cucumber.messages.TestRunStarted} TestRunStarted instance + */ + TestRunStarted.create = function create(properties) { + return new TestRunStarted(properties); + }; + + /** + * Encodes the specified TestRunStarted message. Does not implicitly {@link io.cucumber.messages.TestRunStarted.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestRunStarted + * @static + * @param {io.cucumber.messages.ITestRunStarted} message TestRunStarted message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestRunStarted.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.io.cucumber.messages.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TestRunStarted message, length delimited. Does not implicitly {@link io.cucumber.messages.TestRunStarted.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestRunStarted + * @static + * @param {io.cucumber.messages.ITestRunStarted} message TestRunStarted message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestRunStarted.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestRunStarted message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestRunStarted + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestRunStarted} TestRunStarted + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestRunStarted.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestRunStarted(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timestamp = $root.io.cucumber.messages.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestRunStarted message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestRunStarted + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestRunStarted} TestRunStarted + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestRunStarted.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestRunStarted message. + * @function verify + * @memberof io.cucumber.messages.TestRunStarted + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestRunStarted.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.io.cucumber.messages.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a TestRunStarted message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestRunStarted + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestRunStarted} TestRunStarted + */ + TestRunStarted.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestRunStarted) + return object; + var message = new $root.io.cucumber.messages.TestRunStarted(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".io.cucumber.messages.TestRunStarted.timestamp: object expected"); + message.timestamp = $root.io.cucumber.messages.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from a TestRunStarted message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestRunStarted + * @static + * @param {io.cucumber.messages.TestRunStarted} message TestRunStarted + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestRunStarted.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.timestamp = null; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.io.cucumber.messages.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this TestRunStarted to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestRunStarted + * @instance + * @returns {Object.} JSON object + */ + TestRunStarted.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TestRunStarted; + })(); + + messages.TestCasePreparedStep = (function() { + + /** + * Properties of a TestCasePreparedStep. + * @memberof io.cucumber.messages + * @interface ITestCasePreparedStep + * @property {io.cucumber.messages.ISourceReference|null} [sourceLocation] TestCasePreparedStep sourceLocation + * @property {io.cucumber.messages.ISourceReference|null} [actionLocation] TestCasePreparedStep actionLocation + */ + + /** + * Constructs a new TestCasePreparedStep. + * @memberof io.cucumber.messages + * @classdesc Represents a TestCasePreparedStep. + * @implements ITestCasePreparedStep + * @constructor + * @param {io.cucumber.messages.ITestCasePreparedStep=} [properties] Properties to set + */ + function TestCasePreparedStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestCasePreparedStep sourceLocation. + * @member {io.cucumber.messages.ISourceReference|null|undefined} sourceLocation + * @memberof io.cucumber.messages.TestCasePreparedStep + * @instance + */ + TestCasePreparedStep.prototype.sourceLocation = null; + + /** + * TestCasePreparedStep actionLocation. + * @member {io.cucumber.messages.ISourceReference|null|undefined} actionLocation + * @memberof io.cucumber.messages.TestCasePreparedStep + * @instance + */ + TestCasePreparedStep.prototype.actionLocation = null; + + /** + * Creates a new TestCasePreparedStep instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestCasePreparedStep + * @static + * @param {io.cucumber.messages.ITestCasePreparedStep=} [properties] Properties to set + * @returns {io.cucumber.messages.TestCasePreparedStep} TestCasePreparedStep instance + */ + TestCasePreparedStep.create = function create(properties) { + return new TestCasePreparedStep(properties); + }; + + /** + * Encodes the specified TestCasePreparedStep message. Does not implicitly {@link io.cucumber.messages.TestCasePreparedStep.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestCasePreparedStep + * @static + * @param {io.cucumber.messages.ITestCasePreparedStep} message TestCasePreparedStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCasePreparedStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + $root.io.cucumber.messages.SourceReference.encode(message.sourceLocation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.actionLocation != null && message.hasOwnProperty("actionLocation")) + $root.io.cucumber.messages.SourceReference.encode(message.actionLocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TestCasePreparedStep message, length delimited. Does not implicitly {@link io.cucumber.messages.TestCasePreparedStep.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestCasePreparedStep + * @static + * @param {io.cucumber.messages.ITestCasePreparedStep} message TestCasePreparedStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCasePreparedStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestCasePreparedStep message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestCasePreparedStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestCasePreparedStep} TestCasePreparedStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCasePreparedStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestCasePreparedStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sourceLocation = $root.io.cucumber.messages.SourceReference.decode(reader, reader.uint32()); + break; + case 2: + message.actionLocation = $root.io.cucumber.messages.SourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestCasePreparedStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestCasePreparedStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestCasePreparedStep} TestCasePreparedStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCasePreparedStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestCasePreparedStep message. + * @function verify + * @memberof io.cucumber.messages.TestCasePreparedStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestCasePreparedStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { + var error = $root.io.cucumber.messages.SourceReference.verify(message.sourceLocation); + if (error) + return "sourceLocation." + error; + } + if (message.actionLocation != null && message.hasOwnProperty("actionLocation")) { + var error = $root.io.cucumber.messages.SourceReference.verify(message.actionLocation); + if (error) + return "actionLocation." + error; + } + return null; + }; + + /** + * Creates a TestCasePreparedStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestCasePreparedStep + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestCasePreparedStep} TestCasePreparedStep + */ + TestCasePreparedStep.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestCasePreparedStep) + return object; + var message = new $root.io.cucumber.messages.TestCasePreparedStep(); + if (object.sourceLocation != null) { + if (typeof object.sourceLocation !== "object") + throw TypeError(".io.cucumber.messages.TestCasePreparedStep.sourceLocation: object expected"); + message.sourceLocation = $root.io.cucumber.messages.SourceReference.fromObject(object.sourceLocation); + } + if (object.actionLocation != null) { + if (typeof object.actionLocation !== "object") + throw TypeError(".io.cucumber.messages.TestCasePreparedStep.actionLocation: object expected"); + message.actionLocation = $root.io.cucumber.messages.SourceReference.fromObject(object.actionLocation); + } + return message; + }; + + /** + * Creates a plain object from a TestCasePreparedStep message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestCasePreparedStep + * @static + * @param {io.cucumber.messages.TestCasePreparedStep} message TestCasePreparedStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestCasePreparedStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceLocation = null; + object.actionLocation = null; + } + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + object.sourceLocation = $root.io.cucumber.messages.SourceReference.toObject(message.sourceLocation, options); + if (message.actionLocation != null && message.hasOwnProperty("actionLocation")) + object.actionLocation = $root.io.cucumber.messages.SourceReference.toObject(message.actionLocation, options); + return object; + }; + + /** + * Converts this TestCasePreparedStep to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestCasePreparedStep + * @instance + * @returns {Object.} JSON object + */ + TestCasePreparedStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TestCasePreparedStep; + })(); + + messages.TestCasePrepared = (function() { + + /** + * Properties of a TestCasePrepared. + * @memberof io.cucumber.messages + * @interface ITestCasePrepared + * @property {string|null} [pickleId] TestCasePrepared pickleId + * @property {Array.|null} [steps] TestCasePrepared steps + */ + + /** + * Constructs a new TestCasePrepared. + * @memberof io.cucumber.messages + * @classdesc Represents a TestCasePrepared. + * @implements ITestCasePrepared + * @constructor + * @param {io.cucumber.messages.ITestCasePrepared=} [properties] Properties to set + */ + function TestCasePrepared(properties) { + this.steps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestCasePrepared pickleId. + * @member {string} pickleId + * @memberof io.cucumber.messages.TestCasePrepared + * @instance + */ + TestCasePrepared.prototype.pickleId = ""; + + /** + * TestCasePrepared steps. + * @member {Array.} steps + * @memberof io.cucumber.messages.TestCasePrepared + * @instance + */ + TestCasePrepared.prototype.steps = $util.emptyArray; + + /** + * Creates a new TestCasePrepared instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestCasePrepared + * @static + * @param {io.cucumber.messages.ITestCasePrepared=} [properties] Properties to set + * @returns {io.cucumber.messages.TestCasePrepared} TestCasePrepared instance + */ + TestCasePrepared.create = function create(properties) { + return new TestCasePrepared(properties); + }; + + /** + * Encodes the specified TestCasePrepared message. Does not implicitly {@link io.cucumber.messages.TestCasePrepared.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestCasePrepared + * @static + * @param {io.cucumber.messages.ITestCasePrepared} message TestCasePrepared message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCasePrepared.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pickleId); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.io.cucumber.messages.TestCasePreparedStep.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TestCasePrepared message, length delimited. Does not implicitly {@link io.cucumber.messages.TestCasePrepared.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestCasePrepared + * @static + * @param {io.cucumber.messages.ITestCasePrepared} message TestCasePrepared message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCasePrepared.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestCasePrepared message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestCasePrepared + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestCasePrepared} TestCasePrepared + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCasePrepared.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestCasePrepared(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pickleId = reader.string(); + break; + case 2: + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.io.cucumber.messages.TestCasePreparedStep.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestCasePrepared message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestCasePrepared + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestCasePrepared} TestCasePrepared + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCasePrepared.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestCasePrepared message. + * @function verify + * @memberof io.cucumber.messages.TestCasePrepared + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestCasePrepared.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + if (!$util.isString(message.pickleId)) + return "pickleId: string expected"; + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.io.cucumber.messages.TestCasePreparedStep.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + return null; + }; + + /** + * Creates a TestCasePrepared message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestCasePrepared + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestCasePrepared} TestCasePrepared + */ + TestCasePrepared.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestCasePrepared) + return object; + var message = new $root.io.cucumber.messages.TestCasePrepared(); + if (object.pickleId != null) + message.pickleId = String(object.pickleId); + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".io.cucumber.messages.TestCasePrepared.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".io.cucumber.messages.TestCasePrepared.steps: object expected"); + message.steps[i] = $root.io.cucumber.messages.TestCasePreparedStep.fromObject(object.steps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TestCasePrepared message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestCasePrepared + * @static + * @param {io.cucumber.messages.TestCasePrepared} message TestCasePrepared + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestCasePrepared.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) + object.pickleId = ""; + if (message.pickleId != null && message.hasOwnProperty("pickleId")) + object.pickleId = message.pickleId; + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.io.cucumber.messages.TestCasePreparedStep.toObject(message.steps[j], options); + } + return object; + }; + + /** + * Converts this TestCasePrepared to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestCasePrepared + * @instance + * @returns {Object.} JSON object + */ + TestCasePrepared.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TestCasePrepared; + })(); + + messages.TestCaseStarted = (function() { + + /** + * Properties of a TestCaseStarted. + * @memberof io.cucumber.messages + * @interface ITestCaseStarted + * @property {io.cucumber.messages.ITimestamp|null} [timestamp] TestCaseStarted timestamp + * @property {io.cucumber.messages.TestCaseStarted.IPlatform|null} [platform] TestCaseStarted platform + * @property {number|null} [attempt] The first attempt should have value 0, and for each retry the value + * should increase by 1. + * @property {string|null} [testCaseId] TestCaseStarted testCaseId + * @property {string|null} [id] Because a `TestCase` can be run multiple times (in case of a retry), + * we use this field to group messages relating to the same attempt. + */ + + /** + * Constructs a new TestCaseStarted. + * @memberof io.cucumber.messages + * @classdesc Represents a TestCaseStarted. + * @implements ITestCaseStarted + * @constructor + * @param {io.cucumber.messages.ITestCaseStarted=} [properties] Properties to set + */ + function TestCaseStarted(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestCaseStarted timestamp. + * @member {io.cucumber.messages.ITimestamp|null|undefined} timestamp + * @memberof io.cucumber.messages.TestCaseStarted + * @instance + */ + TestCaseStarted.prototype.timestamp = null; + + /** + * TestCaseStarted platform. + * @member {io.cucumber.messages.TestCaseStarted.IPlatform|null|undefined} platform + * @memberof io.cucumber.messages.TestCaseStarted + * @instance + */ + TestCaseStarted.prototype.platform = null; + + /** + * The first attempt should have value 0, and for each retry the value + * should increase by 1. + * @member {number} attempt + * @memberof io.cucumber.messages.TestCaseStarted + * @instance + */ + TestCaseStarted.prototype.attempt = 0; + + /** + * TestCaseStarted testCaseId. + * @member {string} testCaseId + * @memberof io.cucumber.messages.TestCaseStarted + * @instance + */ + TestCaseStarted.prototype.testCaseId = ""; + + /** + * Because a `TestCase` can be run multiple times (in case of a retry), + * we use this field to group messages relating to the same attempt. + * @member {string} id + * @memberof io.cucumber.messages.TestCaseStarted + * @instance + */ + TestCaseStarted.prototype.id = ""; + + /** + * Creates a new TestCaseStarted instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestCaseStarted + * @static + * @param {io.cucumber.messages.ITestCaseStarted=} [properties] Properties to set + * @returns {io.cucumber.messages.TestCaseStarted} TestCaseStarted instance + */ + TestCaseStarted.create = function create(properties) { + return new TestCaseStarted(properties); + }; + + /** + * Encodes the specified TestCaseStarted message. Does not implicitly {@link io.cucumber.messages.TestCaseStarted.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestCaseStarted + * @static + * @param {io.cucumber.messages.ITestCaseStarted} message TestCaseStarted message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCaseStarted.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.io.cucumber.messages.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.platform != null && message.hasOwnProperty("platform")) + $root.io.cucumber.messages.TestCaseStarted.Platform.encode(message.platform, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.attempt != null && message.hasOwnProperty("attempt")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.attempt); + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.testCaseId); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.id); + return writer; + }; + + /** + * Encodes the specified TestCaseStarted message, length delimited. Does not implicitly {@link io.cucumber.messages.TestCaseStarted.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestCaseStarted + * @static + * @param {io.cucumber.messages.ITestCaseStarted} message TestCaseStarted message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCaseStarted.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestCaseStarted message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestCaseStarted + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestCaseStarted} TestCaseStarted + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCaseStarted.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestCaseStarted(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timestamp = $root.io.cucumber.messages.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.platform = $root.io.cucumber.messages.TestCaseStarted.Platform.decode(reader, reader.uint32()); + break; + case 3: + message.attempt = reader.uint32(); + break; + case 4: + message.testCaseId = reader.string(); + break; + case 5: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestCaseStarted message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestCaseStarted + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestCaseStarted} TestCaseStarted + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCaseStarted.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestCaseStarted message. + * @function verify + * @memberof io.cucumber.messages.TestCaseStarted + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestCaseStarted.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.io.cucumber.messages.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.platform != null && message.hasOwnProperty("platform")) { + var error = $root.io.cucumber.messages.TestCaseStarted.Platform.verify(message.platform); + if (error) + return "platform." + error; + } + if (message.attempt != null && message.hasOwnProperty("attempt")) + if (!$util.isInteger(message.attempt)) + return "attempt: integer expected"; + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + if (!$util.isString(message.testCaseId)) + return "testCaseId: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a TestCaseStarted message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestCaseStarted + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestCaseStarted} TestCaseStarted + */ + TestCaseStarted.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestCaseStarted) + return object; + var message = new $root.io.cucumber.messages.TestCaseStarted(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".io.cucumber.messages.TestCaseStarted.timestamp: object expected"); + message.timestamp = $root.io.cucumber.messages.Timestamp.fromObject(object.timestamp); + } + if (object.platform != null) { + if (typeof object.platform !== "object") + throw TypeError(".io.cucumber.messages.TestCaseStarted.platform: object expected"); + message.platform = $root.io.cucumber.messages.TestCaseStarted.Platform.fromObject(object.platform); + } + if (object.attempt != null) + message.attempt = object.attempt >>> 0; + if (object.testCaseId != null) + message.testCaseId = String(object.testCaseId); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a TestCaseStarted message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestCaseStarted + * @static + * @param {io.cucumber.messages.TestCaseStarted} message TestCaseStarted + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestCaseStarted.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timestamp = null; + object.platform = null; + object.attempt = 0; + object.testCaseId = ""; + object.id = ""; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.io.cucumber.messages.Timestamp.toObject(message.timestamp, options); + if (message.platform != null && message.hasOwnProperty("platform")) + object.platform = $root.io.cucumber.messages.TestCaseStarted.Platform.toObject(message.platform, options); + if (message.attempt != null && message.hasOwnProperty("attempt")) + object.attempt = message.attempt; + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + object.testCaseId = message.testCaseId; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this TestCaseStarted to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestCaseStarted + * @instance + * @returns {Object.} JSON object + */ + TestCaseStarted.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TestCaseStarted.Platform = (function() { + + /** + * Properties of a Platform. + * @memberof io.cucumber.messages.TestCaseStarted + * @interface IPlatform + * @property {string|null} [implementation] Platform implementation + * @property {string|null} [version] Platform version + * @property {string|null} [os] Platform os + * @property {string|null} [cpu] Platform cpu + */ + + /** + * Constructs a new Platform. + * @memberof io.cucumber.messages.TestCaseStarted + * @classdesc Represents a Platform. + * @implements IPlatform + * @constructor + * @param {io.cucumber.messages.TestCaseStarted.IPlatform=} [properties] Properties to set + */ + function Platform(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Platform implementation. + * @member {string} implementation + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @instance + */ + Platform.prototype.implementation = ""; + + /** + * Platform version. + * @member {string} version + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @instance + */ + Platform.prototype.version = ""; + + /** + * Platform os. + * @member {string} os + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @instance + */ + Platform.prototype.os = ""; + + /** + * Platform cpu. + * @member {string} cpu + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @instance + */ + Platform.prototype.cpu = ""; + + /** + * Creates a new Platform instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @static + * @param {io.cucumber.messages.TestCaseStarted.IPlatform=} [properties] Properties to set + * @returns {io.cucumber.messages.TestCaseStarted.Platform} Platform instance + */ + Platform.create = function create(properties) { + return new Platform(properties); + }; + + /** + * Encodes the specified Platform message. Does not implicitly {@link io.cucumber.messages.TestCaseStarted.Platform.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @static + * @param {io.cucumber.messages.TestCaseStarted.IPlatform} message Platform message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Platform.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.implementation != null && message.hasOwnProperty("implementation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.implementation); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.os != null && message.hasOwnProperty("os")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.os); + if (message.cpu != null && message.hasOwnProperty("cpu")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.cpu); + return writer; + }; + + /** + * Encodes the specified Platform message, length delimited. Does not implicitly {@link io.cucumber.messages.TestCaseStarted.Platform.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @static + * @param {io.cucumber.messages.TestCaseStarted.IPlatform} message Platform message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Platform.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Platform message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestCaseStarted.Platform} Platform + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Platform.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestCaseStarted.Platform(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.implementation = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + case 3: + message.os = reader.string(); + break; + case 4: + message.cpu = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Platform message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestCaseStarted.Platform} Platform + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Platform.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Platform message. + * @function verify + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Platform.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.implementation != null && message.hasOwnProperty("implementation")) + if (!$util.isString(message.implementation)) + return "implementation: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.os != null && message.hasOwnProperty("os")) + if (!$util.isString(message.os)) + return "os: string expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (!$util.isString(message.cpu)) + return "cpu: string expected"; + return null; + }; + + /** + * Creates a Platform message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestCaseStarted.Platform} Platform + */ + Platform.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestCaseStarted.Platform) + return object; + var message = new $root.io.cucumber.messages.TestCaseStarted.Platform(); + if (object.implementation != null) + message.implementation = String(object.implementation); + if (object.version != null) + message.version = String(object.version); + if (object.os != null) + message.os = String(object.os); + if (object.cpu != null) + message.cpu = String(object.cpu); + return message; + }; + + /** + * Creates a plain object from a Platform message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @static + * @param {io.cucumber.messages.TestCaseStarted.Platform} message Platform + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Platform.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.implementation = ""; + object.version = ""; + object.os = ""; + object.cpu = ""; + } + if (message.implementation != null && message.hasOwnProperty("implementation")) + object.implementation = message.implementation; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.os != null && message.hasOwnProperty("os")) + object.os = message.os; + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = message.cpu; + return object; + }; + + /** + * Converts this Platform to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestCaseStarted.Platform + * @instance + * @returns {Object.} JSON object + */ + Platform.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Platform; + })(); + + return TestCaseStarted; + })(); + + messages.TestCaseFinished = (function() { + + /** + * Properties of a TestCaseFinished. + * @memberof io.cucumber.messages + * @interface ITestCaseFinished + * @property {io.cucumber.messages.ITimestamp|null} [timestamp] TestCaseFinished timestamp + * @property {io.cucumber.messages.ITestResult|null} [testResult] TestCaseFinished testResult + * @property {string|null} [testCaseStartedId] TestCaseFinished testCaseStartedId + */ + + /** + * Constructs a new TestCaseFinished. + * @memberof io.cucumber.messages + * @classdesc Represents a TestCaseFinished. + * @implements ITestCaseFinished + * @constructor + * @param {io.cucumber.messages.ITestCaseFinished=} [properties] Properties to set + */ + function TestCaseFinished(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestCaseFinished timestamp. + * @member {io.cucumber.messages.ITimestamp|null|undefined} timestamp + * @memberof io.cucumber.messages.TestCaseFinished + * @instance + */ + TestCaseFinished.prototype.timestamp = null; + + /** + * TestCaseFinished testResult. + * @member {io.cucumber.messages.ITestResult|null|undefined} testResult + * @memberof io.cucumber.messages.TestCaseFinished + * @instance + */ + TestCaseFinished.prototype.testResult = null; + + /** + * TestCaseFinished testCaseStartedId. + * @member {string} testCaseStartedId + * @memberof io.cucumber.messages.TestCaseFinished + * @instance + */ + TestCaseFinished.prototype.testCaseStartedId = ""; + + /** + * Creates a new TestCaseFinished instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestCaseFinished + * @static + * @param {io.cucumber.messages.ITestCaseFinished=} [properties] Properties to set + * @returns {io.cucumber.messages.TestCaseFinished} TestCaseFinished instance + */ + TestCaseFinished.create = function create(properties) { + return new TestCaseFinished(properties); + }; + + /** + * Encodes the specified TestCaseFinished message. Does not implicitly {@link io.cucumber.messages.TestCaseFinished.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestCaseFinished + * @static + * @param {io.cucumber.messages.ITestCaseFinished} message TestCaseFinished message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCaseFinished.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.io.cucumber.messages.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.testResult != null && message.hasOwnProperty("testResult")) + $root.io.cucumber.messages.TestResult.encode(message.testResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.testCaseStartedId); + return writer; + }; + + /** + * Encodes the specified TestCaseFinished message, length delimited. Does not implicitly {@link io.cucumber.messages.TestCaseFinished.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestCaseFinished + * @static + * @param {io.cucumber.messages.ITestCaseFinished} message TestCaseFinished message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCaseFinished.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestCaseFinished message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestCaseFinished + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestCaseFinished} TestCaseFinished + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCaseFinished.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestCaseFinished(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timestamp = $root.io.cucumber.messages.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.testResult = $root.io.cucumber.messages.TestResult.decode(reader, reader.uint32()); + break; + case 3: + message.testCaseStartedId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestCaseFinished message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestCaseFinished + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestCaseFinished} TestCaseFinished + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCaseFinished.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestCaseFinished message. + * @function verify + * @memberof io.cucumber.messages.TestCaseFinished + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestCaseFinished.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.io.cucumber.messages.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.testResult != null && message.hasOwnProperty("testResult")) { + var error = $root.io.cucumber.messages.TestResult.verify(message.testResult); + if (error) + return "testResult." + error; + } + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + if (!$util.isString(message.testCaseStartedId)) + return "testCaseStartedId: string expected"; + return null; + }; + + /** + * Creates a TestCaseFinished message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestCaseFinished + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestCaseFinished} TestCaseFinished + */ + TestCaseFinished.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestCaseFinished) + return object; + var message = new $root.io.cucumber.messages.TestCaseFinished(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".io.cucumber.messages.TestCaseFinished.timestamp: object expected"); + message.timestamp = $root.io.cucumber.messages.Timestamp.fromObject(object.timestamp); + } + if (object.testResult != null) { + if (typeof object.testResult !== "object") + throw TypeError(".io.cucumber.messages.TestCaseFinished.testResult: object expected"); + message.testResult = $root.io.cucumber.messages.TestResult.fromObject(object.testResult); + } + if (object.testCaseStartedId != null) + message.testCaseStartedId = String(object.testCaseStartedId); + return message; + }; + + /** + * Creates a plain object from a TestCaseFinished message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestCaseFinished + * @static + * @param {io.cucumber.messages.TestCaseFinished} message TestCaseFinished + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestCaseFinished.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timestamp = null; + object.testResult = null; + object.testCaseStartedId = ""; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.io.cucumber.messages.Timestamp.toObject(message.timestamp, options); + if (message.testResult != null && message.hasOwnProperty("testResult")) + object.testResult = $root.io.cucumber.messages.TestResult.toObject(message.testResult, options); + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + object.testCaseStartedId = message.testCaseStartedId; + return object; + }; + + /** + * Converts this TestCaseFinished to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestCaseFinished + * @instance + * @returns {Object.} JSON object + */ + TestCaseFinished.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TestCaseFinished; + })(); + + messages.TestStepStarted = (function() { + + /** + * Properties of a TestStepStarted. + * @memberof io.cucumber.messages + * @interface ITestStepStarted + * @property {io.cucumber.messages.ITimestamp|null} [timestamp] TestStepStarted timestamp + * @property {string|null} [testStepId] TestStepStarted testStepId + * @property {string|null} [testCaseStartedId] TestStepStarted testCaseStartedId + */ + + /** + * Constructs a new TestStepStarted. + * @memberof io.cucumber.messages + * @classdesc Represents a TestStepStarted. + * @implements ITestStepStarted + * @constructor + * @param {io.cucumber.messages.ITestStepStarted=} [properties] Properties to set + */ + function TestStepStarted(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestStepStarted timestamp. + * @member {io.cucumber.messages.ITimestamp|null|undefined} timestamp + * @memberof io.cucumber.messages.TestStepStarted + * @instance + */ + TestStepStarted.prototype.timestamp = null; + + /** + * TestStepStarted testStepId. + * @member {string} testStepId + * @memberof io.cucumber.messages.TestStepStarted + * @instance + */ + TestStepStarted.prototype.testStepId = ""; + + /** + * TestStepStarted testCaseStartedId. + * @member {string} testCaseStartedId + * @memberof io.cucumber.messages.TestStepStarted + * @instance + */ + TestStepStarted.prototype.testCaseStartedId = ""; + + /** + * Creates a new TestStepStarted instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestStepStarted + * @static + * @param {io.cucumber.messages.ITestStepStarted=} [properties] Properties to set + * @returns {io.cucumber.messages.TestStepStarted} TestStepStarted instance + */ + TestStepStarted.create = function create(properties) { + return new TestStepStarted(properties); + }; + + /** + * Encodes the specified TestStepStarted message. Does not implicitly {@link io.cucumber.messages.TestStepStarted.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestStepStarted + * @static + * @param {io.cucumber.messages.ITestStepStarted} message TestStepStarted message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestStepStarted.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.io.cucumber.messages.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.testStepId != null && message.hasOwnProperty("testStepId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.testStepId); + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.testCaseStartedId); + return writer; + }; + + /** + * Encodes the specified TestStepStarted message, length delimited. Does not implicitly {@link io.cucumber.messages.TestStepStarted.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestStepStarted + * @static + * @param {io.cucumber.messages.ITestStepStarted} message TestStepStarted message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestStepStarted.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestStepStarted message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestStepStarted + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestStepStarted} TestStepStarted + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestStepStarted.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestStepStarted(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timestamp = $root.io.cucumber.messages.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.testStepId = reader.string(); + break; + case 3: + message.testCaseStartedId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestStepStarted message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestStepStarted + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestStepStarted} TestStepStarted + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestStepStarted.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestStepStarted message. + * @function verify + * @memberof io.cucumber.messages.TestStepStarted + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestStepStarted.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.io.cucumber.messages.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.testStepId != null && message.hasOwnProperty("testStepId")) + if (!$util.isString(message.testStepId)) + return "testStepId: string expected"; + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + if (!$util.isString(message.testCaseStartedId)) + return "testCaseStartedId: string expected"; + return null; + }; + + /** + * Creates a TestStepStarted message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestStepStarted + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestStepStarted} TestStepStarted + */ + TestStepStarted.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestStepStarted) + return object; + var message = new $root.io.cucumber.messages.TestStepStarted(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".io.cucumber.messages.TestStepStarted.timestamp: object expected"); + message.timestamp = $root.io.cucumber.messages.Timestamp.fromObject(object.timestamp); + } + if (object.testStepId != null) + message.testStepId = String(object.testStepId); + if (object.testCaseStartedId != null) + message.testCaseStartedId = String(object.testCaseStartedId); + return message; + }; + + /** + * Creates a plain object from a TestStepStarted message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestStepStarted + * @static + * @param {io.cucumber.messages.TestStepStarted} message TestStepStarted + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestStepStarted.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timestamp = null; + object.testStepId = ""; + object.testCaseStartedId = ""; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.io.cucumber.messages.Timestamp.toObject(message.timestamp, options); + if (message.testStepId != null && message.hasOwnProperty("testStepId")) + object.testStepId = message.testStepId; + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + object.testCaseStartedId = message.testCaseStartedId; + return object; + }; + + /** + * Converts this TestStepStarted to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestStepStarted + * @instance + * @returns {Object.} JSON object + */ + TestStepStarted.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TestStepStarted; + })(); + + messages.TestStepFinished = (function() { + + /** + * Properties of a TestStepFinished. + * @memberof io.cucumber.messages + * @interface ITestStepFinished + * @property {io.cucumber.messages.ITestResult|null} [testResult] TestStepFinished testResult + * @property {io.cucumber.messages.ITimestamp|null} [timestamp] TestStepFinished timestamp + * @property {string|null} [testStepId] TestStepFinished testStepId + * @property {string|null} [testCaseStartedId] TestStepFinished testCaseStartedId + */ + + /** + * Constructs a new TestStepFinished. + * @memberof io.cucumber.messages + * @classdesc Represents a TestStepFinished. + * @implements ITestStepFinished + * @constructor + * @param {io.cucumber.messages.ITestStepFinished=} [properties] Properties to set + */ + function TestStepFinished(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestStepFinished testResult. + * @member {io.cucumber.messages.ITestResult|null|undefined} testResult + * @memberof io.cucumber.messages.TestStepFinished + * @instance + */ + TestStepFinished.prototype.testResult = null; + + /** + * TestStepFinished timestamp. + * @member {io.cucumber.messages.ITimestamp|null|undefined} timestamp + * @memberof io.cucumber.messages.TestStepFinished + * @instance + */ + TestStepFinished.prototype.timestamp = null; + + /** + * TestStepFinished testStepId. + * @member {string} testStepId + * @memberof io.cucumber.messages.TestStepFinished + * @instance + */ + TestStepFinished.prototype.testStepId = ""; + + /** + * TestStepFinished testCaseStartedId. + * @member {string} testCaseStartedId + * @memberof io.cucumber.messages.TestStepFinished + * @instance + */ + TestStepFinished.prototype.testCaseStartedId = ""; + + /** + * Creates a new TestStepFinished instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestStepFinished + * @static + * @param {io.cucumber.messages.ITestStepFinished=} [properties] Properties to set + * @returns {io.cucumber.messages.TestStepFinished} TestStepFinished instance + */ + TestStepFinished.create = function create(properties) { + return new TestStepFinished(properties); + }; + + /** + * Encodes the specified TestStepFinished message. Does not implicitly {@link io.cucumber.messages.TestStepFinished.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestStepFinished + * @static + * @param {io.cucumber.messages.ITestStepFinished} message TestStepFinished message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestStepFinished.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.testResult != null && message.hasOwnProperty("testResult")) + $root.io.cucumber.messages.TestResult.encode(message.testResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.io.cucumber.messages.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.testStepId != null && message.hasOwnProperty("testStepId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.testStepId); + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.testCaseStartedId); + return writer; + }; + + /** + * Encodes the specified TestStepFinished message, length delimited. Does not implicitly {@link io.cucumber.messages.TestStepFinished.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestStepFinished + * @static + * @param {io.cucumber.messages.ITestStepFinished} message TestStepFinished message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestStepFinished.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestStepFinished message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestStepFinished + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestStepFinished} TestStepFinished + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestStepFinished.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestStepFinished(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.testResult = $root.io.cucumber.messages.TestResult.decode(reader, reader.uint32()); + break; + case 2: + message.timestamp = $root.io.cucumber.messages.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.testStepId = reader.string(); + break; + case 4: + message.testCaseStartedId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestStepFinished message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestStepFinished + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestStepFinished} TestStepFinished + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestStepFinished.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestStepFinished message. + * @function verify + * @memberof io.cucumber.messages.TestStepFinished + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestStepFinished.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.testResult != null && message.hasOwnProperty("testResult")) { + var error = $root.io.cucumber.messages.TestResult.verify(message.testResult); + if (error) + return "testResult." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.io.cucumber.messages.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.testStepId != null && message.hasOwnProperty("testStepId")) + if (!$util.isString(message.testStepId)) + return "testStepId: string expected"; + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + if (!$util.isString(message.testCaseStartedId)) + return "testCaseStartedId: string expected"; + return null; + }; + + /** + * Creates a TestStepFinished message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestStepFinished + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestStepFinished} TestStepFinished + */ + TestStepFinished.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestStepFinished) + return object; + var message = new $root.io.cucumber.messages.TestStepFinished(); + if (object.testResult != null) { + if (typeof object.testResult !== "object") + throw TypeError(".io.cucumber.messages.TestStepFinished.testResult: object expected"); + message.testResult = $root.io.cucumber.messages.TestResult.fromObject(object.testResult); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".io.cucumber.messages.TestStepFinished.timestamp: object expected"); + message.timestamp = $root.io.cucumber.messages.Timestamp.fromObject(object.timestamp); + } + if (object.testStepId != null) + message.testStepId = String(object.testStepId); + if (object.testCaseStartedId != null) + message.testCaseStartedId = String(object.testCaseStartedId); + return message; + }; + + /** + * Creates a plain object from a TestStepFinished message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestStepFinished + * @static + * @param {io.cucumber.messages.TestStepFinished} message TestStepFinished + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestStepFinished.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.testResult = null; + object.timestamp = null; + object.testStepId = ""; + object.testCaseStartedId = ""; + } + if (message.testResult != null && message.hasOwnProperty("testResult")) + object.testResult = $root.io.cucumber.messages.TestResult.toObject(message.testResult, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.io.cucumber.messages.Timestamp.toObject(message.timestamp, options); + if (message.testStepId != null && message.hasOwnProperty("testStepId")) + object.testStepId = message.testStepId; + if (message.testCaseStartedId != null && message.hasOwnProperty("testCaseStartedId")) + object.testCaseStartedId = message.testCaseStartedId; + return object; + }; + + /** + * Converts this TestStepFinished to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestStepFinished + * @instance + * @returns {Object.} JSON object + */ + TestStepFinished.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TestStepFinished; + })(); + + messages.TestResult = (function() { + + /** + * Properties of a TestResult. + * @memberof io.cucumber.messages + * @interface ITestResult + * @property {io.cucumber.messages.TestResult.Status|null} [status] TestResult status + * @property {string|null} [message] TestResult message + * @property {io.cucumber.messages.IDuration|null} [duration] TestResult duration + * @property {boolean|null} [willBeRetried] TestResult willBeRetried + */ + + /** + * Constructs a new TestResult. + * @memberof io.cucumber.messages + * @classdesc Represents a TestResult. + * @implements ITestResult + * @constructor + * @param {io.cucumber.messages.ITestResult=} [properties] Properties to set + */ + function TestResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestResult status. + * @member {io.cucumber.messages.TestResult.Status} status + * @memberof io.cucumber.messages.TestResult + * @instance + */ + TestResult.prototype.status = 0; + + /** + * TestResult message. + * @member {string} message + * @memberof io.cucumber.messages.TestResult + * @instance + */ + TestResult.prototype.message = ""; + + /** + * TestResult duration. + * @member {io.cucumber.messages.IDuration|null|undefined} duration + * @memberof io.cucumber.messages.TestResult + * @instance + */ + TestResult.prototype.duration = null; + + /** + * TestResult willBeRetried. + * @member {boolean} willBeRetried + * @memberof io.cucumber.messages.TestResult + * @instance + */ + TestResult.prototype.willBeRetried = false; + + /** + * Creates a new TestResult instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestResult + * @static + * @param {io.cucumber.messages.ITestResult=} [properties] Properties to set + * @returns {io.cucumber.messages.TestResult} TestResult instance + */ + TestResult.create = function create(properties) { + return new TestResult(properties); + }; + + /** + * Encodes the specified TestResult message. Does not implicitly {@link io.cucumber.messages.TestResult.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestResult + * @static + * @param {io.cucumber.messages.ITestResult} message TestResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && message.hasOwnProperty("status")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status); + if (message.message != null && message.hasOwnProperty("message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.duration != null && message.hasOwnProperty("duration")) + $root.io.cucumber.messages.Duration.encode(message.duration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.willBeRetried != null && message.hasOwnProperty("willBeRetried")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.willBeRetried); + return writer; + }; + + /** + * Encodes the specified TestResult message, length delimited. Does not implicitly {@link io.cucumber.messages.TestResult.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestResult + * @static + * @param {io.cucumber.messages.ITestResult} message TestResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestResult message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestResult} TestResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.status = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.duration = $root.io.cucumber.messages.Duration.decode(reader, reader.uint32()); + break; + case 4: + message.willBeRetried = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestResult} TestResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestResult message. + * @function verify + * @memberof io.cucumber.messages.TestResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.io.cucumber.messages.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.willBeRetried != null && message.hasOwnProperty("willBeRetried")) + if (typeof message.willBeRetried !== "boolean") + return "willBeRetried: boolean expected"; + return null; + }; + + /** + * Creates a TestResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestResult + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestResult} TestResult + */ + TestResult.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestResult) + return object; + var message = new $root.io.cucumber.messages.TestResult(); + switch (object.status) { + case "UNKNOWN": + case 0: + message.status = 0; + break; + case "PASSED": + case 1: + message.status = 1; + break; + case "SKIPPED": + case 2: + message.status = 2; + break; + case "PENDING": + case 3: + message.status = 3; + break; + case "UNDEFINED": + case 4: + message.status = 4; + break; + case "AMBIGUOUS": + case 5: + message.status = 5; + break; + case "FAILED": + case 6: + message.status = 6; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".io.cucumber.messages.TestResult.duration: object expected"); + message.duration = $root.io.cucumber.messages.Duration.fromObject(object.duration); + } + if (object.willBeRetried != null) + message.willBeRetried = Boolean(object.willBeRetried); + return message; + }; + + /** + * Creates a plain object from a TestResult message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestResult + * @static + * @param {io.cucumber.messages.TestResult} message TestResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.status = options.enums === String ? "UNKNOWN" : 0; + object.message = ""; + object.duration = null; + object.willBeRetried = false; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.io.cucumber.messages.TestResult.Status[message.status] : message.status; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.io.cucumber.messages.Duration.toObject(message.duration, options); + if (message.willBeRetried != null && message.hasOwnProperty("willBeRetried")) + object.willBeRetried = message.willBeRetried; + return object; + }; + + /** + * Converts this TestResult to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestResult + * @instance + * @returns {Object.} JSON object + */ + TestResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Status of a step. Can also represent status of a Pickle (aggregated + * from the status of its steps). + * + * The ordinal values of statuses are significant. The status of a Pickle + * is determined by the union of statuses of its steps. The + * status of the Pickle is the status with the highest ordinal + * in the enum. + * + * For example, if a pickle has steps with statuses passed, undefined and skipped, + * then the pickle's status is undefined. + * @name io.cucumber.messages.TestResult.Status + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} PASSED=1 PASSED value + * @property {number} SKIPPED=2 SKIPPED value + * @property {number} PENDING=3 PENDING value + * @property {number} UNDEFINED=4 UNDEFINED value + * @property {number} AMBIGUOUS=5 AMBIGUOUS value + * @property {number} FAILED=6 FAILED value + */ + TestResult.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "PASSED"] = 1; + values[valuesById[2] = "SKIPPED"] = 2; + values[valuesById[3] = "PENDING"] = 3; + values[valuesById[4] = "UNDEFINED"] = 4; + values[valuesById[5] = "AMBIGUOUS"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + return TestResult; + })(); + + messages.TestRunFinished = (function() { + + /** + * Properties of a TestRunFinished. + * @memberof io.cucumber.messages + * @interface ITestRunFinished + * @property {boolean|null} [success] TestRunFinished success + * @property {io.cucumber.messages.ITimestamp|null} [timestamp] TestRunFinished timestamp + */ + + /** + * Constructs a new TestRunFinished. + * @memberof io.cucumber.messages + * @classdesc Represents a TestRunFinished. + * @implements ITestRunFinished + * @constructor + * @param {io.cucumber.messages.ITestRunFinished=} [properties] Properties to set + */ + function TestRunFinished(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestRunFinished success. + * @member {boolean} success + * @memberof io.cucumber.messages.TestRunFinished + * @instance + */ + TestRunFinished.prototype.success = false; + + /** + * TestRunFinished timestamp. + * @member {io.cucumber.messages.ITimestamp|null|undefined} timestamp + * @memberof io.cucumber.messages.TestRunFinished + * @instance + */ + TestRunFinished.prototype.timestamp = null; + + /** + * Creates a new TestRunFinished instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.TestRunFinished + * @static + * @param {io.cucumber.messages.ITestRunFinished=} [properties] Properties to set + * @returns {io.cucumber.messages.TestRunFinished} TestRunFinished instance + */ + TestRunFinished.create = function create(properties) { + return new TestRunFinished(properties); + }; + + /** + * Encodes the specified TestRunFinished message. Does not implicitly {@link io.cucumber.messages.TestRunFinished.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.TestRunFinished + * @static + * @param {io.cucumber.messages.ITestRunFinished} message TestRunFinished message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestRunFinished.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.success != null && message.hasOwnProperty("success")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.io.cucumber.messages.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TestRunFinished message, length delimited. Does not implicitly {@link io.cucumber.messages.TestRunFinished.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.TestRunFinished + * @static + * @param {io.cucumber.messages.ITestRunFinished} message TestRunFinished message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestRunFinished.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestRunFinished message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.TestRunFinished + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.TestRunFinished} TestRunFinished + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestRunFinished.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.TestRunFinished(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.success = reader.bool(); + break; + case 2: + message.timestamp = $root.io.cucumber.messages.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestRunFinished message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.TestRunFinished + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.TestRunFinished} TestRunFinished + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestRunFinished.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestRunFinished message. + * @function verify + * @memberof io.cucumber.messages.TestRunFinished + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestRunFinished.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.success != null && message.hasOwnProperty("success")) + if (typeof message.success !== "boolean") + return "success: boolean expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.io.cucumber.messages.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a TestRunFinished message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.TestRunFinished + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.TestRunFinished} TestRunFinished + */ + TestRunFinished.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.TestRunFinished) + return object; + var message = new $root.io.cucumber.messages.TestRunFinished(); + if (object.success != null) + message.success = Boolean(object.success); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".io.cucumber.messages.TestRunFinished.timestamp: object expected"); + message.timestamp = $root.io.cucumber.messages.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from a TestRunFinished message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.TestRunFinished + * @static + * @param {io.cucumber.messages.TestRunFinished} message TestRunFinished + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestRunFinished.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.success = false; + object.timestamp = null; + } + if (message.success != null && message.hasOwnProperty("success")) + object.success = message.success; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.io.cucumber.messages.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this TestRunFinished to JSON. + * @function toJSON + * @memberof io.cucumber.messages.TestRunFinished + * @instance + * @returns {Object.} JSON object + */ + TestRunFinished.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TestRunFinished; + })(); + + messages.CommandStart = (function() { + + /** + * Properties of a CommandStart. + * @memberof io.cucumber.messages + * @interface ICommandStart + * @property {string|null} [baseDirectory] CommandStart baseDirectory + * @property {io.cucumber.messages.ISourcesConfig|null} [sourcesConfig] CommandStart sourcesConfig + * @property {io.cucumber.messages.IRuntimeConfig|null} [runtimeConfig] CommandStart runtimeConfig + * @property {io.cucumber.messages.ISupportCodeConfig|null} [supportCodeConfig] CommandStart supportCodeConfig + */ + + /** + * Constructs a new CommandStart. + * @memberof io.cucumber.messages + * @classdesc Represents a CommandStart. + * @implements ICommandStart + * @constructor + * @param {io.cucumber.messages.ICommandStart=} [properties] Properties to set + */ + function CommandStart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommandStart baseDirectory. + * @member {string} baseDirectory + * @memberof io.cucumber.messages.CommandStart + * @instance + */ + CommandStart.prototype.baseDirectory = ""; + + /** + * CommandStart sourcesConfig. + * @member {io.cucumber.messages.ISourcesConfig|null|undefined} sourcesConfig + * @memberof io.cucumber.messages.CommandStart + * @instance + */ + CommandStart.prototype.sourcesConfig = null; + + /** + * CommandStart runtimeConfig. + * @member {io.cucumber.messages.IRuntimeConfig|null|undefined} runtimeConfig + * @memberof io.cucumber.messages.CommandStart + * @instance + */ + CommandStart.prototype.runtimeConfig = null; + + /** + * CommandStart supportCodeConfig. + * @member {io.cucumber.messages.ISupportCodeConfig|null|undefined} supportCodeConfig + * @memberof io.cucumber.messages.CommandStart + * @instance + */ + CommandStart.prototype.supportCodeConfig = null; + + /** + * Creates a new CommandStart instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.CommandStart + * @static + * @param {io.cucumber.messages.ICommandStart=} [properties] Properties to set + * @returns {io.cucumber.messages.CommandStart} CommandStart instance + */ + CommandStart.create = function create(properties) { + return new CommandStart(properties); + }; + + /** + * Encodes the specified CommandStart message. Does not implicitly {@link io.cucumber.messages.CommandStart.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.CommandStart + * @static + * @param {io.cucumber.messages.ICommandStart} message CommandStart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandStart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseDirectory != null && message.hasOwnProperty("baseDirectory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseDirectory); + if (message.sourcesConfig != null && message.hasOwnProperty("sourcesConfig")) + $root.io.cucumber.messages.SourcesConfig.encode(message.sourcesConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.runtimeConfig != null && message.hasOwnProperty("runtimeConfig")) + $root.io.cucumber.messages.RuntimeConfig.encode(message.runtimeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.supportCodeConfig != null && message.hasOwnProperty("supportCodeConfig")) + $root.io.cucumber.messages.SupportCodeConfig.encode(message.supportCodeConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommandStart message, length delimited. Does not implicitly {@link io.cucumber.messages.CommandStart.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.CommandStart + * @static + * @param {io.cucumber.messages.ICommandStart} message CommandStart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandStart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommandStart message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.CommandStart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.CommandStart} CommandStart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandStart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.CommandStart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.baseDirectory = reader.string(); + break; + case 3: + message.sourcesConfig = $root.io.cucumber.messages.SourcesConfig.decode(reader, reader.uint32()); + break; + case 4: + message.runtimeConfig = $root.io.cucumber.messages.RuntimeConfig.decode(reader, reader.uint32()); + break; + case 5: + message.supportCodeConfig = $root.io.cucumber.messages.SupportCodeConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommandStart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.CommandStart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.CommandStart} CommandStart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandStart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommandStart message. + * @function verify + * @memberof io.cucumber.messages.CommandStart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommandStart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseDirectory != null && message.hasOwnProperty("baseDirectory")) + if (!$util.isString(message.baseDirectory)) + return "baseDirectory: string expected"; + if (message.sourcesConfig != null && message.hasOwnProperty("sourcesConfig")) { + var error = $root.io.cucumber.messages.SourcesConfig.verify(message.sourcesConfig); + if (error) + return "sourcesConfig." + error; + } + if (message.runtimeConfig != null && message.hasOwnProperty("runtimeConfig")) { + var error = $root.io.cucumber.messages.RuntimeConfig.verify(message.runtimeConfig); + if (error) + return "runtimeConfig." + error; + } + if (message.supportCodeConfig != null && message.hasOwnProperty("supportCodeConfig")) { + var error = $root.io.cucumber.messages.SupportCodeConfig.verify(message.supportCodeConfig); + if (error) + return "supportCodeConfig." + error; + } + return null; + }; + + /** + * Creates a CommandStart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.CommandStart + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.CommandStart} CommandStart + */ + CommandStart.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.CommandStart) + return object; + var message = new $root.io.cucumber.messages.CommandStart(); + if (object.baseDirectory != null) + message.baseDirectory = String(object.baseDirectory); + if (object.sourcesConfig != null) { + if (typeof object.sourcesConfig !== "object") + throw TypeError(".io.cucumber.messages.CommandStart.sourcesConfig: object expected"); + message.sourcesConfig = $root.io.cucumber.messages.SourcesConfig.fromObject(object.sourcesConfig); + } + if (object.runtimeConfig != null) { + if (typeof object.runtimeConfig !== "object") + throw TypeError(".io.cucumber.messages.CommandStart.runtimeConfig: object expected"); + message.runtimeConfig = $root.io.cucumber.messages.RuntimeConfig.fromObject(object.runtimeConfig); + } + if (object.supportCodeConfig != null) { + if (typeof object.supportCodeConfig !== "object") + throw TypeError(".io.cucumber.messages.CommandStart.supportCodeConfig: object expected"); + message.supportCodeConfig = $root.io.cucumber.messages.SupportCodeConfig.fromObject(object.supportCodeConfig); + } + return message; + }; + + /** + * Creates a plain object from a CommandStart message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.CommandStart + * @static + * @param {io.cucumber.messages.CommandStart} message CommandStart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommandStart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.baseDirectory = ""; + object.sourcesConfig = null; + object.runtimeConfig = null; + object.supportCodeConfig = null; + } + if (message.baseDirectory != null && message.hasOwnProperty("baseDirectory")) + object.baseDirectory = message.baseDirectory; + if (message.sourcesConfig != null && message.hasOwnProperty("sourcesConfig")) + object.sourcesConfig = $root.io.cucumber.messages.SourcesConfig.toObject(message.sourcesConfig, options); + if (message.runtimeConfig != null && message.hasOwnProperty("runtimeConfig")) + object.runtimeConfig = $root.io.cucumber.messages.RuntimeConfig.toObject(message.runtimeConfig, options); + if (message.supportCodeConfig != null && message.hasOwnProperty("supportCodeConfig")) + object.supportCodeConfig = $root.io.cucumber.messages.SupportCodeConfig.toObject(message.supportCodeConfig, options); + return object; + }; + + /** + * Converts this CommandStart to JSON. + * @function toJSON + * @memberof io.cucumber.messages.CommandStart + * @instance + * @returns {Object.} JSON object + */ + CommandStart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommandStart; + })(); + + messages.SourcesConfig = (function() { + + /** + * Properties of a SourcesConfig. + * @memberof io.cucumber.messages + * @interface ISourcesConfig + * @property {Array.|null} [absolutePaths] SourcesConfig absolutePaths + * @property {string|null} [language] SourcesConfig language + * @property {io.cucumber.messages.ISourcesFilterConfig|null} [filters] SourcesConfig filters + * @property {io.cucumber.messages.ISourcesOrder|null} [order] SourcesConfig order + */ + + /** + * Constructs a new SourcesConfig. + * @memberof io.cucumber.messages + * @classdesc Represents a SourcesConfig. + * @implements ISourcesConfig + * @constructor + * @param {io.cucumber.messages.ISourcesConfig=} [properties] Properties to set + */ + function SourcesConfig(properties) { + this.absolutePaths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourcesConfig absolutePaths. + * @member {Array.} absolutePaths + * @memberof io.cucumber.messages.SourcesConfig + * @instance + */ + SourcesConfig.prototype.absolutePaths = $util.emptyArray; + + /** + * SourcesConfig language. + * @member {string} language + * @memberof io.cucumber.messages.SourcesConfig + * @instance + */ + SourcesConfig.prototype.language = ""; + + /** + * SourcesConfig filters. + * @member {io.cucumber.messages.ISourcesFilterConfig|null|undefined} filters + * @memberof io.cucumber.messages.SourcesConfig + * @instance + */ + SourcesConfig.prototype.filters = null; + + /** + * SourcesConfig order. + * @member {io.cucumber.messages.ISourcesOrder|null|undefined} order + * @memberof io.cucumber.messages.SourcesConfig + * @instance + */ + SourcesConfig.prototype.order = null; + + /** + * Creates a new SourcesConfig instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.SourcesConfig + * @static + * @param {io.cucumber.messages.ISourcesConfig=} [properties] Properties to set + * @returns {io.cucumber.messages.SourcesConfig} SourcesConfig instance + */ + SourcesConfig.create = function create(properties) { + return new SourcesConfig(properties); + }; + + /** + * Encodes the specified SourcesConfig message. Does not implicitly {@link io.cucumber.messages.SourcesConfig.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.SourcesConfig + * @static + * @param {io.cucumber.messages.ISourcesConfig} message SourcesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourcesConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.absolutePaths != null && message.absolutePaths.length) + for (var i = 0; i < message.absolutePaths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.absolutePaths[i]); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); + if (message.filters != null && message.hasOwnProperty("filters")) + $root.io.cucumber.messages.SourcesFilterConfig.encode(message.filters, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.order != null && message.hasOwnProperty("order")) + $root.io.cucumber.messages.SourcesOrder.encode(message.order, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourcesConfig message, length delimited. Does not implicitly {@link io.cucumber.messages.SourcesConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.SourcesConfig + * @static + * @param {io.cucumber.messages.ISourcesConfig} message SourcesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourcesConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourcesConfig message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.SourcesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.SourcesConfig} SourcesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourcesConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.SourcesConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.absolutePaths && message.absolutePaths.length)) + message.absolutePaths = []; + message.absolutePaths.push(reader.string()); + break; + case 2: + message.language = reader.string(); + break; + case 3: + message.filters = $root.io.cucumber.messages.SourcesFilterConfig.decode(reader, reader.uint32()); + break; + case 4: + message.order = $root.io.cucumber.messages.SourcesOrder.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourcesConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.SourcesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.SourcesConfig} SourcesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourcesConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourcesConfig message. + * @function verify + * @memberof io.cucumber.messages.SourcesConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourcesConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.absolutePaths != null && message.hasOwnProperty("absolutePaths")) { + if (!Array.isArray(message.absolutePaths)) + return "absolutePaths: array expected"; + for (var i = 0; i < message.absolutePaths.length; ++i) + if (!$util.isString(message.absolutePaths[i])) + return "absolutePaths: string[] expected"; + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + if (message.filters != null && message.hasOwnProperty("filters")) { + var error = $root.io.cucumber.messages.SourcesFilterConfig.verify(message.filters); + if (error) + return "filters." + error; + } + if (message.order != null && message.hasOwnProperty("order")) { + var error = $root.io.cucumber.messages.SourcesOrder.verify(message.order); + if (error) + return "order." + error; + } + return null; + }; + + /** + * Creates a SourcesConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.SourcesConfig + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.SourcesConfig} SourcesConfig + */ + SourcesConfig.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.SourcesConfig) + return object; + var message = new $root.io.cucumber.messages.SourcesConfig(); + if (object.absolutePaths) { + if (!Array.isArray(object.absolutePaths)) + throw TypeError(".io.cucumber.messages.SourcesConfig.absolutePaths: array expected"); + message.absolutePaths = []; + for (var i = 0; i < object.absolutePaths.length; ++i) + message.absolutePaths[i] = String(object.absolutePaths[i]); + } + if (object.language != null) + message.language = String(object.language); + if (object.filters != null) { + if (typeof object.filters !== "object") + throw TypeError(".io.cucumber.messages.SourcesConfig.filters: object expected"); + message.filters = $root.io.cucumber.messages.SourcesFilterConfig.fromObject(object.filters); + } + if (object.order != null) { + if (typeof object.order !== "object") + throw TypeError(".io.cucumber.messages.SourcesConfig.order: object expected"); + message.order = $root.io.cucumber.messages.SourcesOrder.fromObject(object.order); + } + return message; + }; + + /** + * Creates a plain object from a SourcesConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.SourcesConfig + * @static + * @param {io.cucumber.messages.SourcesConfig} message SourcesConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourcesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.absolutePaths = []; + if (options.defaults) { + object.language = ""; + object.filters = null; + object.order = null; + } + if (message.absolutePaths && message.absolutePaths.length) { + object.absolutePaths = []; + for (var j = 0; j < message.absolutePaths.length; ++j) + object.absolutePaths[j] = message.absolutePaths[j]; + } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + if (message.filters != null && message.hasOwnProperty("filters")) + object.filters = $root.io.cucumber.messages.SourcesFilterConfig.toObject(message.filters, options); + if (message.order != null && message.hasOwnProperty("order")) + object.order = $root.io.cucumber.messages.SourcesOrder.toObject(message.order, options); + return object; + }; + + /** + * Converts this SourcesConfig to JSON. + * @function toJSON + * @memberof io.cucumber.messages.SourcesConfig + * @instance + * @returns {Object.} JSON object + */ + SourcesConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SourcesConfig; + })(); + + messages.SourcesFilterConfig = (function() { + + /** + * Properties of a SourcesFilterConfig. + * @memberof io.cucumber.messages + * @interface ISourcesFilterConfig + * @property {string|null} [tagExpression] SourcesFilterConfig tagExpression + * @property {Array.|null} [nameRegularExpressions] SourcesFilterConfig nameRegularExpressions + * @property {Array.|null} [uriToLinesMapping] SourcesFilterConfig uriToLinesMapping + */ + + /** + * Constructs a new SourcesFilterConfig. + * @memberof io.cucumber.messages + * @classdesc Represents a SourcesFilterConfig. + * @implements ISourcesFilterConfig + * @constructor + * @param {io.cucumber.messages.ISourcesFilterConfig=} [properties] Properties to set + */ + function SourcesFilterConfig(properties) { + this.nameRegularExpressions = []; + this.uriToLinesMapping = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourcesFilterConfig tagExpression. + * @member {string} tagExpression + * @memberof io.cucumber.messages.SourcesFilterConfig + * @instance + */ + SourcesFilterConfig.prototype.tagExpression = ""; + + /** + * SourcesFilterConfig nameRegularExpressions. + * @member {Array.} nameRegularExpressions + * @memberof io.cucumber.messages.SourcesFilterConfig + * @instance + */ + SourcesFilterConfig.prototype.nameRegularExpressions = $util.emptyArray; + + /** + * SourcesFilterConfig uriToLinesMapping. + * @member {Array.} uriToLinesMapping + * @memberof io.cucumber.messages.SourcesFilterConfig + * @instance + */ + SourcesFilterConfig.prototype.uriToLinesMapping = $util.emptyArray; + + /** + * Creates a new SourcesFilterConfig instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.SourcesFilterConfig + * @static + * @param {io.cucumber.messages.ISourcesFilterConfig=} [properties] Properties to set + * @returns {io.cucumber.messages.SourcesFilterConfig} SourcesFilterConfig instance + */ + SourcesFilterConfig.create = function create(properties) { + return new SourcesFilterConfig(properties); + }; + + /** + * Encodes the specified SourcesFilterConfig message. Does not implicitly {@link io.cucumber.messages.SourcesFilterConfig.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.SourcesFilterConfig + * @static + * @param {io.cucumber.messages.ISourcesFilterConfig} message SourcesFilterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourcesFilterConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tagExpression != null && message.hasOwnProperty("tagExpression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tagExpression); + if (message.nameRegularExpressions != null && message.nameRegularExpressions.length) + for (var i = 0; i < message.nameRegularExpressions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nameRegularExpressions[i]); + if (message.uriToLinesMapping != null && message.uriToLinesMapping.length) + for (var i = 0; i < message.uriToLinesMapping.length; ++i) + $root.io.cucumber.messages.UriToLinesMapping.encode(message.uriToLinesMapping[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourcesFilterConfig message, length delimited. Does not implicitly {@link io.cucumber.messages.SourcesFilterConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.SourcesFilterConfig + * @static + * @param {io.cucumber.messages.ISourcesFilterConfig} message SourcesFilterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourcesFilterConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourcesFilterConfig message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.SourcesFilterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.SourcesFilterConfig} SourcesFilterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourcesFilterConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.SourcesFilterConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tagExpression = reader.string(); + break; + case 2: + if (!(message.nameRegularExpressions && message.nameRegularExpressions.length)) + message.nameRegularExpressions = []; + message.nameRegularExpressions.push(reader.string()); + break; + case 3: + if (!(message.uriToLinesMapping && message.uriToLinesMapping.length)) + message.uriToLinesMapping = []; + message.uriToLinesMapping.push($root.io.cucumber.messages.UriToLinesMapping.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourcesFilterConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.SourcesFilterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.SourcesFilterConfig} SourcesFilterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourcesFilterConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourcesFilterConfig message. + * @function verify + * @memberof io.cucumber.messages.SourcesFilterConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourcesFilterConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tagExpression != null && message.hasOwnProperty("tagExpression")) + if (!$util.isString(message.tagExpression)) + return "tagExpression: string expected"; + if (message.nameRegularExpressions != null && message.hasOwnProperty("nameRegularExpressions")) { + if (!Array.isArray(message.nameRegularExpressions)) + return "nameRegularExpressions: array expected"; + for (var i = 0; i < message.nameRegularExpressions.length; ++i) + if (!$util.isString(message.nameRegularExpressions[i])) + return "nameRegularExpressions: string[] expected"; + } + if (message.uriToLinesMapping != null && message.hasOwnProperty("uriToLinesMapping")) { + if (!Array.isArray(message.uriToLinesMapping)) + return "uriToLinesMapping: array expected"; + for (var i = 0; i < message.uriToLinesMapping.length; ++i) { + var error = $root.io.cucumber.messages.UriToLinesMapping.verify(message.uriToLinesMapping[i]); + if (error) + return "uriToLinesMapping." + error; + } + } + return null; + }; + + /** + * Creates a SourcesFilterConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.SourcesFilterConfig + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.SourcesFilterConfig} SourcesFilterConfig + */ + SourcesFilterConfig.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.SourcesFilterConfig) + return object; + var message = new $root.io.cucumber.messages.SourcesFilterConfig(); + if (object.tagExpression != null) + message.tagExpression = String(object.tagExpression); + if (object.nameRegularExpressions) { + if (!Array.isArray(object.nameRegularExpressions)) + throw TypeError(".io.cucumber.messages.SourcesFilterConfig.nameRegularExpressions: array expected"); + message.nameRegularExpressions = []; + for (var i = 0; i < object.nameRegularExpressions.length; ++i) + message.nameRegularExpressions[i] = String(object.nameRegularExpressions[i]); + } + if (object.uriToLinesMapping) { + if (!Array.isArray(object.uriToLinesMapping)) + throw TypeError(".io.cucumber.messages.SourcesFilterConfig.uriToLinesMapping: array expected"); + message.uriToLinesMapping = []; + for (var i = 0; i < object.uriToLinesMapping.length; ++i) { + if (typeof object.uriToLinesMapping[i] !== "object") + throw TypeError(".io.cucumber.messages.SourcesFilterConfig.uriToLinesMapping: object expected"); + message.uriToLinesMapping[i] = $root.io.cucumber.messages.UriToLinesMapping.fromObject(object.uriToLinesMapping[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourcesFilterConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.SourcesFilterConfig + * @static + * @param {io.cucumber.messages.SourcesFilterConfig} message SourcesFilterConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourcesFilterConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.nameRegularExpressions = []; + object.uriToLinesMapping = []; + } + if (options.defaults) + object.tagExpression = ""; + if (message.tagExpression != null && message.hasOwnProperty("tagExpression")) + object.tagExpression = message.tagExpression; + if (message.nameRegularExpressions && message.nameRegularExpressions.length) { + object.nameRegularExpressions = []; + for (var j = 0; j < message.nameRegularExpressions.length; ++j) + object.nameRegularExpressions[j] = message.nameRegularExpressions[j]; + } + if (message.uriToLinesMapping && message.uriToLinesMapping.length) { + object.uriToLinesMapping = []; + for (var j = 0; j < message.uriToLinesMapping.length; ++j) + object.uriToLinesMapping[j] = $root.io.cucumber.messages.UriToLinesMapping.toObject(message.uriToLinesMapping[j], options); + } + return object; + }; + + /** + * Converts this SourcesFilterConfig to JSON. + * @function toJSON + * @memberof io.cucumber.messages.SourcesFilterConfig + * @instance + * @returns {Object.} JSON object + */ + SourcesFilterConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SourcesFilterConfig; + })(); + + messages.UriToLinesMapping = (function() { + + /** + * Properties of an UriToLinesMapping. + * @memberof io.cucumber.messages + * @interface IUriToLinesMapping + * @property {string|null} [absolutePath] UriToLinesMapping absolutePath + * @property {Array.|null} [lines] UriToLinesMapping lines + */ + + /** + * Constructs a new UriToLinesMapping. + * @memberof io.cucumber.messages + * @classdesc Represents an UriToLinesMapping. + * @implements IUriToLinesMapping + * @constructor + * @param {io.cucumber.messages.IUriToLinesMapping=} [properties] Properties to set + */ + function UriToLinesMapping(properties) { + this.lines = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UriToLinesMapping absolutePath. + * @member {string} absolutePath + * @memberof io.cucumber.messages.UriToLinesMapping + * @instance + */ + UriToLinesMapping.prototype.absolutePath = ""; + + /** + * UriToLinesMapping lines. + * @member {Array.} lines + * @memberof io.cucumber.messages.UriToLinesMapping + * @instance + */ + UriToLinesMapping.prototype.lines = $util.emptyArray; + + /** + * Creates a new UriToLinesMapping instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.UriToLinesMapping + * @static + * @param {io.cucumber.messages.IUriToLinesMapping=} [properties] Properties to set + * @returns {io.cucumber.messages.UriToLinesMapping} UriToLinesMapping instance + */ + UriToLinesMapping.create = function create(properties) { + return new UriToLinesMapping(properties); + }; + + /** + * Encodes the specified UriToLinesMapping message. Does not implicitly {@link io.cucumber.messages.UriToLinesMapping.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.UriToLinesMapping + * @static + * @param {io.cucumber.messages.IUriToLinesMapping} message UriToLinesMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UriToLinesMapping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.absolutePath != null && message.hasOwnProperty("absolutePath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.absolutePath); + if (message.lines != null && message.lines.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.lines.length; ++i) + writer.uint64(message.lines[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified UriToLinesMapping message, length delimited. Does not implicitly {@link io.cucumber.messages.UriToLinesMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.UriToLinesMapping + * @static + * @param {io.cucumber.messages.IUriToLinesMapping} message UriToLinesMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UriToLinesMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UriToLinesMapping message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.UriToLinesMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.UriToLinesMapping} UriToLinesMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UriToLinesMapping.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.UriToLinesMapping(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.absolutePath = reader.string(); + break; + case 2: + if (!(message.lines && message.lines.length)) + message.lines = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.lines.push(reader.uint64()); + } else + message.lines.push(reader.uint64()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UriToLinesMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.UriToLinesMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.UriToLinesMapping} UriToLinesMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UriToLinesMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UriToLinesMapping message. + * @function verify + * @memberof io.cucumber.messages.UriToLinesMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UriToLinesMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.absolutePath != null && message.hasOwnProperty("absolutePath")) + if (!$util.isString(message.absolutePath)) + return "absolutePath: string expected"; + if (message.lines != null && message.hasOwnProperty("lines")) { + if (!Array.isArray(message.lines)) + return "lines: array expected"; + for (var i = 0; i < message.lines.length; ++i) + if (!$util.isInteger(message.lines[i]) && !(message.lines[i] && $util.isInteger(message.lines[i].low) && $util.isInteger(message.lines[i].high))) + return "lines: integer|Long[] expected"; + } + return null; + }; + + /** + * Creates an UriToLinesMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.UriToLinesMapping + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.UriToLinesMapping} UriToLinesMapping + */ + UriToLinesMapping.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.UriToLinesMapping) + return object; + var message = new $root.io.cucumber.messages.UriToLinesMapping(); + if (object.absolutePath != null) + message.absolutePath = String(object.absolutePath); + if (object.lines) { + if (!Array.isArray(object.lines)) + throw TypeError(".io.cucumber.messages.UriToLinesMapping.lines: array expected"); + message.lines = []; + for (var i = 0; i < object.lines.length; ++i) + if ($util.Long) + (message.lines[i] = $util.Long.fromValue(object.lines[i])).unsigned = true; + else if (typeof object.lines[i] === "string") + message.lines[i] = parseInt(object.lines[i], 10); + else if (typeof object.lines[i] === "number") + message.lines[i] = object.lines[i]; + else if (typeof object.lines[i] === "object") + message.lines[i] = new $util.LongBits(object.lines[i].low >>> 0, object.lines[i].high >>> 0).toNumber(true); + } + return message; + }; + + /** + * Creates a plain object from an UriToLinesMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.UriToLinesMapping + * @static + * @param {io.cucumber.messages.UriToLinesMapping} message UriToLinesMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UriToLinesMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.lines = []; + if (options.defaults) + object.absolutePath = ""; + if (message.absolutePath != null && message.hasOwnProperty("absolutePath")) + object.absolutePath = message.absolutePath; + if (message.lines && message.lines.length) { + object.lines = []; + for (var j = 0; j < message.lines.length; ++j) + if (typeof message.lines[j] === "number") + object.lines[j] = options.longs === String ? String(message.lines[j]) : message.lines[j]; + else + object.lines[j] = options.longs === String ? $util.Long.prototype.toString.call(message.lines[j]) : options.longs === Number ? new $util.LongBits(message.lines[j].low >>> 0, message.lines[j].high >>> 0).toNumber(true) : message.lines[j]; + } + return object; + }; + + /** + * Converts this UriToLinesMapping to JSON. + * @function toJSON + * @memberof io.cucumber.messages.UriToLinesMapping + * @instance + * @returns {Object.} JSON object + */ + UriToLinesMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UriToLinesMapping; + })(); + + messages.SourcesOrder = (function() { + + /** + * Properties of a SourcesOrder. + * @memberof io.cucumber.messages + * @interface ISourcesOrder + * @property {io.cucumber.messages.SourcesOrderType|null} [type] SourcesOrder type + * @property {number|Long|null} [seed] SourcesOrder seed + */ + + /** + * Constructs a new SourcesOrder. + * @memberof io.cucumber.messages + * @classdesc Represents a SourcesOrder. + * @implements ISourcesOrder + * @constructor + * @param {io.cucumber.messages.ISourcesOrder=} [properties] Properties to set + */ + function SourcesOrder(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourcesOrder type. + * @member {io.cucumber.messages.SourcesOrderType} type + * @memberof io.cucumber.messages.SourcesOrder + * @instance + */ + SourcesOrder.prototype.type = 0; + + /** + * SourcesOrder seed. + * @member {number|Long} seed + * @memberof io.cucumber.messages.SourcesOrder + * @instance + */ + SourcesOrder.prototype.seed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SourcesOrder instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.SourcesOrder + * @static + * @param {io.cucumber.messages.ISourcesOrder=} [properties] Properties to set + * @returns {io.cucumber.messages.SourcesOrder} SourcesOrder instance + */ + SourcesOrder.create = function create(properties) { + return new SourcesOrder(properties); + }; + + /** + * Encodes the specified SourcesOrder message. Does not implicitly {@link io.cucumber.messages.SourcesOrder.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.SourcesOrder + * @static + * @param {io.cucumber.messages.ISourcesOrder} message SourcesOrder message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourcesOrder.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.seed != null && message.hasOwnProperty("seed")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.seed); + return writer; + }; + + /** + * Encodes the specified SourcesOrder message, length delimited. Does not implicitly {@link io.cucumber.messages.SourcesOrder.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.SourcesOrder + * @static + * @param {io.cucumber.messages.ISourcesOrder} message SourcesOrder message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourcesOrder.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourcesOrder message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.SourcesOrder + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.SourcesOrder} SourcesOrder + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourcesOrder.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.SourcesOrder(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.seed = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourcesOrder message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.SourcesOrder + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.SourcesOrder} SourcesOrder + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourcesOrder.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourcesOrder message. + * @function verify + * @memberof io.cucumber.messages.SourcesOrder + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourcesOrder.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.seed != null && message.hasOwnProperty("seed")) + if (!$util.isInteger(message.seed) && !(message.seed && $util.isInteger(message.seed.low) && $util.isInteger(message.seed.high))) + return "seed: integer|Long expected"; + return null; + }; + + /** + * Creates a SourcesOrder message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.SourcesOrder + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.SourcesOrder} SourcesOrder + */ + SourcesOrder.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.SourcesOrder) + return object; + var message = new $root.io.cucumber.messages.SourcesOrder(); + switch (object.type) { + case "ORDER_OF_DEFINITION": + case 0: + message.type = 0; + break; + case "RANDOM": + case 1: + message.type = 1; + break; + } + if (object.seed != null) + if ($util.Long) + (message.seed = $util.Long.fromValue(object.seed)).unsigned = true; + else if (typeof object.seed === "string") + message.seed = parseInt(object.seed, 10); + else if (typeof object.seed === "number") + message.seed = object.seed; + else if (typeof object.seed === "object") + message.seed = new $util.LongBits(object.seed.low >>> 0, object.seed.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SourcesOrder message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.SourcesOrder + * @static + * @param {io.cucumber.messages.SourcesOrder} message SourcesOrder + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourcesOrder.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "ORDER_OF_DEFINITION" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.seed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seed = options.longs === String ? "0" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.io.cucumber.messages.SourcesOrderType[message.type] : message.type; + if (message.seed != null && message.hasOwnProperty("seed")) + if (typeof message.seed === "number") + object.seed = options.longs === String ? String(message.seed) : message.seed; + else + object.seed = options.longs === String ? $util.Long.prototype.toString.call(message.seed) : options.longs === Number ? new $util.LongBits(message.seed.low >>> 0, message.seed.high >>> 0).toNumber(true) : message.seed; + return object; + }; + + /** + * Converts this SourcesOrder to JSON. + * @function toJSON + * @memberof io.cucumber.messages.SourcesOrder + * @instance + * @returns {Object.} JSON object + */ + SourcesOrder.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SourcesOrder; + })(); + + /** + * SourcesOrderType enum. + * @name io.cucumber.messages.SourcesOrderType + * @enum {string} + * @property {number} ORDER_OF_DEFINITION=0 ORDER_OF_DEFINITION value + * @property {number} RANDOM=1 RANDOM value + */ + messages.SourcesOrderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_OF_DEFINITION"] = 0; + values[valuesById[1] = "RANDOM"] = 1; + return values; + })(); + + messages.RuntimeConfig = (function() { + + /** + * Properties of a RuntimeConfig. + * @memberof io.cucumber.messages + * @interface IRuntimeConfig + * @property {boolean|null} [isFailFast] RuntimeConfig isFailFast + * @property {boolean|null} [isDryRun] RuntimeConfig isDryRun + * @property {boolean|null} [isStrict] RuntimeConfig isStrict + * @property {number|Long|null} [maxParallel] RuntimeConfig maxParallel + */ + + /** + * Constructs a new RuntimeConfig. + * @memberof io.cucumber.messages + * @classdesc Represents a RuntimeConfig. + * @implements IRuntimeConfig + * @constructor + * @param {io.cucumber.messages.IRuntimeConfig=} [properties] Properties to set + */ + function RuntimeConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RuntimeConfig isFailFast. + * @member {boolean} isFailFast + * @memberof io.cucumber.messages.RuntimeConfig + * @instance + */ + RuntimeConfig.prototype.isFailFast = false; + + /** + * RuntimeConfig isDryRun. + * @member {boolean} isDryRun + * @memberof io.cucumber.messages.RuntimeConfig + * @instance + */ + RuntimeConfig.prototype.isDryRun = false; + + /** + * RuntimeConfig isStrict. + * @member {boolean} isStrict + * @memberof io.cucumber.messages.RuntimeConfig + * @instance + */ + RuntimeConfig.prototype.isStrict = false; + + /** + * RuntimeConfig maxParallel. + * @member {number|Long} maxParallel + * @memberof io.cucumber.messages.RuntimeConfig + * @instance + */ + RuntimeConfig.prototype.maxParallel = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new RuntimeConfig instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.RuntimeConfig + * @static + * @param {io.cucumber.messages.IRuntimeConfig=} [properties] Properties to set + * @returns {io.cucumber.messages.RuntimeConfig} RuntimeConfig instance + */ + RuntimeConfig.create = function create(properties) { + return new RuntimeConfig(properties); + }; + + /** + * Encodes the specified RuntimeConfig message. Does not implicitly {@link io.cucumber.messages.RuntimeConfig.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.RuntimeConfig + * @static + * @param {io.cucumber.messages.IRuntimeConfig} message RuntimeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuntimeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isFailFast != null && message.hasOwnProperty("isFailFast")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isFailFast); + if (message.isDryRun != null && message.hasOwnProperty("isDryRun")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDryRun); + if (message.isStrict != null && message.hasOwnProperty("isStrict")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isStrict); + if (message.maxParallel != null && message.hasOwnProperty("maxParallel")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.maxParallel); + return writer; + }; + + /** + * Encodes the specified RuntimeConfig message, length delimited. Does not implicitly {@link io.cucumber.messages.RuntimeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.RuntimeConfig + * @static + * @param {io.cucumber.messages.IRuntimeConfig} message RuntimeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuntimeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RuntimeConfig message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.RuntimeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.RuntimeConfig} RuntimeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuntimeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.RuntimeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.isFailFast = reader.bool(); + break; + case 2: + message.isDryRun = reader.bool(); + break; + case 3: + message.isStrict = reader.bool(); + break; + case 4: + message.maxParallel = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RuntimeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.RuntimeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.RuntimeConfig} RuntimeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuntimeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RuntimeConfig message. + * @function verify + * @memberof io.cucumber.messages.RuntimeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RuntimeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isFailFast != null && message.hasOwnProperty("isFailFast")) + if (typeof message.isFailFast !== "boolean") + return "isFailFast: boolean expected"; + if (message.isDryRun != null && message.hasOwnProperty("isDryRun")) + if (typeof message.isDryRun !== "boolean") + return "isDryRun: boolean expected"; + if (message.isStrict != null && message.hasOwnProperty("isStrict")) + if (typeof message.isStrict !== "boolean") + return "isStrict: boolean expected"; + if (message.maxParallel != null && message.hasOwnProperty("maxParallel")) + if (!$util.isInteger(message.maxParallel) && !(message.maxParallel && $util.isInteger(message.maxParallel.low) && $util.isInteger(message.maxParallel.high))) + return "maxParallel: integer|Long expected"; + return null; + }; + + /** + * Creates a RuntimeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.RuntimeConfig + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.RuntimeConfig} RuntimeConfig + */ + RuntimeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.RuntimeConfig) + return object; + var message = new $root.io.cucumber.messages.RuntimeConfig(); + if (object.isFailFast != null) + message.isFailFast = Boolean(object.isFailFast); + if (object.isDryRun != null) + message.isDryRun = Boolean(object.isDryRun); + if (object.isStrict != null) + message.isStrict = Boolean(object.isStrict); + if (object.maxParallel != null) + if ($util.Long) + (message.maxParallel = $util.Long.fromValue(object.maxParallel)).unsigned = true; + else if (typeof object.maxParallel === "string") + message.maxParallel = parseInt(object.maxParallel, 10); + else if (typeof object.maxParallel === "number") + message.maxParallel = object.maxParallel; + else if (typeof object.maxParallel === "object") + message.maxParallel = new $util.LongBits(object.maxParallel.low >>> 0, object.maxParallel.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a RuntimeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.RuntimeConfig + * @static + * @param {io.cucumber.messages.RuntimeConfig} message RuntimeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RuntimeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.isFailFast = false; + object.isDryRun = false; + object.isStrict = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.maxParallel = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxParallel = options.longs === String ? "0" : 0; + } + if (message.isFailFast != null && message.hasOwnProperty("isFailFast")) + object.isFailFast = message.isFailFast; + if (message.isDryRun != null && message.hasOwnProperty("isDryRun")) + object.isDryRun = message.isDryRun; + if (message.isStrict != null && message.hasOwnProperty("isStrict")) + object.isStrict = message.isStrict; + if (message.maxParallel != null && message.hasOwnProperty("maxParallel")) + if (typeof message.maxParallel === "number") + object.maxParallel = options.longs === String ? String(message.maxParallel) : message.maxParallel; + else + object.maxParallel = options.longs === String ? $util.Long.prototype.toString.call(message.maxParallel) : options.longs === Number ? new $util.LongBits(message.maxParallel.low >>> 0, message.maxParallel.high >>> 0).toNumber(true) : message.maxParallel; + return object; + }; + + /** + * Converts this RuntimeConfig to JSON. + * @function toJSON + * @memberof io.cucumber.messages.RuntimeConfig + * @instance + * @returns {Object.} JSON object + */ + RuntimeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RuntimeConfig; + })(); + + messages.SupportCodeConfig = (function() { + + /** + * Properties of a SupportCodeConfig. + * @memberof io.cucumber.messages + * @interface ISupportCodeConfig + * @property {Array.|null} [beforeTestCaseHooks] SupportCodeConfig beforeTestCaseHooks + * @property {Array.|null} [afterTestCaseHooks] SupportCodeConfig afterTestCaseHooks + * @property {Array.|null} [stepDefinitions] SupportCodeConfig stepDefinitions + * @property {Array.|null} [parameterTypes] SupportCodeConfig parameterTypes + */ + + /** + * Constructs a new SupportCodeConfig. + * @memberof io.cucumber.messages + * @classdesc Represents a SupportCodeConfig. + * @implements ISupportCodeConfig + * @constructor + * @param {io.cucumber.messages.ISupportCodeConfig=} [properties] Properties to set + */ + function SupportCodeConfig(properties) { + this.beforeTestCaseHooks = []; + this.afterTestCaseHooks = []; + this.stepDefinitions = []; + this.parameterTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SupportCodeConfig beforeTestCaseHooks. + * @member {Array.} beforeTestCaseHooks + * @memberof io.cucumber.messages.SupportCodeConfig + * @instance + */ + SupportCodeConfig.prototype.beforeTestCaseHooks = $util.emptyArray; + + /** + * SupportCodeConfig afterTestCaseHooks. + * @member {Array.} afterTestCaseHooks + * @memberof io.cucumber.messages.SupportCodeConfig + * @instance + */ + SupportCodeConfig.prototype.afterTestCaseHooks = $util.emptyArray; + + /** + * SupportCodeConfig stepDefinitions. + * @member {Array.} stepDefinitions + * @memberof io.cucumber.messages.SupportCodeConfig + * @instance + */ + SupportCodeConfig.prototype.stepDefinitions = $util.emptyArray; + + /** + * SupportCodeConfig parameterTypes. + * @member {Array.} parameterTypes + * @memberof io.cucumber.messages.SupportCodeConfig + * @instance + */ + SupportCodeConfig.prototype.parameterTypes = $util.emptyArray; + + /** + * Creates a new SupportCodeConfig instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.SupportCodeConfig + * @static + * @param {io.cucumber.messages.ISupportCodeConfig=} [properties] Properties to set + * @returns {io.cucumber.messages.SupportCodeConfig} SupportCodeConfig instance + */ + SupportCodeConfig.create = function create(properties) { + return new SupportCodeConfig(properties); + }; + + /** + * Encodes the specified SupportCodeConfig message. Does not implicitly {@link io.cucumber.messages.SupportCodeConfig.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.SupportCodeConfig + * @static + * @param {io.cucumber.messages.ISupportCodeConfig} message SupportCodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SupportCodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.beforeTestCaseHooks != null && message.beforeTestCaseHooks.length) + for (var i = 0; i < message.beforeTestCaseHooks.length; ++i) + $root.io.cucumber.messages.Hook.encode(message.beforeTestCaseHooks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.afterTestCaseHooks != null && message.afterTestCaseHooks.length) + for (var i = 0; i < message.afterTestCaseHooks.length; ++i) + $root.io.cucumber.messages.Hook.encode(message.afterTestCaseHooks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.stepDefinitions != null && message.stepDefinitions.length) + for (var i = 0; i < message.stepDefinitions.length; ++i) + $root.io.cucumber.messages.StepDefinition.encode(message.stepDefinitions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parameterTypes != null && message.parameterTypes.length) + for (var i = 0; i < message.parameterTypes.length; ++i) + $root.io.cucumber.messages.ParameterType.encode(message.parameterTypes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SupportCodeConfig message, length delimited. Does not implicitly {@link io.cucumber.messages.SupportCodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.SupportCodeConfig + * @static + * @param {io.cucumber.messages.ISupportCodeConfig} message SupportCodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SupportCodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SupportCodeConfig message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.SupportCodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.SupportCodeConfig} SupportCodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SupportCodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.SupportCodeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.beforeTestCaseHooks && message.beforeTestCaseHooks.length)) + message.beforeTestCaseHooks = []; + message.beforeTestCaseHooks.push($root.io.cucumber.messages.Hook.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.afterTestCaseHooks && message.afterTestCaseHooks.length)) + message.afterTestCaseHooks = []; + message.afterTestCaseHooks.push($root.io.cucumber.messages.Hook.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.stepDefinitions && message.stepDefinitions.length)) + message.stepDefinitions = []; + message.stepDefinitions.push($root.io.cucumber.messages.StepDefinition.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.parameterTypes && message.parameterTypes.length)) + message.parameterTypes = []; + message.parameterTypes.push($root.io.cucumber.messages.ParameterType.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SupportCodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.SupportCodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.SupportCodeConfig} SupportCodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SupportCodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SupportCodeConfig message. + * @function verify + * @memberof io.cucumber.messages.SupportCodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SupportCodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.beforeTestCaseHooks != null && message.hasOwnProperty("beforeTestCaseHooks")) { + if (!Array.isArray(message.beforeTestCaseHooks)) + return "beforeTestCaseHooks: array expected"; + for (var i = 0; i < message.beforeTestCaseHooks.length; ++i) { + var error = $root.io.cucumber.messages.Hook.verify(message.beforeTestCaseHooks[i]); + if (error) + return "beforeTestCaseHooks." + error; + } + } + if (message.afterTestCaseHooks != null && message.hasOwnProperty("afterTestCaseHooks")) { + if (!Array.isArray(message.afterTestCaseHooks)) + return "afterTestCaseHooks: array expected"; + for (var i = 0; i < message.afterTestCaseHooks.length; ++i) { + var error = $root.io.cucumber.messages.Hook.verify(message.afterTestCaseHooks[i]); + if (error) + return "afterTestCaseHooks." + error; + } + } + if (message.stepDefinitions != null && message.hasOwnProperty("stepDefinitions")) { + if (!Array.isArray(message.stepDefinitions)) + return "stepDefinitions: array expected"; + for (var i = 0; i < message.stepDefinitions.length; ++i) { + var error = $root.io.cucumber.messages.StepDefinition.verify(message.stepDefinitions[i]); + if (error) + return "stepDefinitions." + error; + } + } + if (message.parameterTypes != null && message.hasOwnProperty("parameterTypes")) { + if (!Array.isArray(message.parameterTypes)) + return "parameterTypes: array expected"; + for (var i = 0; i < message.parameterTypes.length; ++i) { + var error = $root.io.cucumber.messages.ParameterType.verify(message.parameterTypes[i]); + if (error) + return "parameterTypes." + error; + } + } + return null; + }; + + /** + * Creates a SupportCodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.SupportCodeConfig + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.SupportCodeConfig} SupportCodeConfig + */ + SupportCodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.SupportCodeConfig) + return object; + var message = new $root.io.cucumber.messages.SupportCodeConfig(); + if (object.beforeTestCaseHooks) { + if (!Array.isArray(object.beforeTestCaseHooks)) + throw TypeError(".io.cucumber.messages.SupportCodeConfig.beforeTestCaseHooks: array expected"); + message.beforeTestCaseHooks = []; + for (var i = 0; i < object.beforeTestCaseHooks.length; ++i) { + if (typeof object.beforeTestCaseHooks[i] !== "object") + throw TypeError(".io.cucumber.messages.SupportCodeConfig.beforeTestCaseHooks: object expected"); + message.beforeTestCaseHooks[i] = $root.io.cucumber.messages.Hook.fromObject(object.beforeTestCaseHooks[i]); + } + } + if (object.afterTestCaseHooks) { + if (!Array.isArray(object.afterTestCaseHooks)) + throw TypeError(".io.cucumber.messages.SupportCodeConfig.afterTestCaseHooks: array expected"); + message.afterTestCaseHooks = []; + for (var i = 0; i < object.afterTestCaseHooks.length; ++i) { + if (typeof object.afterTestCaseHooks[i] !== "object") + throw TypeError(".io.cucumber.messages.SupportCodeConfig.afterTestCaseHooks: object expected"); + message.afterTestCaseHooks[i] = $root.io.cucumber.messages.Hook.fromObject(object.afterTestCaseHooks[i]); + } + } + if (object.stepDefinitions) { + if (!Array.isArray(object.stepDefinitions)) + throw TypeError(".io.cucumber.messages.SupportCodeConfig.stepDefinitions: array expected"); + message.stepDefinitions = []; + for (var i = 0; i < object.stepDefinitions.length; ++i) { + if (typeof object.stepDefinitions[i] !== "object") + throw TypeError(".io.cucumber.messages.SupportCodeConfig.stepDefinitions: object expected"); + message.stepDefinitions[i] = $root.io.cucumber.messages.StepDefinition.fromObject(object.stepDefinitions[i]); + } + } + if (object.parameterTypes) { + if (!Array.isArray(object.parameterTypes)) + throw TypeError(".io.cucumber.messages.SupportCodeConfig.parameterTypes: array expected"); + message.parameterTypes = []; + for (var i = 0; i < object.parameterTypes.length; ++i) { + if (typeof object.parameterTypes[i] !== "object") + throw TypeError(".io.cucumber.messages.SupportCodeConfig.parameterTypes: object expected"); + message.parameterTypes[i] = $root.io.cucumber.messages.ParameterType.fromObject(object.parameterTypes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SupportCodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.SupportCodeConfig + * @static + * @param {io.cucumber.messages.SupportCodeConfig} message SupportCodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SupportCodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.beforeTestCaseHooks = []; + object.afterTestCaseHooks = []; + object.stepDefinitions = []; + object.parameterTypes = []; + } + if (message.beforeTestCaseHooks && message.beforeTestCaseHooks.length) { + object.beforeTestCaseHooks = []; + for (var j = 0; j < message.beforeTestCaseHooks.length; ++j) + object.beforeTestCaseHooks[j] = $root.io.cucumber.messages.Hook.toObject(message.beforeTestCaseHooks[j], options); + } + if (message.afterTestCaseHooks && message.afterTestCaseHooks.length) { + object.afterTestCaseHooks = []; + for (var j = 0; j < message.afterTestCaseHooks.length; ++j) + object.afterTestCaseHooks[j] = $root.io.cucumber.messages.Hook.toObject(message.afterTestCaseHooks[j], options); + } + if (message.stepDefinitions && message.stepDefinitions.length) { + object.stepDefinitions = []; + for (var j = 0; j < message.stepDefinitions.length; ++j) + object.stepDefinitions[j] = $root.io.cucumber.messages.StepDefinition.toObject(message.stepDefinitions[j], options); + } + if (message.parameterTypes && message.parameterTypes.length) { + object.parameterTypes = []; + for (var j = 0; j < message.parameterTypes.length; ++j) + object.parameterTypes[j] = $root.io.cucumber.messages.ParameterType.toObject(message.parameterTypes[j], options); + } + return object; + }; + + /** + * Converts this SupportCodeConfig to JSON. + * @function toJSON + * @memberof io.cucumber.messages.SupportCodeConfig + * @instance + * @returns {Object.} JSON object + */ + SupportCodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SupportCodeConfig; + })(); + + messages.Hook = (function() { + + /** + * Properties of a Hook. + * @memberof io.cucumber.messages + * @interface IHook + * @property {string|null} [id] Hook id + * @property {string|null} [tagExpression] Hook tagExpression + * @property {io.cucumber.messages.ISourceReference|null} [sourceReference] Hook sourceReference + */ + + /** + * Constructs a new Hook. + * @memberof io.cucumber.messages + * @classdesc Represents a Hook. + * @implements IHook + * @constructor + * @param {io.cucumber.messages.IHook=} [properties] Properties to set + */ + function Hook(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Hook id. + * @member {string} id + * @memberof io.cucumber.messages.Hook + * @instance + */ + Hook.prototype.id = ""; + + /** + * Hook tagExpression. + * @member {string} tagExpression + * @memberof io.cucumber.messages.Hook + * @instance + */ + Hook.prototype.tagExpression = ""; + + /** + * Hook sourceReference. + * @member {io.cucumber.messages.ISourceReference|null|undefined} sourceReference + * @memberof io.cucumber.messages.Hook + * @instance + */ + Hook.prototype.sourceReference = null; + + /** + * Creates a new Hook instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.Hook + * @static + * @param {io.cucumber.messages.IHook=} [properties] Properties to set + * @returns {io.cucumber.messages.Hook} Hook instance + */ + Hook.create = function create(properties) { + return new Hook(properties); + }; + + /** + * Encodes the specified Hook message. Does not implicitly {@link io.cucumber.messages.Hook.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.Hook + * @static + * @param {io.cucumber.messages.IHook} message Hook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Hook.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.tagExpression != null && message.hasOwnProperty("tagExpression")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagExpression); + if (message.sourceReference != null && message.hasOwnProperty("sourceReference")) + $root.io.cucumber.messages.SourceReference.encode(message.sourceReference, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Hook message, length delimited. Does not implicitly {@link io.cucumber.messages.Hook.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.Hook + * @static + * @param {io.cucumber.messages.IHook} message Hook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Hook.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Hook message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.Hook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.Hook} Hook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hook.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.Hook(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.tagExpression = reader.string(); + break; + case 3: + message.sourceReference = $root.io.cucumber.messages.SourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Hook message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.Hook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.Hook} Hook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hook.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Hook message. + * @function verify + * @memberof io.cucumber.messages.Hook + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Hook.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.tagExpression != null && message.hasOwnProperty("tagExpression")) + if (!$util.isString(message.tagExpression)) + return "tagExpression: string expected"; + if (message.sourceReference != null && message.hasOwnProperty("sourceReference")) { + var error = $root.io.cucumber.messages.SourceReference.verify(message.sourceReference); + if (error) + return "sourceReference." + error; + } + return null; + }; + + /** + * Creates a Hook message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.Hook + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.Hook} Hook + */ + Hook.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.Hook) + return object; + var message = new $root.io.cucumber.messages.Hook(); + if (object.id != null) + message.id = String(object.id); + if (object.tagExpression != null) + message.tagExpression = String(object.tagExpression); + if (object.sourceReference != null) { + if (typeof object.sourceReference !== "object") + throw TypeError(".io.cucumber.messages.Hook.sourceReference: object expected"); + message.sourceReference = $root.io.cucumber.messages.SourceReference.fromObject(object.sourceReference); + } + return message; + }; + + /** + * Creates a plain object from a Hook message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.Hook + * @static + * @param {io.cucumber.messages.Hook} message Hook + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Hook.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.tagExpression = ""; + object.sourceReference = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.tagExpression != null && message.hasOwnProperty("tagExpression")) + object.tagExpression = message.tagExpression; + if (message.sourceReference != null && message.hasOwnProperty("sourceReference")) + object.sourceReference = $root.io.cucumber.messages.SourceReference.toObject(message.sourceReference, options); + return object; + }; + + /** + * Converts this Hook to JSON. + * @function toJSON + * @memberof io.cucumber.messages.Hook + * @instance + * @returns {Object.} JSON object + */ + Hook.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Hook; + })(); + + messages.StepDefinition = (function() { + + /** + * Properties of a StepDefinition. + * @memberof io.cucumber.messages + * @interface IStepDefinition + * @property {string|null} [id] StepDefinition id + * @property {io.cucumber.messages.IStepDefinitionPattern|null} [pattern] StepDefinition pattern + * @property {io.cucumber.messages.ISourceReference|null} [sourceReference] StepDefinition sourceReference + */ + + /** + * Constructs a new StepDefinition. + * @memberof io.cucumber.messages + * @classdesc Represents a StepDefinition. + * @implements IStepDefinition + * @constructor + * @param {io.cucumber.messages.IStepDefinition=} [properties] Properties to set + */ + function StepDefinition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StepDefinition id. + * @member {string} id + * @memberof io.cucumber.messages.StepDefinition + * @instance + */ + StepDefinition.prototype.id = ""; + + /** + * StepDefinition pattern. + * @member {io.cucumber.messages.IStepDefinitionPattern|null|undefined} pattern + * @memberof io.cucumber.messages.StepDefinition + * @instance + */ + StepDefinition.prototype.pattern = null; + + /** + * StepDefinition sourceReference. + * @member {io.cucumber.messages.ISourceReference|null|undefined} sourceReference + * @memberof io.cucumber.messages.StepDefinition + * @instance + */ + StepDefinition.prototype.sourceReference = null; + + /** + * Creates a new StepDefinition instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.StepDefinition + * @static + * @param {io.cucumber.messages.IStepDefinition=} [properties] Properties to set + * @returns {io.cucumber.messages.StepDefinition} StepDefinition instance + */ + StepDefinition.create = function create(properties) { + return new StepDefinition(properties); + }; + + /** + * Encodes the specified StepDefinition message. Does not implicitly {@link io.cucumber.messages.StepDefinition.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.StepDefinition + * @static + * @param {io.cucumber.messages.IStepDefinition} message StepDefinition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StepDefinition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.pattern != null && message.hasOwnProperty("pattern")) + $root.io.cucumber.messages.StepDefinitionPattern.encode(message.pattern, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sourceReference != null && message.hasOwnProperty("sourceReference")) + $root.io.cucumber.messages.SourceReference.encode(message.sourceReference, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StepDefinition message, length delimited. Does not implicitly {@link io.cucumber.messages.StepDefinition.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.StepDefinition + * @static + * @param {io.cucumber.messages.IStepDefinition} message StepDefinition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StepDefinition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StepDefinition message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.StepDefinition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.StepDefinition} StepDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StepDefinition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.StepDefinition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.pattern = $root.io.cucumber.messages.StepDefinitionPattern.decode(reader, reader.uint32()); + break; + case 3: + message.sourceReference = $root.io.cucumber.messages.SourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StepDefinition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.StepDefinition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.StepDefinition} StepDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StepDefinition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StepDefinition message. + * @function verify + * @memberof io.cucumber.messages.StepDefinition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StepDefinition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + var error = $root.io.cucumber.messages.StepDefinitionPattern.verify(message.pattern); + if (error) + return "pattern." + error; + } + if (message.sourceReference != null && message.hasOwnProperty("sourceReference")) { + var error = $root.io.cucumber.messages.SourceReference.verify(message.sourceReference); + if (error) + return "sourceReference." + error; + } + return null; + }; + + /** + * Creates a StepDefinition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.StepDefinition + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.StepDefinition} StepDefinition + */ + StepDefinition.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.StepDefinition) + return object; + var message = new $root.io.cucumber.messages.StepDefinition(); + if (object.id != null) + message.id = String(object.id); + if (object.pattern != null) { + if (typeof object.pattern !== "object") + throw TypeError(".io.cucumber.messages.StepDefinition.pattern: object expected"); + message.pattern = $root.io.cucumber.messages.StepDefinitionPattern.fromObject(object.pattern); + } + if (object.sourceReference != null) { + if (typeof object.sourceReference !== "object") + throw TypeError(".io.cucumber.messages.StepDefinition.sourceReference: object expected"); + message.sourceReference = $root.io.cucumber.messages.SourceReference.fromObject(object.sourceReference); + } + return message; + }; + + /** + * Creates a plain object from a StepDefinition message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.StepDefinition + * @static + * @param {io.cucumber.messages.StepDefinition} message StepDefinition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StepDefinition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.pattern = null; + object.sourceReference = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.pattern != null && message.hasOwnProperty("pattern")) + object.pattern = $root.io.cucumber.messages.StepDefinitionPattern.toObject(message.pattern, options); + if (message.sourceReference != null && message.hasOwnProperty("sourceReference")) + object.sourceReference = $root.io.cucumber.messages.SourceReference.toObject(message.sourceReference, options); + return object; + }; + + /** + * Converts this StepDefinition to JSON. + * @function toJSON + * @memberof io.cucumber.messages.StepDefinition + * @instance + * @returns {Object.} JSON object + */ + StepDefinition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StepDefinition; + })(); + + messages.StepDefinitionPattern = (function() { + + /** + * Properties of a StepDefinitionPattern. + * @memberof io.cucumber.messages + * @interface IStepDefinitionPattern + * @property {string|null} [source] StepDefinitionPattern source + * @property {io.cucumber.messages.StepDefinitionPatternType|null} [type] StepDefinitionPattern type + */ + + /** + * Constructs a new StepDefinitionPattern. + * @memberof io.cucumber.messages + * @classdesc Represents a StepDefinitionPattern. + * @implements IStepDefinitionPattern + * @constructor + * @param {io.cucumber.messages.IStepDefinitionPattern=} [properties] Properties to set + */ + function StepDefinitionPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StepDefinitionPattern source. + * @member {string} source + * @memberof io.cucumber.messages.StepDefinitionPattern + * @instance + */ + StepDefinitionPattern.prototype.source = ""; + + /** + * StepDefinitionPattern type. + * @member {io.cucumber.messages.StepDefinitionPatternType} type + * @memberof io.cucumber.messages.StepDefinitionPattern + * @instance + */ + StepDefinitionPattern.prototype.type = 0; + + /** + * Creates a new StepDefinitionPattern instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.StepDefinitionPattern + * @static + * @param {io.cucumber.messages.IStepDefinitionPattern=} [properties] Properties to set + * @returns {io.cucumber.messages.StepDefinitionPattern} StepDefinitionPattern instance + */ + StepDefinitionPattern.create = function create(properties) { + return new StepDefinitionPattern(properties); + }; + + /** + * Encodes the specified StepDefinitionPattern message. Does not implicitly {@link io.cucumber.messages.StepDefinitionPattern.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.StepDefinitionPattern + * @static + * @param {io.cucumber.messages.IStepDefinitionPattern} message StepDefinitionPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StepDefinitionPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && message.hasOwnProperty("source")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified StepDefinitionPattern message, length delimited. Does not implicitly {@link io.cucumber.messages.StepDefinitionPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.StepDefinitionPattern + * @static + * @param {io.cucumber.messages.IStepDefinitionPattern} message StepDefinitionPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StepDefinitionPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StepDefinitionPattern message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.StepDefinitionPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.StepDefinitionPattern} StepDefinitionPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StepDefinitionPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.StepDefinitionPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StepDefinitionPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.StepDefinitionPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.StepDefinitionPattern} StepDefinitionPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StepDefinitionPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StepDefinitionPattern message. + * @function verify + * @memberof io.cucumber.messages.StepDefinitionPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StepDefinitionPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a StepDefinitionPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.StepDefinitionPattern + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.StepDefinitionPattern} StepDefinitionPattern + */ + StepDefinitionPattern.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.StepDefinitionPattern) + return object; + var message = new $root.io.cucumber.messages.StepDefinitionPattern(); + if (object.source != null) + message.source = String(object.source); + switch (object.type) { + case "CUCUMBER_EXPRESSION": + case 0: + message.type = 0; + break; + case "REGULAR_EXPRESSION": + case 1: + message.type = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a StepDefinitionPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.StepDefinitionPattern + * @static + * @param {io.cucumber.messages.StepDefinitionPattern} message StepDefinitionPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StepDefinitionPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = ""; + object.type = options.enums === String ? "CUCUMBER_EXPRESSION" : 0; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.io.cucumber.messages.StepDefinitionPatternType[message.type] : message.type; + return object; + }; + + /** + * Converts this StepDefinitionPattern to JSON. + * @function toJSON + * @memberof io.cucumber.messages.StepDefinitionPattern + * @instance + * @returns {Object.} JSON object + */ + StepDefinitionPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StepDefinitionPattern; + })(); + + /** + * StepDefinitionPatternType enum. + * @name io.cucumber.messages.StepDefinitionPatternType + * @enum {string} + * @property {number} CUCUMBER_EXPRESSION=0 CUCUMBER_EXPRESSION value + * @property {number} REGULAR_EXPRESSION=1 REGULAR_EXPRESSION value + */ + messages.StepDefinitionPatternType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CUCUMBER_EXPRESSION"] = 0; + values[valuesById[1] = "REGULAR_EXPRESSION"] = 1; + return values; + })(); + + messages.ParameterType = (function() { + + /** + * Properties of a ParameterType. + * @memberof io.cucumber.messages + * @interface IParameterType + * @property {string|null} [name] ParameterType name + * @property {Array.|null} [regularExpressions] ParameterType regularExpressions + * @property {boolean|null} [preferForRegularExpressionMatch] ParameterType preferForRegularExpressionMatch + * @property {boolean|null} [useForSnippets] ParameterType useForSnippets + */ + + /** + * Constructs a new ParameterType. + * @memberof io.cucumber.messages + * @classdesc Represents a ParameterType. + * @implements IParameterType + * @constructor + * @param {io.cucumber.messages.IParameterType=} [properties] Properties to set + */ + function ParameterType(properties) { + this.regularExpressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParameterType name. + * @member {string} name + * @memberof io.cucumber.messages.ParameterType + * @instance + */ + ParameterType.prototype.name = ""; + + /** + * ParameterType regularExpressions. + * @member {Array.} regularExpressions + * @memberof io.cucumber.messages.ParameterType + * @instance + */ + ParameterType.prototype.regularExpressions = $util.emptyArray; + + /** + * ParameterType preferForRegularExpressionMatch. + * @member {boolean} preferForRegularExpressionMatch + * @memberof io.cucumber.messages.ParameterType + * @instance + */ + ParameterType.prototype.preferForRegularExpressionMatch = false; + + /** + * ParameterType useForSnippets. + * @member {boolean} useForSnippets + * @memberof io.cucumber.messages.ParameterType + * @instance + */ + ParameterType.prototype.useForSnippets = false; + + /** + * Creates a new ParameterType instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.ParameterType + * @static + * @param {io.cucumber.messages.IParameterType=} [properties] Properties to set + * @returns {io.cucumber.messages.ParameterType} ParameterType instance + */ + ParameterType.create = function create(properties) { + return new ParameterType(properties); + }; + + /** + * Encodes the specified ParameterType message. Does not implicitly {@link io.cucumber.messages.ParameterType.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.ParameterType + * @static + * @param {io.cucumber.messages.IParameterType} message ParameterType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.regularExpressions != null && message.regularExpressions.length) + for (var i = 0; i < message.regularExpressions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.regularExpressions[i]); + if (message.preferForRegularExpressionMatch != null && message.hasOwnProperty("preferForRegularExpressionMatch")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preferForRegularExpressionMatch); + if (message.useForSnippets != null && message.hasOwnProperty("useForSnippets")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.useForSnippets); + return writer; + }; + + /** + * Encodes the specified ParameterType message, length delimited. Does not implicitly {@link io.cucumber.messages.ParameterType.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.ParameterType + * @static + * @param {io.cucumber.messages.IParameterType} message ParameterType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParameterType message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.ParameterType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.ParameterType} ParameterType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.ParameterType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.regularExpressions && message.regularExpressions.length)) + message.regularExpressions = []; + message.regularExpressions.push(reader.string()); + break; + case 3: + message.preferForRegularExpressionMatch = reader.bool(); + break; + case 4: + message.useForSnippets = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParameterType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.ParameterType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.ParameterType} ParameterType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParameterType message. + * @function verify + * @memberof io.cucumber.messages.ParameterType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParameterType.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.regularExpressions != null && message.hasOwnProperty("regularExpressions")) { + if (!Array.isArray(message.regularExpressions)) + return "regularExpressions: array expected"; + for (var i = 0; i < message.regularExpressions.length; ++i) + if (!$util.isString(message.regularExpressions[i])) + return "regularExpressions: string[] expected"; + } + if (message.preferForRegularExpressionMatch != null && message.hasOwnProperty("preferForRegularExpressionMatch")) + if (typeof message.preferForRegularExpressionMatch !== "boolean") + return "preferForRegularExpressionMatch: boolean expected"; + if (message.useForSnippets != null && message.hasOwnProperty("useForSnippets")) + if (typeof message.useForSnippets !== "boolean") + return "useForSnippets: boolean expected"; + return null; + }; + + /** + * Creates a ParameterType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.ParameterType + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.ParameterType} ParameterType + */ + ParameterType.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.ParameterType) + return object; + var message = new $root.io.cucumber.messages.ParameterType(); + if (object.name != null) + message.name = String(object.name); + if (object.regularExpressions) { + if (!Array.isArray(object.regularExpressions)) + throw TypeError(".io.cucumber.messages.ParameterType.regularExpressions: array expected"); + message.regularExpressions = []; + for (var i = 0; i < object.regularExpressions.length; ++i) + message.regularExpressions[i] = String(object.regularExpressions[i]); + } + if (object.preferForRegularExpressionMatch != null) + message.preferForRegularExpressionMatch = Boolean(object.preferForRegularExpressionMatch); + if (object.useForSnippets != null) + message.useForSnippets = Boolean(object.useForSnippets); + return message; + }; + + /** + * Creates a plain object from a ParameterType message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.ParameterType + * @static + * @param {io.cucumber.messages.ParameterType} message ParameterType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParameterType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.regularExpressions = []; + if (options.defaults) { + object.name = ""; + object.preferForRegularExpressionMatch = false; + object.useForSnippets = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.regularExpressions && message.regularExpressions.length) { + object.regularExpressions = []; + for (var j = 0; j < message.regularExpressions.length; ++j) + object.regularExpressions[j] = message.regularExpressions[j]; + } + if (message.preferForRegularExpressionMatch != null && message.hasOwnProperty("preferForRegularExpressionMatch")) + object.preferForRegularExpressionMatch = message.preferForRegularExpressionMatch; + if (message.useForSnippets != null && message.hasOwnProperty("useForSnippets")) + object.useForSnippets = message.useForSnippets; + return object; + }; + + /** + * Converts this ParameterType to JSON. + * @function toJSON + * @memberof io.cucumber.messages.ParameterType + * @instance + * @returns {Object.} JSON object + */ + ParameterType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ParameterType; + })(); + + messages.CommandActionComplete = (function() { + + /** + * Properties of a CommandActionComplete. + * @memberof io.cucumber.messages + * @interface ICommandActionComplete + * @property {string|null} [completedId] CommandActionComplete completedId + * @property {io.cucumber.messages.ITestResult|null} [testResult] CommandActionComplete testResult + * @property {string|null} [snippet] CommandActionComplete snippet + */ + + /** + * Constructs a new CommandActionComplete. + * @memberof io.cucumber.messages + * @classdesc Represents a CommandActionComplete. + * @implements ICommandActionComplete + * @constructor + * @param {io.cucumber.messages.ICommandActionComplete=} [properties] Properties to set + */ + function CommandActionComplete(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommandActionComplete completedId. + * @member {string} completedId + * @memberof io.cucumber.messages.CommandActionComplete + * @instance + */ + CommandActionComplete.prototype.completedId = ""; + + /** + * CommandActionComplete testResult. + * @member {io.cucumber.messages.ITestResult|null|undefined} testResult + * @memberof io.cucumber.messages.CommandActionComplete + * @instance + */ + CommandActionComplete.prototype.testResult = null; + + /** + * CommandActionComplete snippet. + * @member {string} snippet + * @memberof io.cucumber.messages.CommandActionComplete + * @instance + */ + CommandActionComplete.prototype.snippet = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CommandActionComplete result. + * @member {"testResult"|"snippet"|undefined} result + * @memberof io.cucumber.messages.CommandActionComplete + * @instance + */ + Object.defineProperty(CommandActionComplete.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["testResult", "snippet"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CommandActionComplete instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.CommandActionComplete + * @static + * @param {io.cucumber.messages.ICommandActionComplete=} [properties] Properties to set + * @returns {io.cucumber.messages.CommandActionComplete} CommandActionComplete instance + */ + CommandActionComplete.create = function create(properties) { + return new CommandActionComplete(properties); + }; + + /** + * Encodes the specified CommandActionComplete message. Does not implicitly {@link io.cucumber.messages.CommandActionComplete.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.CommandActionComplete + * @static + * @param {io.cucumber.messages.ICommandActionComplete} message CommandActionComplete message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandActionComplete.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.completedId != null && message.hasOwnProperty("completedId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.completedId); + if (message.testResult != null && message.hasOwnProperty("testResult")) + $root.io.cucumber.messages.TestResult.encode(message.testResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.snippet != null && message.hasOwnProperty("snippet")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.snippet); + return writer; + }; + + /** + * Encodes the specified CommandActionComplete message, length delimited. Does not implicitly {@link io.cucumber.messages.CommandActionComplete.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.CommandActionComplete + * @static + * @param {io.cucumber.messages.ICommandActionComplete} message CommandActionComplete message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandActionComplete.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommandActionComplete message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.CommandActionComplete + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.CommandActionComplete} CommandActionComplete + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandActionComplete.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.CommandActionComplete(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.completedId = reader.string(); + break; + case 2: + message.testResult = $root.io.cucumber.messages.TestResult.decode(reader, reader.uint32()); + break; + case 3: + message.snippet = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommandActionComplete message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.CommandActionComplete + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.CommandActionComplete} CommandActionComplete + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandActionComplete.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommandActionComplete message. + * @function verify + * @memberof io.cucumber.messages.CommandActionComplete + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommandActionComplete.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.completedId != null && message.hasOwnProperty("completedId")) + if (!$util.isString(message.completedId)) + return "completedId: string expected"; + if (message.testResult != null && message.hasOwnProperty("testResult")) { + properties.result = 1; + { + var error = $root.io.cucumber.messages.TestResult.verify(message.testResult); + if (error) + return "testResult." + error; + } + } + if (message.snippet != null && message.hasOwnProperty("snippet")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + if (!$util.isString(message.snippet)) + return "snippet: string expected"; + } + return null; + }; + + /** + * Creates a CommandActionComplete message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.CommandActionComplete + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.CommandActionComplete} CommandActionComplete + */ + CommandActionComplete.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.CommandActionComplete) + return object; + var message = new $root.io.cucumber.messages.CommandActionComplete(); + if (object.completedId != null) + message.completedId = String(object.completedId); + if (object.testResult != null) { + if (typeof object.testResult !== "object") + throw TypeError(".io.cucumber.messages.CommandActionComplete.testResult: object expected"); + message.testResult = $root.io.cucumber.messages.TestResult.fromObject(object.testResult); + } + if (object.snippet != null) + message.snippet = String(object.snippet); + return message; + }; + + /** + * Creates a plain object from a CommandActionComplete message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.CommandActionComplete + * @static + * @param {io.cucumber.messages.CommandActionComplete} message CommandActionComplete + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommandActionComplete.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.completedId = ""; + if (message.completedId != null && message.hasOwnProperty("completedId")) + object.completedId = message.completedId; + if (message.testResult != null && message.hasOwnProperty("testResult")) { + object.testResult = $root.io.cucumber.messages.TestResult.toObject(message.testResult, options); + if (options.oneofs) + object.result = "testResult"; + } + if (message.snippet != null && message.hasOwnProperty("snippet")) { + object.snippet = message.snippet; + if (options.oneofs) + object.result = "snippet"; + } + return object; + }; + + /** + * Converts this CommandActionComplete to JSON. + * @function toJSON + * @memberof io.cucumber.messages.CommandActionComplete + * @instance + * @returns {Object.} JSON object + */ + CommandActionComplete.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommandActionComplete; + })(); + + messages.CommandRunBeforeTestRunHooks = (function() { + + /** + * Properties of a CommandRunBeforeTestRunHooks. + * @memberof io.cucumber.messages + * @interface ICommandRunBeforeTestRunHooks + * @property {string|null} [actionId] CommandRunBeforeTestRunHooks actionId + */ + + /** + * Constructs a new CommandRunBeforeTestRunHooks. + * @memberof io.cucumber.messages + * @classdesc Represents a CommandRunBeforeTestRunHooks. + * @implements ICommandRunBeforeTestRunHooks + * @constructor + * @param {io.cucumber.messages.ICommandRunBeforeTestRunHooks=} [properties] Properties to set + */ + function CommandRunBeforeTestRunHooks(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommandRunBeforeTestRunHooks actionId. + * @member {string} actionId + * @memberof io.cucumber.messages.CommandRunBeforeTestRunHooks + * @instance + */ + CommandRunBeforeTestRunHooks.prototype.actionId = ""; + + /** + * Creates a new CommandRunBeforeTestRunHooks instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.CommandRunBeforeTestRunHooks + * @static + * @param {io.cucumber.messages.ICommandRunBeforeTestRunHooks=} [properties] Properties to set + * @returns {io.cucumber.messages.CommandRunBeforeTestRunHooks} CommandRunBeforeTestRunHooks instance + */ + CommandRunBeforeTestRunHooks.create = function create(properties) { + return new CommandRunBeforeTestRunHooks(properties); + }; + + /** + * Encodes the specified CommandRunBeforeTestRunHooks message. Does not implicitly {@link io.cucumber.messages.CommandRunBeforeTestRunHooks.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.CommandRunBeforeTestRunHooks + * @static + * @param {io.cucumber.messages.ICommandRunBeforeTestRunHooks} message CommandRunBeforeTestRunHooks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandRunBeforeTestRunHooks.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actionId != null && message.hasOwnProperty("actionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.actionId); + return writer; + }; + + /** + * Encodes the specified CommandRunBeforeTestRunHooks message, length delimited. Does not implicitly {@link io.cucumber.messages.CommandRunBeforeTestRunHooks.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.CommandRunBeforeTestRunHooks + * @static + * @param {io.cucumber.messages.ICommandRunBeforeTestRunHooks} message CommandRunBeforeTestRunHooks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandRunBeforeTestRunHooks.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommandRunBeforeTestRunHooks message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.CommandRunBeforeTestRunHooks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.CommandRunBeforeTestRunHooks} CommandRunBeforeTestRunHooks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandRunBeforeTestRunHooks.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.CommandRunBeforeTestRunHooks(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.actionId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommandRunBeforeTestRunHooks message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.CommandRunBeforeTestRunHooks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.CommandRunBeforeTestRunHooks} CommandRunBeforeTestRunHooks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandRunBeforeTestRunHooks.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommandRunBeforeTestRunHooks message. + * @function verify + * @memberof io.cucumber.messages.CommandRunBeforeTestRunHooks + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommandRunBeforeTestRunHooks.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actionId != null && message.hasOwnProperty("actionId")) + if (!$util.isString(message.actionId)) + return "actionId: string expected"; + return null; + }; + + /** + * Creates a CommandRunBeforeTestRunHooks message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.CommandRunBeforeTestRunHooks + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.CommandRunBeforeTestRunHooks} CommandRunBeforeTestRunHooks + */ + CommandRunBeforeTestRunHooks.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.CommandRunBeforeTestRunHooks) + return object; + var message = new $root.io.cucumber.messages.CommandRunBeforeTestRunHooks(); + if (object.actionId != null) + message.actionId = String(object.actionId); + return message; + }; + + /** + * Creates a plain object from a CommandRunBeforeTestRunHooks message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.CommandRunBeforeTestRunHooks + * @static + * @param {io.cucumber.messages.CommandRunBeforeTestRunHooks} message CommandRunBeforeTestRunHooks + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommandRunBeforeTestRunHooks.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.actionId = ""; + if (message.actionId != null && message.hasOwnProperty("actionId")) + object.actionId = message.actionId; + return object; + }; + + /** + * Converts this CommandRunBeforeTestRunHooks to JSON. + * @function toJSON + * @memberof io.cucumber.messages.CommandRunBeforeTestRunHooks + * @instance + * @returns {Object.} JSON object + */ + CommandRunBeforeTestRunHooks.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommandRunBeforeTestRunHooks; + })(); + + messages.CommandRunAfterTestRunHooks = (function() { + + /** + * Properties of a CommandRunAfterTestRunHooks. + * @memberof io.cucumber.messages + * @interface ICommandRunAfterTestRunHooks + * @property {string|null} [actionId] CommandRunAfterTestRunHooks actionId + */ + + /** + * Constructs a new CommandRunAfterTestRunHooks. + * @memberof io.cucumber.messages + * @classdesc Represents a CommandRunAfterTestRunHooks. + * @implements ICommandRunAfterTestRunHooks + * @constructor + * @param {io.cucumber.messages.ICommandRunAfterTestRunHooks=} [properties] Properties to set + */ + function CommandRunAfterTestRunHooks(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommandRunAfterTestRunHooks actionId. + * @member {string} actionId + * @memberof io.cucumber.messages.CommandRunAfterTestRunHooks + * @instance + */ + CommandRunAfterTestRunHooks.prototype.actionId = ""; + + /** + * Creates a new CommandRunAfterTestRunHooks instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.CommandRunAfterTestRunHooks + * @static + * @param {io.cucumber.messages.ICommandRunAfterTestRunHooks=} [properties] Properties to set + * @returns {io.cucumber.messages.CommandRunAfterTestRunHooks} CommandRunAfterTestRunHooks instance + */ + CommandRunAfterTestRunHooks.create = function create(properties) { + return new CommandRunAfterTestRunHooks(properties); + }; + + /** + * Encodes the specified CommandRunAfterTestRunHooks message. Does not implicitly {@link io.cucumber.messages.CommandRunAfterTestRunHooks.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.CommandRunAfterTestRunHooks + * @static + * @param {io.cucumber.messages.ICommandRunAfterTestRunHooks} message CommandRunAfterTestRunHooks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandRunAfterTestRunHooks.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actionId != null && message.hasOwnProperty("actionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.actionId); + return writer; + }; + + /** + * Encodes the specified CommandRunAfterTestRunHooks message, length delimited. Does not implicitly {@link io.cucumber.messages.CommandRunAfterTestRunHooks.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.CommandRunAfterTestRunHooks + * @static + * @param {io.cucumber.messages.ICommandRunAfterTestRunHooks} message CommandRunAfterTestRunHooks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandRunAfterTestRunHooks.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommandRunAfterTestRunHooks message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.CommandRunAfterTestRunHooks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.CommandRunAfterTestRunHooks} CommandRunAfterTestRunHooks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandRunAfterTestRunHooks.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.CommandRunAfterTestRunHooks(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.actionId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommandRunAfterTestRunHooks message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.CommandRunAfterTestRunHooks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.CommandRunAfterTestRunHooks} CommandRunAfterTestRunHooks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandRunAfterTestRunHooks.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommandRunAfterTestRunHooks message. + * @function verify + * @memberof io.cucumber.messages.CommandRunAfterTestRunHooks + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommandRunAfterTestRunHooks.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actionId != null && message.hasOwnProperty("actionId")) + if (!$util.isString(message.actionId)) + return "actionId: string expected"; + return null; + }; + + /** + * Creates a CommandRunAfterTestRunHooks message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.CommandRunAfterTestRunHooks + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.CommandRunAfterTestRunHooks} CommandRunAfterTestRunHooks + */ + CommandRunAfterTestRunHooks.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.CommandRunAfterTestRunHooks) + return object; + var message = new $root.io.cucumber.messages.CommandRunAfterTestRunHooks(); + if (object.actionId != null) + message.actionId = String(object.actionId); + return message; + }; + + /** + * Creates a plain object from a CommandRunAfterTestRunHooks message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.CommandRunAfterTestRunHooks + * @static + * @param {io.cucumber.messages.CommandRunAfterTestRunHooks} message CommandRunAfterTestRunHooks + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommandRunAfterTestRunHooks.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.actionId = ""; + if (message.actionId != null && message.hasOwnProperty("actionId")) + object.actionId = message.actionId; + return object; + }; + + /** + * Converts this CommandRunAfterTestRunHooks to JSON. + * @function toJSON + * @memberof io.cucumber.messages.CommandRunAfterTestRunHooks + * @instance + * @returns {Object.} JSON object + */ + CommandRunAfterTestRunHooks.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommandRunAfterTestRunHooks; + })(); + + messages.CommandInitializeTestCase = (function() { + + /** + * Properties of a CommandInitializeTestCase. + * @memberof io.cucumber.messages + * @interface ICommandInitializeTestCase + * @property {string|null} [actionId] CommandInitializeTestCase actionId + * @property {io.cucumber.messages.IPickle|null} [pickle] CommandInitializeTestCase pickle + */ + + /** + * Constructs a new CommandInitializeTestCase. + * @memberof io.cucumber.messages + * @classdesc Represents a CommandInitializeTestCase. + * @implements ICommandInitializeTestCase + * @constructor + * @param {io.cucumber.messages.ICommandInitializeTestCase=} [properties] Properties to set + */ + function CommandInitializeTestCase(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommandInitializeTestCase actionId. + * @member {string} actionId + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @instance + */ + CommandInitializeTestCase.prototype.actionId = ""; + + /** + * CommandInitializeTestCase pickle. + * @member {io.cucumber.messages.IPickle|null|undefined} pickle + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @instance + */ + CommandInitializeTestCase.prototype.pickle = null; + + /** + * Creates a new CommandInitializeTestCase instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @static + * @param {io.cucumber.messages.ICommandInitializeTestCase=} [properties] Properties to set + * @returns {io.cucumber.messages.CommandInitializeTestCase} CommandInitializeTestCase instance + */ + CommandInitializeTestCase.create = function create(properties) { + return new CommandInitializeTestCase(properties); + }; + + /** + * Encodes the specified CommandInitializeTestCase message. Does not implicitly {@link io.cucumber.messages.CommandInitializeTestCase.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @static + * @param {io.cucumber.messages.ICommandInitializeTestCase} message CommandInitializeTestCase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandInitializeTestCase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actionId != null && message.hasOwnProperty("actionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.actionId); + if (message.pickle != null && message.hasOwnProperty("pickle")) + $root.io.cucumber.messages.Pickle.encode(message.pickle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommandInitializeTestCase message, length delimited. Does not implicitly {@link io.cucumber.messages.CommandInitializeTestCase.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @static + * @param {io.cucumber.messages.ICommandInitializeTestCase} message CommandInitializeTestCase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandInitializeTestCase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommandInitializeTestCase message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.CommandInitializeTestCase} CommandInitializeTestCase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandInitializeTestCase.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.CommandInitializeTestCase(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.actionId = reader.string(); + break; + case 2: + message.pickle = $root.io.cucumber.messages.Pickle.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommandInitializeTestCase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.CommandInitializeTestCase} CommandInitializeTestCase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandInitializeTestCase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommandInitializeTestCase message. + * @function verify + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommandInitializeTestCase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actionId != null && message.hasOwnProperty("actionId")) + if (!$util.isString(message.actionId)) + return "actionId: string expected"; + if (message.pickle != null && message.hasOwnProperty("pickle")) { + var error = $root.io.cucumber.messages.Pickle.verify(message.pickle); + if (error) + return "pickle." + error; + } + return null; + }; + + /** + * Creates a CommandInitializeTestCase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.CommandInitializeTestCase} CommandInitializeTestCase + */ + CommandInitializeTestCase.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.CommandInitializeTestCase) + return object; + var message = new $root.io.cucumber.messages.CommandInitializeTestCase(); + if (object.actionId != null) + message.actionId = String(object.actionId); + if (object.pickle != null) { + if (typeof object.pickle !== "object") + throw TypeError(".io.cucumber.messages.CommandInitializeTestCase.pickle: object expected"); + message.pickle = $root.io.cucumber.messages.Pickle.fromObject(object.pickle); + } + return message; + }; + + /** + * Creates a plain object from a CommandInitializeTestCase message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @static + * @param {io.cucumber.messages.CommandInitializeTestCase} message CommandInitializeTestCase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommandInitializeTestCase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.actionId = ""; + object.pickle = null; + } + if (message.actionId != null && message.hasOwnProperty("actionId")) + object.actionId = message.actionId; + if (message.pickle != null && message.hasOwnProperty("pickle")) + object.pickle = $root.io.cucumber.messages.Pickle.toObject(message.pickle, options); + return object; + }; + + /** + * Converts this CommandInitializeTestCase to JSON. + * @function toJSON + * @memberof io.cucumber.messages.CommandInitializeTestCase + * @instance + * @returns {Object.} JSON object + */ + CommandInitializeTestCase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommandInitializeTestCase; + })(); + + messages.CommandRunBeforeTestCaseHook = (function() { + + /** + * Properties of a CommandRunBeforeTestCaseHook. + * @memberof io.cucumber.messages + * @interface ICommandRunBeforeTestCaseHook + * @property {string|null} [actionId] CommandRunBeforeTestCaseHook actionId + * @property {string|null} [hookId] CommandRunBeforeTestCaseHook hookId + * @property {string|null} [testCaseId] CommandRunBeforeTestCaseHook testCaseId + */ + + /** + * Constructs a new CommandRunBeforeTestCaseHook. + * @memberof io.cucumber.messages + * @classdesc Represents a CommandRunBeforeTestCaseHook. + * @implements ICommandRunBeforeTestCaseHook + * @constructor + * @param {io.cucumber.messages.ICommandRunBeforeTestCaseHook=} [properties] Properties to set + */ + function CommandRunBeforeTestCaseHook(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommandRunBeforeTestCaseHook actionId. + * @member {string} actionId + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @instance + */ + CommandRunBeforeTestCaseHook.prototype.actionId = ""; + + /** + * CommandRunBeforeTestCaseHook hookId. + * @member {string} hookId + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @instance + */ + CommandRunBeforeTestCaseHook.prototype.hookId = ""; + + /** + * CommandRunBeforeTestCaseHook testCaseId. + * @member {string} testCaseId + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @instance + */ + CommandRunBeforeTestCaseHook.prototype.testCaseId = ""; + + /** + * Creates a new CommandRunBeforeTestCaseHook instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @static + * @param {io.cucumber.messages.ICommandRunBeforeTestCaseHook=} [properties] Properties to set + * @returns {io.cucumber.messages.CommandRunBeforeTestCaseHook} CommandRunBeforeTestCaseHook instance + */ + CommandRunBeforeTestCaseHook.create = function create(properties) { + return new CommandRunBeforeTestCaseHook(properties); + }; + + /** + * Encodes the specified CommandRunBeforeTestCaseHook message. Does not implicitly {@link io.cucumber.messages.CommandRunBeforeTestCaseHook.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @static + * @param {io.cucumber.messages.ICommandRunBeforeTestCaseHook} message CommandRunBeforeTestCaseHook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandRunBeforeTestCaseHook.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actionId != null && message.hasOwnProperty("actionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.actionId); + if (message.hookId != null && message.hasOwnProperty("hookId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.hookId); + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.testCaseId); + return writer; + }; + + /** + * Encodes the specified CommandRunBeforeTestCaseHook message, length delimited. Does not implicitly {@link io.cucumber.messages.CommandRunBeforeTestCaseHook.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @static + * @param {io.cucumber.messages.ICommandRunBeforeTestCaseHook} message CommandRunBeforeTestCaseHook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandRunBeforeTestCaseHook.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommandRunBeforeTestCaseHook message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.CommandRunBeforeTestCaseHook} CommandRunBeforeTestCaseHook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandRunBeforeTestCaseHook.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.CommandRunBeforeTestCaseHook(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.actionId = reader.string(); + break; + case 2: + message.hookId = reader.string(); + break; + case 3: + message.testCaseId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommandRunBeforeTestCaseHook message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.CommandRunBeforeTestCaseHook} CommandRunBeforeTestCaseHook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandRunBeforeTestCaseHook.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommandRunBeforeTestCaseHook message. + * @function verify + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommandRunBeforeTestCaseHook.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actionId != null && message.hasOwnProperty("actionId")) + if (!$util.isString(message.actionId)) + return "actionId: string expected"; + if (message.hookId != null && message.hasOwnProperty("hookId")) + if (!$util.isString(message.hookId)) + return "hookId: string expected"; + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + if (!$util.isString(message.testCaseId)) + return "testCaseId: string expected"; + return null; + }; + + /** + * Creates a CommandRunBeforeTestCaseHook message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.CommandRunBeforeTestCaseHook} CommandRunBeforeTestCaseHook + */ + CommandRunBeforeTestCaseHook.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.CommandRunBeforeTestCaseHook) + return object; + var message = new $root.io.cucumber.messages.CommandRunBeforeTestCaseHook(); + if (object.actionId != null) + message.actionId = String(object.actionId); + if (object.hookId != null) + message.hookId = String(object.hookId); + if (object.testCaseId != null) + message.testCaseId = String(object.testCaseId); + return message; + }; + + /** + * Creates a plain object from a CommandRunBeforeTestCaseHook message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @static + * @param {io.cucumber.messages.CommandRunBeforeTestCaseHook} message CommandRunBeforeTestCaseHook + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommandRunBeforeTestCaseHook.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.actionId = ""; + object.hookId = ""; + object.testCaseId = ""; + } + if (message.actionId != null && message.hasOwnProperty("actionId")) + object.actionId = message.actionId; + if (message.hookId != null && message.hasOwnProperty("hookId")) + object.hookId = message.hookId; + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + object.testCaseId = message.testCaseId; + return object; + }; + + /** + * Converts this CommandRunBeforeTestCaseHook to JSON. + * @function toJSON + * @memberof io.cucumber.messages.CommandRunBeforeTestCaseHook + * @instance + * @returns {Object.} JSON object + */ + CommandRunBeforeTestCaseHook.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommandRunBeforeTestCaseHook; + })(); + + messages.CommandRunAfterTestCaseHook = (function() { + + /** + * Properties of a CommandRunAfterTestCaseHook. + * @memberof io.cucumber.messages + * @interface ICommandRunAfterTestCaseHook + * @property {string|null} [actionId] CommandRunAfterTestCaseHook actionId + * @property {string|null} [hookId] CommandRunAfterTestCaseHook hookId + * @property {string|null} [testCaseId] CommandRunAfterTestCaseHook testCaseId + */ + + /** + * Constructs a new CommandRunAfterTestCaseHook. + * @memberof io.cucumber.messages + * @classdesc Represents a CommandRunAfterTestCaseHook. + * @implements ICommandRunAfterTestCaseHook + * @constructor + * @param {io.cucumber.messages.ICommandRunAfterTestCaseHook=} [properties] Properties to set + */ + function CommandRunAfterTestCaseHook(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommandRunAfterTestCaseHook actionId. + * @member {string} actionId + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @instance + */ + CommandRunAfterTestCaseHook.prototype.actionId = ""; + + /** + * CommandRunAfterTestCaseHook hookId. + * @member {string} hookId + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @instance + */ + CommandRunAfterTestCaseHook.prototype.hookId = ""; + + /** + * CommandRunAfterTestCaseHook testCaseId. + * @member {string} testCaseId + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @instance + */ + CommandRunAfterTestCaseHook.prototype.testCaseId = ""; + + /** + * Creates a new CommandRunAfterTestCaseHook instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @static + * @param {io.cucumber.messages.ICommandRunAfterTestCaseHook=} [properties] Properties to set + * @returns {io.cucumber.messages.CommandRunAfterTestCaseHook} CommandRunAfterTestCaseHook instance + */ + CommandRunAfterTestCaseHook.create = function create(properties) { + return new CommandRunAfterTestCaseHook(properties); + }; + + /** + * Encodes the specified CommandRunAfterTestCaseHook message. Does not implicitly {@link io.cucumber.messages.CommandRunAfterTestCaseHook.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @static + * @param {io.cucumber.messages.ICommandRunAfterTestCaseHook} message CommandRunAfterTestCaseHook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandRunAfterTestCaseHook.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actionId != null && message.hasOwnProperty("actionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.actionId); + if (message.hookId != null && message.hasOwnProperty("hookId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.hookId); + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.testCaseId); + return writer; + }; + + /** + * Encodes the specified CommandRunAfterTestCaseHook message, length delimited. Does not implicitly {@link io.cucumber.messages.CommandRunAfterTestCaseHook.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @static + * @param {io.cucumber.messages.ICommandRunAfterTestCaseHook} message CommandRunAfterTestCaseHook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandRunAfterTestCaseHook.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommandRunAfterTestCaseHook message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.CommandRunAfterTestCaseHook} CommandRunAfterTestCaseHook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandRunAfterTestCaseHook.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.CommandRunAfterTestCaseHook(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.actionId = reader.string(); + break; + case 2: + message.hookId = reader.string(); + break; + case 3: + message.testCaseId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommandRunAfterTestCaseHook message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.CommandRunAfterTestCaseHook} CommandRunAfterTestCaseHook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandRunAfterTestCaseHook.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommandRunAfterTestCaseHook message. + * @function verify + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommandRunAfterTestCaseHook.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actionId != null && message.hasOwnProperty("actionId")) + if (!$util.isString(message.actionId)) + return "actionId: string expected"; + if (message.hookId != null && message.hasOwnProperty("hookId")) + if (!$util.isString(message.hookId)) + return "hookId: string expected"; + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + if (!$util.isString(message.testCaseId)) + return "testCaseId: string expected"; + return null; + }; + + /** + * Creates a CommandRunAfterTestCaseHook message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.CommandRunAfterTestCaseHook} CommandRunAfterTestCaseHook + */ + CommandRunAfterTestCaseHook.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.CommandRunAfterTestCaseHook) + return object; + var message = new $root.io.cucumber.messages.CommandRunAfterTestCaseHook(); + if (object.actionId != null) + message.actionId = String(object.actionId); + if (object.hookId != null) + message.hookId = String(object.hookId); + if (object.testCaseId != null) + message.testCaseId = String(object.testCaseId); + return message; + }; + + /** + * Creates a plain object from a CommandRunAfterTestCaseHook message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @static + * @param {io.cucumber.messages.CommandRunAfterTestCaseHook} message CommandRunAfterTestCaseHook + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommandRunAfterTestCaseHook.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.actionId = ""; + object.hookId = ""; + object.testCaseId = ""; + } + if (message.actionId != null && message.hasOwnProperty("actionId")) + object.actionId = message.actionId; + if (message.hookId != null && message.hasOwnProperty("hookId")) + object.hookId = message.hookId; + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + object.testCaseId = message.testCaseId; + return object; + }; + + /** + * Converts this CommandRunAfterTestCaseHook to JSON. + * @function toJSON + * @memberof io.cucumber.messages.CommandRunAfterTestCaseHook + * @instance + * @returns {Object.} JSON object + */ + CommandRunAfterTestCaseHook.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommandRunAfterTestCaseHook; + })(); + + messages.CommandRunTestStep = (function() { + + /** + * Properties of a CommandRunTestStep. + * @memberof io.cucumber.messages + * @interface ICommandRunTestStep + * @property {string|null} [actionId] CommandRunTestStep actionId + * @property {string|null} [stepDefinitionId] CommandRunTestStep stepDefinitionId + * @property {Array.|null} [stepMatchArguments] CommandRunTestStep stepMatchArguments + * @property {io.cucumber.messages.IPickleStepArgument|null} [pickleStepArgument] CommandRunTestStep pickleStepArgument + * @property {string|null} [testCaseId] CommandRunTestStep testCaseId + */ + + /** + * Constructs a new CommandRunTestStep. + * @memberof io.cucumber.messages + * @classdesc Represents a CommandRunTestStep. + * @implements ICommandRunTestStep + * @constructor + * @param {io.cucumber.messages.ICommandRunTestStep=} [properties] Properties to set + */ + function CommandRunTestStep(properties) { + this.stepMatchArguments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommandRunTestStep actionId. + * @member {string} actionId + * @memberof io.cucumber.messages.CommandRunTestStep + * @instance + */ + CommandRunTestStep.prototype.actionId = ""; + + /** + * CommandRunTestStep stepDefinitionId. + * @member {string} stepDefinitionId + * @memberof io.cucumber.messages.CommandRunTestStep + * @instance + */ + CommandRunTestStep.prototype.stepDefinitionId = ""; + + /** + * CommandRunTestStep stepMatchArguments. + * @member {Array.} stepMatchArguments + * @memberof io.cucumber.messages.CommandRunTestStep + * @instance + */ + CommandRunTestStep.prototype.stepMatchArguments = $util.emptyArray; + + /** + * CommandRunTestStep pickleStepArgument. + * @member {io.cucumber.messages.IPickleStepArgument|null|undefined} pickleStepArgument + * @memberof io.cucumber.messages.CommandRunTestStep + * @instance + */ + CommandRunTestStep.prototype.pickleStepArgument = null; + + /** + * CommandRunTestStep testCaseId. + * @member {string} testCaseId + * @memberof io.cucumber.messages.CommandRunTestStep + * @instance + */ + CommandRunTestStep.prototype.testCaseId = ""; + + /** + * Creates a new CommandRunTestStep instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.CommandRunTestStep + * @static + * @param {io.cucumber.messages.ICommandRunTestStep=} [properties] Properties to set + * @returns {io.cucumber.messages.CommandRunTestStep} CommandRunTestStep instance + */ + CommandRunTestStep.create = function create(properties) { + return new CommandRunTestStep(properties); + }; + + /** + * Encodes the specified CommandRunTestStep message. Does not implicitly {@link io.cucumber.messages.CommandRunTestStep.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.CommandRunTestStep + * @static + * @param {io.cucumber.messages.ICommandRunTestStep} message CommandRunTestStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandRunTestStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actionId != null && message.hasOwnProperty("actionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.actionId); + if (message.stepDefinitionId != null && message.hasOwnProperty("stepDefinitionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stepDefinitionId); + if (message.stepMatchArguments != null && message.stepMatchArguments.length) + for (var i = 0; i < message.stepMatchArguments.length; ++i) + $root.io.cucumber.messages.StepMatchArgument.encode(message.stepMatchArguments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pickleStepArgument != null && message.hasOwnProperty("pickleStepArgument")) + $root.io.cucumber.messages.PickleStepArgument.encode(message.pickleStepArgument, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.testCaseId); + return writer; + }; + + /** + * Encodes the specified CommandRunTestStep message, length delimited. Does not implicitly {@link io.cucumber.messages.CommandRunTestStep.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.CommandRunTestStep + * @static + * @param {io.cucumber.messages.ICommandRunTestStep} message CommandRunTestStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandRunTestStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommandRunTestStep message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.CommandRunTestStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.CommandRunTestStep} CommandRunTestStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandRunTestStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.CommandRunTestStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.actionId = reader.string(); + break; + case 2: + message.stepDefinitionId = reader.string(); + break; + case 3: + if (!(message.stepMatchArguments && message.stepMatchArguments.length)) + message.stepMatchArguments = []; + message.stepMatchArguments.push($root.io.cucumber.messages.StepMatchArgument.decode(reader, reader.uint32())); + break; + case 4: + message.pickleStepArgument = $root.io.cucumber.messages.PickleStepArgument.decode(reader, reader.uint32()); + break; + case 5: + message.testCaseId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommandRunTestStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.CommandRunTestStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.CommandRunTestStep} CommandRunTestStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandRunTestStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommandRunTestStep message. + * @function verify + * @memberof io.cucumber.messages.CommandRunTestStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommandRunTestStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actionId != null && message.hasOwnProperty("actionId")) + if (!$util.isString(message.actionId)) + return "actionId: string expected"; + if (message.stepDefinitionId != null && message.hasOwnProperty("stepDefinitionId")) + if (!$util.isString(message.stepDefinitionId)) + return "stepDefinitionId: string expected"; + if (message.stepMatchArguments != null && message.hasOwnProperty("stepMatchArguments")) { + if (!Array.isArray(message.stepMatchArguments)) + return "stepMatchArguments: array expected"; + for (var i = 0; i < message.stepMatchArguments.length; ++i) { + var error = $root.io.cucumber.messages.StepMatchArgument.verify(message.stepMatchArguments[i]); + if (error) + return "stepMatchArguments." + error; + } + } + if (message.pickleStepArgument != null && message.hasOwnProperty("pickleStepArgument")) { + var error = $root.io.cucumber.messages.PickleStepArgument.verify(message.pickleStepArgument); + if (error) + return "pickleStepArgument." + error; + } + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + if (!$util.isString(message.testCaseId)) + return "testCaseId: string expected"; + return null; + }; + + /** + * Creates a CommandRunTestStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.CommandRunTestStep + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.CommandRunTestStep} CommandRunTestStep + */ + CommandRunTestStep.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.CommandRunTestStep) + return object; + var message = new $root.io.cucumber.messages.CommandRunTestStep(); + if (object.actionId != null) + message.actionId = String(object.actionId); + if (object.stepDefinitionId != null) + message.stepDefinitionId = String(object.stepDefinitionId); + if (object.stepMatchArguments) { + if (!Array.isArray(object.stepMatchArguments)) + throw TypeError(".io.cucumber.messages.CommandRunTestStep.stepMatchArguments: array expected"); + message.stepMatchArguments = []; + for (var i = 0; i < object.stepMatchArguments.length; ++i) { + if (typeof object.stepMatchArguments[i] !== "object") + throw TypeError(".io.cucumber.messages.CommandRunTestStep.stepMatchArguments: object expected"); + message.stepMatchArguments[i] = $root.io.cucumber.messages.StepMatchArgument.fromObject(object.stepMatchArguments[i]); + } + } + if (object.pickleStepArgument != null) { + if (typeof object.pickleStepArgument !== "object") + throw TypeError(".io.cucumber.messages.CommandRunTestStep.pickleStepArgument: object expected"); + message.pickleStepArgument = $root.io.cucumber.messages.PickleStepArgument.fromObject(object.pickleStepArgument); + } + if (object.testCaseId != null) + message.testCaseId = String(object.testCaseId); + return message; + }; + + /** + * Creates a plain object from a CommandRunTestStep message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.CommandRunTestStep + * @static + * @param {io.cucumber.messages.CommandRunTestStep} message CommandRunTestStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommandRunTestStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.stepMatchArguments = []; + if (options.defaults) { + object.actionId = ""; + object.stepDefinitionId = ""; + object.pickleStepArgument = null; + object.testCaseId = ""; + } + if (message.actionId != null && message.hasOwnProperty("actionId")) + object.actionId = message.actionId; + if (message.stepDefinitionId != null && message.hasOwnProperty("stepDefinitionId")) + object.stepDefinitionId = message.stepDefinitionId; + if (message.stepMatchArguments && message.stepMatchArguments.length) { + object.stepMatchArguments = []; + for (var j = 0; j < message.stepMatchArguments.length; ++j) + object.stepMatchArguments[j] = $root.io.cucumber.messages.StepMatchArgument.toObject(message.stepMatchArguments[j], options); + } + if (message.pickleStepArgument != null && message.hasOwnProperty("pickleStepArgument")) + object.pickleStepArgument = $root.io.cucumber.messages.PickleStepArgument.toObject(message.pickleStepArgument, options); + if (message.testCaseId != null && message.hasOwnProperty("testCaseId")) + object.testCaseId = message.testCaseId; + return object; + }; + + /** + * Converts this CommandRunTestStep to JSON. + * @function toJSON + * @memberof io.cucumber.messages.CommandRunTestStep + * @instance + * @returns {Object.} JSON object + */ + CommandRunTestStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommandRunTestStep; + })(); + + messages.StepMatchArgument = (function() { + + /** + * Properties of a StepMatchArgument. + * @memberof io.cucumber.messages + * @interface IStepMatchArgument + * @property {string|null} [parameterTypeName] StepMatchArgument parameterTypeName + * @property {io.cucumber.messages.StepMatchArgument.IGroup|null} [group] Represents the outermost capture group of an argument. This message closely matches the + * `Group` class in the `cucumber-expressions` library. + */ + + /** + * Constructs a new StepMatchArgument. + * @memberof io.cucumber.messages + * @classdesc Represents a single argument extracted from a step match and passed to a step definition. + * This is used for the following purposes: + * - Construct an argument to pass to a step definition (possibly through a parameter type transform) + * - Highlight the matched parameter in rich formatters such as the HTML formatter + * + * This message closely matches the `Argument` class in the `cucumber-expressions` library. + * @implements IStepMatchArgument + * @constructor + * @param {io.cucumber.messages.IStepMatchArgument=} [properties] Properties to set + */ + function StepMatchArgument(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StepMatchArgument parameterTypeName. + * @member {string} parameterTypeName + * @memberof io.cucumber.messages.StepMatchArgument + * @instance + */ + StepMatchArgument.prototype.parameterTypeName = ""; + + /** + * Represents the outermost capture group of an argument. This message closely matches the + * `Group` class in the `cucumber-expressions` library. + * @member {io.cucumber.messages.StepMatchArgument.IGroup|null|undefined} group + * @memberof io.cucumber.messages.StepMatchArgument + * @instance + */ + StepMatchArgument.prototype.group = null; + + /** + * Creates a new StepMatchArgument instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.StepMatchArgument + * @static + * @param {io.cucumber.messages.IStepMatchArgument=} [properties] Properties to set + * @returns {io.cucumber.messages.StepMatchArgument} StepMatchArgument instance + */ + StepMatchArgument.create = function create(properties) { + return new StepMatchArgument(properties); + }; + + /** + * Encodes the specified StepMatchArgument message. Does not implicitly {@link io.cucumber.messages.StepMatchArgument.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.StepMatchArgument + * @static + * @param {io.cucumber.messages.IStepMatchArgument} message StepMatchArgument message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StepMatchArgument.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameterTypeName != null && message.hasOwnProperty("parameterTypeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameterTypeName); + if (message.group != null && message.hasOwnProperty("group")) + $root.io.cucumber.messages.StepMatchArgument.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StepMatchArgument message, length delimited. Does not implicitly {@link io.cucumber.messages.StepMatchArgument.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.StepMatchArgument + * @static + * @param {io.cucumber.messages.IStepMatchArgument} message StepMatchArgument message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StepMatchArgument.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StepMatchArgument message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.StepMatchArgument + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.StepMatchArgument} StepMatchArgument + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StepMatchArgument.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.StepMatchArgument(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parameterTypeName = reader.string(); + break; + case 2: + message.group = $root.io.cucumber.messages.StepMatchArgument.Group.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StepMatchArgument message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.StepMatchArgument + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.StepMatchArgument} StepMatchArgument + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StepMatchArgument.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StepMatchArgument message. + * @function verify + * @memberof io.cucumber.messages.StepMatchArgument + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StepMatchArgument.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameterTypeName != null && message.hasOwnProperty("parameterTypeName")) + if (!$util.isString(message.parameterTypeName)) + return "parameterTypeName: string expected"; + if (message.group != null && message.hasOwnProperty("group")) { + var error = $root.io.cucumber.messages.StepMatchArgument.Group.verify(message.group); + if (error) + return "group." + error; + } + return null; + }; + + /** + * Creates a StepMatchArgument message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.StepMatchArgument + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.StepMatchArgument} StepMatchArgument + */ + StepMatchArgument.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.StepMatchArgument) + return object; + var message = new $root.io.cucumber.messages.StepMatchArgument(); + if (object.parameterTypeName != null) + message.parameterTypeName = String(object.parameterTypeName); + if (object.group != null) { + if (typeof object.group !== "object") + throw TypeError(".io.cucumber.messages.StepMatchArgument.group: object expected"); + message.group = $root.io.cucumber.messages.StepMatchArgument.Group.fromObject(object.group); + } + return message; + }; + + /** + * Creates a plain object from a StepMatchArgument message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.StepMatchArgument + * @static + * @param {io.cucumber.messages.StepMatchArgument} message StepMatchArgument + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StepMatchArgument.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parameterTypeName = ""; + object.group = null; + } + if (message.parameterTypeName != null && message.hasOwnProperty("parameterTypeName")) + object.parameterTypeName = message.parameterTypeName; + if (message.group != null && message.hasOwnProperty("group")) + object.group = $root.io.cucumber.messages.StepMatchArgument.Group.toObject(message.group, options); + return object; + }; + + /** + * Converts this StepMatchArgument to JSON. + * @function toJSON + * @memberof io.cucumber.messages.StepMatchArgument + * @instance + * @returns {Object.} JSON object + */ + StepMatchArgument.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + StepMatchArgument.Group = (function() { + + /** + * Properties of a Group. + * @memberof io.cucumber.messages.StepMatchArgument + * @interface IGroup + * @property {number|null} [start] Group start + * @property {string|null} [value] Group value + * @property {Array.|null} [children] Group children + */ + + /** + * Constructs a new Group. + * @memberof io.cucumber.messages.StepMatchArgument + * @classdesc Represents a Group. + * @implements IGroup + * @constructor + * @param {io.cucumber.messages.StepMatchArgument.IGroup=} [properties] Properties to set + */ + function Group(properties) { + this.children = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Group start. + * @member {number} start + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @instance + */ + Group.prototype.start = 0; + + /** + * Group value. + * @member {string} value + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @instance + */ + Group.prototype.value = ""; + + /** + * Group children. + * @member {Array.} children + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @instance + */ + Group.prototype.children = $util.emptyArray; + + /** + * Creates a new Group instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @static + * @param {io.cucumber.messages.StepMatchArgument.IGroup=} [properties] Properties to set + * @returns {io.cucumber.messages.StepMatchArgument.Group} Group instance + */ + Group.create = function create(properties) { + return new Group(properties); + }; + + /** + * Encodes the specified Group message. Does not implicitly {@link io.cucumber.messages.StepMatchArgument.Group.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @static + * @param {io.cucumber.messages.StepMatchArgument.IGroup} message Group message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Group.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.start); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.children != null && message.children.length) + for (var i = 0; i < message.children.length; ++i) + $root.io.cucumber.messages.StepMatchArgument.Group.encode(message.children[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Group message, length delimited. Does not implicitly {@link io.cucumber.messages.StepMatchArgument.Group.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @static + * @param {io.cucumber.messages.StepMatchArgument.IGroup} message Group message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Group.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Group message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.StepMatchArgument.Group} Group + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Group.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.StepMatchArgument.Group(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.uint32(); + break; + case 2: + message.value = reader.string(); + break; + case 3: + if (!(message.children && message.children.length)) + message.children = []; + message.children.push($root.io.cucumber.messages.StepMatchArgument.Group.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Group message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.StepMatchArgument.Group} Group + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Group.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Group message. + * @function verify + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Group.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.children != null && message.hasOwnProperty("children")) { + if (!Array.isArray(message.children)) + return "children: array expected"; + for (var i = 0; i < message.children.length; ++i) { + var error = $root.io.cucumber.messages.StepMatchArgument.Group.verify(message.children[i]); + if (error) + return "children." + error; + } + } + return null; + }; + + /** + * Creates a Group message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.StepMatchArgument.Group} Group + */ + Group.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.StepMatchArgument.Group) + return object; + var message = new $root.io.cucumber.messages.StepMatchArgument.Group(); + if (object.start != null) + message.start = object.start >>> 0; + if (object.value != null) + message.value = String(object.value); + if (object.children) { + if (!Array.isArray(object.children)) + throw TypeError(".io.cucumber.messages.StepMatchArgument.Group.children: array expected"); + message.children = []; + for (var i = 0; i < object.children.length; ++i) { + if (typeof object.children[i] !== "object") + throw TypeError(".io.cucumber.messages.StepMatchArgument.Group.children: object expected"); + message.children[i] = $root.io.cucumber.messages.StepMatchArgument.Group.fromObject(object.children[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Group message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @static + * @param {io.cucumber.messages.StepMatchArgument.Group} message Group + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Group.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.children = []; + if (options.defaults) { + object.start = 0; + object.value = ""; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.children && message.children.length) { + object.children = []; + for (var j = 0; j < message.children.length; ++j) + object.children[j] = $root.io.cucumber.messages.StepMatchArgument.Group.toObject(message.children[j], options); + } + return object; + }; + + /** + * Converts this Group to JSON. + * @function toJSON + * @memberof io.cucumber.messages.StepMatchArgument.Group + * @instance + * @returns {Object.} JSON object + */ + Group.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Group; + })(); + + return StepMatchArgument; + })(); + + messages.CommandGenerateSnippet = (function() { + + /** + * Properties of a CommandGenerateSnippet. + * @memberof io.cucumber.messages + * @interface ICommandGenerateSnippet + * @property {string|null} [actionId] CommandGenerateSnippet actionId + * @property {Array.|null} [generatedExpressions] CommandGenerateSnippet generatedExpressions + * @property {io.cucumber.messages.IPickleStepArgument|null} [pickleStepArgument] CommandGenerateSnippet pickleStepArgument + */ + + /** + * Constructs a new CommandGenerateSnippet. + * @memberof io.cucumber.messages + * @classdesc Represents a CommandGenerateSnippet. + * @implements ICommandGenerateSnippet + * @constructor + * @param {io.cucumber.messages.ICommandGenerateSnippet=} [properties] Properties to set + */ + function CommandGenerateSnippet(properties) { + this.generatedExpressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommandGenerateSnippet actionId. + * @member {string} actionId + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @instance + */ + CommandGenerateSnippet.prototype.actionId = ""; + + /** + * CommandGenerateSnippet generatedExpressions. + * @member {Array.} generatedExpressions + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @instance + */ + CommandGenerateSnippet.prototype.generatedExpressions = $util.emptyArray; + + /** + * CommandGenerateSnippet pickleStepArgument. + * @member {io.cucumber.messages.IPickleStepArgument|null|undefined} pickleStepArgument + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @instance + */ + CommandGenerateSnippet.prototype.pickleStepArgument = null; + + /** + * Creates a new CommandGenerateSnippet instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @static + * @param {io.cucumber.messages.ICommandGenerateSnippet=} [properties] Properties to set + * @returns {io.cucumber.messages.CommandGenerateSnippet} CommandGenerateSnippet instance + */ + CommandGenerateSnippet.create = function create(properties) { + return new CommandGenerateSnippet(properties); + }; + + /** + * Encodes the specified CommandGenerateSnippet message. Does not implicitly {@link io.cucumber.messages.CommandGenerateSnippet.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @static + * @param {io.cucumber.messages.ICommandGenerateSnippet} message CommandGenerateSnippet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandGenerateSnippet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actionId != null && message.hasOwnProperty("actionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.actionId); + if (message.generatedExpressions != null && message.generatedExpressions.length) + for (var i = 0; i < message.generatedExpressions.length; ++i) + $root.io.cucumber.messages.GeneratedExpression.encode(message.generatedExpressions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pickleStepArgument != null && message.hasOwnProperty("pickleStepArgument")) + $root.io.cucumber.messages.PickleStepArgument.encode(message.pickleStepArgument, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommandGenerateSnippet message, length delimited. Does not implicitly {@link io.cucumber.messages.CommandGenerateSnippet.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @static + * @param {io.cucumber.messages.ICommandGenerateSnippet} message CommandGenerateSnippet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommandGenerateSnippet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommandGenerateSnippet message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.CommandGenerateSnippet} CommandGenerateSnippet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandGenerateSnippet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.CommandGenerateSnippet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.actionId = reader.string(); + break; + case 2: + if (!(message.generatedExpressions && message.generatedExpressions.length)) + message.generatedExpressions = []; + message.generatedExpressions.push($root.io.cucumber.messages.GeneratedExpression.decode(reader, reader.uint32())); + break; + case 3: + message.pickleStepArgument = $root.io.cucumber.messages.PickleStepArgument.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommandGenerateSnippet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.CommandGenerateSnippet} CommandGenerateSnippet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommandGenerateSnippet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommandGenerateSnippet message. + * @function verify + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommandGenerateSnippet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actionId != null && message.hasOwnProperty("actionId")) + if (!$util.isString(message.actionId)) + return "actionId: string expected"; + if (message.generatedExpressions != null && message.hasOwnProperty("generatedExpressions")) { + if (!Array.isArray(message.generatedExpressions)) + return "generatedExpressions: array expected"; + for (var i = 0; i < message.generatedExpressions.length; ++i) { + var error = $root.io.cucumber.messages.GeneratedExpression.verify(message.generatedExpressions[i]); + if (error) + return "generatedExpressions." + error; + } + } + if (message.pickleStepArgument != null && message.hasOwnProperty("pickleStepArgument")) { + var error = $root.io.cucumber.messages.PickleStepArgument.verify(message.pickleStepArgument); + if (error) + return "pickleStepArgument." + error; + } + return null; + }; + + /** + * Creates a CommandGenerateSnippet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.CommandGenerateSnippet} CommandGenerateSnippet + */ + CommandGenerateSnippet.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.CommandGenerateSnippet) + return object; + var message = new $root.io.cucumber.messages.CommandGenerateSnippet(); + if (object.actionId != null) + message.actionId = String(object.actionId); + if (object.generatedExpressions) { + if (!Array.isArray(object.generatedExpressions)) + throw TypeError(".io.cucumber.messages.CommandGenerateSnippet.generatedExpressions: array expected"); + message.generatedExpressions = []; + for (var i = 0; i < object.generatedExpressions.length; ++i) { + if (typeof object.generatedExpressions[i] !== "object") + throw TypeError(".io.cucumber.messages.CommandGenerateSnippet.generatedExpressions: object expected"); + message.generatedExpressions[i] = $root.io.cucumber.messages.GeneratedExpression.fromObject(object.generatedExpressions[i]); + } + } + if (object.pickleStepArgument != null) { + if (typeof object.pickleStepArgument !== "object") + throw TypeError(".io.cucumber.messages.CommandGenerateSnippet.pickleStepArgument: object expected"); + message.pickleStepArgument = $root.io.cucumber.messages.PickleStepArgument.fromObject(object.pickleStepArgument); + } + return message; + }; + + /** + * Creates a plain object from a CommandGenerateSnippet message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @static + * @param {io.cucumber.messages.CommandGenerateSnippet} message CommandGenerateSnippet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommandGenerateSnippet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.generatedExpressions = []; + if (options.defaults) { + object.actionId = ""; + object.pickleStepArgument = null; + } + if (message.actionId != null && message.hasOwnProperty("actionId")) + object.actionId = message.actionId; + if (message.generatedExpressions && message.generatedExpressions.length) { + object.generatedExpressions = []; + for (var j = 0; j < message.generatedExpressions.length; ++j) + object.generatedExpressions[j] = $root.io.cucumber.messages.GeneratedExpression.toObject(message.generatedExpressions[j], options); + } + if (message.pickleStepArgument != null && message.hasOwnProperty("pickleStepArgument")) + object.pickleStepArgument = $root.io.cucumber.messages.PickleStepArgument.toObject(message.pickleStepArgument, options); + return object; + }; + + /** + * Converts this CommandGenerateSnippet to JSON. + * @function toJSON + * @memberof io.cucumber.messages.CommandGenerateSnippet + * @instance + * @returns {Object.} JSON object + */ + CommandGenerateSnippet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommandGenerateSnippet; + })(); + + messages.GeneratedExpression = (function() { + + /** + * Properties of a GeneratedExpression. + * @memberof io.cucumber.messages + * @interface IGeneratedExpression + * @property {string|null} [text] GeneratedExpression text + * @property {Array.|null} [parameterTypeNames] GeneratedExpression parameterTypeNames + */ + + /** + * Constructs a new GeneratedExpression. + * @memberof io.cucumber.messages + * @classdesc Represents a GeneratedExpression. + * @implements IGeneratedExpression + * @constructor + * @param {io.cucumber.messages.IGeneratedExpression=} [properties] Properties to set + */ + function GeneratedExpression(properties) { + this.parameterTypeNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedExpression text. + * @member {string} text + * @memberof io.cucumber.messages.GeneratedExpression + * @instance + */ + GeneratedExpression.prototype.text = ""; + + /** + * GeneratedExpression parameterTypeNames. + * @member {Array.} parameterTypeNames + * @memberof io.cucumber.messages.GeneratedExpression + * @instance + */ + GeneratedExpression.prototype.parameterTypeNames = $util.emptyArray; + + /** + * Creates a new GeneratedExpression instance using the specified properties. + * @function create + * @memberof io.cucumber.messages.GeneratedExpression + * @static + * @param {io.cucumber.messages.IGeneratedExpression=} [properties] Properties to set + * @returns {io.cucumber.messages.GeneratedExpression} GeneratedExpression instance + */ + GeneratedExpression.create = function create(properties) { + return new GeneratedExpression(properties); + }; + + /** + * Encodes the specified GeneratedExpression message. Does not implicitly {@link io.cucumber.messages.GeneratedExpression.verify|verify} messages. + * @function encode + * @memberof io.cucumber.messages.GeneratedExpression + * @static + * @param {io.cucumber.messages.IGeneratedExpression} message GeneratedExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.hasOwnProperty("text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.parameterTypeNames != null && message.parameterTypeNames.length) + for (var i = 0; i < message.parameterTypeNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterTypeNames[i]); + return writer; + }; + + /** + * Encodes the specified GeneratedExpression message, length delimited. Does not implicitly {@link io.cucumber.messages.GeneratedExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof io.cucumber.messages.GeneratedExpression + * @static + * @param {io.cucumber.messages.IGeneratedExpression} message GeneratedExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedExpression message from the specified reader or buffer. + * @function decode + * @memberof io.cucumber.messages.GeneratedExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {io.cucumber.messages.GeneratedExpression} GeneratedExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedExpression.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.io.cucumber.messages.GeneratedExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + if (!(message.parameterTypeNames && message.parameterTypeNames.length)) + message.parameterTypeNames = []; + message.parameterTypeNames.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof io.cucumber.messages.GeneratedExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {io.cucumber.messages.GeneratedExpression} GeneratedExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedExpression message. + * @function verify + * @memberof io.cucumber.messages.GeneratedExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.parameterTypeNames != null && message.hasOwnProperty("parameterTypeNames")) { + if (!Array.isArray(message.parameterTypeNames)) + return "parameterTypeNames: array expected"; + for (var i = 0; i < message.parameterTypeNames.length; ++i) + if (!$util.isString(message.parameterTypeNames[i])) + return "parameterTypeNames: string[] expected"; + } + return null; + }; + + /** + * Creates a GeneratedExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof io.cucumber.messages.GeneratedExpression + * @static + * @param {Object.} object Plain object + * @returns {io.cucumber.messages.GeneratedExpression} GeneratedExpression + */ + GeneratedExpression.fromObject = function fromObject(object) { + if (object instanceof $root.io.cucumber.messages.GeneratedExpression) + return object; + var message = new $root.io.cucumber.messages.GeneratedExpression(); + if (object.text != null) + message.text = String(object.text); + if (object.parameterTypeNames) { + if (!Array.isArray(object.parameterTypeNames)) + throw TypeError(".io.cucumber.messages.GeneratedExpression.parameterTypeNames: array expected"); + message.parameterTypeNames = []; + for (var i = 0; i < object.parameterTypeNames.length; ++i) + message.parameterTypeNames[i] = String(object.parameterTypeNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a GeneratedExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof io.cucumber.messages.GeneratedExpression + * @static + * @param {io.cucumber.messages.GeneratedExpression} message GeneratedExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parameterTypeNames = []; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.parameterTypeNames && message.parameterTypeNames.length) { + object.parameterTypeNames = []; + for (var j = 0; j < message.parameterTypeNames.length; ++j) + object.parameterTypeNames[j] = message.parameterTypeNames[j]; + } + return object; + }; + + /** + * Converts this GeneratedExpression to JSON. + * @function toJSON + * @memberof io.cucumber.messages.GeneratedExpression + * @instance + * @returns {Object.} JSON object + */ + GeneratedExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GeneratedExpression; + })(); + + return messages; + })(); + + return cucumber; + })(); + + return io; +})(); + +module.exports = $root; + + +/***/ }), + +/***/ 56106: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var MessageToBinaryStream_1 = __importDefault(__nccwpck_require__(61592)); +exports.MessageToBinaryStream = MessageToBinaryStream_1.default; +var MessageToNdjsonStream_1 = __importDefault(__nccwpck_require__(54620)); +exports.MessageToNdjsonStream = MessageToNdjsonStream_1.default; +var BinaryToMessageStream_1 = __importDefault(__nccwpck_require__(24615)); +exports.BinaryToMessageStream = BinaryToMessageStream_1.default; +var NdjsonToMessageStream_1 = __importDefault(__nccwpck_require__(55734)); +exports.NdjsonToMessageStream = NdjsonToMessageStream_1.default; +var TimeConversion = __importStar(__nccwpck_require__(34321)); +exports.TimeConversion = TimeConversion; +var IdGenerator = __importStar(__nccwpck_require__(39145)); +exports.IdGenerator = IdGenerator; +var cucumber_messages_1 = __nccwpck_require__(32364); +var messages = cucumber_messages_1.io.cucumber.messages; +exports.messages = messages; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 56362: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isValue = __nccwpck_require__(73134) + , ensureValue = __nccwpck_require__(90942) + , ensurePlainFunction = __nccwpck_require__(33681) + , copy = __nccwpck_require__(27175) + , normalizeOptions = __nccwpck_require__(64488) + , map = __nccwpck_require__(47289); + +var bind = Function.prototype.bind + , defineProperty = Object.defineProperty + , hasOwnProperty = Object.prototype.hasOwnProperty + , define; + +define = function (name, desc, options) { + var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs; + dgs = copy(desc); + delete dgs.writable; + delete dgs.value; + dgs.get = function () { + if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value; + desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this); + defineProperty(this, name, desc); + return this[name]; + }; + return dgs; +}; + +module.exports = function (props/*, options*/) { + var options = normalizeOptions(arguments[1]); + if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext); + return map(props, function (desc, name) { return define(name, desc, options); }); +}; + + +/***/ }), + +/***/ 14571: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isValue = __nccwpck_require__(73134) + , isPlainFunction = __nccwpck_require__(36796) + , assign = __nccwpck_require__(81377) + , normalizeOpts = __nccwpck_require__(64488) + , contains = __nccwpck_require__(87689); + +var d = (module.exports = function (dscr, value/*, options*/) { + var c, e, w, options, desc; + if (arguments.length < 2 || typeof dscr !== "string") { + options = value; + value = dscr; + dscr = null; + } else { + options = arguments[2]; + } + if (isValue(dscr)) { + c = contains.call(dscr, "c"); + e = contains.call(dscr, "e"); + w = contains.call(dscr, "w"); + } else { + c = w = true; + e = false; + } + + desc = { value: value, configurable: c, enumerable: e, writable: w }; + return !options ? desc : assign(normalizeOpts(options), desc); +}); + +d.gs = function (dscr, get, set/*, options*/) { + var c, e, options, desc; + if (typeof dscr !== "string") { + options = set; + set = get; + get = dscr; + dscr = null; + } else { + options = arguments[3]; + } + if (!isValue(get)) { + get = undefined; + } else if (!isPlainFunction(get)) { + options = get; + get = set = undefined; + } else if (!isValue(set)) { + set = undefined; + } else if (!isPlainFunction(set)) { + options = set; + set = undefined; + } + if (isValue(dscr)) { + c = contains.call(dscr, "c"); + e = contains.call(dscr, "e"); + } else { + c = true; + e = false; + } + + desc = { get: get, set: set, configurable: c, enumerable: e }; + return !options ? desc : assign(normalizeOpts(options), desc); +}; + + +/***/ }), + +/***/ 3588: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +/* globals Symbol: false, Uint8Array: false, WeakMap: false */ +/*! + * deep-eql + * Copyright(c) 2013 Jake Luer + * MIT Licensed + */ + +var type = __nccwpck_require__(4919); +function FakeMap() { + this._key = 'chai/deep-eql__' + Math.random() + Date.now(); +} + +FakeMap.prototype = { + get: function getMap(key) { + return key[this._key]; + }, + set: function setMap(key, value) { + if (Object.isExtensible(key)) { + Object.defineProperty(key, this._key, { + value: value, + configurable: true, + }); + } + }, +}; + +var MemoizeMap = typeof WeakMap === 'function' ? WeakMap : FakeMap; +/*! + * Check to see if the MemoizeMap has recorded a result of the two operands + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {MemoizeMap} memoizeMap + * @returns {Boolean|null} result +*/ +function memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) { + // Technically, WeakMap keys can *only* be objects, not primitives. + if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + return null; + } + var leftHandMap = memoizeMap.get(leftHandOperand); + if (leftHandMap) { + var result = leftHandMap.get(rightHandOperand); + if (typeof result === 'boolean') { + return result; + } + } + return null; +} + +/*! + * Set the result of the equality into the MemoizeMap + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {MemoizeMap} memoizeMap + * @param {Boolean} result +*/ +function memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) { + // Technically, WeakMap keys can *only* be objects, not primitives. + if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + return; + } + var leftHandMap = memoizeMap.get(leftHandOperand); + if (leftHandMap) { + leftHandMap.set(rightHandOperand, result); + } else { + leftHandMap = new MemoizeMap(); + leftHandMap.set(rightHandOperand, result); + memoizeMap.set(leftHandOperand, leftHandMap); + } +} + +/*! + * Primary Export + */ + +module.exports = deepEqual; +module.exports.MemoizeMap = MemoizeMap; + +/** + * Assert deeply nested sameValue equality between two objects of any type. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (optional) Additional options + * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality. + * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of + complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular + references to blow the stack. + * @return {Boolean} equal match + */ +function deepEqual(leftHandOperand, rightHandOperand, options) { + // If we have a comparator, we can't assume anything; so bail to its check first. + if (options && options.comparator) { + return extensiveDeepEqual(leftHandOperand, rightHandOperand, options); + } + + var simpleResult = simpleEqual(leftHandOperand, rightHandOperand); + if (simpleResult !== null) { + return simpleResult; + } + + // Deeper comparisons are pushed through to a larger function + return extensiveDeepEqual(leftHandOperand, rightHandOperand, options); +} + +/** + * Many comparisons can be canceled out early via simple equality or primitive checks. + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @return {Boolean|null} equal match + */ +function simpleEqual(leftHandOperand, rightHandOperand) { + // Equal references (except for Numbers) can be returned early + if (leftHandOperand === rightHandOperand) { + // Handle +-0 cases + return leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand; + } + + // handle NaN cases + if ( + leftHandOperand !== leftHandOperand && // eslint-disable-line no-self-compare + rightHandOperand !== rightHandOperand // eslint-disable-line no-self-compare + ) { + return true; + } + + // Anything that is not an 'object', i.e. symbols, functions, booleans, numbers, + // strings, and undefined, can be compared by reference. + if (isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + // Easy out b/c it would have passed the first equality check + return false; + } + return null; +} + +/*! + * The main logic of the `deepEqual` function. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (optional) Additional options + * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality. + * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of + complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular + references to blow the stack. + * @return {Boolean} equal match +*/ +function extensiveDeepEqual(leftHandOperand, rightHandOperand, options) { + options = options || {}; + options.memoize = options.memoize === false ? false : options.memoize || new MemoizeMap(); + var comparator = options && options.comparator; + + // Check if a memoized result exists. + var memoizeResultLeft = memoizeCompare(leftHandOperand, rightHandOperand, options.memoize); + if (memoizeResultLeft !== null) { + return memoizeResultLeft; + } + var memoizeResultRight = memoizeCompare(rightHandOperand, leftHandOperand, options.memoize); + if (memoizeResultRight !== null) { + return memoizeResultRight; + } + + // If a comparator is present, use it. + if (comparator) { + var comparatorResult = comparator(leftHandOperand, rightHandOperand); + // Comparators may return null, in which case we want to go back to default behavior. + if (comparatorResult === false || comparatorResult === true) { + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, comparatorResult); + return comparatorResult; + } + // To allow comparators to override *any* behavior, we ran them first. Since it didn't decide + // what to do, we need to make sure to return the basic tests first before we move on. + var simpleResult = simpleEqual(leftHandOperand, rightHandOperand); + if (simpleResult !== null) { + // Don't memoize this, it takes longer to set/retrieve than to just compare. + return simpleResult; + } + } + + var leftHandType = type(leftHandOperand); + if (leftHandType !== type(rightHandOperand)) { + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, false); + return false; + } + + // Temporarily set the operands in the memoize object to prevent blowing the stack + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, true); + + var result = extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options); + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result); + return result; +} + +function extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) { + switch (leftHandType) { + case 'String': + case 'Number': + case 'Boolean': + case 'Date': + // If these types are their instance types (e.g. `new Number`) then re-deepEqual against their values + return deepEqual(leftHandOperand.valueOf(), rightHandOperand.valueOf()); + case 'Promise': + case 'Symbol': + case 'function': + case 'WeakMap': + case 'WeakSet': + case 'Error': + return leftHandOperand === rightHandOperand; + case 'Arguments': + case 'Int8Array': + case 'Uint8Array': + case 'Uint8ClampedArray': + case 'Int16Array': + case 'Uint16Array': + case 'Int32Array': + case 'Uint32Array': + case 'Float32Array': + case 'Float64Array': + case 'Array': + return iterableEqual(leftHandOperand, rightHandOperand, options); + case 'RegExp': + return regexpEqual(leftHandOperand, rightHandOperand); + case 'Generator': + return generatorEqual(leftHandOperand, rightHandOperand, options); + case 'DataView': + return iterableEqual(new Uint8Array(leftHandOperand.buffer), new Uint8Array(rightHandOperand.buffer), options); + case 'ArrayBuffer': + return iterableEqual(new Uint8Array(leftHandOperand), new Uint8Array(rightHandOperand), options); + case 'Set': + return entriesEqual(leftHandOperand, rightHandOperand, options); + case 'Map': + return entriesEqual(leftHandOperand, rightHandOperand, options); + default: + return objectEqual(leftHandOperand, rightHandOperand, options); + } +} + +/*! + * Compare two Regular Expressions for equality. + * + * @param {RegExp} leftHandOperand + * @param {RegExp} rightHandOperand + * @return {Boolean} result + */ + +function regexpEqual(leftHandOperand, rightHandOperand) { + return leftHandOperand.toString() === rightHandOperand.toString(); +} + +/*! + * Compare two Sets/Maps for equality. Faster than other equality functions. + * + * @param {Set} leftHandOperand + * @param {Set} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function entriesEqual(leftHandOperand, rightHandOperand, options) { + // IE11 doesn't support Set#entries or Set#@@iterator, so we need manually populate using Set#forEach + if (leftHandOperand.size !== rightHandOperand.size) { + return false; + } + if (leftHandOperand.size === 0) { + return true; + } + var leftHandItems = []; + var rightHandItems = []; + leftHandOperand.forEach(function gatherEntries(key, value) { + leftHandItems.push([ key, value ]); + }); + rightHandOperand.forEach(function gatherEntries(key, value) { + rightHandItems.push([ key, value ]); + }); + return iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options); +} + +/*! + * Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers. + * + * @param {Iterable} leftHandOperand + * @param {Iterable} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function iterableEqual(leftHandOperand, rightHandOperand, options) { + var length = leftHandOperand.length; + if (length !== rightHandOperand.length) { + return false; + } + if (length === 0) { + return true; + } + var index = -1; + while (++index < length) { + if (deepEqual(leftHandOperand[index], rightHandOperand[index], options) === false) { + return false; + } + } + return true; +} + +/*! + * Simple equality for generator objects such as those returned by generator functions. + * + * @param {Iterable} leftHandOperand + * @param {Iterable} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function generatorEqual(leftHandOperand, rightHandOperand, options) { + return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options); +} + +/*! + * Determine if the given object has an @@iterator function. + * + * @param {Object} target + * @return {Boolean} `true` if the object has an @@iterator function. + */ +function hasIteratorFunction(target) { + return typeof Symbol !== 'undefined' && + typeof target === 'object' && + typeof Symbol.iterator !== 'undefined' && + typeof target[Symbol.iterator] === 'function'; +} + +/*! + * Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array. + * This will consume the iterator - which could have side effects depending on the @@iterator implementation. + * + * @param {Object} target + * @returns {Array} an array of entries from the @@iterator function + */ +function getIteratorEntries(target) { + if (hasIteratorFunction(target)) { + try { + return getGeneratorEntries(target[Symbol.iterator]()); + } catch (iteratorError) { + return []; + } + } + return []; +} + +/*! + * Gets all entries from a Generator. This will consume the generator - which could have side effects. + * + * @param {Generator} target + * @returns {Array} an array of entries from the Generator. + */ +function getGeneratorEntries(generator) { + var generatorResult = generator.next(); + var accumulator = [ generatorResult.value ]; + while (generatorResult.done === false) { + generatorResult = generator.next(); + accumulator.push(generatorResult.value); + } + return accumulator; +} + +/*! + * Gets all own and inherited enumerable keys from a target. + * + * @param {Object} target + * @returns {Array} an array of own and inherited enumerable keys from the target. + */ +function getEnumerableKeys(target) { + var keys = []; + for (var key in target) { + keys.push(key); + } + return keys; +} + +/*! + * Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of + * each key. If any value of the given key is not equal, the function will return false (early). + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ +function keysEqual(leftHandOperand, rightHandOperand, keys, options) { + var length = keys.length; + if (length === 0) { + return true; + } + for (var i = 0; i < length; i += 1) { + if (deepEqual(leftHandOperand[keys[i]], rightHandOperand[keys[i]], options) === false) { + return false; + } + } + return true; +} + +/*! + * Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual` + * for each enumerable key in the object. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function objectEqual(leftHandOperand, rightHandOperand, options) { + var leftHandKeys = getEnumerableKeys(leftHandOperand); + var rightHandKeys = getEnumerableKeys(rightHandOperand); + if (leftHandKeys.length && leftHandKeys.length === rightHandKeys.length) { + leftHandKeys.sort(); + rightHandKeys.sort(); + if (iterableEqual(leftHandKeys, rightHandKeys) === false) { + return false; + } + return keysEqual(leftHandOperand, rightHandOperand, leftHandKeys, options); + } + + var leftHandEntries = getIteratorEntries(leftHandOperand); + var rightHandEntries = getIteratorEntries(rightHandOperand); + if (leftHandEntries.length && leftHandEntries.length === rightHandEntries.length) { + leftHandEntries.sort(); + rightHandEntries.sort(); + return iterableEqual(leftHandEntries, rightHandEntries, options); + } + + if (leftHandKeys.length === 0 && + leftHandEntries.length === 0 && + rightHandKeys.length === 0 && + rightHandEntries.length === 0) { + return true; + } + + return false; +} + +/*! + * Returns true if the argument is a primitive. + * + * This intentionally returns true for all objects that can be compared by reference, + * including functions and symbols. + * + * @param {Mixed} value + * @return {Boolean} result + */ +function isPrimitive(value) { + return value === null || typeof value !== 'object'; +} + + +/***/ }), + +/***/ 76599: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var stream = __nccwpck_require__(51642) +var eos = __nccwpck_require__(88434) +var inherits = __nccwpck_require__(44124) +var shift = __nccwpck_require__(66121) + +var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from) + ? Buffer.from([0]) + : new Buffer([0]) + +var onuncork = function(self, fn) { + if (self._corked) self.once('uncork', fn) + else fn() +} + +var autoDestroy = function (self, err) { + if (self._autoDestroy) self.destroy(err) +} + +var destroyer = function(self, end) { + return function(err) { + if (err) autoDestroy(self, err.message === 'premature close' ? null : err) + else if (end && !self._ended) self.end() + } +} + +var end = function(ws, fn) { + if (!ws) return fn() + if (ws._writableState && ws._writableState.finished) return fn() + if (ws._writableState) return ws.end(fn) + ws.end() + fn() +} + +var toStreams2 = function(rs) { + return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs) +} + +var Duplexify = function(writable, readable, opts) { + if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts) + stream.Duplex.call(this, opts) + + this._writable = null + this._readable = null + this._readable2 = null + + this._autoDestroy = !opts || opts.autoDestroy !== false + this._forwardDestroy = !opts || opts.destroy !== false + this._forwardEnd = !opts || opts.end !== false + this._corked = 1 // start corked + this._ondrain = null + this._drained = false + this._forwarding = false + this._unwrite = null + this._unread = null + this._ended = false + + this.destroyed = false + + if (writable) this.setWritable(writable) + if (readable) this.setReadable(readable) +} + +inherits(Duplexify, stream.Duplex) + +Duplexify.obj = function(writable, readable, opts) { + if (!opts) opts = {} + opts.objectMode = true + opts.highWaterMark = 16 + return new Duplexify(writable, readable, opts) +} + +Duplexify.prototype.cork = function() { + if (++this._corked === 1) this.emit('cork') +} + +Duplexify.prototype.uncork = function() { + if (this._corked && --this._corked === 0) this.emit('uncork') +} + +Duplexify.prototype.setWritable = function(writable) { + if (this._unwrite) this._unwrite() + + if (this.destroyed) { + if (writable && writable.destroy) writable.destroy() + return + } + + if (writable === null || writable === false) { + this.end() + return + } + + var self = this + var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd)) + + var ondrain = function() { + var ondrain = self._ondrain + self._ondrain = null + if (ondrain) ondrain() + } + + var clear = function() { + self._writable.removeListener('drain', ondrain) + unend() + } + + if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks + + this._writable = writable + this._writable.on('drain', ondrain) + this._unwrite = clear + + this.uncork() // always uncork setWritable +} + +Duplexify.prototype.setReadable = function(readable) { + if (this._unread) this._unread() + + if (this.destroyed) { + if (readable && readable.destroy) readable.destroy() + return + } + + if (readable === null || readable === false) { + this.push(null) + this.resume() + return + } + + var self = this + var unend = eos(readable, {writable:false, readable:true}, destroyer(this)) + + var onreadable = function() { + self._forward() + } + + var onend = function() { + self.push(null) + } + + var clear = function() { + self._readable2.removeListener('readable', onreadable) + self._readable2.removeListener('end', onend) + unend() + } + + this._drained = true + this._readable = readable + this._readable2 = readable._readableState ? readable : toStreams2(readable) + this._readable2.on('readable', onreadable) + this._readable2.on('end', onend) + this._unread = clear + + this._forward() +} + +Duplexify.prototype._read = function() { + this._drained = true + this._forward() +} + +Duplexify.prototype._forward = function() { + if (this._forwarding || !this._readable2 || !this._drained) return + this._forwarding = true + + var data + + while (this._drained && (data = shift(this._readable2)) !== null) { + if (this.destroyed) continue + this._drained = this.push(data) + } + + this._forwarding = false +} + +Duplexify.prototype.destroy = function(err) { + if (this.destroyed) return + this.destroyed = true + + var self = this + process.nextTick(function() { + self._destroy(err) + }) +} + +Duplexify.prototype._destroy = function(err) { + if (err) { + var ondrain = this._ondrain + this._ondrain = null + if (ondrain) ondrain(err) + else this.emit('error', err) + } + + if (this._forwardDestroy) { + if (this._readable && this._readable.destroy) this._readable.destroy() + if (this._writable && this._writable.destroy) this._writable.destroy() + } + + this.emit('close') +} + +Duplexify.prototype._write = function(data, enc, cb) { + if (this.destroyed) return cb() + if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb)) + if (data === SIGNAL_FLUSH) return this._finish(cb) + if (!this._writable) return cb() + + if (this._writable.write(data) === false) this._ondrain = cb + else cb() +} + +Duplexify.prototype._finish = function(cb) { + var self = this + this.emit('preend') + onuncork(this, function() { + end(self._forwardEnd && self._writable, function() { + // haxx to not emit prefinish twice + if (self._writableState.prefinished === false) self._writableState.prefinished = true + self.emit('prefinish') + onuncork(self, cb) + }) + }) +} + +Duplexify.prototype.end = function(data, enc, cb) { + if (typeof data === 'function') return this.end(null, null, data) + if (typeof enc === 'function') return this.end(data, null, enc) + this._ended = true + if (data) this.write(data) + if (!this._writableState.ending) this.write(SIGNAL_FLUSH) + return stream.Writable.prototype.end.call(this, cb) +} + +module.exports = Duplexify + + +/***/ }), + +/***/ 88434: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var once = __nccwpck_require__(1223); + +var noop = function() {}; + +var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +}; + +var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 +}; + +var eos = function(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + + callback = once(callback || noop); + + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || (opts.readable !== false && stream.readable); + var writable = opts.writable || (opts.writable !== false && stream.writable); + var cancelled = false; + + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; + + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; + + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; + + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); + }; + + var onerror = function(err) { + callback.call(stream, err); + }; + + var onclose = function() { + process.nextTick(onclosenexttick); + }; + + var onclosenexttick = function() { + if (cancelled) return; + if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); + if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); + }; + + var onrequest = function() { + stream.req.on('finish', onfinish); + }; + + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest(); + else stream.on('request', onrequest); + } else if (writable && !ws) { // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + + if (isChildProcess(stream)) stream.on('exit', onexit); + + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + + return function() { + cancelled = true; + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('exit', onexit); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +}; + +module.exports = eos; + + +/***/ }), + +/***/ 61128: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Inspired by Google Closure: +// http://closure-library.googlecode.com/svn/docs/ +// closure_goog_array_array.js.html#goog.array.clear + + + +var value = __nccwpck_require__(95282); + +module.exports = function () { + value(this).length = 0; + return this; +}; + + +/***/ }), + +/***/ 12324: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var numberIsNaN = __nccwpck_require__(46881) + , toPosInt = __nccwpck_require__(63755) + , value = __nccwpck_require__(95282) + , indexOf = Array.prototype.indexOf + , objHasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (searchElement/*, fromIndex*/) { + var i, length, fromIndex, val; + if (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments); + + length = toPosInt(value(this).length); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = 0; + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i < length; ++i) { + if (objHasOwnProperty.call(this, i)) { + val = this[i]; + if (numberIsNaN(val)) return i; // Jslint: ignore + } + } + return -1; +}; + + +/***/ }), + +/***/ 12406: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(56619)() ? Array.from : __nccwpck_require__(68049); + + +/***/ }), + +/***/ 56619: +/***/ ((module) => { + +"use strict"; + + +module.exports = function () { + var from = Array.from, arr, result; + if (typeof from !== "function") return false; + arr = ["raz", "dwa"]; + result = from(arr); + return Boolean(result && result !== arr && result[1] === "dwa"); +}; + + +/***/ }), + +/***/ 68049: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var iteratorSymbol = __nccwpck_require__(71228).iterator + , isArguments = __nccwpck_require__(61375) + , isFunction = __nccwpck_require__(21003) + , toPosInt = __nccwpck_require__(63755) + , callable = __nccwpck_require__(6097) + , validValue = __nccwpck_require__(95282) + , isValue = __nccwpck_require__(2285) + , isString = __nccwpck_require__(65624) + , isArray = Array.isArray + , call = Function.prototype.call + , desc = { configurable: true, enumerable: true, writable: true, value: null } + , defineProperty = Object.defineProperty; + +// eslint-disable-next-line complexity, max-lines-per-function +module.exports = function (arrayLike/*, mapFn, thisArg*/) { + var mapFn = arguments[1] + , thisArg = arguments[2] + , Context + , i + , j + , arr + , length + , code + , iterator + , result + , getIterator + , value; + + arrayLike = Object(validValue(arrayLike)); + + if (isValue(mapFn)) callable(mapFn); + if (!this || this === Array || !isFunction(this)) { + // Result: Plain array + if (!mapFn) { + if (isArguments(arrayLike)) { + // Source: Arguments + length = arrayLike.length; + if (length !== 1) return Array.apply(null, arrayLike); + arr = new Array(1); + arr[0] = arrayLike[0]; + return arr; + } + if (isArray(arrayLike)) { + // Source: Array + arr = new Array((length = arrayLike.length)); + for (i = 0; i < length; ++i) arr[i] = arrayLike[i]; + return arr; + } + } + arr = []; + } else { + // Result: Non plain array + Context = this; + } + + if (!isArray(arrayLike)) { + if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) { + // Source: Iterator + iterator = callable(getIterator).call(arrayLike); + if (Context) arr = new Context(); + result = iterator.next(); + i = 0; + while (!result.done) { + value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value; + if (Context) { + desc.value = value; + defineProperty(arr, i, desc); + } else { + arr[i] = value; + } + result = iterator.next(); + ++i; + } + length = i; + } else if (isString(arrayLike)) { + // Source: String + length = arrayLike.length; + if (Context) arr = new Context(); + for (i = 0, j = 0; i < length; ++i) { + value = arrayLike[i]; + if (i + 1 < length) { + code = value.charCodeAt(0); + // eslint-disable-next-line max-depth + if (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i]; + } + value = mapFn ? call.call(mapFn, thisArg, value, j) : value; + if (Context) { + desc.value = value; + defineProperty(arr, j, desc); + } else { + arr[j] = value; + } + ++j; + } + length = j; + } + } + if (length === undefined) { + // Source: array or array-like + length = toPosInt(arrayLike.length); + if (Context) arr = new Context(length); + for (i = 0; i < length; ++i) { + value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i]; + if (Context) { + desc.value = value; + defineProperty(arr, i, desc); + } else { + arr[i] = value; + } + } + } + if (Context) { + desc.value = null; + arr.length = length; + } + return arr; +}; + + +/***/ }), + +/***/ 61375: +/***/ ((module) => { + +"use strict"; + + +var objToString = Object.prototype.toString + , id = objToString.call((function () { return arguments; })()); + +module.exports = function (value) { return objToString.call(value) === id; }; + + +/***/ }), + +/***/ 21003: +/***/ ((module) => { + +"use strict"; + + +var objToString = Object.prototype.toString + , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/); + +module.exports = function (value) { + return typeof value === "function" && isFunctionStringTag(objToString.call(value)); +}; + + +/***/ }), + +/***/ 36049: +/***/ ((module) => { + +"use strict"; + + +// eslint-disable-next-line no-empty-function +module.exports = function () {}; + + +/***/ }), + +/***/ 52293: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(1492)() ? Math.sign : __nccwpck_require__(78745); + + +/***/ }), + +/***/ 1492: +/***/ ((module) => { + +"use strict"; + + +module.exports = function () { + var sign = Math.sign; + if (typeof sign !== "function") return false; + return sign(10) === 1 && sign(-20) === -1; +}; + + +/***/ }), + +/***/ 78745: +/***/ ((module) => { + +"use strict"; + + +module.exports = function (value) { + value = Number(value); + if (isNaN(value) || value === 0) return value; + return value > 0 ? 1 : -1; +}; + + +/***/ }), + +/***/ 46881: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(15587)() ? Number.isNaN : __nccwpck_require__(93259); + + +/***/ }), + +/***/ 15587: +/***/ ((module) => { + +"use strict"; + + +module.exports = function () { + var numberIsNaN = Number.isNaN; + if (typeof numberIsNaN !== "function") return false; + return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34); +}; + + +/***/ }), + +/***/ 93259: +/***/ ((module) => { + +"use strict"; + + +module.exports = function (value) { + // eslint-disable-next-line no-self-compare + return value !== value; +}; + + +/***/ }), + +/***/ 69836: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var sign = __nccwpck_require__(52293) + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (value) { + if (isNaN(value)) return 0; + value = Number(value); + if (value === 0 || !isFinite(value)) return value; + return sign(value) * floor(abs(value)); +}; + + +/***/ }), + +/***/ 63755: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var toInteger = __nccwpck_require__(69836) + , max = Math.max; + +module.exports = function (value) { return max(0, toInteger(value)); }; + + +/***/ }), + +/***/ 77175: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Internal method, used by iteration functions. +// Calls a function for each key-value pair found in object +// Optionally takes compareFn to iterate object in specific order + + + +var callable = __nccwpck_require__(6097) + , value = __nccwpck_require__(95282) + , bind = Function.prototype.bind + , call = Function.prototype.call + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (method, defVal) { + return function (obj, cb/*, thisArg, compareFn*/) { + var list, thisArg = arguments[2], compareFn = arguments[3]; + obj = Object(value(obj)); + callable(cb); + + list = keys(obj); + if (compareFn) { + list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined); + } + if (typeof method !== "function") method = list[method]; + return call.call(method, list, function (key, index) { + if (!objPropertyIsEnumerable.call(obj, key)) return defVal; + return call.call(cb, thisArg, obj[key], key, obj, index); + }); + }; +}; + + +/***/ }), + +/***/ 81377: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(58732)() ? Object.assign : __nccwpck_require__(47795); + + +/***/ }), + +/***/ 58732: +/***/ ((module) => { + +"use strict"; + + +module.exports = function () { + var assign = Object.assign, obj; + if (typeof assign !== "function") return false; + obj = { foo: "raz" }; + assign(obj, { bar: "dwa" }, { trzy: "trzy" }); + return obj.foo + obj.bar + obj.trzy === "razdwatrzy"; +}; + + +/***/ }), + +/***/ 47795: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var keys = __nccwpck_require__(68336) + , value = __nccwpck_require__(95282) + , max = Math.max; + +module.exports = function (dest, src/*, …srcn*/) { + var error, i, length = max(arguments.length, 2), assign; + dest = Object(value(dest)); + assign = function (key) { + try { + dest[key] = src[key]; + } catch (e) { + if (!error) error = e; + } + }; + for (i = 1; i < length; ++i) { + src = arguments[i]; + keys(src).forEach(assign); + } + if (error !== undefined) throw error; + return dest; +}; + + +/***/ }), + +/***/ 27175: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var aFrom = __nccwpck_require__(12406) + , assign = __nccwpck_require__(81377) + , value = __nccwpck_require__(95282); + +module.exports = function (obj/*, propertyNames, options*/) { + var copy = Object(value(obj)), propertyNames = arguments[1], options = Object(arguments[2]); + if (copy !== obj && !propertyNames) return copy; + var result = {}; + if (propertyNames) { + aFrom(propertyNames, function (propertyName) { + if (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName]; + }); + } else { + assign(result, obj); + } + return result; +}; + + +/***/ }), + +/***/ 58465: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Workaround for http://code.google.com/p/v8/issues/detail?id=2804 + + + +var create = Object.create, shim; + +if (!__nccwpck_require__(13579)()) { + shim = __nccwpck_require__(15410); +} + +module.exports = (function () { + var nullObject, polyProps, desc; + if (!shim) return create; + if (shim.level !== 1) return create; + + nullObject = {}; + polyProps = {}; + desc = { configurable: false, enumerable: false, writable: true, value: undefined }; + Object.getOwnPropertyNames(Object.prototype).forEach(function (name) { + if (name === "__proto__") { + polyProps[name] = { + configurable: true, + enumerable: false, + writable: true, + value: undefined + }; + return; + } + polyProps[name] = desc; + }); + Object.defineProperties(nullObject, polyProps); + + Object.defineProperty(shim, "nullPolyfill", { + configurable: false, + enumerable: false, + writable: false, + value: nullObject + }); + + return function (prototype, props) { + return create(prototype === null ? nullObject : prototype, props); + }; +})(); + + +/***/ }), + +/***/ 79575: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(77175)("forEach"); + + +/***/ }), + +/***/ 21380: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isValue = __nccwpck_require__(2285); + +var map = { function: true, object: true }; + +module.exports = function (value) { return (isValue(value) && map[typeof value]) || false; }; + + +/***/ }), + +/***/ 2285: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var _undefined = __nccwpck_require__(36049)(); // Support ES3 engines + +module.exports = function (val) { return val !== _undefined && val !== null; }; + + +/***/ }), + +/***/ 68336: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(37491)() ? Object.keys : __nccwpck_require__(83890); + + +/***/ }), + +/***/ 37491: +/***/ ((module) => { + +"use strict"; + + +module.exports = function () { + try { + Object.keys("primitive"); + return true; + } catch (e) { + return false; + } +}; + + +/***/ }), + +/***/ 83890: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isValue = __nccwpck_require__(2285); + +var keys = Object.keys; + +module.exports = function (object) { return keys(isValue(object) ? Object(object) : object); }; + + +/***/ }), + +/***/ 47289: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var callable = __nccwpck_require__(6097) + , forEach = __nccwpck_require__(79575) + , call = Function.prototype.call; + +module.exports = function (obj, cb/*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, targetObj, index) { + result[key] = call.call(cb, thisArg, value, key, targetObj, index); + }); + return result; +}; + + +/***/ }), + +/***/ 64488: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isValue = __nccwpck_require__(2285); + +var forEach = Array.prototype.forEach, create = Object.create; + +var process = function (src, obj) { + var key; + for (key in src) obj[key] = src[key]; +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (opts1/*, …options*/) { + var result = create(null); + forEach.call(arguments, function (options) { + if (!isValue(options)) return; + process(Object(options), result); + }); + return result; +}; + + +/***/ }), + +/***/ 62796: +/***/ ((module) => { + +"use strict"; + + +var forEach = Array.prototype.forEach, create = Object.create; + +// eslint-disable-next-line no-unused-vars +module.exports = function (arg/*, …args*/) { + var set = create(null); + forEach.call(arguments, function (name) { set[name] = true; }); + return set; +}; + + +/***/ }), + +/***/ 77165: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(13579)() ? Object.setPrototypeOf : __nccwpck_require__(15410); + + +/***/ }), + +/***/ 13579: +/***/ ((module) => { + +"use strict"; + + +var create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {}; + +module.exports = function (/* CustomCreate*/) { + var setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create; + if (typeof setPrototypeOf !== "function") return false; + return getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject; +}; + + +/***/ }), + +/***/ 15410: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +/* eslint no-proto: "off" */ + +// Big thanks to @WebReflection for sorting this out +// https://gist.github.com/WebReflection/5593554 + + + +var isObject = __nccwpck_require__(21380) + , value = __nccwpck_require__(95282) + , objIsPrototypeOf = Object.prototype.isPrototypeOf + , defineProperty = Object.defineProperty + , nullDesc = { configurable: true, enumerable: false, writable: true, value: undefined } + , validate; + +validate = function (obj, prototype) { + value(obj); + if (prototype === null || isObject(prototype)) return obj; + throw new TypeError("Prototype must be null or an object"); +}; + +module.exports = (function (status) { + var fn, set; + if (!status) return null; + if (status.level === 2) { + if (status.set) { + set = status.set; + fn = function (obj, prototype) { + set.call(validate(obj, prototype), prototype); + return obj; + }; + } else { + fn = function (obj, prototype) { + validate(obj, prototype).__proto__ = prototype; + return obj; + }; + } + } else { + fn = function self(obj, prototype) { + var isNullBase; + validate(obj, prototype); + isNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj); + if (isNullBase) delete self.nullPolyfill.__proto__; + if (prototype === null) prototype = self.nullPolyfill; + obj.__proto__ = prototype; + if (isNullBase) defineProperty(self.nullPolyfill, "__proto__", nullDesc); + return obj; + }; + } + return Object.defineProperty(fn, "level", { + configurable: false, + enumerable: false, + writable: false, + value: status.level + }); +})( + (function () { + var tmpObj1 = Object.create(null) + , tmpObj2 = {} + , set + , desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__"); + + if (desc) { + try { + set = desc.set; // Opera crashes at this point + set.call(tmpObj1, tmpObj2); + } catch (ignore) {} + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 }; + } + + tmpObj1.__proto__ = tmpObj2; + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 }; + + tmpObj1 = {}; + tmpObj1.__proto__ = tmpObj2; + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 }; + + return false; + })() +); + +__nccwpck_require__(58465); + + +/***/ }), + +/***/ 6097: +/***/ ((module) => { + +"use strict"; + + +module.exports = function (fn) { + if (typeof fn !== "function") throw new TypeError(fn + " is not a function"); + return fn; +}; + + +/***/ }), + +/***/ 95282: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isValue = __nccwpck_require__(2285); + +module.exports = function (value) { + if (!isValue(value)) throw new TypeError("Cannot use null or undefined"); + return value; +}; + + +/***/ }), + +/***/ 87689: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(79710)() ? String.prototype.contains : __nccwpck_require__(41706); + + +/***/ }), + +/***/ 79710: +/***/ ((module) => { + +"use strict"; + + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.contains !== "function") return false; + return str.contains("dwa") === true && str.contains("foo") === false; +}; + + +/***/ }), + +/***/ 41706: +/***/ ((module) => { + +"use strict"; + + +var indexOf = String.prototype.indexOf; + +module.exports = function (searchString/*, position*/) { + return indexOf.call(this, searchString, arguments[1]) > -1; +}; + + +/***/ }), + +/***/ 65624: +/***/ ((module) => { + +"use strict"; + + +var objToString = Object.prototype.toString, id = objToString.call(""); + +module.exports = function (value) { + return ( + typeof value === "string" || + (value && + typeof value === "object" && + (value instanceof String || objToString.call(value) === id)) || + false + ); +}; + + +/***/ }), + +/***/ 31936: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var setPrototypeOf = __nccwpck_require__(77165) + , contains = __nccwpck_require__(87689) + , d = __nccwpck_require__(14571) + , Symbol = __nccwpck_require__(71228) + , Iterator = __nccwpck_require__(84580); + +var defineProperty = Object.defineProperty, ArrayIterator; + +ArrayIterator = module.exports = function (arr, kind) { + if (!(this instanceof ArrayIterator)) throw new TypeError("Constructor requires 'new'"); + Iterator.call(this, arr); + if (!kind) kind = "value"; + else if (contains.call(kind, "key+value")) kind = "key+value"; + else if (contains.call(kind, "key")) kind = "key"; + else kind = "value"; + defineProperty(this, "__kind__", d("", kind)); +}; +if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator); + +// Internal %ArrayIteratorPrototype% doesn't expose its constructor +delete ArrayIterator.prototype.constructor; + +ArrayIterator.prototype = Object.create(Iterator.prototype, { + _resolve: d(function (i) { + if (this.__kind__ === "value") return this.__list__[i]; + if (this.__kind__ === "key+value") return [i, this.__list__[i]]; + return i; + }) +}); +defineProperty(ArrayIterator.prototype, Symbol.toStringTag, d("c", "Array Iterator")); + + +/***/ }), + +/***/ 16756: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isArguments = __nccwpck_require__(61375) + , callable = __nccwpck_require__(6097) + , isString = __nccwpck_require__(65624) + , get = __nccwpck_require__(5561); + +var isArray = Array.isArray, call = Function.prototype.call, some = Array.prototype.some; + +module.exports = function (iterable, cb /*, thisArg*/) { + var mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code; + if (isArray(iterable) || isArguments(iterable)) mode = "array"; + else if (isString(iterable)) mode = "string"; + else iterable = get(iterable); + + callable(cb); + doBreak = function () { + broken = true; + }; + if (mode === "array") { + some.call(iterable, function (value) { + call.call(cb, thisArg, value, doBreak); + return broken; + }); + return; + } + if (mode === "string") { + length = iterable.length; + for (i = 0; i < length; ++i) { + char = iterable[i]; + if (i + 1 < length) { + code = char.charCodeAt(0); + if (code >= 0xd800 && code <= 0xdbff) char += iterable[++i]; + } + call.call(cb, thisArg, char, doBreak); + if (broken) break; + } + return; + } + result = iterable.next(); + + while (!result.done) { + call.call(cb, thisArg, result.value, doBreak); + if (broken) return; + result = iterable.next(); + } +}; + + +/***/ }), + +/***/ 5561: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isArguments = __nccwpck_require__(61375) + , isString = __nccwpck_require__(65624) + , ArrayIterator = __nccwpck_require__(31936) + , StringIterator = __nccwpck_require__(10999) + , iterable = __nccwpck_require__(87747) + , iteratorSymbol = __nccwpck_require__(71228).iterator; + +module.exports = function (obj) { + if (typeof iterable(obj)[iteratorSymbol] === "function") return obj[iteratorSymbol](); + if (isArguments(obj)) return new ArrayIterator(obj); + if (isString(obj)) return new StringIterator(obj); + return new ArrayIterator(obj); +}; + + +/***/ }), + +/***/ 84580: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var clear = __nccwpck_require__(61128) + , assign = __nccwpck_require__(81377) + , callable = __nccwpck_require__(6097) + , value = __nccwpck_require__(95282) + , d = __nccwpck_require__(14571) + , autoBind = __nccwpck_require__(56362) + , Symbol = __nccwpck_require__(71228); + +var defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, Iterator; + +module.exports = Iterator = function (list, context) { + if (!(this instanceof Iterator)) throw new TypeError("Constructor requires 'new'"); + defineProperties(this, { + __list__: d("w", value(list)), + __context__: d("w", context), + __nextIndex__: d("w", 0) + }); + if (!context) return; + callable(context.on); + context.on("_add", this._onAdd); + context.on("_delete", this._onDelete); + context.on("_clear", this._onClear); +}; + +// Internal %IteratorPrototype% doesn't expose its constructor +delete Iterator.prototype.constructor; + +defineProperties( + Iterator.prototype, + assign( + { + _next: d(function () { + var i; + if (!this.__list__) return undefined; + if (this.__redo__) { + i = this.__redo__.shift(); + if (i !== undefined) return i; + } + if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++; + this._unBind(); + return undefined; + }), + next: d(function () { + return this._createResult(this._next()); + }), + _createResult: d(function (i) { + if (i === undefined) return { done: true, value: undefined }; + return { done: false, value: this._resolve(i) }; + }), + _resolve: d(function (i) { + return this.__list__[i]; + }), + _unBind: d(function () { + this.__list__ = null; + delete this.__redo__; + if (!this.__context__) return; + this.__context__.off("_add", this._onAdd); + this.__context__.off("_delete", this._onDelete); + this.__context__.off("_clear", this._onClear); + this.__context__ = null; + }), + toString: d(function () { + return "[object " + (this[Symbol.toStringTag] || "Object") + "]"; + }) + }, + autoBind({ + _onAdd: d(function (index) { + if (index >= this.__nextIndex__) return; + ++this.__nextIndex__; + if (!this.__redo__) { + defineProperty(this, "__redo__", d("c", [index])); + return; + } + this.__redo__.forEach(function (redo, i) { + if (redo >= index) this.__redo__[i] = ++redo; + }, this); + this.__redo__.push(index); + }), + _onDelete: d(function (index) { + var i; + if (index >= this.__nextIndex__) return; + --this.__nextIndex__; + if (!this.__redo__) return; + i = this.__redo__.indexOf(index); + if (i !== -1) this.__redo__.splice(i, 1); + this.__redo__.forEach(function (redo, j) { + if (redo > index) this.__redo__[j] = --redo; + }, this); + }), + _onClear: d(function () { + if (this.__redo__) clear.call(this.__redo__); + this.__nextIndex__ = 0; + }) + }) + ) +); + +defineProperty( + Iterator.prototype, + Symbol.iterator, + d(function () { + return this; + }) +); + + +/***/ }), + +/***/ 92811: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isArguments = __nccwpck_require__(61375) + , isValue = __nccwpck_require__(2285) + , isString = __nccwpck_require__(65624); + +var iteratorSymbol = __nccwpck_require__(71228).iterator + , isArray = Array.isArray; + +module.exports = function (value) { + if (!isValue(value)) return false; + if (isArray(value)) return true; + if (isString(value)) return true; + if (isArguments(value)) return true; + return typeof value[iteratorSymbol] === "function"; +}; + + +/***/ }), + +/***/ 10999: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Thanks @mathiasbynens +// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols + + + +var setPrototypeOf = __nccwpck_require__(77165) + , d = __nccwpck_require__(14571) + , Symbol = __nccwpck_require__(71228) + , Iterator = __nccwpck_require__(84580); + +var defineProperty = Object.defineProperty, StringIterator; + +StringIterator = module.exports = function (str) { + if (!(this instanceof StringIterator)) throw new TypeError("Constructor requires 'new'"); + str = String(str); + Iterator.call(this, str); + defineProperty(this, "__length__", d("", str.length)); +}; +if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator); + +// Internal %ArrayIteratorPrototype% doesn't expose its constructor +delete StringIterator.prototype.constructor; + +StringIterator.prototype = Object.create(Iterator.prototype, { + _next: d(function () { + if (!this.__list__) return undefined; + if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++; + this._unBind(); + return undefined; + }), + _resolve: d(function (i) { + var char = this.__list__[i], code; + if (this.__nextIndex__ === this.__length__) return char; + code = char.charCodeAt(0); + if (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++]; + return char; + }) +}); +defineProperty(StringIterator.prototype, Symbol.toStringTag, d("c", "String Iterator")); + + +/***/ }), + +/***/ 87747: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isIterable = __nccwpck_require__(92811); + +module.exports = function (value) { + if (!isIterable(value)) throw new TypeError(value + " is not iterable"); + return value; +}; + + +/***/ }), + +/***/ 97063: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(4219)() ? Map : __nccwpck_require__(82549); + + +/***/ }), + +/***/ 4219: +/***/ ((module) => { + +"use strict"; + + +module.exports = function () { + var map, iterator, result; + if (typeof Map !== 'function') return false; + try { + // WebKit doesn't support arguments and crashes + map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]); + } catch (e) { + return false; + } + if (String(map) !== '[object Map]') return false; + if (map.size !== 3) return false; + if (typeof map.clear !== 'function') return false; + if (typeof map.delete !== 'function') return false; + if (typeof map.entries !== 'function') return false; + if (typeof map.forEach !== 'function') return false; + if (typeof map.get !== 'function') return false; + if (typeof map.has !== 'function') return false; + if (typeof map.keys !== 'function') return false; + if (typeof map.set !== 'function') return false; + if (typeof map.values !== 'function') return false; + + iterator = map.entries(); + result = iterator.next(); + if (result.done !== false) return false; + if (!result.value) return false; + if (result.value[0] !== 'raz') return false; + if (result.value[1] !== 'one') return false; + + return true; +}; + + +/***/ }), + +/***/ 76269: +/***/ ((module) => { + +"use strict"; +// Exports true if environment provides native `Map` implementation, +// whatever that is. + + + +module.exports = (function () { + if (typeof Map === 'undefined') return false; + return (Object.prototype.toString.call(new Map()) === '[object Map]'); +}()); + + +/***/ }), + +/***/ 53668: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(62796)('key', + 'value', 'key+value'); + + +/***/ }), + +/***/ 63379: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var setPrototypeOf = __nccwpck_require__(77165) + , d = __nccwpck_require__(14571) + , Iterator = __nccwpck_require__(84580) + , toStringTagSymbol = __nccwpck_require__(71228).toStringTag + , kinds = __nccwpck_require__(53668) + + , defineProperties = Object.defineProperties + , unBind = Iterator.prototype._unBind + , MapIterator; + +MapIterator = module.exports = function (map, kind) { + if (!(this instanceof MapIterator)) return new MapIterator(map, kind); + Iterator.call(this, map.__mapKeysData__, map); + if (!kind || !kinds[kind]) kind = 'key+value'; + defineProperties(this, { + __kind__: d('', kind), + __values__: d('w', map.__mapValuesData__) + }); +}; +if (setPrototypeOf) setPrototypeOf(MapIterator, Iterator); + +MapIterator.prototype = Object.create(Iterator.prototype, { + constructor: d(MapIterator), + _resolve: d(function (i) { + if (this.__kind__ === 'value') return this.__values__[i]; + if (this.__kind__ === 'key') return this.__list__[i]; + return [this.__list__[i], this.__values__[i]]; + }), + _unBind: d(function () { + this.__values__ = null; + unBind.call(this); + }), + toString: d(function () { return '[object Map Iterator]'; }) +}); +Object.defineProperty(MapIterator.prototype, toStringTagSymbol, + d('c', 'Map Iterator')); + + +/***/ }), + +/***/ 82549: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var clear = __nccwpck_require__(61128) + , eIndexOf = __nccwpck_require__(12324) + , setPrototypeOf = __nccwpck_require__(77165) + , callable = __nccwpck_require__(6097) + , validValue = __nccwpck_require__(95282) + , d = __nccwpck_require__(14571) + , ee = __nccwpck_require__(53647) + , Symbol = __nccwpck_require__(71228) + , iterator = __nccwpck_require__(87747) + , forOf = __nccwpck_require__(16756) + , Iterator = __nccwpck_require__(63379) + , isNative = __nccwpck_require__(76269) + + , call = Function.prototype.call + , defineProperties = Object.defineProperties, getPrototypeOf = Object.getPrototypeOf + , MapPoly; + +module.exports = MapPoly = function (/*iterable*/) { + var iterable = arguments[0], keys, values, self; + if (!(this instanceof MapPoly)) throw new TypeError('Constructor requires \'new\''); + if (isNative && setPrototypeOf && (Map !== MapPoly)) { + self = setPrototypeOf(new Map(), getPrototypeOf(this)); + } else { + self = this; + } + if (iterable != null) iterator(iterable); + defineProperties(self, { + __mapKeysData__: d('c', keys = []), + __mapValuesData__: d('c', values = []) + }); + if (!iterable) return self; + forOf(iterable, function (value) { + var key = validValue(value)[0]; + value = value[1]; + if (eIndexOf.call(keys, key) !== -1) return; + keys.push(key); + values.push(value); + }, self); + return self; +}; + +if (isNative) { + if (setPrototypeOf) setPrototypeOf(MapPoly, Map); + MapPoly.prototype = Object.create(Map.prototype, { + constructor: d(MapPoly) + }); +} + +ee(defineProperties(MapPoly.prototype, { + clear: d(function () { + if (!this.__mapKeysData__.length) return; + clear.call(this.__mapKeysData__); + clear.call(this.__mapValuesData__); + this.emit('_clear'); + }), + delete: d(function (key) { + var index = eIndexOf.call(this.__mapKeysData__, key); + if (index === -1) return false; + this.__mapKeysData__.splice(index, 1); + this.__mapValuesData__.splice(index, 1); + this.emit('_delete', index, key); + return true; + }), + entries: d(function () { return new Iterator(this, 'key+value'); }), + forEach: d(function (cb/*, thisArg*/) { + var thisArg = arguments[1], iterator, result; + callable(cb); + iterator = this.entries(); + result = iterator._next(); + while (result !== undefined) { + call.call(cb, thisArg, this.__mapValuesData__[result], + this.__mapKeysData__[result], this); + result = iterator._next(); + } + }), + get: d(function (key) { + var index = eIndexOf.call(this.__mapKeysData__, key); + if (index === -1) return; + return this.__mapValuesData__[index]; + }), + has: d(function (key) { + return (eIndexOf.call(this.__mapKeysData__, key) !== -1); + }), + keys: d(function () { return new Iterator(this, 'key'); }), + set: d(function (key, value) { + var index = eIndexOf.call(this.__mapKeysData__, key), emit; + if (index === -1) { + index = this.__mapKeysData__.push(key) - 1; + emit = true; + } + this.__mapValuesData__[index] = value; + if (emit) this.emit('_add', index, key); + return this; + }), + size: d.gs(function () { return this.__mapKeysData__.length; }), + values: d(function () { return new Iterator(this, 'value'); }), + toString: d(function () { return '[object Map]'; }) +})); +Object.defineProperty(MapPoly.prototype, Symbol.iterator, d(function () { + return this.entries(); +})); +Object.defineProperty(MapPoly.prototype, Symbol.toStringTag, d('c', 'Map')); + + +/***/ }), + +/***/ 71228: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(43338)() + ? __nccwpck_require__(93407).Symbol + : __nccwpck_require__(54347); + + +/***/ }), + +/***/ 43338: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var global = __nccwpck_require__(93407) + , validTypes = { object: true, symbol: true }; + +module.exports = function () { + var Symbol = global.Symbol; + var symbol; + if (typeof Symbol !== "function") return false; + symbol = Symbol("test symbol"); + try { String(symbol); } + catch (e) { return false; } + + // Return 'true' also for polyfills + if (!validTypes[typeof Symbol.iterator]) return false; + if (!validTypes[typeof Symbol.toPrimitive]) return false; + if (!validTypes[typeof Symbol.toStringTag]) return false; + + return true; +}; + + +/***/ }), + +/***/ 93880: +/***/ ((module) => { + +"use strict"; + + +module.exports = function (value) { + if (!value) return false; + if (typeof value === "symbol") return true; + if (!value.constructor) return false; + if (value.constructor.name !== "Symbol") return false; + return value[value.constructor.toStringTag] === "Symbol"; +}; + + +/***/ }), + +/***/ 7467: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var d = __nccwpck_require__(14571); + +var create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype; + +var created = create(null); +module.exports = function (desc) { + var postfix = 0, name, ie11BugWorkaround; + while (created[desc + (postfix || "")]) ++postfix; + desc += postfix || ""; + created[desc] = true; + name = "@@" + desc; + defineProperty( + objPrototype, + name, + d.gs(null, function (value) { + // For IE11 issue see: + // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/ + // ie11-broken-getters-on-dom-objects + // https://github.com/medikoo/es6-symbol/issues/12 + if (ie11BugWorkaround) return; + ie11BugWorkaround = true; + defineProperty(this, name, d(value)); + ie11BugWorkaround = false; + }) + ); + return name; +}; + + +/***/ }), + +/***/ 12605: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var d = __nccwpck_require__(14571) + , NativeSymbol = __nccwpck_require__(93407).Symbol; + +module.exports = function (SymbolPolyfill) { + return Object.defineProperties(SymbolPolyfill, { + // To ensure proper interoperability with other native functions (e.g. Array.from) + // fallback to eventual native implementation of given symbol + hasInstance: d( + "", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill("hasInstance") + ), + isConcatSpreadable: d( + "", + (NativeSymbol && NativeSymbol.isConcatSpreadable) || + SymbolPolyfill("isConcatSpreadable") + ), + iterator: d("", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill("iterator")), + match: d("", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill("match")), + replace: d("", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill("replace")), + search: d("", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill("search")), + species: d("", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill("species")), + split: d("", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill("split")), + toPrimitive: d( + "", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill("toPrimitive") + ), + toStringTag: d( + "", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill("toStringTag") + ), + unscopables: d( + "", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill("unscopables") + ) + }); +}; + + +/***/ }), + +/***/ 14823: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var d = __nccwpck_require__(14571) + , validateSymbol = __nccwpck_require__(89371); + +var registry = Object.create(null); + +module.exports = function (SymbolPolyfill) { + return Object.defineProperties(SymbolPolyfill, { + for: d(function (key) { + if (registry[key]) return registry[key]; + return (registry[key] = SymbolPolyfill(String(key))); + }), + keyFor: d(function (symbol) { + var key; + validateSymbol(symbol); + for (key in registry) { + if (registry[key] === symbol) return key; + } + return undefined; + }) + }); +}; + + +/***/ }), + +/***/ 54347: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// ES2015 Symbol polyfill for environments that do not (or partially) support it + + + +var d = __nccwpck_require__(14571) + , validateSymbol = __nccwpck_require__(89371) + , NativeSymbol = __nccwpck_require__(93407).Symbol + , generateName = __nccwpck_require__(7467) + , setupStandardSymbols = __nccwpck_require__(12605) + , setupSymbolRegistry = __nccwpck_require__(14823); + +var create = Object.create + , defineProperties = Object.defineProperties + , defineProperty = Object.defineProperty; + +var SymbolPolyfill, HiddenSymbol, isNativeSafe; + +if (typeof NativeSymbol === "function") { + try { + String(NativeSymbol()); + isNativeSafe = true; + } catch (ignore) {} +} else { + NativeSymbol = null; +} + +// Internal constructor (not one exposed) for creating Symbol instances. +// This one is used to ensure that `someSymbol instanceof Symbol` always return false +HiddenSymbol = function Symbol(description) { + if (this instanceof HiddenSymbol) throw new TypeError("Symbol is not a constructor"); + return SymbolPolyfill(description); +}; + +// Exposed `Symbol` constructor +// (returns instances of HiddenSymbol) +module.exports = SymbolPolyfill = function Symbol(description) { + var symbol; + if (this instanceof Symbol) throw new TypeError("Symbol is not a constructor"); + if (isNativeSafe) return NativeSymbol(description); + symbol = create(HiddenSymbol.prototype); + description = description === undefined ? "" : String(description); + return defineProperties(symbol, { + __description__: d("", description), + __name__: d("", generateName(description)) + }); +}; + +setupStandardSymbols(SymbolPolyfill); +setupSymbolRegistry(SymbolPolyfill); + +// Internal tweaks for real symbol producer +defineProperties(HiddenSymbol.prototype, { + constructor: d(SymbolPolyfill), + toString: d("", function () { return this.__name__; }) +}); + +// Proper implementation of methods exposed on Symbol.prototype +// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype +defineProperties(SymbolPolyfill.prototype, { + toString: d(function () { return "Symbol (" + validateSymbol(this).__description__ + ")"; }), + valueOf: d(function () { return validateSymbol(this); }) +}); +defineProperty( + SymbolPolyfill.prototype, + SymbolPolyfill.toPrimitive, + d("", function () { + var symbol = validateSymbol(this); + if (typeof symbol === "symbol") return symbol; + return symbol.toString(); + }) +); +defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d("c", "Symbol")); + +// Proper implementaton of toPrimitive and toStringTag for returned symbol instances +defineProperty( + HiddenSymbol.prototype, SymbolPolyfill.toStringTag, + d("c", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]) +); + +// Note: It's important to define `toPrimitive` as last one, as some implementations +// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols) +// And that may invoke error in definition flow: +// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 +defineProperty( + HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, + d("c", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]) +); + + +/***/ }), + +/***/ 89371: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isSymbol = __nccwpck_require__(93880); + +module.exports = function (value) { + if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); + return value; +}; + + +/***/ }), + +/***/ 53647: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +var d = __nccwpck_require__(14571) + , callable = __nccwpck_require__(6097) + + , apply = Function.prototype.apply, call = Function.prototype.call + , create = Object.create, defineProperty = Object.defineProperty + , defineProperties = Object.defineProperties + , hasOwnProperty = Object.prototype.hasOwnProperty + , descriptor = { configurable: true, enumerable: false, writable: true } + + , on, once, off, emit, methods, descriptors, base; + +on = function (type, listener) { + var data; + + callable(listener); + + if (!hasOwnProperty.call(this, '__ee__')) { + data = descriptor.value = create(null); + defineProperty(this, '__ee__', descriptor); + descriptor.value = null; + } else { + data = this.__ee__; + } + if (!data[type]) data[type] = listener; + else if (typeof data[type] === 'object') data[type].push(listener); + else data[type] = [data[type], listener]; + + return this; +}; + +once = function (type, listener) { + var once, self; + + callable(listener); + self = this; + on.call(this, type, once = function () { + off.call(self, type, once); + apply.call(listener, this, arguments); + }); + + once.__eeOnceListener__ = listener; + return this; +}; + +off = function (type, listener) { + var data, listeners, candidate, i; + + callable(listener); + + if (!hasOwnProperty.call(this, '__ee__')) return this; + data = this.__ee__; + if (!data[type]) return this; + listeners = data[type]; + + if (typeof listeners === 'object') { + for (i = 0; (candidate = listeners[i]); ++i) { + if ((candidate === listener) || + (candidate.__eeOnceListener__ === listener)) { + if (listeners.length === 2) data[type] = listeners[i ? 0 : 1]; + else listeners.splice(i, 1); + } + } + } else { + if ((listeners === listener) || + (listeners.__eeOnceListener__ === listener)) { + delete data[type]; + } + } + + return this; +}; + +emit = function (type) { + var i, l, listener, listeners, args; + + if (!hasOwnProperty.call(this, '__ee__')) return; + listeners = this.__ee__[type]; + if (!listeners) return; + + if (typeof listeners === 'object') { + l = arguments.length; + args = new Array(l - 1); + for (i = 1; i < l; ++i) args[i - 1] = arguments[i]; + + listeners = listeners.slice(); + for (i = 0; (listener = listeners[i]); ++i) { + apply.call(listener, this, args); + } + } else { + switch (arguments.length) { + case 1: + call.call(listeners, this); + break; + case 2: + call.call(listeners, this, arguments[1]); + break; + case 3: + call.call(listeners, this, arguments[1], arguments[2]); + break; + default: + l = arguments.length; + args = new Array(l - 1); + for (i = 1; i < l; ++i) { + args[i - 1] = arguments[i]; + } + apply.call(listeners, this, args); + } + } +}; + +methods = { + on: on, + once: once, + off: off, + emit: emit +}; + +descriptors = { + on: d(on), + once: d(once), + off: d(off), + emit: d(emit) +}; + +base = defineProperties({}, descriptors); + +module.exports = exports = function (o) { + return (o == null) ? create(base) : defineProperties(Object(o), descriptors); +}; +exports.methods = methods; + + +/***/ }), + +/***/ 14053: +/***/ ((module) => { + +var naiveFallback = function () { + if (typeof self === "object" && self) return self; + if (typeof window === "object" && window) return window; + throw new Error("Unable to resolve global `this`"); +}; + +module.exports = (function () { + if (this) return this; + + // Unexpected strict mode (may happen if e.g. bundled into ESM module) + + // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis + // In all ES5+ engines global object inherits from Object.prototype + // (if you approached one that doesn't please report) + try { + Object.defineProperty(Object.prototype, "__global__", { + get: function () { return this; }, + configurable: true + }); + } catch (error) { + // Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze) + return naiveFallback(); + } + try { + // Safari case (window.__global__ is resolved with global context, but __global__ does not) + if (!__global__) return naiveFallback(); + return __global__; + } finally { + delete Object.prototype.__global__; + } +})(); + + +/***/ }), + +/***/ 93407: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(13831)() ? globalThis : __nccwpck_require__(14053); + + +/***/ }), + +/***/ 13831: +/***/ ((module) => { + +"use strict"; + + +module.exports = function () { + if (typeof globalThis !== "object") return false; + if (!globalThis) return false; + return globalThis.Array === Array; +}; + + +/***/ }), + +/***/ 38171: +/***/ ((module) => { + +"use strict"; + + +var hasOwn = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; +var defineProperty = Object.defineProperty; +var gOPD = Object.getOwnPropertyDescriptor; + +var isArray = function isArray(arr) { + if (typeof Array.isArray === 'function') { + return Array.isArray(arr); + } + + return toStr.call(arr) === '[object Array]'; +}; + +var isPlainObject = function isPlainObject(obj) { + if (!obj || toStr.call(obj) !== '[object Object]') { + return false; + } + + var hasOwnConstructor = hasOwn.call(obj, 'constructor'); + var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); + // Not own constructor property must be Object + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + var key; + for (key in obj) { /**/ } + + return typeof key === 'undefined' || hasOwn.call(obj, key); +}; + +// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target +var setProperty = function setProperty(target, options) { + if (defineProperty && options.name === '__proto__') { + defineProperty(target, options.name, { + enumerable: true, + configurable: true, + value: options.newValue, + writable: true + }); + } else { + target[options.name] = options.newValue; + } +}; + +// Return undefined instead of __proto__ if '__proto__' is not an own property +var getProperty = function getProperty(obj, name) { + if (name === '__proto__') { + if (!hasOwn.call(obj, name)) { + return void 0; + } else if (gOPD) { + // In early versions of node, obj['__proto__'] is buggy when obj has + // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. + return gOPD(obj, name).value; + } + } + + return obj[name]; +}; + +module.exports = function extend() { + var options, name, src, copy, copyIsArray, clone; + var target = arguments[0]; + var i = 1; + var length = arguments.length; + var deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + if (target == null || (typeof target !== 'object' && typeof target !== 'function')) { + target = {}; + } + + for (; i < length; ++i) { + options = arguments[i]; + // Only deal with non-null/undefined values + if (options != null) { + // Extend the base object + for (name in options) { + src = getProperty(target, name); + copy = getProperty(options, name); + + // Prevent never-ending loop + if (target !== copy) { + // Recurse if we're merging plain objects or arrays + if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + } else { + clone = src && isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); + + // Don't bring in undefined values + } else if (typeof copy !== 'undefined') { + setProperty(target, { name: name, newValue: copy }); + } + } + } + } + } + + // Return the modified object + return target; +}; + + +/***/ }), + +/***/ 35152: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +//parse Empty Node as self closing node +const buildOptions = __nccwpck_require__(38280).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__(38280).buildOptions; + +const convert2nimn = function(node, e_schema, options) { + options = buildOptions(options, x2j.defaultOptions, x2j.props); + return _e(node, e_schema, options); +}; + +exports.convert2nimn = convert2nimn; + + +/***/ }), + +/***/ 88270: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const util = __nccwpck_require__(38280); + +const convertToJson = function(node, options) { + 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 : ''; + } else { + //otherwise create a textnode if node has some text + if (util.isExist(node.val)) { + if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { + if(options.arrayMode === "strict"){ + jObj[options.textNodeName] = [ node.val ]; + }else{ + jObj[options.textNodeName] = node.val; + } + } + } + } + + util.merge(jObj, node.attrsMap, options.arrayMode); + + 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]) { + if (node.child[tagname].hasOwnProperty(tag)){ + jObj[tagname].push(convertToJson(node.child[tagname][tag], options));} + } + } else { + if(options.arrayMode === true){ + const result = convertToJson(node.child[tagname][0], options) + if(typeof result === 'object') + jObj[tagname] = [ result ]; + else + jObj[tagname] = result; + }else if(options.arrayMode === "strict"){ + jObj[tagname] = [convertToJson(node.child[tagname][0], options) ]; + }else{ + jObj[tagname] = convertToJson(node.child[tagname][0], options); + } + } + } + + //add value + return jObj; +}; + +exports.convertToJson = convertToJson; + + +/***/ }), + +/***/ 16014: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const util = __nccwpck_require__(38280); +const buildOptions = __nccwpck_require__(38280).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; + + +/***/ }), + +/***/ 27448: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const nodeToJson = __nccwpck_require__(88270); +const xmlToNodeobj = __nccwpck_require__(6712); +const x2xmlnode = __nccwpck_require__(6712); +const buildOptions = __nccwpck_require__(38280).buildOptions; +const validator = __nccwpck_require__(61739); + +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__(41901).convert2nimn; +exports.getTraversalObj = xmlToNodeobj.getTraversalObj; +exports.convertToJson = nodeToJson.convertToJson; +exports.convertToJsonString = __nccwpck_require__(16014).convertToJsonString; +exports.validate = validator.validate; +exports.j2xParser = __nccwpck_require__(35152); +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 + "},") + } +} + +/***/ }), + +/***/ 38280: +/***/ ((__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; +}; + +exports.isName = isName; +exports.getAllMatches = getAllMatches; +exports.nameRegexp = nameRegexp; + + +/***/ }), + +/***/ 61739: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const util = __nccwpck_require__(38280); + +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] === '<') { + //starting of tag + //read until you reach to '>' avoiding any '>' in attribute value + + i++; + if (xmlData[i] === '?') { + i = readPI(xmlData, ++i); + if (i.err) { + return i; + } + } else 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 { + 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; +} + + +/***/ }), + +/***/ 49539: +/***/ ((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__(38280); +const buildOptions = __nccwpck_require__(38280).buildOptions; +const xmlNode = __nccwpck_require__(49539); +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; + 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); + } + } + + //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){ + 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; + + +/***/ }), + +/***/ 71566: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var fetch = __nccwpck_require__(80467); + +function wrapFetchForNode(fetch) { + // Support schemaless URIs on the server for parity with the browser. + // https://github.com/matthew-andrews/isomorphic-fetch/pull/10 + return function (u, options) { + if (typeof u === 'string' && u.slice(0, 2) === '//') { + return fetch('https:' + u, options); + } + + return fetch(u, options); + }; +} + +module.exports = function (context) { + // Support webpack module import weirdness. + var fetchFn = fetch.default ? fetch.default : fetch; + + // This modifies the global `node-fetch` object, which isn't great, since + // different callers to `fetch-ponyfill` which pass a different Promise + // implementation would each expect to have their implementation used. But, + // given the way `node-fetch` is implemented, this is the only way to make + // it work at all. + if (context && context.Promise) { + fetchFn.Promise = context.Promise; + } + + return { + fetch: wrapFetchForNode(fetchFn), + Headers: fetch.Headers, + Request: fetch.Request, + Response: fetch.Response + }; +}; + + +/***/ }), + +/***/ 46863: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = realpath +realpath.realpath = realpath +realpath.sync = realpathSync +realpath.realpathSync = realpathSync +realpath.monkeypatch = monkeypatch +realpath.unmonkeypatch = unmonkeypatch + +var fs = __nccwpck_require__(35747) +var origRealpath = fs.realpath +var origRealpathSync = fs.realpathSync + +var version = process.version +var ok = /^v[0-5]\./.test(version) +var old = __nccwpck_require__(71734) + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache + cache = null + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb) + } else { + cb(er, result) + } + }) +} + +function realpathSync (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs.realpath = realpath + fs.realpathSync = realpathSync +} + +function unmonkeypatch () { + fs.realpath = origRealpath + fs.realpathSync = origRealpathSync +} + + +/***/ }), + +/***/ 71734: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var pathModule = __nccwpck_require__(85622); +var isWindows = process.platform === 'win32'; +var fs = __nccwpck_require__(35747); + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = pathModule.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); + + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; + + +/***/ }), + +/***/ 21144: +/***/ ((module) => { + +"use strict"; + + +/* ! + * Chai - getFuncName utility + * Copyright(c) 2012-2016 Jake Luer + * MIT Licensed + */ + +/** + * ### .getFuncName(constructorFn) + * + * Returns the name of a function. + * When a non-function instance is passed, returns `null`. + * This also includes a polyfill function if `aFunc.name` is not defined. + * + * @name getFuncName + * @param {Function} funct + * @namespace Utils + * @api public + */ + +var toString = Function.prototype.toString; +var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/; +function getFuncName(aFunc) { + if (typeof aFunc !== 'function') { + return null; + } + + var name = ''; + if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') { + // Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined + var match = toString.call(aFunc).match(functionNameMatch); + if (match) { + name = match[1]; + } + } else { + // If we've got a `name` property we just use it + name = aFunc.name; + } + + return name; +} + +module.exports = getFuncName; + + +/***/ }), + +/***/ 66431: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__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."); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var AstNode_1 = __importDefault(__nccwpck_require__(26901)); +var cucumber_messages_1 = __nccwpck_require__(56106); +var Parser_1 = __nccwpck_require__(73332); +var Errors_1 = __nccwpck_require__(79259); +var createLocation_1 = __importDefault(__nccwpck_require__(27134)); +var AstBuilder = /** @class */ (function () { + function AstBuilder(newId) { + this.newId = newId; + if (!newId) { + throw new Error('No newId'); + } + this.reset(); + } + AstBuilder.prototype.reset = function () { + this.stack = [new AstNode_1.default(Parser_1.RuleType.None)]; + this.comments = []; + }; + AstBuilder.prototype.startRule = function (ruleType) { + this.stack.push(new AstNode_1.default(ruleType)); + }; + AstBuilder.prototype.endRule = function (ruleType) { + var node = this.stack.pop(); + var transformedNode = this.transformNode(node); + this.currentNode().add(node.ruleType, transformedNode); + }; + AstBuilder.prototype.build = function (token) { + if (token.matchedType === Parser_1.TokenType.Comment) { + this.comments.push(cucumber_messages_1.messages.GherkinDocument.Comment.create({ + location: this.getLocation(token), + text: token.matchedText, + })); + } + else { + this.currentNode().add(token.matchedType, token); + } + }; + AstBuilder.prototype.getResult = function () { + return this.currentNode().getSingle(Parser_1.RuleType.GherkinDocument); + }; + AstBuilder.prototype.currentNode = function () { + return this.stack[this.stack.length - 1]; + }; + AstBuilder.prototype.getLocation = function (token, column) { + return !column + ? token.location + : createLocation_1.default({ line: token.location.line, column: column }); + }; + AstBuilder.prototype.getTags = function (node) { + var e_1, _a, e_2, _b; + var tags = []; + var tagsNode = node.getSingle(Parser_1.RuleType.Tags); + if (!tagsNode) { + return tags; + } + var tokens = tagsNode.getTokens(Parser_1.TokenType.TagLine); + try { + for (var tokens_1 = __values(tokens), tokens_1_1 = tokens_1.next(); !tokens_1_1.done; tokens_1_1 = tokens_1.next()) { + var token = tokens_1_1.value; + try { + for (var _c = (e_2 = void 0, __values(token.matchedItems)), _d = _c.next(); !_d.done; _d = _c.next()) { + var tagItem = _d.value; + tags.push(cucumber_messages_1.messages.GherkinDocument.Feature.Tag.create({ + location: this.getLocation(token, tagItem.column), + name: tagItem.text, + id: this.newId(), + })); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_d && !_d.done && (_b = _c.return)) _b.call(_c); + } + finally { if (e_2) throw e_2.error; } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (tokens_1_1 && !tokens_1_1.done && (_a = tokens_1.return)) _a.call(tokens_1); + } + finally { if (e_1) throw e_1.error; } + } + return tags; + }; + AstBuilder.prototype.getCells = function (tableRowToken) { + var _this = this; + return tableRowToken.matchedItems.map(function (cellItem) { + return cucumber_messages_1.messages.GherkinDocument.Feature.TableRow.TableCell.create({ + location: _this.getLocation(tableRowToken, cellItem.column), + value: cellItem.text, + }); + }); + }; + AstBuilder.prototype.getDescription = function (node) { + return node.getSingle(Parser_1.RuleType.Description); + }; + AstBuilder.prototype.getSteps = function (node) { + return node.getItems(Parser_1.RuleType.Step); + }; + AstBuilder.prototype.getTableRows = function (node) { + var _this = this; + var rows = node.getTokens(Parser_1.TokenType.TableRow).map(function (token) { + return cucumber_messages_1.messages.GherkinDocument.Feature.TableRow.create({ + id: _this.newId(), + location: _this.getLocation(token), + cells: _this.getCells(token), + }); + }); + this.ensureCellCount(rows); + return rows; + }; + AstBuilder.prototype.ensureCellCount = function (rows) { + if (rows.length === 0) { + return; + } + var cellCount = rows[0].cells.length; + rows.forEach(function (row) { + if (row.cells.length !== cellCount) { + throw Errors_1.AstBuilderException.create('inconsistent cell count within the table', row.location); + } + }); + }; + AstBuilder.prototype.transformNode = function (node) { + var e_3, _a, e_4, _b, e_5, _c; + switch (node.ruleType) { + case Parser_1.RuleType.Step: { + var stepLine = node.getToken(Parser_1.TokenType.StepLine); + var dataTable = node.getSingle(Parser_1.RuleType.DataTable); + var docString = node.getSingle(Parser_1.RuleType.DocString); + return cucumber_messages_1.messages.GherkinDocument.Feature.Step.create({ + id: this.newId(), + location: this.getLocation(stepLine), + keyword: stepLine.matchedKeyword, + text: stepLine.matchedText, + dataTable: dataTable, + docString: docString, + }); + } + case Parser_1.RuleType.DocString: { + var separatorToken = node.getTokens(Parser_1.TokenType.DocStringSeparator)[0]; + var contentType = separatorToken.matchedText.length > 0 + ? separatorToken.matchedText + : undefined; + var lineTokens = node.getTokens(Parser_1.TokenType.Other); + var content = lineTokens.map(function (t) { return t.matchedText; }).join('\n'); + var result = cucumber_messages_1.messages.GherkinDocument.Feature.Step.DocString.create({ + location: this.getLocation(separatorToken), + content: content, + delimiter: separatorToken.line.trimmedLineText.substring(0, 3), + }); + // conditionally add this like this (needed to make tests pass on node 0.10 as well as 4.0) + if (contentType) { + result.contentType = contentType; + } + return result; + } + case Parser_1.RuleType.DataTable: { + var rows = this.getTableRows(node); + return cucumber_messages_1.messages.GherkinDocument.Feature.Step.DataTable.create({ + location: rows[0].location, + rows: rows, + }); + } + case Parser_1.RuleType.Background: { + var backgroundLine = node.getToken(Parser_1.TokenType.BackgroundLine); + var description = this.getDescription(node); + var steps = this.getSteps(node); + return cucumber_messages_1.messages.GherkinDocument.Feature.Background.create({ + location: this.getLocation(backgroundLine), + keyword: backgroundLine.matchedKeyword, + name: backgroundLine.matchedText, + description: description, + steps: steps, + }); + } + case Parser_1.RuleType.ScenarioDefinition: { + var tags = this.getTags(node); + var scenarioNode = node.getSingle(Parser_1.RuleType.Scenario); + var scenarioLine = scenarioNode.getToken(Parser_1.TokenType.ScenarioLine); + var description = this.getDescription(scenarioNode); + var steps = this.getSteps(scenarioNode); + var examples = scenarioNode.getItems(Parser_1.RuleType.ExamplesDefinition); + return cucumber_messages_1.messages.GherkinDocument.Feature.Scenario.create({ + id: this.newId(), + tags: tags, + location: this.getLocation(scenarioLine), + keyword: scenarioLine.matchedKeyword, + name: scenarioLine.matchedText, + description: description, + steps: steps, + examples: examples, + }); + } + case Parser_1.RuleType.ExamplesDefinition: { + var tags = this.getTags(node); + var examplesNode = node.getSingle(Parser_1.RuleType.Examples); + var examplesLine = examplesNode.getToken(Parser_1.TokenType.ExamplesLine); + var description = this.getDescription(examplesNode); + var exampleTable = examplesNode.getSingle(Parser_1.RuleType.ExamplesTable); + return cucumber_messages_1.messages.GherkinDocument.Feature.Scenario.Examples.create({ + tags: tags, + location: this.getLocation(examplesLine), + keyword: examplesLine.matchedKeyword, + name: examplesLine.matchedText, + description: description, + tableHeader: exampleTable !== undefined ? exampleTable[0] : undefined, + tableBody: exampleTable !== undefined ? exampleTable.slice(1) : undefined, + }); + } + case Parser_1.RuleType.ExamplesTable: { + return this.getTableRows(node); + } + case Parser_1.RuleType.Description: { + var lineTokens = node.getTokens(Parser_1.TokenType.Other); + // Trim trailing empty lines + var end = lineTokens.length; + while (end > 0 && lineTokens[end - 1].line.trimmedLineText === '') { + end--; + } + lineTokens = lineTokens.slice(0, end); + return lineTokens.map(function (token) { return token.matchedText; }).join('\n'); + } + case Parser_1.RuleType.Feature: { + var header = node.getSingle(Parser_1.RuleType.FeatureHeader); + if (!header) { + return null; + } + var tags = this.getTags(header); + var featureLine = header.getToken(Parser_1.TokenType.FeatureLine); + if (!featureLine) { + return null; + } + var children = []; + var background = node.getSingle(Parser_1.RuleType.Background); + if (background) { + children.push(cucumber_messages_1.messages.GherkinDocument.Feature.FeatureChild.create({ + background: background, + })); + } + try { + for (var _d = __values(node.getItems(Parser_1.RuleType.ScenarioDefinition)), _e = _d.next(); !_e.done; _e = _d.next()) { + var scenario = _e.value; + children.push(cucumber_messages_1.messages.GherkinDocument.Feature.FeatureChild.create({ + scenario: scenario, + })); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_e && !_e.done && (_a = _d.return)) _a.call(_d); + } + finally { if (e_3) throw e_3.error; } + } + try { + for (var _f = __values(node.getItems(Parser_1.RuleType.Rule)), _g = _f.next(); !_g.done; _g = _f.next()) { + var rule = _g.value; + children.push(cucumber_messages_1.messages.GherkinDocument.Feature.FeatureChild.create({ + rule: rule, + })); + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_g && !_g.done && (_b = _f.return)) _b.call(_f); + } + finally { if (e_4) throw e_4.error; } + } + var description = this.getDescription(header); + var language = featureLine.matchedGherkinDialect; + return cucumber_messages_1.messages.GherkinDocument.Feature.create({ + tags: tags, + location: this.getLocation(featureLine), + language: language, + keyword: featureLine.matchedKeyword, + name: featureLine.matchedText, + description: description, + children: children, + }); + } + case Parser_1.RuleType.Rule: { + var header = node.getSingle(Parser_1.RuleType.RuleHeader); + if (!header) { + return null; + } + var ruleLine = header.getToken(Parser_1.TokenType.RuleLine); + if (!ruleLine) { + return null; + } + var children = []; + var background = node.getSingle(Parser_1.RuleType.Background); + if (background) { + children.push(cucumber_messages_1.messages.GherkinDocument.Feature.FeatureChild.create({ + background: background, + })); + } + try { + for (var _h = __values(node.getItems(Parser_1.RuleType.ScenarioDefinition)), _j = _h.next(); !_j.done; _j = _h.next()) { + var scenario = _j.value; + children.push(cucumber_messages_1.messages.GherkinDocument.Feature.FeatureChild.create({ + scenario: scenario, + })); + } + } + catch (e_5_1) { e_5 = { error: e_5_1 }; } + finally { + try { + if (_j && !_j.done && (_c = _h.return)) _c.call(_h); + } + finally { if (e_5) throw e_5.error; } + } + var description = this.getDescription(header); + return cucumber_messages_1.messages.GherkinDocument.Feature.FeatureChild.Rule.create({ + location: this.getLocation(ruleLine), + keyword: ruleLine.matchedKeyword, + name: ruleLine.matchedText, + description: description, + children: children, + }); + } + case Parser_1.RuleType.GherkinDocument: { + var feature = node.getSingle(Parser_1.RuleType.Feature); + return cucumber_messages_1.messages.GherkinDocument.create({ + feature: feature, + comments: this.comments, + }); + } + default: + return node; + } + }; + return AstBuilder; +}()); +exports.default = AstBuilder; +//# sourceMappingURL=AstBuilder.js.map + +/***/ }), + +/***/ 26901: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var AstNode = /** @class */ (function () { + function AstNode(ruleType) { + this.ruleType = ruleType; + this.subItems = new Map(); + } + AstNode.prototype.add = function (type, obj) { + var items = this.subItems.get(type); + if (items === undefined) { + items = []; + this.subItems.set(type, items); + } + items.push(obj); + }; + AstNode.prototype.getSingle = function (ruleType) { + return (this.subItems.get(ruleType) || [])[0]; + }; + AstNode.prototype.getItems = function (ruleType) { + return this.subItems.get(ruleType) || []; + }; + AstNode.prototype.getToken = function (tokenType) { + return (this.subItems.get(tokenType) || [])[0]; + }; + AstNode.prototype.getTokens = function (tokenType) { + return this.subItems.get(tokenType) || []; + }; + return AstNode; +}()); +exports.default = AstNode; +//# sourceMappingURL=AstNode.js.map + +/***/ }), + +/***/ 79259: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var createLocation_1 = __importDefault(__nccwpck_require__(27134)); +var GherkinException = /** @class */ (function (_super) { + __extends(GherkinException, _super); + function GherkinException(message) { + var _newTarget = this.constructor; + var _this = _super.call(this, message) || this; + var actualProto = _newTarget.prototype; + // https://stackoverflow.com/questions/41102060/typescript-extending-error-class + if (Object.setPrototypeOf) { + Object.setPrototypeOf(_this, actualProto); + } + else { + // @ts-ignore + _this.__proto__ = actualProto; + } + return _this; + } + GherkinException._create = function (location, message) { + var column = location.column || 0; + var m = "(" + location.line + ":" + column + "): " + message; + var err = new this(m); + err.location = location; + return err; + }; + return GherkinException; +}(Error)); +var ParserException = /** @class */ (function (_super) { + __extends(ParserException, _super); + function ParserException() { + return _super !== null && _super.apply(this, arguments) || this; + } + return ParserException; +}(GherkinException)); +exports.ParserException = ParserException; +var CompositeParserException = /** @class */ (function (_super) { + __extends(CompositeParserException, _super); + function CompositeParserException() { + return _super !== null && _super.apply(this, arguments) || this; + } + CompositeParserException.create = function (errors) { + var message = 'Parser errors:\n' + errors.map(function (e) { return e.message; }).join('\n'); + var err = new this(message); + err.errors = errors; + return err; + }; + return CompositeParserException; +}(GherkinException)); +exports.CompositeParserException = CompositeParserException; +var UnexpectedTokenException = /** @class */ (function (_super) { + __extends(UnexpectedTokenException, _super); + function UnexpectedTokenException() { + return _super !== null && _super.apply(this, arguments) || this; + } + UnexpectedTokenException.create = function (token, expectedTokenTypes, stateComment) { + var message = "expected: " + expectedTokenTypes.join(', ') + ", got '" + token.getTokenValue().trim() + "'"; + var location = tokenLocation(token); + return this._create(location, message); + }; + return UnexpectedTokenException; +}(GherkinException)); +exports.UnexpectedTokenException = UnexpectedTokenException; +var UnexpectedEOFException = /** @class */ (function (_super) { + __extends(UnexpectedEOFException, _super); + function UnexpectedEOFException() { + return _super !== null && _super.apply(this, arguments) || this; + } + UnexpectedEOFException.create = function (token, expectedTokenTypes, stateComment) { + var message = "unexpected end of file, expected: " + expectedTokenTypes.join(', '); + var location = tokenLocation(token); + return this._create(location, message); + }; + return UnexpectedEOFException; +}(GherkinException)); +exports.UnexpectedEOFException = UnexpectedEOFException; +var AstBuilderException = /** @class */ (function (_super) { + __extends(AstBuilderException, _super); + function AstBuilderException() { + return _super !== null && _super.apply(this, arguments) || this; + } + AstBuilderException.create = function (message, location) { + return this._create(location, message); + }; + return AstBuilderException; +}(GherkinException)); +exports.AstBuilderException = AstBuilderException; +var NoSuchLanguageException = /** @class */ (function (_super) { + __extends(NoSuchLanguageException, _super); + function NoSuchLanguageException() { + return _super !== null && _super.apply(this, arguments) || this; + } + NoSuchLanguageException.create = function (language, location) { + var message = 'Language not supported: ' + language; + return this._create(location, message); + }; + return NoSuchLanguageException; +}(GherkinException)); +exports.NoSuchLanguageException = NoSuchLanguageException; +function tokenLocation(token) { + return token.location && + token.location.line && + token.line && + token.line.indent !== undefined + ? createLocation_1.default({ + line: token.location.line, + column: token.line.indent + 1, + }) + : token.location; +} +//# sourceMappingURL=Errors.js.map + +/***/ }), + +/***/ 73715: +/***/ (function(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 countSymbols_1 = __importDefault(__nccwpck_require__(58462)); +var GherkinLine = /** @class */ (function () { + function GherkinLine(lineText, lineNumber) { + this.lineText = lineText; + this.lineNumber = lineNumber; + this.trimmedLineText = lineText.replace(/^\s+/g, ''); // ltrim + this.isEmpty = this.trimmedLineText.length === 0; + this.indent = countSymbols_1.default(lineText) - countSymbols_1.default(this.trimmedLineText); + } + GherkinLine.prototype.startsWith = function (prefix) { + return this.trimmedLineText.indexOf(prefix) === 0; + }; + GherkinLine.prototype.startsWithTitleKeyword = function (keyword) { + return this.startsWith(keyword + ':'); // The C# impl is more complicated. Find out why. + }; + GherkinLine.prototype.getLineText = function (indentToRemove) { + if (indentToRemove < 0 || indentToRemove > this.indent) { + return this.trimmedLineText; + } + else { + return this.lineText.substring(indentToRemove); + } + }; + GherkinLine.prototype.getRestTrimmed = function (length) { + return this.trimmedLineText.substring(length).trim(); + }; + GherkinLine.prototype.getTableCells = function () { + var cells = []; + var col = 0; + var startCol = col + 1; + var cell = ''; + var firstCell = true; + while (col < this.trimmedLineText.length) { + var chr = this.trimmedLineText[col]; + col++; + if (chr === '|') { + if (firstCell) { + // First cell (content before the first |) is skipped + firstCell = false; + } + else { + var cellIndent = cell.length - cell.replace(/^\s+/g, '').length; + var span = { + column: this.indent + startCol + cellIndent, + text: cell.trim(), + }; + cells.push(span); + } + cell = ''; + startCol = col + 1; + } + else if (chr === '\\') { + chr = this.trimmedLineText[col]; + col += 1; + if (chr === 'n') { + cell += '\n'; + } + else { + if (chr !== '|' && chr !== '\\') { + cell += '\\'; + } + cell += chr; + } + } + else { + cell += chr; + } + } + return cells; + }; + GherkinLine.prototype.getTags = function () { + var column = this.indent + 1; + var items = this.trimmedLineText.trim().split('@'); + items.shift(); + return items.map(function (item) { + var length = item.length; + var span = { column: column, text: '@' + item.trim() }; + column += length + 1; + return span; + }); + }; + return GherkinLine; +}()); +exports.default = GherkinLine; +module.exports = GherkinLine; +//# sourceMappingURL=GherkinLine.js.map + +/***/ }), + +/***/ 73332: +/***/ (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 })); +// This file is generated. Do not edit! Edit gherkin-javascript.razor instead. +var Errors_1 = __nccwpck_require__(79259); +var TokenScanner_1 = __importDefault(__nccwpck_require__(976)); +var TokenMatcher_1 = __importDefault(__nccwpck_require__(62402)); +var TokenType; +(function (TokenType) { + TokenType[TokenType["None"] = 0] = "None"; + TokenType[TokenType["EOF"] = 1] = "EOF"; + TokenType[TokenType["Empty"] = 2] = "Empty"; + TokenType[TokenType["Comment"] = 3] = "Comment"; + TokenType[TokenType["TagLine"] = 4] = "TagLine"; + TokenType[TokenType["FeatureLine"] = 5] = "FeatureLine"; + TokenType[TokenType["RuleLine"] = 6] = "RuleLine"; + TokenType[TokenType["BackgroundLine"] = 7] = "BackgroundLine"; + TokenType[TokenType["ScenarioLine"] = 8] = "ScenarioLine"; + TokenType[TokenType["ExamplesLine"] = 9] = "ExamplesLine"; + TokenType[TokenType["StepLine"] = 10] = "StepLine"; + TokenType[TokenType["DocStringSeparator"] = 11] = "DocStringSeparator"; + TokenType[TokenType["TableRow"] = 12] = "TableRow"; + TokenType[TokenType["Language"] = 13] = "Language"; + TokenType[TokenType["Other"] = 14] = "Other"; +})(TokenType = exports.TokenType || (exports.TokenType = {})); +var RuleType; +(function (RuleType) { + RuleType[RuleType["None"] = 0] = "None"; + RuleType[RuleType["_EOF"] = 1] = "_EOF"; + RuleType[RuleType["_Empty"] = 2] = "_Empty"; + RuleType[RuleType["_Comment"] = 3] = "_Comment"; + RuleType[RuleType["_TagLine"] = 4] = "_TagLine"; + RuleType[RuleType["_FeatureLine"] = 5] = "_FeatureLine"; + RuleType[RuleType["_RuleLine"] = 6] = "_RuleLine"; + RuleType[RuleType["_BackgroundLine"] = 7] = "_BackgroundLine"; + RuleType[RuleType["_ScenarioLine"] = 8] = "_ScenarioLine"; + RuleType[RuleType["_ExamplesLine"] = 9] = "_ExamplesLine"; + RuleType[RuleType["_StepLine"] = 10] = "_StepLine"; + RuleType[RuleType["_DocStringSeparator"] = 11] = "_DocStringSeparator"; + RuleType[RuleType["_TableRow"] = 12] = "_TableRow"; + RuleType[RuleType["_Language"] = 13] = "_Language"; + RuleType[RuleType["_Other"] = 14] = "_Other"; + RuleType[RuleType["GherkinDocument"] = 15] = "GherkinDocument"; + RuleType[RuleType["Feature"] = 16] = "Feature"; + RuleType[RuleType["FeatureHeader"] = 17] = "FeatureHeader"; + RuleType[RuleType["Rule"] = 18] = "Rule"; + RuleType[RuleType["RuleHeader"] = 19] = "RuleHeader"; + RuleType[RuleType["Background"] = 20] = "Background"; + RuleType[RuleType["ScenarioDefinition"] = 21] = "ScenarioDefinition"; + RuleType[RuleType["Scenario"] = 22] = "Scenario"; + RuleType[RuleType["ExamplesDefinition"] = 23] = "ExamplesDefinition"; + RuleType[RuleType["Examples"] = 24] = "Examples"; + RuleType[RuleType["ExamplesTable"] = 25] = "ExamplesTable"; + RuleType[RuleType["Step"] = 26] = "Step"; + RuleType[RuleType["StepArg"] = 27] = "StepArg"; + RuleType[RuleType["DataTable"] = 28] = "DataTable"; + RuleType[RuleType["DocString"] = 29] = "DocString"; + RuleType[RuleType["Tags"] = 30] = "Tags"; + RuleType[RuleType["DescriptionHelper"] = 31] = "DescriptionHelper"; + RuleType[RuleType["Description"] = 32] = "Description"; +})(RuleType = exports.RuleType || (exports.RuleType = {})); +var Parser = /** @class */ (function () { + function Parser(builder) { + this.builder = builder; + this.stopAtFirstError = false; + } + Parser.prototype.parse = function (tokenScanner, tokenMatcher) { + if (tokenMatcher === void 0) { tokenMatcher = new TokenMatcher_1.default(); } + if (typeof tokenScanner === 'string') { + tokenScanner = new TokenScanner_1.default(tokenScanner); + } + this.builder.reset(); + tokenMatcher.reset(); + this.context = { + tokenScanner: tokenScanner, + tokenMatcher: tokenMatcher, + tokenQueue: [], + errors: [], + }; + this.startRule(this.context, RuleType.GherkinDocument); + var state = 0; + var token = null; + while (true) { + token = this.readToken(this.context); + state = this.matchToken(state, token, this.context); + if (token.isEof) { + break; + } + } + this.endRule(this.context, RuleType.GherkinDocument); + if (this.context.errors.length > 0) { + throw Errors_1.CompositeParserException.create(this.context.errors); + } + return this.getResult(); + }; + Parser.prototype.addError = function (context, error) { + context.errors.push(error); + if (context.errors.length > 10) { + throw Errors_1.CompositeParserException.create(context.errors); + } + }; + Parser.prototype.startRule = function (context, ruleType) { + var _this = this; + this.handleAstError(context, function () { return _this.builder.startRule(ruleType); }); + }; + Parser.prototype.endRule = function (context, ruleType) { + var _this = this; + this.handleAstError(context, function () { return _this.builder.endRule(ruleType); }); + }; + Parser.prototype.build = function (context, token) { + var _this = this; + this.handleAstError(context, function () { return _this.builder.build(token); }); + }; + Parser.prototype.getResult = function () { + return this.builder.getResult(); + }; + Parser.prototype.handleAstError = function (context, action) { + this.handleExternalError(context, true, action); + }; + Parser.prototype.handleExternalError = function (context, defaultValue, action) { + var _this = this; + if (this.stopAtFirstError) { + return action(); + } + try { + return action(); + } + catch (e) { + if (e instanceof Errors_1.CompositeParserException) { + e.errors.forEach(function (error) { return _this.addError(context, error); }); + } + else if (e instanceof Errors_1.ParserException || + e instanceof Errors_1.AstBuilderException || + e instanceof Errors_1.UnexpectedTokenException || + e instanceof Errors_1.NoSuchLanguageException) { + this.addError(context, e); + } + else { + throw e; + } + } + return defaultValue; + }; + Parser.prototype.readToken = function (context) { + return context.tokenQueue.length > 0 + ? context.tokenQueue.shift() + : context.tokenScanner.read(); + }; + Parser.prototype.matchToken = function (state, token, context) { + switch (state) { + case 0: + return this.matchTokenAt_0(token, context); + case 1: + return this.matchTokenAt_1(token, context); + case 2: + return this.matchTokenAt_2(token, context); + case 3: + return this.matchTokenAt_3(token, context); + case 4: + return this.matchTokenAt_4(token, context); + case 5: + return this.matchTokenAt_5(token, context); + case 6: + return this.matchTokenAt_6(token, context); + case 7: + return this.matchTokenAt_7(token, context); + case 8: + return this.matchTokenAt_8(token, context); + case 9: + return this.matchTokenAt_9(token, context); + case 10: + return this.matchTokenAt_10(token, context); + case 11: + return this.matchTokenAt_11(token, context); + case 12: + return this.matchTokenAt_12(token, context); + case 13: + return this.matchTokenAt_13(token, context); + case 14: + return this.matchTokenAt_14(token, context); + case 15: + return this.matchTokenAt_15(token, context); + case 16: + return this.matchTokenAt_16(token, context); + case 17: + return this.matchTokenAt_17(token, context); + case 18: + return this.matchTokenAt_18(token, context); + case 19: + return this.matchTokenAt_19(token, context); + case 20: + return this.matchTokenAt_20(token, context); + case 21: + return this.matchTokenAt_21(token, context); + case 22: + return this.matchTokenAt_22(token, context); + case 23: + return this.matchTokenAt_23(token, context); + case 24: + return this.matchTokenAt_24(token, context); + case 25: + return this.matchTokenAt_25(token, context); + case 26: + return this.matchTokenAt_26(token, context); + case 27: + return this.matchTokenAt_27(token, context); + case 28: + return this.matchTokenAt_28(token, context); + case 29: + return this.matchTokenAt_29(token, context); + case 30: + return this.matchTokenAt_30(token, context); + case 31: + return this.matchTokenAt_31(token, context); + case 32: + return this.matchTokenAt_32(token, context); + case 33: + return this.matchTokenAt_33(token, context); + case 34: + return this.matchTokenAt_34(token, context); + case 35: + return this.matchTokenAt_35(token, context); + case 36: + return this.matchTokenAt_36(token, context); + case 37: + return this.matchTokenAt_37(token, context); + case 38: + return this.matchTokenAt_38(token, context); + case 39: + return this.matchTokenAt_39(token, context); + case 40: + return this.matchTokenAt_40(token, context); + case 42: + return this.matchTokenAt_42(token, context); + case 43: + return this.matchTokenAt_43(token, context); + case 44: + return this.matchTokenAt_44(token, context); + case 45: + return this.matchTokenAt_45(token, context); + case 46: + return this.matchTokenAt_46(token, context); + case 47: + return this.matchTokenAt_47(token, context); + case 48: + return this.matchTokenAt_48(token, context); + case 49: + return this.matchTokenAt_49(token, context); + default: + throw new Error('Unknown state: ' + state); + } + }; + // Start + Parser.prototype.matchTokenAt_0 = function (token, context) { + if (this.match_EOF(context, token)) { + this.build(context, token); + return 41; + } + if (this.match_Language(context, token)) { + this.startRule(context, RuleType.Feature); + this.startRule(context, RuleType.FeatureHeader); + this.build(context, token); + return 1; + } + if (this.match_TagLine(context, token)) { + this.startRule(context, RuleType.Feature); + this.startRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 2; + } + if (this.match_FeatureLine(context, token)) { + this.startRule(context, RuleType.Feature); + this.startRule(context, RuleType.FeatureHeader); + this.build(context, token); + return 3; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 0; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 0; + } + var stateComment = 'State: 0 - Start'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Language', + '#TagLine', + '#FeatureLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 0; + }; + // GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0 + Parser.prototype.matchTokenAt_1 = function (token, context) { + if (this.match_TagLine(context, token)) { + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 2; + } + if (this.match_FeatureLine(context, token)) { + this.build(context, token); + return 3; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 1; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 1; + } + var stateComment = 'State: 1 - GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0'; + token.detach(); + var expectedTokens = ['#TagLine', '#FeatureLine', '#Comment', '#Empty']; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 1; + }; + // GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0 + Parser.prototype.matchTokenAt_2 = function (token, context) { + if (this.match_TagLine(context, token)) { + this.build(context, token); + return 2; + } + if (this.match_FeatureLine(context, token)) { + this.endRule(context, RuleType.Tags); + this.build(context, token); + return 3; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 2; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 2; + } + var stateComment = 'State: 2 - GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0'; + token.detach(); + var expectedTokens = ['#TagLine', '#FeatureLine', '#Comment', '#Empty']; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 2; + }; + // GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0 + Parser.prototype.matchTokenAt_3 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.FeatureHeader); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 3; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 5; + } + if (this.match_BackgroundLine(context, token)) { + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.Background); + this.build(context, token); + return 6; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.startRule(context, RuleType.Description); + this.build(context, token); + return 4; + } + var stateComment = 'State: 3 - GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Empty', + '#Comment', + '#BackgroundLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 3; + }; + // GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0 + Parser.prototype.matchTokenAt_4 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.FeatureHeader); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.endRule(context, RuleType.Description); + this.build(context, token); + return 5; + } + if (this.match_BackgroundLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.Background); + this.build(context, token); + return 6; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 4; + } + var stateComment = 'State: 4 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#BackgroundLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 4; + }; + // GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0 + Parser.prototype.matchTokenAt_5 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.FeatureHeader); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 5; + } + if (this.match_BackgroundLine(context, token)) { + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.Background); + this.build(context, token); + return 6; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.FeatureHeader); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 5; + } + var stateComment = 'State: 5 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#BackgroundLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 5; + }; + // GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0 + Parser.prototype.matchTokenAt_6 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 6; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 8; + } + if (this.match_StepLine(context, token)) { + this.startRule(context, RuleType.Step); + this.build(context, token); + return 9; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.startRule(context, RuleType.Description); + this.build(context, token); + return 7; + } + var stateComment = 'State: 6 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Empty', + '#Comment', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 6; + }; + // GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0 + Parser.prototype.matchTokenAt_7 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.endRule(context, RuleType.Description); + this.build(context, token); + return 8; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.Description); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 9; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 7; + } + var stateComment = 'State: 7 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 7; + }; + // GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0 + Parser.prototype.matchTokenAt_8 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 8; + } + if (this.match_StepLine(context, token)) { + this.startRule(context, RuleType.Step); + this.build(context, token); + return 9; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 8; + } + var stateComment = 'State: 8 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 8; + }; + // GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0 + Parser.prototype.matchTokenAt_9 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_TableRow(context, token)) { + this.startRule(context, RuleType.DataTable); + this.build(context, token); + return 10; + } + if (this.match_DocStringSeparator(context, token)) { + this.startRule(context, RuleType.DocString); + this.build(context, token); + return 48; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 9; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 9; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 9; + } + var stateComment = 'State: 9 - GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#TableRow', + '#DocStringSeparator', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 9; + }; + // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0 + Parser.prototype.matchTokenAt_10 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_TableRow(context, token)) { + this.build(context, token); + return 10; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 9; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 10; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 10; + } + var stateComment = 'State: 10 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#TableRow', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 10; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0 + Parser.prototype.matchTokenAt_11 = function (token, context) { + if (this.match_TagLine(context, token)) { + this.build(context, token); + return 11; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Tags); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 11; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 11; + } + var stateComment = 'State: 11 - GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0'; + token.detach(); + var expectedTokens = ['#TagLine', '#ScenarioLine', '#Comment', '#Empty']; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 11; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0 + Parser.prototype.matchTokenAt_12 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 12; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 14; + } + if (this.match_StepLine(context, token)) { + this.startRule(context, RuleType.Step); + this.build(context, token); + return 15; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 17; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ExamplesLine(context, token)) { + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.startRule(context, RuleType.Description); + this.build(context, token); + return 13; + } + var stateComment = 'State: 12 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Empty', + '#Comment', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 12; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0 + Parser.prototype.matchTokenAt_13 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.endRule(context, RuleType.Description); + this.build(context, token); + return 14; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.Description); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 15; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.Description); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 17; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Description); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 13; + } + var stateComment = 'State: 13 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 13; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0 + Parser.prototype.matchTokenAt_14 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 14; + } + if (this.match_StepLine(context, token)) { + this.startRule(context, RuleType.Step); + this.build(context, token); + return 15; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 17; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ExamplesLine(context, token)) { + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 14; + } + var stateComment = 'State: 14 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 14; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0 + Parser.prototype.matchTokenAt_15 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_TableRow(context, token)) { + this.startRule(context, RuleType.DataTable); + this.build(context, token); + return 16; + } + if (this.match_DocStringSeparator(context, token)) { + this.startRule(context, RuleType.DocString); + this.build(context, token); + return 46; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 15; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 17; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 15; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 15; + } + var stateComment = 'State: 15 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#TableRow', + '#DocStringSeparator', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 15; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0 + Parser.prototype.matchTokenAt_16 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_TableRow(context, token)) { + this.build(context, token); + return 16; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 15; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 17; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 16; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 16; + } + var stateComment = 'State: 16 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#TableRow', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 16; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0 + Parser.prototype.matchTokenAt_17 = function (token, context) { + if (this.match_TagLine(context, token)) { + this.build(context, token); + return 17; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Tags); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 17; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 17; + } + var stateComment = 'State: 17 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0'; + token.detach(); + var expectedTokens = ['#TagLine', '#ExamplesLine', '#Comment', '#Empty']; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 17; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0 + Parser.prototype.matchTokenAt_18 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 18; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 20; + } + if (this.match_TableRow(context, token)) { + this.startRule(context, RuleType.ExamplesTable); + this.build(context, token); + return 21; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 17; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.startRule(context, RuleType.Description); + this.build(context, token); + return 19; + } + var stateComment = 'State: 18 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Empty', + '#Comment', + '#TableRow', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 18; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0 + Parser.prototype.matchTokenAt_19 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.endRule(context, RuleType.Description); + this.build(context, token); + return 20; + } + if (this.match_TableRow(context, token)) { + this.endRule(context, RuleType.Description); + this.startRule(context, RuleType.ExamplesTable); + this.build(context, token); + return 21; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 17; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 19; + } + var stateComment = 'State: 19 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#TableRow', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 19; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0 + Parser.prototype.matchTokenAt_20 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 20; + } + if (this.match_TableRow(context, token)) { + this.startRule(context, RuleType.ExamplesTable); + this.build(context, token); + return 21; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 17; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 20; + } + var stateComment = 'State: 20 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#TableRow', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 20; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0 + Parser.prototype.matchTokenAt_21 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_TableRow(context, token)) { + this.build(context, token); + return 21; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 17; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 21; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 21; + } + var stateComment = 'State: 21 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#TableRow', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 21; + }; + // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>#RuleLine:0 + Parser.prototype.matchTokenAt_22 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.RuleHeader); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 24; + } + if (this.match_BackgroundLine(context, token)) { + this.endRule(context, RuleType.RuleHeader); + this.startRule(context, RuleType.Background); + this.build(context, token); + return 25; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.RuleHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.RuleHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.RuleHeader); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.startRule(context, RuleType.Description); + this.build(context, token); + return 23; + } + var stateComment = 'State: 22 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>#RuleLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Empty', + '#Comment', + '#BackgroundLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 22; + }; + // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:1>Description:0>#Other:0 + Parser.prototype.matchTokenAt_23 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.RuleHeader); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.endRule(context, RuleType.Description); + this.build(context, token); + return 24; + } + if (this.match_BackgroundLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.RuleHeader); + this.startRule(context, RuleType.Background); + this.build(context, token); + return 25; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.RuleHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.RuleHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.RuleHeader); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 23; + } + var stateComment = 'State: 23 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:1>Description:0>#Other:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#BackgroundLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 23; + }; + // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:2>#Comment:0 + Parser.prototype.matchTokenAt_24 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.RuleHeader); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 24; + } + if (this.match_BackgroundLine(context, token)) { + this.endRule(context, RuleType.RuleHeader); + this.startRule(context, RuleType.Background); + this.build(context, token); + return 25; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.RuleHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.RuleHeader); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.RuleHeader); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 24; + } + var stateComment = 'State: 24 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:2>#Comment:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#BackgroundLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 24; + }; + // GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0 + Parser.prototype.matchTokenAt_25 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 25; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 27; + } + if (this.match_StepLine(context, token)) { + this.startRule(context, RuleType.Step); + this.build(context, token); + return 28; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.startRule(context, RuleType.Description); + this.build(context, token); + return 26; + } + var stateComment = 'State: 25 - GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Empty', + '#Comment', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 25; + }; + // GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0 + Parser.prototype.matchTokenAt_26 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.endRule(context, RuleType.Description); + this.build(context, token); + return 27; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.Description); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 28; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 26; + } + var stateComment = 'State: 26 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 26; + }; + // GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0 + Parser.prototype.matchTokenAt_27 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 27; + } + if (this.match_StepLine(context, token)) { + this.startRule(context, RuleType.Step); + this.build(context, token); + return 28; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 27; + } + var stateComment = 'State: 27 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 27; + }; + // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0 + Parser.prototype.matchTokenAt_28 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_TableRow(context, token)) { + this.startRule(context, RuleType.DataTable); + this.build(context, token); + return 29; + } + if (this.match_DocStringSeparator(context, token)) { + this.startRule(context, RuleType.DocString); + this.build(context, token); + return 44; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 28; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 28; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 28; + } + var stateComment = 'State: 28 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#TableRow', + '#DocStringSeparator', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 28; + }; + // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0 + Parser.prototype.matchTokenAt_29 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_TableRow(context, token)) { + this.build(context, token); + return 29; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 28; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 29; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 29; + } + var stateComment = 'State: 29 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#TableRow', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 29; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0 + Parser.prototype.matchTokenAt_30 = function (token, context) { + if (this.match_TagLine(context, token)) { + this.build(context, token); + return 30; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Tags); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 30; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 30; + } + var stateComment = 'State: 30 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0'; + token.detach(); + var expectedTokens = ['#TagLine', '#ScenarioLine', '#Comment', '#Empty']; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 30; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0 + Parser.prototype.matchTokenAt_31 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 31; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 33; + } + if (this.match_StepLine(context, token)) { + this.startRule(context, RuleType.Step); + this.build(context, token); + return 34; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 36; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ExamplesLine(context, token)) { + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.startRule(context, RuleType.Description); + this.build(context, token); + return 32; + } + var stateComment = 'State: 31 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Empty', + '#Comment', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 31; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0 + Parser.prototype.matchTokenAt_32 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.endRule(context, RuleType.Description); + this.build(context, token); + return 33; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.Description); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 34; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.Description); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 36; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Description); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 32; + } + var stateComment = 'State: 32 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 32; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0 + Parser.prototype.matchTokenAt_33 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 33; + } + if (this.match_StepLine(context, token)) { + this.startRule(context, RuleType.Step); + this.build(context, token); + return 34; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 36; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ExamplesLine(context, token)) { + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 33; + } + var stateComment = 'State: 33 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 33; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0 + Parser.prototype.matchTokenAt_34 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_TableRow(context, token)) { + this.startRule(context, RuleType.DataTable); + this.build(context, token); + return 35; + } + if (this.match_DocStringSeparator(context, token)) { + this.startRule(context, RuleType.DocString); + this.build(context, token); + return 42; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 34; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 36; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 34; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 34; + } + var stateComment = 'State: 34 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#TableRow', + '#DocStringSeparator', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 34; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0 + Parser.prototype.matchTokenAt_35 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_TableRow(context, token)) { + this.build(context, token); + return 35; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 34; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 36; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.DataTable); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 35; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 35; + } + var stateComment = 'State: 35 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#TableRow', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 35; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0 + Parser.prototype.matchTokenAt_36 = function (token, context) { + if (this.match_TagLine(context, token)) { + this.build(context, token); + return 36; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Tags); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 36; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 36; + } + var stateComment = 'State: 36 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0'; + token.detach(); + var expectedTokens = ['#TagLine', '#ExamplesLine', '#Comment', '#Empty']; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 36; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0 + Parser.prototype.matchTokenAt_37 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 37; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 39; + } + if (this.match_TableRow(context, token)) { + this.startRule(context, RuleType.ExamplesTable); + this.build(context, token); + return 40; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 36; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.startRule(context, RuleType.Description); + this.build(context, token); + return 38; + } + var stateComment = 'State: 37 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Empty', + '#Comment', + '#TableRow', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 37; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0 + Parser.prototype.matchTokenAt_38 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.endRule(context, RuleType.Description); + this.build(context, token); + return 39; + } + if (this.match_TableRow(context, token)) { + this.endRule(context, RuleType.Description); + this.startRule(context, RuleType.ExamplesTable); + this.build(context, token); + return 40; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 36; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Description); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 38; + } + var stateComment = 'State: 38 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#TableRow', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Other', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 38; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0 + Parser.prototype.matchTokenAt_39 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 39; + } + if (this.match_TableRow(context, token)) { + this.startRule(context, RuleType.ExamplesTable); + this.build(context, token); + return 40; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 36; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 39; + } + var stateComment = 'State: 39 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#Comment', + '#TableRow', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 39; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0 + Parser.prototype.matchTokenAt_40 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_TableRow(context, token)) { + this.build(context, token); + return 40; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 36; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.ExamplesTable); + this.endRule(context, RuleType.Examples); + this.endRule(context, RuleType.ExamplesDefinition); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 40; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 40; + } + var stateComment = 'State: 40 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#TableRow', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 40; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0 + Parser.prototype.matchTokenAt_42 = function (token, context) { + if (this.match_DocStringSeparator(context, token)) { + this.build(context, token); + return 43; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 42; + } + var stateComment = 'State: 42 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0'; + token.detach(); + var expectedTokens = ['#DocStringSeparator', '#Other']; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 42; + }; + // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0 + Parser.prototype.matchTokenAt_43 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 34; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 36; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 37; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 43; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 43; + } + var stateComment = 'State: 43 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 43; + }; + // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0 + Parser.prototype.matchTokenAt_44 = function (token, context) { + if (this.match_DocStringSeparator(context, token)) { + this.build(context, token); + return 45; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 44; + } + var stateComment = 'State: 44 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0'; + token.detach(); + var expectedTokens = ['#DocStringSeparator', '#Other']; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 44; + }; + // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0 + Parser.prototype.matchTokenAt_45 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 28; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 30; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 31; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Rule); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 45; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 45; + } + var stateComment = 'State: 45 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 45; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0 + Parser.prototype.matchTokenAt_46 = function (token, context) { + if (this.match_DocStringSeparator(context, token)) { + this.build(context, token); + return 47; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 46; + } + var stateComment = 'State: 46 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0'; + token.detach(); + var expectedTokens = ['#DocStringSeparator', '#Other']; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 46; + }; + // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0 + Parser.prototype.matchTokenAt_47 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 15; + } + if (this.match_TagLine(context, token)) { + if (this.lookahead_0(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 17; + } + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ExamplesLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.ExamplesDefinition); + this.startRule(context, RuleType.Examples); + this.build(context, token); + return 18; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Scenario); + this.endRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 47; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 47; + } + var stateComment = 'State: 47 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#StepLine', + '#TagLine', + '#ExamplesLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 47; + }; + // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0 + Parser.prototype.matchTokenAt_48 = function (token, context) { + if (this.match_DocStringSeparator(context, token)) { + this.build(context, token); + return 49; + } + if (this.match_Other(context, token)) { + this.build(context, token); + return 48; + } + var stateComment = 'State: 48 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0'; + token.detach(); + var expectedTokens = ['#DocStringSeparator', '#Other']; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 48; + }; + // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0 + Parser.prototype.matchTokenAt_49 = function (token, context) { + if (this.match_EOF(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.endRule(context, RuleType.Feature); + this.build(context, token); + return 41; + } + if (this.match_StepLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.startRule(context, RuleType.Step); + this.build(context, token); + return 9; + } + if (this.match_TagLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Tags); + this.build(context, token); + return 11; + } + if (this.match_ScenarioLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.ScenarioDefinition); + this.startRule(context, RuleType.Scenario); + this.build(context, token); + return 12; + } + if (this.match_RuleLine(context, token)) { + this.endRule(context, RuleType.DocString); + this.endRule(context, RuleType.Step); + this.endRule(context, RuleType.Background); + this.startRule(context, RuleType.Rule); + this.startRule(context, RuleType.RuleHeader); + this.build(context, token); + return 22; + } + if (this.match_Comment(context, token)) { + this.build(context, token); + return 49; + } + if (this.match_Empty(context, token)) { + this.build(context, token); + return 49; + } + var stateComment = 'State: 49 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0'; + token.detach(); + var expectedTokens = [ + '#EOF', + '#StepLine', + '#TagLine', + '#ScenarioLine', + '#RuleLine', + '#Comment', + '#Empty', + ]; + var error = token.isEof + ? Errors_1.UnexpectedEOFException.create(token, expectedTokens, stateComment) + : Errors_1.UnexpectedTokenException.create(token, expectedTokens, stateComment); + if (this.stopAtFirstError) { + throw error; + } + this.addError(context, error); + return 49; + }; + Parser.prototype.match_EOF = function (context, token) { + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_EOF(token); + }); + }; + Parser.prototype.match_Empty = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_Empty(token); + }); + }; + Parser.prototype.match_Comment = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_Comment(token); + }); + }; + Parser.prototype.match_TagLine = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_TagLine(token); + }); + }; + Parser.prototype.match_FeatureLine = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_FeatureLine(token); + }); + }; + Parser.prototype.match_RuleLine = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_RuleLine(token); + }); + }; + Parser.prototype.match_BackgroundLine = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_BackgroundLine(token); + }); + }; + Parser.prototype.match_ScenarioLine = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_ScenarioLine(token); + }); + }; + Parser.prototype.match_ExamplesLine = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_ExamplesLine(token); + }); + }; + Parser.prototype.match_StepLine = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_StepLine(token); + }); + }; + Parser.prototype.match_DocStringSeparator = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_DocStringSeparator(token); + }); + }; + Parser.prototype.match_TableRow = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_TableRow(token); + }); + }; + Parser.prototype.match_Language = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_Language(token); + }); + }; + Parser.prototype.match_Other = function (context, token) { + if (token.isEof) { + return false; + } + return this.handleExternalError(context, false, function () { + return context.tokenMatcher.match_Other(token); + }); + }; + Parser.prototype.lookahead_0 = function (context, currentToken) { + currentToken.detach(); + var token; + var queue = []; + var match = false; + do { + token = this.readToken(this.context); + token.detach(); + queue.push(token); + if ( false || this.match_ExamplesLine(context, token)) { + match = true; + break; + } + } while ( false || + this.match_Empty(context, token) || + this.match_Comment(context, token) || + this.match_TagLine(context, token)); + context.tokenQueue = context.tokenQueue.concat(queue); + return match; + }; + return Parser; +}()); +exports.default = Parser; +//# sourceMappingURL=Parser.js.map + +/***/ }), + +/***/ 72554: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Token = /** @class */ (function () { + function Token(line, location) { + this.line = line; + this.location = location; + this.isEof = line == null; + } + Token.prototype.getTokenValue = function () { + return this.isEof ? 'EOF' : this.line.getLineText(-1); + }; + Token.prototype.detach = function () { + // TODO: Detach line, but is this really needed? + }; + return Token; +}()); +exports.default = Token; +//# sourceMappingURL=Token.js.map + +/***/ }), + +/***/ 62402: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__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."); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var gherkin_languages_json_1 = __importDefault(__nccwpck_require__(11608)); +var Errors_1 = __nccwpck_require__(79259); +var Parser_1 = __nccwpck_require__(73332); +var DIALECT_DICT = gherkin_languages_json_1.default; +var LANGUAGE_PATTERN = /^\s*#\s*language\s*:\s*([a-zA-Z\-_]+)\s*$/; +var TokenMatcher = /** @class */ (function () { + function TokenMatcher(defaultDialectName) { + if (defaultDialectName === void 0) { defaultDialectName = 'en'; } + this.defaultDialectName = defaultDialectName; + this.reset(); + } + TokenMatcher.prototype.changeDialect = function (newDialectName, location) { + var newDialect = DIALECT_DICT[newDialectName]; + if (!newDialect) { + throw Errors_1.NoSuchLanguageException.create(newDialectName, location); + } + this.dialectName = newDialectName; + this.dialect = newDialect; + }; + TokenMatcher.prototype.reset = function () { + if (this.dialectName !== this.defaultDialectName) { + this.changeDialect(this.defaultDialectName); + } + this.activeDocStringSeparator = null; + this.indentToRemove = 0; + }; + TokenMatcher.prototype.match_TagLine = function (token) { + if (token.line.startsWith('@')) { + this.setTokenMatched(token, Parser_1.TokenType.TagLine, null, null, null, token.line.getTags()); + return true; + } + return false; + }; + TokenMatcher.prototype.match_FeatureLine = function (token) { + return this.matchTitleLine(token, Parser_1.TokenType.FeatureLine, this.dialect.feature); + }; + TokenMatcher.prototype.match_ScenarioLine = function (token) { + return (this.matchTitleLine(token, Parser_1.TokenType.ScenarioLine, this.dialect.scenario) || + this.matchTitleLine(token, Parser_1.TokenType.ScenarioLine, this.dialect.scenarioOutline)); + }; + TokenMatcher.prototype.match_BackgroundLine = function (token) { + return this.matchTitleLine(token, Parser_1.TokenType.BackgroundLine, this.dialect.background); + }; + TokenMatcher.prototype.match_ExamplesLine = function (token) { + return this.matchTitleLine(token, Parser_1.TokenType.ExamplesLine, this.dialect.examples); + }; + TokenMatcher.prototype.match_RuleLine = function (token) { + return this.matchTitleLine(token, Parser_1.TokenType.RuleLine, this.dialect.rule); + }; + TokenMatcher.prototype.match_TableRow = function (token) { + if (token.line.startsWith('|')) { + // TODO: indent + this.setTokenMatched(token, Parser_1.TokenType.TableRow, null, null, null, token.line.getTableCells()); + return true; + } + return false; + }; + TokenMatcher.prototype.match_Empty = function (token) { + if (token.line.isEmpty) { + this.setTokenMatched(token, Parser_1.TokenType.Empty, null, null, 0); + return true; + } + return false; + }; + TokenMatcher.prototype.match_Comment = function (token) { + if (token.line.startsWith('#')) { + var text = token.line.getLineText(0); // take the entire line, including leading space + this.setTokenMatched(token, Parser_1.TokenType.Comment, text, null, 0); + return true; + } + return false; + }; + TokenMatcher.prototype.match_Language = function (token) { + var match = token.line.trimmedLineText.match(LANGUAGE_PATTERN); + if (match) { + var newDialectName = match[1]; + this.setTokenMatched(token, Parser_1.TokenType.Language, newDialectName); + this.changeDialect(newDialectName, token.location); + return true; + } + return false; + }; + TokenMatcher.prototype.match_DocStringSeparator = function (token) { + return this.activeDocStringSeparator == null + ? // open + this._match_DocStringSeparator(token, '"""', true) || + this._match_DocStringSeparator(token, '```', true) + : // close + this._match_DocStringSeparator(token, this.activeDocStringSeparator, false); + }; + TokenMatcher.prototype._match_DocStringSeparator = function (token, separator, isOpen) { + if (token.line.startsWith(separator)) { + var contentType = null; + if (isOpen) { + contentType = token.line.getRestTrimmed(separator.length); + this.activeDocStringSeparator = separator; + this.indentToRemove = token.line.indent; + } + else { + this.activeDocStringSeparator = null; + this.indentToRemove = 0; + } + // TODO: Use the separator as keyword. That's needed for pretty printing. + this.setTokenMatched(token, Parser_1.TokenType.DocStringSeparator, contentType); + return true; + } + return false; + }; + TokenMatcher.prototype.match_EOF = function (token) { + if (token.isEof) { + this.setTokenMatched(token, Parser_1.TokenType.EOF); + return true; + } + return false; + }; + TokenMatcher.prototype.match_StepLine = function (token) { + var e_1, _a; + var keywords = [] + .concat(this.dialect.given) + .concat(this.dialect.when) + .concat(this.dialect.then) + .concat(this.dialect.and) + .concat(this.dialect.but); + try { + for (var keywords_1 = __values(keywords), keywords_1_1 = keywords_1.next(); !keywords_1_1.done; keywords_1_1 = keywords_1.next()) { + var keyword = keywords_1_1.value; + if (token.line.startsWith(keyword)) { + var title = token.line.getRestTrimmed(keyword.length); + this.setTokenMatched(token, Parser_1.TokenType.StepLine, title, keyword); + return true; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (keywords_1_1 && !keywords_1_1.done && (_a = keywords_1.return)) _a.call(keywords_1); + } + finally { if (e_1) throw e_1.error; } + } + return false; + }; + TokenMatcher.prototype.match_Other = function (token) { + var text = token.line.getLineText(this.indentToRemove); // take the entire line, except removing DocString indents + this.setTokenMatched(token, Parser_1.TokenType.Other, this.unescapeDocString(text), null, 0); + return true; + }; + TokenMatcher.prototype.matchTitleLine = function (token, tokenType, keywords) { + var e_2, _a; + try { + for (var keywords_2 = __values(keywords), keywords_2_1 = keywords_2.next(); !keywords_2_1.done; keywords_2_1 = keywords_2.next()) { + var keyword = keywords_2_1.value; + if (token.line.startsWithTitleKeyword(keyword)) { + var title = token.line.getRestTrimmed(keyword.length + ':'.length); + this.setTokenMatched(token, tokenType, title, keyword); + return true; + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (keywords_2_1 && !keywords_2_1.done && (_a = keywords_2.return)) _a.call(keywords_2); + } + finally { if (e_2) throw e_2.error; } + } + return false; + }; + TokenMatcher.prototype.setTokenMatched = function (token, matchedType, text, keyword, indent, items) { + token.matchedType = matchedType; + token.matchedText = text; + token.matchedKeyword = keyword; + token.matchedIndent = + typeof indent === 'number' + ? indent + : token.line == null + ? 0 + : token.line.indent; + token.matchedItems = items || []; + token.location.column = token.matchedIndent + 1; + token.matchedGherkinDialect = this.dialectName; + }; + TokenMatcher.prototype.unescapeDocString = function (text) { + return this.activeDocStringSeparator != null + ? text.replace('\\"\\"\\"', '"""') + : text; + }; + return TokenMatcher; +}()); +exports.default = TokenMatcher; +//# sourceMappingURL=TokenMatcher.js.map + +/***/ }), + +/***/ 976: +/***/ (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 Token_1 = __importDefault(__nccwpck_require__(72554)); +var GherkinLine_1 = __importDefault(__nccwpck_require__(73715)); +var createLocation_1 = __importDefault(__nccwpck_require__(27134)); +/** + * The scanner reads a gherkin doc (typically read from a .feature file) and creates a token for each line. + * The tokens are passed to the parser, which outputs an AST (Abstract Syntax Tree). + * + * If the scanner sees a `#` language header, it will reconfigure itself dynamically to look for + * Gherkin keywords for the associated language. The keywords are defined in gherkin-languages.json. + */ +var TokenScanner = /** @class */ (function () { + function TokenScanner(source) { + this.lineNumber = 0; + this.lines = source.split(/\r?\n/); + if (this.lines.length > 0 && + this.lines[this.lines.length - 1].trim() === '') { + this.lines.pop(); + } + } + TokenScanner.prototype.read = function () { + var line = this.lines[this.lineNumber++]; + var location = createLocation_1.default({ + line: this.lineNumber, + }); + location.column = undefined; + return line == null + ? new Token_1.default(null, location) + : new Token_1.default(new GherkinLine_1.default(line, this.lineNumber), location); + }; + return TokenScanner; +}()); +exports.default = TokenScanner; +//# sourceMappingURL=TokenScanner.js.map + +/***/ }), + +/***/ 27134: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var cucumber_messages_1 = __nccwpck_require__(56106); +function createLocation(props) { + var location = cucumber_messages_1.messages.Location.create(props); + if (location.line === 0) { + location.line = undefined; + } + if (location.column === 0) { + location.column = undefined; + } + return location; +} +exports.default = createLocation; +//# sourceMappingURL=createLocation.js.map + +/***/ }), + +/***/ 58462: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +// https://mathiasbynens.be/notes/javascript-unicode +var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; +function countSymbols(s) { + return s.replace(regexAstralSymbols, '_').length; +} +exports.default = countSymbols; +//# sourceMappingURL=countSymbols.js.map + +/***/ }), + +/***/ 88963: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Combine = __nccwpck_require__(41051); +var unique = __nccwpck_require__(64182); +var pumpify = __nccwpck_require__(40212); +var isNegatedGlob = __nccwpck_require__(59941); +var extend = __nccwpck_require__(38171); + +var GlobStream = __nccwpck_require__(41319); + +function globStream(globs, opt) { + if (!opt) { + opt = {}; + } + + var ourOpt = extend({}, opt); + var ignore = ourOpt.ignore; + + ourOpt.cwd = typeof ourOpt.cwd === 'string' ? ourOpt.cwd : process.cwd(); + ourOpt.dot = typeof ourOpt.dot === 'boolean' ? ourOpt.dot : false; + ourOpt.silent = typeof ourOpt.silent === 'boolean' ? ourOpt.silent : true; + ourOpt.cwdbase = typeof ourOpt.cwdbase === 'boolean' ? ourOpt.cwdbase : false; + ourOpt.uniqueBy = typeof ourOpt.uniqueBy === 'string' || + typeof ourOpt.uniqueBy === 'function' ? ourOpt.uniqueBy : 'path'; + + if (ourOpt.cwdbase) { + ourOpt.base = ourOpt.cwd; + } + // Normalize string `ignore` to array + if (typeof ignore === 'string') { + ignore = [ignore]; + } + // Ensure `ignore` is an array + if (!Array.isArray(ignore)) { + ignore = []; + } + + // Only one glob no need to aggregate + if (!Array.isArray(globs)) { + globs = [globs]; + } + + var positives = []; + var negatives = []; + + globs.forEach(sortGlobs); + + function sortGlobs(globString, index) { + if (typeof globString !== 'string') { + throw new Error('Invalid glob at index ' + index); + } + + var glob = isNegatedGlob(globString); + var globArray = glob.negated ? negatives : positives; + + globArray.push({ + index: index, + glob: glob.pattern, + }); + } + + if (positives.length === 0) { + throw new Error('Missing positive glob'); + } + + // Create all individual streams + var streams = positives.map(streamFromPositive); + + // Then just pipe them to a single unique stream and return it + var aggregate = new Combine(streams); + var uniqueStream = unique(ourOpt.uniqueBy); + + return pumpify.obj(aggregate, uniqueStream); + + function streamFromPositive(positive) { + var negativeGlobs = negatives + .filter(indexGreaterThan(positive.index)) + .map(toGlob) + .concat(ignore); + return new GlobStream(positive.glob, negativeGlobs, ourOpt); + } +} + +function indexGreaterThan(index) { + return function(obj) { + return obj.index > index; + }; +} + +function toGlob(obj) { + return obj.glob; +} + +module.exports = globStream; + + +/***/ }), + +/***/ 67676: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var path = __nccwpck_require__(85622); +var isglob = __nccwpck_require__(41038); +var pathDirname = __nccwpck_require__(75440); +var isWin32 = __nccwpck_require__(12087).platform() === 'win32'; + +module.exports = function globParent(str) { + // flip windows path separators + if (isWin32 && str.indexOf('/') < 0) str = str.split('\\').join('/'); + + // special case for strings ending in enclosure containing path separator + if (/[\{\[].*[\/]*.*[\}\]]$/.test(str)) str += '/'; + + // preserves full path in case of trailing path separator + str += 'a'; + + // remove path parts that are globby + do {str = pathDirname.posix(str)} + while (isglob(str) || /(^|[^\\])([\{\[]|\([^\)]+$)/.test(str)); + + // remove escape chars and return result + return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1'); +}; + + +/***/ }), + +/***/ 41038: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * is-glob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +var isExtglob = __nccwpck_require__(76435); + +module.exports = function isGlob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) return true; + + var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/; + var match; + + while ((match = regex.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + return false; +}; + + +/***/ }), + +/***/ 41319: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var inherits = __nccwpck_require__(31669).inherits; + +var glob = __nccwpck_require__(91957); +var extend = __nccwpck_require__(38171); +var Readable = __nccwpck_require__(51642).Readable; +var globParent = __nccwpck_require__(67676); +var toAbsoluteGlob = __nccwpck_require__(47198); +var removeTrailingSeparator = __nccwpck_require__(39499); + +var globErrMessage1 = 'File not found with singular glob: '; +var globErrMessage2 = ' (if this was purposeful, use `allowEmpty` option)'; + +function getBasePath(ourGlob, opt) { + return globParent(toAbsoluteGlob(ourGlob, opt)); +} + +function globIsSingular(glob) { + var globSet = glob.minimatch.set; + if (globSet.length !== 1) { + return false; + } + + return globSet[0].every(function isString(value) { + return typeof value === 'string'; + }); +} + +function GlobStream(ourGlob, negatives, opt) { + if (!(this instanceof GlobStream)) { + return new GlobStream(ourGlob, negatives, opt); + } + + var ourOpt = extend({}, opt); + + Readable.call(this, { + objectMode: true, + highWaterMark: ourOpt.highWaterMark || 16, + }); + + // Delete `highWaterMark` after inheriting from Readable + delete ourOpt.highWaterMark; + + var self = this; + + function resolveNegatives(negative) { + return toAbsoluteGlob(negative, ourOpt); + } + + var ourNegatives = negatives.map(resolveNegatives); + ourOpt.ignore = ourNegatives; + + var cwd = ourOpt.cwd; + var allowEmpty = ourOpt.allowEmpty || false; + + // Extract base path from glob + var basePath = ourOpt.base || getBasePath(ourGlob, ourOpt); + + // Remove path relativity to make globs make sense + ourGlob = toAbsoluteGlob(ourGlob, ourOpt); + // Delete `root` after all resolving done + delete ourOpt.root; + + var globber = new glob.Glob(ourGlob, ourOpt); + this._globber = globber; + + var found = false; + + globber.on('match', function(filepath) { + found = true; + var obj = { + cwd: cwd, + base: basePath, + path: removeTrailingSeparator(filepath), + }; + if (!self.push(obj)) { + globber.pause(); + } + }); + + globber.once('end', function() { + if (allowEmpty !== true && !found && globIsSingular(globber)) { + var err = new Error(globErrMessage1 + ourGlob + globErrMessage2); + + return self.destroy(err); + } + + self.push(null); + }); + + function onError(err) { + self.destroy(err); + } + + globber.once('error', onError); +} +inherits(GlobStream, Readable); + +GlobStream.prototype._read = function() { + this._globber.resume(); +}; + +GlobStream.prototype.destroy = function(err) { + var self = this; + + this._globber.abort(); + + process.nextTick(function() { + if (err) { + self.emit('error', err); + } + self.emit('close'); + }); +}; + +module.exports = GlobStream; + + +/***/ }), + +/***/ 47625: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = __nccwpck_require__(85622) +var minimatch = __nccwpck_require__(83973) +var isAbsolute = __nccwpck_require__(38714) +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + self.absolute = !!options.absolute + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = path.resolve(options.cwd) + self.changedCwd = self.cwd !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) + if (process.platform === "win32") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)) + var c = self.cache[e] || self.cache[makeAbs(self, e)] + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c) + return notDir + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/') + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + + +/***/ }), + +/***/ 91957: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = __nccwpck_require__(35747) +var rp = __nccwpck_require__(46863) +var minimatch = __nccwpck_require__(83973) +var Minimatch = minimatch.Minimatch +var inherits = __nccwpck_require__(44124) +var EE = __nccwpck_require__(28614).EventEmitter +var path = __nccwpck_require__(85622) +var assert = __nccwpck_require__(42357) +var isAbsolute = __nccwpck_require__(38714) +var globSync = __nccwpck_require__(29010) +var common = __nccwpck_require__(47625) +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = __nccwpck_require__(52492) +var util = __nccwpck_require__(31669) +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = __nccwpck_require__(1223) + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + + if (!pattern) + return false + + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + this._processing = 0 + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + sync = false + + function done () { + --self._processing + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish() + }) + } else { + self._finish() + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + rp.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = isAbsolute(e) ? e : this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) + e = abs + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er && er.code === 'ENOENT') + return cb() + + var isSym = lstat && lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + this.emit('error', error) + this.abort() + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) + return cb(null, false, stat) + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return cb() + + return cb(null, c, stat) +} + + +/***/ }), + +/***/ 29010: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = __nccwpck_require__(35747) +var rp = __nccwpck_require__(46863) +var minimatch = __nccwpck_require__(83973) +var Minimatch = minimatch.Minimatch +var Glob = __nccwpck_require__(91957).Glob +var util = __nccwpck_require__(31669) +var path = __nccwpck_require__(85622) +var assert = __nccwpck_require__(42357) +var isAbsolute = __nccwpck_require__(38714) +var common = __nccwpck_require__(47625) +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = rp.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored(this, e)) + return + + var abs = this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) { + e = abs + } + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } + } + + var isSym = lstat && lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return false + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + + +/***/ }), + +/***/ 4797: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.printError = printError; +exports.GraphQLError = void 0; + +var _isObjectLike = _interopRequireDefault(__nccwpck_require__(95865)); + +var _symbols = __nccwpck_require__(3255); + +var _location = __nccwpck_require__(61922); + +var _printLocation = __nccwpck_require__(35250); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } + +function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +/** + * A GraphQLError describes an Error found during the parse, validate, or + * execute phases of performing a GraphQL operation. In addition to a message + * and stack trace, it also includes information about the locations in a + * GraphQL document and/or execution result that correspond to the Error. + */ +var GraphQLError = /*#__PURE__*/function (_Error) { + _inherits(GraphQLError, _Error); + + var _super = _createSuper(GraphQLError); + + /** + * A message describing the Error for debugging purposes. + * + * Enumerable, and appears in the result of JSON.stringify(). + * + * Note: should be treated as readonly, despite invariant usage. + */ + + /** + * An array of { line, column } locations within the source GraphQL document + * which correspond to this error. + * + * Errors during validation often contain multiple locations, for example to + * point out two things with the same name. Errors during execution include a + * single location, the field which produced the error. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + + /** + * An array describing the JSON-path into the execution response which + * corresponds to this error. Only included for errors during execution. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + + /** + * An array of GraphQL AST Nodes corresponding to this error. + */ + + /** + * The source GraphQL document for the first location of this error. + * + * Note that if this Error represents more than one node, the source may not + * represent nodes after the first node. + */ + + /** + * An array of character offsets within the source GraphQL document + * which correspond to this error. + */ + + /** + * The original error thrown from a field resolver during execution. + */ + + /** + * Extension fields to add to the formatted error. + */ + function GraphQLError(message, nodes, source, positions, path, originalError, extensions) { + var _locations2, _source2, _positions2, _extensions2; + + var _this; + + _classCallCheck(this, GraphQLError); + + _this = _super.call(this, message); // Compute list of blame nodes. + + var _nodes = Array.isArray(nodes) ? nodes.length !== 0 ? nodes : undefined : nodes ? [nodes] : undefined; // Compute locations in the source for the given nodes/positions. + + + var _source = source; + + if (!_source && _nodes) { + var _nodes$0$loc; + + _source = (_nodes$0$loc = _nodes[0].loc) === null || _nodes$0$loc === void 0 ? void 0 : _nodes$0$loc.source; + } + + var _positions = positions; + + if (!_positions && _nodes) { + _positions = _nodes.reduce(function (list, node) { + if (node.loc) { + list.push(node.loc.start); + } + + return list; + }, []); + } + + if (_positions && _positions.length === 0) { + _positions = undefined; + } + + var _locations; + + if (positions && source) { + _locations = positions.map(function (pos) { + return (0, _location.getLocation)(source, pos); + }); + } else if (_nodes) { + _locations = _nodes.reduce(function (list, node) { + if (node.loc) { + list.push((0, _location.getLocation)(node.loc.source, node.loc.start)); + } + + return list; + }, []); + } + + var _extensions = extensions; + + if (_extensions == null && originalError != null) { + var originalExtensions = originalError.extensions; + + if ((0, _isObjectLike.default)(originalExtensions)) { + _extensions = originalExtensions; + } + } + + Object.defineProperties(_assertThisInitialized(_this), { + name: { + value: 'GraphQLError' + }, + message: { + value: message, + // By being enumerable, JSON.stringify will include `message` in the + // resulting output. This ensures that the simplest possible GraphQL + // service adheres to the spec. + enumerable: true, + writable: true + }, + locations: { + // Coercing falsy values to undefined ensures they will not be included + // in JSON.stringify() when not provided. + value: (_locations2 = _locations) !== null && _locations2 !== void 0 ? _locations2 : undefined, + // By being enumerable, JSON.stringify will include `locations` in the + // resulting output. This ensures that the simplest possible GraphQL + // service adheres to the spec. + enumerable: _locations != null + }, + path: { + // Coercing falsy values to undefined ensures they will not be included + // in JSON.stringify() when not provided. + value: path !== null && path !== void 0 ? path : undefined, + // By being enumerable, JSON.stringify will include `path` in the + // resulting output. This ensures that the simplest possible GraphQL + // service adheres to the spec. + enumerable: path != null + }, + nodes: { + value: _nodes !== null && _nodes !== void 0 ? _nodes : undefined + }, + source: { + value: (_source2 = _source) !== null && _source2 !== void 0 ? _source2 : undefined + }, + positions: { + value: (_positions2 = _positions) !== null && _positions2 !== void 0 ? _positions2 : undefined + }, + originalError: { + value: originalError + }, + extensions: { + // Coercing falsy values to undefined ensures they will not be included + // in JSON.stringify() when not provided. + value: (_extensions2 = _extensions) !== null && _extensions2 !== void 0 ? _extensions2 : undefined, + // By being enumerable, JSON.stringify will include `path` in the + // resulting output. This ensures that the simplest possible GraphQL + // service adheres to the spec. + enumerable: _extensions != null + } + }); // Include (non-enumerable) stack trace. + + if (originalError === null || originalError === void 0 ? void 0 : originalError.stack) { + Object.defineProperty(_assertThisInitialized(_this), 'stack', { + value: originalError.stack, + writable: true, + configurable: true + }); + return _possibleConstructorReturn(_this); + } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') + + + if (Error.captureStackTrace) { + Error.captureStackTrace(_assertThisInitialized(_this), GraphQLError); + } else { + Object.defineProperty(_assertThisInitialized(_this), 'stack', { + value: Error().stack, + writable: true, + configurable: true + }); + } + + return _this; + } + + _createClass(GraphQLError, [{ + key: "toString", + value: function toString() { + return printError(this); + } // FIXME: workaround to not break chai comparisons, should be remove in v16 + // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet + + }, { + key: _symbols.SYMBOL_TO_STRING_TAG, + get: function get() { + return 'Object'; + } + }]); + + return GraphQLError; +}( /*#__PURE__*/_wrapNativeSuper(Error)); +/** + * Prints a GraphQLError to a string, representing useful location information + * about the error's position in the source. + */ + + +exports.GraphQLError = GraphQLError; + +function printError(error) { + var output = error.message; + + if (error.nodes) { + for (var _i2 = 0, _error$nodes2 = error.nodes; _i2 < _error$nodes2.length; _i2++) { + var node = _error$nodes2[_i2]; + + if (node.loc) { + output += '\n\n' + (0, _printLocation.printLocation)(node.loc); + } + } + } else if (error.source && error.locations) { + for (var _i4 = 0, _error$locations2 = error.locations; _i4 < _error$locations2.length; _i4++) { + var location = _error$locations2[_i4]; + output += '\n\n' + (0, _printLocation.printSourceLocation)(error.source, location); + } + } + + return output; +} + + +/***/ }), + +/***/ 67166: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.formatError = formatError; + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Given a GraphQLError, format it according to the rules described by the + * Response Format, Errors section of the GraphQL Specification. + */ +function formatError(error) { + var _error$message; + + error || (0, _devAssert.default)(0, 'Received null or undefined error.'); + var message = (_error$message = error.message) !== null && _error$message !== void 0 ? _error$message : 'An unknown error occurred.'; + var locations = error.locations; + var path = error.path; + var extensions = error.extensions; + return extensions ? { + message: message, + locations: locations, + path: path, + extensions: extensions + } : { + message: message, + locations: locations, + path: path + }; +} +/** + * @see https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md#errors + */ + + +/***/ }), + +/***/ 50578: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "GraphQLError", ({ + enumerable: true, + get: function get() { + return _GraphQLError.GraphQLError; + } +})); +Object.defineProperty(exports, "printError", ({ + enumerable: true, + get: function get() { + return _GraphQLError.printError; + } +})); +Object.defineProperty(exports, "syntaxError", ({ + enumerable: true, + get: function get() { + return _syntaxError.syntaxError; + } +})); +Object.defineProperty(exports, "locatedError", ({ + enumerable: true, + get: function get() { + return _locatedError.locatedError; + } +})); +Object.defineProperty(exports, "formatError", ({ + enumerable: true, + get: function get() { + return _formatError.formatError; + } +})); + +var _GraphQLError = __nccwpck_require__(4797); + +var _syntaxError = __nccwpck_require__(52295); + +var _locatedError = __nccwpck_require__(16842); + +var _formatError = __nccwpck_require__(67166); + + +/***/ }), + +/***/ 16842: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.locatedError = locatedError; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _GraphQLError = __nccwpck_require__(4797); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Given an arbitrary value, presumably thrown while attempting to execute a + * GraphQL operation, produce a new GraphQLError aware of the location in the + * document responsible for the original Error. + */ +function locatedError(rawOriginalError, nodes, path) { + var _nodes; + + // Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface. + var originalError = rawOriginalError instanceof Error ? rawOriginalError : new Error('Unexpected error value: ' + (0, _inspect.default)(rawOriginalError)); // Note: this uses a brand-check to support GraphQL errors originating from other contexts. + + if (Array.isArray(originalError.path)) { + return originalError; + } + + return new _GraphQLError.GraphQLError(originalError.message, (_nodes = originalError.nodes) !== null && _nodes !== void 0 ? _nodes : nodes, originalError.source, originalError.positions, path, originalError); +} + + +/***/ }), + +/***/ 52295: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.syntaxError = syntaxError; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Produces a GraphQLError representing a syntax error, containing useful + * descriptive information about the syntax error's position in the source. + */ +function syntaxError(source, position, description) { + return new _GraphQLError.GraphQLError("Syntax Error: ".concat(description), undefined, source, [position]); +} + + +/***/ }), + +/***/ 83677: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.execute = execute; +exports.executeSync = executeSync; +exports.assertValidExecutionArguments = assertValidExecutionArguments; +exports.buildExecutionContext = buildExecutionContext; +exports.collectFields = collectFields; +exports.buildResolveInfo = buildResolveInfo; +exports.getFieldDef = getFieldDef; +exports.defaultFieldResolver = exports.defaultTypeResolver = void 0; + +var _arrayFrom = _interopRequireDefault(__nccwpck_require__(86839)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _memoize = _interopRequireDefault(__nccwpck_require__(64217)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +var _isPromise = _interopRequireDefault(__nccwpck_require__(93910)); + +var _isObjectLike = _interopRequireDefault(__nccwpck_require__(95865)); + +var _isCollection = _interopRequireDefault(__nccwpck_require__(54363)); + +var _promiseReduce = _interopRequireDefault(__nccwpck_require__(77286)); + +var _promiseForObject = _interopRequireDefault(__nccwpck_require__(46804)); + +var _Path = __nccwpck_require__(11262); + +var _GraphQLError = __nccwpck_require__(4797); + +var _locatedError = __nccwpck_require__(16842); + +var _kinds = __nccwpck_require__(11927); + +var _validate = __nccwpck_require__(22430); + +var _introspection = __nccwpck_require__(28344); + +var _directives = __nccwpck_require__(83614); + +var _definition = __nccwpck_require__(5821); + +var _typeFromAST = __nccwpck_require__(27664); + +var _getOperationRootType = __nccwpck_require__(81605); + +var _values = __nccwpck_require__(94834); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function execute(argsOrSchema, document, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) { + /* eslint-enable no-redeclare */ + // Extract arguments from object args if provided. + return arguments.length === 1 ? executeImpl(argsOrSchema) : executeImpl({ + schema: argsOrSchema, + document: document, + rootValue: rootValue, + contextValue: contextValue, + variableValues: variableValues, + operationName: operationName, + fieldResolver: fieldResolver, + typeResolver: typeResolver + }); +} +/** + * Also implements the "Evaluating requests" section of the GraphQL specification. + * However, it guarantees to complete synchronously (or throw an error) assuming + * that all field resolvers are also synchronous. + */ + + +function executeSync(args) { + var result = executeImpl(args); // Assert that the execution was synchronous. + + if ((0, _isPromise.default)(result)) { + throw new Error('GraphQL execution failed to complete synchronously.'); + } + + return result; +} + +function executeImpl(args) { + var schema = args.schema, + document = args.document, + rootValue = args.rootValue, + contextValue = args.contextValue, + variableValues = args.variableValues, + operationName = args.operationName, + fieldResolver = args.fieldResolver, + typeResolver = args.typeResolver; // If arguments are missing or incorrect, throw an error. + + assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments, + // a "Response" with only errors is returned. + + var exeContext = buildExecutionContext(schema, document, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver); // Return early errors if execution context failed. + + if (Array.isArray(exeContext)) { + return { + errors: exeContext + }; + } // Return a Promise that will eventually resolve to the data described by + // The "Response" section of the GraphQL specification. + // + // If errors are encountered while executing a GraphQL field, only that + // field and its descendants will be omitted, and sibling fields will still + // be executed. An execution which encounters errors will still result in a + // resolved Promise. + + + var data = executeOperation(exeContext, exeContext.operation, rootValue); + return buildResponse(exeContext, data); +} +/** + * Given a completed execution context and data, build the { errors, data } + * response defined by the "Response" section of the GraphQL specification. + */ + + +function buildResponse(exeContext, data) { + if ((0, _isPromise.default)(data)) { + return data.then(function (resolved) { + return buildResponse(exeContext, resolved); + }); + } + + return exeContext.errors.length === 0 ? { + data: data + } : { + errors: exeContext.errors, + data: data + }; +} +/** + * Essential assertions before executing to provide developer feedback for + * improper use of the GraphQL library. + * + * @internal + */ + + +function assertValidExecutionArguments(schema, document, rawVariableValues) { + document || (0, _devAssert.default)(0, 'Must provide document.'); // If the schema used for execution is invalid, throw an error. + + (0, _validate.assertValidSchema)(schema); // Variables, if provided, must be an object. + + rawVariableValues == null || (0, _isObjectLike.default)(rawVariableValues) || (0, _devAssert.default)(0, 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.'); +} +/** + * Constructs a ExecutionContext object from the arguments passed to + * execute, which we will pass throughout the other execution methods. + * + * Throws a GraphQLError if a valid execution context cannot be created. + * + * @internal + */ + + +function buildExecutionContext(schema, document, rootValue, contextValue, rawVariableValues, operationName, fieldResolver, typeResolver) { + var _definition$name, _operation$variableDe; + + var operation; + var fragments = Object.create(null); + + for (var _i2 = 0, _document$definitions2 = document.definitions; _i2 < _document$definitions2.length; _i2++) { + var definition = _document$definitions2[_i2]; + + switch (definition.kind) { + case _kinds.Kind.OPERATION_DEFINITION: + if (operationName == null) { + if (operation !== undefined) { + return [new _GraphQLError.GraphQLError('Must provide operation name if query contains multiple operations.')]; + } + + operation = definition; + } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) { + operation = definition; + } + + break; + + case _kinds.Kind.FRAGMENT_DEFINITION: + fragments[definition.name.value] = definition; + break; + } + } + + if (!operation) { + if (operationName != null) { + return [new _GraphQLError.GraphQLError("Unknown operation named \"".concat(operationName, "\"."))]; + } + + return [new _GraphQLError.GraphQLError('Must provide an operation.')]; + } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + + + var variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !== void 0 ? _operation$variableDe : []; + var coercedVariableValues = (0, _values.getVariableValues)(schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !== void 0 ? rawVariableValues : {}, { + maxErrors: 50 + }); + + if (coercedVariableValues.errors) { + return coercedVariableValues.errors; + } + + return { + schema: schema, + fragments: fragments, + rootValue: rootValue, + contextValue: contextValue, + operation: operation, + variableValues: coercedVariableValues.coerced, + fieldResolver: fieldResolver !== null && fieldResolver !== void 0 ? fieldResolver : defaultFieldResolver, + typeResolver: typeResolver !== null && typeResolver !== void 0 ? typeResolver : defaultTypeResolver, + errors: [] + }; +} +/** + * Implements the "Evaluating operations" section of the spec. + */ + + +function executeOperation(exeContext, operation, rootValue) { + var type = (0, _getOperationRootType.getOperationRootType)(exeContext.schema, operation); + var fields = collectFields(exeContext, type, operation.selectionSet, Object.create(null), Object.create(null)); + var path = undefined; // Errors from sub-fields of a NonNull type may propagate to the top level, + // at which point we still log the error and null the parent field, which + // in this case is the entire response. + + try { + var result = operation.operation === 'mutation' ? executeFieldsSerially(exeContext, type, rootValue, path, fields) : executeFields(exeContext, type, rootValue, path, fields); + + if ((0, _isPromise.default)(result)) { + return result.then(undefined, function (error) { + exeContext.errors.push(error); + return Promise.resolve(null); + }); + } + + return result; + } catch (error) { + exeContext.errors.push(error); + return null; + } +} +/** + * Implements the "Evaluating selection sets" section of the spec + * for "write" mode. + */ + + +function executeFieldsSerially(exeContext, parentType, sourceValue, path, fields) { + return (0, _promiseReduce.default)(Object.keys(fields), function (results, responseName) { + var fieldNodes = fields[responseName]; + var fieldPath = (0, _Path.addPath)(path, responseName, parentType.name); + var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath); + + if (result === undefined) { + return results; + } + + if ((0, _isPromise.default)(result)) { + return result.then(function (resolvedResult) { + results[responseName] = resolvedResult; + return results; + }); + } + + results[responseName] = result; + return results; + }, Object.create(null)); +} +/** + * Implements the "Evaluating selection sets" section of the spec + * for "read" mode. + */ + + +function executeFields(exeContext, parentType, sourceValue, path, fields) { + var results = Object.create(null); + var containsPromise = false; + + for (var _i4 = 0, _Object$keys2 = Object.keys(fields); _i4 < _Object$keys2.length; _i4++) { + var responseName = _Object$keys2[_i4]; + var fieldNodes = fields[responseName]; + var fieldPath = (0, _Path.addPath)(path, responseName, parentType.name); + var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath); + + if (result !== undefined) { + results[responseName] = result; + + if ((0, _isPromise.default)(result)) { + containsPromise = true; + } + } + } // If there are no promises, we can just return the object + + + if (!containsPromise) { + return results; + } // Otherwise, results is a map from field name to the result of resolving that + // field, which is possibly a promise. Return a promise that will return this + // same map, but with any promises replaced with the values they resolved to. + + + return (0, _promiseForObject.default)(results); +} +/** + * Given a selectionSet, adds all of the fields in that selection to + * the passed in map of fields, and returns it at the end. + * + * CollectFields requires the "runtime type" of an object. For a field which + * returns an Interface or Union type, the "runtime type" will be the actual + * Object type returned by that field. + * + * @internal + */ + + +function collectFields(exeContext, runtimeType, selectionSet, fields, visitedFragmentNames) { + for (var _i6 = 0, _selectionSet$selecti2 = selectionSet.selections; _i6 < _selectionSet$selecti2.length; _i6++) { + var selection = _selectionSet$selecti2[_i6]; + + switch (selection.kind) { + case _kinds.Kind.FIELD: + { + if (!shouldIncludeNode(exeContext, selection)) { + continue; + } + + var name = getFieldEntryKey(selection); + + if (!fields[name]) { + fields[name] = []; + } + + fields[name].push(selection); + break; + } + + case _kinds.Kind.INLINE_FRAGMENT: + { + if (!shouldIncludeNode(exeContext, selection) || !doesFragmentConditionMatch(exeContext, selection, runtimeType)) { + continue; + } + + collectFields(exeContext, runtimeType, selection.selectionSet, fields, visitedFragmentNames); + break; + } + + case _kinds.Kind.FRAGMENT_SPREAD: + { + var fragName = selection.name.value; + + if (visitedFragmentNames[fragName] || !shouldIncludeNode(exeContext, selection)) { + continue; + } + + visitedFragmentNames[fragName] = true; + var fragment = exeContext.fragments[fragName]; + + if (!fragment || !doesFragmentConditionMatch(exeContext, fragment, runtimeType)) { + continue; + } + + collectFields(exeContext, runtimeType, fragment.selectionSet, fields, visitedFragmentNames); + break; + } + } + } + + return fields; +} +/** + * Determines if a field should be included based on the @include and @skip + * directives, where @skip has higher precedence than @include. + */ + + +function shouldIncludeNode(exeContext, node) { + var skip = (0, _values.getDirectiveValues)(_directives.GraphQLSkipDirective, node, exeContext.variableValues); + + if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) { + return false; + } + + var include = (0, _values.getDirectiveValues)(_directives.GraphQLIncludeDirective, node, exeContext.variableValues); + + if ((include === null || include === void 0 ? void 0 : include.if) === false) { + return false; + } + + return true; +} +/** + * Determines if a fragment is applicable to the given type. + */ + + +function doesFragmentConditionMatch(exeContext, fragment, type) { + var typeConditionNode = fragment.typeCondition; + + if (!typeConditionNode) { + return true; + } + + var conditionalType = (0, _typeFromAST.typeFromAST)(exeContext.schema, typeConditionNode); + + if (conditionalType === type) { + return true; + } + + if ((0, _definition.isAbstractType)(conditionalType)) { + return exeContext.schema.isSubType(conditionalType, type); + } + + return false; +} +/** + * Implements the logic to compute the key of a given field's entry + */ + + +function getFieldEntryKey(node) { + return node.alias ? node.alias.value : node.name.value; +} +/** + * Resolves the field on the given source object. In particular, this + * figures out the value that the field returns by calling its resolve function, + * then calls completeValue to complete promises, serialize scalars, or execute + * the sub-selection-set for objects. + */ + + +function resolveField(exeContext, parentType, source, fieldNodes, path) { + var _fieldDef$resolve; + + var fieldNode = fieldNodes[0]; + var fieldName = fieldNode.name.value; + var fieldDef = getFieldDef(exeContext.schema, parentType, fieldName); + + if (!fieldDef) { + return; + } + + var returnType = fieldDef.type; + var resolveFn = (_fieldDef$resolve = fieldDef.resolve) !== null && _fieldDef$resolve !== void 0 ? _fieldDef$resolve : exeContext.fieldResolver; + var info = buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path); // Get the resolve function, regardless of if its result is normal or abrupt (error). + + try { + // Build a JS object of arguments from the field.arguments AST, using the + // variables scope to fulfill any variable references. + // TODO: find a way to memoize, in case this field is within a List type. + var args = (0, _values.getArgumentValues)(fieldDef, fieldNodes[0], exeContext.variableValues); // The resolve function's optional third argument is a context value that + // is provided to every resolve function within an execution. It is commonly + // used to represent an authenticated user, or request-specific caches. + + var _contextValue = exeContext.contextValue; + var result = resolveFn(source, args, _contextValue, info); + var completed; + + if ((0, _isPromise.default)(result)) { + completed = result.then(function (resolved) { + return completeValue(exeContext, returnType, fieldNodes, info, path, resolved); + }); + } else { + completed = completeValue(exeContext, returnType, fieldNodes, info, path, result); + } + + if ((0, _isPromise.default)(completed)) { + // Note: we don't rely on a `catch` method, but we do expect "thenable" + // to take a second callback for the error case. + return completed.then(undefined, function (rawError) { + var error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(path)); + return handleFieldError(error, returnType, exeContext); + }); + } + + return completed; + } catch (rawError) { + var error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(path)); + return handleFieldError(error, returnType, exeContext); + } +} +/** + * @internal + */ + + +function buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path) { + // The resolve function's optional fourth argument is a collection of + // information about the current execution state. + return { + fieldName: fieldDef.name, + fieldNodes: fieldNodes, + returnType: fieldDef.type, + parentType: parentType, + path: path, + schema: exeContext.schema, + fragments: exeContext.fragments, + rootValue: exeContext.rootValue, + operation: exeContext.operation, + variableValues: exeContext.variableValues + }; +} + +function handleFieldError(error, returnType, exeContext) { + // If the field type is non-nullable, then it is resolved without any + // protection from errors, however it still properly locates the error. + if ((0, _definition.isNonNullType)(returnType)) { + throw error; + } // Otherwise, error protection is applied, logging the error and resolving + // a null value for this field if one is encountered. + + + exeContext.errors.push(error); + return null; +} +/** + * Implements the instructions for completeValue as defined in the + * "Field entries" section of the spec. + * + * If the field type is Non-Null, then this recursively completes the value + * for the inner type. It throws a field error if that completion returns null, + * as per the "Nullability" section of the spec. + * + * If the field type is a List, then this recursively completes the value + * for the inner type on each item in the list. + * + * If the field type is a Scalar or Enum, ensures the completed value is a legal + * value of the type by calling the `serialize` method of GraphQL type + * definition. + * + * If the field is an abstract type, determine the runtime type of the value + * and then complete based on that type + * + * Otherwise, the field type expects a sub-selection set, and will complete the + * value by evaluating all sub-selections. + */ + + +function completeValue(exeContext, returnType, fieldNodes, info, path, result) { + // If result is an Error, throw a located error. + if (result instanceof Error) { + throw result; + } // If field type is NonNull, complete for inner type, and throw field error + // if result is null. + + + if ((0, _definition.isNonNullType)(returnType)) { + var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result); + + if (completed === null) { + throw new Error("Cannot return null for non-nullable field ".concat(info.parentType.name, ".").concat(info.fieldName, ".")); + } + + return completed; + } // If result value is null or undefined then return null. + + + if (result == null) { + return null; + } // If field type is List, complete each item in the list with the inner type + + + if ((0, _definition.isListType)(returnType)) { + return completeListValue(exeContext, returnType, fieldNodes, info, path, result); + } // If field type is a leaf type, Scalar or Enum, serialize to a valid value, + // returning null if serialization is not possible. + + + if ((0, _definition.isLeafType)(returnType)) { + return completeLeafValue(returnType, result); + } // If field type is an abstract type, Interface or Union, determine the + // runtime Object type and complete for that type. + + + if ((0, _definition.isAbstractType)(returnType)) { + return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result); + } // If field type is Object, execute and complete all sub-selections. + // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if ((0, _definition.isObjectType)(returnType)) { + return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result); + } // istanbul ignore next (Not reachable. All possible output types have been considered) + + + false || (0, _invariant.default)(0, 'Cannot complete value of unexpected output type: ' + (0, _inspect.default)(returnType)); +} +/** + * Complete a list value by completing each item in the list with the + * inner type + */ + + +function completeListValue(exeContext, returnType, fieldNodes, info, path, result) { + if (!(0, _isCollection.default)(result)) { + throw new _GraphQLError.GraphQLError("Expected Iterable, but did not find one for field \"".concat(info.parentType.name, ".").concat(info.fieldName, "\".")); + } // This is specified as a simple map, however we're optimizing the path + // where the list contains no Promises by avoiding creating another Promise. + + + var itemType = returnType.ofType; + var containsPromise = false; + var completedResults = (0, _arrayFrom.default)(result, function (item, index) { + // No need to modify the info object containing the path, + // since from here on it is not ever accessed by resolver functions. + var itemPath = (0, _Path.addPath)(path, index, undefined); + + try { + var completedItem; + + if ((0, _isPromise.default)(item)) { + completedItem = item.then(function (resolved) { + return completeValue(exeContext, itemType, fieldNodes, info, itemPath, resolved); + }); + } else { + completedItem = completeValue(exeContext, itemType, fieldNodes, info, itemPath, item); + } + + if ((0, _isPromise.default)(completedItem)) { + containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect "thenable" + // to take a second callback for the error case. + + return completedItem.then(undefined, function (rawError) { + var error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(itemPath)); + return handleFieldError(error, itemType, exeContext); + }); + } + + return completedItem; + } catch (rawError) { + var error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(itemPath)); + return handleFieldError(error, itemType, exeContext); + } + }); + return containsPromise ? Promise.all(completedResults) : completedResults; +} +/** + * Complete a Scalar or Enum by serializing to a valid value, returning + * null if serialization is not possible. + */ + + +function completeLeafValue(returnType, result) { + var serializedResult = returnType.serialize(result); + + if (serializedResult === undefined) { + throw new Error("Expected a value of type \"".concat((0, _inspect.default)(returnType), "\" but ") + "received: ".concat((0, _inspect.default)(result))); + } + + return serializedResult; +} +/** + * Complete a value of an abstract type by determining the runtime object type + * of that value, then complete the value for that type. + */ + + +function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) { + var _returnType$resolveTy; + + var resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !== void 0 ? _returnType$resolveTy : exeContext.typeResolver; + var contextValue = exeContext.contextValue; + var runtimeType = resolveTypeFn(result, contextValue, info, returnType); + + if ((0, _isPromise.default)(runtimeType)) { + return runtimeType.then(function (resolvedRuntimeType) { + return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result); + }); + } + + return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result); +} + +function ensureValidRuntimeType(runtimeTypeOrName, exeContext, returnType, fieldNodes, info, result) { + if (runtimeTypeOrName == null) { + throw new _GraphQLError.GraphQLError("Abstract type \"".concat(returnType.name, "\" must resolve to an Object type at runtime for field \"").concat(info.parentType.name, ".").concat(info.fieldName, "\". Either the \"").concat(returnType.name, "\" type should provide a \"resolveType\" function or each possible type should provide an \"isTypeOf\" function."), fieldNodes); + } // FIXME: temporary workaround until support for passing object types would be removed in v16.0.0 + + + var runtimeTypeName = (0, _definition.isNamedType)(runtimeTypeOrName) ? runtimeTypeOrName.name : runtimeTypeOrName; + + if (typeof runtimeTypeName !== 'string') { + throw new _GraphQLError.GraphQLError("Abstract type \"".concat(returnType.name, "\" must resolve to an Object type at runtime for field \"").concat(info.parentType.name, ".").concat(info.fieldName, "\" with ") + "value ".concat((0, _inspect.default)(result), ", received \"").concat((0, _inspect.default)(runtimeTypeOrName), "\".")); + } + + var runtimeType = exeContext.schema.getType(runtimeTypeName); + + if (runtimeType == null) { + throw new _GraphQLError.GraphQLError("Abstract type \"".concat(returnType.name, "\" was resolve to a type \"").concat(runtimeTypeName, "\" that does not exist inside schema."), fieldNodes); + } + + if (!(0, _definition.isObjectType)(runtimeType)) { + throw new _GraphQLError.GraphQLError("Abstract type \"".concat(returnType.name, "\" was resolve to a non-object type \"").concat(runtimeTypeName, "\"."), fieldNodes); + } + + if (!exeContext.schema.isSubType(returnType, runtimeType)) { + throw new _GraphQLError.GraphQLError("Runtime Object type \"".concat(runtimeType.name, "\" is not a possible type for \"").concat(returnType.name, "\"."), fieldNodes); + } + + return runtimeType; +} +/** + * Complete an Object value by executing all sub-selections. + */ + + +function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) { + // If there is an isTypeOf predicate function, call it with the + // current result. If isTypeOf returns false, then raise an error rather + // than continuing execution. + if (returnType.isTypeOf) { + var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info); + + if ((0, _isPromise.default)(isTypeOf)) { + return isTypeOf.then(function (resolvedIsTypeOf) { + if (!resolvedIsTypeOf) { + throw invalidReturnTypeError(returnType, result, fieldNodes); + } + + return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result); + }); + } + + if (!isTypeOf) { + throw invalidReturnTypeError(returnType, result, fieldNodes); + } + } + + return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result); +} + +function invalidReturnTypeError(returnType, result, fieldNodes) { + return new _GraphQLError.GraphQLError("Expected value of type \"".concat(returnType.name, "\" but got: ").concat((0, _inspect.default)(result), "."), fieldNodes); +} + +function collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result) { + // Collect sub-fields to execute to complete this value. + var subFieldNodes = collectSubfields(exeContext, returnType, fieldNodes); + return executeFields(exeContext, returnType, result, path, subFieldNodes); +} +/** + * A memoized collection of relevant subfields with regard to the return + * type. Memoizing ensures the subfields are not repeatedly calculated, which + * saves overhead when resolving lists of values. + */ + + +var collectSubfields = (0, _memoize.default)(_collectSubfields); + +function _collectSubfields(exeContext, returnType, fieldNodes) { + var subFieldNodes = Object.create(null); + var visitedFragmentNames = Object.create(null); + + for (var _i8 = 0; _i8 < fieldNodes.length; _i8++) { + var node = fieldNodes[_i8]; + + if (node.selectionSet) { + subFieldNodes = collectFields(exeContext, returnType, node.selectionSet, subFieldNodes, visitedFragmentNames); + } + } + + return subFieldNodes; +} +/** + * If a resolveType function is not given, then a default resolve behavior is + * used which attempts two strategies: + * + * First, See if the provided value has a `__typename` field defined, if so, use + * that value as name of the resolved type. + * + * Otherwise, test each possible type for the abstract type by calling + * isTypeOf for the object being coerced, returning the first type that matches. + */ + + +var defaultTypeResolver = function defaultTypeResolver(value, contextValue, info, abstractType) { + // First, look for `__typename`. + if ((0, _isObjectLike.default)(value) && typeof value.__typename === 'string') { + return value.__typename; + } // Otherwise, test each possible type. + + + var possibleTypes = info.schema.getPossibleTypes(abstractType); + var promisedIsTypeOfResults = []; + + for (var i = 0; i < possibleTypes.length; i++) { + var type = possibleTypes[i]; + + if (type.isTypeOf) { + var isTypeOfResult = type.isTypeOf(value, contextValue, info); + + if ((0, _isPromise.default)(isTypeOfResult)) { + promisedIsTypeOfResults[i] = isTypeOfResult; + } else if (isTypeOfResult) { + return type.name; + } + } + } + + if (promisedIsTypeOfResults.length) { + return Promise.all(promisedIsTypeOfResults).then(function (isTypeOfResults) { + for (var _i9 = 0; _i9 < isTypeOfResults.length; _i9++) { + if (isTypeOfResults[_i9]) { + return possibleTypes[_i9].name; + } + } + }); + } +}; +/** + * If a resolve function is not given, then a default resolve behavior is used + * which takes the property of the source object of the same name as the field + * and returns it as the result, or if it's a function, returns the result + * of calling that function while passing along args and context value. + */ + + +exports.defaultTypeResolver = defaultTypeResolver; + +var defaultFieldResolver = function defaultFieldResolver(source, args, contextValue, info) { + // ensure source is a value for which property access is acceptable. + if ((0, _isObjectLike.default)(source) || typeof source === 'function') { + var property = source[info.fieldName]; + + if (typeof property === 'function') { + return source[info.fieldName](args, contextValue, info); + } + + return property; + } +}; +/** + * This method looks up the field on the given type definition. + * It has special casing for the three introspection fields, + * __schema, __type and __typename. __typename is special because + * it can always be queried as a field, even in situations where no + * other fields are allowed, like on a Union. __schema and __type + * could get automatically added to the query type, but that would + * require mutating type definitions, which would cause issues. + * + * @internal + */ + + +exports.defaultFieldResolver = defaultFieldResolver; + +function getFieldDef(schema, parentType, fieldName) { + if (fieldName === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) { + return _introspection.SchemaMetaFieldDef; + } else if (fieldName === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) { + return _introspection.TypeMetaFieldDef; + } else if (fieldName === _introspection.TypeNameMetaFieldDef.name) { + return _introspection.TypeNameMetaFieldDef; + } + + return parentType.getFields()[fieldName]; +} + + +/***/ }), + +/***/ 13176: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "responsePathAsArray", ({ + enumerable: true, + get: function get() { + return _Path.pathToArray; + } +})); +Object.defineProperty(exports, "execute", ({ + enumerable: true, + get: function get() { + return _execute.execute; + } +})); +Object.defineProperty(exports, "executeSync", ({ + enumerable: true, + get: function get() { + return _execute.executeSync; + } +})); +Object.defineProperty(exports, "defaultFieldResolver", ({ + enumerable: true, + get: function get() { + return _execute.defaultFieldResolver; + } +})); +Object.defineProperty(exports, "defaultTypeResolver", ({ + enumerable: true, + get: function get() { + return _execute.defaultTypeResolver; + } +})); +Object.defineProperty(exports, "getDirectiveValues", ({ + enumerable: true, + get: function get() { + return _values.getDirectiveValues; + } +})); + +var _Path = __nccwpck_require__(11262); + +var _execute = __nccwpck_require__(83677); + +var _values = __nccwpck_require__(94834); + + +/***/ }), + +/***/ 94834: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getVariableValues = getVariableValues; +exports.getArgumentValues = getArgumentValues; +exports.getDirectiveValues = getDirectiveValues; + +var _find = _interopRequireDefault(__nccwpck_require__(57649)); + +var _keyMap = _interopRequireDefault(__nccwpck_require__(10711)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _printPathArray = _interopRequireDefault(__nccwpck_require__(94281)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +var _printer = __nccwpck_require__(68203); + +var _definition = __nccwpck_require__(5821); + +var _typeFromAST = __nccwpck_require__(27664); + +var _valueFromAST = __nccwpck_require__(83181); + +var _coerceInputValue = __nccwpck_require__(39603); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Prepares an object map of variableValues of the correct type based on the + * provided variable definitions and arbitrary input. If the input cannot be + * parsed to match the variable definitions, a GraphQLError will be thrown. + * + * Note: The returned value is a plain Object with a prototype, since it is + * exposed to user code. Care should be taken to not pull values from the + * Object prototype. + * + * @internal + */ +function getVariableValues(schema, varDefNodes, inputs, options) { + var errors = []; + var maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors; + + try { + var coerced = coerceVariableValues(schema, varDefNodes, inputs, function (error) { + if (maxErrors != null && errors.length >= maxErrors) { + throw new _GraphQLError.GraphQLError('Too many errors processing variables, error limit reached. Execution aborted.'); + } + + errors.push(error); + }); + + if (errors.length === 0) { + return { + coerced: coerced + }; + } + } catch (error) { + errors.push(error); + } + + return { + errors: errors + }; +} + +function coerceVariableValues(schema, varDefNodes, inputs, onError) { + var coercedValues = {}; + + var _loop = function _loop(_i2) { + var varDefNode = varDefNodes[_i2]; + var varName = varDefNode.variable.name.value; + var varType = (0, _typeFromAST.typeFromAST)(schema, varDefNode.type); + + if (!(0, _definition.isInputType)(varType)) { + // Must use input types for variables. This should be caught during + // validation, however is checked again here for safety. + var varTypeStr = (0, _printer.print)(varDefNode.type); + onError(new _GraphQLError.GraphQLError("Variable \"$".concat(varName, "\" expected value of type \"").concat(varTypeStr, "\" which cannot be used as an input type."), varDefNode.type)); + return "continue"; + } + + if (!hasOwnProperty(inputs, varName)) { + if (varDefNode.defaultValue) { + coercedValues[varName] = (0, _valueFromAST.valueFromAST)(varDefNode.defaultValue, varType); + } else if ((0, _definition.isNonNullType)(varType)) { + var _varTypeStr = (0, _inspect.default)(varType); + + onError(new _GraphQLError.GraphQLError("Variable \"$".concat(varName, "\" of required type \"").concat(_varTypeStr, "\" was not provided."), varDefNode)); + } + + return "continue"; + } + + var value = inputs[varName]; + + if (value === null && (0, _definition.isNonNullType)(varType)) { + var _varTypeStr2 = (0, _inspect.default)(varType); + + onError(new _GraphQLError.GraphQLError("Variable \"$".concat(varName, "\" of non-null type \"").concat(_varTypeStr2, "\" must not be null."), varDefNode)); + return "continue"; + } + + coercedValues[varName] = (0, _coerceInputValue.coerceInputValue)(value, varType, function (path, invalidValue, error) { + var prefix = "Variable \"$".concat(varName, "\" got invalid value ") + (0, _inspect.default)(invalidValue); + + if (path.length > 0) { + prefix += " at \"".concat(varName).concat((0, _printPathArray.default)(path), "\""); + } + + onError(new _GraphQLError.GraphQLError(prefix + '; ' + error.message, varDefNode, undefined, undefined, undefined, error.originalError)); + }); + }; + + for (var _i2 = 0; _i2 < varDefNodes.length; _i2++) { + var _ret = _loop(_i2); + + if (_ret === "continue") continue; + } + + return coercedValues; +} +/** + * Prepares an object map of argument values given a list of argument + * definitions and list of argument AST nodes. + * + * Note: The returned value is a plain Object with a prototype, since it is + * exposed to user code. Care should be taken to not pull values from the + * Object prototype. + * + * @internal + */ + + +function getArgumentValues(def, node, variableValues) { + var _node$arguments; + + var coercedValues = {}; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + + var argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !== void 0 ? _node$arguments : []; + var argNodeMap = (0, _keyMap.default)(argumentNodes, function (arg) { + return arg.name.value; + }); + + for (var _i4 = 0, _def$args2 = def.args; _i4 < _def$args2.length; _i4++) { + var argDef = _def$args2[_i4]; + var name = argDef.name; + var argType = argDef.type; + var argumentNode = argNodeMap[name]; + + if (!argumentNode) { + if (argDef.defaultValue !== undefined) { + coercedValues[name] = argDef.defaultValue; + } else if ((0, _definition.isNonNullType)(argType)) { + throw new _GraphQLError.GraphQLError("Argument \"".concat(name, "\" of required type \"").concat((0, _inspect.default)(argType), "\" ") + 'was not provided.', node); + } + + continue; + } + + var valueNode = argumentNode.value; + var isNull = valueNode.kind === _kinds.Kind.NULL; + + if (valueNode.kind === _kinds.Kind.VARIABLE) { + var variableName = valueNode.name.value; + + if (variableValues == null || !hasOwnProperty(variableValues, variableName)) { + if (argDef.defaultValue !== undefined) { + coercedValues[name] = argDef.defaultValue; + } else if ((0, _definition.isNonNullType)(argType)) { + throw new _GraphQLError.GraphQLError("Argument \"".concat(name, "\" of required type \"").concat((0, _inspect.default)(argType), "\" ") + "was provided the variable \"$".concat(variableName, "\" which was not provided a runtime value."), valueNode); + } + + continue; + } + + isNull = variableValues[variableName] == null; + } + + if (isNull && (0, _definition.isNonNullType)(argType)) { + throw new _GraphQLError.GraphQLError("Argument \"".concat(name, "\" of non-null type \"").concat((0, _inspect.default)(argType), "\" ") + 'must not be null.', valueNode); + } + + var coercedValue = (0, _valueFromAST.valueFromAST)(valueNode, argType, variableValues); + + if (coercedValue === undefined) { + // Note: ValuesOfCorrectTypeRule validation should catch this before + // execution. This is a runtime check to ensure execution does not + // continue with an invalid argument value. + throw new _GraphQLError.GraphQLError("Argument \"".concat(name, "\" has invalid value ").concat((0, _printer.print)(valueNode), "."), valueNode); + } + + coercedValues[name] = coercedValue; + } + + return coercedValues; +} +/** + * Prepares an object map of argument values given a directive definition + * and a AST node which may contain directives. Optionally also accepts a map + * of variable values. + * + * If the directive does not exist on the node, returns undefined. + * + * Note: The returned value is a plain Object with a prototype, since it is + * exposed to user code. Care should be taken to not pull values from the + * Object prototype. + */ + + +function getDirectiveValues(directiveDef, node, variableValues) { + var directiveNode = node.directives && (0, _find.default)(node.directives, function (directive) { + return directive.name.value === directiveDef.name; + }); + + if (directiveNode) { + return getArgumentValues(directiveDef, directiveNode, variableValues); + } +} + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + + +/***/ }), + +/***/ 64215: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.graphql = graphql; +exports.graphqlSync = graphqlSync; + +var _isPromise = _interopRequireDefault(__nccwpck_require__(93910)); + +var _parser = __nccwpck_require__(50655); + +var _validate = __nccwpck_require__(14193); + +var _validate2 = __nccwpck_require__(22430); + +var _execute = __nccwpck_require__(83677); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function graphql(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) { + var _arguments = arguments; + + /* eslint-enable no-redeclare */ + // Always return a Promise for a consistent API. + return new Promise(function (resolve) { + return resolve( // Extract arguments from object args if provided. + _arguments.length === 1 ? graphqlImpl(argsOrSchema) : graphqlImpl({ + schema: argsOrSchema, + source: source, + rootValue: rootValue, + contextValue: contextValue, + variableValues: variableValues, + operationName: operationName, + fieldResolver: fieldResolver, + typeResolver: typeResolver + })); + }); +} +/** + * The graphqlSync function also fulfills GraphQL operations by parsing, + * validating, and executing a GraphQL document along side a GraphQL schema. + * However, it guarantees to complete synchronously (or throw an error) assuming + * that all field resolvers are also synchronous. + */ + + +function graphqlSync(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) { + /* eslint-enable no-redeclare */ + // Extract arguments from object args if provided. + var result = arguments.length === 1 ? graphqlImpl(argsOrSchema) : graphqlImpl({ + schema: argsOrSchema, + source: source, + rootValue: rootValue, + contextValue: contextValue, + variableValues: variableValues, + operationName: operationName, + fieldResolver: fieldResolver, + typeResolver: typeResolver + }); // Assert that the execution was synchronous. + + if ((0, _isPromise.default)(result)) { + throw new Error('GraphQL execution failed to complete synchronously.'); + } + + return result; +} + +function graphqlImpl(args) { + var schema = args.schema, + source = args.source, + rootValue = args.rootValue, + contextValue = args.contextValue, + variableValues = args.variableValues, + operationName = args.operationName, + fieldResolver = args.fieldResolver, + typeResolver = args.typeResolver; // Validate Schema + + var schemaValidationErrors = (0, _validate2.validateSchema)(schema); + + if (schemaValidationErrors.length > 0) { + return { + errors: schemaValidationErrors + }; + } // Parse + + + var document; + + try { + document = (0, _parser.parse)(source); + } catch (syntaxError) { + return { + errors: [syntaxError] + }; + } // Validate + + + var validationErrors = (0, _validate.validate)(schema, document); + + if (validationErrors.length > 0) { + return { + errors: validationErrors + }; + } // Execute + + + return (0, _execute.execute)({ + schema: schema, + document: document, + rootValue: rootValue, + contextValue: contextValue, + variableValues: variableValues, + operationName: operationName, + fieldResolver: fieldResolver, + typeResolver: typeResolver + }); +} + + +/***/ }), + +/***/ 16155: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function get() { + return _version.version; + } +})); +Object.defineProperty(exports, "versionInfo", ({ + enumerable: true, + get: function get() { + return _version.versionInfo; + } +})); +Object.defineProperty(exports, "graphql", ({ + enumerable: true, + get: function get() { + return _graphql.graphql; + } +})); +Object.defineProperty(exports, "graphqlSync", ({ + enumerable: true, + get: function get() { + return _graphql.graphqlSync; + } +})); +Object.defineProperty(exports, "GraphQLSchema", ({ + enumerable: true, + get: function get() { + return _index.GraphQLSchema; + } +})); +Object.defineProperty(exports, "GraphQLDirective", ({ + enumerable: true, + get: function get() { + return _index.GraphQLDirective; + } +})); +Object.defineProperty(exports, "GraphQLScalarType", ({ + enumerable: true, + get: function get() { + return _index.GraphQLScalarType; + } +})); +Object.defineProperty(exports, "GraphQLObjectType", ({ + enumerable: true, + get: function get() { + return _index.GraphQLObjectType; + } +})); +Object.defineProperty(exports, "GraphQLInterfaceType", ({ + enumerable: true, + get: function get() { + return _index.GraphQLInterfaceType; + } +})); +Object.defineProperty(exports, "GraphQLUnionType", ({ + enumerable: true, + get: function get() { + return _index.GraphQLUnionType; + } +})); +Object.defineProperty(exports, "GraphQLEnumType", ({ + enumerable: true, + get: function get() { + return _index.GraphQLEnumType; + } +})); +Object.defineProperty(exports, "GraphQLInputObjectType", ({ + enumerable: true, + get: function get() { + return _index.GraphQLInputObjectType; + } +})); +Object.defineProperty(exports, "GraphQLList", ({ + enumerable: true, + get: function get() { + return _index.GraphQLList; + } +})); +Object.defineProperty(exports, "GraphQLNonNull", ({ + enumerable: true, + get: function get() { + return _index.GraphQLNonNull; + } +})); +Object.defineProperty(exports, "specifiedScalarTypes", ({ + enumerable: true, + get: function get() { + return _index.specifiedScalarTypes; + } +})); +Object.defineProperty(exports, "GraphQLInt", ({ + enumerable: true, + get: function get() { + return _index.GraphQLInt; + } +})); +Object.defineProperty(exports, "GraphQLFloat", ({ + enumerable: true, + get: function get() { + return _index.GraphQLFloat; + } +})); +Object.defineProperty(exports, "GraphQLString", ({ + enumerable: true, + get: function get() { + return _index.GraphQLString; + } +})); +Object.defineProperty(exports, "GraphQLBoolean", ({ + enumerable: true, + get: function get() { + return _index.GraphQLBoolean; + } +})); +Object.defineProperty(exports, "GraphQLID", ({ + enumerable: true, + get: function get() { + return _index.GraphQLID; + } +})); +Object.defineProperty(exports, "specifiedDirectives", ({ + enumerable: true, + get: function get() { + return _index.specifiedDirectives; + } +})); +Object.defineProperty(exports, "GraphQLIncludeDirective", ({ + enumerable: true, + get: function get() { + return _index.GraphQLIncludeDirective; + } +})); +Object.defineProperty(exports, "GraphQLSkipDirective", ({ + enumerable: true, + get: function get() { + return _index.GraphQLSkipDirective; + } +})); +Object.defineProperty(exports, "GraphQLDeprecatedDirective", ({ + enumerable: true, + get: function get() { + return _index.GraphQLDeprecatedDirective; + } +})); +Object.defineProperty(exports, "GraphQLSpecifiedByDirective", ({ + enumerable: true, + get: function get() { + return _index.GraphQLSpecifiedByDirective; + } +})); +Object.defineProperty(exports, "TypeKind", ({ + enumerable: true, + get: function get() { + return _index.TypeKind; + } +})); +Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", ({ + enumerable: true, + get: function get() { + return _index.DEFAULT_DEPRECATION_REASON; + } +})); +Object.defineProperty(exports, "introspectionTypes", ({ + enumerable: true, + get: function get() { + return _index.introspectionTypes; + } +})); +Object.defineProperty(exports, "__Schema", ({ + enumerable: true, + get: function get() { + return _index.__Schema; + } +})); +Object.defineProperty(exports, "__Directive", ({ + enumerable: true, + get: function get() { + return _index.__Directive; + } +})); +Object.defineProperty(exports, "__DirectiveLocation", ({ + enumerable: true, + get: function get() { + return _index.__DirectiveLocation; + } +})); +Object.defineProperty(exports, "__Type", ({ + enumerable: true, + get: function get() { + return _index.__Type; + } +})); +Object.defineProperty(exports, "__Field", ({ + enumerable: true, + get: function get() { + return _index.__Field; + } +})); +Object.defineProperty(exports, "__InputValue", ({ + enumerable: true, + get: function get() { + return _index.__InputValue; + } +})); +Object.defineProperty(exports, "__EnumValue", ({ + enumerable: true, + get: function get() { + return _index.__EnumValue; + } +})); +Object.defineProperty(exports, "__TypeKind", ({ + enumerable: true, + get: function get() { + return _index.__TypeKind; + } +})); +Object.defineProperty(exports, "SchemaMetaFieldDef", ({ + enumerable: true, + get: function get() { + return _index.SchemaMetaFieldDef; + } +})); +Object.defineProperty(exports, "TypeMetaFieldDef", ({ + enumerable: true, + get: function get() { + return _index.TypeMetaFieldDef; + } +})); +Object.defineProperty(exports, "TypeNameMetaFieldDef", ({ + enumerable: true, + get: function get() { + return _index.TypeNameMetaFieldDef; + } +})); +Object.defineProperty(exports, "isSchema", ({ + enumerable: true, + get: function get() { + return _index.isSchema; + } +})); +Object.defineProperty(exports, "isDirective", ({ + enumerable: true, + get: function get() { + return _index.isDirective; + } +})); +Object.defineProperty(exports, "isType", ({ + enumerable: true, + get: function get() { + return _index.isType; + } +})); +Object.defineProperty(exports, "isScalarType", ({ + enumerable: true, + get: function get() { + return _index.isScalarType; + } +})); +Object.defineProperty(exports, "isObjectType", ({ + enumerable: true, + get: function get() { + return _index.isObjectType; + } +})); +Object.defineProperty(exports, "isInterfaceType", ({ + enumerable: true, + get: function get() { + return _index.isInterfaceType; + } +})); +Object.defineProperty(exports, "isUnionType", ({ + enumerable: true, + get: function get() { + return _index.isUnionType; + } +})); +Object.defineProperty(exports, "isEnumType", ({ + enumerable: true, + get: function get() { + return _index.isEnumType; + } +})); +Object.defineProperty(exports, "isInputObjectType", ({ + enumerable: true, + get: function get() { + return _index.isInputObjectType; + } +})); +Object.defineProperty(exports, "isListType", ({ + enumerable: true, + get: function get() { + return _index.isListType; + } +})); +Object.defineProperty(exports, "isNonNullType", ({ + enumerable: true, + get: function get() { + return _index.isNonNullType; + } +})); +Object.defineProperty(exports, "isInputType", ({ + enumerable: true, + get: function get() { + return _index.isInputType; + } +})); +Object.defineProperty(exports, "isOutputType", ({ + enumerable: true, + get: function get() { + return _index.isOutputType; + } +})); +Object.defineProperty(exports, "isLeafType", ({ + enumerable: true, + get: function get() { + return _index.isLeafType; + } +})); +Object.defineProperty(exports, "isCompositeType", ({ + enumerable: true, + get: function get() { + return _index.isCompositeType; + } +})); +Object.defineProperty(exports, "isAbstractType", ({ + enumerable: true, + get: function get() { + return _index.isAbstractType; + } +})); +Object.defineProperty(exports, "isWrappingType", ({ + enumerable: true, + get: function get() { + return _index.isWrappingType; + } +})); +Object.defineProperty(exports, "isNullableType", ({ + enumerable: true, + get: function get() { + return _index.isNullableType; + } +})); +Object.defineProperty(exports, "isNamedType", ({ + enumerable: true, + get: function get() { + return _index.isNamedType; + } +})); +Object.defineProperty(exports, "isRequiredArgument", ({ + enumerable: true, + get: function get() { + return _index.isRequiredArgument; + } +})); +Object.defineProperty(exports, "isRequiredInputField", ({ + enumerable: true, + get: function get() { + return _index.isRequiredInputField; + } +})); +Object.defineProperty(exports, "isSpecifiedScalarType", ({ + enumerable: true, + get: function get() { + return _index.isSpecifiedScalarType; + } +})); +Object.defineProperty(exports, "isIntrospectionType", ({ + enumerable: true, + get: function get() { + return _index.isIntrospectionType; + } +})); +Object.defineProperty(exports, "isSpecifiedDirective", ({ + enumerable: true, + get: function get() { + return _index.isSpecifiedDirective; + } +})); +Object.defineProperty(exports, "assertSchema", ({ + enumerable: true, + get: function get() { + return _index.assertSchema; + } +})); +Object.defineProperty(exports, "assertDirective", ({ + enumerable: true, + get: function get() { + return _index.assertDirective; + } +})); +Object.defineProperty(exports, "assertType", ({ + enumerable: true, + get: function get() { + return _index.assertType; + } +})); +Object.defineProperty(exports, "assertScalarType", ({ + enumerable: true, + get: function get() { + return _index.assertScalarType; + } +})); +Object.defineProperty(exports, "assertObjectType", ({ + enumerable: true, + get: function get() { + return _index.assertObjectType; + } +})); +Object.defineProperty(exports, "assertInterfaceType", ({ + enumerable: true, + get: function get() { + return _index.assertInterfaceType; + } +})); +Object.defineProperty(exports, "assertUnionType", ({ + enumerable: true, + get: function get() { + return _index.assertUnionType; + } +})); +Object.defineProperty(exports, "assertEnumType", ({ + enumerable: true, + get: function get() { + return _index.assertEnumType; + } +})); +Object.defineProperty(exports, "assertInputObjectType", ({ + enumerable: true, + get: function get() { + return _index.assertInputObjectType; + } +})); +Object.defineProperty(exports, "assertListType", ({ + enumerable: true, + get: function get() { + return _index.assertListType; + } +})); +Object.defineProperty(exports, "assertNonNullType", ({ + enumerable: true, + get: function get() { + return _index.assertNonNullType; + } +})); +Object.defineProperty(exports, "assertInputType", ({ + enumerable: true, + get: function get() { + return _index.assertInputType; + } +})); +Object.defineProperty(exports, "assertOutputType", ({ + enumerable: true, + get: function get() { + return _index.assertOutputType; + } +})); +Object.defineProperty(exports, "assertLeafType", ({ + enumerable: true, + get: function get() { + return _index.assertLeafType; + } +})); +Object.defineProperty(exports, "assertCompositeType", ({ + enumerable: true, + get: function get() { + return _index.assertCompositeType; + } +})); +Object.defineProperty(exports, "assertAbstractType", ({ + enumerable: true, + get: function get() { + return _index.assertAbstractType; + } +})); +Object.defineProperty(exports, "assertWrappingType", ({ + enumerable: true, + get: function get() { + return _index.assertWrappingType; + } +})); +Object.defineProperty(exports, "assertNullableType", ({ + enumerable: true, + get: function get() { + return _index.assertNullableType; + } +})); +Object.defineProperty(exports, "assertNamedType", ({ + enumerable: true, + get: function get() { + return _index.assertNamedType; + } +})); +Object.defineProperty(exports, "getNullableType", ({ + enumerable: true, + get: function get() { + return _index.getNullableType; + } +})); +Object.defineProperty(exports, "getNamedType", ({ + enumerable: true, + get: function get() { + return _index.getNamedType; + } +})); +Object.defineProperty(exports, "validateSchema", ({ + enumerable: true, + get: function get() { + return _index.validateSchema; + } +})); +Object.defineProperty(exports, "assertValidSchema", ({ + enumerable: true, + get: function get() { + return _index.assertValidSchema; + } +})); +Object.defineProperty(exports, "Token", ({ + enumerable: true, + get: function get() { + return _index2.Token; + } +})); +Object.defineProperty(exports, "Source", ({ + enumerable: true, + get: function get() { + return _index2.Source; + } +})); +Object.defineProperty(exports, "Location", ({ + enumerable: true, + get: function get() { + return _index2.Location; + } +})); +Object.defineProperty(exports, "getLocation", ({ + enumerable: true, + get: function get() { + return _index2.getLocation; + } +})); +Object.defineProperty(exports, "printLocation", ({ + enumerable: true, + get: function get() { + return _index2.printLocation; + } +})); +Object.defineProperty(exports, "printSourceLocation", ({ + enumerable: true, + get: function get() { + return _index2.printSourceLocation; + } +})); +Object.defineProperty(exports, "Lexer", ({ + enumerable: true, + get: function get() { + return _index2.Lexer; + } +})); +Object.defineProperty(exports, "TokenKind", ({ + enumerable: true, + get: function get() { + return _index2.TokenKind; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function get() { + return _index2.parse; + } +})); +Object.defineProperty(exports, "parseValue", ({ + enumerable: true, + get: function get() { + return _index2.parseValue; + } +})); +Object.defineProperty(exports, "parseType", ({ + enumerable: true, + get: function get() { + return _index2.parseType; + } +})); +Object.defineProperty(exports, "print", ({ + enumerable: true, + get: function get() { + return _index2.print; + } +})); +Object.defineProperty(exports, "visit", ({ + enumerable: true, + get: function get() { + return _index2.visit; + } +})); +Object.defineProperty(exports, "visitInParallel", ({ + enumerable: true, + get: function get() { + return _index2.visitInParallel; + } +})); +Object.defineProperty(exports, "getVisitFn", ({ + enumerable: true, + get: function get() { + return _index2.getVisitFn; + } +})); +Object.defineProperty(exports, "BREAK", ({ + enumerable: true, + get: function get() { + return _index2.BREAK; + } +})); +Object.defineProperty(exports, "Kind", ({ + enumerable: true, + get: function get() { + return _index2.Kind; + } +})); +Object.defineProperty(exports, "DirectiveLocation", ({ + enumerable: true, + get: function get() { + return _index2.DirectiveLocation; + } +})); +Object.defineProperty(exports, "isDefinitionNode", ({ + enumerable: true, + get: function get() { + return _index2.isDefinitionNode; + } +})); +Object.defineProperty(exports, "isExecutableDefinitionNode", ({ + enumerable: true, + get: function get() { + return _index2.isExecutableDefinitionNode; + } +})); +Object.defineProperty(exports, "isSelectionNode", ({ + enumerable: true, + get: function get() { + return _index2.isSelectionNode; + } +})); +Object.defineProperty(exports, "isValueNode", ({ + enumerable: true, + get: function get() { + return _index2.isValueNode; + } +})); +Object.defineProperty(exports, "isTypeNode", ({ + enumerable: true, + get: function get() { + return _index2.isTypeNode; + } +})); +Object.defineProperty(exports, "isTypeSystemDefinitionNode", ({ + enumerable: true, + get: function get() { + return _index2.isTypeSystemDefinitionNode; + } +})); +Object.defineProperty(exports, "isTypeDefinitionNode", ({ + enumerable: true, + get: function get() { + return _index2.isTypeDefinitionNode; + } +})); +Object.defineProperty(exports, "isTypeSystemExtensionNode", ({ + enumerable: true, + get: function get() { + return _index2.isTypeSystemExtensionNode; + } +})); +Object.defineProperty(exports, "isTypeExtensionNode", ({ + enumerable: true, + get: function get() { + return _index2.isTypeExtensionNode; + } +})); +Object.defineProperty(exports, "execute", ({ + enumerable: true, + get: function get() { + return _index3.execute; + } +})); +Object.defineProperty(exports, "executeSync", ({ + enumerable: true, + get: function get() { + return _index3.executeSync; + } +})); +Object.defineProperty(exports, "defaultFieldResolver", ({ + enumerable: true, + get: function get() { + return _index3.defaultFieldResolver; + } +})); +Object.defineProperty(exports, "defaultTypeResolver", ({ + enumerable: true, + get: function get() { + return _index3.defaultTypeResolver; + } +})); +Object.defineProperty(exports, "responsePathAsArray", ({ + enumerable: true, + get: function get() { + return _index3.responsePathAsArray; + } +})); +Object.defineProperty(exports, "getDirectiveValues", ({ + enumerable: true, + get: function get() { + return _index3.getDirectiveValues; + } +})); +Object.defineProperty(exports, "subscribe", ({ + enumerable: true, + get: function get() { + return _index4.subscribe; + } +})); +Object.defineProperty(exports, "createSourceEventStream", ({ + enumerable: true, + get: function get() { + return _index4.createSourceEventStream; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function get() { + return _index5.validate; + } +})); +Object.defineProperty(exports, "ValidationContext", ({ + enumerable: true, + get: function get() { + return _index5.ValidationContext; + } +})); +Object.defineProperty(exports, "specifiedRules", ({ + enumerable: true, + get: function get() { + return _index5.specifiedRules; + } +})); +Object.defineProperty(exports, "ExecutableDefinitionsRule", ({ + enumerable: true, + get: function get() { + return _index5.ExecutableDefinitionsRule; + } +})); +Object.defineProperty(exports, "FieldsOnCorrectTypeRule", ({ + enumerable: true, + get: function get() { + return _index5.FieldsOnCorrectTypeRule; + } +})); +Object.defineProperty(exports, "FragmentsOnCompositeTypesRule", ({ + enumerable: true, + get: function get() { + return _index5.FragmentsOnCompositeTypesRule; + } +})); +Object.defineProperty(exports, "KnownArgumentNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.KnownArgumentNamesRule; + } +})); +Object.defineProperty(exports, "KnownDirectivesRule", ({ + enumerable: true, + get: function get() { + return _index5.KnownDirectivesRule; + } +})); +Object.defineProperty(exports, "KnownFragmentNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.KnownFragmentNamesRule; + } +})); +Object.defineProperty(exports, "KnownTypeNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.KnownTypeNamesRule; + } +})); +Object.defineProperty(exports, "LoneAnonymousOperationRule", ({ + enumerable: true, + get: function get() { + return _index5.LoneAnonymousOperationRule; + } +})); +Object.defineProperty(exports, "NoFragmentCyclesRule", ({ + enumerable: true, + get: function get() { + return _index5.NoFragmentCyclesRule; + } +})); +Object.defineProperty(exports, "NoUndefinedVariablesRule", ({ + enumerable: true, + get: function get() { + return _index5.NoUndefinedVariablesRule; + } +})); +Object.defineProperty(exports, "NoUnusedFragmentsRule", ({ + enumerable: true, + get: function get() { + return _index5.NoUnusedFragmentsRule; + } +})); +Object.defineProperty(exports, "NoUnusedVariablesRule", ({ + enumerable: true, + get: function get() { + return _index5.NoUnusedVariablesRule; + } +})); +Object.defineProperty(exports, "OverlappingFieldsCanBeMergedRule", ({ + enumerable: true, + get: function get() { + return _index5.OverlappingFieldsCanBeMergedRule; + } +})); +Object.defineProperty(exports, "PossibleFragmentSpreadsRule", ({ + enumerable: true, + get: function get() { + return _index5.PossibleFragmentSpreadsRule; + } +})); +Object.defineProperty(exports, "ProvidedRequiredArgumentsRule", ({ + enumerable: true, + get: function get() { + return _index5.ProvidedRequiredArgumentsRule; + } +})); +Object.defineProperty(exports, "ScalarLeafsRule", ({ + enumerable: true, + get: function get() { + return _index5.ScalarLeafsRule; + } +})); +Object.defineProperty(exports, "SingleFieldSubscriptionsRule", ({ + enumerable: true, + get: function get() { + return _index5.SingleFieldSubscriptionsRule; + } +})); +Object.defineProperty(exports, "UniqueArgumentNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueArgumentNamesRule; + } +})); +Object.defineProperty(exports, "UniqueDirectivesPerLocationRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueDirectivesPerLocationRule; + } +})); +Object.defineProperty(exports, "UniqueFragmentNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueFragmentNamesRule; + } +})); +Object.defineProperty(exports, "UniqueInputFieldNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueInputFieldNamesRule; + } +})); +Object.defineProperty(exports, "UniqueOperationNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueOperationNamesRule; + } +})); +Object.defineProperty(exports, "UniqueVariableNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueVariableNamesRule; + } +})); +Object.defineProperty(exports, "ValuesOfCorrectTypeRule", ({ + enumerable: true, + get: function get() { + return _index5.ValuesOfCorrectTypeRule; + } +})); +Object.defineProperty(exports, "VariablesAreInputTypesRule", ({ + enumerable: true, + get: function get() { + return _index5.VariablesAreInputTypesRule; + } +})); +Object.defineProperty(exports, "VariablesInAllowedPositionRule", ({ + enumerable: true, + get: function get() { + return _index5.VariablesInAllowedPositionRule; + } +})); +Object.defineProperty(exports, "LoneSchemaDefinitionRule", ({ + enumerable: true, + get: function get() { + return _index5.LoneSchemaDefinitionRule; + } +})); +Object.defineProperty(exports, "UniqueOperationTypesRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueOperationTypesRule; + } +})); +Object.defineProperty(exports, "UniqueTypeNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueTypeNamesRule; + } +})); +Object.defineProperty(exports, "UniqueEnumValueNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueEnumValueNamesRule; + } +})); +Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueFieldDefinitionNamesRule; + } +})); +Object.defineProperty(exports, "UniqueDirectiveNamesRule", ({ + enumerable: true, + get: function get() { + return _index5.UniqueDirectiveNamesRule; + } +})); +Object.defineProperty(exports, "PossibleTypeExtensionsRule", ({ + enumerable: true, + get: function get() { + return _index5.PossibleTypeExtensionsRule; + } +})); +Object.defineProperty(exports, "NoDeprecatedCustomRule", ({ + enumerable: true, + get: function get() { + return _index5.NoDeprecatedCustomRule; + } +})); +Object.defineProperty(exports, "NoSchemaIntrospectionCustomRule", ({ + enumerable: true, + get: function get() { + return _index5.NoSchemaIntrospectionCustomRule; + } +})); +Object.defineProperty(exports, "GraphQLError", ({ + enumerable: true, + get: function get() { + return _index6.GraphQLError; + } +})); +Object.defineProperty(exports, "syntaxError", ({ + enumerable: true, + get: function get() { + return _index6.syntaxError; + } +})); +Object.defineProperty(exports, "locatedError", ({ + enumerable: true, + get: function get() { + return _index6.locatedError; + } +})); +Object.defineProperty(exports, "printError", ({ + enumerable: true, + get: function get() { + return _index6.printError; + } +})); +Object.defineProperty(exports, "formatError", ({ + enumerable: true, + get: function get() { + return _index6.formatError; + } +})); +Object.defineProperty(exports, "getIntrospectionQuery", ({ + enumerable: true, + get: function get() { + return _index7.getIntrospectionQuery; + } +})); +Object.defineProperty(exports, "getOperationAST", ({ + enumerable: true, + get: function get() { + return _index7.getOperationAST; + } +})); +Object.defineProperty(exports, "getOperationRootType", ({ + enumerable: true, + get: function get() { + return _index7.getOperationRootType; + } +})); +Object.defineProperty(exports, "introspectionFromSchema", ({ + enumerable: true, + get: function get() { + return _index7.introspectionFromSchema; + } +})); +Object.defineProperty(exports, "buildClientSchema", ({ + enumerable: true, + get: function get() { + return _index7.buildClientSchema; + } +})); +Object.defineProperty(exports, "buildASTSchema", ({ + enumerable: true, + get: function get() { + return _index7.buildASTSchema; + } +})); +Object.defineProperty(exports, "buildSchema", ({ + enumerable: true, + get: function get() { + return _index7.buildSchema; + } +})); +Object.defineProperty(exports, "getDescription", ({ + enumerable: true, + get: function get() { + return _index7.getDescription; + } +})); +Object.defineProperty(exports, "extendSchema", ({ + enumerable: true, + get: function get() { + return _index7.extendSchema; + } +})); +Object.defineProperty(exports, "lexicographicSortSchema", ({ + enumerable: true, + get: function get() { + return _index7.lexicographicSortSchema; + } +})); +Object.defineProperty(exports, "printSchema", ({ + enumerable: true, + get: function get() { + return _index7.printSchema; + } +})); +Object.defineProperty(exports, "printType", ({ + enumerable: true, + get: function get() { + return _index7.printType; + } +})); +Object.defineProperty(exports, "printIntrospectionSchema", ({ + enumerable: true, + get: function get() { + return _index7.printIntrospectionSchema; + } +})); +Object.defineProperty(exports, "typeFromAST", ({ + enumerable: true, + get: function get() { + return _index7.typeFromAST; + } +})); +Object.defineProperty(exports, "valueFromAST", ({ + enumerable: true, + get: function get() { + return _index7.valueFromAST; + } +})); +Object.defineProperty(exports, "valueFromASTUntyped", ({ + enumerable: true, + get: function get() { + return _index7.valueFromASTUntyped; + } +})); +Object.defineProperty(exports, "astFromValue", ({ + enumerable: true, + get: function get() { + return _index7.astFromValue; + } +})); +Object.defineProperty(exports, "TypeInfo", ({ + enumerable: true, + get: function get() { + return _index7.TypeInfo; + } +})); +Object.defineProperty(exports, "visitWithTypeInfo", ({ + enumerable: true, + get: function get() { + return _index7.visitWithTypeInfo; + } +})); +Object.defineProperty(exports, "coerceInputValue", ({ + enumerable: true, + get: function get() { + return _index7.coerceInputValue; + } +})); +Object.defineProperty(exports, "concatAST", ({ + enumerable: true, + get: function get() { + return _index7.concatAST; + } +})); +Object.defineProperty(exports, "separateOperations", ({ + enumerable: true, + get: function get() { + return _index7.separateOperations; + } +})); +Object.defineProperty(exports, "stripIgnoredCharacters", ({ + enumerable: true, + get: function get() { + return _index7.stripIgnoredCharacters; + } +})); +Object.defineProperty(exports, "isEqualType", ({ + enumerable: true, + get: function get() { + return _index7.isEqualType; + } +})); +Object.defineProperty(exports, "isTypeSubTypeOf", ({ + enumerable: true, + get: function get() { + return _index7.isTypeSubTypeOf; + } +})); +Object.defineProperty(exports, "doTypesOverlap", ({ + enumerable: true, + get: function get() { + return _index7.doTypesOverlap; + } +})); +Object.defineProperty(exports, "assertValidName", ({ + enumerable: true, + get: function get() { + return _index7.assertValidName; + } +})); +Object.defineProperty(exports, "isValidNameError", ({ + enumerable: true, + get: function get() { + return _index7.isValidNameError; + } +})); +Object.defineProperty(exports, "BreakingChangeType", ({ + enumerable: true, + get: function get() { + return _index7.BreakingChangeType; + } +})); +Object.defineProperty(exports, "DangerousChangeType", ({ + enumerable: true, + get: function get() { + return _index7.DangerousChangeType; + } +})); +Object.defineProperty(exports, "findBreakingChanges", ({ + enumerable: true, + get: function get() { + return _index7.findBreakingChanges; + } +})); +Object.defineProperty(exports, "findDangerousChanges", ({ + enumerable: true, + get: function get() { + return _index7.findDangerousChanges; + } +})); +Object.defineProperty(exports, "findDeprecatedUsages", ({ + enumerable: true, + get: function get() { + return _index7.findDeprecatedUsages; + } +})); + +var _version = __nccwpck_require__(81923); + +var _graphql = __nccwpck_require__(64215); + +var _index = __nccwpck_require__(63280); + +var _index2 = __nccwpck_require__(89537); + +var _index3 = __nccwpck_require__(13176); + +var _index4 = __nccwpck_require__(17575); + +var _index5 = __nccwpck_require__(82201); + +var _index6 = __nccwpck_require__(50578); + +var _index7 = __nccwpck_require__(676); + + +/***/ }), + +/***/ 11262: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.addPath = addPath; +exports.pathToArray = pathToArray; + +/** + * Given a Path and a key, return a new Path containing the new key. + */ +function addPath(prev, key, typename) { + return { + prev: prev, + key: key, + typename: typename + }; +} +/** + * Given a Path, return an Array of the path keys. + */ + + +function pathToArray(path) { + var flattened = []; + var curr = path; + + while (curr) { + flattened.push(curr.key); + curr = curr.prev; + } + + return flattened.reverse(); +} + + +/***/ }), + +/***/ 73965: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = defineInspect; + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _nodejsCustomInspectSymbol = _interopRequireDefault(__nccwpck_require__(84755)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON` + */ +function defineInspect(classObject) { + var fn = classObject.prototype.toJSON; + typeof fn === 'function' || (0, _invariant.default)(0); + classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317') + + if (_nodejsCustomInspectSymbol.default) { + classObject.prototype[_nodejsCustomInspectSymbol.default] = fn; + } +} + + +/***/ }), + +/***/ 46514: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = devAssert; + +function devAssert(condition, message) { + var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') + + if (!booleanCondition) { + throw new Error(message); + } +} + + +/***/ }), + +/***/ 42878: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = didYouMean; +var MAX_SUGGESTIONS = 5; +/** + * Given [ A, B, C ] return ' Did you mean A, B, or C?'. + */ + +// eslint-disable-next-line no-redeclare +function didYouMean(firstArg, secondArg) { + var _ref = typeof firstArg === 'string' ? [firstArg, secondArg] : [undefined, firstArg], + subMessage = _ref[0], + suggestionsArg = _ref[1]; + + var message = ' Did you mean '; + + if (subMessage) { + message += subMessage + ' '; + } + + var suggestions = suggestionsArg.map(function (x) { + return "\"".concat(x, "\""); + }); + + switch (suggestions.length) { + case 0: + return ''; + + case 1: + return message + suggestions[0] + '?'; + + case 2: + return message + suggestions[0] + ' or ' + suggestions[1] + '?'; + } + + var selected = suggestions.slice(0, MAX_SUGGESTIONS); + var lastItem = selected.pop(); + return message + selected.join(', ') + ', or ' + lastItem + '?'; +} + + +/***/ }), + +/***/ 51188: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = identityFunc; + +/** + * Returns the first argument it receives. + */ +function identityFunc(x) { + return x; +} + + +/***/ }), + +/***/ 10102: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = inspect; + +var _nodejsCustomInspectSymbol = _interopRequireDefault(__nccwpck_require__(84755)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var MAX_ARRAY_LENGTH = 10; +var MAX_RECURSIVE_DEPTH = 2; +/** + * Used to print values in error messages. + */ + +function inspect(value) { + return formatValue(value, []); +} + +function formatValue(value, seenValues) { + switch (_typeof(value)) { + case 'string': + return JSON.stringify(value); + + case 'function': + return value.name ? "[function ".concat(value.name, "]") : '[function]'; + + case 'object': + if (value === null) { + return 'null'; + } + + return formatObjectValue(value, seenValues); + + default: + return String(value); + } +} + +function formatObjectValue(value, previouslySeenValues) { + if (previouslySeenValues.indexOf(value) !== -1) { + return '[Circular]'; + } + + var seenValues = [].concat(previouslySeenValues, [value]); + var customInspectFn = getCustomFn(value); + + if (customInspectFn !== undefined) { + var customValue = customInspectFn.call(value); // check for infinite recursion + + if (customValue !== value) { + return typeof customValue === 'string' ? customValue : formatValue(customValue, seenValues); + } + } else if (Array.isArray(value)) { + return formatArray(value, seenValues); + } + + return formatObject(value, seenValues); +} + +function formatObject(object, seenValues) { + var keys = Object.keys(object); + + if (keys.length === 0) { + return '{}'; + } + + if (seenValues.length > MAX_RECURSIVE_DEPTH) { + return '[' + getObjectTag(object) + ']'; + } + + var properties = keys.map(function (key) { + var value = formatValue(object[key], seenValues); + return key + ': ' + value; + }); + return '{ ' + properties.join(', ') + ' }'; +} + +function formatArray(array, seenValues) { + if (array.length === 0) { + return '[]'; + } + + if (seenValues.length > MAX_RECURSIVE_DEPTH) { + return '[Array]'; + } + + var len = Math.min(MAX_ARRAY_LENGTH, array.length); + var remaining = array.length - len; + var items = []; + + for (var i = 0; i < len; ++i) { + items.push(formatValue(array[i], seenValues)); + } + + if (remaining === 1) { + items.push('... 1 more item'); + } else if (remaining > 1) { + items.push("... ".concat(remaining, " more items")); + } + + return '[' + items.join(', ') + ']'; +} + +function getCustomFn(object) { + var customInspectFn = object[String(_nodejsCustomInspectSymbol.default)]; + + if (typeof customInspectFn === 'function') { + return customInspectFn; + } + + if (typeof object.inspect === 'function') { + return object.inspect; + } +} + +function getObjectTag(object) { + var tag = Object.prototype.toString.call(object).replace(/^\[object /, '').replace(/]$/, ''); + + if (tag === 'Object' && typeof object.constructor === 'function') { + var name = object.constructor.name; + + if (typeof name === 'string' && name !== '') { + return name; + } + } + + return tag; +} + + +/***/ }), + +/***/ 93481: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +/** + * A replacement for instanceof which includes an error warning when multi-realm + * constructors are detected. + */ +// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production +// See: https://webpack.js.org/guides/production/ +var _default = process.env.NODE_ENV === 'production' ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') +// eslint-disable-next-line no-shadow +function instanceOf(value, constructor) { + return value instanceof constructor; +} : // eslint-disable-next-line no-shadow +function instanceOf(value, constructor) { + if (value instanceof constructor) { + return true; + } + + if (value) { + var valueClass = value.constructor; + var className = constructor.name; + + if (className && valueClass && valueClass.name === className) { + throw new Error("Cannot use ".concat(className, " \"").concat(value, "\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.")); + } + } + + return false; +}; + +exports.default = _default; + + +/***/ }), + +/***/ 28847: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = invariant; + +function invariant(condition, message) { + var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') + + if (!booleanCondition) { + throw new Error(message != null ? message : 'Unexpected invariant triggered.'); + } +} + + +/***/ }), + +/***/ 20626: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = isAsyncIterable; + +var _symbols = __nccwpck_require__(3255); + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +// eslint-disable-next-line no-redeclare +function isAsyncIterable(maybeAsyncIterable) { + if (maybeAsyncIterable == null || _typeof(maybeAsyncIterable) !== 'object') { + return false; + } + + return typeof maybeAsyncIterable[_symbols.SYMBOL_ASYNC_ITERATOR] === 'function'; +} + + +/***/ }), + +/***/ 54363: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = isCollection; + +var _symbols = __nccwpck_require__(3255); + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +/** + * Returns true if the provided object is an Object (i.e. not a string literal) + * and is either Iterable or Array-like. + * + * This may be used in place of [Array.isArray()][isArray] to determine if an + * object should be iterated-over. It always excludes string literals and + * includes Arrays (regardless of if it is Iterable). It also includes other + * Array-like objects such as NodeList, TypedArray, and Buffer. + * + * @example + * + * isCollection([ 1, 2, 3 ]) // true + * isCollection('ABC') // false + * isCollection({ length: 1, 0: 'Alpha' }) // true + * isCollection({ key: 'value' }) // false + * isCollection(new Map()) // true + * + * @param obj + * An Object value which might implement the Iterable or Array-like protocols. + * @return {boolean} true if Iterable or Array-like Object. + */ +function isCollection(obj) { + if (obj == null || _typeof(obj) !== 'object') { + return false; + } // Is Array like? + + + var length = obj.length; + + if (typeof length === 'number' && length >= 0 && length % 1 === 0) { + return true; + } // Is Iterable? + + + return typeof obj[_symbols.SYMBOL_ITERATOR] === 'function'; +} + + +/***/ }), + +/***/ 95865: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = isObjectLike; + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +/** + * Return true if `value` is object-like. A value is object-like if it's not + * `null` and has a `typeof` result of "object". + */ +function isObjectLike(value) { + return _typeof(value) == 'object' && value !== null; +} + + +/***/ }), + +/***/ 93910: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = isPromise; + +/** + * Returns true if the value acts like a Promise, i.e. has a "then" function, + * otherwise returns false. + */ +// eslint-disable-next-line no-redeclare +function isPromise(value) { + return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function'; +} + + +/***/ }), + +/***/ 10711: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = keyMap; + +/** + * Creates a keyed JS object from an array, given a function to produce the keys + * for each value in the array. + * + * This provides a convenient lookup for the array items if the key function + * produces unique results. + * + * const phoneBook = [ + * { name: 'Jon', num: '555-1234' }, + * { name: 'Jenny', num: '867-5309' } + * ] + * + * // { Jon: { name: 'Jon', num: '555-1234' }, + * // Jenny: { name: 'Jenny', num: '867-5309' } } + * const entriesByName = keyMap( + * phoneBook, + * entry => entry.name + * ) + * + * // { name: 'Jenny', num: '857-6309' } + * const jennyEntry = entriesByName['Jenny'] + * + */ +function keyMap(list, keyFn) { + return list.reduce(function (map, item) { + map[keyFn(item)] = item; + return map; + }, Object.create(null)); +} + + +/***/ }), + +/***/ 49268: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = keyValMap; + +/** + * Creates a keyed JS object from an array, given a function to produce the keys + * and a function to produce the values from each item in the array. + * + * const phoneBook = [ + * { name: 'Jon', num: '555-1234' }, + * { name: 'Jenny', num: '867-5309' } + * ] + * + * // { Jon: '555-1234', Jenny: '867-5309' } + * const phonesByName = keyValMap( + * phoneBook, + * entry => entry.name, + * entry => entry.num + * ) + * + */ +function keyValMap(list, keyFn, valFn) { + return list.reduce(function (map, item) { + map[keyFn(item)] = valFn(item); + return map; + }, Object.create(null)); +} + + +/***/ }), + +/***/ 32223: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = mapValue; + +var _objectEntries3 = _interopRequireDefault(__nccwpck_require__(86422)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Creates an object map with the same keys as `map` and values generated by + * running each value of `map` thru `fn`. + */ +function mapValue(map, fn) { + var result = Object.create(null); + + for (var _i2 = 0, _objectEntries2 = (0, _objectEntries3.default)(map); _i2 < _objectEntries2.length; _i2++) { + var _ref2 = _objectEntries2[_i2]; + var _key = _ref2[0]; + var _value = _ref2[1]; + result[_key] = fn(_value, _key); + } + + return result; +} + + +/***/ }), + +/***/ 64217: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = memoize3; + +/** + * Memoizes the provided three-argument function. + */ +function memoize3(fn) { + var cache0; + return function memoized(a1, a2, a3) { + if (!cache0) { + cache0 = new WeakMap(); + } + + var cache1 = cache0.get(a1); + var cache2; + + if (cache1) { + cache2 = cache1.get(a2); + + if (cache2) { + var cachedValue = cache2.get(a3); + + if (cachedValue !== undefined) { + return cachedValue; + } + } + } else { + cache1 = new WeakMap(); + cache0.set(a1, cache1); + } + + if (!cache2) { + cache2 = new WeakMap(); + cache1.set(a2, cache2); + } + + var newValue = fn(a1, a2, a3); + cache2.set(a3, newValue); + return newValue; + }; +} + + +/***/ }), + +/***/ 84755: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; +// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') +var nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined; +var _default = nodejsCustomInspectSymbol; +exports.default = _default; + + +/***/ }), + +/***/ 94281: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = printPathArray; + +/** + * Build a string describing the path. + */ +function printPathArray(path) { + return path.map(function (key) { + return typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key; + }).join(''); +} + + +/***/ }), + +/***/ 46804: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = promiseForObject; + +/** + * This function transforms a JS object `ObjMap>` into + * a `Promise>` + * + * This is akin to bluebird's `Promise.props`, but implemented only using + * `Promise.all` so it will work with any implementation of ES6 promises. + */ +function promiseForObject(object) { + var keys = Object.keys(object); + var valuesAndPromises = keys.map(function (name) { + return object[name]; + }); + return Promise.all(valuesAndPromises).then(function (values) { + return values.reduce(function (resolvedObject, value, i) { + resolvedObject[keys[i]] = value; + return resolvedObject; + }, Object.create(null)); + }); +} + + +/***/ }), + +/***/ 77286: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = promiseReduce; + +var _isPromise = _interopRequireDefault(__nccwpck_require__(93910)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Similar to Array.prototype.reduce(), however the reducing callback may return + * a Promise, in which case reduction will continue after each promise resolves. + * + * If the callback does not return a Promise, then this function will also not + * return a Promise. + */ +function promiseReduce(values, callback, initialValue) { + return values.reduce(function (previous, value) { + return (0, _isPromise.default)(previous) ? previous.then(function (resolved) { + return callback(resolved, value); + }) : callback(previous, value); + }, initialValue); +} + + +/***/ }), + +/***/ 57704: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = suggestionList; + +/** + * Given an invalid input string and a list of valid options, returns a filtered + * list of valid options sorted based on their similarity with the input. + */ +function suggestionList(input, options) { + var optionsByDistance = Object.create(null); + var lexicalDistance = new LexicalDistance(input); + var threshold = Math.floor(input.length * 0.4) + 1; + + for (var _i2 = 0; _i2 < options.length; _i2++) { + var option = options[_i2]; + var distance = lexicalDistance.measure(option, threshold); + + if (distance !== undefined) { + optionsByDistance[option] = distance; + } + } + + return Object.keys(optionsByDistance).sort(function (a, b) { + var distanceDiff = optionsByDistance[a] - optionsByDistance[b]; + return distanceDiff !== 0 ? distanceDiff : a.localeCompare(b); + }); +} +/** + * Computes the lexical distance between strings A and B. + * + * The "distance" between two strings is given by counting the minimum number + * of edits needed to transform string A into string B. An edit can be an + * insertion, deletion, or substitution of a single character, or a swap of two + * adjacent characters. + * + * Includes a custom alteration from Damerau-Levenshtein to treat case changes + * as a single edit which helps identify mis-cased values with an edit distance + * of 1. + * + * This distance can be useful for detecting typos in input or sorting + */ + + +var LexicalDistance = /*#__PURE__*/function () { + function LexicalDistance(input) { + this._input = input; + this._inputLowerCase = input.toLowerCase(); + this._inputArray = stringToArray(this._inputLowerCase); + this._rows = [new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0)]; + } + + var _proto = LexicalDistance.prototype; + + _proto.measure = function measure(option, threshold) { + if (this._input === option) { + return 0; + } + + var optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit + + if (this._inputLowerCase === optionLowerCase) { + return 1; + } + + var a = stringToArray(optionLowerCase); + var b = this._inputArray; + + if (a.length < b.length) { + var tmp = a; + a = b; + b = tmp; + } + + var aLength = a.length; + var bLength = b.length; + + if (aLength - bLength > threshold) { + return undefined; + } + + var rows = this._rows; + + for (var j = 0; j <= bLength; j++) { + rows[0][j] = j; + } + + for (var i = 1; i <= aLength; i++) { + var upRow = rows[(i - 1) % 3]; + var currentRow = rows[i % 3]; + var smallestCell = currentRow[0] = i; + + for (var _j = 1; _j <= bLength; _j++) { + var cost = a[i - 1] === b[_j - 1] ? 0 : 1; + var currentCell = Math.min(upRow[_j] + 1, // delete + currentRow[_j - 1] + 1, // insert + upRow[_j - 1] + cost // substitute + ); + + if (i > 1 && _j > 1 && a[i - 1] === b[_j - 2] && a[i - 2] === b[_j - 1]) { + // transposition + var doubleDiagonalCell = rows[(i - 2) % 3][_j - 2]; + currentCell = Math.min(currentCell, doubleDiagonalCell + 1); + } + + if (currentCell < smallestCell) { + smallestCell = currentCell; + } + + currentRow[_j] = currentCell; + } // Early exit, since distance can't go smaller than smallest element of the previous row. + + + if (smallestCell > threshold) { + return undefined; + } + } + + var distance = rows[aLength % 3][bLength]; + return distance <= threshold ? distance : undefined; + }; + + return LexicalDistance; +}(); + +function stringToArray(str) { + var strLength = str.length; + var array = new Array(strLength); + + for (var i = 0; i < strLength; ++i) { + array[i] = str.charCodeAt(i); + } + + return array; +} + + +/***/ }), + +/***/ 74728: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = toObjMap; + +var _objectEntries3 = _interopRequireDefault(__nccwpck_require__(86422)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toObjMap(obj) { + /* eslint-enable no-redeclare */ + if (Object.getPrototypeOf(obj) === null) { + return obj; + } + + var map = Object.create(null); + + for (var _i2 = 0, _objectEntries2 = (0, _objectEntries3.default)(obj); _i2 < _objectEntries2.length; _i2++) { + var _ref2 = _objectEntries2[_i2]; + var key = _ref2[0]; + var value = _ref2[1]; + map[key] = value; + } + + return map; +} + + +/***/ }), + +/***/ 45494: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isNode = isNode; +exports.Token = exports.Location = void 0; + +var _defineInspect = _interopRequireDefault(__nccwpck_require__(73965)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Contains a range of UTF-8 character offsets and token references that + * identify the region of the source from which the AST derived. + */ +var Location = /*#__PURE__*/function () { + /** + * The character offset at which this Node begins. + */ + + /** + * The character offset at which this Node ends. + */ + + /** + * The Token at which this Node begins. + */ + + /** + * The Token at which this Node ends. + */ + + /** + * The Source document the AST represents. + */ + function Location(startToken, endToken, source) { + this.start = startToken.start; + this.end = endToken.end; + this.startToken = startToken; + this.endToken = endToken; + this.source = source; + } + + var _proto = Location.prototype; + + _proto.toJSON = function toJSON() { + return { + start: this.start, + end: this.end + }; + }; + + return Location; +}(); // Print a simplified form when appearing in `inspect` and `util.inspect`. + + +exports.Location = Location; +(0, _defineInspect.default)(Location); +/** + * Represents a range of characters represented by a lexical token + * within a Source. + */ + +var Token = /*#__PURE__*/function () { + /** + * The kind of Token. + */ + + /** + * The character offset at which this Node begins. + */ + + /** + * The character offset at which this Node ends. + */ + + /** + * The 1-indexed line number on which this Token appears. + */ + + /** + * The 1-indexed column number at which this Token begins. + */ + + /** + * For non-punctuation tokens, represents the interpreted value of the token. + */ + + /** + * Tokens exist as nodes in a double-linked-list amongst all tokens + * including ignored tokens. is always the first node and + * the last. + */ + function Token(kind, start, end, line, column, prev, value) { + this.kind = kind; + this.start = start; + this.end = end; + this.line = line; + this.column = column; + this.value = value; + this.prev = prev; + this.next = null; + } + + var _proto2 = Token.prototype; + + _proto2.toJSON = function toJSON() { + return { + kind: this.kind, + value: this.value, + line: this.line, + column: this.column + }; + }; + + return Token; +}(); // Print a simplified form when appearing in `inspect` and `util.inspect`. + + +exports.Token = Token; +(0, _defineInspect.default)(Token); +/** + * @internal + */ + +function isNode(maybeNode) { + return maybeNode != null && typeof maybeNode.kind === 'string'; +} +/** + * The list of all possible AST node types. + */ + + +/***/ }), + +/***/ 4515: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.dedentBlockStringValue = dedentBlockStringValue; +exports.getBlockStringIndentation = getBlockStringIndentation; +exports.printBlockString = printBlockString; + +/** + * Produces the value of a block string from its parsed raw value, similar to + * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc. + * + * This implements the GraphQL spec's BlockStringValue() static algorithm. + * + * @internal + */ +function dedentBlockStringValue(rawString) { + // Expand a block string's raw value into independent lines. + var lines = rawString.split(/\r\n|[\n\r]/g); // Remove common indentation from all lines but first. + + var commonIndent = getBlockStringIndentation(rawString); + + if (commonIndent !== 0) { + for (var i = 1; i < lines.length; i++) { + lines[i] = lines[i].slice(commonIndent); + } + } // Remove leading and trailing blank lines. + + + var startLine = 0; + + while (startLine < lines.length && isBlank(lines[startLine])) { + ++startLine; + } + + var endLine = lines.length; + + while (endLine > startLine && isBlank(lines[endLine - 1])) { + --endLine; + } // Return a string of the lines joined with U+000A. + + + return lines.slice(startLine, endLine).join('\n'); +} + +function isBlank(str) { + for (var i = 0; i < str.length; ++i) { + if (str[i] !== ' ' && str[i] !== '\t') { + return false; + } + } + + return true; +} +/** + * @internal + */ + + +function getBlockStringIndentation(value) { + var _commonIndent; + + var isFirstLine = true; + var isEmptyLine = true; + var indent = 0; + var commonIndent = null; + + for (var i = 0; i < value.length; ++i) { + switch (value.charCodeAt(i)) { + case 13: + // \r + if (value.charCodeAt(i + 1) === 10) { + ++i; // skip \r\n as one symbol + } + + // falls through + + case 10: + // \n + isFirstLine = false; + isEmptyLine = true; + indent = 0; + break; + + case 9: // \t + + case 32: + // + ++indent; + break; + + default: + if (isEmptyLine && !isFirstLine && (commonIndent === null || indent < commonIndent)) { + commonIndent = indent; + } + + isEmptyLine = false; + } + } + + return (_commonIndent = commonIndent) !== null && _commonIndent !== void 0 ? _commonIndent : 0; +} +/** + * Print a block string in the indented block form by adding a leading and + * trailing blank line. However, if a block string starts with whitespace and is + * a single-line, adding a leading blank line would strip that whitespace. + * + * @internal + */ + + +function printBlockString(value) { + var indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + var preferMultipleLines = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var isSingleLine = value.indexOf('\n') === -1; + var hasLeadingSpace = value[0] === ' ' || value[0] === '\t'; + var hasTrailingQuote = value[value.length - 1] === '"'; + var hasTrailingSlash = value[value.length - 1] === '\\'; + var printAsMultipleLines = !isSingleLine || hasTrailingQuote || hasTrailingSlash || preferMultipleLines; + var result = ''; // Format a multi-line block quote to account for leading space. + + if (printAsMultipleLines && !(isSingleLine && hasLeadingSpace)) { + result += '\n' + indentation; + } + + result += indentation ? value.replace(/\n/g, '\n' + indentation) : value; + + if (printAsMultipleLines) { + result += '\n'; + } + + return '"""' + result.replace(/"""/g, '\\"""') + '"""'; +} + + +/***/ }), + +/***/ 81205: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.DirectiveLocation = void 0; + +/** + * The set of allowed directive location values. + */ +var DirectiveLocation = Object.freeze({ + // Request Definitions + QUERY: 'QUERY', + MUTATION: 'MUTATION', + SUBSCRIPTION: 'SUBSCRIPTION', + FIELD: 'FIELD', + FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION', + FRAGMENT_SPREAD: 'FRAGMENT_SPREAD', + INLINE_FRAGMENT: 'INLINE_FRAGMENT', + VARIABLE_DEFINITION: 'VARIABLE_DEFINITION', + // Type System Definitions + SCHEMA: 'SCHEMA', + SCALAR: 'SCALAR', + OBJECT: 'OBJECT', + FIELD_DEFINITION: 'FIELD_DEFINITION', + ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION', + INTERFACE: 'INTERFACE', + UNION: 'UNION', + ENUM: 'ENUM', + ENUM_VALUE: 'ENUM_VALUE', + INPUT_OBJECT: 'INPUT_OBJECT', + INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION' +}); +/** + * The enum type representing the directive location values. + */ + +exports.DirectiveLocation = DirectiveLocation; + + +/***/ }), + +/***/ 89537: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "Source", ({ + enumerable: true, + get: function get() { + return _source.Source; + } +})); +Object.defineProperty(exports, "getLocation", ({ + enumerable: true, + get: function get() { + return _location.getLocation; + } +})); +Object.defineProperty(exports, "printLocation", ({ + enumerable: true, + get: function get() { + return _printLocation.printLocation; + } +})); +Object.defineProperty(exports, "printSourceLocation", ({ + enumerable: true, + get: function get() { + return _printLocation.printSourceLocation; + } +})); +Object.defineProperty(exports, "Kind", ({ + enumerable: true, + get: function get() { + return _kinds.Kind; + } +})); +Object.defineProperty(exports, "TokenKind", ({ + enumerable: true, + get: function get() { + return _tokenKind.TokenKind; + } +})); +Object.defineProperty(exports, "Lexer", ({ + enumerable: true, + get: function get() { + return _lexer.Lexer; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function get() { + return _parser.parse; + } +})); +Object.defineProperty(exports, "parseValue", ({ + enumerable: true, + get: function get() { + return _parser.parseValue; + } +})); +Object.defineProperty(exports, "parseType", ({ + enumerable: true, + get: function get() { + return _parser.parseType; + } +})); +Object.defineProperty(exports, "print", ({ + enumerable: true, + get: function get() { + return _printer.print; + } +})); +Object.defineProperty(exports, "visit", ({ + enumerable: true, + get: function get() { + return _visitor.visit; + } +})); +Object.defineProperty(exports, "visitInParallel", ({ + enumerable: true, + get: function get() { + return _visitor.visitInParallel; + } +})); +Object.defineProperty(exports, "getVisitFn", ({ + enumerable: true, + get: function get() { + return _visitor.getVisitFn; + } +})); +Object.defineProperty(exports, "BREAK", ({ + enumerable: true, + get: function get() { + return _visitor.BREAK; + } +})); +Object.defineProperty(exports, "Location", ({ + enumerable: true, + get: function get() { + return _ast.Location; + } +})); +Object.defineProperty(exports, "Token", ({ + enumerable: true, + get: function get() { + return _ast.Token; + } +})); +Object.defineProperty(exports, "isDefinitionNode", ({ + enumerable: true, + get: function get() { + return _predicates.isDefinitionNode; + } +})); +Object.defineProperty(exports, "isExecutableDefinitionNode", ({ + enumerable: true, + get: function get() { + return _predicates.isExecutableDefinitionNode; + } +})); +Object.defineProperty(exports, "isSelectionNode", ({ + enumerable: true, + get: function get() { + return _predicates.isSelectionNode; + } +})); +Object.defineProperty(exports, "isValueNode", ({ + enumerable: true, + get: function get() { + return _predicates.isValueNode; + } +})); +Object.defineProperty(exports, "isTypeNode", ({ + enumerable: true, + get: function get() { + return _predicates.isTypeNode; + } +})); +Object.defineProperty(exports, "isTypeSystemDefinitionNode", ({ + enumerable: true, + get: function get() { + return _predicates.isTypeSystemDefinitionNode; + } +})); +Object.defineProperty(exports, "isTypeDefinitionNode", ({ + enumerable: true, + get: function get() { + return _predicates.isTypeDefinitionNode; + } +})); +Object.defineProperty(exports, "isTypeSystemExtensionNode", ({ + enumerable: true, + get: function get() { + return _predicates.isTypeSystemExtensionNode; + } +})); +Object.defineProperty(exports, "isTypeExtensionNode", ({ + enumerable: true, + get: function get() { + return _predicates.isTypeExtensionNode; + } +})); +Object.defineProperty(exports, "DirectiveLocation", ({ + enumerable: true, + get: function get() { + return _directiveLocation.DirectiveLocation; + } +})); + +var _source = __nccwpck_require__(65521); + +var _location = __nccwpck_require__(61922); + +var _printLocation = __nccwpck_require__(35250); + +var _kinds = __nccwpck_require__(11927); + +var _tokenKind = __nccwpck_require__(91565); + +var _lexer = __nccwpck_require__(24605); + +var _parser = __nccwpck_require__(50655); + +var _printer = __nccwpck_require__(68203); + +var _visitor = __nccwpck_require__(5678); + +var _ast = __nccwpck_require__(45494); + +var _predicates = __nccwpck_require__(20535); + +var _directiveLocation = __nccwpck_require__(81205); + + +/***/ }), + +/***/ 11927: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.Kind = void 0; + +/** + * The set of allowed kind values for AST nodes. + */ +var Kind = Object.freeze({ + // Name + NAME: 'Name', + // Document + DOCUMENT: 'Document', + OPERATION_DEFINITION: 'OperationDefinition', + VARIABLE_DEFINITION: 'VariableDefinition', + SELECTION_SET: 'SelectionSet', + FIELD: 'Field', + ARGUMENT: 'Argument', + // Fragments + FRAGMENT_SPREAD: 'FragmentSpread', + INLINE_FRAGMENT: 'InlineFragment', + FRAGMENT_DEFINITION: 'FragmentDefinition', + // Values + VARIABLE: 'Variable', + INT: 'IntValue', + FLOAT: 'FloatValue', + STRING: 'StringValue', + BOOLEAN: 'BooleanValue', + NULL: 'NullValue', + ENUM: 'EnumValue', + LIST: 'ListValue', + OBJECT: 'ObjectValue', + OBJECT_FIELD: 'ObjectField', + // Directives + DIRECTIVE: 'Directive', + // Types + NAMED_TYPE: 'NamedType', + LIST_TYPE: 'ListType', + NON_NULL_TYPE: 'NonNullType', + // Type System Definitions + SCHEMA_DEFINITION: 'SchemaDefinition', + OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition', + // Type Definitions + SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition', + OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition', + FIELD_DEFINITION: 'FieldDefinition', + INPUT_VALUE_DEFINITION: 'InputValueDefinition', + INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition', + UNION_TYPE_DEFINITION: 'UnionTypeDefinition', + ENUM_TYPE_DEFINITION: 'EnumTypeDefinition', + ENUM_VALUE_DEFINITION: 'EnumValueDefinition', + INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition', + // Directive Definitions + DIRECTIVE_DEFINITION: 'DirectiveDefinition', + // Type System Extensions + SCHEMA_EXTENSION: 'SchemaExtension', + // Type Extensions + SCALAR_TYPE_EXTENSION: 'ScalarTypeExtension', + OBJECT_TYPE_EXTENSION: 'ObjectTypeExtension', + INTERFACE_TYPE_EXTENSION: 'InterfaceTypeExtension', + UNION_TYPE_EXTENSION: 'UnionTypeExtension', + ENUM_TYPE_EXTENSION: 'EnumTypeExtension', + INPUT_OBJECT_TYPE_EXTENSION: 'InputObjectTypeExtension' +}); +/** + * The enum type representing the possible kind values of AST nodes. + */ + +exports.Kind = Kind; + + +/***/ }), + +/***/ 24605: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isPunctuatorTokenKind = isPunctuatorTokenKind; +exports.Lexer = void 0; + +var _syntaxError = __nccwpck_require__(52295); + +var _ast = __nccwpck_require__(45494); + +var _tokenKind = __nccwpck_require__(91565); + +var _blockString = __nccwpck_require__(4515); + +/** + * Given a Source object, creates a Lexer for that source. + * A Lexer is a stateful stream generator in that every time + * it is advanced, it returns the next token in the Source. Assuming the + * source lexes, the final Token emitted by the lexer will be of kind + * EOF, after which the lexer will repeatedly return the same EOF token + * whenever called. + */ +var Lexer = /*#__PURE__*/function () { + /** + * The previously focused non-ignored token. + */ + + /** + * The currently focused non-ignored token. + */ + + /** + * The (1-indexed) line containing the current token. + */ + + /** + * The character offset at which the current line begins. + */ + function Lexer(source) { + var startOfFileToken = new _ast.Token(_tokenKind.TokenKind.SOF, 0, 0, 0, 0, null); + this.source = source; + this.lastToken = startOfFileToken; + this.token = startOfFileToken; + this.line = 1; + this.lineStart = 0; + } + /** + * Advances the token stream to the next non-ignored token. + */ + + + var _proto = Lexer.prototype; + + _proto.advance = function advance() { + this.lastToken = this.token; + var token = this.token = this.lookahead(); + return token; + } + /** + * Looks ahead and returns the next non-ignored token, but does not change + * the state of Lexer. + */ + ; + + _proto.lookahead = function lookahead() { + var token = this.token; + + if (token.kind !== _tokenKind.TokenKind.EOF) { + do { + var _token$next; + + // Note: next is only mutable during parsing, so we cast to allow this. + token = (_token$next = token.next) !== null && _token$next !== void 0 ? _token$next : token.next = readToken(this, token); + } while (token.kind === _tokenKind.TokenKind.COMMENT); + } + + return token; + }; + + return Lexer; +}(); +/** + * @internal + */ + + +exports.Lexer = Lexer; + +function isPunctuatorTokenKind(kind) { + return kind === _tokenKind.TokenKind.BANG || kind === _tokenKind.TokenKind.DOLLAR || kind === _tokenKind.TokenKind.AMP || kind === _tokenKind.TokenKind.PAREN_L || kind === _tokenKind.TokenKind.PAREN_R || kind === _tokenKind.TokenKind.SPREAD || kind === _tokenKind.TokenKind.COLON || kind === _tokenKind.TokenKind.EQUALS || kind === _tokenKind.TokenKind.AT || kind === _tokenKind.TokenKind.BRACKET_L || kind === _tokenKind.TokenKind.BRACKET_R || kind === _tokenKind.TokenKind.BRACE_L || kind === _tokenKind.TokenKind.PIPE || kind === _tokenKind.TokenKind.BRACE_R; +} + +function printCharCode(code) { + return (// NaN/undefined represents access beyond the end of the file. + isNaN(code) ? _tokenKind.TokenKind.EOF : // Trust JSON for ASCII. + code < 0x007f ? JSON.stringify(String.fromCharCode(code)) : // Otherwise print the escaped form. + "\"\\u".concat(('00' + code.toString(16).toUpperCase()).slice(-4), "\"") + ); +} +/** + * Gets the next token from the source starting at the given position. + * + * This skips over whitespace until it finds the next lexable token, then lexes + * punctuators immediately or calls the appropriate helper function for more + * complicated tokens. + */ + + +function readToken(lexer, prev) { + var source = lexer.source; + var body = source.body; + var bodyLength = body.length; + var pos = prev.end; + + while (pos < bodyLength) { + var code = body.charCodeAt(pos); + var _line = lexer.line; + + var _col = 1 + pos - lexer.lineStart; // SourceCharacter + + + switch (code) { + case 0xfeff: // + + case 9: // \t + + case 32: // + + case 44: + // , + ++pos; + continue; + + case 10: + // \n + ++pos; + ++lexer.line; + lexer.lineStart = pos; + continue; + + case 13: + // \r + if (body.charCodeAt(pos + 1) === 10) { + pos += 2; + } else { + ++pos; + } + + ++lexer.line; + lexer.lineStart = pos; + continue; + + case 33: + // ! + return new _ast.Token(_tokenKind.TokenKind.BANG, pos, pos + 1, _line, _col, prev); + + case 35: + // # + return readComment(source, pos, _line, _col, prev); + + case 36: + // $ + return new _ast.Token(_tokenKind.TokenKind.DOLLAR, pos, pos + 1, _line, _col, prev); + + case 38: + // & + return new _ast.Token(_tokenKind.TokenKind.AMP, pos, pos + 1, _line, _col, prev); + + case 40: + // ( + return new _ast.Token(_tokenKind.TokenKind.PAREN_L, pos, pos + 1, _line, _col, prev); + + case 41: + // ) + return new _ast.Token(_tokenKind.TokenKind.PAREN_R, pos, pos + 1, _line, _col, prev); + + case 46: + // . + if (body.charCodeAt(pos + 1) === 46 && body.charCodeAt(pos + 2) === 46) { + return new _ast.Token(_tokenKind.TokenKind.SPREAD, pos, pos + 3, _line, _col, prev); + } + + break; + + case 58: + // : + return new _ast.Token(_tokenKind.TokenKind.COLON, pos, pos + 1, _line, _col, prev); + + case 61: + // = + return new _ast.Token(_tokenKind.TokenKind.EQUALS, pos, pos + 1, _line, _col, prev); + + case 64: + // @ + return new _ast.Token(_tokenKind.TokenKind.AT, pos, pos + 1, _line, _col, prev); + + case 91: + // [ + return new _ast.Token(_tokenKind.TokenKind.BRACKET_L, pos, pos + 1, _line, _col, prev); + + case 93: + // ] + return new _ast.Token(_tokenKind.TokenKind.BRACKET_R, pos, pos + 1, _line, _col, prev); + + case 123: + // { + return new _ast.Token(_tokenKind.TokenKind.BRACE_L, pos, pos + 1, _line, _col, prev); + + case 124: + // | + return new _ast.Token(_tokenKind.TokenKind.PIPE, pos, pos + 1, _line, _col, prev); + + case 125: + // } + return new _ast.Token(_tokenKind.TokenKind.BRACE_R, pos, pos + 1, _line, _col, prev); + + case 34: + // " + if (body.charCodeAt(pos + 1) === 34 && body.charCodeAt(pos + 2) === 34) { + return readBlockString(source, pos, _line, _col, prev, lexer); + } + + return readString(source, pos, _line, _col, prev); + + case 45: // - + + case 48: // 0 + + case 49: // 1 + + case 50: // 2 + + case 51: // 3 + + case 52: // 4 + + case 53: // 5 + + case 54: // 6 + + case 55: // 7 + + case 56: // 8 + + case 57: + // 9 + return readNumber(source, pos, code, _line, _col, prev); + + case 65: // A + + case 66: // B + + case 67: // C + + case 68: // D + + case 69: // E + + case 70: // F + + case 71: // G + + case 72: // H + + case 73: // I + + case 74: // J + + case 75: // K + + case 76: // L + + case 77: // M + + case 78: // N + + case 79: // O + + case 80: // P + + case 81: // Q + + case 82: // R + + case 83: // S + + case 84: // T + + case 85: // U + + case 86: // V + + case 87: // W + + case 88: // X + + case 89: // Y + + case 90: // Z + + case 95: // _ + + case 97: // a + + case 98: // b + + case 99: // c + + case 100: // d + + case 101: // e + + case 102: // f + + case 103: // g + + case 104: // h + + case 105: // i + + case 106: // j + + case 107: // k + + case 108: // l + + case 109: // m + + case 110: // n + + case 111: // o + + case 112: // p + + case 113: // q + + case 114: // r + + case 115: // s + + case 116: // t + + case 117: // u + + case 118: // v + + case 119: // w + + case 120: // x + + case 121: // y + + case 122: + // z + return readName(source, pos, _line, _col, prev); + } + + throw (0, _syntaxError.syntaxError)(source, pos, unexpectedCharacterMessage(code)); + } + + var line = lexer.line; + var col = 1 + pos - lexer.lineStart; + return new _ast.Token(_tokenKind.TokenKind.EOF, bodyLength, bodyLength, line, col, prev); +} +/** + * Report a message that an unexpected character was encountered. + */ + + +function unexpectedCharacterMessage(code) { + if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) { + return "Cannot contain the invalid character ".concat(printCharCode(code), "."); + } + + if (code === 39) { + // ' + return 'Unexpected single quote character (\'), did you mean to use a double quote (")?'; + } + + return "Cannot parse the unexpected character ".concat(printCharCode(code), "."); +} +/** + * Reads a comment token from the source file. + * + * #[\u0009\u0020-\uFFFF]* + */ + + +function readComment(source, start, line, col, prev) { + var body = source.body; + var code; + var position = start; + + do { + code = body.charCodeAt(++position); + } while (!isNaN(code) && ( // SourceCharacter but not LineTerminator + code > 0x001f || code === 0x0009)); + + return new _ast.Token(_tokenKind.TokenKind.COMMENT, start, position, line, col, prev, body.slice(start + 1, position)); +} +/** + * Reads a number token from the source file, either a float + * or an int depending on whether a decimal point appears. + * + * Int: -?(0|[1-9][0-9]*) + * Float: -?(0|[1-9][0-9]*)(\.[0-9]+)?((E|e)(+|-)?[0-9]+)? + */ + + +function readNumber(source, start, firstCode, line, col, prev) { + var body = source.body; + var code = firstCode; + var position = start; + var isFloat = false; + + if (code === 45) { + // - + code = body.charCodeAt(++position); + } + + if (code === 48) { + // 0 + code = body.charCodeAt(++position); + + if (code >= 48 && code <= 57) { + throw (0, _syntaxError.syntaxError)(source, position, "Invalid number, unexpected digit after 0: ".concat(printCharCode(code), ".")); + } + } else { + position = readDigits(source, position, code); + code = body.charCodeAt(position); + } + + if (code === 46) { + // . + isFloat = true; + code = body.charCodeAt(++position); + position = readDigits(source, position, code); + code = body.charCodeAt(position); + } + + if (code === 69 || code === 101) { + // E e + isFloat = true; + code = body.charCodeAt(++position); + + if (code === 43 || code === 45) { + // + - + code = body.charCodeAt(++position); + } + + position = readDigits(source, position, code); + code = body.charCodeAt(position); + } // Numbers cannot be followed by . or NameStart + + + if (code === 46 || isNameStart(code)) { + throw (0, _syntaxError.syntaxError)(source, position, "Invalid number, expected digit but got: ".concat(printCharCode(code), ".")); + } + + return new _ast.Token(isFloat ? _tokenKind.TokenKind.FLOAT : _tokenKind.TokenKind.INT, start, position, line, col, prev, body.slice(start, position)); +} +/** + * Returns the new position in the source after reading digits. + */ + + +function readDigits(source, start, firstCode) { + var body = source.body; + var position = start; + var code = firstCode; + + if (code >= 48 && code <= 57) { + // 0 - 9 + do { + code = body.charCodeAt(++position); + } while (code >= 48 && code <= 57); // 0 - 9 + + + return position; + } + + throw (0, _syntaxError.syntaxError)(source, position, "Invalid number, expected digit but got: ".concat(printCharCode(code), ".")); +} +/** + * Reads a string token from the source file. + * + * "([^"\\\u000A\u000D]|(\\(u[0-9a-fA-F]{4}|["\\/bfnrt])))*" + */ + + +function readString(source, start, line, col, prev) { + var body = source.body; + var position = start + 1; + var chunkStart = position; + var code = 0; + var value = ''; + + while (position < body.length && !isNaN(code = body.charCodeAt(position)) && // not LineTerminator + code !== 0x000a && code !== 0x000d) { + // Closing Quote (") + if (code === 34) { + value += body.slice(chunkStart, position); + return new _ast.Token(_tokenKind.TokenKind.STRING, start, position + 1, line, col, prev, value); + } // SourceCharacter + + + if (code < 0x0020 && code !== 0x0009) { + throw (0, _syntaxError.syntaxError)(source, position, "Invalid character within String: ".concat(printCharCode(code), ".")); + } + + ++position; + + if (code === 92) { + // \ + value += body.slice(chunkStart, position - 1); + code = body.charCodeAt(position); + + switch (code) { + case 34: + value += '"'; + break; + + case 47: + value += '/'; + break; + + case 92: + value += '\\'; + break; + + case 98: + value += '\b'; + break; + + case 102: + value += '\f'; + break; + + case 110: + value += '\n'; + break; + + case 114: + value += '\r'; + break; + + case 116: + value += '\t'; + break; + + case 117: + { + // uXXXX + var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4)); + + if (charCode < 0) { + var invalidSequence = body.slice(position + 1, position + 5); + throw (0, _syntaxError.syntaxError)(source, position, "Invalid character escape sequence: \\u".concat(invalidSequence, ".")); + } + + value += String.fromCharCode(charCode); + position += 4; + break; + } + + default: + throw (0, _syntaxError.syntaxError)(source, position, "Invalid character escape sequence: \\".concat(String.fromCharCode(code), ".")); + } + + ++position; + chunkStart = position; + } + } + + throw (0, _syntaxError.syntaxError)(source, position, 'Unterminated string.'); +} +/** + * Reads a block string token from the source file. + * + * """("?"?(\\"""|\\(?!=""")|[^"\\]))*""" + */ + + +function readBlockString(source, start, line, col, prev, lexer) { + var body = source.body; + var position = start + 3; + var chunkStart = position; + var code = 0; + var rawValue = ''; + + while (position < body.length && !isNaN(code = body.charCodeAt(position))) { + // Closing Triple-Quote (""") + if (code === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) { + rawValue += body.slice(chunkStart, position); + return new _ast.Token(_tokenKind.TokenKind.BLOCK_STRING, start, position + 3, line, col, prev, (0, _blockString.dedentBlockStringValue)(rawValue)); + } // SourceCharacter + + + if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) { + throw (0, _syntaxError.syntaxError)(source, position, "Invalid character within String: ".concat(printCharCode(code), ".")); + } + + if (code === 10) { + // new line + ++position; + ++lexer.line; + lexer.lineStart = position; + } else if (code === 13) { + // carriage return + if (body.charCodeAt(position + 1) === 10) { + position += 2; + } else { + ++position; + } + + ++lexer.line; + lexer.lineStart = position; + } else if ( // Escape Triple-Quote (\""") + code === 92 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34 && body.charCodeAt(position + 3) === 34) { + rawValue += body.slice(chunkStart, position) + '"""'; + position += 4; + chunkStart = position; + } else { + ++position; + } + } + + throw (0, _syntaxError.syntaxError)(source, position, 'Unterminated string.'); +} +/** + * Converts four hexadecimal chars to the integer that the + * string represents. For example, uniCharCode('0','0','0','f') + * will return 15, and uniCharCode('0','0','f','f') returns 255. + * + * Returns a negative number on error, if a char was invalid. + * + * This is implemented by noting that char2hex() returns -1 on error, + * which means the result of ORing the char2hex() will also be negative. + */ + + +function uniCharCode(a, b, c, d) { + return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d); +} +/** + * Converts a hex character to its integer value. + * '0' becomes 0, '9' becomes 9 + * 'A' becomes 10, 'F' becomes 15 + * 'a' becomes 10, 'f' becomes 15 + * + * Returns -1 on error. + */ + + +function char2hex(a) { + return a >= 48 && a <= 57 ? a - 48 // 0-9 + : a >= 65 && a <= 70 ? a - 55 // A-F + : a >= 97 && a <= 102 ? a - 87 // a-f + : -1; +} +/** + * Reads an alphanumeric + underscore name from the source. + * + * [_A-Za-z][_0-9A-Za-z]* + */ + + +function readName(source, start, line, col, prev) { + var body = source.body; + var bodyLength = body.length; + var position = start + 1; + var code = 0; + + while (position !== bodyLength && !isNaN(code = body.charCodeAt(position)) && (code === 95 || // _ + code >= 48 && code <= 57 || // 0-9 + code >= 65 && code <= 90 || // A-Z + code >= 97 && code <= 122) // a-z + ) { + ++position; + } + + return new _ast.Token(_tokenKind.TokenKind.NAME, start, position, line, col, prev, body.slice(start, position)); +} // _ A-Z a-z + + +function isNameStart(code) { + return code === 95 || code >= 65 && code <= 90 || code >= 97 && code <= 122; +} + + +/***/ }), + +/***/ 61922: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getLocation = getLocation; + +/** + * Represents a location in a Source. + */ + +/** + * Takes a Source and a UTF-8 character offset, and returns the corresponding + * line and column as a SourceLocation. + */ +function getLocation(source, position) { + var lineRegexp = /\r\n|[\n\r]/g; + var line = 1; + var column = position + 1; + var match; + + while ((match = lineRegexp.exec(source.body)) && match.index < position) { + line += 1; + column = position + 1 - (match.index + match[0].length); + } + + return { + line: line, + column: column + }; +} + + +/***/ }), + +/***/ 50655: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.parse = parse; +exports.parseValue = parseValue; +exports.parseType = parseType; +exports.Parser = void 0; + +var _syntaxError = __nccwpck_require__(52295); + +var _kinds = __nccwpck_require__(11927); + +var _ast = __nccwpck_require__(45494); + +var _tokenKind = __nccwpck_require__(91565); + +var _source = __nccwpck_require__(65521); + +var _directiveLocation = __nccwpck_require__(81205); + +var _lexer = __nccwpck_require__(24605); + +/** + * Given a GraphQL source, parses it into a Document. + * Throws GraphQLError if a syntax error is encountered. + */ +function parse(source, options) { + var parser = new Parser(source, options); + return parser.parseDocument(); +} +/** + * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for + * that value. + * Throws GraphQLError if a syntax error is encountered. + * + * This is useful within tools that operate upon GraphQL Values directly and + * in isolation of complete GraphQL documents. + * + * Consider providing the results to the utility function: valueFromAST(). + */ + + +function parseValue(source, options) { + var parser = new Parser(source, options); + parser.expectToken(_tokenKind.TokenKind.SOF); + var value = parser.parseValueLiteral(false); + parser.expectToken(_tokenKind.TokenKind.EOF); + return value; +} +/** + * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for + * that type. + * Throws GraphQLError if a syntax error is encountered. + * + * This is useful within tools that operate upon GraphQL Types directly and + * in isolation of complete GraphQL documents. + * + * Consider providing the results to the utility function: typeFromAST(). + */ + + +function parseType(source, options) { + var parser = new Parser(source, options); + parser.expectToken(_tokenKind.TokenKind.SOF); + var type = parser.parseTypeReference(); + parser.expectToken(_tokenKind.TokenKind.EOF); + return type; +} +/** + * This class is exported only to assist people in implementing their own parsers + * without duplicating too much code and should be used only as last resort for cases + * such as experimental syntax or if certain features could not be contributed upstream. + * + * It is still part of the internal API and is versioned, so any changes to it are never + * considered breaking changes. If you still need to support multiple versions of the + * library, please use the `versionInfo` variable for version detection. + * + * @internal + */ + + +var Parser = /*#__PURE__*/function () { + function Parser(source, options) { + var sourceObj = (0, _source.isSource)(source) ? source : new _source.Source(source); + this._lexer = new _lexer.Lexer(sourceObj); + this._options = options; + } + /** + * Converts a name lex token into a name parse node. + */ + + + var _proto = Parser.prototype; + + _proto.parseName = function parseName() { + var token = this.expectToken(_tokenKind.TokenKind.NAME); + return { + kind: _kinds.Kind.NAME, + value: token.value, + loc: this.loc(token) + }; + } // Implements the parsing rules in the Document section. + + /** + * Document : Definition+ + */ + ; + + _proto.parseDocument = function parseDocument() { + var start = this._lexer.token; + return { + kind: _kinds.Kind.DOCUMENT, + definitions: this.many(_tokenKind.TokenKind.SOF, this.parseDefinition, _tokenKind.TokenKind.EOF), + loc: this.loc(start) + }; + } + /** + * Definition : + * - ExecutableDefinition + * - TypeSystemDefinition + * - TypeSystemExtension + * + * ExecutableDefinition : + * - OperationDefinition + * - FragmentDefinition + */ + ; + + _proto.parseDefinition = function parseDefinition() { + if (this.peek(_tokenKind.TokenKind.NAME)) { + switch (this._lexer.token.value) { + case 'query': + case 'mutation': + case 'subscription': + return this.parseOperationDefinition(); + + case 'fragment': + return this.parseFragmentDefinition(); + + case 'schema': + case 'scalar': + case 'type': + case 'interface': + case 'union': + case 'enum': + case 'input': + case 'directive': + return this.parseTypeSystemDefinition(); + + case 'extend': + return this.parseTypeSystemExtension(); + } + } else if (this.peek(_tokenKind.TokenKind.BRACE_L)) { + return this.parseOperationDefinition(); + } else if (this.peekDescription()) { + return this.parseTypeSystemDefinition(); + } + + throw this.unexpected(); + } // Implements the parsing rules in the Operations section. + + /** + * OperationDefinition : + * - SelectionSet + * - OperationType Name? VariableDefinitions? Directives? SelectionSet + */ + ; + + _proto.parseOperationDefinition = function parseOperationDefinition() { + var start = this._lexer.token; + + if (this.peek(_tokenKind.TokenKind.BRACE_L)) { + return { + kind: _kinds.Kind.OPERATION_DEFINITION, + operation: 'query', + name: undefined, + variableDefinitions: [], + directives: [], + selectionSet: this.parseSelectionSet(), + loc: this.loc(start) + }; + } + + var operation = this.parseOperationType(); + var name; + + if (this.peek(_tokenKind.TokenKind.NAME)) { + name = this.parseName(); + } + + return { + kind: _kinds.Kind.OPERATION_DEFINITION, + operation: operation, + name: name, + variableDefinitions: this.parseVariableDefinitions(), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet(), + loc: this.loc(start) + }; + } + /** + * OperationType : one of query mutation subscription + */ + ; + + _proto.parseOperationType = function parseOperationType() { + var operationToken = this.expectToken(_tokenKind.TokenKind.NAME); + + switch (operationToken.value) { + case 'query': + return 'query'; + + case 'mutation': + return 'mutation'; + + case 'subscription': + return 'subscription'; + } + + throw this.unexpected(operationToken); + } + /** + * VariableDefinitions : ( VariableDefinition+ ) + */ + ; + + _proto.parseVariableDefinitions = function parseVariableDefinitions() { + return this.optionalMany(_tokenKind.TokenKind.PAREN_L, this.parseVariableDefinition, _tokenKind.TokenKind.PAREN_R); + } + /** + * VariableDefinition : Variable : Type DefaultValue? Directives[Const]? + */ + ; + + _proto.parseVariableDefinition = function parseVariableDefinition() { + var start = this._lexer.token; + return { + kind: _kinds.Kind.VARIABLE_DEFINITION, + variable: this.parseVariable(), + type: (this.expectToken(_tokenKind.TokenKind.COLON), this.parseTypeReference()), + defaultValue: this.expectOptionalToken(_tokenKind.TokenKind.EQUALS) ? this.parseValueLiteral(true) : undefined, + directives: this.parseDirectives(true), + loc: this.loc(start) + }; + } + /** + * Variable : $ Name + */ + ; + + _proto.parseVariable = function parseVariable() { + var start = this._lexer.token; + this.expectToken(_tokenKind.TokenKind.DOLLAR); + return { + kind: _kinds.Kind.VARIABLE, + name: this.parseName(), + loc: this.loc(start) + }; + } + /** + * SelectionSet : { Selection+ } + */ + ; + + _proto.parseSelectionSet = function parseSelectionSet() { + var start = this._lexer.token; + return { + kind: _kinds.Kind.SELECTION_SET, + selections: this.many(_tokenKind.TokenKind.BRACE_L, this.parseSelection, _tokenKind.TokenKind.BRACE_R), + loc: this.loc(start) + }; + } + /** + * Selection : + * - Field + * - FragmentSpread + * - InlineFragment + */ + ; + + _proto.parseSelection = function parseSelection() { + return this.peek(_tokenKind.TokenKind.SPREAD) ? this.parseFragment() : this.parseField(); + } + /** + * Field : Alias? Name Arguments? Directives? SelectionSet? + * + * Alias : Name : + */ + ; + + _proto.parseField = function parseField() { + var start = this._lexer.token; + var nameOrAlias = this.parseName(); + var alias; + var name; + + if (this.expectOptionalToken(_tokenKind.TokenKind.COLON)) { + alias = nameOrAlias; + name = this.parseName(); + } else { + name = nameOrAlias; + } + + return { + kind: _kinds.Kind.FIELD, + alias: alias, + name: name, + arguments: this.parseArguments(false), + directives: this.parseDirectives(false), + selectionSet: this.peek(_tokenKind.TokenKind.BRACE_L) ? this.parseSelectionSet() : undefined, + loc: this.loc(start) + }; + } + /** + * Arguments[Const] : ( Argument[?Const]+ ) + */ + ; + + _proto.parseArguments = function parseArguments(isConst) { + var item = isConst ? this.parseConstArgument : this.parseArgument; + return this.optionalMany(_tokenKind.TokenKind.PAREN_L, item, _tokenKind.TokenKind.PAREN_R); + } + /** + * Argument[Const] : Name : Value[?Const] + */ + ; + + _proto.parseArgument = function parseArgument() { + var start = this._lexer.token; + var name = this.parseName(); + this.expectToken(_tokenKind.TokenKind.COLON); + return { + kind: _kinds.Kind.ARGUMENT, + name: name, + value: this.parseValueLiteral(false), + loc: this.loc(start) + }; + }; + + _proto.parseConstArgument = function parseConstArgument() { + var start = this._lexer.token; + return { + kind: _kinds.Kind.ARGUMENT, + name: this.parseName(), + value: (this.expectToken(_tokenKind.TokenKind.COLON), this.parseValueLiteral(true)), + loc: this.loc(start) + }; + } // Implements the parsing rules in the Fragments section. + + /** + * Corresponds to both FragmentSpread and InlineFragment in the spec. + * + * FragmentSpread : ... FragmentName Directives? + * + * InlineFragment : ... TypeCondition? Directives? SelectionSet + */ + ; + + _proto.parseFragment = function parseFragment() { + var start = this._lexer.token; + this.expectToken(_tokenKind.TokenKind.SPREAD); + var hasTypeCondition = this.expectOptionalKeyword('on'); + + if (!hasTypeCondition && this.peek(_tokenKind.TokenKind.NAME)) { + return { + kind: _kinds.Kind.FRAGMENT_SPREAD, + name: this.parseFragmentName(), + directives: this.parseDirectives(false), + loc: this.loc(start) + }; + } + + return { + kind: _kinds.Kind.INLINE_FRAGMENT, + typeCondition: hasTypeCondition ? this.parseNamedType() : undefined, + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet(), + loc: this.loc(start) + }; + } + /** + * FragmentDefinition : + * - fragment FragmentName on TypeCondition Directives? SelectionSet + * + * TypeCondition : NamedType + */ + ; + + _proto.parseFragmentDefinition = function parseFragmentDefinition() { + var _this$_options; + + var start = this._lexer.token; + this.expectKeyword('fragment'); // Experimental support for defining variables within fragments changes + // the grammar of FragmentDefinition: + // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet + + if (((_this$_options = this._options) === null || _this$_options === void 0 ? void 0 : _this$_options.experimentalFragmentVariables) === true) { + return { + kind: _kinds.Kind.FRAGMENT_DEFINITION, + name: this.parseFragmentName(), + variableDefinitions: this.parseVariableDefinitions(), + typeCondition: (this.expectKeyword('on'), this.parseNamedType()), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet(), + loc: this.loc(start) + }; + } + + return { + kind: _kinds.Kind.FRAGMENT_DEFINITION, + name: this.parseFragmentName(), + typeCondition: (this.expectKeyword('on'), this.parseNamedType()), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet(), + loc: this.loc(start) + }; + } + /** + * FragmentName : Name but not `on` + */ + ; + + _proto.parseFragmentName = function parseFragmentName() { + if (this._lexer.token.value === 'on') { + throw this.unexpected(); + } + + return this.parseName(); + } // Implements the parsing rules in the Values section. + + /** + * Value[Const] : + * - [~Const] Variable + * - IntValue + * - FloatValue + * - StringValue + * - BooleanValue + * - NullValue + * - EnumValue + * - ListValue[?Const] + * - ObjectValue[?Const] + * + * BooleanValue : one of `true` `false` + * + * NullValue : `null` + * + * EnumValue : Name but not `true`, `false` or `null` + */ + ; + + _proto.parseValueLiteral = function parseValueLiteral(isConst) { + var token = this._lexer.token; + + switch (token.kind) { + case _tokenKind.TokenKind.BRACKET_L: + return this.parseList(isConst); + + case _tokenKind.TokenKind.BRACE_L: + return this.parseObject(isConst); + + case _tokenKind.TokenKind.INT: + this._lexer.advance(); + + return { + kind: _kinds.Kind.INT, + value: token.value, + loc: this.loc(token) + }; + + case _tokenKind.TokenKind.FLOAT: + this._lexer.advance(); + + return { + kind: _kinds.Kind.FLOAT, + value: token.value, + loc: this.loc(token) + }; + + case _tokenKind.TokenKind.STRING: + case _tokenKind.TokenKind.BLOCK_STRING: + return this.parseStringLiteral(); + + case _tokenKind.TokenKind.NAME: + this._lexer.advance(); + + switch (token.value) { + case 'true': + return { + kind: _kinds.Kind.BOOLEAN, + value: true, + loc: this.loc(token) + }; + + case 'false': + return { + kind: _kinds.Kind.BOOLEAN, + value: false, + loc: this.loc(token) + }; + + case 'null': + return { + kind: _kinds.Kind.NULL, + loc: this.loc(token) + }; + + default: + return { + kind: _kinds.Kind.ENUM, + value: token.value, + loc: this.loc(token) + }; + } + + case _tokenKind.TokenKind.DOLLAR: + if (!isConst) { + return this.parseVariable(); + } + + break; + } + + throw this.unexpected(); + }; + + _proto.parseStringLiteral = function parseStringLiteral() { + var token = this._lexer.token; + + this._lexer.advance(); + + return { + kind: _kinds.Kind.STRING, + value: token.value, + block: token.kind === _tokenKind.TokenKind.BLOCK_STRING, + loc: this.loc(token) + }; + } + /** + * ListValue[Const] : + * - [ ] + * - [ Value[?Const]+ ] + */ + ; + + _proto.parseList = function parseList(isConst) { + var _this = this; + + var start = this._lexer.token; + + var item = function item() { + return _this.parseValueLiteral(isConst); + }; + + return { + kind: _kinds.Kind.LIST, + values: this.any(_tokenKind.TokenKind.BRACKET_L, item, _tokenKind.TokenKind.BRACKET_R), + loc: this.loc(start) + }; + } + /** + * ObjectValue[Const] : + * - { } + * - { ObjectField[?Const]+ } + */ + ; + + _proto.parseObject = function parseObject(isConst) { + var _this2 = this; + + var start = this._lexer.token; + + var item = function item() { + return _this2.parseObjectField(isConst); + }; + + return { + kind: _kinds.Kind.OBJECT, + fields: this.any(_tokenKind.TokenKind.BRACE_L, item, _tokenKind.TokenKind.BRACE_R), + loc: this.loc(start) + }; + } + /** + * ObjectField[Const] : Name : Value[?Const] + */ + ; + + _proto.parseObjectField = function parseObjectField(isConst) { + var start = this._lexer.token; + var name = this.parseName(); + this.expectToken(_tokenKind.TokenKind.COLON); + return { + kind: _kinds.Kind.OBJECT_FIELD, + name: name, + value: this.parseValueLiteral(isConst), + loc: this.loc(start) + }; + } // Implements the parsing rules in the Directives section. + + /** + * Directives[Const] : Directive[?Const]+ + */ + ; + + _proto.parseDirectives = function parseDirectives(isConst) { + var directives = []; + + while (this.peek(_tokenKind.TokenKind.AT)) { + directives.push(this.parseDirective(isConst)); + } + + return directives; + } + /** + * Directive[Const] : @ Name Arguments[?Const]? + */ + ; + + _proto.parseDirective = function parseDirective(isConst) { + var start = this._lexer.token; + this.expectToken(_tokenKind.TokenKind.AT); + return { + kind: _kinds.Kind.DIRECTIVE, + name: this.parseName(), + arguments: this.parseArguments(isConst), + loc: this.loc(start) + }; + } // Implements the parsing rules in the Types section. + + /** + * Type : + * - NamedType + * - ListType + * - NonNullType + */ + ; + + _proto.parseTypeReference = function parseTypeReference() { + var start = this._lexer.token; + var type; + + if (this.expectOptionalToken(_tokenKind.TokenKind.BRACKET_L)) { + type = this.parseTypeReference(); + this.expectToken(_tokenKind.TokenKind.BRACKET_R); + type = { + kind: _kinds.Kind.LIST_TYPE, + type: type, + loc: this.loc(start) + }; + } else { + type = this.parseNamedType(); + } + + if (this.expectOptionalToken(_tokenKind.TokenKind.BANG)) { + return { + kind: _kinds.Kind.NON_NULL_TYPE, + type: type, + loc: this.loc(start) + }; + } + + return type; + } + /** + * NamedType : Name + */ + ; + + _proto.parseNamedType = function parseNamedType() { + var start = this._lexer.token; + return { + kind: _kinds.Kind.NAMED_TYPE, + name: this.parseName(), + loc: this.loc(start) + }; + } // Implements the parsing rules in the Type Definition section. + + /** + * TypeSystemDefinition : + * - SchemaDefinition + * - TypeDefinition + * - DirectiveDefinition + * + * TypeDefinition : + * - ScalarTypeDefinition + * - ObjectTypeDefinition + * - InterfaceTypeDefinition + * - UnionTypeDefinition + * - EnumTypeDefinition + * - InputObjectTypeDefinition + */ + ; + + _proto.parseTypeSystemDefinition = function parseTypeSystemDefinition() { + // Many definitions begin with a description and require a lookahead. + var keywordToken = this.peekDescription() ? this._lexer.lookahead() : this._lexer.token; + + if (keywordToken.kind === _tokenKind.TokenKind.NAME) { + switch (keywordToken.value) { + case 'schema': + return this.parseSchemaDefinition(); + + case 'scalar': + return this.parseScalarTypeDefinition(); + + case 'type': + return this.parseObjectTypeDefinition(); + + case 'interface': + return this.parseInterfaceTypeDefinition(); + + case 'union': + return this.parseUnionTypeDefinition(); + + case 'enum': + return this.parseEnumTypeDefinition(); + + case 'input': + return this.parseInputObjectTypeDefinition(); + + case 'directive': + return this.parseDirectiveDefinition(); + } + } + + throw this.unexpected(keywordToken); + }; + + _proto.peekDescription = function peekDescription() { + return this.peek(_tokenKind.TokenKind.STRING) || this.peek(_tokenKind.TokenKind.BLOCK_STRING); + } + /** + * Description : StringValue + */ + ; + + _proto.parseDescription = function parseDescription() { + if (this.peekDescription()) { + return this.parseStringLiteral(); + } + } + /** + * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ } + */ + ; + + _proto.parseSchemaDefinition = function parseSchemaDefinition() { + var start = this._lexer.token; + var description = this.parseDescription(); + this.expectKeyword('schema'); + var directives = this.parseDirectives(true); + var operationTypes = this.many(_tokenKind.TokenKind.BRACE_L, this.parseOperationTypeDefinition, _tokenKind.TokenKind.BRACE_R); + return { + kind: _kinds.Kind.SCHEMA_DEFINITION, + description: description, + directives: directives, + operationTypes: operationTypes, + loc: this.loc(start) + }; + } + /** + * OperationTypeDefinition : OperationType : NamedType + */ + ; + + _proto.parseOperationTypeDefinition = function parseOperationTypeDefinition() { + var start = this._lexer.token; + var operation = this.parseOperationType(); + this.expectToken(_tokenKind.TokenKind.COLON); + var type = this.parseNamedType(); + return { + kind: _kinds.Kind.OPERATION_TYPE_DEFINITION, + operation: operation, + type: type, + loc: this.loc(start) + }; + } + /** + * ScalarTypeDefinition : Description? scalar Name Directives[Const]? + */ + ; + + _proto.parseScalarTypeDefinition = function parseScalarTypeDefinition() { + var start = this._lexer.token; + var description = this.parseDescription(); + this.expectKeyword('scalar'); + var name = this.parseName(); + var directives = this.parseDirectives(true); + return { + kind: _kinds.Kind.SCALAR_TYPE_DEFINITION, + description: description, + name: name, + directives: directives, + loc: this.loc(start) + }; + } + /** + * ObjectTypeDefinition : + * Description? + * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition? + */ + ; + + _proto.parseObjectTypeDefinition = function parseObjectTypeDefinition() { + var start = this._lexer.token; + var description = this.parseDescription(); + this.expectKeyword('type'); + var name = this.parseName(); + var interfaces = this.parseImplementsInterfaces(); + var directives = this.parseDirectives(true); + var fields = this.parseFieldsDefinition(); + return { + kind: _kinds.Kind.OBJECT_TYPE_DEFINITION, + description: description, + name: name, + interfaces: interfaces, + directives: directives, + fields: fields, + loc: this.loc(start) + }; + } + /** + * ImplementsInterfaces : + * - implements `&`? NamedType + * - ImplementsInterfaces & NamedType + */ + ; + + _proto.parseImplementsInterfaces = function parseImplementsInterfaces() { + var _this$_options2; + + if (!this.expectOptionalKeyword('implements')) { + return []; + } + + if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) { + var types = []; // Optional leading ampersand + + this.expectOptionalToken(_tokenKind.TokenKind.AMP); + + do { + types.push(this.parseNamedType()); + } while (this.expectOptionalToken(_tokenKind.TokenKind.AMP) || this.peek(_tokenKind.TokenKind.NAME)); + + return types; + } + + return this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType); + } + /** + * FieldsDefinition : { FieldDefinition+ } + */ + ; + + _proto.parseFieldsDefinition = function parseFieldsDefinition() { + var _this$_options3; + + // Legacy support for the SDL? + if (((_this$_options3 = this._options) === null || _this$_options3 === void 0 ? void 0 : _this$_options3.allowLegacySDLEmptyFields) === true && this.peek(_tokenKind.TokenKind.BRACE_L) && this._lexer.lookahead().kind === _tokenKind.TokenKind.BRACE_R) { + this._lexer.advance(); + + this._lexer.advance(); + + return []; + } + + return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseFieldDefinition, _tokenKind.TokenKind.BRACE_R); + } + /** + * FieldDefinition : + * - Description? Name ArgumentsDefinition? : Type Directives[Const]? + */ + ; + + _proto.parseFieldDefinition = function parseFieldDefinition() { + var start = this._lexer.token; + var description = this.parseDescription(); + var name = this.parseName(); + var args = this.parseArgumentDefs(); + this.expectToken(_tokenKind.TokenKind.COLON); + var type = this.parseTypeReference(); + var directives = this.parseDirectives(true); + return { + kind: _kinds.Kind.FIELD_DEFINITION, + description: description, + name: name, + arguments: args, + type: type, + directives: directives, + loc: this.loc(start) + }; + } + /** + * ArgumentsDefinition : ( InputValueDefinition+ ) + */ + ; + + _proto.parseArgumentDefs = function parseArgumentDefs() { + return this.optionalMany(_tokenKind.TokenKind.PAREN_L, this.parseInputValueDef, _tokenKind.TokenKind.PAREN_R); + } + /** + * InputValueDefinition : + * - Description? Name : Type DefaultValue? Directives[Const]? + */ + ; + + _proto.parseInputValueDef = function parseInputValueDef() { + var start = this._lexer.token; + var description = this.parseDescription(); + var name = this.parseName(); + this.expectToken(_tokenKind.TokenKind.COLON); + var type = this.parseTypeReference(); + var defaultValue; + + if (this.expectOptionalToken(_tokenKind.TokenKind.EQUALS)) { + defaultValue = this.parseValueLiteral(true); + } + + var directives = this.parseDirectives(true); + return { + kind: _kinds.Kind.INPUT_VALUE_DEFINITION, + description: description, + name: name, + type: type, + defaultValue: defaultValue, + directives: directives, + loc: this.loc(start) + }; + } + /** + * InterfaceTypeDefinition : + * - Description? interface Name Directives[Const]? FieldsDefinition? + */ + ; + + _proto.parseInterfaceTypeDefinition = function parseInterfaceTypeDefinition() { + var start = this._lexer.token; + var description = this.parseDescription(); + this.expectKeyword('interface'); + var name = this.parseName(); + var interfaces = this.parseImplementsInterfaces(); + var directives = this.parseDirectives(true); + var fields = this.parseFieldsDefinition(); + return { + kind: _kinds.Kind.INTERFACE_TYPE_DEFINITION, + description: description, + name: name, + interfaces: interfaces, + directives: directives, + fields: fields, + loc: this.loc(start) + }; + } + /** + * UnionTypeDefinition : + * - Description? union Name Directives[Const]? UnionMemberTypes? + */ + ; + + _proto.parseUnionTypeDefinition = function parseUnionTypeDefinition() { + var start = this._lexer.token; + var description = this.parseDescription(); + this.expectKeyword('union'); + var name = this.parseName(); + var directives = this.parseDirectives(true); + var types = this.parseUnionMemberTypes(); + return { + kind: _kinds.Kind.UNION_TYPE_DEFINITION, + description: description, + name: name, + directives: directives, + types: types, + loc: this.loc(start) + }; + } + /** + * UnionMemberTypes : + * - = `|`? NamedType + * - UnionMemberTypes | NamedType + */ + ; + + _proto.parseUnionMemberTypes = function parseUnionMemberTypes() { + return this.expectOptionalToken(_tokenKind.TokenKind.EQUALS) ? this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseNamedType) : []; + } + /** + * EnumTypeDefinition : + * - Description? enum Name Directives[Const]? EnumValuesDefinition? + */ + ; + + _proto.parseEnumTypeDefinition = function parseEnumTypeDefinition() { + var start = this._lexer.token; + var description = this.parseDescription(); + this.expectKeyword('enum'); + var name = this.parseName(); + var directives = this.parseDirectives(true); + var values = this.parseEnumValuesDefinition(); + return { + kind: _kinds.Kind.ENUM_TYPE_DEFINITION, + description: description, + name: name, + directives: directives, + values: values, + loc: this.loc(start) + }; + } + /** + * EnumValuesDefinition : { EnumValueDefinition+ } + */ + ; + + _proto.parseEnumValuesDefinition = function parseEnumValuesDefinition() { + return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseEnumValueDefinition, _tokenKind.TokenKind.BRACE_R); + } + /** + * EnumValueDefinition : Description? EnumValue Directives[Const]? + * + * EnumValue : Name + */ + ; + + _proto.parseEnumValueDefinition = function parseEnumValueDefinition() { + var start = this._lexer.token; + var description = this.parseDescription(); + var name = this.parseName(); + var directives = this.parseDirectives(true); + return { + kind: _kinds.Kind.ENUM_VALUE_DEFINITION, + description: description, + name: name, + directives: directives, + loc: this.loc(start) + }; + } + /** + * InputObjectTypeDefinition : + * - Description? input Name Directives[Const]? InputFieldsDefinition? + */ + ; + + _proto.parseInputObjectTypeDefinition = function parseInputObjectTypeDefinition() { + var start = this._lexer.token; + var description = this.parseDescription(); + this.expectKeyword('input'); + var name = this.parseName(); + var directives = this.parseDirectives(true); + var fields = this.parseInputFieldsDefinition(); + return { + kind: _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION, + description: description, + name: name, + directives: directives, + fields: fields, + loc: this.loc(start) + }; + } + /** + * InputFieldsDefinition : { InputValueDefinition+ } + */ + ; + + _proto.parseInputFieldsDefinition = function parseInputFieldsDefinition() { + return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseInputValueDef, _tokenKind.TokenKind.BRACE_R); + } + /** + * TypeSystemExtension : + * - SchemaExtension + * - TypeExtension + * + * TypeExtension : + * - ScalarTypeExtension + * - ObjectTypeExtension + * - InterfaceTypeExtension + * - UnionTypeExtension + * - EnumTypeExtension + * - InputObjectTypeDefinition + */ + ; + + _proto.parseTypeSystemExtension = function parseTypeSystemExtension() { + var keywordToken = this._lexer.lookahead(); + + if (keywordToken.kind === _tokenKind.TokenKind.NAME) { + switch (keywordToken.value) { + case 'schema': + return this.parseSchemaExtension(); + + case 'scalar': + return this.parseScalarTypeExtension(); + + case 'type': + return this.parseObjectTypeExtension(); + + case 'interface': + return this.parseInterfaceTypeExtension(); + + case 'union': + return this.parseUnionTypeExtension(); + + case 'enum': + return this.parseEnumTypeExtension(); + + case 'input': + return this.parseInputObjectTypeExtension(); + } + } + + throw this.unexpected(keywordToken); + } + /** + * SchemaExtension : + * - extend schema Directives[Const]? { OperationTypeDefinition+ } + * - extend schema Directives[Const] + */ + ; + + _proto.parseSchemaExtension = function parseSchemaExtension() { + var start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('schema'); + var directives = this.parseDirectives(true); + var operationTypes = this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseOperationTypeDefinition, _tokenKind.TokenKind.BRACE_R); + + if (directives.length === 0 && operationTypes.length === 0) { + throw this.unexpected(); + } + + return { + kind: _kinds.Kind.SCHEMA_EXTENSION, + directives: directives, + operationTypes: operationTypes, + loc: this.loc(start) + }; + } + /** + * ScalarTypeExtension : + * - extend scalar Name Directives[Const] + */ + ; + + _proto.parseScalarTypeExtension = function parseScalarTypeExtension() { + var start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('scalar'); + var name = this.parseName(); + var directives = this.parseDirectives(true); + + if (directives.length === 0) { + throw this.unexpected(); + } + + return { + kind: _kinds.Kind.SCALAR_TYPE_EXTENSION, + name: name, + directives: directives, + loc: this.loc(start) + }; + } + /** + * ObjectTypeExtension : + * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition + * - extend type Name ImplementsInterfaces? Directives[Const] + * - extend type Name ImplementsInterfaces + */ + ; + + _proto.parseObjectTypeExtension = function parseObjectTypeExtension() { + var start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('type'); + var name = this.parseName(); + var interfaces = this.parseImplementsInterfaces(); + var directives = this.parseDirectives(true); + var fields = this.parseFieldsDefinition(); + + if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + + return { + kind: _kinds.Kind.OBJECT_TYPE_EXTENSION, + name: name, + interfaces: interfaces, + directives: directives, + fields: fields, + loc: this.loc(start) + }; + } + /** + * InterfaceTypeExtension : + * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition + * - extend interface Name ImplementsInterfaces? Directives[Const] + * - extend interface Name ImplementsInterfaces + */ + ; + + _proto.parseInterfaceTypeExtension = function parseInterfaceTypeExtension() { + var start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('interface'); + var name = this.parseName(); + var interfaces = this.parseImplementsInterfaces(); + var directives = this.parseDirectives(true); + var fields = this.parseFieldsDefinition(); + + if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + + return { + kind: _kinds.Kind.INTERFACE_TYPE_EXTENSION, + name: name, + interfaces: interfaces, + directives: directives, + fields: fields, + loc: this.loc(start) + }; + } + /** + * UnionTypeExtension : + * - extend union Name Directives[Const]? UnionMemberTypes + * - extend union Name Directives[Const] + */ + ; + + _proto.parseUnionTypeExtension = function parseUnionTypeExtension() { + var start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('union'); + var name = this.parseName(); + var directives = this.parseDirectives(true); + var types = this.parseUnionMemberTypes(); + + if (directives.length === 0 && types.length === 0) { + throw this.unexpected(); + } + + return { + kind: _kinds.Kind.UNION_TYPE_EXTENSION, + name: name, + directives: directives, + types: types, + loc: this.loc(start) + }; + } + /** + * EnumTypeExtension : + * - extend enum Name Directives[Const]? EnumValuesDefinition + * - extend enum Name Directives[Const] + */ + ; + + _proto.parseEnumTypeExtension = function parseEnumTypeExtension() { + var start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('enum'); + var name = this.parseName(); + var directives = this.parseDirectives(true); + var values = this.parseEnumValuesDefinition(); + + if (directives.length === 0 && values.length === 0) { + throw this.unexpected(); + } + + return { + kind: _kinds.Kind.ENUM_TYPE_EXTENSION, + name: name, + directives: directives, + values: values, + loc: this.loc(start) + }; + } + /** + * InputObjectTypeExtension : + * - extend input Name Directives[Const]? InputFieldsDefinition + * - extend input Name Directives[Const] + */ + ; + + _proto.parseInputObjectTypeExtension = function parseInputObjectTypeExtension() { + var start = this._lexer.token; + this.expectKeyword('extend'); + this.expectKeyword('input'); + var name = this.parseName(); + var directives = this.parseDirectives(true); + var fields = this.parseInputFieldsDefinition(); + + if (directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + + return { + kind: _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION, + name: name, + directives: directives, + fields: fields, + loc: this.loc(start) + }; + } + /** + * DirectiveDefinition : + * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations + */ + ; + + _proto.parseDirectiveDefinition = function parseDirectiveDefinition() { + var start = this._lexer.token; + var description = this.parseDescription(); + this.expectKeyword('directive'); + this.expectToken(_tokenKind.TokenKind.AT); + var name = this.parseName(); + var args = this.parseArgumentDefs(); + var repeatable = this.expectOptionalKeyword('repeatable'); + this.expectKeyword('on'); + var locations = this.parseDirectiveLocations(); + return { + kind: _kinds.Kind.DIRECTIVE_DEFINITION, + description: description, + name: name, + arguments: args, + repeatable: repeatable, + locations: locations, + loc: this.loc(start) + }; + } + /** + * DirectiveLocations : + * - `|`? DirectiveLocation + * - DirectiveLocations | DirectiveLocation + */ + ; + + _proto.parseDirectiveLocations = function parseDirectiveLocations() { + return this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseDirectiveLocation); + } + /* + * DirectiveLocation : + * - ExecutableDirectiveLocation + * - TypeSystemDirectiveLocation + * + * ExecutableDirectiveLocation : one of + * `QUERY` + * `MUTATION` + * `SUBSCRIPTION` + * `FIELD` + * `FRAGMENT_DEFINITION` + * `FRAGMENT_SPREAD` + * `INLINE_FRAGMENT` + * + * TypeSystemDirectiveLocation : one of + * `SCHEMA` + * `SCALAR` + * `OBJECT` + * `FIELD_DEFINITION` + * `ARGUMENT_DEFINITION` + * `INTERFACE` + * `UNION` + * `ENUM` + * `ENUM_VALUE` + * `INPUT_OBJECT` + * `INPUT_FIELD_DEFINITION` + */ + ; + + _proto.parseDirectiveLocation = function parseDirectiveLocation() { + var start = this._lexer.token; + var name = this.parseName(); + + if (_directiveLocation.DirectiveLocation[name.value] !== undefined) { + return name; + } + + throw this.unexpected(start); + } // Core parsing utility functions + + /** + * Returns a location object, used to identify the place in the source that created a given parsed object. + */ + ; + + _proto.loc = function loc(startToken) { + var _this$_options4; + + if (((_this$_options4 = this._options) === null || _this$_options4 === void 0 ? void 0 : _this$_options4.noLocation) !== true) { + return new _ast.Location(startToken, this._lexer.lastToken, this._lexer.source); + } + } + /** + * Determines if the next token is of a given kind + */ + ; + + _proto.peek = function peek(kind) { + return this._lexer.token.kind === kind; + } + /** + * If the next token is of the given kind, return that token after advancing the lexer. + * Otherwise, do not change the parser state and throw an error. + */ + ; + + _proto.expectToken = function expectToken(kind) { + var token = this._lexer.token; + + if (token.kind === kind) { + this._lexer.advance(); + + return token; + } + + throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, "Expected ".concat(getTokenKindDesc(kind), ", found ").concat(getTokenDesc(token), ".")); + } + /** + * If the next token is of the given kind, return that token after advancing the lexer. + * Otherwise, do not change the parser state and return undefined. + */ + ; + + _proto.expectOptionalToken = function expectOptionalToken(kind) { + var token = this._lexer.token; + + if (token.kind === kind) { + this._lexer.advance(); + + return token; + } + + return undefined; + } + /** + * If the next token is a given keyword, advance the lexer. + * Otherwise, do not change the parser state and throw an error. + */ + ; + + _proto.expectKeyword = function expectKeyword(value) { + var token = this._lexer.token; + + if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) { + this._lexer.advance(); + } else { + throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, "Expected \"".concat(value, "\", found ").concat(getTokenDesc(token), ".")); + } + } + /** + * If the next token is a given keyword, return "true" after advancing the lexer. + * Otherwise, do not change the parser state and return "false". + */ + ; + + _proto.expectOptionalKeyword = function expectOptionalKeyword(value) { + var token = this._lexer.token; + + if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) { + this._lexer.advance(); + + return true; + } + + return false; + } + /** + * Helper function for creating an error when an unexpected lexed token is encountered. + */ + ; + + _proto.unexpected = function unexpected(atToken) { + var token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token; + return (0, _syntaxError.syntaxError)(this._lexer.source, token.start, "Unexpected ".concat(getTokenDesc(token), ".")); + } + /** + * Returns a possibly empty list of parse nodes, determined by the parseFn. + * This list begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + ; + + _proto.any = function any(openKind, parseFn, closeKind) { + this.expectToken(openKind); + var nodes = []; + + while (!this.expectOptionalToken(closeKind)) { + nodes.push(parseFn.call(this)); + } + + return nodes; + } + /** + * Returns a list of parse nodes, determined by the parseFn. + * It can be empty only if open token is missing otherwise it will always return non-empty list + * that begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + ; + + _proto.optionalMany = function optionalMany(openKind, parseFn, closeKind) { + if (this.expectOptionalToken(openKind)) { + var nodes = []; + + do { + nodes.push(parseFn.call(this)); + } while (!this.expectOptionalToken(closeKind)); + + return nodes; + } + + return []; + } + /** + * Returns a non-empty list of parse nodes, determined by the parseFn. + * This list begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + ; + + _proto.many = function many(openKind, parseFn, closeKind) { + this.expectToken(openKind); + var nodes = []; + + do { + nodes.push(parseFn.call(this)); + } while (!this.expectOptionalToken(closeKind)); + + return nodes; + } + /** + * Returns a non-empty list of parse nodes, determined by the parseFn. + * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind. + * Advances the parser to the next lex token after last item in the list. + */ + ; + + _proto.delimitedMany = function delimitedMany(delimiterKind, parseFn) { + this.expectOptionalToken(delimiterKind); + var nodes = []; + + do { + nodes.push(parseFn.call(this)); + } while (this.expectOptionalToken(delimiterKind)); + + return nodes; + }; + + return Parser; +}(); +/** + * A helper function to describe a token as a string for debugging. + */ + + +exports.Parser = Parser; + +function getTokenDesc(token) { + var value = token.value; + return getTokenKindDesc(token.kind) + (value != null ? " \"".concat(value, "\"") : ''); +} +/** + * A helper function to describe a token kind as a string for debugging. + */ + + +function getTokenKindDesc(kind) { + return (0, _lexer.isPunctuatorTokenKind)(kind) ? "\"".concat(kind, "\"") : kind; +} + + +/***/ }), + +/***/ 20535: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isDefinitionNode = isDefinitionNode; +exports.isExecutableDefinitionNode = isExecutableDefinitionNode; +exports.isSelectionNode = isSelectionNode; +exports.isValueNode = isValueNode; +exports.isTypeNode = isTypeNode; +exports.isTypeSystemDefinitionNode = isTypeSystemDefinitionNode; +exports.isTypeDefinitionNode = isTypeDefinitionNode; +exports.isTypeSystemExtensionNode = isTypeSystemExtensionNode; +exports.isTypeExtensionNode = isTypeExtensionNode; + +var _kinds = __nccwpck_require__(11927); + +function isDefinitionNode(node) { + return isExecutableDefinitionNode(node) || isTypeSystemDefinitionNode(node) || isTypeSystemExtensionNode(node); +} + +function isExecutableDefinitionNode(node) { + return node.kind === _kinds.Kind.OPERATION_DEFINITION || node.kind === _kinds.Kind.FRAGMENT_DEFINITION; +} + +function isSelectionNode(node) { + return node.kind === _kinds.Kind.FIELD || node.kind === _kinds.Kind.FRAGMENT_SPREAD || node.kind === _kinds.Kind.INLINE_FRAGMENT; +} + +function isValueNode(node) { + return node.kind === _kinds.Kind.VARIABLE || node.kind === _kinds.Kind.INT || node.kind === _kinds.Kind.FLOAT || node.kind === _kinds.Kind.STRING || node.kind === _kinds.Kind.BOOLEAN || node.kind === _kinds.Kind.NULL || node.kind === _kinds.Kind.ENUM || node.kind === _kinds.Kind.LIST || node.kind === _kinds.Kind.OBJECT; +} + +function isTypeNode(node) { + return node.kind === _kinds.Kind.NAMED_TYPE || node.kind === _kinds.Kind.LIST_TYPE || node.kind === _kinds.Kind.NON_NULL_TYPE; +} + +function isTypeSystemDefinitionNode(node) { + return node.kind === _kinds.Kind.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === _kinds.Kind.DIRECTIVE_DEFINITION; +} + +function isTypeDefinitionNode(node) { + return node.kind === _kinds.Kind.SCALAR_TYPE_DEFINITION || node.kind === _kinds.Kind.OBJECT_TYPE_DEFINITION || node.kind === _kinds.Kind.INTERFACE_TYPE_DEFINITION || node.kind === _kinds.Kind.UNION_TYPE_DEFINITION || node.kind === _kinds.Kind.ENUM_TYPE_DEFINITION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION; +} + +function isTypeSystemExtensionNode(node) { + return node.kind === _kinds.Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node); +} + +function isTypeExtensionNode(node) { + return node.kind === _kinds.Kind.SCALAR_TYPE_EXTENSION || node.kind === _kinds.Kind.OBJECT_TYPE_EXTENSION || node.kind === _kinds.Kind.INTERFACE_TYPE_EXTENSION || node.kind === _kinds.Kind.UNION_TYPE_EXTENSION || node.kind === _kinds.Kind.ENUM_TYPE_EXTENSION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION; +} + + +/***/ }), + +/***/ 35250: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.printLocation = printLocation; +exports.printSourceLocation = printSourceLocation; + +var _location = __nccwpck_require__(61922); + +/** + * Render a helpful description of the location in the GraphQL Source document. + */ +function printLocation(location) { + return printSourceLocation(location.source, (0, _location.getLocation)(location.source, location.start)); +} +/** + * Render a helpful description of the location in the GraphQL Source document. + */ + + +function printSourceLocation(source, sourceLocation) { + var firstLineColumnOffset = source.locationOffset.column - 1; + var body = whitespace(firstLineColumnOffset) + source.body; + var lineIndex = sourceLocation.line - 1; + var lineOffset = source.locationOffset.line - 1; + var lineNum = sourceLocation.line + lineOffset; + var columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0; + var columnNum = sourceLocation.column + columnOffset; + var locationStr = "".concat(source.name, ":").concat(lineNum, ":").concat(columnNum, "\n"); + var lines = body.split(/\r\n|[\n\r]/g); + var locationLine = lines[lineIndex]; // Special case for minified documents + + if (locationLine.length > 120) { + var subLineIndex = Math.floor(columnNum / 80); + var subLineColumnNum = columnNum % 80; + var subLines = []; + + for (var i = 0; i < locationLine.length; i += 80) { + subLines.push(locationLine.slice(i, i + 80)); + } + + return locationStr + printPrefixedLines([["".concat(lineNum), subLines[0]]].concat(subLines.slice(1, subLineIndex + 1).map(function (subLine) { + return ['', subLine]; + }), [[' ', whitespace(subLineColumnNum - 1) + '^'], ['', subLines[subLineIndex + 1]]])); + } + + return locationStr + printPrefixedLines([// Lines specified like this: ["prefix", "string"], + ["".concat(lineNum - 1), lines[lineIndex - 1]], ["".concat(lineNum), locationLine], ['', whitespace(columnNum - 1) + '^'], ["".concat(lineNum + 1), lines[lineIndex + 1]]]); +} + +function printPrefixedLines(lines) { + var existingLines = lines.filter(function (_ref) { + var _ = _ref[0], + line = _ref[1]; + return line !== undefined; + }); + var padLen = Math.max.apply(Math, existingLines.map(function (_ref2) { + var prefix = _ref2[0]; + return prefix.length; + })); + return existingLines.map(function (_ref3) { + var prefix = _ref3[0], + line = _ref3[1]; + return leftPad(padLen, prefix) + (line ? ' | ' + line : ' |'); + }).join('\n'); +} + +function whitespace(len) { + return Array(len + 1).join(' '); +} + +function leftPad(len, str) { + return whitespace(len - str.length) + str; +} + + +/***/ }), + +/***/ 68203: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.print = print; + +var _visitor = __nccwpck_require__(5678); + +var _blockString = __nccwpck_require__(4515); + +/** + * Converts an AST into a string, using one set of reasonable + * formatting rules. + */ +function print(ast) { + return (0, _visitor.visit)(ast, { + leave: printDocASTReducer + }); +} + +var MAX_LINE_LENGTH = 80; // TODO: provide better type coverage in future + +var printDocASTReducer = { + Name: function Name(node) { + return node.value; + }, + Variable: function Variable(node) { + return '$' + node.name; + }, + // Document + Document: function Document(node) { + return join(node.definitions, '\n\n') + '\n'; + }, + OperationDefinition: function OperationDefinition(node) { + var op = node.operation; + var name = node.name; + var varDefs = wrap('(', join(node.variableDefinitions, ', '), ')'); + var directives = join(node.directives, ' '); + var selectionSet = node.selectionSet; // Anonymous queries with no directives or variable definitions can use + // the query short form. + + return !name && !directives && !varDefs && op === 'query' ? selectionSet : join([op, join([name, varDefs]), directives, selectionSet], ' '); + }, + VariableDefinition: function VariableDefinition(_ref) { + var variable = _ref.variable, + type = _ref.type, + defaultValue = _ref.defaultValue, + directives = _ref.directives; + return variable + ': ' + type + wrap(' = ', defaultValue) + wrap(' ', join(directives, ' ')); + }, + SelectionSet: function SelectionSet(_ref2) { + var selections = _ref2.selections; + return block(selections); + }, + Field: function Field(_ref3) { + var alias = _ref3.alias, + name = _ref3.name, + args = _ref3.arguments, + directives = _ref3.directives, + selectionSet = _ref3.selectionSet; + var prefix = wrap('', alias, ': ') + name; + var argsLine = prefix + wrap('(', join(args, ', '), ')'); + + if (argsLine.length > MAX_LINE_LENGTH) { + argsLine = prefix + wrap('(\n', indent(join(args, '\n')), '\n)'); + } + + return join([argsLine, join(directives, ' '), selectionSet], ' '); + }, + Argument: function Argument(_ref4) { + var name = _ref4.name, + value = _ref4.value; + return name + ': ' + value; + }, + // Fragments + FragmentSpread: function FragmentSpread(_ref5) { + var name = _ref5.name, + directives = _ref5.directives; + return '...' + name + wrap(' ', join(directives, ' ')); + }, + InlineFragment: function InlineFragment(_ref6) { + var typeCondition = _ref6.typeCondition, + directives = _ref6.directives, + selectionSet = _ref6.selectionSet; + return join(['...', wrap('on ', typeCondition), join(directives, ' '), selectionSet], ' '); + }, + FragmentDefinition: function FragmentDefinition(_ref7) { + var name = _ref7.name, + typeCondition = _ref7.typeCondition, + variableDefinitions = _ref7.variableDefinitions, + directives = _ref7.directives, + selectionSet = _ref7.selectionSet; + return (// Note: fragment variable definitions are experimental and may be changed + // or removed in the future. + "fragment ".concat(name).concat(wrap('(', join(variableDefinitions, ', '), ')'), " ") + "on ".concat(typeCondition, " ").concat(wrap('', join(directives, ' '), ' ')) + selectionSet + ); + }, + // Value + IntValue: function IntValue(_ref8) { + var value = _ref8.value; + return value; + }, + FloatValue: function FloatValue(_ref9) { + var value = _ref9.value; + return value; + }, + StringValue: function StringValue(_ref10, key) { + var value = _ref10.value, + isBlockString = _ref10.block; + return isBlockString ? (0, _blockString.printBlockString)(value, key === 'description' ? '' : ' ') : JSON.stringify(value); + }, + BooleanValue: function BooleanValue(_ref11) { + var value = _ref11.value; + return value ? 'true' : 'false'; + }, + NullValue: function NullValue() { + return 'null'; + }, + EnumValue: function EnumValue(_ref12) { + var value = _ref12.value; + return value; + }, + ListValue: function ListValue(_ref13) { + var values = _ref13.values; + return '[' + join(values, ', ') + ']'; + }, + ObjectValue: function ObjectValue(_ref14) { + var fields = _ref14.fields; + return '{' + join(fields, ', ') + '}'; + }, + ObjectField: function ObjectField(_ref15) { + var name = _ref15.name, + value = _ref15.value; + return name + ': ' + value; + }, + // Directive + Directive: function Directive(_ref16) { + var name = _ref16.name, + args = _ref16.arguments; + return '@' + name + wrap('(', join(args, ', '), ')'); + }, + // Type + NamedType: function NamedType(_ref17) { + var name = _ref17.name; + return name; + }, + ListType: function ListType(_ref18) { + var type = _ref18.type; + return '[' + type + ']'; + }, + NonNullType: function NonNullType(_ref19) { + var type = _ref19.type; + return type + '!'; + }, + // Type System Definitions + SchemaDefinition: addDescription(function (_ref20) { + var directives = _ref20.directives, + operationTypes = _ref20.operationTypes; + return join(['schema', join(directives, ' '), block(operationTypes)], ' '); + }), + OperationTypeDefinition: function OperationTypeDefinition(_ref21) { + var operation = _ref21.operation, + type = _ref21.type; + return operation + ': ' + type; + }, + ScalarTypeDefinition: addDescription(function (_ref22) { + var name = _ref22.name, + directives = _ref22.directives; + return join(['scalar', name, join(directives, ' ')], ' '); + }), + ObjectTypeDefinition: addDescription(function (_ref23) { + var name = _ref23.name, + interfaces = _ref23.interfaces, + directives = _ref23.directives, + fields = _ref23.fields; + return join(['type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' '); + }), + FieldDefinition: addDescription(function (_ref24) { + var name = _ref24.name, + args = _ref24.arguments, + type = _ref24.type, + directives = _ref24.directives; + return name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + ': ' + type + wrap(' ', join(directives, ' ')); + }), + InputValueDefinition: addDescription(function (_ref25) { + var name = _ref25.name, + type = _ref25.type, + defaultValue = _ref25.defaultValue, + directives = _ref25.directives; + return join([name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')], ' '); + }), + InterfaceTypeDefinition: addDescription(function (_ref26) { + var name = _ref26.name, + interfaces = _ref26.interfaces, + directives = _ref26.directives, + fields = _ref26.fields; + return join(['interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' '); + }), + UnionTypeDefinition: addDescription(function (_ref27) { + var name = _ref27.name, + directives = _ref27.directives, + types = _ref27.types; + return join(['union', name, join(directives, ' '), types && types.length !== 0 ? '= ' + join(types, ' | ') : ''], ' '); + }), + EnumTypeDefinition: addDescription(function (_ref28) { + var name = _ref28.name, + directives = _ref28.directives, + values = _ref28.values; + return join(['enum', name, join(directives, ' '), block(values)], ' '); + }), + EnumValueDefinition: addDescription(function (_ref29) { + var name = _ref29.name, + directives = _ref29.directives; + return join([name, join(directives, ' ')], ' '); + }), + InputObjectTypeDefinition: addDescription(function (_ref30) { + var name = _ref30.name, + directives = _ref30.directives, + fields = _ref30.fields; + return join(['input', name, join(directives, ' '), block(fields)], ' '); + }), + DirectiveDefinition: addDescription(function (_ref31) { + var name = _ref31.name, + args = _ref31.arguments, + repeatable = _ref31.repeatable, + locations = _ref31.locations; + return 'directive @' + name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + (repeatable ? ' repeatable' : '') + ' on ' + join(locations, ' | '); + }), + SchemaExtension: function SchemaExtension(_ref32) { + var directives = _ref32.directives, + operationTypes = _ref32.operationTypes; + return join(['extend schema', join(directives, ' '), block(operationTypes)], ' '); + }, + ScalarTypeExtension: function ScalarTypeExtension(_ref33) { + var name = _ref33.name, + directives = _ref33.directives; + return join(['extend scalar', name, join(directives, ' ')], ' '); + }, + ObjectTypeExtension: function ObjectTypeExtension(_ref34) { + var name = _ref34.name, + interfaces = _ref34.interfaces, + directives = _ref34.directives, + fields = _ref34.fields; + return join(['extend type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' '); + }, + InterfaceTypeExtension: function InterfaceTypeExtension(_ref35) { + var name = _ref35.name, + interfaces = _ref35.interfaces, + directives = _ref35.directives, + fields = _ref35.fields; + return join(['extend interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' '); + }, + UnionTypeExtension: function UnionTypeExtension(_ref36) { + var name = _ref36.name, + directives = _ref36.directives, + types = _ref36.types; + return join(['extend union', name, join(directives, ' '), types && types.length !== 0 ? '= ' + join(types, ' | ') : ''], ' '); + }, + EnumTypeExtension: function EnumTypeExtension(_ref37) { + var name = _ref37.name, + directives = _ref37.directives, + values = _ref37.values; + return join(['extend enum', name, join(directives, ' '), block(values)], ' '); + }, + InputObjectTypeExtension: function InputObjectTypeExtension(_ref38) { + var name = _ref38.name, + directives = _ref38.directives, + fields = _ref38.fields; + return join(['extend input', name, join(directives, ' '), block(fields)], ' '); + } +}; + +function addDescription(cb) { + return function (node) { + return join([node.description, cb(node)], '\n'); + }; +} +/** + * Given maybeArray, print an empty string if it is null or empty, otherwise + * print all items together separated by separator if provided + */ + + +function join(maybeArray) { + var _maybeArray$filter$jo; + + var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) { + return x; + }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : ''; +} +/** + * Given array, print each item on its own line, wrapped in an + * indented "{ }" block. + */ + + +function block(array) { + return wrap('{\n', indent(join(array, '\n')), '\n}'); +} +/** + * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string. + */ + + +function wrap(start, maybeString) { + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + return maybeString != null && maybeString !== '' ? start + maybeString + end : ''; +} + +function indent(str) { + return wrap(' ', str.replace(/\n/g, '\n ')); +} + +function isMultiline(str) { + return str.indexOf('\n') !== -1; +} + +function hasMultilineItems(maybeArray) { + return maybeArray != null && maybeArray.some(isMultiline); +} + + +/***/ }), + +/***/ 65521: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isSource = isSource; +exports.Source = void 0; + +var _symbols = __nccwpck_require__(3255); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +var _instanceOf = _interopRequireDefault(__nccwpck_require__(93481)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +/** + * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are + * optional, but they are useful for clients who store GraphQL documents in source files. + * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might + * be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`. + * The `line` and `column` properties in `locationOffset` are 1-indexed. + */ +var Source = /*#__PURE__*/function () { + function Source(body) { + var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GraphQL request'; + var locationOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { + line: 1, + column: 1 + }; + typeof body === 'string' || (0, _devAssert.default)(0, "Body must be a string. Received: ".concat((0, _inspect.default)(body), ".")); + this.body = body; + this.name = name; + this.locationOffset = locationOffset; + this.locationOffset.line > 0 || (0, _devAssert.default)(0, 'line in locationOffset is 1-indexed and must be positive.'); + this.locationOffset.column > 0 || (0, _devAssert.default)(0, 'column in locationOffset is 1-indexed and must be positive.'); + } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet + + + _createClass(Source, [{ + key: _symbols.SYMBOL_TO_STRING_TAG, + get: function get() { + return 'Source'; + } + }]); + + return Source; +}(); +/** + * Test if the given value is a Source object. + * + * @internal + */ + + +exports.Source = Source; + +// eslint-disable-next-line no-redeclare +function isSource(source) { + return (0, _instanceOf.default)(source, Source); +} + + +/***/ }), + +/***/ 91565: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.TokenKind = void 0; + +/** + * An exported enum describing the different kinds of tokens that the + * lexer emits. + */ +var TokenKind = Object.freeze({ + SOF: '', + EOF: '', + BANG: '!', + DOLLAR: '$', + AMP: '&', + PAREN_L: '(', + PAREN_R: ')', + SPREAD: '...', + COLON: ':', + EQUALS: '=', + AT: '@', + BRACKET_L: '[', + BRACKET_R: ']', + BRACE_L: '{', + PIPE: '|', + BRACE_R: '}', + NAME: 'Name', + INT: 'Int', + FLOAT: 'Float', + STRING: 'String', + BLOCK_STRING: 'BlockString', + COMMENT: 'Comment' +}); +/** + * The enum type representing the token kinds values. + */ + +exports.TokenKind = TokenKind; + + +/***/ }), + +/***/ 5678: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.visit = visit; +exports.visitInParallel = visitInParallel; +exports.getVisitFn = getVisitFn; +exports.BREAK = exports.QueryDocumentKeys = void 0; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _ast = __nccwpck_require__(45494); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var QueryDocumentKeys = { + Name: [], + Document: ['definitions'], + OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'], + VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'], + Variable: ['name'], + SelectionSet: ['selections'], + Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'], + Argument: ['name', 'value'], + FragmentSpread: ['name', 'directives'], + InlineFragment: ['typeCondition', 'directives', 'selectionSet'], + FragmentDefinition: ['name', // Note: fragment variable definitions are experimental and may be changed + // or removed in the future. + 'variableDefinitions', 'typeCondition', 'directives', 'selectionSet'], + IntValue: [], + FloatValue: [], + StringValue: [], + BooleanValue: [], + NullValue: [], + EnumValue: [], + ListValue: ['values'], + ObjectValue: ['fields'], + ObjectField: ['name', 'value'], + Directive: ['name', 'arguments'], + NamedType: ['name'], + ListType: ['type'], + NonNullType: ['type'], + SchemaDefinition: ['description', 'directives', 'operationTypes'], + OperationTypeDefinition: ['type'], + ScalarTypeDefinition: ['description', 'name', 'directives'], + ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'], + FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'], + InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'], + InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'], + UnionTypeDefinition: ['description', 'name', 'directives', 'types'], + EnumTypeDefinition: ['description', 'name', 'directives', 'values'], + EnumValueDefinition: ['description', 'name', 'directives'], + InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'], + DirectiveDefinition: ['description', 'name', 'arguments', 'locations'], + SchemaExtension: ['directives', 'operationTypes'], + ScalarTypeExtension: ['name', 'directives'], + ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'], + InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'], + UnionTypeExtension: ['name', 'directives', 'types'], + EnumTypeExtension: ['name', 'directives', 'values'], + InputObjectTypeExtension: ['name', 'directives', 'fields'] +}; +exports.QueryDocumentKeys = QueryDocumentKeys; +var BREAK = Object.freeze({}); +/** + * visit() will walk through an AST using a depth-first traversal, calling + * the visitor's enter function at each node in the traversal, and calling the + * leave function after visiting that node and all of its child nodes. + * + * By returning different values from the enter and leave functions, the + * behavior of the visitor can be altered, including skipping over a sub-tree of + * the AST (by returning false), editing the AST by returning a value or null + * to remove the value, or to stop the whole traversal by returning BREAK. + * + * When using visit() to edit an AST, the original AST will not be modified, and + * a new version of the AST with the changes applied will be returned from the + * visit function. + * + * const editedAST = visit(ast, { + * enter(node, key, parent, path, ancestors) { + * // @return + * // undefined: no action + * // false: skip visiting this node + * // visitor.BREAK: stop visiting altogether + * // null: delete this node + * // any value: replace this node with the returned value + * }, + * leave(node, key, parent, path, ancestors) { + * // @return + * // undefined: no action + * // false: no action + * // visitor.BREAK: stop visiting altogether + * // null: delete this node + * // any value: replace this node with the returned value + * } + * }); + * + * Alternatively to providing enter() and leave() functions, a visitor can + * instead provide functions named the same as the kinds of AST nodes, or + * enter/leave visitors at a named key, leading to four permutations of the + * visitor API: + * + * 1) Named visitors triggered when entering a node of a specific kind. + * + * visit(ast, { + * Kind(node) { + * // enter the "Kind" node + * } + * }) + * + * 2) Named visitors that trigger upon entering and leaving a node of + * a specific kind. + * + * visit(ast, { + * Kind: { + * enter(node) { + * // enter the "Kind" node + * } + * leave(node) { + * // leave the "Kind" node + * } + * } + * }) + * + * 3) Generic visitors that trigger upon entering and leaving any node. + * + * visit(ast, { + * enter(node) { + * // enter any node + * }, + * leave(node) { + * // leave any node + * } + * }) + * + * 4) Parallel visitors for entering and leaving nodes of a specific kind. + * + * visit(ast, { + * enter: { + * Kind(node) { + * // enter the "Kind" node + * } + * }, + * leave: { + * Kind(node) { + * // leave the "Kind" node + * } + * } + * }) + */ + +exports.BREAK = BREAK; + +function visit(root, visitor) { + var visitorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : QueryDocumentKeys; + + /* eslint-disable no-undef-init */ + var stack = undefined; + var inArray = Array.isArray(root); + var keys = [root]; + var index = -1; + var edits = []; + var node = undefined; + var key = undefined; + var parent = undefined; + var path = []; + var ancestors = []; + var newRoot = root; + /* eslint-enable no-undef-init */ + + do { + index++; + var isLeaving = index === keys.length; + var isEdited = isLeaving && edits.length !== 0; + + if (isLeaving) { + key = ancestors.length === 0 ? undefined : path[path.length - 1]; + node = parent; + parent = ancestors.pop(); + + if (isEdited) { + if (inArray) { + node = node.slice(); + } else { + var clone = {}; + + for (var _i2 = 0, _Object$keys2 = Object.keys(node); _i2 < _Object$keys2.length; _i2++) { + var k = _Object$keys2[_i2]; + clone[k] = node[k]; + } + + node = clone; + } + + var editOffset = 0; + + for (var ii = 0; ii < edits.length; ii++) { + var editKey = edits[ii][0]; + var editValue = edits[ii][1]; + + if (inArray) { + editKey -= editOffset; + } + + if (inArray && editValue === null) { + node.splice(editKey, 1); + editOffset++; + } else { + node[editKey] = editValue; + } + } + } + + index = stack.index; + keys = stack.keys; + edits = stack.edits; + inArray = stack.inArray; + stack = stack.prev; + } else { + key = parent ? inArray ? index : keys[index] : undefined; + node = parent ? parent[key] : newRoot; + + if (node === null || node === undefined) { + continue; + } + + if (parent) { + path.push(key); + } + } + + var result = void 0; + + if (!Array.isArray(node)) { + if (!(0, _ast.isNode)(node)) { + throw new Error("Invalid AST Node: ".concat((0, _inspect.default)(node), ".")); + } + + var visitFn = getVisitFn(visitor, node.kind, isLeaving); + + if (visitFn) { + result = visitFn.call(visitor, node, key, parent, path, ancestors); + + if (result === BREAK) { + break; + } + + if (result === false) { + if (!isLeaving) { + path.pop(); + continue; + } + } else if (result !== undefined) { + edits.push([key, result]); + + if (!isLeaving) { + if ((0, _ast.isNode)(result)) { + node = result; + } else { + path.pop(); + continue; + } + } + } + } + } + + if (result === undefined && isEdited) { + edits.push([key, node]); + } + + if (isLeaving) { + path.pop(); + } else { + var _visitorKeys$node$kin; + + stack = { + inArray: inArray, + index: index, + keys: keys, + edits: edits, + prev: stack + }; + inArray = Array.isArray(node); + keys = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : []; + index = -1; + edits = []; + + if (parent) { + ancestors.push(parent); + } + + parent = node; + } + } while (stack !== undefined); + + if (edits.length !== 0) { + newRoot = edits[edits.length - 1][1]; + } + + return newRoot; +} +/** + * Creates a new visitor instance which delegates to many visitors to run in + * parallel. Each visitor will be visited for each node before moving on. + * + * If a prior visitor edits a node, no following visitors will see that node. + */ + + +function visitInParallel(visitors) { + var skipping = new Array(visitors.length); + return { + enter: function enter(node) { + for (var i = 0; i < visitors.length; i++) { + if (skipping[i] == null) { + var fn = getVisitFn(visitors[i], node.kind, + /* isLeaving */ + false); + + if (fn) { + var result = fn.apply(visitors[i], arguments); + + if (result === false) { + skipping[i] = node; + } else if (result === BREAK) { + skipping[i] = BREAK; + } else if (result !== undefined) { + return result; + } + } + } + } + }, + leave: function leave(node) { + for (var i = 0; i < visitors.length; i++) { + if (skipping[i] == null) { + var fn = getVisitFn(visitors[i], node.kind, + /* isLeaving */ + true); + + if (fn) { + var result = fn.apply(visitors[i], arguments); + + if (result === BREAK) { + skipping[i] = BREAK; + } else if (result !== undefined && result !== false) { + return result; + } + } + } else if (skipping[i] === node) { + skipping[i] = null; + } + } + } + }; +} +/** + * Given a visitor instance, if it is leaving or not, and a node kind, return + * the function the visitor runtime should call. + */ + + +function getVisitFn(visitor, kind, isLeaving) { + var kindVisitor = visitor[kind]; + + if (kindVisitor) { + if (!isLeaving && typeof kindVisitor === 'function') { + // { Kind() {} } + return kindVisitor; + } + + var kindSpecificVisitor = isLeaving ? kindVisitor.leave : kindVisitor.enter; + + if (typeof kindSpecificVisitor === 'function') { + // { Kind: { enter() {}, leave() {} } } + return kindSpecificVisitor; + } + } else { + var specificVisitor = isLeaving ? visitor.leave : visitor.enter; + + if (specificVisitor) { + if (typeof specificVisitor === 'function') { + // { enter() {}, leave() {} } + return specificVisitor; + } + + var specificKindVisitor = specificVisitor[kind]; + + if (typeof specificKindVisitor === 'function') { + // { enter: { Kind() {} }, leave: { Kind() {} } } + return specificKindVisitor; + } + } + } +} + + +/***/ }), + +/***/ 86839: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _symbols = __nccwpck_require__(3255); + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] +var arrayFrom = Array.from || function (obj, mapFn, thisArg) { + if (obj == null) { + throw new TypeError('Array.from requires an array-like object - not null or undefined'); + } // Is Iterable? + + + var iteratorMethod = obj[_symbols.SYMBOL_ITERATOR]; + + if (typeof iteratorMethod === 'function') { + var iterator = iteratorMethod.call(obj); + var result = []; + var step; + + for (var i = 0; !(step = iterator.next()).done; ++i) { + result.push(mapFn.call(thisArg, step.value, i)); // Infinite Iterators could cause forEach to run forever. + // After a very large number of iterations, produce an error. + // istanbul ignore if (Too big to actually test) + + if (i > 9999999) { + throw new TypeError('Near-infinite iteration.'); + } + } + + return result; + } // Is Array like? + + + var length = obj.length; + + if (typeof length === 'number' && length >= 0 && length % 1 === 0) { + var _result = []; + + for (var _i = 0; _i < length; ++_i) { + if (Object.prototype.hasOwnProperty.call(obj, _i)) { + _result.push(mapFn.call(thisArg, obj[_i], _i)); + } + } + + return _result; + } + + return []; +}; + +var _default = arrayFrom; +exports.default = _default; + + +/***/ }), + +/***/ 57649: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] +var find = Array.prototype.find ? function (list, predicate) { + return Array.prototype.find.call(list, predicate); +} : function (list, predicate) { + for (var _i2 = 0; _i2 < list.length; _i2++) { + var value = list[_i2]; + + if (predicate(value)) { + return value; + } + } +}; +var _default = find; +exports.default = _default; + + +/***/ }), + +/***/ 78473: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var isFinitePolyfill = Number.isFinite || function (value) { + return typeof value === 'number' && isFinite(value); +}; + +var _default = isFinitePolyfill; +exports.default = _default; + + +/***/ }), + +/***/ 15813: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var isInteger = Number.isInteger || function (value) { + return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; +}; + +var _default = isInteger; +exports.default = _default; + + +/***/ }), + +/***/ 86422: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var objectEntries = Object.entries || function (obj) { + return Object.keys(obj).map(function (key) { + return [key, obj[key]]; + }); +}; + +var _default = objectEntries; +exports.default = _default; + + +/***/ }), + +/***/ 30026: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var objectValues = Object.values || function (obj) { + return Object.keys(obj).map(function (key) { + return obj[key]; + }); +}; + +var _default = objectValues; +exports.default = _default; + + +/***/ }), + +/***/ 3255: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.SYMBOL_TO_STRING_TAG = exports.SYMBOL_ASYNC_ITERATOR = exports.SYMBOL_ITERATOR = void 0; +// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator +// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') +var SYMBOL_ITERATOR = typeof Symbol === 'function' && Symbol.iterator != null ? Symbol.iterator : '@@iterator'; // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator +// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') + +exports.SYMBOL_ITERATOR = SYMBOL_ITERATOR; +var SYMBOL_ASYNC_ITERATOR = typeof Symbol === 'function' && Symbol.asyncIterator != null ? Symbol.asyncIterator : '@@asyncIterator'; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') + +exports.SYMBOL_ASYNC_ITERATOR = SYMBOL_ASYNC_ITERATOR; +var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag'; +exports.SYMBOL_TO_STRING_TAG = SYMBOL_TO_STRING_TAG; + + +/***/ }), + +/***/ 17575: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "subscribe", ({ + enumerable: true, + get: function get() { + return _subscribe.subscribe; + } +})); +Object.defineProperty(exports, "createSourceEventStream", ({ + enumerable: true, + get: function get() { + return _subscribe.createSourceEventStream; + } +})); + +var _subscribe = __nccwpck_require__(39217); + + +/***/ }), + +/***/ 11383: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = mapAsyncIterator; + +var _symbols = __nccwpck_require__(3255); + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/** + * Given an AsyncIterable and a callback function, return an AsyncIterator + * which produces values mapped via calling the callback function. + */ +function mapAsyncIterator(iterable, callback, rejectCallback) { + // $FlowFixMe[prop-missing] + var iteratorMethod = iterable[_symbols.SYMBOL_ASYNC_ITERATOR]; + var iterator = iteratorMethod.call(iterable); + var $return; + var abruptClose; + + if (typeof iterator.return === 'function') { + $return = iterator.return; + + abruptClose = function abruptClose(error) { + var rethrow = function rethrow() { + return Promise.reject(error); + }; + + return $return.call(iterator).then(rethrow, rethrow); + }; + } + + function mapResult(result) { + return result.done ? result : asyncMapValue(result.value, callback).then(iteratorResult, abruptClose); + } + + var mapReject; + + if (rejectCallback) { + // Capture rejectCallback to ensure it cannot be null. + var reject = rejectCallback; + + mapReject = function mapReject(error) { + return asyncMapValue(error, reject).then(iteratorResult, abruptClose); + }; + } + /* TODO: Flow doesn't support symbols as keys: + https://github.com/facebook/flow/issues/3258 */ + + + return _defineProperty({ + next: function next() { + return iterator.next().then(mapResult, mapReject); + }, + return: function _return() { + return $return ? $return.call(iterator).then(mapResult, mapReject) : Promise.resolve({ + value: undefined, + done: true + }); + }, + throw: function _throw(error) { + if (typeof iterator.throw === 'function') { + return iterator.throw(error).then(mapResult, mapReject); + } + + return Promise.reject(error).catch(abruptClose); + } + }, _symbols.SYMBOL_ASYNC_ITERATOR, function () { + return this; + }); +} + +function asyncMapValue(value, callback) { + return new Promise(function (resolve) { + return resolve(callback(value)); + }); +} + +function iteratorResult(value) { + return { + value: value, + done: false + }; +} + + +/***/ }), + +/***/ 39217: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.subscribe = subscribe; +exports.createSourceEventStream = createSourceEventStream; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _isAsyncIterable = _interopRequireDefault(__nccwpck_require__(20626)); + +var _Path = __nccwpck_require__(11262); + +var _GraphQLError = __nccwpck_require__(4797); + +var _locatedError = __nccwpck_require__(16842); + +var _values = __nccwpck_require__(94834); + +var _execute = __nccwpck_require__(83677); + +var _getOperationRootType = __nccwpck_require__(81605); + +var _mapAsyncIterator = _interopRequireDefault(__nccwpck_require__(11383)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function subscribe(argsOrSchema, document, rootValue, contextValue, variableValues, operationName, fieldResolver, subscribeFieldResolver) { + /* eslint-enable no-redeclare */ + // Extract arguments from object args if provided. + return arguments.length === 1 ? subscribeImpl(argsOrSchema) : subscribeImpl({ + schema: argsOrSchema, + document: document, + rootValue: rootValue, + contextValue: contextValue, + variableValues: variableValues, + operationName: operationName, + fieldResolver: fieldResolver, + subscribeFieldResolver: subscribeFieldResolver + }); +} +/** + * This function checks if the error is a GraphQLError. If it is, report it as + * an ExecutionResult, containing only errors and no data. Otherwise treat the + * error as a system-class error and re-throw it. + */ + + +function reportGraphQLError(error) { + if (error instanceof _GraphQLError.GraphQLError) { + return { + errors: [error] + }; + } + + throw error; +} + +function subscribeImpl(args) { + var schema = args.schema, + document = args.document, + rootValue = args.rootValue, + contextValue = args.contextValue, + variableValues = args.variableValues, + operationName = args.operationName, + fieldResolver = args.fieldResolver, + subscribeFieldResolver = args.subscribeFieldResolver; + var sourcePromise = createSourceEventStream(schema, document, rootValue, contextValue, variableValues, operationName, subscribeFieldResolver); // For each payload yielded from a subscription, map it over the normal + // GraphQL `execute` function, with `payload` as the rootValue. + // This implements the "MapSourceToResponseEvent" algorithm described in + // the GraphQL specification. The `execute` function provides the + // "ExecuteSubscriptionEvent" algorithm, as it is nearly identical to the + // "ExecuteQuery" algorithm, for which `execute` is also used. + + var mapSourceToResponse = function mapSourceToResponse(payload) { + return (0, _execute.execute)({ + schema: schema, + document: document, + rootValue: payload, + contextValue: contextValue, + variableValues: variableValues, + operationName: operationName, + fieldResolver: fieldResolver + }); + }; // Resolve the Source Stream, then map every source value to a + // ExecutionResult value as described above. + + + return sourcePromise.then(function (resultOrStream) { + return (// Note: Flow can't refine isAsyncIterable, so explicit casts are used. + (0, _isAsyncIterable.default)(resultOrStream) ? (0, _mapAsyncIterator.default)(resultOrStream, mapSourceToResponse, reportGraphQLError) : resultOrStream + ); + }); +} +/** + * Implements the "CreateSourceEventStream" algorithm described in the + * GraphQL specification, resolving the subscription source event stream. + * + * Returns a Promise which resolves to either an AsyncIterable (if successful) + * or an ExecutionResult (error). The promise will be rejected if the schema or + * other arguments to this function are invalid, or if the resolved event stream + * is not an async iterable. + * + * If the client-provided arguments to this function do not result in a + * compliant subscription, a GraphQL Response (ExecutionResult) with + * descriptive errors and no data will be returned. + * + * If the the source stream could not be created due to faulty subscription + * resolver logic or underlying systems, the promise will resolve to a single + * ExecutionResult containing `errors` and no `data`. + * + * If the operation succeeded, the promise resolves to the AsyncIterable for the + * event stream returned by the resolver. + * + * A Source Event Stream represents a sequence of events, each of which triggers + * a GraphQL execution for that event. + * + * This may be useful when hosting the stateful subscription service in a + * different process or machine than the stateless GraphQL execution engine, + * or otherwise separating these two steps. For more on this, see the + * "Supporting Subscriptions at Scale" information in the GraphQL specification. + */ + + +function createSourceEventStream(schema, document, rootValue, contextValue, variableValues, operationName, fieldResolver) { + // If arguments are missing or incorrectly typed, this is an internal + // developer mistake which should throw an early error. + (0, _execute.assertValidExecutionArguments)(schema, document, variableValues); + return new Promise(function (resolve) { + // If a valid context cannot be created due to incorrect arguments, + // this will throw an error. + var exeContext = (0, _execute.buildExecutionContext)(schema, document, rootValue, contextValue, variableValues, operationName, fieldResolver); + resolve( // Return early errors if execution context failed. + Array.isArray(exeContext) ? { + errors: exeContext + } : executeSubscription(exeContext)); + }).catch(reportGraphQLError); +} + +function executeSubscription(exeContext) { + var schema = exeContext.schema, + operation = exeContext.operation, + variableValues = exeContext.variableValues, + rootValue = exeContext.rootValue; + var type = (0, _getOperationRootType.getOperationRootType)(schema, operation); + var fields = (0, _execute.collectFields)(exeContext, type, operation.selectionSet, Object.create(null), Object.create(null)); + var responseNames = Object.keys(fields); + var responseName = responseNames[0]; + var fieldNodes = fields[responseName]; + var fieldNode = fieldNodes[0]; + var fieldName = fieldNode.name.value; + var fieldDef = (0, _execute.getFieldDef)(schema, type, fieldName); + + if (!fieldDef) { + throw new _GraphQLError.GraphQLError("The subscription field \"".concat(fieldName, "\" is not defined."), fieldNodes); + } + + var path = (0, _Path.addPath)(undefined, responseName, type.name); + var info = (0, _execute.buildResolveInfo)(exeContext, fieldDef, fieldNodes, type, path); // Coerce to Promise for easier error handling and consistent return type. + + return new Promise(function (resolveResult) { + var _fieldDef$subscribe; + + // Implements the "ResolveFieldEventStream" algorithm from GraphQL specification. + // It differs from "ResolveFieldValue" due to providing a different `resolveFn`. + // Build a JS object of arguments from the field.arguments AST, using the + // variables scope to fulfill any variable references. + var args = (0, _values.getArgumentValues)(fieldDef, fieldNodes[0], variableValues); // The resolve function's optional third argument is a context value that + // is provided to every resolve function within an execution. It is commonly + // used to represent an authenticated user, or request-specific caches. + + var contextValue = exeContext.contextValue; // Call the `subscribe()` resolver or the default resolver to produce an + // AsyncIterable yielding raw payloads. + + var resolveFn = (_fieldDef$subscribe = fieldDef.subscribe) !== null && _fieldDef$subscribe !== void 0 ? _fieldDef$subscribe : exeContext.fieldResolver; + resolveResult(resolveFn(rootValue, args, contextValue, info)); + }).then(function (eventStream) { + if (eventStream instanceof Error) { + throw (0, _locatedError.locatedError)(eventStream, fieldNodes, (0, _Path.pathToArray)(path)); + } // Assert field returned an event stream, otherwise yield an error. + + + if (!(0, _isAsyncIterable.default)(eventStream)) { + throw new Error('Subscription field must return Async Iterable. ' + "Received: ".concat((0, _inspect.default)(eventStream), ".")); + } + + return eventStream; + }, function (error) { + throw (0, _locatedError.locatedError)(error, fieldNodes, (0, _Path.pathToArray)(path)); + }); +} + + +/***/ }), + +/***/ 5821: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isType = isType; +exports.assertType = assertType; +exports.isScalarType = isScalarType; +exports.assertScalarType = assertScalarType; +exports.isObjectType = isObjectType; +exports.assertObjectType = assertObjectType; +exports.isInterfaceType = isInterfaceType; +exports.assertInterfaceType = assertInterfaceType; +exports.isUnionType = isUnionType; +exports.assertUnionType = assertUnionType; +exports.isEnumType = isEnumType; +exports.assertEnumType = assertEnumType; +exports.isInputObjectType = isInputObjectType; +exports.assertInputObjectType = assertInputObjectType; +exports.isListType = isListType; +exports.assertListType = assertListType; +exports.isNonNullType = isNonNullType; +exports.assertNonNullType = assertNonNullType; +exports.isInputType = isInputType; +exports.assertInputType = assertInputType; +exports.isOutputType = isOutputType; +exports.assertOutputType = assertOutputType; +exports.isLeafType = isLeafType; +exports.assertLeafType = assertLeafType; +exports.isCompositeType = isCompositeType; +exports.assertCompositeType = assertCompositeType; +exports.isAbstractType = isAbstractType; +exports.assertAbstractType = assertAbstractType; +exports.GraphQLList = GraphQLList; +exports.GraphQLNonNull = GraphQLNonNull; +exports.isWrappingType = isWrappingType; +exports.assertWrappingType = assertWrappingType; +exports.isNullableType = isNullableType; +exports.assertNullableType = assertNullableType; +exports.getNullableType = getNullableType; +exports.isNamedType = isNamedType; +exports.assertNamedType = assertNamedType; +exports.getNamedType = getNamedType; +exports.argsToArgsConfig = argsToArgsConfig; +exports.isRequiredArgument = isRequiredArgument; +exports.isRequiredInputField = isRequiredInputField; +exports.GraphQLInputObjectType = exports.GraphQLEnumType = exports.GraphQLUnionType = exports.GraphQLInterfaceType = exports.GraphQLObjectType = exports.GraphQLScalarType = void 0; + +var _objectEntries = _interopRequireDefault(__nccwpck_require__(86422)); + +var _symbols = __nccwpck_require__(3255); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _keyMap = _interopRequireDefault(__nccwpck_require__(10711)); + +var _mapValue = _interopRequireDefault(__nccwpck_require__(32223)); + +var _toObjMap = _interopRequireDefault(__nccwpck_require__(74728)); + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +var _keyValMap = _interopRequireDefault(__nccwpck_require__(49268)); + +var _instanceOf = _interopRequireDefault(__nccwpck_require__(93481)); + +var _didYouMean = _interopRequireDefault(__nccwpck_require__(42878)); + +var _isObjectLike = _interopRequireDefault(__nccwpck_require__(95865)); + +var _identityFunc = _interopRequireDefault(__nccwpck_require__(51188)); + +var _defineInspect = _interopRequireDefault(__nccwpck_require__(73965)); + +var _suggestionList = _interopRequireDefault(__nccwpck_require__(57704)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +var _printer = __nccwpck_require__(68203); + +var _valueFromASTUntyped = __nccwpck_require__(86699); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function isType(type) { + return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type) || isListType(type) || isNonNullType(type); +} + +function assertType(type) { + if (!isType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL type.")); + } + + return type; +} +/** + * There are predicates for each kind of GraphQL type. + */ + + +// eslint-disable-next-line no-redeclare +function isScalarType(type) { + return (0, _instanceOf.default)(type, GraphQLScalarType); +} + +function assertScalarType(type) { + if (!isScalarType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Scalar type.")); + } + + return type; +} + +// eslint-disable-next-line no-redeclare +function isObjectType(type) { + return (0, _instanceOf.default)(type, GraphQLObjectType); +} + +function assertObjectType(type) { + if (!isObjectType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Object type.")); + } + + return type; +} + +// eslint-disable-next-line no-redeclare +function isInterfaceType(type) { + return (0, _instanceOf.default)(type, GraphQLInterfaceType); +} + +function assertInterfaceType(type) { + if (!isInterfaceType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Interface type.")); + } + + return type; +} + +// eslint-disable-next-line no-redeclare +function isUnionType(type) { + return (0, _instanceOf.default)(type, GraphQLUnionType); +} + +function assertUnionType(type) { + if (!isUnionType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Union type.")); + } + + return type; +} + +// eslint-disable-next-line no-redeclare +function isEnumType(type) { + return (0, _instanceOf.default)(type, GraphQLEnumType); +} + +function assertEnumType(type) { + if (!isEnumType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type.")); + } + + return type; +} + +// eslint-disable-next-line no-redeclare +function isInputObjectType(type) { + return (0, _instanceOf.default)(type, GraphQLInputObjectType); +} + +function assertInputObjectType(type) { + if (!isInputObjectType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Input Object type.")); + } + + return type; +} + +// eslint-disable-next-line no-redeclare +function isListType(type) { + return (0, _instanceOf.default)(type, GraphQLList); +} + +function assertListType(type) { + if (!isListType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL List type.")); + } + + return type; +} + +// eslint-disable-next-line no-redeclare +function isNonNullType(type) { + return (0, _instanceOf.default)(type, GraphQLNonNull); +} + +function assertNonNullType(type) { + if (!isNonNullType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Non-Null type.")); + } + + return type; +} +/** + * These types may be used as input types for arguments and directives. + */ + + +function isInputType(type) { + return isScalarType(type) || isEnumType(type) || isInputObjectType(type) || isWrappingType(type) && isInputType(type.ofType); +} + +function assertInputType(type) { + if (!isInputType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL input type.")); + } + + return type; +} +/** + * These types may be used as output types as the result of fields. + */ + + +function isOutputType(type) { + return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isWrappingType(type) && isOutputType(type.ofType); +} + +function assertOutputType(type) { + if (!isOutputType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL output type.")); + } + + return type; +} +/** + * These types may describe types which may be leaf values. + */ + + +function isLeafType(type) { + return isScalarType(type) || isEnumType(type); +} + +function assertLeafType(type) { + if (!isLeafType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL leaf type.")); + } + + return type; +} +/** + * These types may describe the parent context of a selection set. + */ + + +function isCompositeType(type) { + return isObjectType(type) || isInterfaceType(type) || isUnionType(type); +} + +function assertCompositeType(type) { + if (!isCompositeType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL composite type.")); + } + + return type; +} +/** + * These types may describe the parent context of a selection set. + */ + + +function isAbstractType(type) { + return isInterfaceType(type) || isUnionType(type); +} + +function assertAbstractType(type) { + if (!isAbstractType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL abstract type.")); + } + + return type; +} +/** + * List Type Wrapper + * + * A list is a wrapping type which points to another type. + * Lists are often created within the context of defining the fields of + * an object type. + * + * Example: + * + * const PersonType = new GraphQLObjectType({ + * name: 'Person', + * fields: () => ({ + * parents: { type: new GraphQLList(PersonType) }, + * children: { type: new GraphQLList(PersonType) }, + * }) + * }) + * + */ +// FIXME: workaround to fix issue with Babel parser + +/* :: +declare class GraphQLList<+T: GraphQLType> { + +ofType: T; + static (ofType: T): GraphQLList; + // Note: constructors cannot be used for covariant types. Drop the "new". + constructor(ofType: GraphQLType): void; +} +*/ + + +function GraphQLList(ofType) { + // istanbul ignore else (to be removed in v16.0.0) + if (this instanceof GraphQLList) { + this.ofType = assertType(ofType); + } else { + return new GraphQLList(ofType); + } +} // Need to cast through any to alter the prototype. + + +GraphQLList.prototype.toString = function toString() { + return '[' + String(this.ofType) + ']'; +}; + +GraphQLList.prototype.toJSON = function toJSON() { + return this.toString(); +}; + +Object.defineProperty(GraphQLList.prototype, _symbols.SYMBOL_TO_STRING_TAG, { + get: function get() { + return 'GraphQLList'; + } +}); // Print a simplified form when appearing in `inspect` and `util.inspect`. + +(0, _defineInspect.default)(GraphQLList); +/** + * Non-Null Type Wrapper + * + * A non-null is a wrapping type which points to another type. + * Non-null types enforce that their values are never null and can ensure + * an error is raised if this ever occurs during a request. It is useful for + * fields which you can make a strong guarantee on non-nullability, for example + * usually the id field of a database row will never be null. + * + * Example: + * + * const RowType = new GraphQLObjectType({ + * name: 'Row', + * fields: () => ({ + * id: { type: new GraphQLNonNull(GraphQLString) }, + * }) + * }) + * + * Note: the enforcement of non-nullability occurs within the executor. + */ +// FIXME: workaround to fix issue with Babel parser + +/* :: +declare class GraphQLNonNull<+T: GraphQLNullableType> { + +ofType: T; + static (ofType: T): GraphQLNonNull; + // Note: constructors cannot be used for covariant types. Drop the "new". + constructor(ofType: GraphQLType): void; +} +*/ + +function GraphQLNonNull(ofType) { + // istanbul ignore else (to be removed in v16.0.0) + if (this instanceof GraphQLNonNull) { + this.ofType = assertNullableType(ofType); + } else { + return new GraphQLNonNull(ofType); + } +} // Need to cast through any to alter the prototype. + + +GraphQLNonNull.prototype.toString = function toString() { + return String(this.ofType) + '!'; +}; + +GraphQLNonNull.prototype.toJSON = function toJSON() { + return this.toString(); +}; + +Object.defineProperty(GraphQLNonNull.prototype, _symbols.SYMBOL_TO_STRING_TAG, { + get: function get() { + return 'GraphQLNonNull'; + } +}); // Print a simplified form when appearing in `inspect` and `util.inspect`. + +(0, _defineInspect.default)(GraphQLNonNull); +/** + * These types wrap and modify other types + */ + +function isWrappingType(type) { + return isListType(type) || isNonNullType(type); +} + +function assertWrappingType(type) { + if (!isWrappingType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL wrapping type.")); + } + + return type; +} +/** + * These types can all accept null as a value. + */ + + +function isNullableType(type) { + return isType(type) && !isNonNullType(type); +} + +function assertNullableType(type) { + if (!isNullableType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL nullable type.")); + } + + return type; +} +/* eslint-disable no-redeclare */ + + +function getNullableType(type) { + /* eslint-enable no-redeclare */ + if (type) { + return isNonNullType(type) ? type.ofType : type; + } +} +/** + * These named types do not include modifiers like List or NonNull. + */ + + +function isNamedType(type) { + return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type); +} + +function assertNamedType(type) { + if (!isNamedType(type)) { + throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL named type.")); + } + + return type; +} +/* eslint-disable no-redeclare */ + + +function getNamedType(type) { + /* eslint-enable no-redeclare */ + if (type) { + var unwrappedType = type; + + while (isWrappingType(unwrappedType)) { + unwrappedType = unwrappedType.ofType; + } + + return unwrappedType; + } +} +/** + * Used while defining GraphQL types to allow for circular references in + * otherwise immutable type definitions. + */ + + +function resolveThunk(thunk) { + // $FlowFixMe[incompatible-use] + return typeof thunk === 'function' ? thunk() : thunk; +} + +function undefineIfEmpty(arr) { + return arr && arr.length > 0 ? arr : undefined; +} +/** + * Scalar Type Definition + * + * The leaf values of any request and input values to arguments are + * Scalars (or Enums) and are defined with a name and a series of functions + * used to parse input from ast or variables and to ensure validity. + * + * If a type's serialize function does not return a value (i.e. it returns + * `undefined`) then an error will be raised and a `null` value will be returned + * in the response. If the serialize function returns `null`, then no error will + * be included in the response. + * + * Example: + * + * const OddType = new GraphQLScalarType({ + * name: 'Odd', + * serialize(value) { + * if (value % 2 === 1) { + * return value; + * } + * } + * }); + * + */ + + +var GraphQLScalarType = /*#__PURE__*/function () { + function GraphQLScalarType(config) { + var _config$parseValue, _config$serialize, _config$parseLiteral; + + var parseValue = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.default; + this.name = config.name; + this.description = config.description; + this.specifiedByUrl = config.specifiedByUrl; + this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.default; + this.parseValue = parseValue; + this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function (node, variables) { + return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables)); + }; + this.extensions = config.extensions && (0, _toObjMap.default)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes); + typeof config.name === 'string' || (0, _devAssert.default)(0, 'Must provide name.'); + config.specifiedByUrl == null || typeof config.specifiedByUrl === 'string' || (0, _devAssert.default)(0, "".concat(this.name, " must provide \"specifiedByUrl\" as a string, ") + "but got: ".concat((0, _inspect.default)(config.specifiedByUrl), ".")); + config.serialize == null || typeof config.serialize === 'function' || (0, _devAssert.default)(0, "".concat(this.name, " must provide \"serialize\" function. If this custom Scalar is also used as an input type, ensure \"parseValue\" and \"parseLiteral\" functions are also provided.")); + + if (config.parseLiteral) { + typeof config.parseValue === 'function' && typeof config.parseLiteral === 'function' || (0, _devAssert.default)(0, "".concat(this.name, " must provide both \"parseValue\" and \"parseLiteral\" functions.")); + } + } + + var _proto = GraphQLScalarType.prototype; + + _proto.toConfig = function toConfig() { + var _this$extensionASTNod; + + return { + name: this.name, + description: this.description, + specifiedByUrl: this.specifiedByUrl, + serialize: this.serialize, + parseValue: this.parseValue, + parseLiteral: this.parseLiteral, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : [] + }; + }; + + _proto.toString = function toString() { + return this.name; + }; + + _proto.toJSON = function toJSON() { + return this.toString(); + } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet + ; + + _createClass(GraphQLScalarType, [{ + key: _symbols.SYMBOL_TO_STRING_TAG, + get: function get() { + return 'GraphQLScalarType'; + } + }]); + + return GraphQLScalarType; +}(); // Print a simplified form when appearing in `inspect` and `util.inspect`. + + +exports.GraphQLScalarType = GraphQLScalarType; +(0, _defineInspect.default)(GraphQLScalarType); + +/** + * Object Type Definition + * + * Almost all of the GraphQL types you define will be object types. Object types + * have a name, but most importantly describe their fields. + * + * Example: + * + * const AddressType = new GraphQLObjectType({ + * name: 'Address', + * fields: { + * street: { type: GraphQLString }, + * number: { type: GraphQLInt }, + * formatted: { + * type: GraphQLString, + * resolve(obj) { + * return obj.number + ' ' + obj.street + * } + * } + * } + * }); + * + * When two types need to refer to each other, or a type needs to refer to + * itself in a field, you can use a function expression (aka a closure or a + * thunk) to supply the fields lazily. + * + * Example: + * + * const PersonType = new GraphQLObjectType({ + * name: 'Person', + * fields: () => ({ + * name: { type: GraphQLString }, + * bestFriend: { type: PersonType }, + * }) + * }); + * + */ +var GraphQLObjectType = /*#__PURE__*/function () { + function GraphQLObjectType(config) { + this.name = config.name; + this.description = config.description; + this.isTypeOf = config.isTypeOf; + this.extensions = config.extensions && (0, _toObjMap.default)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes); + this._fields = defineFieldMap.bind(undefined, config); + this._interfaces = defineInterfaces.bind(undefined, config); + typeof config.name === 'string' || (0, _devAssert.default)(0, 'Must provide name.'); + config.isTypeOf == null || typeof config.isTypeOf === 'function' || (0, _devAssert.default)(0, "".concat(this.name, " must provide \"isTypeOf\" as a function, ") + "but got: ".concat((0, _inspect.default)(config.isTypeOf), ".")); + } + + var _proto2 = GraphQLObjectType.prototype; + + _proto2.getFields = function getFields() { + if (typeof this._fields === 'function') { + this._fields = this._fields(); + } + + return this._fields; + }; + + _proto2.getInterfaces = function getInterfaces() { + if (typeof this._interfaces === 'function') { + this._interfaces = this._interfaces(); + } + + return this._interfaces; + }; + + _proto2.toConfig = function toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig(this.getFields()), + isTypeOf: this.isTypeOf, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes || [] + }; + }; + + _proto2.toString = function toString() { + return this.name; + }; + + _proto2.toJSON = function toJSON() { + return this.toString(); + } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet + ; + + _createClass(GraphQLObjectType, [{ + key: _symbols.SYMBOL_TO_STRING_TAG, + get: function get() { + return 'GraphQLObjectType'; + } + }]); + + return GraphQLObjectType; +}(); // Print a simplified form when appearing in `inspect` and `util.inspect`. + + +exports.GraphQLObjectType = GraphQLObjectType; +(0, _defineInspect.default)(GraphQLObjectType); + +function defineInterfaces(config) { + var _resolveThunk; + + var interfaces = (_resolveThunk = resolveThunk(config.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : []; + Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(config.name, " interfaces must be an Array or a function which returns an Array.")); + return interfaces; +} + +function defineFieldMap(config) { + var fieldMap = resolveThunk(config.fields); + isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config.name, " fields must be an object with field names as keys or a function which returns such an object.")); + return (0, _mapValue.default)(fieldMap, function (fieldConfig, fieldName) { + var _fieldConfig$args; + + isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(config.name, ".").concat(fieldName, " field config must be an object.")); + !('isDeprecated' in fieldConfig) || (0, _devAssert.default)(0, "".concat(config.name, ".").concat(fieldName, " should provide \"deprecationReason\" instead of \"isDeprecated\".")); + fieldConfig.resolve == null || typeof fieldConfig.resolve === 'function' || (0, _devAssert.default)(0, "".concat(config.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat((0, _inspect.default)(fieldConfig.resolve), ".")); + var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {}; + isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(config.name, ".").concat(fieldName, " args must be an object with argument names as keys.")); + var args = (0, _objectEntries.default)(argsConfig).map(function (_ref) { + var argName = _ref[0], + argConfig = _ref[1]; + return { + name: argName, + description: argConfig.description, + type: argConfig.type, + defaultValue: argConfig.defaultValue, + deprecationReason: argConfig.deprecationReason, + extensions: argConfig.extensions && (0, _toObjMap.default)(argConfig.extensions), + astNode: argConfig.astNode + }; + }); + return { + name: fieldName, + description: fieldConfig.description, + type: fieldConfig.type, + args: args, + resolve: fieldConfig.resolve, + subscribe: fieldConfig.subscribe, + isDeprecated: fieldConfig.deprecationReason != null, + deprecationReason: fieldConfig.deprecationReason, + extensions: fieldConfig.extensions && (0, _toObjMap.default)(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); +} + +function isPlainObj(obj) { + return (0, _isObjectLike.default)(obj) && !Array.isArray(obj); +} + +function fieldsToFieldsConfig(fields) { + return (0, _mapValue.default)(fields, function (field) { + return { + description: field.description, + type: field.type, + args: argsToArgsConfig(field.args), + resolve: field.resolve, + subscribe: field.subscribe, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + }; + }); +} +/** + * @internal + */ + + +function argsToArgsConfig(args) { + return (0, _keyValMap.default)(args, function (arg) { + return arg.name; + }, function (arg) { + return { + description: arg.description, + type: arg.type, + defaultValue: arg.defaultValue, + deprecationReason: arg.deprecationReason, + extensions: arg.extensions, + astNode: arg.astNode + }; + }); +} + +function isRequiredArgument(arg) { + return isNonNullType(arg.type) && arg.defaultValue === undefined; +} + +/** + * Interface Type Definition + * + * When a field can return one of a heterogeneous set of types, a Interface type + * is used to describe what types are possible, what fields are in common across + * all types, as well as a function to determine which type is actually used + * when the field is resolved. + * + * Example: + * + * const EntityType = new GraphQLInterfaceType({ + * name: 'Entity', + * fields: { + * name: { type: GraphQLString } + * } + * }); + * + */ +var GraphQLInterfaceType = /*#__PURE__*/function () { + function GraphQLInterfaceType(config) { + this.name = config.name; + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = config.extensions && (0, _toObjMap.default)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes); + this._fields = defineFieldMap.bind(undefined, config); + this._interfaces = defineInterfaces.bind(undefined, config); + typeof config.name === 'string' || (0, _devAssert.default)(0, 'Must provide name.'); + config.resolveType == null || typeof config.resolveType === 'function' || (0, _devAssert.default)(0, "".concat(this.name, " must provide \"resolveType\" as a function, ") + "but got: ".concat((0, _inspect.default)(config.resolveType), ".")); + } + + var _proto3 = GraphQLInterfaceType.prototype; + + _proto3.getFields = function getFields() { + if (typeof this._fields === 'function') { + this._fields = this._fields(); + } + + return this._fields; + }; + + _proto3.getInterfaces = function getInterfaces() { + if (typeof this._interfaces === 'function') { + this._interfaces = this._interfaces(); + } + + return this._interfaces; + }; + + _proto3.toConfig = function toConfig() { + var _this$extensionASTNod2; + + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig(this.getFields()), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : [] + }; + }; + + _proto3.toString = function toString() { + return this.name; + }; + + _proto3.toJSON = function toJSON() { + return this.toString(); + } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet + ; + + _createClass(GraphQLInterfaceType, [{ + key: _symbols.SYMBOL_TO_STRING_TAG, + get: function get() { + return 'GraphQLInterfaceType'; + } + }]); + + return GraphQLInterfaceType; +}(); // Print a simplified form when appearing in `inspect` and `util.inspect`. + + +exports.GraphQLInterfaceType = GraphQLInterfaceType; +(0, _defineInspect.default)(GraphQLInterfaceType); + +/** + * Union Type Definition + * + * When a field can return one of a heterogeneous set of types, a Union type + * is used to describe what types are possible as well as providing a function + * to determine which type is actually used when the field is resolved. + * + * Example: + * + * const PetType = new GraphQLUnionType({ + * name: 'Pet', + * types: [ DogType, CatType ], + * resolveType(value) { + * if (value instanceof Dog) { + * return DogType; + * } + * if (value instanceof Cat) { + * return CatType; + * } + * } + * }); + * + */ +var GraphQLUnionType = /*#__PURE__*/function () { + function GraphQLUnionType(config) { + this.name = config.name; + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = config.extensions && (0, _toObjMap.default)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes); + this._types = defineTypes.bind(undefined, config); + typeof config.name === 'string' || (0, _devAssert.default)(0, 'Must provide name.'); + config.resolveType == null || typeof config.resolveType === 'function' || (0, _devAssert.default)(0, "".concat(this.name, " must provide \"resolveType\" as a function, ") + "but got: ".concat((0, _inspect.default)(config.resolveType), ".")); + } + + var _proto4 = GraphQLUnionType.prototype; + + _proto4.getTypes = function getTypes() { + if (typeof this._types === 'function') { + this._types = this._types(); + } + + return this._types; + }; + + _proto4.toConfig = function toConfig() { + var _this$extensionASTNod3; + + return { + name: this.name, + description: this.description, + types: this.getTypes(), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : [] + }; + }; + + _proto4.toString = function toString() { + return this.name; + }; + + _proto4.toJSON = function toJSON() { + return this.toString(); + } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet + ; + + _createClass(GraphQLUnionType, [{ + key: _symbols.SYMBOL_TO_STRING_TAG, + get: function get() { + return 'GraphQLUnionType'; + } + }]); + + return GraphQLUnionType; +}(); // Print a simplified form when appearing in `inspect` and `util.inspect`. + + +exports.GraphQLUnionType = GraphQLUnionType; +(0, _defineInspect.default)(GraphQLUnionType); + +function defineTypes(config) { + var types = resolveThunk(config.types); + Array.isArray(types) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config.name, ".")); + return types; +} + +/** + * Enum Type Definition + * + * Some leaf values of requests and input values are Enums. GraphQL serializes + * Enum values as strings, however internally Enums can be represented by any + * kind of type, often integers. + * + * Example: + * + * const RGBType = new GraphQLEnumType({ + * name: 'RGB', + * values: { + * RED: { value: 0 }, + * GREEN: { value: 1 }, + * BLUE: { value: 2 } + * } + * }); + * + * Note: If a value is not provided in a definition, the name of the enum value + * will be used as its internal value. + */ +var GraphQLEnumType +/* */ += /*#__PURE__*/function () { + function GraphQLEnumType(config) { + this.name = config.name; + this.description = config.description; + this.extensions = config.extensions && (0, _toObjMap.default)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes); + this._values = defineEnumValues(this.name, config.values); + this._valueLookup = new Map(this._values.map(function (enumValue) { + return [enumValue.value, enumValue]; + })); + this._nameLookup = (0, _keyMap.default)(this._values, function (value) { + return value.name; + }); + typeof config.name === 'string' || (0, _devAssert.default)(0, 'Must provide name.'); + } + + var _proto5 = GraphQLEnumType.prototype; + + _proto5.getValues = function getValues() { + return this._values; + }; + + _proto5.getValue = function getValue(name) { + return this._nameLookup[name]; + }; + + _proto5.serialize = function serialize(outputValue) { + var enumValue = this._valueLookup.get(outputValue); + + if (enumValue === undefined) { + throw new _GraphQLError.GraphQLError("Enum \"".concat(this.name, "\" cannot represent value: ").concat((0, _inspect.default)(outputValue))); + } + + return enumValue.name; + }; + + _proto5.parseValue = function parseValue(inputValue) + /* T */ + { + if (typeof inputValue !== 'string') { + var valueStr = (0, _inspect.default)(inputValue); + throw new _GraphQLError.GraphQLError("Enum \"".concat(this.name, "\" cannot represent non-string value: ").concat(valueStr, ".") + didYouMeanEnumValue(this, valueStr)); + } + + var enumValue = this.getValue(inputValue); + + if (enumValue == null) { + throw new _GraphQLError.GraphQLError("Value \"".concat(inputValue, "\" does not exist in \"").concat(this.name, "\" enum.") + didYouMeanEnumValue(this, inputValue)); + } + + return enumValue.value; + }; + + _proto5.parseLiteral = function parseLiteral(valueNode, _variables) + /* T */ + { + // Note: variables will be resolved to a value before calling this function. + if (valueNode.kind !== _kinds.Kind.ENUM) { + var valueStr = (0, _printer.print)(valueNode); + throw new _GraphQLError.GraphQLError("Enum \"".concat(this.name, "\" cannot represent non-enum value: ").concat(valueStr, ".") + didYouMeanEnumValue(this, valueStr), valueNode); + } + + var enumValue = this.getValue(valueNode.value); + + if (enumValue == null) { + var _valueStr = (0, _printer.print)(valueNode); + + throw new _GraphQLError.GraphQLError("Value \"".concat(_valueStr, "\" does not exist in \"").concat(this.name, "\" enum.") + didYouMeanEnumValue(this, _valueStr), valueNode); + } + + return enumValue.value; + }; + + _proto5.toConfig = function toConfig() { + var _this$extensionASTNod4; + + var values = (0, _keyValMap.default)(this.getValues(), function (value) { + return value.name; + }, function (value) { + return { + description: value.description, + value: value.value, + deprecationReason: value.deprecationReason, + extensions: value.extensions, + astNode: value.astNode + }; + }); + return { + name: this.name, + description: this.description, + values: values, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : [] + }; + }; + + _proto5.toString = function toString() { + return this.name; + }; + + _proto5.toJSON = function toJSON() { + return this.toString(); + } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet + ; + + _createClass(GraphQLEnumType, [{ + key: _symbols.SYMBOL_TO_STRING_TAG, + get: function get() { + return 'GraphQLEnumType'; + } + }]); + + return GraphQLEnumType; +}(); // Print a simplified form when appearing in `inspect` and `util.inspect`. + + +exports.GraphQLEnumType = GraphQLEnumType; +(0, _defineInspect.default)(GraphQLEnumType); + +function didYouMeanEnumValue(enumType, unknownValueStr) { + var allNames = enumType.getValues().map(function (value) { + return value.name; + }); + var suggestedValues = (0, _suggestionList.default)(unknownValueStr, allNames); + return (0, _didYouMean.default)('the enum value', suggestedValues); +} + +function defineEnumValues(typeName, valueMap) { + isPlainObj(valueMap) || (0, _devAssert.default)(0, "".concat(typeName, " values must be an object with value names as keys.")); + return (0, _objectEntries.default)(valueMap).map(function (_ref2) { + var valueName = _ref2[0], + valueConfig = _ref2[1]; + isPlainObj(valueConfig) || (0, _devAssert.default)(0, "".concat(typeName, ".").concat(valueName, " must refer to an object with a \"value\" key ") + "representing an internal value but got: ".concat((0, _inspect.default)(valueConfig), ".")); + !('isDeprecated' in valueConfig) || (0, _devAssert.default)(0, "".concat(typeName, ".").concat(valueName, " should provide \"deprecationReason\" instead of \"isDeprecated\".")); + return { + name: valueName, + description: valueConfig.description, + value: valueConfig.value !== undefined ? valueConfig.value : valueName, + isDeprecated: valueConfig.deprecationReason != null, + deprecationReason: valueConfig.deprecationReason, + extensions: valueConfig.extensions && (0, _toObjMap.default)(valueConfig.extensions), + astNode: valueConfig.astNode + }; + }); +} + +/** + * Input Object Type Definition + * + * An input object defines a structured collection of fields which may be + * supplied to a field argument. + * + * Using `NonNull` will ensure that a value must be provided by the query + * + * Example: + * + * const GeoPoint = new GraphQLInputObjectType({ + * name: 'GeoPoint', + * fields: { + * lat: { type: new GraphQLNonNull(GraphQLFloat) }, + * lon: { type: new GraphQLNonNull(GraphQLFloat) }, + * alt: { type: GraphQLFloat, defaultValue: 0 }, + * } + * }); + * + */ +var GraphQLInputObjectType = /*#__PURE__*/function () { + function GraphQLInputObjectType(config) { + this.name = config.name; + this.description = config.description; + this.extensions = config.extensions && (0, _toObjMap.default)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes); + this._fields = defineInputFieldMap.bind(undefined, config); + typeof config.name === 'string' || (0, _devAssert.default)(0, 'Must provide name.'); + } + + var _proto6 = GraphQLInputObjectType.prototype; + + _proto6.getFields = function getFields() { + if (typeof this._fields === 'function') { + this._fields = this._fields(); + } + + return this._fields; + }; + + _proto6.toConfig = function toConfig() { + var _this$extensionASTNod5; + + var fields = (0, _mapValue.default)(this.getFields(), function (field) { + return { + description: field.description, + type: field.type, + defaultValue: field.defaultValue, + extensions: field.extensions, + astNode: field.astNode + }; + }); + return { + name: this.name, + description: this.description, + fields: fields, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : [] + }; + }; + + _proto6.toString = function toString() { + return this.name; + }; + + _proto6.toJSON = function toJSON() { + return this.toString(); + } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet + ; + + _createClass(GraphQLInputObjectType, [{ + key: _symbols.SYMBOL_TO_STRING_TAG, + get: function get() { + return 'GraphQLInputObjectType'; + } + }]); + + return GraphQLInputObjectType; +}(); // Print a simplified form when appearing in `inspect` and `util.inspect`. + + +exports.GraphQLInputObjectType = GraphQLInputObjectType; +(0, _defineInspect.default)(GraphQLInputObjectType); + +function defineInputFieldMap(config) { + var fieldMap = resolveThunk(config.fields); + isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config.name, " fields must be an object with field names as keys or a function which returns such an object.")); + return (0, _mapValue.default)(fieldMap, function (fieldConfig, fieldName) { + !('resolve' in fieldConfig) || (0, _devAssert.default)(0, "".concat(config.name, ".").concat(fieldName, " field has a resolve property, but Input Types cannot define resolvers.")); + return { + name: fieldName, + description: fieldConfig.description, + type: fieldConfig.type, + defaultValue: fieldConfig.defaultValue, + deprecationReason: fieldConfig.deprecationReason, + extensions: fieldConfig.extensions && (0, _toObjMap.default)(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); +} + +function isRequiredInputField(field) { + return isNonNullType(field.type) && field.defaultValue === undefined; +} + + +/***/ }), + +/***/ 83614: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isDirective = isDirective; +exports.assertDirective = assertDirective; +exports.isSpecifiedDirective = isSpecifiedDirective; +exports.specifiedDirectives = exports.GraphQLSpecifiedByDirective = exports.GraphQLDeprecatedDirective = exports.DEFAULT_DEPRECATION_REASON = exports.GraphQLSkipDirective = exports.GraphQLIncludeDirective = exports.GraphQLDirective = void 0; + +var _objectEntries = _interopRequireDefault(__nccwpck_require__(86422)); + +var _symbols = __nccwpck_require__(3255); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _toObjMap = _interopRequireDefault(__nccwpck_require__(74728)); + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +var _instanceOf = _interopRequireDefault(__nccwpck_require__(93481)); + +var _isObjectLike = _interopRequireDefault(__nccwpck_require__(95865)); + +var _defineInspect = _interopRequireDefault(__nccwpck_require__(73965)); + +var _directiveLocation = __nccwpck_require__(81205); + +var _scalars = __nccwpck_require__(93145); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +// eslint-disable-next-line no-redeclare +function isDirective(directive) { + return (0, _instanceOf.default)(directive, GraphQLDirective); +} + +function assertDirective(directive) { + if (!isDirective(directive)) { + throw new Error("Expected ".concat((0, _inspect.default)(directive), " to be a GraphQL directive.")); + } + + return directive; +} +/** + * Directives are used by the GraphQL runtime as a way of modifying execution + * behavior. Type system creators will usually not create these directly. + */ + + +var GraphQLDirective = /*#__PURE__*/function () { + function GraphQLDirective(config) { + var _config$isRepeatable, _config$args; + + this.name = config.name; + this.description = config.description; + this.locations = config.locations; + this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false; + this.extensions = config.extensions && (0, _toObjMap.default)(config.extensions); + this.astNode = config.astNode; + config.name || (0, _devAssert.default)(0, 'Directive must be named.'); + Array.isArray(config.locations) || (0, _devAssert.default)(0, "@".concat(config.name, " locations must be an Array.")); + var args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {}; + (0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(config.name, " args must be an object with argument names as keys.")); + this.args = (0, _objectEntries.default)(args).map(function (_ref) { + var argName = _ref[0], + argConfig = _ref[1]; + return { + name: argName, + description: argConfig.description, + type: argConfig.type, + defaultValue: argConfig.defaultValue, + deprecationReason: argConfig.deprecationReason, + extensions: argConfig.extensions && (0, _toObjMap.default)(argConfig.extensions), + astNode: argConfig.astNode + }; + }); + } + + var _proto = GraphQLDirective.prototype; + + _proto.toConfig = function toConfig() { + return { + name: this.name, + description: this.description, + locations: this.locations, + args: (0, _definition.argsToArgsConfig)(this.args), + isRepeatable: this.isRepeatable, + extensions: this.extensions, + astNode: this.astNode + }; + }; + + _proto.toString = function toString() { + return '@' + this.name; + }; + + _proto.toJSON = function toJSON() { + return this.toString(); + } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet + ; + + _createClass(GraphQLDirective, [{ + key: _symbols.SYMBOL_TO_STRING_TAG, + get: function get() { + return 'GraphQLDirective'; + } + }]); + + return GraphQLDirective; +}(); // Print a simplified form when appearing in `inspect` and `util.inspect`. + + +exports.GraphQLDirective = GraphQLDirective; +(0, _defineInspect.default)(GraphQLDirective); + +/** + * Used to conditionally include fields or fragments. + */ +var GraphQLIncludeDirective = new GraphQLDirective({ + name: 'include', + description: 'Directs the executor to include this field or fragment only when the `if` argument is true.', + locations: [_directiveLocation.DirectiveLocation.FIELD, _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, _directiveLocation.DirectiveLocation.INLINE_FRAGMENT], + args: { + if: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + description: 'Included when true.' + } + } +}); +/** + * Used to conditionally skip (exclude) fields or fragments. + */ + +exports.GraphQLIncludeDirective = GraphQLIncludeDirective; +var GraphQLSkipDirective = new GraphQLDirective({ + name: 'skip', + description: 'Directs the executor to skip this field or fragment when the `if` argument is true.', + locations: [_directiveLocation.DirectiveLocation.FIELD, _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, _directiveLocation.DirectiveLocation.INLINE_FRAGMENT], + args: { + if: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + description: 'Skipped when true.' + } + } +}); +/** + * Constant string used for default reason for a deprecation. + */ + +exports.GraphQLSkipDirective = GraphQLSkipDirective; +var DEFAULT_DEPRECATION_REASON = 'No longer supported'; +/** + * Used to declare element of a GraphQL schema as deprecated. + */ + +exports.DEFAULT_DEPRECATION_REASON = DEFAULT_DEPRECATION_REASON; +var GraphQLDeprecatedDirective = new GraphQLDirective({ + name: 'deprecated', + description: 'Marks an element of a GraphQL schema as no longer supported.', + locations: [_directiveLocation.DirectiveLocation.FIELD_DEFINITION, _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION, _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION, _directiveLocation.DirectiveLocation.ENUM_VALUE], + args: { + reason: { + type: _scalars.GraphQLString, + description: 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).', + defaultValue: DEFAULT_DEPRECATION_REASON + } + } +}); +/** + * Used to provide a URL for specifying the behaviour of custom scalar definitions. + */ + +exports.GraphQLDeprecatedDirective = GraphQLDeprecatedDirective; +var GraphQLSpecifiedByDirective = new GraphQLDirective({ + name: 'specifiedBy', + description: 'Exposes a URL that specifies the behaviour of this scalar.', + locations: [_directiveLocation.DirectiveLocation.SCALAR], + args: { + url: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + description: 'The URL that specifies the behaviour of this scalar.' + } + } +}); +/** + * The full list of specified directives. + */ + +exports.GraphQLSpecifiedByDirective = GraphQLSpecifiedByDirective; +var specifiedDirectives = Object.freeze([GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective]); +exports.specifiedDirectives = specifiedDirectives; + +function isSpecifiedDirective(directive) { + return specifiedDirectives.some(function (_ref2) { + var name = _ref2.name; + return name === directive.name; + }); +} + + +/***/ }), + +/***/ 63280: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "isSchema", ({ + enumerable: true, + get: function get() { + return _schema.isSchema; + } +})); +Object.defineProperty(exports, "assertSchema", ({ + enumerable: true, + get: function get() { + return _schema.assertSchema; + } +})); +Object.defineProperty(exports, "GraphQLSchema", ({ + enumerable: true, + get: function get() { + return _schema.GraphQLSchema; + } +})); +Object.defineProperty(exports, "isType", ({ + enumerable: true, + get: function get() { + return _definition.isType; + } +})); +Object.defineProperty(exports, "isScalarType", ({ + enumerable: true, + get: function get() { + return _definition.isScalarType; + } +})); +Object.defineProperty(exports, "isObjectType", ({ + enumerable: true, + get: function get() { + return _definition.isObjectType; + } +})); +Object.defineProperty(exports, "isInterfaceType", ({ + enumerable: true, + get: function get() { + return _definition.isInterfaceType; + } +})); +Object.defineProperty(exports, "isUnionType", ({ + enumerable: true, + get: function get() { + return _definition.isUnionType; + } +})); +Object.defineProperty(exports, "isEnumType", ({ + enumerable: true, + get: function get() { + return _definition.isEnumType; + } +})); +Object.defineProperty(exports, "isInputObjectType", ({ + enumerable: true, + get: function get() { + return _definition.isInputObjectType; + } +})); +Object.defineProperty(exports, "isListType", ({ + enumerable: true, + get: function get() { + return _definition.isListType; + } +})); +Object.defineProperty(exports, "isNonNullType", ({ + enumerable: true, + get: function get() { + return _definition.isNonNullType; + } +})); +Object.defineProperty(exports, "isInputType", ({ + enumerable: true, + get: function get() { + return _definition.isInputType; + } +})); +Object.defineProperty(exports, "isOutputType", ({ + enumerable: true, + get: function get() { + return _definition.isOutputType; + } +})); +Object.defineProperty(exports, "isLeafType", ({ + enumerable: true, + get: function get() { + return _definition.isLeafType; + } +})); +Object.defineProperty(exports, "isCompositeType", ({ + enumerable: true, + get: function get() { + return _definition.isCompositeType; + } +})); +Object.defineProperty(exports, "isAbstractType", ({ + enumerable: true, + get: function get() { + return _definition.isAbstractType; + } +})); +Object.defineProperty(exports, "isWrappingType", ({ + enumerable: true, + get: function get() { + return _definition.isWrappingType; + } +})); +Object.defineProperty(exports, "isNullableType", ({ + enumerable: true, + get: function get() { + return _definition.isNullableType; + } +})); +Object.defineProperty(exports, "isNamedType", ({ + enumerable: true, + get: function get() { + return _definition.isNamedType; + } +})); +Object.defineProperty(exports, "isRequiredArgument", ({ + enumerable: true, + get: function get() { + return _definition.isRequiredArgument; + } +})); +Object.defineProperty(exports, "isRequiredInputField", ({ + enumerable: true, + get: function get() { + return _definition.isRequiredInputField; + } +})); +Object.defineProperty(exports, "assertType", ({ + enumerable: true, + get: function get() { + return _definition.assertType; + } +})); +Object.defineProperty(exports, "assertScalarType", ({ + enumerable: true, + get: function get() { + return _definition.assertScalarType; + } +})); +Object.defineProperty(exports, "assertObjectType", ({ + enumerable: true, + get: function get() { + return _definition.assertObjectType; + } +})); +Object.defineProperty(exports, "assertInterfaceType", ({ + enumerable: true, + get: function get() { + return _definition.assertInterfaceType; + } +})); +Object.defineProperty(exports, "assertUnionType", ({ + enumerable: true, + get: function get() { + return _definition.assertUnionType; + } +})); +Object.defineProperty(exports, "assertEnumType", ({ + enumerable: true, + get: function get() { + return _definition.assertEnumType; + } +})); +Object.defineProperty(exports, "assertInputObjectType", ({ + enumerable: true, + get: function get() { + return _definition.assertInputObjectType; + } +})); +Object.defineProperty(exports, "assertListType", ({ + enumerable: true, + get: function get() { + return _definition.assertListType; + } +})); +Object.defineProperty(exports, "assertNonNullType", ({ + enumerable: true, + get: function get() { + return _definition.assertNonNullType; + } +})); +Object.defineProperty(exports, "assertInputType", ({ + enumerable: true, + get: function get() { + return _definition.assertInputType; + } +})); +Object.defineProperty(exports, "assertOutputType", ({ + enumerable: true, + get: function get() { + return _definition.assertOutputType; + } +})); +Object.defineProperty(exports, "assertLeafType", ({ + enumerable: true, + get: function get() { + return _definition.assertLeafType; + } +})); +Object.defineProperty(exports, "assertCompositeType", ({ + enumerable: true, + get: function get() { + return _definition.assertCompositeType; + } +})); +Object.defineProperty(exports, "assertAbstractType", ({ + enumerable: true, + get: function get() { + return _definition.assertAbstractType; + } +})); +Object.defineProperty(exports, "assertWrappingType", ({ + enumerable: true, + get: function get() { + return _definition.assertWrappingType; + } +})); +Object.defineProperty(exports, "assertNullableType", ({ + enumerable: true, + get: function get() { + return _definition.assertNullableType; + } +})); +Object.defineProperty(exports, "assertNamedType", ({ + enumerable: true, + get: function get() { + return _definition.assertNamedType; + } +})); +Object.defineProperty(exports, "getNullableType", ({ + enumerable: true, + get: function get() { + return _definition.getNullableType; + } +})); +Object.defineProperty(exports, "getNamedType", ({ + enumerable: true, + get: function get() { + return _definition.getNamedType; + } +})); +Object.defineProperty(exports, "GraphQLScalarType", ({ + enumerable: true, + get: function get() { + return _definition.GraphQLScalarType; + } +})); +Object.defineProperty(exports, "GraphQLObjectType", ({ + enumerable: true, + get: function get() { + return _definition.GraphQLObjectType; + } +})); +Object.defineProperty(exports, "GraphQLInterfaceType", ({ + enumerable: true, + get: function get() { + return _definition.GraphQLInterfaceType; + } +})); +Object.defineProperty(exports, "GraphQLUnionType", ({ + enumerable: true, + get: function get() { + return _definition.GraphQLUnionType; + } +})); +Object.defineProperty(exports, "GraphQLEnumType", ({ + enumerable: true, + get: function get() { + return _definition.GraphQLEnumType; + } +})); +Object.defineProperty(exports, "GraphQLInputObjectType", ({ + enumerable: true, + get: function get() { + return _definition.GraphQLInputObjectType; + } +})); +Object.defineProperty(exports, "GraphQLList", ({ + enumerable: true, + get: function get() { + return _definition.GraphQLList; + } +})); +Object.defineProperty(exports, "GraphQLNonNull", ({ + enumerable: true, + get: function get() { + return _definition.GraphQLNonNull; + } +})); +Object.defineProperty(exports, "isDirective", ({ + enumerable: true, + get: function get() { + return _directives.isDirective; + } +})); +Object.defineProperty(exports, "assertDirective", ({ + enumerable: true, + get: function get() { + return _directives.assertDirective; + } +})); +Object.defineProperty(exports, "GraphQLDirective", ({ + enumerable: true, + get: function get() { + return _directives.GraphQLDirective; + } +})); +Object.defineProperty(exports, "isSpecifiedDirective", ({ + enumerable: true, + get: function get() { + return _directives.isSpecifiedDirective; + } +})); +Object.defineProperty(exports, "specifiedDirectives", ({ + enumerable: true, + get: function get() { + return _directives.specifiedDirectives; + } +})); +Object.defineProperty(exports, "GraphQLIncludeDirective", ({ + enumerable: true, + get: function get() { + return _directives.GraphQLIncludeDirective; + } +})); +Object.defineProperty(exports, "GraphQLSkipDirective", ({ + enumerable: true, + get: function get() { + return _directives.GraphQLSkipDirective; + } +})); +Object.defineProperty(exports, "GraphQLDeprecatedDirective", ({ + enumerable: true, + get: function get() { + return _directives.GraphQLDeprecatedDirective; + } +})); +Object.defineProperty(exports, "GraphQLSpecifiedByDirective", ({ + enumerable: true, + get: function get() { + return _directives.GraphQLSpecifiedByDirective; + } +})); +Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", ({ + enumerable: true, + get: function get() { + return _directives.DEFAULT_DEPRECATION_REASON; + } +})); +Object.defineProperty(exports, "isSpecifiedScalarType", ({ + enumerable: true, + get: function get() { + return _scalars.isSpecifiedScalarType; + } +})); +Object.defineProperty(exports, "specifiedScalarTypes", ({ + enumerable: true, + get: function get() { + return _scalars.specifiedScalarTypes; + } +})); +Object.defineProperty(exports, "GraphQLInt", ({ + enumerable: true, + get: function get() { + return _scalars.GraphQLInt; + } +})); +Object.defineProperty(exports, "GraphQLFloat", ({ + enumerable: true, + get: function get() { + return _scalars.GraphQLFloat; + } +})); +Object.defineProperty(exports, "GraphQLString", ({ + enumerable: true, + get: function get() { + return _scalars.GraphQLString; + } +})); +Object.defineProperty(exports, "GraphQLBoolean", ({ + enumerable: true, + get: function get() { + return _scalars.GraphQLBoolean; + } +})); +Object.defineProperty(exports, "GraphQLID", ({ + enumerable: true, + get: function get() { + return _scalars.GraphQLID; + } +})); +Object.defineProperty(exports, "isIntrospectionType", ({ + enumerable: true, + get: function get() { + return _introspection.isIntrospectionType; + } +})); +Object.defineProperty(exports, "introspectionTypes", ({ + enumerable: true, + get: function get() { + return _introspection.introspectionTypes; + } +})); +Object.defineProperty(exports, "__Schema", ({ + enumerable: true, + get: function get() { + return _introspection.__Schema; + } +})); +Object.defineProperty(exports, "__Directive", ({ + enumerable: true, + get: function get() { + return _introspection.__Directive; + } +})); +Object.defineProperty(exports, "__DirectiveLocation", ({ + enumerable: true, + get: function get() { + return _introspection.__DirectiveLocation; + } +})); +Object.defineProperty(exports, "__Type", ({ + enumerable: true, + get: function get() { + return _introspection.__Type; + } +})); +Object.defineProperty(exports, "__Field", ({ + enumerable: true, + get: function get() { + return _introspection.__Field; + } +})); +Object.defineProperty(exports, "__InputValue", ({ + enumerable: true, + get: function get() { + return _introspection.__InputValue; + } +})); +Object.defineProperty(exports, "__EnumValue", ({ + enumerable: true, + get: function get() { + return _introspection.__EnumValue; + } +})); +Object.defineProperty(exports, "__TypeKind", ({ + enumerable: true, + get: function get() { + return _introspection.__TypeKind; + } +})); +Object.defineProperty(exports, "TypeKind", ({ + enumerable: true, + get: function get() { + return _introspection.TypeKind; + } +})); +Object.defineProperty(exports, "SchemaMetaFieldDef", ({ + enumerable: true, + get: function get() { + return _introspection.SchemaMetaFieldDef; + } +})); +Object.defineProperty(exports, "TypeMetaFieldDef", ({ + enumerable: true, + get: function get() { + return _introspection.TypeMetaFieldDef; + } +})); +Object.defineProperty(exports, "TypeNameMetaFieldDef", ({ + enumerable: true, + get: function get() { + return _introspection.TypeNameMetaFieldDef; + } +})); +Object.defineProperty(exports, "validateSchema", ({ + enumerable: true, + get: function get() { + return _validate.validateSchema; + } +})); +Object.defineProperty(exports, "assertValidSchema", ({ + enumerable: true, + get: function get() { + return _validate.assertValidSchema; + } +})); + +var _schema = __nccwpck_require__(8505); + +var _definition = __nccwpck_require__(5821); + +var _directives = __nccwpck_require__(83614); + +var _scalars = __nccwpck_require__(93145); + +var _introspection = __nccwpck_require__(28344); + +var _validate = __nccwpck_require__(22430); + + +/***/ }), + +/***/ 28344: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isIntrospectionType = isIntrospectionType; +exports.introspectionTypes = exports.TypeNameMetaFieldDef = exports.TypeMetaFieldDef = exports.SchemaMetaFieldDef = exports.__TypeKind = exports.TypeKind = exports.__EnumValue = exports.__InputValue = exports.__Field = exports.__Type = exports.__DirectiveLocation = exports.__Directive = exports.__Schema = void 0; + +var _objectValues = _interopRequireDefault(__nccwpck_require__(30026)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _printer = __nccwpck_require__(68203); + +var _directiveLocation = __nccwpck_require__(81205); + +var _astFromValue = __nccwpck_require__(12653); + +var _scalars = __nccwpck_require__(93145); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var __Schema = new _definition.GraphQLObjectType({ + name: '__Schema', + description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.', + fields: function fields() { + return { + description: { + type: _scalars.GraphQLString, + resolve: function resolve(schema) { + return schema.description; + } + }, + types: { + description: 'A list of all types supported by this server.', + type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type))), + resolve: function resolve(schema) { + return (0, _objectValues.default)(schema.getTypeMap()); + } + }, + queryType: { + description: 'The type that query operations will be rooted at.', + type: new _definition.GraphQLNonNull(__Type), + resolve: function resolve(schema) { + return schema.getQueryType(); + } + }, + mutationType: { + description: 'If this server supports mutation, the type that mutation operations will be rooted at.', + type: __Type, + resolve: function resolve(schema) { + return schema.getMutationType(); + } + }, + subscriptionType: { + description: 'If this server support subscription, the type that subscription operations will be rooted at.', + type: __Type, + resolve: function resolve(schema) { + return schema.getSubscriptionType(); + } + }, + directives: { + description: 'A list of all directives supported by this server.', + type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Directive))), + resolve: function resolve(schema) { + return schema.getDirectives(); + } + } + }; + } +}); + +exports.__Schema = __Schema; + +var __Directive = new _definition.GraphQLObjectType({ + name: '__Directive', + description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + fields: function fields() { + return { + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: function resolve(directive) { + return directive.name; + } + }, + description: { + type: _scalars.GraphQLString, + resolve: function resolve(directive) { + return directive.description; + } + }, + isRepeatable: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: function resolve(directive) { + return directive.isRepeatable; + } + }, + locations: { + type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__DirectiveLocation))), + resolve: function resolve(directive) { + return directive.locations; + } + }, + args: { + type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))), + resolve: function resolve(directive) { + return directive.args; + } + } + }; + } +}); + +exports.__Directive = __Directive; + +var __DirectiveLocation = new _definition.GraphQLEnumType({ + name: '__DirectiveLocation', + description: 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.', + values: { + QUERY: { + value: _directiveLocation.DirectiveLocation.QUERY, + description: 'Location adjacent to a query operation.' + }, + MUTATION: { + value: _directiveLocation.DirectiveLocation.MUTATION, + description: 'Location adjacent to a mutation operation.' + }, + SUBSCRIPTION: { + value: _directiveLocation.DirectiveLocation.SUBSCRIPTION, + description: 'Location adjacent to a subscription operation.' + }, + FIELD: { + value: _directiveLocation.DirectiveLocation.FIELD, + description: 'Location adjacent to a field.' + }, + FRAGMENT_DEFINITION: { + value: _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION, + description: 'Location adjacent to a fragment definition.' + }, + FRAGMENT_SPREAD: { + value: _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, + description: 'Location adjacent to a fragment spread.' + }, + INLINE_FRAGMENT: { + value: _directiveLocation.DirectiveLocation.INLINE_FRAGMENT, + description: 'Location adjacent to an inline fragment.' + }, + VARIABLE_DEFINITION: { + value: _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION, + description: 'Location adjacent to a variable definition.' + }, + SCHEMA: { + value: _directiveLocation.DirectiveLocation.SCHEMA, + description: 'Location adjacent to a schema definition.' + }, + SCALAR: { + value: _directiveLocation.DirectiveLocation.SCALAR, + description: 'Location adjacent to a scalar definition.' + }, + OBJECT: { + value: _directiveLocation.DirectiveLocation.OBJECT, + description: 'Location adjacent to an object type definition.' + }, + FIELD_DEFINITION: { + value: _directiveLocation.DirectiveLocation.FIELD_DEFINITION, + description: 'Location adjacent to a field definition.' + }, + ARGUMENT_DEFINITION: { + value: _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION, + description: 'Location adjacent to an argument definition.' + }, + INTERFACE: { + value: _directiveLocation.DirectiveLocation.INTERFACE, + description: 'Location adjacent to an interface definition.' + }, + UNION: { + value: _directiveLocation.DirectiveLocation.UNION, + description: 'Location adjacent to a union definition.' + }, + ENUM: { + value: _directiveLocation.DirectiveLocation.ENUM, + description: 'Location adjacent to an enum definition.' + }, + ENUM_VALUE: { + value: _directiveLocation.DirectiveLocation.ENUM_VALUE, + description: 'Location adjacent to an enum value definition.' + }, + INPUT_OBJECT: { + value: _directiveLocation.DirectiveLocation.INPUT_OBJECT, + description: 'Location adjacent to an input object type definition.' + }, + INPUT_FIELD_DEFINITION: { + value: _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION, + description: 'Location adjacent to an input object field definition.' + } + } +}); + +exports.__DirectiveLocation = __DirectiveLocation; + +var __Type = new _definition.GraphQLObjectType({ + name: '__Type', + description: 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.', + fields: function fields() { + return { + kind: { + type: new _definition.GraphQLNonNull(__TypeKind), + resolve: function resolve(type) { + if ((0, _definition.isScalarType)(type)) { + return TypeKind.SCALAR; + } + + if ((0, _definition.isObjectType)(type)) { + return TypeKind.OBJECT; + } + + if ((0, _definition.isInterfaceType)(type)) { + return TypeKind.INTERFACE; + } + + if ((0, _definition.isUnionType)(type)) { + return TypeKind.UNION; + } + + if ((0, _definition.isEnumType)(type)) { + return TypeKind.ENUM; + } + + if ((0, _definition.isInputObjectType)(type)) { + return TypeKind.INPUT_OBJECT; + } + + if ((0, _definition.isListType)(type)) { + return TypeKind.LIST; + } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if ((0, _definition.isNonNullType)(type)) { + return TypeKind.NON_NULL; + } // istanbul ignore next (Not reachable. All possible types have been considered) + + + false || (0, _invariant.default)(0, "Unexpected type: \"".concat((0, _inspect.default)(type), "\".")); + } + }, + name: { + type: _scalars.GraphQLString, + resolve: function resolve(type) { + return type.name !== undefined ? type.name : undefined; + } + }, + description: { + type: _scalars.GraphQLString, + resolve: function resolve(type) { + return type.description !== undefined ? type.description : undefined; + } + }, + specifiedByUrl: { + type: _scalars.GraphQLString, + resolve: function resolve(obj) { + return obj.specifiedByUrl !== undefined ? obj.specifiedByUrl : undefined; + } + }, + fields: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Field)), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve: function resolve(type, _ref) { + var includeDeprecated = _ref.includeDeprecated; + + if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) { + var fields = (0, _objectValues.default)(type.getFields()); + return includeDeprecated ? fields : fields.filter(function (field) { + return field.deprecationReason == null; + }); + } + } + }, + interfaces: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)), + resolve: function resolve(type) { + if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) { + return type.getInterfaces(); + } + } + }, + possibleTypes: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)), + resolve: function resolve(type, _args, _context, _ref2) { + var schema = _ref2.schema; + + if ((0, _definition.isAbstractType)(type)) { + return schema.getPossibleTypes(type); + } + } + }, + enumValues: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__EnumValue)), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve: function resolve(type, _ref3) { + var includeDeprecated = _ref3.includeDeprecated; + + if ((0, _definition.isEnumType)(type)) { + var values = type.getValues(); + return includeDeprecated ? values : values.filter(function (field) { + return field.deprecationReason == null; + }); + } + } + }, + inputFields: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue)), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve: function resolve(type, _ref4) { + var includeDeprecated = _ref4.includeDeprecated; + + if ((0, _definition.isInputObjectType)(type)) { + var values = (0, _objectValues.default)(type.getFields()); + return includeDeprecated ? values : values.filter(function (field) { + return field.deprecationReason == null; + }); + } + } + }, + ofType: { + type: __Type, + resolve: function resolve(type) { + return type.ofType !== undefined ? type.ofType : undefined; + } + } + }; + } +}); + +exports.__Type = __Type; + +var __Field = new _definition.GraphQLObjectType({ + name: '__Field', + description: 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.', + fields: function fields() { + return { + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: function resolve(field) { + return field.name; + } + }, + description: { + type: _scalars.GraphQLString, + resolve: function resolve(field) { + return field.description; + } + }, + args: { + type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve: function resolve(field, _ref5) { + var includeDeprecated = _ref5.includeDeprecated; + return includeDeprecated ? field.args : field.args.filter(function (arg) { + return arg.deprecationReason == null; + }); + } + }, + type: { + type: new _definition.GraphQLNonNull(__Type), + resolve: function resolve(field) { + return field.type; + } + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: function resolve(field) { + return field.deprecationReason != null; + } + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: function resolve(field) { + return field.deprecationReason; + } + } + }; + } +}); + +exports.__Field = __Field; + +var __InputValue = new _definition.GraphQLObjectType({ + name: '__InputValue', + description: 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.', + fields: function fields() { + return { + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: function resolve(inputValue) { + return inputValue.name; + } + }, + description: { + type: _scalars.GraphQLString, + resolve: function resolve(inputValue) { + return inputValue.description; + } + }, + type: { + type: new _definition.GraphQLNonNull(__Type), + resolve: function resolve(inputValue) { + return inputValue.type; + } + }, + defaultValue: { + type: _scalars.GraphQLString, + description: 'A GraphQL-formatted string representing the default value for this input value.', + resolve: function resolve(inputValue) { + var type = inputValue.type, + defaultValue = inputValue.defaultValue; + var valueAST = (0, _astFromValue.astFromValue)(defaultValue, type); + return valueAST ? (0, _printer.print)(valueAST) : null; + } + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: function resolve(field) { + return field.deprecationReason != null; + } + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: function resolve(obj) { + return obj.deprecationReason; + } + } + }; + } +}); + +exports.__InputValue = __InputValue; + +var __EnumValue = new _definition.GraphQLObjectType({ + name: '__EnumValue', + description: 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.', + fields: function fields() { + return { + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: function resolve(enumValue) { + return enumValue.name; + } + }, + description: { + type: _scalars.GraphQLString, + resolve: function resolve(enumValue) { + return enumValue.description; + } + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: function resolve(enumValue) { + return enumValue.deprecationReason != null; + } + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: function resolve(enumValue) { + return enumValue.deprecationReason; + } + } + }; + } +}); + +exports.__EnumValue = __EnumValue; +var TypeKind = Object.freeze({ + SCALAR: 'SCALAR', + OBJECT: 'OBJECT', + INTERFACE: 'INTERFACE', + UNION: 'UNION', + ENUM: 'ENUM', + INPUT_OBJECT: 'INPUT_OBJECT', + LIST: 'LIST', + NON_NULL: 'NON_NULL' +}); +exports.TypeKind = TypeKind; + +var __TypeKind = new _definition.GraphQLEnumType({ + name: '__TypeKind', + description: 'An enum describing what kind of type a given `__Type` is.', + values: { + SCALAR: { + value: TypeKind.SCALAR, + description: 'Indicates this type is a scalar.' + }, + OBJECT: { + value: TypeKind.OBJECT, + description: 'Indicates this type is an object. `fields` and `interfaces` are valid fields.' + }, + INTERFACE: { + value: TypeKind.INTERFACE, + description: 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.' + }, + UNION: { + value: TypeKind.UNION, + description: 'Indicates this type is a union. `possibleTypes` is a valid field.' + }, + ENUM: { + value: TypeKind.ENUM, + description: 'Indicates this type is an enum. `enumValues` is a valid field.' + }, + INPUT_OBJECT: { + value: TypeKind.INPUT_OBJECT, + description: 'Indicates this type is an input object. `inputFields` is a valid field.' + }, + LIST: { + value: TypeKind.LIST, + description: 'Indicates this type is a list. `ofType` is a valid field.' + }, + NON_NULL: { + value: TypeKind.NON_NULL, + description: 'Indicates this type is a non-null. `ofType` is a valid field.' + } + } +}); +/** + * Note that these are GraphQLField and not GraphQLFieldConfig, + * so the format for args is different. + */ + + +exports.__TypeKind = __TypeKind; +var SchemaMetaFieldDef = { + name: '__schema', + type: new _definition.GraphQLNonNull(__Schema), + description: 'Access the current type schema of this server.', + args: [], + resolve: function resolve(_source, _args, _context, _ref6) { + var schema = _ref6.schema; + return schema; + }, + isDeprecated: false, + deprecationReason: undefined, + extensions: undefined, + astNode: undefined +}; +exports.SchemaMetaFieldDef = SchemaMetaFieldDef; +var TypeMetaFieldDef = { + name: '__type', + type: __Type, + description: 'Request the type information of a single type.', + args: [{ + name: 'name', + description: undefined, + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + defaultValue: undefined, + deprecationReason: undefined, + extensions: undefined, + astNode: undefined + }], + resolve: function resolve(_source, _ref7, _context, _ref8) { + var name = _ref7.name; + var schema = _ref8.schema; + return schema.getType(name); + }, + isDeprecated: false, + deprecationReason: undefined, + extensions: undefined, + astNode: undefined +}; +exports.TypeMetaFieldDef = TypeMetaFieldDef; +var TypeNameMetaFieldDef = { + name: '__typename', + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + description: 'The name of the current Object type at runtime.', + args: [], + resolve: function resolve(_source, _args, _context, _ref9) { + var parentType = _ref9.parentType; + return parentType.name; + }, + isDeprecated: false, + deprecationReason: undefined, + extensions: undefined, + astNode: undefined +}; +exports.TypeNameMetaFieldDef = TypeNameMetaFieldDef; +var introspectionTypes = Object.freeze([__Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind]); +exports.introspectionTypes = introspectionTypes; + +function isIntrospectionType(type) { + return introspectionTypes.some(function (_ref10) { + var name = _ref10.name; + return type.name === name; + }); +} + + +/***/ }), + +/***/ 93145: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isSpecifiedScalarType = isSpecifiedScalarType; +exports.specifiedScalarTypes = exports.GraphQLID = exports.GraphQLBoolean = exports.GraphQLString = exports.GraphQLFloat = exports.GraphQLInt = void 0; + +var _isFinite = _interopRequireDefault(__nccwpck_require__(78473)); + +var _isInteger = _interopRequireDefault(__nccwpck_require__(15813)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _isObjectLike = _interopRequireDefault(__nccwpck_require__(95865)); + +var _kinds = __nccwpck_require__(11927); + +var _printer = __nccwpck_require__(68203); + +var _GraphQLError = __nccwpck_require__(4797); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// As per the GraphQL Spec, Integers are only treated as valid when a valid +// 32-bit signed integer, providing the broadest support across platforms. +// +// n.b. JavaScript's integers are safe between -(2^53 - 1) and 2^53 - 1 because +// they are internally represented as IEEE 754 doubles. +var MAX_INT = 2147483647; +var MIN_INT = -2147483648; + +function serializeInt(outputValue) { + var coercedValue = serializeObject(outputValue); + + if (typeof coercedValue === 'boolean') { + return coercedValue ? 1 : 0; + } + + var num = coercedValue; + + if (typeof coercedValue === 'string' && coercedValue !== '') { + num = Number(coercedValue); + } + + if (!(0, _isInteger.default)(num)) { + throw new _GraphQLError.GraphQLError("Int cannot represent non-integer value: ".concat((0, _inspect.default)(coercedValue))); + } + + if (num > MAX_INT || num < MIN_INT) { + throw new _GraphQLError.GraphQLError('Int cannot represent non 32-bit signed integer value: ' + (0, _inspect.default)(coercedValue)); + } + + return num; +} + +function coerceInt(inputValue) { + if (!(0, _isInteger.default)(inputValue)) { + throw new _GraphQLError.GraphQLError("Int cannot represent non-integer value: ".concat((0, _inspect.default)(inputValue))); + } + + if (inputValue > MAX_INT || inputValue < MIN_INT) { + throw new _GraphQLError.GraphQLError("Int cannot represent non 32-bit signed integer value: ".concat(inputValue)); + } + + return inputValue; +} + +var GraphQLInt = new _definition.GraphQLScalarType({ + name: 'Int', + description: 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.', + serialize: serializeInt, + parseValue: coerceInt, + parseLiteral: function parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError("Int cannot represent non-integer value: ".concat((0, _printer.print)(valueNode)), valueNode); + } + + var num = parseInt(valueNode.value, 10); + + if (num > MAX_INT || num < MIN_INT) { + throw new _GraphQLError.GraphQLError("Int cannot represent non 32-bit signed integer value: ".concat(valueNode.value), valueNode); + } + + return num; + } +}); +exports.GraphQLInt = GraphQLInt; + +function serializeFloat(outputValue) { + var coercedValue = serializeObject(outputValue); + + if (typeof coercedValue === 'boolean') { + return coercedValue ? 1 : 0; + } + + var num = coercedValue; + + if (typeof coercedValue === 'string' && coercedValue !== '') { + num = Number(coercedValue); + } + + if (!(0, _isFinite.default)(num)) { + throw new _GraphQLError.GraphQLError("Float cannot represent non numeric value: ".concat((0, _inspect.default)(coercedValue))); + } + + return num; +} + +function coerceFloat(inputValue) { + if (!(0, _isFinite.default)(inputValue)) { + throw new _GraphQLError.GraphQLError("Float cannot represent non numeric value: ".concat((0, _inspect.default)(inputValue))); + } + + return inputValue; +} + +var GraphQLFloat = new _definition.GraphQLScalarType({ + name: 'Float', + description: 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).', + serialize: serializeFloat, + parseValue: coerceFloat, + parseLiteral: function parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.FLOAT && valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError("Float cannot represent non numeric value: ".concat((0, _printer.print)(valueNode)), valueNode); + } + + return parseFloat(valueNode.value); + } +}); // Support serializing objects with custom valueOf() or toJSON() functions - +// a common way to represent a complex value which can be represented as +// a string (ex: MongoDB id objects). + +exports.GraphQLFloat = GraphQLFloat; + +function serializeObject(outputValue) { + if ((0, _isObjectLike.default)(outputValue)) { + if (typeof outputValue.valueOf === 'function') { + var valueOfResult = outputValue.valueOf(); + + if (!(0, _isObjectLike.default)(valueOfResult)) { + return valueOfResult; + } + } + + if (typeof outputValue.toJSON === 'function') { + // $FlowFixMe[incompatible-use] + return outputValue.toJSON(); + } + } + + return outputValue; +} + +function serializeString(outputValue) { + var coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not + // attempt to coerce object, function, symbol, or other types as strings. + + if (typeof coercedValue === 'string') { + return coercedValue; + } + + if (typeof coercedValue === 'boolean') { + return coercedValue ? 'true' : 'false'; + } + + if ((0, _isFinite.default)(coercedValue)) { + return coercedValue.toString(); + } + + throw new _GraphQLError.GraphQLError("String cannot represent value: ".concat((0, _inspect.default)(outputValue))); +} + +function coerceString(inputValue) { + if (typeof inputValue !== 'string') { + throw new _GraphQLError.GraphQLError("String cannot represent a non string value: ".concat((0, _inspect.default)(inputValue))); + } + + return inputValue; +} + +var GraphQLString = new _definition.GraphQLScalarType({ + name: 'String', + description: 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.', + serialize: serializeString, + parseValue: coerceString, + parseLiteral: function parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.STRING) { + throw new _GraphQLError.GraphQLError("String cannot represent a non string value: ".concat((0, _printer.print)(valueNode)), valueNode); + } + + return valueNode.value; + } +}); +exports.GraphQLString = GraphQLString; + +function serializeBoolean(outputValue) { + var coercedValue = serializeObject(outputValue); + + if (typeof coercedValue === 'boolean') { + return coercedValue; + } + + if ((0, _isFinite.default)(coercedValue)) { + return coercedValue !== 0; + } + + throw new _GraphQLError.GraphQLError("Boolean cannot represent a non boolean value: ".concat((0, _inspect.default)(coercedValue))); +} + +function coerceBoolean(inputValue) { + if (typeof inputValue !== 'boolean') { + throw new _GraphQLError.GraphQLError("Boolean cannot represent a non boolean value: ".concat((0, _inspect.default)(inputValue))); + } + + return inputValue; +} + +var GraphQLBoolean = new _definition.GraphQLScalarType({ + name: 'Boolean', + description: 'The `Boolean` scalar type represents `true` or `false`.', + serialize: serializeBoolean, + parseValue: coerceBoolean, + parseLiteral: function parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.BOOLEAN) { + throw new _GraphQLError.GraphQLError("Boolean cannot represent a non boolean value: ".concat((0, _printer.print)(valueNode)), valueNode); + } + + return valueNode.value; + } +}); +exports.GraphQLBoolean = GraphQLBoolean; + +function serializeID(outputValue) { + var coercedValue = serializeObject(outputValue); + + if (typeof coercedValue === 'string') { + return coercedValue; + } + + if ((0, _isInteger.default)(coercedValue)) { + return String(coercedValue); + } + + throw new _GraphQLError.GraphQLError("ID cannot represent value: ".concat((0, _inspect.default)(outputValue))); +} + +function coerceID(inputValue) { + if (typeof inputValue === 'string') { + return inputValue; + } + + if ((0, _isInteger.default)(inputValue)) { + return inputValue.toString(); + } + + throw new _GraphQLError.GraphQLError("ID cannot represent value: ".concat((0, _inspect.default)(inputValue))); +} + +var GraphQLID = new _definition.GraphQLScalarType({ + name: 'ID', + description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.', + serialize: serializeID, + parseValue: coerceID, + parseLiteral: function parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.STRING && valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError('ID cannot represent a non-string and non-integer value: ' + (0, _printer.print)(valueNode), valueNode); + } + + return valueNode.value; + } +}); +exports.GraphQLID = GraphQLID; +var specifiedScalarTypes = Object.freeze([GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID]); +exports.specifiedScalarTypes = specifiedScalarTypes; + +function isSpecifiedScalarType(type) { + return specifiedScalarTypes.some(function (_ref) { + var name = _ref.name; + return type.name === name; + }); +} + + +/***/ }), + +/***/ 8505: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isSchema = isSchema; +exports.assertSchema = assertSchema; +exports.GraphQLSchema = void 0; + +var _find = _interopRequireDefault(__nccwpck_require__(57649)); + +var _arrayFrom3 = _interopRequireDefault(__nccwpck_require__(86839)); + +var _objectValues5 = _interopRequireDefault(__nccwpck_require__(30026)); + +var _symbols = __nccwpck_require__(3255); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _toObjMap = _interopRequireDefault(__nccwpck_require__(74728)); + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +var _instanceOf = _interopRequireDefault(__nccwpck_require__(93481)); + +var _isObjectLike = _interopRequireDefault(__nccwpck_require__(95865)); + +var _introspection = __nccwpck_require__(28344); + +var _directives = __nccwpck_require__(83614); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +// eslint-disable-next-line no-redeclare +function isSchema(schema) { + return (0, _instanceOf.default)(schema, GraphQLSchema); +} + +function assertSchema(schema) { + if (!isSchema(schema)) { + throw new Error("Expected ".concat((0, _inspect.default)(schema), " to be a GraphQL schema.")); + } + + return schema; +} +/** + * Schema Definition + * + * A Schema is created by supplying the root types of each type of operation, + * query and mutation (optional). A schema definition is then supplied to the + * validator and executor. + * + * Example: + * + * const MyAppSchema = new GraphQLSchema({ + * query: MyAppQueryRootType, + * mutation: MyAppMutationRootType, + * }) + * + * Note: When the schema is constructed, by default only the types that are + * reachable by traversing the root types are included, other types must be + * explicitly referenced. + * + * Example: + * + * const characterInterface = new GraphQLInterfaceType({ + * name: 'Character', + * ... + * }); + * + * const humanType = new GraphQLObjectType({ + * name: 'Human', + * interfaces: [characterInterface], + * ... + * }); + * + * const droidType = new GraphQLObjectType({ + * name: 'Droid', + * interfaces: [characterInterface], + * ... + * }); + * + * const schema = new GraphQLSchema({ + * query: new GraphQLObjectType({ + * name: 'Query', + * fields: { + * hero: { type: characterInterface, ... }, + * } + * }), + * ... + * // Since this schema references only the `Character` interface it's + * // necessary to explicitly list the types that implement it if + * // you want them to be included in the final schema. + * types: [humanType, droidType], + * }) + * + * Note: If an array of `directives` are provided to GraphQLSchema, that will be + * the exact list of directives represented and allowed. If `directives` is not + * provided then a default set of the specified directives (e.g. @include and + * @skip) will be used. If you wish to provide *additional* directives to these + * specified directives, you must explicitly declare them. Example: + * + * const MyAppSchema = new GraphQLSchema({ + * ... + * directives: specifiedDirectives.concat([ myCustomDirective ]), + * }) + * + */ + + +var GraphQLSchema = /*#__PURE__*/function () { + // Used as a cache for validateSchema(). + function GraphQLSchema(config) { + var _config$directives; + + // If this schema was built from a source known to be valid, then it may be + // marked with assumeValid to avoid an additional type system validation. + this.__validationErrors = config.assumeValid === true ? [] : undefined; // Check for common mistakes during construction to produce early errors. + + (0, _isObjectLike.default)(config) || (0, _devAssert.default)(0, 'Must provide configuration object.'); + !config.types || Array.isArray(config.types) || (0, _devAssert.default)(0, "\"types\" must be Array if provided but got: ".concat((0, _inspect.default)(config.types), ".")); + !config.directives || Array.isArray(config.directives) || (0, _devAssert.default)(0, '"directives" must be Array if provided but got: ' + "".concat((0, _inspect.default)(config.directives), ".")); + this.description = config.description; + this.extensions = config.extensions && (0, _toObjMap.default)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = config.extensionASTNodes; + this._queryType = config.query; + this._mutationType = config.mutation; + this._subscriptionType = config.subscription; // Provide specified directives (e.g. @include and @skip) by default. + + this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives; // To preserve order of user-provided types, we add first to add them to + // the set of "collected" types, so `collectReferencedTypes` ignore them. + + var allReferencedTypes = new Set(config.types); + + if (config.types != null) { + for (var _i2 = 0, _config$types2 = config.types; _i2 < _config$types2.length; _i2++) { + var type = _config$types2[_i2]; + // When we ready to process this type, we remove it from "collected" types + // and then add it together with all dependent types in the correct position. + allReferencedTypes.delete(type); + collectReferencedTypes(type, allReferencedTypes); + } + } + + if (this._queryType != null) { + collectReferencedTypes(this._queryType, allReferencedTypes); + } + + if (this._mutationType != null) { + collectReferencedTypes(this._mutationType, allReferencedTypes); + } + + if (this._subscriptionType != null) { + collectReferencedTypes(this._subscriptionType, allReferencedTypes); + } + + for (var _i4 = 0, _this$_directives2 = this._directives; _i4 < _this$_directives2.length; _i4++) { + var directive = _this$_directives2[_i4]; + + // Directives are not validated until validateSchema() is called. + if ((0, _directives.isDirective)(directive)) { + for (var _i6 = 0, _directive$args2 = directive.args; _i6 < _directive$args2.length; _i6++) { + var arg = _directive$args2[_i6]; + collectReferencedTypes(arg.type, allReferencedTypes); + } + } + } + + collectReferencedTypes(_introspection.__Schema, allReferencedTypes); // Storing the resulting map for reference by the schema. + + this._typeMap = Object.create(null); + this._subTypeMap = Object.create(null); // Keep track of all implementations by interface name. + + this._implementationsMap = Object.create(null); + + for (var _i8 = 0, _arrayFrom2 = (0, _arrayFrom3.default)(allReferencedTypes); _i8 < _arrayFrom2.length; _i8++) { + var namedType = _arrayFrom2[_i8]; + + if (namedType == null) { + continue; + } + + var typeName = namedType.name; + typeName || (0, _devAssert.default)(0, 'One of the provided types for building the Schema is missing a name.'); + + if (this._typeMap[typeName] !== undefined) { + throw new Error("Schema must contain uniquely named types but contains multiple types named \"".concat(typeName, "\".")); + } + + this._typeMap[typeName] = namedType; + + if ((0, _definition.isInterfaceType)(namedType)) { + // Store implementations by interface. + for (var _i10 = 0, _namedType$getInterfa2 = namedType.getInterfaces(); _i10 < _namedType$getInterfa2.length; _i10++) { + var iface = _namedType$getInterfa2[_i10]; + + if ((0, _definition.isInterfaceType)(iface)) { + var implementations = this._implementationsMap[iface.name]; + + if (implementations === undefined) { + implementations = this._implementationsMap[iface.name] = { + objects: [], + interfaces: [] + }; + } + + implementations.interfaces.push(namedType); + } + } + } else if ((0, _definition.isObjectType)(namedType)) { + // Store implementations by objects. + for (var _i12 = 0, _namedType$getInterfa4 = namedType.getInterfaces(); _i12 < _namedType$getInterfa4.length; _i12++) { + var _iface = _namedType$getInterfa4[_i12]; + + if ((0, _definition.isInterfaceType)(_iface)) { + var _implementations = this._implementationsMap[_iface.name]; + + if (_implementations === undefined) { + _implementations = this._implementationsMap[_iface.name] = { + objects: [], + interfaces: [] + }; + } + + _implementations.objects.push(namedType); + } + } + } + } + } + + var _proto = GraphQLSchema.prototype; + + _proto.getQueryType = function getQueryType() { + return this._queryType; + }; + + _proto.getMutationType = function getMutationType() { + return this._mutationType; + }; + + _proto.getSubscriptionType = function getSubscriptionType() { + return this._subscriptionType; + }; + + _proto.getTypeMap = function getTypeMap() { + return this._typeMap; + }; + + _proto.getType = function getType(name) { + return this.getTypeMap()[name]; + }; + + _proto.getPossibleTypes = function getPossibleTypes(abstractType) { + return (0, _definition.isUnionType)(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects; + }; + + _proto.getImplementations = function getImplementations(interfaceType) { + var implementations = this._implementationsMap[interfaceType.name]; + return implementations !== null && implementations !== void 0 ? implementations : { + objects: [], + interfaces: [] + }; + } // @deprecated: use isSubType instead - will be removed in v16. + ; + + _proto.isPossibleType = function isPossibleType(abstractType, possibleType) { + return this.isSubType(abstractType, possibleType); + }; + + _proto.isSubType = function isSubType(abstractType, maybeSubType) { + var map = this._subTypeMap[abstractType.name]; + + if (map === undefined) { + map = Object.create(null); + + if ((0, _definition.isUnionType)(abstractType)) { + for (var _i14 = 0, _abstractType$getType2 = abstractType.getTypes(); _i14 < _abstractType$getType2.length; _i14++) { + var type = _abstractType$getType2[_i14]; + map[type.name] = true; + } + } else { + var implementations = this.getImplementations(abstractType); + + for (var _i16 = 0, _implementations$obje2 = implementations.objects; _i16 < _implementations$obje2.length; _i16++) { + var _type = _implementations$obje2[_i16]; + map[_type.name] = true; + } + + for (var _i18 = 0, _implementations$inte2 = implementations.interfaces; _i18 < _implementations$inte2.length; _i18++) { + var _type2 = _implementations$inte2[_i18]; + map[_type2.name] = true; + } + } + + this._subTypeMap[abstractType.name] = map; + } + + return map[maybeSubType.name] !== undefined; + }; + + _proto.getDirectives = function getDirectives() { + return this._directives; + }; + + _proto.getDirective = function getDirective(name) { + return (0, _find.default)(this.getDirectives(), function (directive) { + return directive.name === name; + }); + }; + + _proto.toConfig = function toConfig() { + var _this$extensionASTNod; + + return { + description: this.description, + query: this.getQueryType(), + mutation: this.getMutationType(), + subscription: this.getSubscriptionType(), + types: (0, _objectValues5.default)(this.getTypeMap()), + directives: this.getDirectives().slice(), + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : [], + assumeValid: this.__validationErrors !== undefined + }; + } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet + ; + + _createClass(GraphQLSchema, [{ + key: _symbols.SYMBOL_TO_STRING_TAG, + get: function get() { + return 'GraphQLSchema'; + } + }]); + + return GraphQLSchema; +}(); + +exports.GraphQLSchema = GraphQLSchema; + +function collectReferencedTypes(type, typeSet) { + var namedType = (0, _definition.getNamedType)(type); + + if (!typeSet.has(namedType)) { + typeSet.add(namedType); + + if ((0, _definition.isUnionType)(namedType)) { + for (var _i20 = 0, _namedType$getTypes2 = namedType.getTypes(); _i20 < _namedType$getTypes2.length; _i20++) { + var memberType = _namedType$getTypes2[_i20]; + collectReferencedTypes(memberType, typeSet); + } + } else if ((0, _definition.isObjectType)(namedType) || (0, _definition.isInterfaceType)(namedType)) { + for (var _i22 = 0, _namedType$getInterfa6 = namedType.getInterfaces(); _i22 < _namedType$getInterfa6.length; _i22++) { + var interfaceType = _namedType$getInterfa6[_i22]; + collectReferencedTypes(interfaceType, typeSet); + } + + for (var _i24 = 0, _objectValues2 = (0, _objectValues5.default)(namedType.getFields()); _i24 < _objectValues2.length; _i24++) { + var field = _objectValues2[_i24]; + collectReferencedTypes(field.type, typeSet); + + for (var _i26 = 0, _field$args2 = field.args; _i26 < _field$args2.length; _i26++) { + var arg = _field$args2[_i26]; + collectReferencedTypes(arg.type, typeSet); + } + } + } else if ((0, _definition.isInputObjectType)(namedType)) { + for (var _i28 = 0, _objectValues4 = (0, _objectValues5.default)(namedType.getFields()); _i28 < _objectValues4.length; _i28++) { + var _field = _objectValues4[_i28]; + collectReferencedTypes(_field.type, typeSet); + } + } + } + + return typeSet; +} + + +/***/ }), + +/***/ 22430: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.validateSchema = validateSchema; +exports.assertValidSchema = assertValidSchema; + +var _find = _interopRequireDefault(__nccwpck_require__(57649)); + +var _objectValues5 = _interopRequireDefault(__nccwpck_require__(30026)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _locatedError = __nccwpck_require__(16842); + +var _assertValidName = __nccwpck_require__(25780); + +var _typeComparators = __nccwpck_require__(10333); + +var _schema = __nccwpck_require__(8505); + +var _introspection = __nccwpck_require__(28344); + +var _directives = __nccwpck_require__(83614); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Implements the "Type Validation" sub-sections of the specification's + * "Type System" section. + * + * Validation runs synchronously, returning an array of encountered errors, or + * an empty array if no errors were encountered and the Schema is valid. + */ +function validateSchema(schema) { + // First check to ensure the provided value is in fact a GraphQLSchema. + (0, _schema.assertSchema)(schema); // If this Schema has already been validated, return the previous results. + + if (schema.__validationErrors) { + return schema.__validationErrors; + } // Validate the schema, producing a list of errors. + + + var context = new SchemaValidationContext(schema); + validateRootTypes(context); + validateDirectives(context); + validateTypes(context); // Persist the results of validation before returning to ensure validation + // does not run multiple times for this schema. + + var errors = context.getErrors(); + schema.__validationErrors = errors; + return errors; +} +/** + * Utility function which asserts a schema is valid by throwing an error if + * it is invalid. + */ + + +function assertValidSchema(schema) { + var errors = validateSchema(schema); + + if (errors.length !== 0) { + throw new Error(errors.map(function (error) { + return error.message; + }).join('\n\n')); + } +} + +var SchemaValidationContext = /*#__PURE__*/function () { + function SchemaValidationContext(schema) { + this._errors = []; + this.schema = schema; + } + + var _proto = SchemaValidationContext.prototype; + + _proto.reportError = function reportError(message, nodes) { + var _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes; + + this.addError(new _GraphQLError.GraphQLError(message, _nodes)); + }; + + _proto.addError = function addError(error) { + this._errors.push(error); + }; + + _proto.getErrors = function getErrors() { + return this._errors; + }; + + return SchemaValidationContext; +}(); + +function validateRootTypes(context) { + var schema = context.schema; + var queryType = schema.getQueryType(); + + if (!queryType) { + context.reportError('Query root type must be provided.', schema.astNode); + } else if (!(0, _definition.isObjectType)(queryType)) { + var _getOperationTypeNode; + + context.reportError("Query root type must be Object type, it cannot be ".concat((0, _inspect.default)(queryType), "."), (_getOperationTypeNode = getOperationTypeNode(schema, 'query')) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode); + } + + var mutationType = schema.getMutationType(); + + if (mutationType && !(0, _definition.isObjectType)(mutationType)) { + var _getOperationTypeNode2; + + context.reportError('Mutation root type must be Object type if provided, it cannot be ' + "".concat((0, _inspect.default)(mutationType), "."), (_getOperationTypeNode2 = getOperationTypeNode(schema, 'mutation')) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode); + } + + var subscriptionType = schema.getSubscriptionType(); + + if (subscriptionType && !(0, _definition.isObjectType)(subscriptionType)) { + var _getOperationTypeNode3; + + context.reportError('Subscription root type must be Object type if provided, it cannot be ' + "".concat((0, _inspect.default)(subscriptionType), "."), (_getOperationTypeNode3 = getOperationTypeNode(schema, 'subscription')) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode); + } +} + +function getOperationTypeNode(schema, operation) { + var operationNodes = getAllSubNodes(schema, function (node) { + return node.operationTypes; + }); + + for (var _i2 = 0; _i2 < operationNodes.length; _i2++) { + var node = operationNodes[_i2]; + + if (node.operation === operation) { + return node.type; + } + } + + return undefined; +} + +function validateDirectives(context) { + for (var _i4 = 0, _context$schema$getDi2 = context.schema.getDirectives(); _i4 < _context$schema$getDi2.length; _i4++) { + var directive = _context$schema$getDi2[_i4]; + + // Ensure all directives are in fact GraphQL directives. + if (!(0, _directives.isDirective)(directive)) { + context.reportError("Expected directive but got: ".concat((0, _inspect.default)(directive), "."), directive === null || directive === void 0 ? void 0 : directive.astNode); + continue; + } // Ensure they are named correctly. + + + validateName(context, directive); // TODO: Ensure proper locations. + // Ensure the arguments are valid. + + for (var _i6 = 0, _directive$args2 = directive.args; _i6 < _directive$args2.length; _i6++) { + var arg = _directive$args2[_i6]; + // Ensure they are named correctly. + validateName(context, arg); // Ensure the type is an input type. + + if (!(0, _definition.isInputType)(arg.type)) { + context.reportError("The type of @".concat(directive.name, "(").concat(arg.name, ":) must be Input Type ") + "but got: ".concat((0, _inspect.default)(arg.type), "."), arg.astNode); + } + + if ((0, _definition.isRequiredArgument)(arg) && arg.deprecationReason != null) { + var _arg$astNode; + + context.reportError("Required argument @".concat(directive.name, "(").concat(arg.name, ":) cannot be deprecated."), [getDeprecatedDirectiveNode(arg.astNode), // istanbul ignore next (TODO need to write coverage tests) + (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type]); + } + } + } +} + +function validateName(context, node) { + // Ensure names are valid, however introspection types opt out. + var error = (0, _assertValidName.isValidNameError)(node.name); + + if (error) { + context.addError((0, _locatedError.locatedError)(error, node.astNode)); + } +} + +function validateTypes(context) { + var validateInputObjectCircularRefs = createInputObjectCircularRefsValidator(context); + var typeMap = context.schema.getTypeMap(); + + for (var _i8 = 0, _objectValues2 = (0, _objectValues5.default)(typeMap); _i8 < _objectValues2.length; _i8++) { + var type = _objectValues2[_i8]; + + // Ensure all provided types are in fact GraphQL type. + if (!(0, _definition.isNamedType)(type)) { + context.reportError("Expected GraphQL named type but got: ".concat((0, _inspect.default)(type), "."), type.astNode); + continue; + } // Ensure it is named correctly (excluding introspection types). + + + if (!(0, _introspection.isIntrospectionType)(type)) { + validateName(context, type); + } + + if ((0, _definition.isObjectType)(type)) { + // Ensure fields are valid + validateFields(context, type); // Ensure objects implement the interfaces they claim to. + + validateInterfaces(context, type); + } else if ((0, _definition.isInterfaceType)(type)) { + // Ensure fields are valid. + validateFields(context, type); // Ensure interfaces implement the interfaces they claim to. + + validateInterfaces(context, type); + } else if ((0, _definition.isUnionType)(type)) { + // Ensure Unions include valid member types. + validateUnionMembers(context, type); + } else if ((0, _definition.isEnumType)(type)) { + // Ensure Enums have valid values. + validateEnumValues(context, type); + } else if ((0, _definition.isInputObjectType)(type)) { + // Ensure Input Object fields are valid. + validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references + + validateInputObjectCircularRefs(type); + } + } +} + +function validateFields(context, type) { + var fields = (0, _objectValues5.default)(type.getFields()); // Objects and Interfaces both must define one or more fields. + + if (fields.length === 0) { + context.reportError("Type ".concat(type.name, " must define one or more fields."), getAllNodes(type)); + } + + for (var _i10 = 0; _i10 < fields.length; _i10++) { + var field = fields[_i10]; + // Ensure they are named correctly. + validateName(context, field); // Ensure the type is an output type + + if (!(0, _definition.isOutputType)(field.type)) { + var _field$astNode; + + context.reportError("The type of ".concat(type.name, ".").concat(field.name, " must be Output Type ") + "but got: ".concat((0, _inspect.default)(field.type), "."), (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type); + } // Ensure the arguments are valid + + + for (var _i12 = 0, _field$args2 = field.args; _i12 < _field$args2.length; _i12++) { + var arg = _field$args2[_i12]; + var argName = arg.name; // Ensure they are named correctly. + + validateName(context, arg); // Ensure the type is an input type + + if (!(0, _definition.isInputType)(arg.type)) { + var _arg$astNode2; + + context.reportError("The type of ".concat(type.name, ".").concat(field.name, "(").concat(argName, ":) must be Input ") + "Type but got: ".concat((0, _inspect.default)(arg.type), "."), (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type); + } + + if ((0, _definition.isRequiredArgument)(arg) && arg.deprecationReason != null) { + var _arg$astNode3; + + context.reportError("Required argument ".concat(type.name, ".").concat(field.name, "(").concat(argName, ":) cannot be deprecated."), [getDeprecatedDirectiveNode(arg.astNode), // istanbul ignore next (TODO need to write coverage tests) + (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type]); + } + } + } +} + +function validateInterfaces(context, type) { + var ifaceTypeNames = Object.create(null); + + for (var _i14 = 0, _type$getInterfaces2 = type.getInterfaces(); _i14 < _type$getInterfaces2.length; _i14++) { + var iface = _type$getInterfaces2[_i14]; + + if (!(0, _definition.isInterfaceType)(iface)) { + context.reportError("Type ".concat((0, _inspect.default)(type), " must only implement Interface types, ") + "it cannot implement ".concat((0, _inspect.default)(iface), "."), getAllImplementsInterfaceNodes(type, iface)); + continue; + } + + if (type === iface) { + context.reportError("Type ".concat(type.name, " cannot implement itself because it would create a circular reference."), getAllImplementsInterfaceNodes(type, iface)); + continue; + } + + if (ifaceTypeNames[iface.name]) { + context.reportError("Type ".concat(type.name, " can only implement ").concat(iface.name, " once."), getAllImplementsInterfaceNodes(type, iface)); + continue; + } + + ifaceTypeNames[iface.name] = true; + validateTypeImplementsAncestors(context, type, iface); + validateTypeImplementsInterface(context, type, iface); + } +} + +function validateTypeImplementsInterface(context, type, iface) { + var typeFieldMap = type.getFields(); // Assert each interface field is implemented. + + for (var _i16 = 0, _objectValues4 = (0, _objectValues5.default)(iface.getFields()); _i16 < _objectValues4.length; _i16++) { + var ifaceField = _objectValues4[_i16]; + var fieldName = ifaceField.name; + var typeField = typeFieldMap[fieldName]; // Assert interface field exists on type. + + if (!typeField) { + context.reportError("Interface field ".concat(iface.name, ".").concat(fieldName, " expected but ").concat(type.name, " does not provide it."), [ifaceField.astNode].concat(getAllNodes(type))); + continue; + } // Assert interface field type is satisfied by type field type, by being + // a valid subtype. (covariant) + + + if (!(0, _typeComparators.isTypeSubTypeOf)(context.schema, typeField.type, ifaceField.type)) { + var _ifaceField$astNode, _typeField$astNode; + + context.reportError("Interface field ".concat(iface.name, ".").concat(fieldName, " expects type ") + "".concat((0, _inspect.default)(ifaceField.type), " but ").concat(type.name, ".").concat(fieldName, " ") + "is type ".concat((0, _inspect.default)(typeField.type), "."), [// istanbul ignore next (TODO need to write coverage tests) + (_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, // istanbul ignore next (TODO need to write coverage tests) + (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type]); + } // Assert each interface field arg is implemented. + + + var _loop = function _loop(_i18, _ifaceField$args2) { + var ifaceArg = _ifaceField$args2[_i18]; + var argName = ifaceArg.name; + var typeArg = (0, _find.default)(typeField.args, function (arg) { + return arg.name === argName; + }); // Assert interface field arg exists on object field. + + if (!typeArg) { + context.reportError("Interface field argument ".concat(iface.name, ".").concat(fieldName, "(").concat(argName, ":) expected but ").concat(type.name, ".").concat(fieldName, " does not provide it."), [ifaceArg.astNode, typeField.astNode]); + return "continue"; + } // Assert interface field arg type matches object field arg type. + // (invariant) + // TODO: change to contravariant? + + + if (!(0, _typeComparators.isEqualType)(ifaceArg.type, typeArg.type)) { + var _ifaceArg$astNode, _typeArg$astNode; + + context.reportError("Interface field argument ".concat(iface.name, ".").concat(fieldName, "(").concat(argName, ":) ") + "expects type ".concat((0, _inspect.default)(ifaceArg.type), " but ") + "".concat(type.name, ".").concat(fieldName, "(").concat(argName, ":) is type ") + "".concat((0, _inspect.default)(typeArg.type), "."), [// istanbul ignore next (TODO need to write coverage tests) + (_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, // istanbul ignore next (TODO need to write coverage tests) + (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type]); + } // TODO: validate default values? + + }; + + for (var _i18 = 0, _ifaceField$args2 = ifaceField.args; _i18 < _ifaceField$args2.length; _i18++) { + var _ret = _loop(_i18, _ifaceField$args2); + + if (_ret === "continue") continue; + } // Assert additional arguments must not be required. + + + var _loop2 = function _loop2(_i20, _typeField$args2) { + var typeArg = _typeField$args2[_i20]; + var argName = typeArg.name; + var ifaceArg = (0, _find.default)(ifaceField.args, function (arg) { + return arg.name === argName; + }); + + if (!ifaceArg && (0, _definition.isRequiredArgument)(typeArg)) { + context.reportError("Object field ".concat(type.name, ".").concat(fieldName, " includes required argument ").concat(argName, " that is missing from the Interface field ").concat(iface.name, ".").concat(fieldName, "."), [typeArg.astNode, ifaceField.astNode]); + } + }; + + for (var _i20 = 0, _typeField$args2 = typeField.args; _i20 < _typeField$args2.length; _i20++) { + _loop2(_i20, _typeField$args2); + } + } +} + +function validateTypeImplementsAncestors(context, type, iface) { + var ifaceInterfaces = type.getInterfaces(); + + for (var _i22 = 0, _iface$getInterfaces2 = iface.getInterfaces(); _i22 < _iface$getInterfaces2.length; _i22++) { + var transitive = _iface$getInterfaces2[_i22]; + + if (ifaceInterfaces.indexOf(transitive) === -1) { + context.reportError(transitive === type ? "Type ".concat(type.name, " cannot implement ").concat(iface.name, " because it would create a circular reference.") : "Type ".concat(type.name, " must implement ").concat(transitive.name, " because it is implemented by ").concat(iface.name, "."), [].concat(getAllImplementsInterfaceNodes(iface, transitive), getAllImplementsInterfaceNodes(type, iface))); + } + } +} + +function validateUnionMembers(context, union) { + var memberTypes = union.getTypes(); + + if (memberTypes.length === 0) { + context.reportError("Union type ".concat(union.name, " must define one or more member types."), getAllNodes(union)); + } + + var includedTypeNames = Object.create(null); + + for (var _i24 = 0; _i24 < memberTypes.length; _i24++) { + var memberType = memberTypes[_i24]; + + if (includedTypeNames[memberType.name]) { + context.reportError("Union type ".concat(union.name, " can only include type ").concat(memberType.name, " once."), getUnionMemberTypeNodes(union, memberType.name)); + continue; + } + + includedTypeNames[memberType.name] = true; + + if (!(0, _definition.isObjectType)(memberType)) { + context.reportError("Union type ".concat(union.name, " can only include Object types, ") + "it cannot include ".concat((0, _inspect.default)(memberType), "."), getUnionMemberTypeNodes(union, String(memberType))); + } + } +} + +function validateEnumValues(context, enumType) { + var enumValues = enumType.getValues(); + + if (enumValues.length === 0) { + context.reportError("Enum type ".concat(enumType.name, " must define one or more values."), getAllNodes(enumType)); + } + + for (var _i26 = 0; _i26 < enumValues.length; _i26++) { + var enumValue = enumValues[_i26]; + var valueName = enumValue.name; // Ensure valid name. + + validateName(context, enumValue); + + if (valueName === 'true' || valueName === 'false' || valueName === 'null') { + context.reportError("Enum type ".concat(enumType.name, " cannot include value: ").concat(valueName, "."), enumValue.astNode); + } + } +} + +function validateInputFields(context, inputObj) { + var fields = (0, _objectValues5.default)(inputObj.getFields()); + + if (fields.length === 0) { + context.reportError("Input Object type ".concat(inputObj.name, " must define one or more fields."), getAllNodes(inputObj)); + } // Ensure the arguments are valid + + + for (var _i28 = 0; _i28 < fields.length; _i28++) { + var field = fields[_i28]; + // Ensure they are named correctly. + validateName(context, field); // Ensure the type is an input type + + if (!(0, _definition.isInputType)(field.type)) { + var _field$astNode2; + + context.reportError("The type of ".concat(inputObj.name, ".").concat(field.name, " must be Input Type ") + "but got: ".concat((0, _inspect.default)(field.type), "."), (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type); + } + + if ((0, _definition.isRequiredInputField)(field) && field.deprecationReason != null) { + var _field$astNode3; + + context.reportError("Required input field ".concat(inputObj.name, ".").concat(field.name, " cannot be deprecated."), [getDeprecatedDirectiveNode(field.astNode), // istanbul ignore next (TODO need to write coverage tests) + (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type]); + } + } +} + +function createInputObjectCircularRefsValidator(context) { + // Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'. + // Tracks already visited types to maintain O(N) and to ensure that cycles + // are not redundantly reported. + var visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors + + var fieldPath = []; // Position in the type path + + var fieldPathIndexByTypeName = Object.create(null); + return detectCycleRecursive; // This does a straight-forward DFS to find cycles. + // It does not terminate when a cycle was found but continues to explore + // the graph to find all possible cycles. + + function detectCycleRecursive(inputObj) { + if (visitedTypes[inputObj.name]) { + return; + } + + visitedTypes[inputObj.name] = true; + fieldPathIndexByTypeName[inputObj.name] = fieldPath.length; + var fields = (0, _objectValues5.default)(inputObj.getFields()); + + for (var _i30 = 0; _i30 < fields.length; _i30++) { + var field = fields[_i30]; + + if ((0, _definition.isNonNullType)(field.type) && (0, _definition.isInputObjectType)(field.type.ofType)) { + var fieldType = field.type.ofType; + var cycleIndex = fieldPathIndexByTypeName[fieldType.name]; + fieldPath.push(field); + + if (cycleIndex === undefined) { + detectCycleRecursive(fieldType); + } else { + var cyclePath = fieldPath.slice(cycleIndex); + var pathStr = cyclePath.map(function (fieldObj) { + return fieldObj.name; + }).join('.'); + context.reportError("Cannot reference Input Object \"".concat(fieldType.name, "\" within itself through a series of non-null fields: \"").concat(pathStr, "\"."), cyclePath.map(function (fieldObj) { + return fieldObj.astNode; + })); + } + + fieldPath.pop(); + } + } + + fieldPathIndexByTypeName[inputObj.name] = undefined; + } +} + +function getAllNodes(object) { + var astNode = object.astNode, + extensionASTNodes = object.extensionASTNodes; + return astNode ? extensionASTNodes ? [astNode].concat(extensionASTNodes) : [astNode] : extensionASTNodes !== null && extensionASTNodes !== void 0 ? extensionASTNodes : []; +} + +function getAllSubNodes(object, getter) { + var subNodes = []; + + for (var _i32 = 0, _getAllNodes2 = getAllNodes(object); _i32 < _getAllNodes2.length; _i32++) { + var _getter; + + var node = _getAllNodes2[_i32]; + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + subNodes = subNodes.concat((_getter = getter(node)) !== null && _getter !== void 0 ? _getter : []); + } + + return subNodes; +} + +function getAllImplementsInterfaceNodes(type, iface) { + return getAllSubNodes(type, function (typeNode) { + return typeNode.interfaces; + }).filter(function (ifaceNode) { + return ifaceNode.name.value === iface.name; + }); +} + +function getUnionMemberTypeNodes(union, typeName) { + return getAllSubNodes(union, function (unionNode) { + return unionNode.types; + }).filter(function (typeNode) { + return typeNode.name.value === typeName; + }); +} + +function getDeprecatedDirectiveNode(definitionNode) { + var _definitionNode$direc; + + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find(function (node) { + return node.name.value === _directives.GraphQLDeprecatedDirective.name; + }); +} + + +/***/ }), + +/***/ 76625: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.visitWithTypeInfo = visitWithTypeInfo; +exports.TypeInfo = void 0; + +var _find = _interopRequireDefault(__nccwpck_require__(57649)); + +var _kinds = __nccwpck_require__(11927); + +var _ast = __nccwpck_require__(45494); + +var _visitor = __nccwpck_require__(5678); + +var _definition = __nccwpck_require__(5821); + +var _introspection = __nccwpck_require__(28344); + +var _typeFromAST = __nccwpck_require__(27664); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * TypeInfo is a utility class which, given a GraphQL schema, can keep track + * of the current field and type definitions at any point in a GraphQL document + * AST during a recursive descent by calling `enter(node)` and `leave(node)`. + */ +var TypeInfo = /*#__PURE__*/function () { + function TypeInfo(schema, // NOTE: this experimental optional second parameter is only needed in order + // to support non-spec-compliant code bases. You should never need to use it. + // It may disappear in the future. + getFieldDefFn, // Initial type may be provided in rare cases to facilitate traversals + // beginning somewhere other than documents. + initialType) { + this._schema = schema; + this._typeStack = []; + this._parentTypeStack = []; + this._inputTypeStack = []; + this._fieldDefStack = []; + this._defaultValueStack = []; + this._directive = null; + this._argument = null; + this._enumValue = null; + this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef; + + if (initialType) { + if ((0, _definition.isInputType)(initialType)) { + this._inputTypeStack.push(initialType); + } + + if ((0, _definition.isCompositeType)(initialType)) { + this._parentTypeStack.push(initialType); + } + + if ((0, _definition.isOutputType)(initialType)) { + this._typeStack.push(initialType); + } + } + } + + var _proto = TypeInfo.prototype; + + _proto.getType = function getType() { + if (this._typeStack.length > 0) { + return this._typeStack[this._typeStack.length - 1]; + } + }; + + _proto.getParentType = function getParentType() { + if (this._parentTypeStack.length > 0) { + return this._parentTypeStack[this._parentTypeStack.length - 1]; + } + }; + + _proto.getInputType = function getInputType() { + if (this._inputTypeStack.length > 0) { + return this._inputTypeStack[this._inputTypeStack.length - 1]; + } + }; + + _proto.getParentInputType = function getParentInputType() { + if (this._inputTypeStack.length > 1) { + return this._inputTypeStack[this._inputTypeStack.length - 2]; + } + }; + + _proto.getFieldDef = function getFieldDef() { + if (this._fieldDefStack.length > 0) { + return this._fieldDefStack[this._fieldDefStack.length - 1]; + } + }; + + _proto.getDefaultValue = function getDefaultValue() { + if (this._defaultValueStack.length > 0) { + return this._defaultValueStack[this._defaultValueStack.length - 1]; + } + }; + + _proto.getDirective = function getDirective() { + return this._directive; + }; + + _proto.getArgument = function getArgument() { + return this._argument; + }; + + _proto.getEnumValue = function getEnumValue() { + return this._enumValue; + }; + + _proto.enter = function enter(node) { + var schema = this._schema; // Note: many of the types below are explicitly typed as "mixed" to drop + // any assumptions of a valid schema to ensure runtime types are properly + // checked before continuing since TypeInfo is used as part of validation + // which occurs before guarantees of schema and document validity. + + switch (node.kind) { + case _kinds.Kind.SELECTION_SET: + { + var namedType = (0, _definition.getNamedType)(this.getType()); + + this._parentTypeStack.push((0, _definition.isCompositeType)(namedType) ? namedType : undefined); + + break; + } + + case _kinds.Kind.FIELD: + { + var parentType = this.getParentType(); + var fieldDef; + var fieldType; + + if (parentType) { + fieldDef = this._getFieldDef(schema, parentType, node); + + if (fieldDef) { + fieldType = fieldDef.type; + } + } + + this._fieldDefStack.push(fieldDef); + + this._typeStack.push((0, _definition.isOutputType)(fieldType) ? fieldType : undefined); + + break; + } + + case _kinds.Kind.DIRECTIVE: + this._directive = schema.getDirective(node.name.value); + break; + + case _kinds.Kind.OPERATION_DEFINITION: + { + var type; + + switch (node.operation) { + case 'query': + type = schema.getQueryType(); + break; + + case 'mutation': + type = schema.getMutationType(); + break; + + case 'subscription': + type = schema.getSubscriptionType(); + break; + } + + this._typeStack.push((0, _definition.isObjectType)(type) ? type : undefined); + + break; + } + + case _kinds.Kind.INLINE_FRAGMENT: + case _kinds.Kind.FRAGMENT_DEFINITION: + { + var typeConditionAST = node.typeCondition; + var outputType = typeConditionAST ? (0, _typeFromAST.typeFromAST)(schema, typeConditionAST) : (0, _definition.getNamedType)(this.getType()); + + this._typeStack.push((0, _definition.isOutputType)(outputType) ? outputType : undefined); + + break; + } + + case _kinds.Kind.VARIABLE_DEFINITION: + { + var inputType = (0, _typeFromAST.typeFromAST)(schema, node.type); + + this._inputTypeStack.push((0, _definition.isInputType)(inputType) ? inputType : undefined); + + break; + } + + case _kinds.Kind.ARGUMENT: + { + var _this$getDirective; + + var argDef; + var argType; + var fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef(); + + if (fieldOrDirective) { + argDef = (0, _find.default)(fieldOrDirective.args, function (arg) { + return arg.name === node.name.value; + }); + + if (argDef) { + argType = argDef.type; + } + } + + this._argument = argDef; + + this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined); + + this._inputTypeStack.push((0, _definition.isInputType)(argType) ? argType : undefined); + + break; + } + + case _kinds.Kind.LIST: + { + var listType = (0, _definition.getNullableType)(this.getInputType()); + var itemType = (0, _definition.isListType)(listType) ? listType.ofType : listType; // List positions never have a default value. + + this._defaultValueStack.push(undefined); + + this._inputTypeStack.push((0, _definition.isInputType)(itemType) ? itemType : undefined); + + break; + } + + case _kinds.Kind.OBJECT_FIELD: + { + var objectType = (0, _definition.getNamedType)(this.getInputType()); + var inputFieldType; + var inputField; + + if ((0, _definition.isInputObjectType)(objectType)) { + inputField = objectType.getFields()[node.name.value]; + + if (inputField) { + inputFieldType = inputField.type; + } + } + + this._defaultValueStack.push(inputField ? inputField.defaultValue : undefined); + + this._inputTypeStack.push((0, _definition.isInputType)(inputFieldType) ? inputFieldType : undefined); + + break; + } + + case _kinds.Kind.ENUM: + { + var enumType = (0, _definition.getNamedType)(this.getInputType()); + var enumValue; + + if ((0, _definition.isEnumType)(enumType)) { + enumValue = enumType.getValue(node.value); + } + + this._enumValue = enumValue; + break; + } + } + }; + + _proto.leave = function leave(node) { + switch (node.kind) { + case _kinds.Kind.SELECTION_SET: + this._parentTypeStack.pop(); + + break; + + case _kinds.Kind.FIELD: + this._fieldDefStack.pop(); + + this._typeStack.pop(); + + break; + + case _kinds.Kind.DIRECTIVE: + this._directive = null; + break; + + case _kinds.Kind.OPERATION_DEFINITION: + case _kinds.Kind.INLINE_FRAGMENT: + case _kinds.Kind.FRAGMENT_DEFINITION: + this._typeStack.pop(); + + break; + + case _kinds.Kind.VARIABLE_DEFINITION: + this._inputTypeStack.pop(); + + break; + + case _kinds.Kind.ARGUMENT: + this._argument = null; + + this._defaultValueStack.pop(); + + this._inputTypeStack.pop(); + + break; + + case _kinds.Kind.LIST: + case _kinds.Kind.OBJECT_FIELD: + this._defaultValueStack.pop(); + + this._inputTypeStack.pop(); + + break; + + case _kinds.Kind.ENUM: + this._enumValue = null; + break; + } + }; + + return TypeInfo; +}(); +/** + * Not exactly the same as the executor's definition of getFieldDef, in this + * statically evaluated environment we do not always have an Object type, + * and need to handle Interface and Union types. + */ + + +exports.TypeInfo = TypeInfo; + +function getFieldDef(schema, parentType, fieldNode) { + var name = fieldNode.name.value; + + if (name === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) { + return _introspection.SchemaMetaFieldDef; + } + + if (name === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) { + return _introspection.TypeMetaFieldDef; + } + + if (name === _introspection.TypeNameMetaFieldDef.name && (0, _definition.isCompositeType)(parentType)) { + return _introspection.TypeNameMetaFieldDef; + } + + if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) { + return parentType.getFields()[name]; + } +} +/** + * Creates a new visitor instance which maintains a provided TypeInfo instance + * along with visiting visitor. + */ + + +function visitWithTypeInfo(typeInfo, visitor) { + return { + enter: function enter(node) { + typeInfo.enter(node); + var fn = (0, _visitor.getVisitFn)(visitor, node.kind, + /* isLeaving */ + false); + + if (fn) { + var result = fn.apply(visitor, arguments); + + if (result !== undefined) { + typeInfo.leave(node); + + if ((0, _ast.isNode)(result)) { + typeInfo.enter(result); + } + } + + return result; + } + }, + leave: function leave(node) { + var fn = (0, _visitor.getVisitFn)(visitor, node.kind, + /* isLeaving */ + true); + var result; + + if (fn) { + result = fn.apply(visitor, arguments); + } + + typeInfo.leave(node); + return result; + } + }; +} + + +/***/ }), + +/***/ 25780: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.assertValidName = assertValidName; +exports.isValidNameError = isValidNameError; + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +var _GraphQLError = __nccwpck_require__(4797); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME_RX = /^[_a-zA-Z][_a-zA-Z0-9]*$/; +/** + * Upholds the spec rules about naming. + */ + +function assertValidName(name) { + var error = isValidNameError(name); + + if (error) { + throw error; + } + + return name; +} +/** + * Returns an Error if a name is invalid. + */ + + +function isValidNameError(name) { + typeof name === 'string' || (0, _devAssert.default)(0, 'Expected name to be a string.'); + + if (name.length > 1 && name[0] === '_' && name[1] === '_') { + return new _GraphQLError.GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection.")); + } + + if (!NAME_RX.test(name)) { + return new _GraphQLError.GraphQLError("Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"".concat(name, "\" does not.")); + } +} + + +/***/ }), + +/***/ 12653: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.astFromValue = astFromValue; + +var _isFinite = _interopRequireDefault(__nccwpck_require__(78473)); + +var _arrayFrom3 = _interopRequireDefault(__nccwpck_require__(86839)); + +var _objectValues3 = _interopRequireDefault(__nccwpck_require__(30026)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _isObjectLike = _interopRequireDefault(__nccwpck_require__(95865)); + +var _isCollection = _interopRequireDefault(__nccwpck_require__(54363)); + +var _kinds = __nccwpck_require__(11927); + +var _scalars = __nccwpck_require__(93145); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Produces a GraphQL Value AST given a JavaScript object. + * Function will match JavaScript/JSON values to GraphQL AST schema format + * by using suggested GraphQLInputType. For example: + * + * astFromValue("value", GraphQLString) + * + * A GraphQL type must be provided, which will be used to interpret different + * JavaScript values. + * + * | JSON Value | GraphQL Value | + * | ------------- | -------------------- | + * | Object | Input Object | + * | Array | List | + * | Boolean | Boolean | + * | String | String / Enum Value | + * | Number | Int / Float | + * | Mixed | Enum Value | + * | null | NullValue | + * + */ +function astFromValue(value, type) { + if ((0, _definition.isNonNullType)(type)) { + var astValue = astFromValue(value, type.ofType); + + if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _kinds.Kind.NULL) { + return null; + } + + return astValue; + } // only explicit null, not undefined, NaN + + + if (value === null) { + return { + kind: _kinds.Kind.NULL + }; + } // undefined + + + if (value === undefined) { + return null; + } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but + // the value is not an array, convert the value using the list's item type. + + + if ((0, _definition.isListType)(type)) { + var itemType = type.ofType; + + if ((0, _isCollection.default)(value)) { + var valuesNodes = []; // Since we transpile for-of in loose mode it doesn't support iterators + // and it's required to first convert iteratable into array + + for (var _i2 = 0, _arrayFrom2 = (0, _arrayFrom3.default)(value); _i2 < _arrayFrom2.length; _i2++) { + var item = _arrayFrom2[_i2]; + var itemNode = astFromValue(item, itemType); + + if (itemNode != null) { + valuesNodes.push(itemNode); + } + } + + return { + kind: _kinds.Kind.LIST, + values: valuesNodes + }; + } + + return astFromValue(value, itemType); + } // Populate the fields of the input object by creating ASTs from each value + // in the JavaScript object according to the fields in the input type. + + + if ((0, _definition.isInputObjectType)(type)) { + if (!(0, _isObjectLike.default)(value)) { + return null; + } + + var fieldNodes = []; + + for (var _i4 = 0, _objectValues2 = (0, _objectValues3.default)(type.getFields()); _i4 < _objectValues2.length; _i4++) { + var field = _objectValues2[_i4]; + var fieldValue = astFromValue(value[field.name], field.type); + + if (fieldValue) { + fieldNodes.push({ + kind: _kinds.Kind.OBJECT_FIELD, + name: { + kind: _kinds.Kind.NAME, + value: field.name + }, + value: fieldValue + }); + } + } + + return { + kind: _kinds.Kind.OBJECT, + fields: fieldNodes + }; + } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if ((0, _definition.isLeafType)(type)) { + // Since value is an internally represented value, it must be serialized + // to an externally represented value before converting into an AST. + var serialized = type.serialize(value); + + if (serialized == null) { + return null; + } // Others serialize based on their corresponding JavaScript scalar types. + + + if (typeof serialized === 'boolean') { + return { + kind: _kinds.Kind.BOOLEAN, + value: serialized + }; + } // JavaScript numbers can be Int or Float values. + + + if (typeof serialized === 'number' && (0, _isFinite.default)(serialized)) { + var stringNum = String(serialized); + return integerStringRegExp.test(stringNum) ? { + kind: _kinds.Kind.INT, + value: stringNum + } : { + kind: _kinds.Kind.FLOAT, + value: stringNum + }; + } + + if (typeof serialized === 'string') { + // Enum types use Enum literals. + if ((0, _definition.isEnumType)(type)) { + return { + kind: _kinds.Kind.ENUM, + value: serialized + }; + } // ID types can use Int literals. + + + if (type === _scalars.GraphQLID && integerStringRegExp.test(serialized)) { + return { + kind: _kinds.Kind.INT, + value: serialized + }; + } + + return { + kind: _kinds.Kind.STRING, + value: serialized + }; + } + + throw new TypeError("Cannot convert value to AST: ".concat((0, _inspect.default)(serialized), ".")); + } // istanbul ignore next (Not reachable. All possible input types have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected input type: ' + (0, _inspect.default)(type)); +} +/** + * IntValue: + * - NegativeSign? 0 + * - NegativeSign? NonZeroDigit ( Digit+ )? + */ + + +var integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/; + + +/***/ }), + +/***/ 9337: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.buildASTSchema = buildASTSchema; +exports.buildSchema = buildSchema; + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +var _kinds = __nccwpck_require__(11927); + +var _parser = __nccwpck_require__(50655); + +var _validate = __nccwpck_require__(14193); + +var _schema = __nccwpck_require__(8505); + +var _directives = __nccwpck_require__(83614); + +var _extendSchema = __nccwpck_require__(51832); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * This takes the ast of a schema document produced by the parse function in + * src/language/parser.js. + * + * If no schema definition is provided, then it will look for types named Query + * and Mutation. + * + * Given that AST it constructs a GraphQLSchema. The resulting schema + * has no resolve methods, so execution will use default resolvers. + * + * Accepts options as a second argument: + * + * - commentDescriptions: + * Provide true to use preceding comments as the description. + * + */ +function buildASTSchema(documentAST, options) { + documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.default)(0, 'Must provide valid Document AST.'); + + if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) { + (0, _validate.assertValidSDL)(documentAST); + } + + var emptySchemaConfig = { + description: undefined, + types: [], + directives: [], + extensions: undefined, + extensionASTNodes: [], + assumeValid: false + }; + var config = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options); + + if (config.astNode == null) { + for (var _i2 = 0, _config$types2 = config.types; _i2 < _config$types2.length; _i2++) { + var type = _config$types2[_i2]; + + switch (type.name) { + // Note: While this could make early assertions to get the correctly + // typed values below, that would throw immediately while type system + // validation with validateSchema() will produce more actionable results. + case 'Query': + config.query = type; + break; + + case 'Mutation': + config.mutation = type; + break; + + case 'Subscription': + config.subscription = type; + break; + } + } + } + + var directives = config.directives; // If specified directives were not explicitly declared, add them. + + var _loop = function _loop(_i4) { + var stdDirective = _directives.specifiedDirectives[_i4]; + + if (directives.every(function (directive) { + return directive.name !== stdDirective.name; + })) { + directives.push(stdDirective); + } + }; + + for (var _i4 = 0; _i4 < _directives.specifiedDirectives.length; _i4++) { + _loop(_i4); + } + + return new _schema.GraphQLSchema(config); +} +/** + * A helper function to build a GraphQLSchema directly from a source + * document. + */ + + +function buildSchema(source, options) { + var document = (0, _parser.parse)(source, { + noLocation: options === null || options === void 0 ? void 0 : options.noLocation, + allowLegacySDLEmptyFields: options === null || options === void 0 ? void 0 : options.allowLegacySDLEmptyFields, + allowLegacySDLImplementsInterfaces: options === null || options === void 0 ? void 0 : options.allowLegacySDLImplementsInterfaces, + experimentalFragmentVariables: options === null || options === void 0 ? void 0 : options.experimentalFragmentVariables + }); + return buildASTSchema(document, { + commentDescriptions: options === null || options === void 0 ? void 0 : options.commentDescriptions, + assumeValidSDL: options === null || options === void 0 ? void 0 : options.assumeValidSDL, + assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid + }); +} + + +/***/ }), + +/***/ 9352: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.buildClientSchema = buildClientSchema; + +var _objectValues = _interopRequireDefault(__nccwpck_require__(30026)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +var _keyValMap = _interopRequireDefault(__nccwpck_require__(49268)); + +var _isObjectLike = _interopRequireDefault(__nccwpck_require__(95865)); + +var _parser = __nccwpck_require__(50655); + +var _schema = __nccwpck_require__(8505); + +var _directives = __nccwpck_require__(83614); + +var _scalars = __nccwpck_require__(93145); + +var _introspection = __nccwpck_require__(28344); + +var _definition = __nccwpck_require__(5821); + +var _valueFromAST = __nccwpck_require__(83181); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Build a GraphQLSchema for use by client tools. + * + * Given the result of a client running the introspection query, creates and + * returns a GraphQLSchema instance which can be then used with all graphql-js + * tools, but cannot be used to execute a query, as introspection does not + * represent the "resolver", "parse" or "serialize" functions or any other + * server-internal mechanisms. + * + * This function expects a complete introspection result. Don't forget to check + * the "errors" field of a server response before calling this function. + */ +function buildClientSchema(introspection, options) { + (0, _isObjectLike.default)(introspection) && (0, _isObjectLike.default)(introspection.__schema) || (0, _devAssert.default)(0, "Invalid or incomplete introspection result. Ensure that you are passing \"data\" property of introspection response and no \"errors\" was returned alongside: ".concat((0, _inspect.default)(introspection), ".")); // Get the schema from the introspection result. + + var schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each. + + var typeMap = (0, _keyValMap.default)(schemaIntrospection.types, function (typeIntrospection) { + return typeIntrospection.name; + }, function (typeIntrospection) { + return buildType(typeIntrospection); + }); // Include standard types only if they are used. + + for (var _i2 = 0, _ref2 = [].concat(_scalars.specifiedScalarTypes, _introspection.introspectionTypes); _i2 < _ref2.length; _i2++) { + var stdType = _ref2[_i2]; + + if (typeMap[stdType.name]) { + typeMap[stdType.name] = stdType; + } + } // Get the root Query, Mutation, and Subscription types. + + + var queryType = schemaIntrospection.queryType ? getObjectType(schemaIntrospection.queryType) : null; + var mutationType = schemaIntrospection.mutationType ? getObjectType(schemaIntrospection.mutationType) : null; + var subscriptionType = schemaIntrospection.subscriptionType ? getObjectType(schemaIntrospection.subscriptionType) : null; // Get the directives supported by Introspection, assuming empty-set if + // directives were not queried for. + + var directives = schemaIntrospection.directives ? schemaIntrospection.directives.map(buildDirective) : []; // Then produce and return a Schema with these types. + + return new _schema.GraphQLSchema({ + description: schemaIntrospection.description, + query: queryType, + mutation: mutationType, + subscription: subscriptionType, + types: (0, _objectValues.default)(typeMap), + directives: directives, + assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid + }); // Given a type reference in introspection, return the GraphQLType instance. + // preferring cached instances before building new instances. + + function getType(typeRef) { + if (typeRef.kind === _introspection.TypeKind.LIST) { + var itemRef = typeRef.ofType; + + if (!itemRef) { + throw new Error('Decorated type deeper than introspection query.'); + } + + return new _definition.GraphQLList(getType(itemRef)); + } + + if (typeRef.kind === _introspection.TypeKind.NON_NULL) { + var nullableRef = typeRef.ofType; + + if (!nullableRef) { + throw new Error('Decorated type deeper than introspection query.'); + } + + var nullableType = getType(nullableRef); + return new _definition.GraphQLNonNull((0, _definition.assertNullableType)(nullableType)); + } + + return getNamedType(typeRef); + } + + function getNamedType(typeRef) { + var typeName = typeRef.name; + + if (!typeName) { + throw new Error("Unknown type reference: ".concat((0, _inspect.default)(typeRef), ".")); + } + + var type = typeMap[typeName]; + + if (!type) { + throw new Error("Invalid or incomplete schema, unknown type: ".concat(typeName, ". Ensure that a full introspection query is used in order to build a client schema.")); + } + + return type; + } + + function getObjectType(typeRef) { + return (0, _definition.assertObjectType)(getNamedType(typeRef)); + } + + function getInterfaceType(typeRef) { + return (0, _definition.assertInterfaceType)(getNamedType(typeRef)); + } // Given a type's introspection result, construct the correct + // GraphQLType instance. + + + function buildType(type) { + if (type != null && type.name != null && type.kind != null) { + switch (type.kind) { + case _introspection.TypeKind.SCALAR: + return buildScalarDef(type); + + case _introspection.TypeKind.OBJECT: + return buildObjectDef(type); + + case _introspection.TypeKind.INTERFACE: + return buildInterfaceDef(type); + + case _introspection.TypeKind.UNION: + return buildUnionDef(type); + + case _introspection.TypeKind.ENUM: + return buildEnumDef(type); + + case _introspection.TypeKind.INPUT_OBJECT: + return buildInputObjectDef(type); + } + } + + var typeStr = (0, _inspect.default)(type); + throw new Error("Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ".concat(typeStr, ".")); + } + + function buildScalarDef(scalarIntrospection) { + return new _definition.GraphQLScalarType({ + name: scalarIntrospection.name, + description: scalarIntrospection.description, + specifiedByUrl: scalarIntrospection.specifiedByUrl + }); + } + + function buildImplementationsList(implementingIntrospection) { + // TODO: Temporary workaround until GraphQL ecosystem will fully support + // 'interfaces' on interface types. + if (implementingIntrospection.interfaces === null && implementingIntrospection.kind === _introspection.TypeKind.INTERFACE) { + return []; + } + + if (!implementingIntrospection.interfaces) { + var implementingIntrospectionStr = (0, _inspect.default)(implementingIntrospection); + throw new Error("Introspection result missing interfaces: ".concat(implementingIntrospectionStr, ".")); + } + + return implementingIntrospection.interfaces.map(getInterfaceType); + } + + function buildObjectDef(objectIntrospection) { + return new _definition.GraphQLObjectType({ + name: objectIntrospection.name, + description: objectIntrospection.description, + interfaces: function interfaces() { + return buildImplementationsList(objectIntrospection); + }, + fields: function fields() { + return buildFieldDefMap(objectIntrospection); + } + }); + } + + function buildInterfaceDef(interfaceIntrospection) { + return new _definition.GraphQLInterfaceType({ + name: interfaceIntrospection.name, + description: interfaceIntrospection.description, + interfaces: function interfaces() { + return buildImplementationsList(interfaceIntrospection); + }, + fields: function fields() { + return buildFieldDefMap(interfaceIntrospection); + } + }); + } + + function buildUnionDef(unionIntrospection) { + if (!unionIntrospection.possibleTypes) { + var unionIntrospectionStr = (0, _inspect.default)(unionIntrospection); + throw new Error("Introspection result missing possibleTypes: ".concat(unionIntrospectionStr, ".")); + } + + return new _definition.GraphQLUnionType({ + name: unionIntrospection.name, + description: unionIntrospection.description, + types: function types() { + return unionIntrospection.possibleTypes.map(getObjectType); + } + }); + } + + function buildEnumDef(enumIntrospection) { + if (!enumIntrospection.enumValues) { + var enumIntrospectionStr = (0, _inspect.default)(enumIntrospection); + throw new Error("Introspection result missing enumValues: ".concat(enumIntrospectionStr, ".")); + } + + return new _definition.GraphQLEnumType({ + name: enumIntrospection.name, + description: enumIntrospection.description, + values: (0, _keyValMap.default)(enumIntrospection.enumValues, function (valueIntrospection) { + return valueIntrospection.name; + }, function (valueIntrospection) { + return { + description: valueIntrospection.description, + deprecationReason: valueIntrospection.deprecationReason + }; + }) + }); + } + + function buildInputObjectDef(inputObjectIntrospection) { + if (!inputObjectIntrospection.inputFields) { + var inputObjectIntrospectionStr = (0, _inspect.default)(inputObjectIntrospection); + throw new Error("Introspection result missing inputFields: ".concat(inputObjectIntrospectionStr, ".")); + } + + return new _definition.GraphQLInputObjectType({ + name: inputObjectIntrospection.name, + description: inputObjectIntrospection.description, + fields: function fields() { + return buildInputValueDefMap(inputObjectIntrospection.inputFields); + } + }); + } + + function buildFieldDefMap(typeIntrospection) { + if (!typeIntrospection.fields) { + throw new Error("Introspection result missing fields: ".concat((0, _inspect.default)(typeIntrospection), ".")); + } + + return (0, _keyValMap.default)(typeIntrospection.fields, function (fieldIntrospection) { + return fieldIntrospection.name; + }, buildField); + } + + function buildField(fieldIntrospection) { + var type = getType(fieldIntrospection.type); + + if (!(0, _definition.isOutputType)(type)) { + var typeStr = (0, _inspect.default)(type); + throw new Error("Introspection must provide output type for fields, but received: ".concat(typeStr, ".")); + } + + if (!fieldIntrospection.args) { + var fieldIntrospectionStr = (0, _inspect.default)(fieldIntrospection); + throw new Error("Introspection result missing field args: ".concat(fieldIntrospectionStr, ".")); + } + + return { + description: fieldIntrospection.description, + deprecationReason: fieldIntrospection.deprecationReason, + type: type, + args: buildInputValueDefMap(fieldIntrospection.args) + }; + } + + function buildInputValueDefMap(inputValueIntrospections) { + return (0, _keyValMap.default)(inputValueIntrospections, function (inputValue) { + return inputValue.name; + }, buildInputValue); + } + + function buildInputValue(inputValueIntrospection) { + var type = getType(inputValueIntrospection.type); + + if (!(0, _definition.isInputType)(type)) { + var typeStr = (0, _inspect.default)(type); + throw new Error("Introspection must provide input type for arguments, but received: ".concat(typeStr, ".")); + } + + var defaultValue = inputValueIntrospection.defaultValue != null ? (0, _valueFromAST.valueFromAST)((0, _parser.parseValue)(inputValueIntrospection.defaultValue), type) : undefined; + return { + description: inputValueIntrospection.description, + type: type, + defaultValue: defaultValue + }; + } + + function buildDirective(directiveIntrospection) { + if (!directiveIntrospection.args) { + var directiveIntrospectionStr = (0, _inspect.default)(directiveIntrospection); + throw new Error("Introspection result missing directive args: ".concat(directiveIntrospectionStr, ".")); + } + + if (!directiveIntrospection.locations) { + var _directiveIntrospectionStr = (0, _inspect.default)(directiveIntrospection); + + throw new Error("Introspection result missing directive locations: ".concat(_directiveIntrospectionStr, ".")); + } + + return new _directives.GraphQLDirective({ + name: directiveIntrospection.name, + description: directiveIntrospection.description, + isRepeatable: directiveIntrospection.isRepeatable, + locations: directiveIntrospection.locations.slice(), + args: buildInputValueDefMap(directiveIntrospection.args) + }); + } +} + + +/***/ }), + +/***/ 39603: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.coerceInputValue = coerceInputValue; + +var _arrayFrom = _interopRequireDefault(__nccwpck_require__(86839)); + +var _objectValues3 = _interopRequireDefault(__nccwpck_require__(30026)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _didYouMean = _interopRequireDefault(__nccwpck_require__(42878)); + +var _isObjectLike = _interopRequireDefault(__nccwpck_require__(95865)); + +var _isCollection = _interopRequireDefault(__nccwpck_require__(54363)); + +var _suggestionList = _interopRequireDefault(__nccwpck_require__(57704)); + +var _printPathArray = _interopRequireDefault(__nccwpck_require__(94281)); + +var _Path = __nccwpck_require__(11262); + +var _GraphQLError = __nccwpck_require__(4797); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Coerces a JavaScript value given a GraphQL Input Type. + */ +function coerceInputValue(inputValue, type) { + var onError = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultOnError; + return coerceInputValueImpl(inputValue, type, onError); +} + +function defaultOnError(path, invalidValue, error) { + var errorPrefix = 'Invalid value ' + (0, _inspect.default)(invalidValue); + + if (path.length > 0) { + errorPrefix += " at \"value".concat((0, _printPathArray.default)(path), "\""); + } + + error.message = errorPrefix + ': ' + error.message; + throw error; +} + +function coerceInputValueImpl(inputValue, type, onError, path) { + if ((0, _definition.isNonNullType)(type)) { + if (inputValue != null) { + return coerceInputValueImpl(inputValue, type.ofType, onError, path); + } + + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError("Expected non-nullable type \"".concat((0, _inspect.default)(type), "\" not to be null."))); + return; + } + + if (inputValue == null) { + // Explicitly return the value null. + return null; + } + + if ((0, _definition.isListType)(type)) { + var itemType = type.ofType; + + if ((0, _isCollection.default)(inputValue)) { + return (0, _arrayFrom.default)(inputValue, function (itemValue, index) { + var itemPath = (0, _Path.addPath)(path, index, undefined); + return coerceInputValueImpl(itemValue, itemType, onError, itemPath); + }); + } // Lists accept a non-list value as a list of one. + + + return [coerceInputValueImpl(inputValue, itemType, onError, path)]; + } + + if ((0, _definition.isInputObjectType)(type)) { + if (!(0, _isObjectLike.default)(inputValue)) { + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError("Expected type \"".concat(type.name, "\" to be an object."))); + return; + } + + var coercedValue = {}; + var fieldDefs = type.getFields(); + + for (var _i2 = 0, _objectValues2 = (0, _objectValues3.default)(fieldDefs); _i2 < _objectValues2.length; _i2++) { + var field = _objectValues2[_i2]; + var fieldValue = inputValue[field.name]; + + if (fieldValue === undefined) { + if (field.defaultValue !== undefined) { + coercedValue[field.name] = field.defaultValue; + } else if ((0, _definition.isNonNullType)(field.type)) { + var typeStr = (0, _inspect.default)(field.type); + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError("Field \"".concat(field.name, "\" of required type \"").concat(typeStr, "\" was not provided."))); + } + + continue; + } + + coercedValue[field.name] = coerceInputValueImpl(fieldValue, field.type, onError, (0, _Path.addPath)(path, field.name, type.name)); + } // Ensure every provided field is defined. + + + for (var _i4 = 0, _Object$keys2 = Object.keys(inputValue); _i4 < _Object$keys2.length; _i4++) { + var fieldName = _Object$keys2[_i4]; + + if (!fieldDefs[fieldName]) { + var suggestions = (0, _suggestionList.default)(fieldName, Object.keys(type.getFields())); + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError("Field \"".concat(fieldName, "\" is not defined by type \"").concat(type.name, "\".") + (0, _didYouMean.default)(suggestions))); + } + } + + return coercedValue; + } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if ((0, _definition.isLeafType)(type)) { + var parseResult; // Scalars and Enums determine if a input value is valid via parseValue(), + // which can throw to indicate failure. If it throws, maintain a reference + // to the original error. + + try { + parseResult = type.parseValue(inputValue); + } catch (error) { + if (error instanceof _GraphQLError.GraphQLError) { + onError((0, _Path.pathToArray)(path), inputValue, error); + } else { + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError("Expected type \"".concat(type.name, "\". ") + error.message, undefined, undefined, undefined, undefined, error)); + } + + return; + } + + if (parseResult === undefined) { + onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError("Expected type \"".concat(type.name, "\"."))); + } + + return parseResult; + } // istanbul ignore next (Not reachable. All possible input types have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected input type: ' + (0, _inspect.default)(type)); +} + + +/***/ }), + +/***/ 17232: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.concatAST = concatAST; + +/** + * Provided a collection of ASTs, presumably each from different files, + * concatenate the ASTs together into batched AST, useful for validating many + * GraphQL source files which together represent one conceptual application. + */ +function concatAST(documents) { + var definitions = []; + + for (var _i2 = 0; _i2 < documents.length; _i2++) { + var doc = documents[_i2]; + definitions = definitions.concat(doc.definitions); + } + + return { + kind: 'Document', + definitions: definitions + }; +} + + +/***/ }), + +/***/ 51832: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.extendSchema = extendSchema; +exports.extendSchemaImpl = extendSchemaImpl; +exports.getDescription = getDescription; + +var _objectValues = _interopRequireDefault(__nccwpck_require__(30026)); + +var _keyMap = _interopRequireDefault(__nccwpck_require__(10711)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _mapValue = _interopRequireDefault(__nccwpck_require__(32223)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +var _kinds = __nccwpck_require__(11927); + +var _tokenKind = __nccwpck_require__(91565); + +var _blockString = __nccwpck_require__(4515); + +var _predicates = __nccwpck_require__(20535); + +var _validate = __nccwpck_require__(14193); + +var _values = __nccwpck_require__(94834); + +var _schema = __nccwpck_require__(8505); + +var _scalars = __nccwpck_require__(93145); + +var _introspection = __nccwpck_require__(28344); + +var _directives = __nccwpck_require__(83614); + +var _definition = __nccwpck_require__(5821); + +var _valueFromAST = __nccwpck_require__(83181); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/** + * Produces a new schema given an existing schema and a document which may + * contain GraphQL type extensions and definitions. The original schema will + * remain unaltered. + * + * Because a schema represents a graph of references, a schema cannot be + * extended without effectively making an entire copy. We do not know until it's + * too late if subgraphs remain unchanged. + * + * This algorithm copies the provided schema, applying extensions while + * producing the copy. The original schema remains unaltered. + * + * Accepts options as a third argument: + * + * - commentDescriptions: + * Provide true to use preceding comments as the description. + * + */ +function extendSchema(schema, documentAST, options) { + (0, _schema.assertSchema)(schema); + documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.default)(0, 'Must provide valid Document AST.'); + + if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) { + (0, _validate.assertValidSDLExtension)(documentAST, schema); + } + + var schemaConfig = schema.toConfig(); + var extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options); + return schemaConfig === extendedConfig ? schema : new _schema.GraphQLSchema(extendedConfig); +} +/** + * @internal + */ + + +function extendSchemaImpl(schemaConfig, documentAST, options) { + var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid; + + // Collect the type definitions and extensions found in the document. + var typeDefs = []; + var typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can + // have the same name. For example, a type named "skip". + + var directiveDefs = []; + var schemaDef; // Schema extensions are collected which may add additional operation types. + + var schemaExtensions = []; + + for (var _i2 = 0, _documentAST$definiti2 = documentAST.definitions; _i2 < _documentAST$definiti2.length; _i2++) { + var def = _documentAST$definiti2[_i2]; + + if (def.kind === _kinds.Kind.SCHEMA_DEFINITION) { + schemaDef = def; + } else if (def.kind === _kinds.Kind.SCHEMA_EXTENSION) { + schemaExtensions.push(def); + } else if ((0, _predicates.isTypeDefinitionNode)(def)) { + typeDefs.push(def); + } else if ((0, _predicates.isTypeExtensionNode)(def)) { + var extendedTypeName = def.name.value; + var existingTypeExtensions = typeExtensionsMap[extendedTypeName]; + typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def]; + } else if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { + directiveDefs.push(def); + } + } // If this document contains no new types, extensions, or directives then + // return the same unmodified GraphQLSchema instance. + + + if (Object.keys(typeExtensionsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExtensions.length === 0 && schemaDef == null) { + return schemaConfig; + } + + var typeMap = Object.create(null); + + for (var _i4 = 0, _schemaConfig$types2 = schemaConfig.types; _i4 < _schemaConfig$types2.length; _i4++) { + var existingType = _schemaConfig$types2[_i4]; + typeMap[existingType.name] = extendNamedType(existingType); + } + + for (var _i6 = 0; _i6 < typeDefs.length; _i6++) { + var _stdTypeMap$name; + + var typeNode = typeDefs[_i6]; + var name = typeNode.name.value; + typeMap[name] = (_stdTypeMap$name = stdTypeMap[name]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode); + } + + var operationTypes = _objectSpread(_objectSpread({ + // Get the extended root operation types. + query: schemaConfig.query && replaceNamedType(schemaConfig.query), + mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation), + subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription) + }, schemaDef && getOperationTypes([schemaDef])), getOperationTypes(schemaExtensions)); // Then produce and return a Schema config with these types. + + + return _objectSpread(_objectSpread({ + description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value + }, operationTypes), {}, { + types: (0, _objectValues.default)(typeMap), + directives: [].concat(schemaConfig.directives.map(replaceDirective), directiveDefs.map(buildDirective)), + extensions: undefined, + astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode, + extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions), + assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false + }); // Below are functions used for producing this schema that have closed over + // this scope and have access to the schema, cache, and newly defined types. + + function replaceType(type) { + if ((0, _definition.isListType)(type)) { + // $FlowFixMe[incompatible-return] + return new _definition.GraphQLList(replaceType(type.ofType)); + } + + if ((0, _definition.isNonNullType)(type)) { + // $FlowFixMe[incompatible-return] + return new _definition.GraphQLNonNull(replaceType(type.ofType)); + } + + return replaceNamedType(type); + } + + function replaceNamedType(type) { + // Note: While this could make early assertions to get the correctly + // typed values, that would throw immediately while type system + // validation with validateSchema() will produce more actionable results. + return typeMap[type.name]; + } + + function replaceDirective(directive) { + var config = directive.toConfig(); + return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config), {}, { + args: (0, _mapValue.default)(config.args, extendArg) + })); + } + + function extendNamedType(type) { + if ((0, _introspection.isIntrospectionType)(type) || (0, _scalars.isSpecifiedScalarType)(type)) { + // Builtin types are not extended. + return type; + } + + if ((0, _definition.isScalarType)(type)) { + return extendScalarType(type); + } + + if ((0, _definition.isObjectType)(type)) { + return extendObjectType(type); + } + + if ((0, _definition.isInterfaceType)(type)) { + return extendInterfaceType(type); + } + + if ((0, _definition.isUnionType)(type)) { + return extendUnionType(type); + } + + if ((0, _definition.isEnumType)(type)) { + return extendEnumType(type); + } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if ((0, _definition.isInputObjectType)(type)) { + return extendInputObjectType(type); + } // istanbul ignore next (Not reachable. All possible types have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected type: ' + (0, _inspect.default)(type)); + } + + function extendInputObjectType(type) { + var _typeExtensionsMap$co; + + var config = type.toConfig(); + var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : []; + return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({}, config), {}, { + fields: function fields() { + return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config.fields, function (field) { + return _objectSpread(_objectSpread({}, field), {}, { + type: replaceType(field.type) + }); + })), buildInputFieldMap(extensions)); + }, + extensionASTNodes: config.extensionASTNodes.concat(extensions) + })); + } + + function extendEnumType(type) { + var _typeExtensionsMap$ty; + + var config = type.toConfig(); + var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : []; + return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({}, config), {}, { + values: _objectSpread(_objectSpread({}, config.values), buildEnumValueMap(extensions)), + extensionASTNodes: config.extensionASTNodes.concat(extensions) + })); + } + + function extendScalarType(type) { + var _typeExtensionsMap$co2; + + var config = type.toConfig(); + var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : []; + var specifiedByUrl = config.specifiedByUrl; + + for (var _i8 = 0; _i8 < extensions.length; _i8++) { + var _getSpecifiedByUrl; + + var extensionNode = extensions[_i8]; + specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl; + } + + return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({}, config), {}, { + specifiedByUrl: specifiedByUrl, + extensionASTNodes: config.extensionASTNodes.concat(extensions) + })); + } + + function extendObjectType(type) { + var _typeExtensionsMap$co3; + + var config = type.toConfig(); + var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : []; + return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config), {}, { + interfaces: function interfaces() { + return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions)); + }, + fields: function fields() { + return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config.fields, extendField)), buildFieldMap(extensions)); + }, + extensionASTNodes: config.extensionASTNodes.concat(extensions) + })); + } + + function extendInterfaceType(type) { + var _typeExtensionsMap$co4; + + var config = type.toConfig(); + var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : []; + return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({}, config), {}, { + interfaces: function interfaces() { + return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions)); + }, + fields: function fields() { + return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config.fields, extendField)), buildFieldMap(extensions)); + }, + extensionASTNodes: config.extensionASTNodes.concat(extensions) + })); + } + + function extendUnionType(type) { + var _typeExtensionsMap$co5; + + var config = type.toConfig(); + var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : []; + return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config), {}, { + types: function types() { + return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions)); + }, + extensionASTNodes: config.extensionASTNodes.concat(extensions) + })); + } + + function extendField(field) { + return _objectSpread(_objectSpread({}, field), {}, { + type: replaceType(field.type), + // $FlowFixMe[incompatible-call] + args: (0, _mapValue.default)(field.args, extendArg) + }); + } + + function extendArg(arg) { + return _objectSpread(_objectSpread({}, arg), {}, { + type: replaceType(arg.type) + }); + } + + function getOperationTypes(nodes) { + var opTypes = {}; + + for (var _i10 = 0; _i10 < nodes.length; _i10++) { + var _node$operationTypes; + + var node = nodes[_i10]; + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []; + + for (var _i12 = 0; _i12 < operationTypesNodes.length; _i12++) { + var operationType = operationTypesNodes[_i12]; + opTypes[operationType.operation] = getNamedType(operationType.type); + } + } // Note: While this could make early assertions to get the correctly + // typed values below, that would throw immediately while type system + // validation with validateSchema() will produce more actionable results. + + + return opTypes; + } + + function getNamedType(node) { + var _stdTypeMap$name2; + + var name = node.name.value; + var type = (_stdTypeMap$name2 = stdTypeMap[name]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name]; + + if (type === undefined) { + throw new Error("Unknown type: \"".concat(name, "\".")); + } + + return type; + } + + function getWrappedType(node) { + if (node.kind === _kinds.Kind.LIST_TYPE) { + return new _definition.GraphQLList(getWrappedType(node.type)); + } + + if (node.kind === _kinds.Kind.NON_NULL_TYPE) { + return new _definition.GraphQLNonNull(getWrappedType(node.type)); + } + + return getNamedType(node); + } + + function buildDirective(node) { + var locations = node.locations.map(function (_ref) { + var value = _ref.value; + return value; + }); + return new _directives.GraphQLDirective({ + name: node.name.value, + description: getDescription(node, options), + locations: locations, + isRepeatable: node.repeatable, + args: buildArgumentMap(node.arguments), + astNode: node + }); + } + + function buildFieldMap(nodes) { + var fieldConfigMap = Object.create(null); + + for (var _i14 = 0; _i14 < nodes.length; _i14++) { + var _node$fields; + + var node = nodes[_i14]; + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var nodeFields = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []; + + for (var _i16 = 0; _i16 < nodeFields.length; _i16++) { + var field = nodeFields[_i16]; + fieldConfigMap[field.name.value] = { + // Note: While this could make assertions to get the correctly typed + // value, that would throw immediately while type system validation + // with validateSchema() will produce more actionable results. + type: getWrappedType(field.type), + description: getDescription(field, options), + args: buildArgumentMap(field.arguments), + deprecationReason: getDeprecationReason(field), + astNode: field + }; + } + } + + return fieldConfigMap; + } + + function buildArgumentMap(args) { + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var argsNodes = args !== null && args !== void 0 ? args : []; + var argConfigMap = Object.create(null); + + for (var _i18 = 0; _i18 < argsNodes.length; _i18++) { + var arg = argsNodes[_i18]; + // Note: While this could make assertions to get the correctly typed + // value, that would throw immediately while type system validation + // with validateSchema() will produce more actionable results. + var type = getWrappedType(arg.type); + argConfigMap[arg.name.value] = { + type: type, + description: getDescription(arg, options), + defaultValue: (0, _valueFromAST.valueFromAST)(arg.defaultValue, type), + deprecationReason: getDeprecationReason(arg), + astNode: arg + }; + } + + return argConfigMap; + } + + function buildInputFieldMap(nodes) { + var inputFieldMap = Object.create(null); + + for (var _i20 = 0; _i20 < nodes.length; _i20++) { + var _node$fields2; + + var node = nodes[_i20]; + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var fieldsNodes = (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : []; + + for (var _i22 = 0; _i22 < fieldsNodes.length; _i22++) { + var field = fieldsNodes[_i22]; + // Note: While this could make assertions to get the correctly typed + // value, that would throw immediately while type system validation + // with validateSchema() will produce more actionable results. + var type = getWrappedType(field.type); + inputFieldMap[field.name.value] = { + type: type, + description: getDescription(field, options), + defaultValue: (0, _valueFromAST.valueFromAST)(field.defaultValue, type), + deprecationReason: getDeprecationReason(field), + astNode: field + }; + } + } + + return inputFieldMap; + } + + function buildEnumValueMap(nodes) { + var enumValueMap = Object.create(null); + + for (var _i24 = 0; _i24 < nodes.length; _i24++) { + var _node$values; + + var node = nodes[_i24]; + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var valuesNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []; + + for (var _i26 = 0; _i26 < valuesNodes.length; _i26++) { + var value = valuesNodes[_i26]; + enumValueMap[value.name.value] = { + description: getDescription(value, options), + deprecationReason: getDeprecationReason(value), + astNode: value + }; + } + } + + return enumValueMap; + } + + function buildInterfaces(nodes) { + var interfaces = []; + + for (var _i28 = 0; _i28 < nodes.length; _i28++) { + var _node$interfaces; + + var node = nodes[_i28]; + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var interfacesNodes = (_node$interfaces = node.interfaces) !== null && _node$interfaces !== void 0 ? _node$interfaces : []; + + for (var _i30 = 0; _i30 < interfacesNodes.length; _i30++) { + var type = interfacesNodes[_i30]; + // Note: While this could make assertions to get the correctly typed + // values below, that would throw immediately while type system + // validation with validateSchema() will produce more actionable + // results. + interfaces.push(getNamedType(type)); + } + } + + return interfaces; + } + + function buildUnionTypes(nodes) { + var types = []; + + for (var _i32 = 0; _i32 < nodes.length; _i32++) { + var _node$types; + + var node = nodes[_i32]; + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var typeNodes = (_node$types = node.types) !== null && _node$types !== void 0 ? _node$types : []; + + for (var _i34 = 0; _i34 < typeNodes.length; _i34++) { + var type = typeNodes[_i34]; + // Note: While this could make assertions to get the correctly typed + // values below, that would throw immediately while type system + // validation with validateSchema() will produce more actionable + // results. + types.push(getNamedType(type)); + } + } + + return types; + } + + function buildType(astNode) { + var _typeExtensionsMap$na; + + var name = astNode.name.value; + var description = getDescription(astNode, options); + var extensionNodes = (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : []; + + switch (astNode.kind) { + case _kinds.Kind.OBJECT_TYPE_DEFINITION: + { + var extensionASTNodes = extensionNodes; + var allNodes = [astNode].concat(extensionASTNodes); + return new _definition.GraphQLObjectType({ + name: name, + description: description, + interfaces: function interfaces() { + return buildInterfaces(allNodes); + }, + fields: function fields() { + return buildFieldMap(allNodes); + }, + astNode: astNode, + extensionASTNodes: extensionASTNodes + }); + } + + case _kinds.Kind.INTERFACE_TYPE_DEFINITION: + { + var _extensionASTNodes = extensionNodes; + + var _allNodes = [astNode].concat(_extensionASTNodes); + + return new _definition.GraphQLInterfaceType({ + name: name, + description: description, + interfaces: function interfaces() { + return buildInterfaces(_allNodes); + }, + fields: function fields() { + return buildFieldMap(_allNodes); + }, + astNode: astNode, + extensionASTNodes: _extensionASTNodes + }); + } + + case _kinds.Kind.ENUM_TYPE_DEFINITION: + { + var _extensionASTNodes2 = extensionNodes; + + var _allNodes2 = [astNode].concat(_extensionASTNodes2); + + return new _definition.GraphQLEnumType({ + name: name, + description: description, + values: buildEnumValueMap(_allNodes2), + astNode: astNode, + extensionASTNodes: _extensionASTNodes2 + }); + } + + case _kinds.Kind.UNION_TYPE_DEFINITION: + { + var _extensionASTNodes3 = extensionNodes; + + var _allNodes3 = [astNode].concat(_extensionASTNodes3); + + return new _definition.GraphQLUnionType({ + name: name, + description: description, + types: function types() { + return buildUnionTypes(_allNodes3); + }, + astNode: astNode, + extensionASTNodes: _extensionASTNodes3 + }); + } + + case _kinds.Kind.SCALAR_TYPE_DEFINITION: + { + var _extensionASTNodes4 = extensionNodes; + return new _definition.GraphQLScalarType({ + name: name, + description: description, + specifiedByUrl: getSpecifiedByUrl(astNode), + astNode: astNode, + extensionASTNodes: _extensionASTNodes4 + }); + } + + case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION: + { + var _extensionASTNodes5 = extensionNodes; + + var _allNodes4 = [astNode].concat(_extensionASTNodes5); + + return new _definition.GraphQLInputObjectType({ + name: name, + description: description, + fields: function fields() { + return buildInputFieldMap(_allNodes4); + }, + astNode: astNode, + extensionASTNodes: _extensionASTNodes5 + }); + } + } // istanbul ignore next (Not reachable. All possible type definition nodes have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected type definition node: ' + (0, _inspect.default)(astNode)); + } +} + +var stdTypeMap = (0, _keyMap.default)(_scalars.specifiedScalarTypes.concat(_introspection.introspectionTypes), function (type) { + return type.name; +}); +/** + * Given a field or enum value node, returns the string value for the + * deprecation reason. + */ + +function getDeprecationReason(node) { + var deprecated = (0, _values.getDirectiveValues)(_directives.GraphQLDeprecatedDirective, node); + return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason; +} +/** + * Given a scalar node, returns the string value for the specifiedByUrl. + */ + + +function getSpecifiedByUrl(node) { + var specifiedBy = (0, _values.getDirectiveValues)(_directives.GraphQLSpecifiedByDirective, node); + return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url; +} +/** + * Given an ast node, returns its string description. + * @deprecated: provided to ease adoption and will be removed in v16. + * + * Accepts options as a second argument: + * + * - commentDescriptions: + * Provide true to use preceding comments as the description. + * + */ + + +function getDescription(node, options) { + if (node.description) { + return node.description.value; + } + + if ((options === null || options === void 0 ? void 0 : options.commentDescriptions) === true) { + var rawValue = getLeadingCommentBlock(node); + + if (rawValue !== undefined) { + return (0, _blockString.dedentBlockStringValue)('\n' + rawValue); + } + } +} + +function getLeadingCommentBlock(node) { + var loc = node.loc; + + if (!loc) { + return; + } + + var comments = []; + var token = loc.startToken.prev; + + while (token != null && token.kind === _tokenKind.TokenKind.COMMENT && token.next && token.prev && token.line + 1 === token.next.line && token.line !== token.prev.line) { + var value = String(token.value); + comments.push(value); + token = token.prev; + } + + return comments.length > 0 ? comments.reverse().join('\n') : undefined; +} + + +/***/ }), + +/***/ 59366: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.findBreakingChanges = findBreakingChanges; +exports.findDangerousChanges = findDangerousChanges; +exports.DangerousChangeType = exports.BreakingChangeType = void 0; + +var _objectValues = _interopRequireDefault(__nccwpck_require__(30026)); + +var _keyMap = _interopRequireDefault(__nccwpck_require__(10711)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _printer = __nccwpck_require__(68203); + +var _visitor = __nccwpck_require__(5678); + +var _scalars = __nccwpck_require__(93145); + +var _definition = __nccwpck_require__(5821); + +var _astFromValue = __nccwpck_require__(12653); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var BreakingChangeType = Object.freeze({ + TYPE_REMOVED: 'TYPE_REMOVED', + TYPE_CHANGED_KIND: 'TYPE_CHANGED_KIND', + TYPE_REMOVED_FROM_UNION: 'TYPE_REMOVED_FROM_UNION', + VALUE_REMOVED_FROM_ENUM: 'VALUE_REMOVED_FROM_ENUM', + REQUIRED_INPUT_FIELD_ADDED: 'REQUIRED_INPUT_FIELD_ADDED', + IMPLEMENTED_INTERFACE_REMOVED: 'IMPLEMENTED_INTERFACE_REMOVED', + FIELD_REMOVED: 'FIELD_REMOVED', + FIELD_CHANGED_KIND: 'FIELD_CHANGED_KIND', + REQUIRED_ARG_ADDED: 'REQUIRED_ARG_ADDED', + ARG_REMOVED: 'ARG_REMOVED', + ARG_CHANGED_KIND: 'ARG_CHANGED_KIND', + DIRECTIVE_REMOVED: 'DIRECTIVE_REMOVED', + DIRECTIVE_ARG_REMOVED: 'DIRECTIVE_ARG_REMOVED', + REQUIRED_DIRECTIVE_ARG_ADDED: 'REQUIRED_DIRECTIVE_ARG_ADDED', + DIRECTIVE_REPEATABLE_REMOVED: 'DIRECTIVE_REPEATABLE_REMOVED', + DIRECTIVE_LOCATION_REMOVED: 'DIRECTIVE_LOCATION_REMOVED' +}); +exports.BreakingChangeType = BreakingChangeType; +var DangerousChangeType = Object.freeze({ + VALUE_ADDED_TO_ENUM: 'VALUE_ADDED_TO_ENUM', + TYPE_ADDED_TO_UNION: 'TYPE_ADDED_TO_UNION', + OPTIONAL_INPUT_FIELD_ADDED: 'OPTIONAL_INPUT_FIELD_ADDED', + OPTIONAL_ARG_ADDED: 'OPTIONAL_ARG_ADDED', + IMPLEMENTED_INTERFACE_ADDED: 'IMPLEMENTED_INTERFACE_ADDED', + ARG_DEFAULT_VALUE_CHANGE: 'ARG_DEFAULT_VALUE_CHANGE' +}); +exports.DangerousChangeType = DangerousChangeType; + +/** + * Given two schemas, returns an Array containing descriptions of all the types + * of breaking changes covered by the other functions down below. + */ +function findBreakingChanges(oldSchema, newSchema) { + var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) { + return change.type in BreakingChangeType; + }); + return breakingChanges; +} +/** + * Given two schemas, returns an Array containing descriptions of all the types + * of potentially dangerous changes covered by the other functions down below. + */ + + +function findDangerousChanges(oldSchema, newSchema) { + var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) { + return change.type in DangerousChangeType; + }); + return dangerousChanges; +} + +function findSchemaChanges(oldSchema, newSchema) { + return [].concat(findTypeChanges(oldSchema, newSchema), findDirectiveChanges(oldSchema, newSchema)); +} + +function findDirectiveChanges(oldSchema, newSchema) { + var schemaChanges = []; + var directivesDiff = diff(oldSchema.getDirectives(), newSchema.getDirectives()); + + for (var _i2 = 0, _directivesDiff$remov2 = directivesDiff.removed; _i2 < _directivesDiff$remov2.length; _i2++) { + var oldDirective = _directivesDiff$remov2[_i2]; + schemaChanges.push({ + type: BreakingChangeType.DIRECTIVE_REMOVED, + description: "".concat(oldDirective.name, " was removed.") + }); + } + + for (var _i4 = 0, _directivesDiff$persi2 = directivesDiff.persisted; _i4 < _directivesDiff$persi2.length; _i4++) { + var _ref2 = _directivesDiff$persi2[_i4]; + var _oldDirective = _ref2[0]; + var newDirective = _ref2[1]; + var argsDiff = diff(_oldDirective.args, newDirective.args); + + for (var _i6 = 0, _argsDiff$added2 = argsDiff.added; _i6 < _argsDiff$added2.length; _i6++) { + var newArg = _argsDiff$added2[_i6]; + + if ((0, _definition.isRequiredArgument)(newArg)) { + schemaChanges.push({ + type: BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED, + description: "A required arg ".concat(newArg.name, " on directive ").concat(_oldDirective.name, " was added.") + }); + } + } + + for (var _i8 = 0, _argsDiff$removed2 = argsDiff.removed; _i8 < _argsDiff$removed2.length; _i8++) { + var oldArg = _argsDiff$removed2[_i8]; + schemaChanges.push({ + type: BreakingChangeType.DIRECTIVE_ARG_REMOVED, + description: "".concat(oldArg.name, " was removed from ").concat(_oldDirective.name, ".") + }); + } + + if (_oldDirective.isRepeatable && !newDirective.isRepeatable) { + schemaChanges.push({ + type: BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED, + description: "Repeatable flag was removed from ".concat(_oldDirective.name, ".") + }); + } + + for (var _i10 = 0, _oldDirective$locatio2 = _oldDirective.locations; _i10 < _oldDirective$locatio2.length; _i10++) { + var location = _oldDirective$locatio2[_i10]; + + if (newDirective.locations.indexOf(location) === -1) { + schemaChanges.push({ + type: BreakingChangeType.DIRECTIVE_LOCATION_REMOVED, + description: "".concat(location, " was removed from ").concat(_oldDirective.name, ".") + }); + } + } + } + + return schemaChanges; +} + +function findTypeChanges(oldSchema, newSchema) { + var schemaChanges = []; + var typesDiff = diff((0, _objectValues.default)(oldSchema.getTypeMap()), (0, _objectValues.default)(newSchema.getTypeMap())); + + for (var _i12 = 0, _typesDiff$removed2 = typesDiff.removed; _i12 < _typesDiff$removed2.length; _i12++) { + var oldType = _typesDiff$removed2[_i12]; + schemaChanges.push({ + type: BreakingChangeType.TYPE_REMOVED, + description: (0, _scalars.isSpecifiedScalarType)(oldType) ? "Standard scalar ".concat(oldType.name, " was removed because it is not referenced anymore.") : "".concat(oldType.name, " was removed.") + }); + } + + for (var _i14 = 0, _typesDiff$persisted2 = typesDiff.persisted; _i14 < _typesDiff$persisted2.length; _i14++) { + var _ref4 = _typesDiff$persisted2[_i14]; + var _oldType = _ref4[0]; + var newType = _ref4[1]; + + if ((0, _definition.isEnumType)(_oldType) && (0, _definition.isEnumType)(newType)) { + schemaChanges.push.apply(schemaChanges, findEnumTypeChanges(_oldType, newType)); + } else if ((0, _definition.isUnionType)(_oldType) && (0, _definition.isUnionType)(newType)) { + schemaChanges.push.apply(schemaChanges, findUnionTypeChanges(_oldType, newType)); + } else if ((0, _definition.isInputObjectType)(_oldType) && (0, _definition.isInputObjectType)(newType)) { + schemaChanges.push.apply(schemaChanges, findInputObjectTypeChanges(_oldType, newType)); + } else if ((0, _definition.isObjectType)(_oldType) && (0, _definition.isObjectType)(newType)) { + schemaChanges.push.apply(schemaChanges, findFieldChanges(_oldType, newType).concat(findImplementedInterfacesChanges(_oldType, newType))); + } else if ((0, _definition.isInterfaceType)(_oldType) && (0, _definition.isInterfaceType)(newType)) { + schemaChanges.push.apply(schemaChanges, findFieldChanges(_oldType, newType).concat(findImplementedInterfacesChanges(_oldType, newType))); + } else if (_oldType.constructor !== newType.constructor) { + schemaChanges.push({ + type: BreakingChangeType.TYPE_CHANGED_KIND, + description: "".concat(_oldType.name, " changed from ") + "".concat(typeKindName(_oldType), " to ").concat(typeKindName(newType), ".") + }); + } + } + + return schemaChanges; +} + +function findInputObjectTypeChanges(oldType, newType) { + var schemaChanges = []; + var fieldsDiff = diff((0, _objectValues.default)(oldType.getFields()), (0, _objectValues.default)(newType.getFields())); + + for (var _i16 = 0, _fieldsDiff$added2 = fieldsDiff.added; _i16 < _fieldsDiff$added2.length; _i16++) { + var newField = _fieldsDiff$added2[_i16]; + + if ((0, _definition.isRequiredInputField)(newField)) { + schemaChanges.push({ + type: BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED, + description: "A required field ".concat(newField.name, " on input type ").concat(oldType.name, " was added.") + }); + } else { + schemaChanges.push({ + type: DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED, + description: "An optional field ".concat(newField.name, " on input type ").concat(oldType.name, " was added.") + }); + } + } + + for (var _i18 = 0, _fieldsDiff$removed2 = fieldsDiff.removed; _i18 < _fieldsDiff$removed2.length; _i18++) { + var oldField = _fieldsDiff$removed2[_i18]; + schemaChanges.push({ + type: BreakingChangeType.FIELD_REMOVED, + description: "".concat(oldType.name, ".").concat(oldField.name, " was removed.") + }); + } + + for (var _i20 = 0, _fieldsDiff$persisted2 = fieldsDiff.persisted; _i20 < _fieldsDiff$persisted2.length; _i20++) { + var _ref6 = _fieldsDiff$persisted2[_i20]; + var _oldField = _ref6[0]; + var _newField = _ref6[1]; + var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(_oldField.type, _newField.type); + + if (!isSafe) { + schemaChanges.push({ + type: BreakingChangeType.FIELD_CHANGED_KIND, + description: "".concat(oldType.name, ".").concat(_oldField.name, " changed type from ") + "".concat(String(_oldField.type), " to ").concat(String(_newField.type), ".") + }); + } + } + + return schemaChanges; +} + +function findUnionTypeChanges(oldType, newType) { + var schemaChanges = []; + var possibleTypesDiff = diff(oldType.getTypes(), newType.getTypes()); + + for (var _i22 = 0, _possibleTypesDiff$ad2 = possibleTypesDiff.added; _i22 < _possibleTypesDiff$ad2.length; _i22++) { + var newPossibleType = _possibleTypesDiff$ad2[_i22]; + schemaChanges.push({ + type: DangerousChangeType.TYPE_ADDED_TO_UNION, + description: "".concat(newPossibleType.name, " was added to union type ").concat(oldType.name, ".") + }); + } + + for (var _i24 = 0, _possibleTypesDiff$re2 = possibleTypesDiff.removed; _i24 < _possibleTypesDiff$re2.length; _i24++) { + var oldPossibleType = _possibleTypesDiff$re2[_i24]; + schemaChanges.push({ + type: BreakingChangeType.TYPE_REMOVED_FROM_UNION, + description: "".concat(oldPossibleType.name, " was removed from union type ").concat(oldType.name, ".") + }); + } + + return schemaChanges; +} + +function findEnumTypeChanges(oldType, newType) { + var schemaChanges = []; + var valuesDiff = diff(oldType.getValues(), newType.getValues()); + + for (var _i26 = 0, _valuesDiff$added2 = valuesDiff.added; _i26 < _valuesDiff$added2.length; _i26++) { + var newValue = _valuesDiff$added2[_i26]; + schemaChanges.push({ + type: DangerousChangeType.VALUE_ADDED_TO_ENUM, + description: "".concat(newValue.name, " was added to enum type ").concat(oldType.name, ".") + }); + } + + for (var _i28 = 0, _valuesDiff$removed2 = valuesDiff.removed; _i28 < _valuesDiff$removed2.length; _i28++) { + var oldValue = _valuesDiff$removed2[_i28]; + schemaChanges.push({ + type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM, + description: "".concat(oldValue.name, " was removed from enum type ").concat(oldType.name, ".") + }); + } + + return schemaChanges; +} + +function findImplementedInterfacesChanges(oldType, newType) { + var schemaChanges = []; + var interfacesDiff = diff(oldType.getInterfaces(), newType.getInterfaces()); + + for (var _i30 = 0, _interfacesDiff$added2 = interfacesDiff.added; _i30 < _interfacesDiff$added2.length; _i30++) { + var newInterface = _interfacesDiff$added2[_i30]; + schemaChanges.push({ + type: DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED, + description: "".concat(newInterface.name, " added to interfaces implemented by ").concat(oldType.name, ".") + }); + } + + for (var _i32 = 0, _interfacesDiff$remov2 = interfacesDiff.removed; _i32 < _interfacesDiff$remov2.length; _i32++) { + var oldInterface = _interfacesDiff$remov2[_i32]; + schemaChanges.push({ + type: BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED, + description: "".concat(oldType.name, " no longer implements interface ").concat(oldInterface.name, ".") + }); + } + + return schemaChanges; +} + +function findFieldChanges(oldType, newType) { + var schemaChanges = []; + var fieldsDiff = diff((0, _objectValues.default)(oldType.getFields()), (0, _objectValues.default)(newType.getFields())); + + for (var _i34 = 0, _fieldsDiff$removed4 = fieldsDiff.removed; _i34 < _fieldsDiff$removed4.length; _i34++) { + var oldField = _fieldsDiff$removed4[_i34]; + schemaChanges.push({ + type: BreakingChangeType.FIELD_REMOVED, + description: "".concat(oldType.name, ".").concat(oldField.name, " was removed.") + }); + } + + for (var _i36 = 0, _fieldsDiff$persisted4 = fieldsDiff.persisted; _i36 < _fieldsDiff$persisted4.length; _i36++) { + var _ref8 = _fieldsDiff$persisted4[_i36]; + var _oldField2 = _ref8[0]; + var newField = _ref8[1]; + schemaChanges.push.apply(schemaChanges, findArgChanges(oldType, _oldField2, newField)); + var isSafe = isChangeSafeForObjectOrInterfaceField(_oldField2.type, newField.type); + + if (!isSafe) { + schemaChanges.push({ + type: BreakingChangeType.FIELD_CHANGED_KIND, + description: "".concat(oldType.name, ".").concat(_oldField2.name, " changed type from ") + "".concat(String(_oldField2.type), " to ").concat(String(newField.type), ".") + }); + } + } + + return schemaChanges; +} + +function findArgChanges(oldType, oldField, newField) { + var schemaChanges = []; + var argsDiff = diff(oldField.args, newField.args); + + for (var _i38 = 0, _argsDiff$removed4 = argsDiff.removed; _i38 < _argsDiff$removed4.length; _i38++) { + var oldArg = _argsDiff$removed4[_i38]; + schemaChanges.push({ + type: BreakingChangeType.ARG_REMOVED, + description: "".concat(oldType.name, ".").concat(oldField.name, " arg ").concat(oldArg.name, " was removed.") + }); + } + + for (var _i40 = 0, _argsDiff$persisted2 = argsDiff.persisted; _i40 < _argsDiff$persisted2.length; _i40++) { + var _ref10 = _argsDiff$persisted2[_i40]; + var _oldArg = _ref10[0]; + var newArg = _ref10[1]; + var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(_oldArg.type, newArg.type); + + if (!isSafe) { + schemaChanges.push({ + type: BreakingChangeType.ARG_CHANGED_KIND, + description: "".concat(oldType.name, ".").concat(oldField.name, " arg ").concat(_oldArg.name, " has changed type from ") + "".concat(String(_oldArg.type), " to ").concat(String(newArg.type), ".") + }); + } else if (_oldArg.defaultValue !== undefined) { + if (newArg.defaultValue === undefined) { + schemaChanges.push({ + type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE, + description: "".concat(oldType.name, ".").concat(oldField.name, " arg ").concat(_oldArg.name, " defaultValue was removed.") + }); + } else { + // Since we looking only for client's observable changes we should + // compare default values in the same representation as they are + // represented inside introspection. + var oldValueStr = stringifyValue(_oldArg.defaultValue, _oldArg.type); + var newValueStr = stringifyValue(newArg.defaultValue, newArg.type); + + if (oldValueStr !== newValueStr) { + schemaChanges.push({ + type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE, + description: "".concat(oldType.name, ".").concat(oldField.name, " arg ").concat(_oldArg.name, " has changed defaultValue from ").concat(oldValueStr, " to ").concat(newValueStr, ".") + }); + } + } + } + } + + for (var _i42 = 0, _argsDiff$added4 = argsDiff.added; _i42 < _argsDiff$added4.length; _i42++) { + var _newArg = _argsDiff$added4[_i42]; + + if ((0, _definition.isRequiredArgument)(_newArg)) { + schemaChanges.push({ + type: BreakingChangeType.REQUIRED_ARG_ADDED, + description: "A required arg ".concat(_newArg.name, " on ").concat(oldType.name, ".").concat(oldField.name, " was added.") + }); + } else { + schemaChanges.push({ + type: DangerousChangeType.OPTIONAL_ARG_ADDED, + description: "An optional arg ".concat(_newArg.name, " on ").concat(oldType.name, ".").concat(oldField.name, " was added.") + }); + } + } + + return schemaChanges; +} + +function isChangeSafeForObjectOrInterfaceField(oldType, newType) { + if ((0, _definition.isListType)(oldType)) { + return (// if they're both lists, make sure the underlying types are compatible + (0, _definition.isListType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType) || // moving from nullable to non-null of the same underlying type is safe + (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType) + ); + } + + if ((0, _definition.isNonNullType)(oldType)) { + // if they're both non-null, make sure the underlying types are compatible + return (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType); + } + + return (// if they're both named types, see if their names are equivalent + (0, _definition.isNamedType)(newType) && oldType.name === newType.name || // moving from nullable to non-null of the same underlying type is safe + (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType) + ); +} + +function isChangeSafeForInputObjectFieldOrFieldArg(oldType, newType) { + if ((0, _definition.isListType)(oldType)) { + // if they're both lists, make sure the underlying types are compatible + return (0, _definition.isListType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType); + } + + if ((0, _definition.isNonNullType)(oldType)) { + return (// if they're both non-null, make sure the underlying types are + // compatible + (0, _definition.isNonNullType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType) || // moving from non-null to nullable of the same underlying type is safe + !(0, _definition.isNonNullType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType) + ); + } // if they're both named types, see if their names are equivalent + + + return (0, _definition.isNamedType)(newType) && oldType.name === newType.name; +} + +function typeKindName(type) { + if ((0, _definition.isScalarType)(type)) { + return 'a Scalar type'; + } + + if ((0, _definition.isObjectType)(type)) { + return 'an Object type'; + } + + if ((0, _definition.isInterfaceType)(type)) { + return 'an Interface type'; + } + + if ((0, _definition.isUnionType)(type)) { + return 'a Union type'; + } + + if ((0, _definition.isEnumType)(type)) { + return 'an Enum type'; + } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if ((0, _definition.isInputObjectType)(type)) { + return 'an Input type'; + } // istanbul ignore next (Not reachable. All possible named types have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected type: ' + (0, _inspect.default)(type)); +} + +function stringifyValue(value, type) { + var ast = (0, _astFromValue.astFromValue)(value, type); + ast != null || (0, _invariant.default)(0); + var sortedAST = (0, _visitor.visit)(ast, { + ObjectValue: function ObjectValue(objectNode) { + var fields = [].concat(objectNode.fields).sort(function (fieldA, fieldB) { + return fieldA.name.value.localeCompare(fieldB.name.value); + }); + return _objectSpread(_objectSpread({}, objectNode), {}, { + fields: fields + }); + } + }); + return (0, _printer.print)(sortedAST); +} + +function diff(oldArray, newArray) { + var added = []; + var removed = []; + var persisted = []; + var oldMap = (0, _keyMap.default)(oldArray, function (_ref11) { + var name = _ref11.name; + return name; + }); + var newMap = (0, _keyMap.default)(newArray, function (_ref12) { + var name = _ref12.name; + return name; + }); + + for (var _i44 = 0; _i44 < oldArray.length; _i44++) { + var oldItem = oldArray[_i44]; + var newItem = newMap[oldItem.name]; + + if (newItem === undefined) { + removed.push(oldItem); + } else { + persisted.push([oldItem, newItem]); + } + } + + for (var _i46 = 0; _i46 < newArray.length; _i46++) { + var _newItem = newArray[_i46]; + + if (oldMap[_newItem.name] === undefined) { + added.push(_newItem); + } + } + + return { + added: added, + persisted: persisted, + removed: removed + }; +} + + +/***/ }), + +/***/ 26461: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.findDeprecatedUsages = findDeprecatedUsages; + +var _validate = __nccwpck_require__(14193); + +var _NoDeprecatedCustomRule = __nccwpck_require__(33915); + +/** + * A validation rule which reports deprecated usages. + * + * Returns a list of GraphQLError instances describing each deprecated use. + * + * @deprecated Please use `validate` with `NoDeprecatedCustomRule` instead: + * + * ``` + * import { validate, NoDeprecatedCustomRule } from 'graphql' + * + * const errors = validate(schema, document, [NoDeprecatedCustomRule]) + * ``` + */ +function findDeprecatedUsages(schema, ast) { + return (0, _validate.validate)(schema, ast, [_NoDeprecatedCustomRule.NoDeprecatedCustomRule]); +} + + +/***/ }), + +/***/ 747: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getIntrospectionQuery = getIntrospectionQuery; + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function getIntrospectionQuery(options) { + var optionsWithDefault = _objectSpread({ + descriptions: true, + specifiedByUrl: false, + directiveIsRepeatable: false, + schemaDescription: false + }, options); + + var descriptions = optionsWithDefault.descriptions ? 'description' : ''; + var specifiedByUrl = optionsWithDefault.specifiedByUrl ? 'specifiedByUrl' : ''; + var directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable ? 'isRepeatable' : ''; + var schemaDescription = optionsWithDefault.schemaDescription ? descriptions : ''; + return "\n query IntrospectionQuery {\n __schema {\n ".concat(schemaDescription, "\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ").concat(descriptions, "\n ").concat(directiveIsRepeatable, "\n locations\n args {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ").concat(descriptions, "\n ").concat(specifiedByUrl, "\n fields(includeDeprecated: true) {\n name\n ").concat(descriptions, "\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ").concat(descriptions, "\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ").concat(descriptions, "\n type { ...TypeRef }\n defaultValue\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n "); +} + + +/***/ }), + +/***/ 92854: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getOperationAST = getOperationAST; + +var _kinds = __nccwpck_require__(11927); + +/** + * Returns an operation AST given a document AST and optionally an operation + * name. If a name is not provided, an operation is only returned if only one is + * provided in the document. + */ +function getOperationAST(documentAST, operationName) { + var operation = null; + + for (var _i2 = 0, _documentAST$definiti2 = documentAST.definitions; _i2 < _documentAST$definiti2.length; _i2++) { + var definition = _documentAST$definiti2[_i2]; + + if (definition.kind === _kinds.Kind.OPERATION_DEFINITION) { + var _definition$name; + + if (operationName == null) { + // If no operation name was provided, only return an Operation if there + // is one defined in the document. Upon encountering the second, return + // null. + if (operation) { + return null; + } + + operation = definition; + } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) { + return definition; + } + } + } + + return operation; +} + + +/***/ }), + +/***/ 81605: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getOperationRootType = getOperationRootType; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Extracts the root type of the operation from the schema. + */ +function getOperationRootType(schema, operation) { + if (operation.operation === 'query') { + var queryType = schema.getQueryType(); + + if (!queryType) { + throw new _GraphQLError.GraphQLError('Schema does not define the required query root type.', operation); + } + + return queryType; + } + + if (operation.operation === 'mutation') { + var mutationType = schema.getMutationType(); + + if (!mutationType) { + throw new _GraphQLError.GraphQLError('Schema is not configured for mutations.', operation); + } + + return mutationType; + } + + if (operation.operation === 'subscription') { + var subscriptionType = schema.getSubscriptionType(); + + if (!subscriptionType) { + throw new _GraphQLError.GraphQLError('Schema is not configured for subscriptions.', operation); + } + + return subscriptionType; + } + + throw new _GraphQLError.GraphQLError('Can only have query, mutation and subscription operations.', operation); +} + + +/***/ }), + +/***/ 676: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "getIntrospectionQuery", ({ + enumerable: true, + get: function get() { + return _getIntrospectionQuery.getIntrospectionQuery; + } +})); +Object.defineProperty(exports, "getOperationAST", ({ + enumerable: true, + get: function get() { + return _getOperationAST.getOperationAST; + } +})); +Object.defineProperty(exports, "getOperationRootType", ({ + enumerable: true, + get: function get() { + return _getOperationRootType.getOperationRootType; + } +})); +Object.defineProperty(exports, "introspectionFromSchema", ({ + enumerable: true, + get: function get() { + return _introspectionFromSchema.introspectionFromSchema; + } +})); +Object.defineProperty(exports, "buildClientSchema", ({ + enumerable: true, + get: function get() { + return _buildClientSchema.buildClientSchema; + } +})); +Object.defineProperty(exports, "buildASTSchema", ({ + enumerable: true, + get: function get() { + return _buildASTSchema.buildASTSchema; + } +})); +Object.defineProperty(exports, "buildSchema", ({ + enumerable: true, + get: function get() { + return _buildASTSchema.buildSchema; + } +})); +Object.defineProperty(exports, "extendSchema", ({ + enumerable: true, + get: function get() { + return _extendSchema.extendSchema; + } +})); +Object.defineProperty(exports, "getDescription", ({ + enumerable: true, + get: function get() { + return _extendSchema.getDescription; + } +})); +Object.defineProperty(exports, "lexicographicSortSchema", ({ + enumerable: true, + get: function get() { + return _lexicographicSortSchema.lexicographicSortSchema; + } +})); +Object.defineProperty(exports, "printSchema", ({ + enumerable: true, + get: function get() { + return _printSchema.printSchema; + } +})); +Object.defineProperty(exports, "printType", ({ + enumerable: true, + get: function get() { + return _printSchema.printType; + } +})); +Object.defineProperty(exports, "printIntrospectionSchema", ({ + enumerable: true, + get: function get() { + return _printSchema.printIntrospectionSchema; + } +})); +Object.defineProperty(exports, "typeFromAST", ({ + enumerable: true, + get: function get() { + return _typeFromAST.typeFromAST; + } +})); +Object.defineProperty(exports, "valueFromAST", ({ + enumerable: true, + get: function get() { + return _valueFromAST.valueFromAST; + } +})); +Object.defineProperty(exports, "valueFromASTUntyped", ({ + enumerable: true, + get: function get() { + return _valueFromASTUntyped.valueFromASTUntyped; + } +})); +Object.defineProperty(exports, "astFromValue", ({ + enumerable: true, + get: function get() { + return _astFromValue.astFromValue; + } +})); +Object.defineProperty(exports, "TypeInfo", ({ + enumerable: true, + get: function get() { + return _TypeInfo.TypeInfo; + } +})); +Object.defineProperty(exports, "visitWithTypeInfo", ({ + enumerable: true, + get: function get() { + return _TypeInfo.visitWithTypeInfo; + } +})); +Object.defineProperty(exports, "coerceInputValue", ({ + enumerable: true, + get: function get() { + return _coerceInputValue.coerceInputValue; + } +})); +Object.defineProperty(exports, "concatAST", ({ + enumerable: true, + get: function get() { + return _concatAST.concatAST; + } +})); +Object.defineProperty(exports, "separateOperations", ({ + enumerable: true, + get: function get() { + return _separateOperations.separateOperations; + } +})); +Object.defineProperty(exports, "stripIgnoredCharacters", ({ + enumerable: true, + get: function get() { + return _stripIgnoredCharacters.stripIgnoredCharacters; + } +})); +Object.defineProperty(exports, "isEqualType", ({ + enumerable: true, + get: function get() { + return _typeComparators.isEqualType; + } +})); +Object.defineProperty(exports, "isTypeSubTypeOf", ({ + enumerable: true, + get: function get() { + return _typeComparators.isTypeSubTypeOf; + } +})); +Object.defineProperty(exports, "doTypesOverlap", ({ + enumerable: true, + get: function get() { + return _typeComparators.doTypesOverlap; + } +})); +Object.defineProperty(exports, "assertValidName", ({ + enumerable: true, + get: function get() { + return _assertValidName.assertValidName; + } +})); +Object.defineProperty(exports, "isValidNameError", ({ + enumerable: true, + get: function get() { + return _assertValidName.isValidNameError; + } +})); +Object.defineProperty(exports, "BreakingChangeType", ({ + enumerable: true, + get: function get() { + return _findBreakingChanges.BreakingChangeType; + } +})); +Object.defineProperty(exports, "DangerousChangeType", ({ + enumerable: true, + get: function get() { + return _findBreakingChanges.DangerousChangeType; + } +})); +Object.defineProperty(exports, "findBreakingChanges", ({ + enumerable: true, + get: function get() { + return _findBreakingChanges.findBreakingChanges; + } +})); +Object.defineProperty(exports, "findDangerousChanges", ({ + enumerable: true, + get: function get() { + return _findBreakingChanges.findDangerousChanges; + } +})); +Object.defineProperty(exports, "findDeprecatedUsages", ({ + enumerable: true, + get: function get() { + return _findDeprecatedUsages.findDeprecatedUsages; + } +})); + +var _getIntrospectionQuery = __nccwpck_require__(747); + +var _getOperationAST = __nccwpck_require__(92854); + +var _getOperationRootType = __nccwpck_require__(81605); + +var _introspectionFromSchema = __nccwpck_require__(47371); + +var _buildClientSchema = __nccwpck_require__(9352); + +var _buildASTSchema = __nccwpck_require__(9337); + +var _extendSchema = __nccwpck_require__(51832); + +var _lexicographicSortSchema = __nccwpck_require__(19447); + +var _printSchema = __nccwpck_require__(84166); + +var _typeFromAST = __nccwpck_require__(27664); + +var _valueFromAST = __nccwpck_require__(83181); + +var _valueFromASTUntyped = __nccwpck_require__(86699); + +var _astFromValue = __nccwpck_require__(12653); + +var _TypeInfo = __nccwpck_require__(76625); + +var _coerceInputValue = __nccwpck_require__(39603); + +var _concatAST = __nccwpck_require__(17232); + +var _separateOperations = __nccwpck_require__(29125); + +var _stripIgnoredCharacters = __nccwpck_require__(17766); + +var _typeComparators = __nccwpck_require__(10333); + +var _assertValidName = __nccwpck_require__(25780); + +var _findBreakingChanges = __nccwpck_require__(59366); + +var _findDeprecatedUsages = __nccwpck_require__(26461); + + +/***/ }), + +/***/ 47371: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.introspectionFromSchema = introspectionFromSchema; + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _parser = __nccwpck_require__(50655); + +var _execute = __nccwpck_require__(83677); + +var _getIntrospectionQuery = __nccwpck_require__(747); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/** + * Build an IntrospectionQuery from a GraphQLSchema + * + * IntrospectionQuery is useful for utilities that care about type and field + * relationships, but do not need to traverse through those relationships. + * + * This is the inverse of buildClientSchema. The primary use case is outside + * of the server context, for instance when doing schema comparisons. + */ +function introspectionFromSchema(schema, options) { + var optionsWithDefaults = _objectSpread({ + directiveIsRepeatable: true, + schemaDescription: true + }, options); + + var document = (0, _parser.parse)((0, _getIntrospectionQuery.getIntrospectionQuery)(optionsWithDefaults)); + var result = (0, _execute.executeSync)({ + schema: schema, + document: document + }); + !result.errors && result.data || (0, _invariant.default)(0); + return result.data; +} + + +/***/ }), + +/***/ 19447: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.lexicographicSortSchema = lexicographicSortSchema; + +var _objectValues = _interopRequireDefault(__nccwpck_require__(30026)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _keyValMap = _interopRequireDefault(__nccwpck_require__(49268)); + +var _schema = __nccwpck_require__(8505); + +var _directives = __nccwpck_require__(83614); + +var _introspection = __nccwpck_require__(28344); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/** + * Sort GraphQLSchema. + * + * This function returns a sorted copy of the given GraphQLSchema. + */ +function lexicographicSortSchema(schema) { + var schemaConfig = schema.toConfig(); + var typeMap = (0, _keyValMap.default)(sortByName(schemaConfig.types), function (type) { + return type.name; + }, sortNamedType); + return new _schema.GraphQLSchema(_objectSpread(_objectSpread({}, schemaConfig), {}, { + types: (0, _objectValues.default)(typeMap), + directives: sortByName(schemaConfig.directives).map(sortDirective), + query: replaceMaybeType(schemaConfig.query), + mutation: replaceMaybeType(schemaConfig.mutation), + subscription: replaceMaybeType(schemaConfig.subscription) + })); + + function replaceType(type) { + if ((0, _definition.isListType)(type)) { + // $FlowFixMe[incompatible-return] + return new _definition.GraphQLList(replaceType(type.ofType)); + } else if ((0, _definition.isNonNullType)(type)) { + // $FlowFixMe[incompatible-return] + return new _definition.GraphQLNonNull(replaceType(type.ofType)); + } + + return replaceNamedType(type); + } + + function replaceNamedType(type) { + return typeMap[type.name]; + } + + function replaceMaybeType(maybeType) { + return maybeType && replaceNamedType(maybeType); + } + + function sortDirective(directive) { + var config = directive.toConfig(); + return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config), {}, { + locations: sortBy(config.locations, function (x) { + return x; + }), + args: sortArgs(config.args) + })); + } + + function sortArgs(args) { + return sortObjMap(args, function (arg) { + return _objectSpread(_objectSpread({}, arg), {}, { + type: replaceType(arg.type) + }); + }); + } + + function sortFields(fieldsMap) { + return sortObjMap(fieldsMap, function (field) { + return _objectSpread(_objectSpread({}, field), {}, { + type: replaceType(field.type), + args: sortArgs(field.args) + }); + }); + } + + function sortInputFields(fieldsMap) { + return sortObjMap(fieldsMap, function (field) { + return _objectSpread(_objectSpread({}, field), {}, { + type: replaceType(field.type) + }); + }); + } + + function sortTypes(arr) { + return sortByName(arr).map(replaceNamedType); + } + + function sortNamedType(type) { + if ((0, _definition.isScalarType)(type) || (0, _introspection.isIntrospectionType)(type)) { + return type; + } + + if ((0, _definition.isObjectType)(type)) { + var config = type.toConfig(); + return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config), {}, { + interfaces: function interfaces() { + return sortTypes(config.interfaces); + }, + fields: function fields() { + return sortFields(config.fields); + } + })); + } + + if ((0, _definition.isInterfaceType)(type)) { + var _config = type.toConfig(); + + return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({}, _config), {}, { + interfaces: function interfaces() { + return sortTypes(_config.interfaces); + }, + fields: function fields() { + return sortFields(_config.fields); + } + })); + } + + if ((0, _definition.isUnionType)(type)) { + var _config2 = type.toConfig(); + + return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, _config2), {}, { + types: function types() { + return sortTypes(_config2.types); + } + })); + } + + if ((0, _definition.isEnumType)(type)) { + var _config3 = type.toConfig(); + + return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({}, _config3), {}, { + values: sortObjMap(_config3.values) + })); + } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if ((0, _definition.isInputObjectType)(type)) { + var _config4 = type.toConfig(); + + return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({}, _config4), {}, { + fields: function fields() { + return sortInputFields(_config4.fields); + } + })); + } // istanbul ignore next (Not reachable. All possible types have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected type: ' + (0, _inspect.default)(type)); + } +} + +function sortObjMap(map, sortValueFn) { + var sortedMap = Object.create(null); + var sortedKeys = sortBy(Object.keys(map), function (x) { + return x; + }); + + for (var _i2 = 0; _i2 < sortedKeys.length; _i2++) { + var key = sortedKeys[_i2]; + var value = map[key]; + sortedMap[key] = sortValueFn ? sortValueFn(value) : value; + } + + return sortedMap; +} + +function sortByName(array) { + return sortBy(array, function (obj) { + return obj.name; + }); +} + +function sortBy(array, mapToKey) { + return array.slice().sort(function (obj1, obj2) { + var key1 = mapToKey(obj1); + var key2 = mapToKey(obj2); + return key1.localeCompare(key2); + }); +} + + +/***/ }), + +/***/ 84166: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.printSchema = printSchema; +exports.printIntrospectionSchema = printIntrospectionSchema; +exports.printType = printType; + +var _objectValues = _interopRequireDefault(__nccwpck_require__(30026)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _printer = __nccwpck_require__(68203); + +var _blockString = __nccwpck_require__(4515); + +var _introspection = __nccwpck_require__(28344); + +var _scalars = __nccwpck_require__(93145); + +var _directives = __nccwpck_require__(83614); + +var _definition = __nccwpck_require__(5821); + +var _astFromValue = __nccwpck_require__(12653); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Accepts options as a second argument: + * + * - commentDescriptions: + * Provide true to use preceding comments as the description. + * + */ +function printSchema(schema, options) { + return printFilteredSchema(schema, function (n) { + return !(0, _directives.isSpecifiedDirective)(n); + }, isDefinedType, options); +} + +function printIntrospectionSchema(schema, options) { + return printFilteredSchema(schema, _directives.isSpecifiedDirective, _introspection.isIntrospectionType, options); +} + +function isDefinedType(type) { + return !(0, _scalars.isSpecifiedScalarType)(type) && !(0, _introspection.isIntrospectionType)(type); +} + +function printFilteredSchema(schema, directiveFilter, typeFilter, options) { + var directives = schema.getDirectives().filter(directiveFilter); + var types = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter); + return [printSchemaDefinition(schema)].concat(directives.map(function (directive) { + return printDirective(directive, options); + }), types.map(function (type) { + return printType(type, options); + })).filter(Boolean).join('\n\n') + '\n'; +} + +function printSchemaDefinition(schema) { + if (schema.description == null && isSchemaOfCommonNames(schema)) { + return; + } + + var operationTypes = []; + var queryType = schema.getQueryType(); + + if (queryType) { + operationTypes.push(" query: ".concat(queryType.name)); + } + + var mutationType = schema.getMutationType(); + + if (mutationType) { + operationTypes.push(" mutation: ".concat(mutationType.name)); + } + + var subscriptionType = schema.getSubscriptionType(); + + if (subscriptionType) { + operationTypes.push(" subscription: ".concat(subscriptionType.name)); + } + + return printDescription({}, schema) + "schema {\n".concat(operationTypes.join('\n'), "\n}"); +} +/** + * GraphQL schema define root types for each type of operation. These types are + * the same as any other type and can be named in any manner, however there is + * a common naming convention: + * + * schema { + * query: Query + * mutation: Mutation + * } + * + * When using this naming convention, the schema description can be omitted. + */ + + +function isSchemaOfCommonNames(schema) { + var queryType = schema.getQueryType(); + + if (queryType && queryType.name !== 'Query') { + return false; + } + + var mutationType = schema.getMutationType(); + + if (mutationType && mutationType.name !== 'Mutation') { + return false; + } + + var subscriptionType = schema.getSubscriptionType(); + + if (subscriptionType && subscriptionType.name !== 'Subscription') { + return false; + } + + return true; +} + +function printType(type, options) { + if ((0, _definition.isScalarType)(type)) { + return printScalar(type, options); + } + + if ((0, _definition.isObjectType)(type)) { + return printObject(type, options); + } + + if ((0, _definition.isInterfaceType)(type)) { + return printInterface(type, options); + } + + if ((0, _definition.isUnionType)(type)) { + return printUnion(type, options); + } + + if ((0, _definition.isEnumType)(type)) { + return printEnum(type, options); + } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if ((0, _definition.isInputObjectType)(type)) { + return printInputObject(type, options); + } // istanbul ignore next (Not reachable. All possible types have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected type: ' + (0, _inspect.default)(type)); +} + +function printScalar(type, options) { + return printDescription(options, type) + "scalar ".concat(type.name) + printSpecifiedByUrl(type); +} + +function printImplementedInterfaces(type) { + var interfaces = type.getInterfaces(); + return interfaces.length ? ' implements ' + interfaces.map(function (i) { + return i.name; + }).join(' & ') : ''; +} + +function printObject(type, options) { + return printDescription(options, type) + "type ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type); +} + +function printInterface(type, options) { + return printDescription(options, type) + "interface ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type); +} + +function printUnion(type, options) { + var types = type.getTypes(); + var possibleTypes = types.length ? ' = ' + types.join(' | ') : ''; + return printDescription(options, type) + 'union ' + type.name + possibleTypes; +} + +function printEnum(type, options) { + var values = type.getValues().map(function (value, i) { + return printDescription(options, value, ' ', !i) + ' ' + value.name + printDeprecated(value.deprecationReason); + }); + return printDescription(options, type) + "enum ".concat(type.name) + printBlock(values); +} + +function printInputObject(type, options) { + var fields = (0, _objectValues.default)(type.getFields()).map(function (f, i) { + return printDescription(options, f, ' ', !i) + ' ' + printInputValue(f); + }); + return printDescription(options, type) + "input ".concat(type.name) + printBlock(fields); +} + +function printFields(options, type) { + var fields = (0, _objectValues.default)(type.getFields()).map(function (f, i) { + return printDescription(options, f, ' ', !i) + ' ' + f.name + printArgs(options, f.args, ' ') + ': ' + String(f.type) + printDeprecated(f.deprecationReason); + }); + return printBlock(fields); +} + +function printBlock(items) { + return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : ''; +} + +function printArgs(options, args) { + var indentation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + + if (args.length === 0) { + return ''; + } // If every arg does not have a description, print them on one line. + + + if (args.every(function (arg) { + return !arg.description; + })) { + return '(' + args.map(printInputValue).join(', ') + ')'; + } + + return '(\n' + args.map(function (arg, i) { + return printDescription(options, arg, ' ' + indentation, !i) + ' ' + indentation + printInputValue(arg); + }).join('\n') + '\n' + indentation + ')'; +} + +function printInputValue(arg) { + var defaultAST = (0, _astFromValue.astFromValue)(arg.defaultValue, arg.type); + var argDecl = arg.name + ': ' + String(arg.type); + + if (defaultAST) { + argDecl += " = ".concat((0, _printer.print)(defaultAST)); + } + + return argDecl + printDeprecated(arg.deprecationReason); +} + +function printDirective(directive, options) { + return printDescription(options, directive) + 'directive @' + directive.name + printArgs(options, directive.args) + (directive.isRepeatable ? ' repeatable' : '') + ' on ' + directive.locations.join(' | '); +} + +function printDeprecated(reason) { + if (reason == null) { + return ''; + } + + var reasonAST = (0, _astFromValue.astFromValue)(reason, _scalars.GraphQLString); + + if (reasonAST && reason !== _directives.DEFAULT_DEPRECATION_REASON) { + return ' @deprecated(reason: ' + (0, _printer.print)(reasonAST) + ')'; + } + + return ' @deprecated'; +} + +function printSpecifiedByUrl(scalar) { + if (scalar.specifiedByUrl == null) { + return ''; + } + + var url = scalar.specifiedByUrl; + var urlAST = (0, _astFromValue.astFromValue)(url, _scalars.GraphQLString); + urlAST || (0, _invariant.default)(0, 'Unexpected null value returned from `astFromValue` for specifiedByUrl'); + return ' @specifiedBy(url: ' + (0, _printer.print)(urlAST) + ')'; +} + +function printDescription(options, def) { + var indentation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + var firstInBlock = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var description = def.description; + + if (description == null) { + return ''; + } + + if ((options === null || options === void 0 ? void 0 : options.commentDescriptions) === true) { + return printDescriptionWithComments(description, indentation, firstInBlock); + } + + var preferMultipleLines = description.length > 70; + var blockString = (0, _blockString.printBlockString)(description, '', preferMultipleLines); + var prefix = indentation && !firstInBlock ? '\n' + indentation : indentation; + return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n'; +} + +function printDescriptionWithComments(description, indentation, firstInBlock) { + var prefix = indentation && !firstInBlock ? '\n' : ''; + var comment = description.split('\n').map(function (line) { + return indentation + (line !== '' ? '# ' + line : '#'); + }).join('\n'); + return prefix + comment + '\n'; +} + + +/***/ }), + +/***/ 29125: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.separateOperations = separateOperations; + +var _kinds = __nccwpck_require__(11927); + +var _visitor = __nccwpck_require__(5678); + +/** + * separateOperations accepts a single AST document which may contain many + * operations and fragments and returns a collection of AST documents each of + * which contains a single operation as well the fragment definitions it + * refers to. + */ +function separateOperations(documentAST) { + var operations = []; + var depGraph = Object.create(null); + var fromName; // Populate metadata and build a dependency graph. + + (0, _visitor.visit)(documentAST, { + OperationDefinition: function OperationDefinition(node) { + fromName = opName(node); + operations.push(node); + }, + FragmentDefinition: function FragmentDefinition(node) { + fromName = node.name.value; + }, + FragmentSpread: function FragmentSpread(node) { + var toName = node.name.value; + var dependents = depGraph[fromName]; + + if (dependents === undefined) { + dependents = depGraph[fromName] = Object.create(null); + } + + dependents[toName] = true; + } + }); // For each operation, produce a new synthesized AST which includes only what + // is necessary for completing that operation. + + var separatedDocumentASTs = Object.create(null); + + var _loop = function _loop(_i2) { + var operation = operations[_i2]; + var operationName = opName(operation); + var dependencies = Object.create(null); + collectTransitiveDependencies(dependencies, depGraph, operationName); // The list of definition nodes to be included for this operation, sorted + // to retain the same order as the original document. + + separatedDocumentASTs[operationName] = { + kind: _kinds.Kind.DOCUMENT, + definitions: documentAST.definitions.filter(function (node) { + return node === operation || node.kind === _kinds.Kind.FRAGMENT_DEFINITION && dependencies[node.name.value]; + }) + }; + }; + + for (var _i2 = 0; _i2 < operations.length; _i2++) { + _loop(_i2); + } + + return separatedDocumentASTs; +} + +// Provides the empty string for anonymous operations. +function opName(operation) { + return operation.name ? operation.name.value : ''; +} // From a dependency graph, collects a list of transitive dependencies by +// recursing through a dependency graph. + + +function collectTransitiveDependencies(collected, depGraph, fromName) { + var immediateDeps = depGraph[fromName]; + + if (immediateDeps) { + for (var _i4 = 0, _Object$keys2 = Object.keys(immediateDeps); _i4 < _Object$keys2.length; _i4++) { + var toName = _Object$keys2[_i4]; + + if (!collected[toName]) { + collected[toName] = true; + collectTransitiveDependencies(collected, depGraph, toName); + } + } + } +} + + +/***/ }), + +/***/ 17766: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.stripIgnoredCharacters = stripIgnoredCharacters; + +var _source = __nccwpck_require__(65521); + +var _tokenKind = __nccwpck_require__(91565); + +var _lexer = __nccwpck_require__(24605); + +var _blockString = __nccwpck_require__(4515); + +/** + * Strips characters that are not significant to the validity or execution + * of a GraphQL document: + * - UnicodeBOM + * - WhiteSpace + * - LineTerminator + * - Comment + * - Comma + * - BlockString indentation + * + * Note: It is required to have a delimiter character between neighboring + * non-punctuator tokens and this function always uses single space as delimiter. + * + * It is guaranteed that both input and output documents if parsed would result + * in the exact same AST except for nodes location. + * + * Warning: It is guaranteed that this function will always produce stable results. + * However, it's not guaranteed that it will stay the same between different + * releases due to bugfixes or changes in the GraphQL specification. + * + * Query example: + * + * query SomeQuery($foo: String!, $bar: String) { + * someField(foo: $foo, bar: $bar) { + * a + * b { + * c + * d + * } + * } + * } + * + * Becomes: + * + * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}} + * + * SDL example: + * + * """ + * Type description + * """ + * type Foo { + * """ + * Field description + * """ + * bar: String + * } + * + * Becomes: + * + * """Type description""" type Foo{"""Field description""" bar:String} + */ +function stripIgnoredCharacters(source) { + var sourceObj = (0, _source.isSource)(source) ? source : new _source.Source(source); + var body = sourceObj.body; + var lexer = new _lexer.Lexer(sourceObj); + var strippedBody = ''; + var wasLastAddedTokenNonPunctuator = false; + + while (lexer.advance().kind !== _tokenKind.TokenKind.EOF) { + var currentToken = lexer.token; + var tokenKind = currentToken.kind; + /** + * Every two non-punctuator tokens should have space between them. + * Also prevent case of non-punctuator token following by spread resulting + * in invalid token (e.g. `1...` is invalid Float token). + */ + + var isNonPunctuator = !(0, _lexer.isPunctuatorTokenKind)(currentToken.kind); + + if (wasLastAddedTokenNonPunctuator) { + if (isNonPunctuator || currentToken.kind === _tokenKind.TokenKind.SPREAD) { + strippedBody += ' '; + } + } + + var tokenBody = body.slice(currentToken.start, currentToken.end); + + if (tokenKind === _tokenKind.TokenKind.BLOCK_STRING) { + strippedBody += dedentBlockString(tokenBody); + } else { + strippedBody += tokenBody; + } + + wasLastAddedTokenNonPunctuator = isNonPunctuator; + } + + return strippedBody; +} + +function dedentBlockString(blockStr) { + // skip leading and trailing triple quotations + var rawStr = blockStr.slice(3, -3); + var body = (0, _blockString.dedentBlockStringValue)(rawStr); + + if ((0, _blockString.getBlockStringIndentation)(body) > 0) { + body = '\n' + body; + } + + var lastChar = body[body.length - 1]; + var hasTrailingQuote = lastChar === '"' && body.slice(-4) !== '\\"""'; + + if (hasTrailingQuote || lastChar === '\\') { + body += '\n'; + } + + return '"""' + body + '"""'; +} + + +/***/ }), + +/***/ 10333: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isEqualType = isEqualType; +exports.isTypeSubTypeOf = isTypeSubTypeOf; +exports.doTypesOverlap = doTypesOverlap; + +var _definition = __nccwpck_require__(5821); + +/** + * Provided two types, return true if the types are equal (invariant). + */ +function isEqualType(typeA, typeB) { + // Equivalent types are equal. + if (typeA === typeB) { + return true; + } // If either type is non-null, the other must also be non-null. + + + if ((0, _definition.isNonNullType)(typeA) && (0, _definition.isNonNullType)(typeB)) { + return isEqualType(typeA.ofType, typeB.ofType); + } // If either type is a list, the other must also be a list. + + + if ((0, _definition.isListType)(typeA) && (0, _definition.isListType)(typeB)) { + return isEqualType(typeA.ofType, typeB.ofType); + } // Otherwise the types are not equal. + + + return false; +} +/** + * Provided a type and a super type, return true if the first type is either + * equal or a subset of the second super type (covariant). + */ + + +function isTypeSubTypeOf(schema, maybeSubType, superType) { + // Equivalent type is a valid subtype + if (maybeSubType === superType) { + return true; + } // If superType is non-null, maybeSubType must also be non-null. + + + if ((0, _definition.isNonNullType)(superType)) { + if ((0, _definition.isNonNullType)(maybeSubType)) { + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); + } + + return false; + } + + if ((0, _definition.isNonNullType)(maybeSubType)) { + // If superType is nullable, maybeSubType may be non-null or nullable. + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType); + } // If superType type is a list, maybeSubType type must also be a list. + + + if ((0, _definition.isListType)(superType)) { + if ((0, _definition.isListType)(maybeSubType)) { + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); + } + + return false; + } + + if ((0, _definition.isListType)(maybeSubType)) { + // If superType is not a list, maybeSubType must also be not a list. + return false; + } // If superType type is an abstract type, check if it is super type of maybeSubType. + // Otherwise, the child type is not a valid subtype of the parent type. + + + return (0, _definition.isAbstractType)(superType) && ((0, _definition.isInterfaceType)(maybeSubType) || (0, _definition.isObjectType)(maybeSubType)) && schema.isSubType(superType, maybeSubType); +} +/** + * Provided two composite types, determine if they "overlap". Two composite + * types overlap when the Sets of possible concrete types for each intersect. + * + * This is often used to determine if a fragment of a given type could possibly + * be visited in a context of another type. + * + * This function is commutative. + */ + + +function doTypesOverlap(schema, typeA, typeB) { + // Equivalent types overlap + if (typeA === typeB) { + return true; + } + + if ((0, _definition.isAbstractType)(typeA)) { + if ((0, _definition.isAbstractType)(typeB)) { + // If both types are abstract, then determine if there is any intersection + // between possible concrete types of each. + return schema.getPossibleTypes(typeA).some(function (type) { + return schema.isSubType(typeB, type); + }); + } // Determine if the latter type is a possible concrete type of the former. + + + return schema.isSubType(typeA, typeB); + } + + if ((0, _definition.isAbstractType)(typeB)) { + // Determine if the former type is a possible concrete type of the latter. + return schema.isSubType(typeB, typeA); + } // Otherwise the types do not overlap. + + + return false; +} + + +/***/ }), + +/***/ 27664: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.typeFromAST = typeFromAST; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _kinds = __nccwpck_require__(11927); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function typeFromAST(schema, typeNode) { + /* eslint-enable no-redeclare */ + var innerType; + + if (typeNode.kind === _kinds.Kind.LIST_TYPE) { + innerType = typeFromAST(schema, typeNode.type); + return innerType && new _definition.GraphQLList(innerType); + } + + if (typeNode.kind === _kinds.Kind.NON_NULL_TYPE) { + innerType = typeFromAST(schema, typeNode.type); + return innerType && new _definition.GraphQLNonNull(innerType); + } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if (typeNode.kind === _kinds.Kind.NAMED_TYPE) { + return schema.getType(typeNode.name.value); + } // istanbul ignore next (Not reachable. All possible type nodes have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected type node: ' + (0, _inspect.default)(typeNode)); +} + + +/***/ }), + +/***/ 83181: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.valueFromAST = valueFromAST; + +var _objectValues3 = _interopRequireDefault(__nccwpck_require__(30026)); + +var _keyMap = _interopRequireDefault(__nccwpck_require__(10711)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _kinds = __nccwpck_require__(11927); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Produces a JavaScript value given a GraphQL Value AST. + * + * A GraphQL type must be provided, which will be used to interpret different + * GraphQL Value literals. + * + * Returns `undefined` when the value could not be validly coerced according to + * the provided type. + * + * | GraphQL Value | JSON Value | + * | -------------------- | ------------- | + * | Input Object | Object | + * | List | Array | + * | Boolean | Boolean | + * | String | String | + * | Int / Float | Number | + * | Enum Value | Mixed | + * | NullValue | null | + * + */ +function valueFromAST(valueNode, type, variables) { + if (!valueNode) { + // When there is no node, then there is also no value. + // Importantly, this is different from returning the value null. + return; + } + + if (valueNode.kind === _kinds.Kind.VARIABLE) { + var variableName = valueNode.name.value; + + if (variables == null || variables[variableName] === undefined) { + // No valid return value. + return; + } + + var variableValue = variables[variableName]; + + if (variableValue === null && (0, _definition.isNonNullType)(type)) { + return; // Invalid: intentionally return no value. + } // Note: This does no further checking that this variable is correct. + // This assumes that this query has been validated and the variable + // usage here is of the correct type. + + + return variableValue; + } + + if ((0, _definition.isNonNullType)(type)) { + if (valueNode.kind === _kinds.Kind.NULL) { + return; // Invalid: intentionally return no value. + } + + return valueFromAST(valueNode, type.ofType, variables); + } + + if (valueNode.kind === _kinds.Kind.NULL) { + // This is explicitly returning the value null. + return null; + } + + if ((0, _definition.isListType)(type)) { + var itemType = type.ofType; + + if (valueNode.kind === _kinds.Kind.LIST) { + var coercedValues = []; + + for (var _i2 = 0, _valueNode$values2 = valueNode.values; _i2 < _valueNode$values2.length; _i2++) { + var itemNode = _valueNode$values2[_i2]; + + if (isMissingVariable(itemNode, variables)) { + // If an array contains a missing variable, it is either coerced to + // null or if the item type is non-null, it considered invalid. + if ((0, _definition.isNonNullType)(itemType)) { + return; // Invalid: intentionally return no value. + } + + coercedValues.push(null); + } else { + var itemValue = valueFromAST(itemNode, itemType, variables); + + if (itemValue === undefined) { + return; // Invalid: intentionally return no value. + } + + coercedValues.push(itemValue); + } + } + + return coercedValues; + } + + var coercedValue = valueFromAST(valueNode, itemType, variables); + + if (coercedValue === undefined) { + return; // Invalid: intentionally return no value. + } + + return [coercedValue]; + } + + if ((0, _definition.isInputObjectType)(type)) { + if (valueNode.kind !== _kinds.Kind.OBJECT) { + return; // Invalid: intentionally return no value. + } + + var coercedObj = Object.create(null); + var fieldNodes = (0, _keyMap.default)(valueNode.fields, function (field) { + return field.name.value; + }); + + for (var _i4 = 0, _objectValues2 = (0, _objectValues3.default)(type.getFields()); _i4 < _objectValues2.length; _i4++) { + var field = _objectValues2[_i4]; + var fieldNode = fieldNodes[field.name]; + + if (!fieldNode || isMissingVariable(fieldNode.value, variables)) { + if (field.defaultValue !== undefined) { + coercedObj[field.name] = field.defaultValue; + } else if ((0, _definition.isNonNullType)(field.type)) { + return; // Invalid: intentionally return no value. + } + + continue; + } + + var fieldValue = valueFromAST(fieldNode.value, field.type, variables); + + if (fieldValue === undefined) { + return; // Invalid: intentionally return no value. + } + + coercedObj[field.name] = fieldValue; + } + + return coercedObj; + } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if ((0, _definition.isLeafType)(type)) { + // Scalars and Enums fulfill parsing a literal value via parseLiteral(). + // Invalid values represent a failure to parse correctly, in which case + // no value is returned. + var result; + + try { + result = type.parseLiteral(valueNode, variables); + } catch (_error) { + return; // Invalid: intentionally return no value. + } + + if (result === undefined) { + return; // Invalid: intentionally return no value. + } + + return result; + } // istanbul ignore next (Not reachable. All possible input types have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected input type: ' + (0, _inspect.default)(type)); +} // Returns true if the provided valueNode is a variable which is not defined +// in the set of variables. + + +function isMissingVariable(valueNode, variables) { + return valueNode.kind === _kinds.Kind.VARIABLE && (variables == null || variables[valueNode.name.value] === undefined); +} + + +/***/ }), + +/***/ 86699: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.valueFromASTUntyped = valueFromASTUntyped; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _keyValMap = _interopRequireDefault(__nccwpck_require__(49268)); + +var _kinds = __nccwpck_require__(11927); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Produces a JavaScript value given a GraphQL Value AST. + * + * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value + * will reflect the provided GraphQL value AST. + * + * | GraphQL Value | JavaScript Value | + * | -------------------- | ---------------- | + * | Input Object | Object | + * | List | Array | + * | Boolean | Boolean | + * | String / Enum | String | + * | Int / Float | Number | + * | Null | null | + * + */ +function valueFromASTUntyped(valueNode, variables) { + switch (valueNode.kind) { + case _kinds.Kind.NULL: + return null; + + case _kinds.Kind.INT: + return parseInt(valueNode.value, 10); + + case _kinds.Kind.FLOAT: + return parseFloat(valueNode.value); + + case _kinds.Kind.STRING: + case _kinds.Kind.ENUM: + case _kinds.Kind.BOOLEAN: + return valueNode.value; + + case _kinds.Kind.LIST: + return valueNode.values.map(function (node) { + return valueFromASTUntyped(node, variables); + }); + + case _kinds.Kind.OBJECT: + return (0, _keyValMap.default)(valueNode.fields, function (field) { + return field.name.value; + }, function (field) { + return valueFromASTUntyped(field.value, variables); + }); + + case _kinds.Kind.VARIABLE: + return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value]; + } // istanbul ignore next (Not reachable. All possible value nodes have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected value node: ' + (0, _inspect.default)(valueNode)); +} + + +/***/ }), + +/***/ 28263: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ValidationContext = exports.SDLValidationContext = exports.ASTValidationContext = void 0; + +var _kinds = __nccwpck_require__(11927); + +var _visitor = __nccwpck_require__(5678); + +var _TypeInfo = __nccwpck_require__(76625); + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +/** + * An instance of this class is passed as the "this" context to all validators, + * allowing access to commonly useful contextual information from within a + * validation rule. + */ +var ASTValidationContext = /*#__PURE__*/function () { + function ASTValidationContext(ast, onError) { + this._ast = ast; + this._fragments = undefined; + this._fragmentSpreads = new Map(); + this._recursivelyReferencedFragments = new Map(); + this._onError = onError; + } + + var _proto = ASTValidationContext.prototype; + + _proto.reportError = function reportError(error) { + this._onError(error); + }; + + _proto.getDocument = function getDocument() { + return this._ast; + }; + + _proto.getFragment = function getFragment(name) { + var fragments = this._fragments; + + if (!fragments) { + this._fragments = fragments = this.getDocument().definitions.reduce(function (frags, statement) { + if (statement.kind === _kinds.Kind.FRAGMENT_DEFINITION) { + frags[statement.name.value] = statement; + } + + return frags; + }, Object.create(null)); + } + + return fragments[name]; + }; + + _proto.getFragmentSpreads = function getFragmentSpreads(node) { + var spreads = this._fragmentSpreads.get(node); + + if (!spreads) { + spreads = []; + var setsToVisit = [node]; + + while (setsToVisit.length !== 0) { + var set = setsToVisit.pop(); + + for (var _i2 = 0, _set$selections2 = set.selections; _i2 < _set$selections2.length; _i2++) { + var selection = _set$selections2[_i2]; + + if (selection.kind === _kinds.Kind.FRAGMENT_SPREAD) { + spreads.push(selection); + } else if (selection.selectionSet) { + setsToVisit.push(selection.selectionSet); + } + } + } + + this._fragmentSpreads.set(node, spreads); + } + + return spreads; + }; + + _proto.getRecursivelyReferencedFragments = function getRecursivelyReferencedFragments(operation) { + var fragments = this._recursivelyReferencedFragments.get(operation); + + if (!fragments) { + fragments = []; + var collectedNames = Object.create(null); + var nodesToVisit = [operation.selectionSet]; + + while (nodesToVisit.length !== 0) { + var node = nodesToVisit.pop(); + + for (var _i4 = 0, _this$getFragmentSpre2 = this.getFragmentSpreads(node); _i4 < _this$getFragmentSpre2.length; _i4++) { + var spread = _this$getFragmentSpre2[_i4]; + var fragName = spread.name.value; + + if (collectedNames[fragName] !== true) { + collectedNames[fragName] = true; + var fragment = this.getFragment(fragName); + + if (fragment) { + fragments.push(fragment); + nodesToVisit.push(fragment.selectionSet); + } + } + } + } + + this._recursivelyReferencedFragments.set(operation, fragments); + } + + return fragments; + }; + + return ASTValidationContext; +}(); + +exports.ASTValidationContext = ASTValidationContext; + +var SDLValidationContext = /*#__PURE__*/function (_ASTValidationContext) { + _inheritsLoose(SDLValidationContext, _ASTValidationContext); + + function SDLValidationContext(ast, schema, onError) { + var _this; + + _this = _ASTValidationContext.call(this, ast, onError) || this; + _this._schema = schema; + return _this; + } + + var _proto2 = SDLValidationContext.prototype; + + _proto2.getSchema = function getSchema() { + return this._schema; + }; + + return SDLValidationContext; +}(ASTValidationContext); + +exports.SDLValidationContext = SDLValidationContext; + +var ValidationContext = /*#__PURE__*/function (_ASTValidationContext2) { + _inheritsLoose(ValidationContext, _ASTValidationContext2); + + function ValidationContext(schema, ast, typeInfo, onError) { + var _this2; + + _this2 = _ASTValidationContext2.call(this, ast, onError) || this; + _this2._schema = schema; + _this2._typeInfo = typeInfo; + _this2._variableUsages = new Map(); + _this2._recursiveVariableUsages = new Map(); + return _this2; + } + + var _proto3 = ValidationContext.prototype; + + _proto3.getSchema = function getSchema() { + return this._schema; + }; + + _proto3.getVariableUsages = function getVariableUsages(node) { + var usages = this._variableUsages.get(node); + + if (!usages) { + var newUsages = []; + var typeInfo = new _TypeInfo.TypeInfo(this._schema); + (0, _visitor.visit)(node, (0, _TypeInfo.visitWithTypeInfo)(typeInfo, { + VariableDefinition: function VariableDefinition() { + return false; + }, + Variable: function Variable(variable) { + newUsages.push({ + node: variable, + type: typeInfo.getInputType(), + defaultValue: typeInfo.getDefaultValue() + }); + } + })); + usages = newUsages; + + this._variableUsages.set(node, usages); + } + + return usages; + }; + + _proto3.getRecursiveVariableUsages = function getRecursiveVariableUsages(operation) { + var usages = this._recursiveVariableUsages.get(operation); + + if (!usages) { + usages = this.getVariableUsages(operation); + + for (var _i6 = 0, _this$getRecursivelyR2 = this.getRecursivelyReferencedFragments(operation); _i6 < _this$getRecursivelyR2.length; _i6++) { + var frag = _this$getRecursivelyR2[_i6]; + usages = usages.concat(this.getVariableUsages(frag)); + } + + this._recursiveVariableUsages.set(operation, usages); + } + + return usages; + }; + + _proto3.getType = function getType() { + return this._typeInfo.getType(); + }; + + _proto3.getParentType = function getParentType() { + return this._typeInfo.getParentType(); + }; + + _proto3.getInputType = function getInputType() { + return this._typeInfo.getInputType(); + }; + + _proto3.getParentInputType = function getParentInputType() { + return this._typeInfo.getParentInputType(); + }; + + _proto3.getFieldDef = function getFieldDef() { + return this._typeInfo.getFieldDef(); + }; + + _proto3.getDirective = function getDirective() { + return this._typeInfo.getDirective(); + }; + + _proto3.getArgument = function getArgument() { + return this._typeInfo.getArgument(); + }; + + _proto3.getEnumValue = function getEnumValue() { + return this._typeInfo.getEnumValue(); + }; + + return ValidationContext; +}(ASTValidationContext); + +exports.ValidationContext = ValidationContext; + + +/***/ }), + +/***/ 82201: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function get() { + return _validate.validate; + } +})); +Object.defineProperty(exports, "ValidationContext", ({ + enumerable: true, + get: function get() { + return _ValidationContext.ValidationContext; + } +})); +Object.defineProperty(exports, "specifiedRules", ({ + enumerable: true, + get: function get() { + return _specifiedRules.specifiedRules; + } +})); +Object.defineProperty(exports, "ExecutableDefinitionsRule", ({ + enumerable: true, + get: function get() { + return _ExecutableDefinitionsRule.ExecutableDefinitionsRule; + } +})); +Object.defineProperty(exports, "FieldsOnCorrectTypeRule", ({ + enumerable: true, + get: function get() { + return _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule; + } +})); +Object.defineProperty(exports, "FragmentsOnCompositeTypesRule", ({ + enumerable: true, + get: function get() { + return _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule; + } +})); +Object.defineProperty(exports, "KnownArgumentNamesRule", ({ + enumerable: true, + get: function get() { + return _KnownArgumentNamesRule.KnownArgumentNamesRule; + } +})); +Object.defineProperty(exports, "KnownDirectivesRule", ({ + enumerable: true, + get: function get() { + return _KnownDirectivesRule.KnownDirectivesRule; + } +})); +Object.defineProperty(exports, "KnownFragmentNamesRule", ({ + enumerable: true, + get: function get() { + return _KnownFragmentNamesRule.KnownFragmentNamesRule; + } +})); +Object.defineProperty(exports, "KnownTypeNamesRule", ({ + enumerable: true, + get: function get() { + return _KnownTypeNamesRule.KnownTypeNamesRule; + } +})); +Object.defineProperty(exports, "LoneAnonymousOperationRule", ({ + enumerable: true, + get: function get() { + return _LoneAnonymousOperationRule.LoneAnonymousOperationRule; + } +})); +Object.defineProperty(exports, "NoFragmentCyclesRule", ({ + enumerable: true, + get: function get() { + return _NoFragmentCyclesRule.NoFragmentCyclesRule; + } +})); +Object.defineProperty(exports, "NoUndefinedVariablesRule", ({ + enumerable: true, + get: function get() { + return _NoUndefinedVariablesRule.NoUndefinedVariablesRule; + } +})); +Object.defineProperty(exports, "NoUnusedFragmentsRule", ({ + enumerable: true, + get: function get() { + return _NoUnusedFragmentsRule.NoUnusedFragmentsRule; + } +})); +Object.defineProperty(exports, "NoUnusedVariablesRule", ({ + enumerable: true, + get: function get() { + return _NoUnusedVariablesRule.NoUnusedVariablesRule; + } +})); +Object.defineProperty(exports, "OverlappingFieldsCanBeMergedRule", ({ + enumerable: true, + get: function get() { + return _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule; + } +})); +Object.defineProperty(exports, "PossibleFragmentSpreadsRule", ({ + enumerable: true, + get: function get() { + return _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule; + } +})); +Object.defineProperty(exports, "ProvidedRequiredArgumentsRule", ({ + enumerable: true, + get: function get() { + return _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule; + } +})); +Object.defineProperty(exports, "ScalarLeafsRule", ({ + enumerable: true, + get: function get() { + return _ScalarLeafsRule.ScalarLeafsRule; + } +})); +Object.defineProperty(exports, "SingleFieldSubscriptionsRule", ({ + enumerable: true, + get: function get() { + return _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule; + } +})); +Object.defineProperty(exports, "UniqueArgumentNamesRule", ({ + enumerable: true, + get: function get() { + return _UniqueArgumentNamesRule.UniqueArgumentNamesRule; + } +})); +Object.defineProperty(exports, "UniqueDirectivesPerLocationRule", ({ + enumerable: true, + get: function get() { + return _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule; + } +})); +Object.defineProperty(exports, "UniqueFragmentNamesRule", ({ + enumerable: true, + get: function get() { + return _UniqueFragmentNamesRule.UniqueFragmentNamesRule; + } +})); +Object.defineProperty(exports, "UniqueInputFieldNamesRule", ({ + enumerable: true, + get: function get() { + return _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule; + } +})); +Object.defineProperty(exports, "UniqueOperationNamesRule", ({ + enumerable: true, + get: function get() { + return _UniqueOperationNamesRule.UniqueOperationNamesRule; + } +})); +Object.defineProperty(exports, "UniqueVariableNamesRule", ({ + enumerable: true, + get: function get() { + return _UniqueVariableNamesRule.UniqueVariableNamesRule; + } +})); +Object.defineProperty(exports, "ValuesOfCorrectTypeRule", ({ + enumerable: true, + get: function get() { + return _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule; + } +})); +Object.defineProperty(exports, "VariablesAreInputTypesRule", ({ + enumerable: true, + get: function get() { + return _VariablesAreInputTypesRule.VariablesAreInputTypesRule; + } +})); +Object.defineProperty(exports, "VariablesInAllowedPositionRule", ({ + enumerable: true, + get: function get() { + return _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule; + } +})); +Object.defineProperty(exports, "LoneSchemaDefinitionRule", ({ + enumerable: true, + get: function get() { + return _LoneSchemaDefinitionRule.LoneSchemaDefinitionRule; + } +})); +Object.defineProperty(exports, "UniqueOperationTypesRule", ({ + enumerable: true, + get: function get() { + return _UniqueOperationTypesRule.UniqueOperationTypesRule; + } +})); +Object.defineProperty(exports, "UniqueTypeNamesRule", ({ + enumerable: true, + get: function get() { + return _UniqueTypeNamesRule.UniqueTypeNamesRule; + } +})); +Object.defineProperty(exports, "UniqueEnumValueNamesRule", ({ + enumerable: true, + get: function get() { + return _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule; + } +})); +Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", ({ + enumerable: true, + get: function get() { + return _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule; + } +})); +Object.defineProperty(exports, "UniqueDirectiveNamesRule", ({ + enumerable: true, + get: function get() { + return _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule; + } +})); +Object.defineProperty(exports, "PossibleTypeExtensionsRule", ({ + enumerable: true, + get: function get() { + return _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule; + } +})); +Object.defineProperty(exports, "NoDeprecatedCustomRule", ({ + enumerable: true, + get: function get() { + return _NoDeprecatedCustomRule.NoDeprecatedCustomRule; + } +})); +Object.defineProperty(exports, "NoSchemaIntrospectionCustomRule", ({ + enumerable: true, + get: function get() { + return _NoSchemaIntrospectionCustomRule.NoSchemaIntrospectionCustomRule; + } +})); + +var _validate = __nccwpck_require__(14193); + +var _ValidationContext = __nccwpck_require__(28263); + +var _specifiedRules = __nccwpck_require__(84908); + +var _ExecutableDefinitionsRule = __nccwpck_require__(89199); + +var _FieldsOnCorrectTypeRule = __nccwpck_require__(63016); + +var _FragmentsOnCompositeTypesRule = __nccwpck_require__(60381); + +var _KnownArgumentNamesRule = __nccwpck_require__(67147); + +var _KnownDirectivesRule = __nccwpck_require__(85303); + +var _KnownFragmentNamesRule = __nccwpck_require__(15166); + +var _KnownTypeNamesRule = __nccwpck_require__(42509); + +var _LoneAnonymousOperationRule = __nccwpck_require__(45726); + +var _NoFragmentCyclesRule = __nccwpck_require__(62564); + +var _NoUndefinedVariablesRule = __nccwpck_require__(61671); + +var _NoUnusedFragmentsRule = __nccwpck_require__(192); + +var _NoUnusedVariablesRule = __nccwpck_require__(40242); + +var _OverlappingFieldsCanBeMergedRule = __nccwpck_require__(23577); + +var _PossibleFragmentSpreadsRule = __nccwpck_require__(62450); + +var _ProvidedRequiredArgumentsRule = __nccwpck_require__(57669); + +var _ScalarLeafsRule = __nccwpck_require__(16830); + +var _SingleFieldSubscriptionsRule = __nccwpck_require__(4365); + +var _UniqueArgumentNamesRule = __nccwpck_require__(45799); + +var _UniqueDirectivesPerLocationRule = __nccwpck_require__(61944); + +var _UniqueFragmentNamesRule = __nccwpck_require__(79402); + +var _UniqueInputFieldNamesRule = __nccwpck_require__(83552); + +var _UniqueOperationNamesRule = __nccwpck_require__(94865); + +var _UniqueVariableNamesRule = __nccwpck_require__(65931); + +var _ValuesOfCorrectTypeRule = __nccwpck_require__(39091); + +var _VariablesAreInputTypesRule = __nccwpck_require__(99506); + +var _VariablesInAllowedPositionRule = __nccwpck_require__(8815); + +var _LoneSchemaDefinitionRule = __nccwpck_require__(48307); + +var _UniqueOperationTypesRule = __nccwpck_require__(31492); + +var _UniqueTypeNamesRule = __nccwpck_require__(24316); + +var _UniqueEnumValueNamesRule = __nccwpck_require__(44437); + +var _UniqueFieldDefinitionNamesRule = __nccwpck_require__(9502); + +var _UniqueDirectiveNamesRule = __nccwpck_require__(17074); + +var _PossibleTypeExtensionsRule = __nccwpck_require__(70075); + +var _NoDeprecatedCustomRule = __nccwpck_require__(33915); + +var _NoSchemaIntrospectionCustomRule = __nccwpck_require__(39478); + + +/***/ }), + +/***/ 89199: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ExecutableDefinitionsRule = ExecutableDefinitionsRule; + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +var _predicates = __nccwpck_require__(20535); + +/** + * Executable definitions + * + * A GraphQL document is only valid for execution if all definitions are either + * operation or fragment definitions. + */ +function ExecutableDefinitionsRule(context) { + return { + Document: function Document(node) { + for (var _i2 = 0, _node$definitions2 = node.definitions; _i2 < _node$definitions2.length; _i2++) { + var definition = _node$definitions2[_i2]; + + if (!(0, _predicates.isExecutableDefinitionNode)(definition)) { + var defName = definition.kind === _kinds.Kind.SCHEMA_DEFINITION || definition.kind === _kinds.Kind.SCHEMA_EXTENSION ? 'schema' : '"' + definition.name.value + '"'; + context.reportError(new _GraphQLError.GraphQLError("The ".concat(defName, " definition is not executable."), definition)); + } + } + + return false; + } + }; +} + + +/***/ }), + +/***/ 63016: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.FieldsOnCorrectTypeRule = FieldsOnCorrectTypeRule; + +var _arrayFrom = _interopRequireDefault(__nccwpck_require__(86839)); + +var _didYouMean = _interopRequireDefault(__nccwpck_require__(42878)); + +var _suggestionList = _interopRequireDefault(__nccwpck_require__(57704)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Fields on correct type + * + * A GraphQL document is only valid if all fields selected are defined by the + * parent type, or are an allowed meta field such as __typename. + */ +function FieldsOnCorrectTypeRule(context) { + return { + Field: function Field(node) { + var type = context.getParentType(); + + if (type) { + var fieldDef = context.getFieldDef(); + + if (!fieldDef) { + // This field doesn't exist, lets look for suggestions. + var schema = context.getSchema(); + var fieldName = node.name.value; // First determine if there are any suggested types to condition on. + + var suggestion = (0, _didYouMean.default)('to use an inline fragment on', getSuggestedTypeNames(schema, type, fieldName)); // If there are no suggested types, then perhaps this was a typo? + + if (suggestion === '') { + suggestion = (0, _didYouMean.default)(getSuggestedFieldNames(type, fieldName)); + } // Report an error, including helpful suggestions. + + + context.reportError(new _GraphQLError.GraphQLError("Cannot query field \"".concat(fieldName, "\" on type \"").concat(type.name, "\".") + suggestion, node)); + } + } + } + }; +} +/** + * Go through all of the implementations of type, as well as the interfaces that + * they implement. If any of those types include the provided field, suggest them, + * sorted by how often the type is referenced. + */ + + +function getSuggestedTypeNames(schema, type, fieldName) { + if (!(0, _definition.isAbstractType)(type)) { + // Must be an Object type, which does not have possible fields. + return []; + } + + var suggestedTypes = new Set(); + var usageCount = Object.create(null); + + for (var _i2 = 0, _schema$getPossibleTy2 = schema.getPossibleTypes(type); _i2 < _schema$getPossibleTy2.length; _i2++) { + var possibleType = _schema$getPossibleTy2[_i2]; + + if (!possibleType.getFields()[fieldName]) { + continue; + } // This object type defines this field. + + + suggestedTypes.add(possibleType); + usageCount[possibleType.name] = 1; + + for (var _i4 = 0, _possibleType$getInte2 = possibleType.getInterfaces(); _i4 < _possibleType$getInte2.length; _i4++) { + var _usageCount$possibleI; + + var possibleInterface = _possibleType$getInte2[_i4]; + + if (!possibleInterface.getFields()[fieldName]) { + continue; + } // This interface type defines this field. + + + suggestedTypes.add(possibleInterface); + usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1; + } + } + + return (0, _arrayFrom.default)(suggestedTypes).sort(function (typeA, typeB) { + // Suggest both interface and object types based on how common they are. + var usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name]; + + if (usageCountDiff !== 0) { + return usageCountDiff; + } // Suggest super types first followed by subtypes + + + if ((0, _definition.isInterfaceType)(typeA) && schema.isSubType(typeA, typeB)) { + return -1; + } + + if ((0, _definition.isInterfaceType)(typeB) && schema.isSubType(typeB, typeA)) { + return 1; + } + + return typeA.name.localeCompare(typeB.name); + }).map(function (x) { + return x.name; + }); +} +/** + * For the field name provided, determine if there are any similar field names + * that may be the result of a typo. + */ + + +function getSuggestedFieldNames(type, fieldName) { + if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) { + var possibleFieldNames = Object.keys(type.getFields()); + return (0, _suggestionList.default)(fieldName, possibleFieldNames); + } // Otherwise, must be a Union type, which does not define fields. + + + return []; +} + + +/***/ }), + +/***/ 60381: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.FragmentsOnCompositeTypesRule = FragmentsOnCompositeTypesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +var _printer = __nccwpck_require__(68203); + +var _definition = __nccwpck_require__(5821); + +var _typeFromAST = __nccwpck_require__(27664); + +/** + * Fragments on composite type + * + * Fragments use a type condition to determine if they apply, since fragments + * can only be spread into a composite type (object, interface, or union), the + * type condition must also be a composite type. + */ +function FragmentsOnCompositeTypesRule(context) { + return { + InlineFragment: function InlineFragment(node) { + var typeCondition = node.typeCondition; + + if (typeCondition) { + var type = (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition); + + if (type && !(0, _definition.isCompositeType)(type)) { + var typeStr = (0, _printer.print)(typeCondition); + context.reportError(new _GraphQLError.GraphQLError("Fragment cannot condition on non composite type \"".concat(typeStr, "\"."), typeCondition)); + } + } + }, + FragmentDefinition: function FragmentDefinition(node) { + var type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.typeCondition); + + if (type && !(0, _definition.isCompositeType)(type)) { + var typeStr = (0, _printer.print)(node.typeCondition); + context.reportError(new _GraphQLError.GraphQLError("Fragment \"".concat(node.name.value, "\" cannot condition on non composite type \"").concat(typeStr, "\"."), node.typeCondition)); + } + } + }; +} + + +/***/ }), + +/***/ 67147: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.KnownArgumentNamesRule = KnownArgumentNamesRule; +exports.KnownArgumentNamesOnDirectivesRule = KnownArgumentNamesOnDirectivesRule; + +var _didYouMean = _interopRequireDefault(__nccwpck_require__(42878)); + +var _suggestionList = _interopRequireDefault(__nccwpck_require__(57704)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +var _directives = __nccwpck_require__(83614); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/** + * Known argument names + * + * A GraphQL field is only valid if all supplied arguments are defined by + * that field. + */ +function KnownArgumentNamesRule(context) { + return _objectSpread(_objectSpread({}, KnownArgumentNamesOnDirectivesRule(context)), {}, { + Argument: function Argument(argNode) { + var argDef = context.getArgument(); + var fieldDef = context.getFieldDef(); + var parentType = context.getParentType(); + + if (!argDef && fieldDef && parentType) { + var argName = argNode.name.value; + var knownArgsNames = fieldDef.args.map(function (arg) { + return arg.name; + }); + var suggestions = (0, _suggestionList.default)(argName, knownArgsNames); + context.reportError(new _GraphQLError.GraphQLError("Unknown argument \"".concat(argName, "\" on field \"").concat(parentType.name, ".").concat(fieldDef.name, "\".") + (0, _didYouMean.default)(suggestions), argNode)); + } + } + }); +} +/** + * @internal + */ + + +function KnownArgumentNamesOnDirectivesRule(context) { + var directiveArgs = Object.create(null); + var schema = context.getSchema(); + var definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives; + + for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) { + var directive = definedDirectives[_i2]; + directiveArgs[directive.name] = directive.args.map(function (arg) { + return arg.name; + }); + } + + var astDefinitions = context.getDocument().definitions; + + for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) { + var def = astDefinitions[_i4]; + + if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { + var _def$arguments; + + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; + directiveArgs[def.name.value] = argsNodes.map(function (arg) { + return arg.name.value; + }); + } + } + + return { + Directive: function Directive(directiveNode) { + var directiveName = directiveNode.name.value; + var knownArgs = directiveArgs[directiveName]; + + if (directiveNode.arguments && knownArgs) { + for (var _i6 = 0, _directiveNode$argume2 = directiveNode.arguments; _i6 < _directiveNode$argume2.length; _i6++) { + var argNode = _directiveNode$argume2[_i6]; + var argName = argNode.name.value; + + if (knownArgs.indexOf(argName) === -1) { + var suggestions = (0, _suggestionList.default)(argName, knownArgs); + context.reportError(new _GraphQLError.GraphQLError("Unknown argument \"".concat(argName, "\" on directive \"@").concat(directiveName, "\".") + (0, _didYouMean.default)(suggestions), argNode)); + } + } + } + + return false; + } + }; +} + + +/***/ }), + +/***/ 85303: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.KnownDirectivesRule = KnownDirectivesRule; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +var _directiveLocation = __nccwpck_require__(81205); + +var _directives = __nccwpck_require__(83614); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Known directives + * + * A GraphQL document is only valid if all `@directives` are known by the + * schema and legally positioned. + */ +function KnownDirectivesRule(context) { + var locationsMap = Object.create(null); + var schema = context.getSchema(); + var definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives; + + for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) { + var directive = definedDirectives[_i2]; + locationsMap[directive.name] = directive.locations; + } + + var astDefinitions = context.getDocument().definitions; + + for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) { + var def = astDefinitions[_i4]; + + if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { + locationsMap[def.name.value] = def.locations.map(function (name) { + return name.value; + }); + } + } + + return { + Directive: function Directive(node, _key, _parent, _path, ancestors) { + var name = node.name.value; + var locations = locationsMap[name]; + + if (!locations) { + context.reportError(new _GraphQLError.GraphQLError("Unknown directive \"@".concat(name, "\"."), node)); + return; + } + + var candidateLocation = getDirectiveLocationForASTPath(ancestors); + + if (candidateLocation && locations.indexOf(candidateLocation) === -1) { + context.reportError(new _GraphQLError.GraphQLError("Directive \"@".concat(name, "\" may not be used on ").concat(candidateLocation, "."), node)); + } + } + }; +} + +function getDirectiveLocationForASTPath(ancestors) { + var appliedTo = ancestors[ancestors.length - 1]; + !Array.isArray(appliedTo) || (0, _invariant.default)(0); + + switch (appliedTo.kind) { + case _kinds.Kind.OPERATION_DEFINITION: + return getDirectiveLocationForOperation(appliedTo.operation); + + case _kinds.Kind.FIELD: + return _directiveLocation.DirectiveLocation.FIELD; + + case _kinds.Kind.FRAGMENT_SPREAD: + return _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD; + + case _kinds.Kind.INLINE_FRAGMENT: + return _directiveLocation.DirectiveLocation.INLINE_FRAGMENT; + + case _kinds.Kind.FRAGMENT_DEFINITION: + return _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION; + + case _kinds.Kind.VARIABLE_DEFINITION: + return _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION; + + case _kinds.Kind.SCHEMA_DEFINITION: + case _kinds.Kind.SCHEMA_EXTENSION: + return _directiveLocation.DirectiveLocation.SCHEMA; + + case _kinds.Kind.SCALAR_TYPE_DEFINITION: + case _kinds.Kind.SCALAR_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.SCALAR; + + case _kinds.Kind.OBJECT_TYPE_DEFINITION: + case _kinds.Kind.OBJECT_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.OBJECT; + + case _kinds.Kind.FIELD_DEFINITION: + return _directiveLocation.DirectiveLocation.FIELD_DEFINITION; + + case _kinds.Kind.INTERFACE_TYPE_DEFINITION: + case _kinds.Kind.INTERFACE_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.INTERFACE; + + case _kinds.Kind.UNION_TYPE_DEFINITION: + case _kinds.Kind.UNION_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.UNION; + + case _kinds.Kind.ENUM_TYPE_DEFINITION: + case _kinds.Kind.ENUM_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.ENUM; + + case _kinds.Kind.ENUM_VALUE_DEFINITION: + return _directiveLocation.DirectiveLocation.ENUM_VALUE; + + case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION: + case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION: + return _directiveLocation.DirectiveLocation.INPUT_OBJECT; + + case _kinds.Kind.INPUT_VALUE_DEFINITION: + { + var parentNode = ancestors[ancestors.length - 3]; + return parentNode.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION ? _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION : _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION; + } + } +} + +function getDirectiveLocationForOperation(operation) { + switch (operation) { + case 'query': + return _directiveLocation.DirectiveLocation.QUERY; + + case 'mutation': + return _directiveLocation.DirectiveLocation.MUTATION; + + case 'subscription': + return _directiveLocation.DirectiveLocation.SUBSCRIPTION; + } // istanbul ignore next (Not reachable. All possible types have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected operation: ' + (0, _inspect.default)(operation)); +} + + +/***/ }), + +/***/ 15166: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.KnownFragmentNamesRule = KnownFragmentNamesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Known fragment names + * + * A GraphQL document is only valid if all `...Fragment` fragment spreads refer + * to fragments defined in the same document. + */ +function KnownFragmentNamesRule(context) { + return { + FragmentSpread: function FragmentSpread(node) { + var fragmentName = node.name.value; + var fragment = context.getFragment(fragmentName); + + if (!fragment) { + context.reportError(new _GraphQLError.GraphQLError("Unknown fragment \"".concat(fragmentName, "\"."), node.name)); + } + } + }; +} + + +/***/ }), + +/***/ 42509: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.KnownTypeNamesRule = KnownTypeNamesRule; + +var _didYouMean = _interopRequireDefault(__nccwpck_require__(42878)); + +var _suggestionList = _interopRequireDefault(__nccwpck_require__(57704)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _predicates = __nccwpck_require__(20535); + +var _scalars = __nccwpck_require__(93145); + +var _introspection = __nccwpck_require__(28344); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Known type names + * + * A GraphQL document is only valid if referenced types (specifically + * variable definitions and fragment conditions) are defined by the type schema. + */ +function KnownTypeNamesRule(context) { + var schema = context.getSchema(); + var existingTypesMap = schema ? schema.getTypeMap() : Object.create(null); + var definedTypes = Object.create(null); + + for (var _i2 = 0, _context$getDocument$2 = context.getDocument().definitions; _i2 < _context$getDocument$2.length; _i2++) { + var def = _context$getDocument$2[_i2]; + + if ((0, _predicates.isTypeDefinitionNode)(def)) { + definedTypes[def.name.value] = true; + } + } + + var typeNames = Object.keys(existingTypesMap).concat(Object.keys(definedTypes)); + return { + NamedType: function NamedType(node, _1, parent, _2, ancestors) { + var typeName = node.name.value; + + if (!existingTypesMap[typeName] && !definedTypes[typeName]) { + var _ancestors$; + + var definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent; + var isSDL = definitionNode != null && isSDLNode(definitionNode); + + if (isSDL && isStandardTypeName(typeName)) { + return; + } + + var suggestedTypes = (0, _suggestionList.default)(typeName, isSDL ? standardTypeNames.concat(typeNames) : typeNames); + context.reportError(new _GraphQLError.GraphQLError("Unknown type \"".concat(typeName, "\".") + (0, _didYouMean.default)(suggestedTypes), node)); + } + } + }; +} + +var standardTypeNames = [].concat(_scalars.specifiedScalarTypes, _introspection.introspectionTypes).map(function (type) { + return type.name; +}); + +function isStandardTypeName(typeName) { + return standardTypeNames.indexOf(typeName) !== -1; +} + +function isSDLNode(value) { + return !Array.isArray(value) && ((0, _predicates.isTypeSystemDefinitionNode)(value) || (0, _predicates.isTypeSystemExtensionNode)(value)); +} + + +/***/ }), + +/***/ 45726: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.LoneAnonymousOperationRule = LoneAnonymousOperationRule; + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +/** + * Lone anonymous operation + * + * A GraphQL document is only valid if when it contains an anonymous operation + * (the query short-hand) that it contains only that one operation definition. + */ +function LoneAnonymousOperationRule(context) { + var operationCount = 0; + return { + Document: function Document(node) { + operationCount = node.definitions.filter(function (definition) { + return definition.kind === _kinds.Kind.OPERATION_DEFINITION; + }).length; + }, + OperationDefinition: function OperationDefinition(node) { + if (!node.name && operationCount > 1) { + context.reportError(new _GraphQLError.GraphQLError('This anonymous operation must be the only defined operation.', node)); + } + } + }; +} + + +/***/ }), + +/***/ 48307: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.LoneSchemaDefinitionRule = LoneSchemaDefinitionRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Lone Schema definition + * + * A GraphQL document is only valid if it contains only one schema definition. + */ +function LoneSchemaDefinitionRule(context) { + var _ref, _ref2, _oldSchema$astNode; + + var oldSchema = context.getSchema(); + var alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType(); + var schemaDefinitionsCount = 0; + return { + SchemaDefinition: function SchemaDefinition(node) { + if (alreadyDefined) { + context.reportError(new _GraphQLError.GraphQLError('Cannot define a new schema within a schema extension.', node)); + return; + } + + if (schemaDefinitionsCount > 0) { + context.reportError(new _GraphQLError.GraphQLError('Must provide only one schema definition.', node)); + } + + ++schemaDefinitionsCount; + } + }; +} + + +/***/ }), + +/***/ 62564: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoFragmentCyclesRule = NoFragmentCyclesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +function NoFragmentCyclesRule(context) { + // Tracks already visited fragments to maintain O(N) and to ensure that cycles + // are not redundantly reported. + var visitedFrags = Object.create(null); // Array of AST nodes used to produce meaningful errors + + var spreadPath = []; // Position in the spread path + + var spreadPathIndexByName = Object.create(null); + return { + OperationDefinition: function OperationDefinition() { + return false; + }, + FragmentDefinition: function FragmentDefinition(node) { + detectCycleRecursive(node); + return false; + } + }; // This does a straight-forward DFS to find cycles. + // It does not terminate when a cycle was found but continues to explore + // the graph to find all possible cycles. + + function detectCycleRecursive(fragment) { + if (visitedFrags[fragment.name.value]) { + return; + } + + var fragmentName = fragment.name.value; + visitedFrags[fragmentName] = true; + var spreadNodes = context.getFragmentSpreads(fragment.selectionSet); + + if (spreadNodes.length === 0) { + return; + } + + spreadPathIndexByName[fragmentName] = spreadPath.length; + + for (var _i2 = 0; _i2 < spreadNodes.length; _i2++) { + var spreadNode = spreadNodes[_i2]; + var spreadName = spreadNode.name.value; + var cycleIndex = spreadPathIndexByName[spreadName]; + spreadPath.push(spreadNode); + + if (cycleIndex === undefined) { + var spreadFragment = context.getFragment(spreadName); + + if (spreadFragment) { + detectCycleRecursive(spreadFragment); + } + } else { + var cyclePath = spreadPath.slice(cycleIndex); + var viaPath = cyclePath.slice(0, -1).map(function (s) { + return '"' + s.name.value + '"'; + }).join(', '); + context.reportError(new _GraphQLError.GraphQLError("Cannot spread fragment \"".concat(spreadName, "\" within itself") + (viaPath !== '' ? " via ".concat(viaPath, ".") : '.'), cyclePath)); + } + + spreadPath.pop(); + } + + spreadPathIndexByName[fragmentName] = undefined; + } +} + + +/***/ }), + +/***/ 61671: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoUndefinedVariablesRule = NoUndefinedVariablesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * No undefined variables + * + * A GraphQL operation is only valid if all variables encountered, both directly + * and via fragment spreads, are defined by that operation. + */ +function NoUndefinedVariablesRule(context) { + var variableNameDefined = Object.create(null); + return { + OperationDefinition: { + enter: function enter() { + variableNameDefined = Object.create(null); + }, + leave: function leave(operation) { + var usages = context.getRecursiveVariableUsages(operation); + + for (var _i2 = 0; _i2 < usages.length; _i2++) { + var _ref2 = usages[_i2]; + var node = _ref2.node; + var varName = node.name.value; + + if (variableNameDefined[varName] !== true) { + context.reportError(new _GraphQLError.GraphQLError(operation.name ? "Variable \"$".concat(varName, "\" is not defined by operation \"").concat(operation.name.value, "\".") : "Variable \"$".concat(varName, "\" is not defined."), [node, operation])); + } + } + } + }, + VariableDefinition: function VariableDefinition(node) { + variableNameDefined[node.variable.name.value] = true; + } + }; +} + + +/***/ }), + +/***/ 192: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoUnusedFragmentsRule = NoUnusedFragmentsRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * No unused fragments + * + * A GraphQL document is only valid if all fragment definitions are spread + * within operations, or spread within other fragments spread within operations. + */ +function NoUnusedFragmentsRule(context) { + var operationDefs = []; + var fragmentDefs = []; + return { + OperationDefinition: function OperationDefinition(node) { + operationDefs.push(node); + return false; + }, + FragmentDefinition: function FragmentDefinition(node) { + fragmentDefs.push(node); + return false; + }, + Document: { + leave: function leave() { + var fragmentNameUsed = Object.create(null); + + for (var _i2 = 0; _i2 < operationDefs.length; _i2++) { + var operation = operationDefs[_i2]; + + for (var _i4 = 0, _context$getRecursive2 = context.getRecursivelyReferencedFragments(operation); _i4 < _context$getRecursive2.length; _i4++) { + var fragment = _context$getRecursive2[_i4]; + fragmentNameUsed[fragment.name.value] = true; + } + } + + for (var _i6 = 0; _i6 < fragmentDefs.length; _i6++) { + var fragmentDef = fragmentDefs[_i6]; + var fragName = fragmentDef.name.value; + + if (fragmentNameUsed[fragName] !== true) { + context.reportError(new _GraphQLError.GraphQLError("Fragment \"".concat(fragName, "\" is never used."), fragmentDef)); + } + } + } + } + }; +} + + +/***/ }), + +/***/ 40242: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoUnusedVariablesRule = NoUnusedVariablesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * No unused variables + * + * A GraphQL operation is only valid if all variables defined by an operation + * are used, either directly or within a spread fragment. + */ +function NoUnusedVariablesRule(context) { + var variableDefs = []; + return { + OperationDefinition: { + enter: function enter() { + variableDefs = []; + }, + leave: function leave(operation) { + var variableNameUsed = Object.create(null); + var usages = context.getRecursiveVariableUsages(operation); + + for (var _i2 = 0; _i2 < usages.length; _i2++) { + var _ref2 = usages[_i2]; + var node = _ref2.node; + variableNameUsed[node.name.value] = true; + } + + for (var _i4 = 0, _variableDefs2 = variableDefs; _i4 < _variableDefs2.length; _i4++) { + var variableDef = _variableDefs2[_i4]; + var variableName = variableDef.variable.name.value; + + if (variableNameUsed[variableName] !== true) { + context.reportError(new _GraphQLError.GraphQLError(operation.name ? "Variable \"$".concat(variableName, "\" is never used in operation \"").concat(operation.name.value, "\".") : "Variable \"$".concat(variableName, "\" is never used."), variableDef)); + } + } + } + }, + VariableDefinition: function VariableDefinition(def) { + variableDefs.push(def); + } + }; +} + + +/***/ }), + +/***/ 23577: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.OverlappingFieldsCanBeMergedRule = OverlappingFieldsCanBeMergedRule; + +var _find = _interopRequireDefault(__nccwpck_require__(57649)); + +var _objectEntries3 = _interopRequireDefault(__nccwpck_require__(86422)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +var _printer = __nccwpck_require__(68203); + +var _definition = __nccwpck_require__(5821); + +var _typeFromAST = __nccwpck_require__(27664); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function reasonMessage(reason) { + if (Array.isArray(reason)) { + return reason.map(function (_ref) { + var responseName = _ref[0], + subReason = _ref[1]; + return "subfields \"".concat(responseName, "\" conflict because ") + reasonMessage(subReason); + }).join(' and '); + } + + return reason; +} +/** + * Overlapping fields can be merged + * + * A selection set is only valid if all fields (including spreading any + * fragments) either correspond to distinct response names or can be merged + * without ambiguity. + */ + + +function OverlappingFieldsCanBeMergedRule(context) { + // A memoization for when two fragments are compared "between" each other for + // conflicts. Two fragments may be compared many times, so memoizing this can + // dramatically improve the performance of this validator. + var comparedFragmentPairs = new PairSet(); // A cache for the "field map" and list of fragment names found in any given + // selection set. Selection sets may be asked for this information multiple + // times, so this improves the performance of this validator. + + var cachedFieldsAndFragmentNames = new Map(); + return { + SelectionSet: function SelectionSet(selectionSet) { + var conflicts = findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, context.getParentType(), selectionSet); + + for (var _i2 = 0; _i2 < conflicts.length; _i2++) { + var _ref3 = conflicts[_i2]; + var _ref2$ = _ref3[0]; + var responseName = _ref2$[0]; + var reason = _ref2$[1]; + var fields1 = _ref3[1]; + var fields2 = _ref3[2]; + var reasonMsg = reasonMessage(reason); + context.reportError(new _GraphQLError.GraphQLError("Fields \"".concat(responseName, "\" conflict because ").concat(reasonMsg, ". Use different aliases on the fields to fetch both if this was intentional."), fields1.concat(fields2))); + } + } + }; +} + +/** + * Algorithm: + * + * Conflicts occur when two fields exist in a query which will produce the same + * response name, but represent differing values, thus creating a conflict. + * The algorithm below finds all conflicts via making a series of comparisons + * between fields. In order to compare as few fields as possible, this makes + * a series of comparisons "within" sets of fields and "between" sets of fields. + * + * Given any selection set, a collection produces both a set of fields by + * also including all inline fragments, as well as a list of fragments + * referenced by fragment spreads. + * + * A) Each selection set represented in the document first compares "within" its + * collected set of fields, finding any conflicts between every pair of + * overlapping fields. + * Note: This is the *only time* that a the fields "within" a set are compared + * to each other. After this only fields "between" sets are compared. + * + * B) Also, if any fragment is referenced in a selection set, then a + * comparison is made "between" the original set of fields and the + * referenced fragment. + * + * C) Also, if multiple fragments are referenced, then comparisons + * are made "between" each referenced fragment. + * + * D) When comparing "between" a set of fields and a referenced fragment, first + * a comparison is made between each field in the original set of fields and + * each field in the the referenced set of fields. + * + * E) Also, if any fragment is referenced in the referenced selection set, + * then a comparison is made "between" the original set of fields and the + * referenced fragment (recursively referring to step D). + * + * F) When comparing "between" two fragments, first a comparison is made between + * each field in the first referenced set of fields and each field in the the + * second referenced set of fields. + * + * G) Also, any fragments referenced by the first must be compared to the + * second, and any fragments referenced by the second must be compared to the + * first (recursively referring to step F). + * + * H) When comparing two fields, if both have selection sets, then a comparison + * is made "between" both selection sets, first comparing the set of fields in + * the first selection set with the set of fields in the second. + * + * I) Also, if any fragment is referenced in either selection set, then a + * comparison is made "between" the other set of fields and the + * referenced fragment. + * + * J) Also, if two fragments are referenced in both selection sets, then a + * comparison is made "between" the two fragments. + * + */ +// Find all conflicts found "within" a selection set, including those found +// via spreading in fragments. Called when visiting each SelectionSet in the +// GraphQL Document. +function findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentType, selectionSet) { + var conflicts = []; + + var _getFieldsAndFragment = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet), + fieldMap = _getFieldsAndFragment[0], + fragmentNames = _getFieldsAndFragment[1]; // (A) Find find all conflicts "within" the fields of this selection set. + // Note: this is the *only place* `collectConflictsWithin` is called. + + + collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap); + + if (fragmentNames.length !== 0) { + // (B) Then collect conflicts between these fields and those represented by + // each spread fragment name found. + for (var i = 0; i < fragmentNames.length; i++) { + collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fieldMap, fragmentNames[i]); // (C) Then compare this fragment with all other fragments found in this + // selection set to collect conflicts between fragments spread together. + // This compares each item in the list of fragment names to every other + // item in that same list (except for itself). + + for (var j = i + 1; j < fragmentNames.length; j++) { + collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fragmentNames[i], fragmentNames[j]); + } + } + } + + return conflicts; +} // Collect all conflicts found between a set of fields and a fragment reference +// including via spreading in any nested fragments. + + +function collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) { + var fragment = context.getFragment(fragmentName); + + if (!fragment) { + return; + } + + var _getReferencedFieldsA = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment), + fieldMap2 = _getReferencedFieldsA[0], + fragmentNames2 = _getReferencedFieldsA[1]; // Do not compare a fragment's fieldMap to itself. + + + if (fieldMap === fieldMap2) { + return; + } // (D) First collect any conflicts between the provided collection of fields + // and the collection of fields represented by the given fragment. + + + collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fieldMap2); // (E) Then collect any conflicts between the provided collection of fields + // and any fragment names found in the given fragment. + + for (var i = 0; i < fragmentNames2.length; i++) { + collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentNames2[i]); + } +} // Collect all conflicts found between two fragments, including via spreading in +// any nested fragments. + + +function collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) { + // No need to compare a fragment to itself. + if (fragmentName1 === fragmentName2) { + return; + } // Memoize so two fragments are not compared for conflicts more than once. + + + if (comparedFragmentPairs.has(fragmentName1, fragmentName2, areMutuallyExclusive)) { + return; + } + + comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive); + var fragment1 = context.getFragment(fragmentName1); + var fragment2 = context.getFragment(fragmentName2); + + if (!fragment1 || !fragment2) { + return; + } + + var _getReferencedFieldsA2 = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment1), + fieldMap1 = _getReferencedFieldsA2[0], + fragmentNames1 = _getReferencedFieldsA2[1]; + + var _getReferencedFieldsA3 = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment2), + fieldMap2 = _getReferencedFieldsA3[0], + fragmentNames2 = _getReferencedFieldsA3[1]; // (F) First, collect all conflicts between these two collections of fields + // (not including any nested fragments). + + + collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (G) Then collect conflicts between the first fragment and any nested + // fragments spread in the second fragment. + + for (var j = 0; j < fragmentNames2.length; j++) { + collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentNames2[j]); + } // (G) Then collect conflicts between the second fragment and any nested + // fragments spread in the first fragment. + + + for (var i = 0; i < fragmentNames1.length; i++) { + collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentNames1[i], fragmentName2); + } +} // Find all conflicts found between two selection sets, including those found +// via spreading in fragments. Called when determining if conflicts exist +// between the sub-fields of two overlapping fields. + + +function findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) { + var conflicts = []; + + var _getFieldsAndFragment2 = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType1, selectionSet1), + fieldMap1 = _getFieldsAndFragment2[0], + fragmentNames1 = _getFieldsAndFragment2[1]; + + var _getFieldsAndFragment3 = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType2, selectionSet2), + fieldMap2 = _getFieldsAndFragment3[0], + fragmentNames2 = _getFieldsAndFragment3[1]; // (H) First, collect all conflicts between these two collections of field. + + + collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (I) Then collect conflicts between the first collection of fields and + // those referenced by each fragment name associated with the second. + + if (fragmentNames2.length !== 0) { + for (var j = 0; j < fragmentNames2.length; j++) { + collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fragmentNames2[j]); + } + } // (I) Then collect conflicts between the second collection of fields and + // those referenced by each fragment name associated with the first. + + + if (fragmentNames1.length !== 0) { + for (var i = 0; i < fragmentNames1.length; i++) { + collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap2, fragmentNames1[i]); + } + } // (J) Also collect conflicts between any fragment names by the first and + // fragment names by the second. This compares each item in the first set of + // names to each item in the second set of names. + + + for (var _i3 = 0; _i3 < fragmentNames1.length; _i3++) { + for (var _j = 0; _j < fragmentNames2.length; _j++) { + collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentNames1[_i3], fragmentNames2[_j]); + } + } + + return conflicts; +} // Collect all Conflicts "within" one collection of fields. + + +function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap) { + // A field map is a keyed collection, where each key represents a response + // name and the value at that key is a list of all fields which provide that + // response name. For every response name, if there are multiple fields, they + // must be compared to find a potential conflict. + for (var _i5 = 0, _objectEntries2 = (0, _objectEntries3.default)(fieldMap); _i5 < _objectEntries2.length; _i5++) { + var _ref5 = _objectEntries2[_i5]; + var responseName = _ref5[0]; + var fields = _ref5[1]; + + // This compares every field in the list to every other field in this list + // (except to itself). If the list only has one item, nothing needs to + // be compared. + if (fields.length > 1) { + for (var i = 0; i < fields.length; i++) { + for (var j = i + 1; j < fields.length; j++) { + var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, // within one collection is never mutually exclusive + responseName, fields[i], fields[j]); + + if (conflict) { + conflicts.push(conflict); + } + } + } + } + } +} // Collect all Conflicts between two collections of fields. This is similar to, +// but different from the `collectConflictsWithin` function above. This check +// assumes that `collectConflictsWithin` has already been called on each +// provided collection of fields. This is true because this validator traverses +// each individual selection set. + + +function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) { + // A field map is a keyed collection, where each key represents a response + // name and the value at that key is a list of all fields which provide that + // response name. For any response name which appears in both provided field + // maps, each field from the first field map must be compared to every field + // in the second field map to find potential conflicts. + for (var _i7 = 0, _Object$keys2 = Object.keys(fieldMap1); _i7 < _Object$keys2.length; _i7++) { + var responseName = _Object$keys2[_i7]; + var fields2 = fieldMap2[responseName]; + + if (fields2) { + var fields1 = fieldMap1[responseName]; + + for (var i = 0; i < fields1.length; i++) { + for (var j = 0; j < fields2.length; j++) { + var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, fields1[i], fields2[j]); + + if (conflict) { + conflicts.push(conflict); + } + } + } + } + } +} // Determines if there is a conflict between two particular fields, including +// comparing their sub-fields. + + +function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) { + var parentType1 = field1[0], + node1 = field1[1], + def1 = field1[2]; + var parentType2 = field2[0], + node2 = field2[1], + def2 = field2[2]; // If it is known that two fields could not possibly apply at the same + // time, due to the parent types, then it is safe to permit them to diverge + // in aliased field or arguments used as they will not present any ambiguity + // by differing. + // It is known that two parent types could never overlap if they are + // different Object types. Interface or Union types might overlap - if not + // in the current state of the schema, then perhaps in some future version, + // thus may not safely diverge. + + var areMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && (0, _definition.isObjectType)(parentType1) && (0, _definition.isObjectType)(parentType2); + + if (!areMutuallyExclusive) { + var _node1$arguments, _node2$arguments; + + // Two aliases must refer to the same field. + var name1 = node1.name.value; + var name2 = node2.name.value; + + if (name1 !== name2) { + return [[responseName, "\"".concat(name1, "\" and \"").concat(name2, "\" are different fields")], [node1], [node2]]; + } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + + + var args1 = (_node1$arguments = node1.arguments) !== null && _node1$arguments !== void 0 ? _node1$arguments : []; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + + var args2 = (_node2$arguments = node2.arguments) !== null && _node2$arguments !== void 0 ? _node2$arguments : []; // Two field calls must have the same arguments. + + if (!sameArguments(args1, args2)) { + return [[responseName, 'they have differing arguments'], [node1], [node2]]; + } + } // The return type for each field. + + + var type1 = def1 === null || def1 === void 0 ? void 0 : def1.type; + var type2 = def2 === null || def2 === void 0 ? void 0 : def2.type; + + if (type1 && type2 && doTypesConflict(type1, type2)) { + return [[responseName, "they return conflicting types \"".concat((0, _inspect.default)(type1), "\" and \"").concat((0, _inspect.default)(type2), "\"")], [node1], [node2]]; + } // Collect and compare sub-fields. Use the same "visited fragment names" list + // for both collections so fields in a fragment reference are never + // compared to themselves. + + + var selectionSet1 = node1.selectionSet; + var selectionSet2 = node2.selectionSet; + + if (selectionSet1 && selectionSet2) { + var conflicts = findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, (0, _definition.getNamedType)(type1), selectionSet1, (0, _definition.getNamedType)(type2), selectionSet2); + return subfieldConflicts(conflicts, responseName, node1, node2); + } +} + +function sameArguments(arguments1, arguments2) { + if (arguments1.length !== arguments2.length) { + return false; + } + + return arguments1.every(function (argument1) { + var argument2 = (0, _find.default)(arguments2, function (argument) { + return argument.name.value === argument1.name.value; + }); + + if (!argument2) { + return false; + } + + return sameValue(argument1.value, argument2.value); + }); +} + +function sameValue(value1, value2) { + return (0, _printer.print)(value1) === (0, _printer.print)(value2); +} // Two types conflict if both types could not apply to a value simultaneously. +// Composite types are ignored as their individual field types will be compared +// later recursively. However List and Non-Null types must match. + + +function doTypesConflict(type1, type2) { + if ((0, _definition.isListType)(type1)) { + return (0, _definition.isListType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; + } + + if ((0, _definition.isListType)(type2)) { + return true; + } + + if ((0, _definition.isNonNullType)(type1)) { + return (0, _definition.isNonNullType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; + } + + if ((0, _definition.isNonNullType)(type2)) { + return true; + } + + if ((0, _definition.isLeafType)(type1) || (0, _definition.isLeafType)(type2)) { + return type1 !== type2; + } + + return false; +} // Given a selection set, return the collection of fields (a mapping of response +// name to field nodes and definitions) as well as a list of fragment names +// referenced via fragment spreads. + + +function getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet) { + var cached = cachedFieldsAndFragmentNames.get(selectionSet); + + if (!cached) { + var nodeAndDefs = Object.create(null); + var fragmentNames = Object.create(null); + + _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames); + + cached = [nodeAndDefs, Object.keys(fragmentNames)]; + cachedFieldsAndFragmentNames.set(selectionSet, cached); + } + + return cached; +} // Given a reference to a fragment, return the represented collection of fields +// as well as a list of nested fragment names referenced via fragment spreads. + + +function getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment) { + // Short-circuit building a type from the node if possible. + var cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet); + + if (cached) { + return cached; + } + + var fragmentType = (0, _typeFromAST.typeFromAST)(context.getSchema(), fragment.typeCondition); + return getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragmentType, fragment.selectionSet); +} + +function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames) { + for (var _i9 = 0, _selectionSet$selecti2 = selectionSet.selections; _i9 < _selectionSet$selecti2.length; _i9++) { + var selection = _selectionSet$selecti2[_i9]; + + switch (selection.kind) { + case _kinds.Kind.FIELD: + { + var fieldName = selection.name.value; + var fieldDef = void 0; + + if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) { + fieldDef = parentType.getFields()[fieldName]; + } + + var responseName = selection.alias ? selection.alias.value : fieldName; + + if (!nodeAndDefs[responseName]) { + nodeAndDefs[responseName] = []; + } + + nodeAndDefs[responseName].push([parentType, selection, fieldDef]); + break; + } + + case _kinds.Kind.FRAGMENT_SPREAD: + fragmentNames[selection.name.value] = true; + break; + + case _kinds.Kind.INLINE_FRAGMENT: + { + var typeCondition = selection.typeCondition; + var inlineFragmentType = typeCondition ? (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition) : parentType; + + _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames); + + break; + } + } + } +} // Given a series of Conflicts which occurred between two sub-fields, generate +// a single Conflict. + + +function subfieldConflicts(conflicts, responseName, node1, node2) { + if (conflicts.length > 0) { + return [[responseName, conflicts.map(function (_ref6) { + var reason = _ref6[0]; + return reason; + })], conflicts.reduce(function (allFields, _ref7) { + var fields1 = _ref7[1]; + return allFields.concat(fields1); + }, [node1]), conflicts.reduce(function (allFields, _ref8) { + var fields2 = _ref8[2]; + return allFields.concat(fields2); + }, [node2])]; + } +} +/** + * A way to keep track of pairs of things when the ordering of the pair does + * not matter. We do this by maintaining a sort of double adjacency sets. + */ + + +var PairSet = /*#__PURE__*/function () { + function PairSet() { + this._data = Object.create(null); + } + + var _proto = PairSet.prototype; + + _proto.has = function has(a, b, areMutuallyExclusive) { + var first = this._data[a]; + var result = first && first[b]; + + if (result === undefined) { + return false; + } // areMutuallyExclusive being false is a superset of being true, + // hence if we want to know if this PairSet "has" these two with no + // exclusivity, we have to ensure it was added as such. + + + if (areMutuallyExclusive === false) { + return result === false; + } + + return true; + }; + + _proto.add = function add(a, b, areMutuallyExclusive) { + this._pairSetAdd(a, b, areMutuallyExclusive); + + this._pairSetAdd(b, a, areMutuallyExclusive); + }; + + _proto._pairSetAdd = function _pairSetAdd(a, b, areMutuallyExclusive) { + var map = this._data[a]; + + if (!map) { + map = Object.create(null); + this._data[a] = map; + } + + map[b] = areMutuallyExclusive; + }; + + return PairSet; +}(); + + +/***/ }), + +/***/ 62450: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PossibleFragmentSpreadsRule = PossibleFragmentSpreadsRule; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _definition = __nccwpck_require__(5821); + +var _typeFromAST = __nccwpck_require__(27664); + +var _typeComparators = __nccwpck_require__(10333); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Possible fragment spread + * + * A fragment spread is only valid if the type condition could ever possibly + * be true: if there is a non-empty intersection of the possible parent types, + * and possible types which pass the type condition. + */ +function PossibleFragmentSpreadsRule(context) { + return { + InlineFragment: function InlineFragment(node) { + var fragType = context.getType(); + var parentType = context.getParentType(); + + if ((0, _definition.isCompositeType)(fragType) && (0, _definition.isCompositeType)(parentType) && !(0, _typeComparators.doTypesOverlap)(context.getSchema(), fragType, parentType)) { + var parentTypeStr = (0, _inspect.default)(parentType); + var fragTypeStr = (0, _inspect.default)(fragType); + context.reportError(new _GraphQLError.GraphQLError("Fragment cannot be spread here as objects of type \"".concat(parentTypeStr, "\" can never be of type \"").concat(fragTypeStr, "\"."), node)); + } + }, + FragmentSpread: function FragmentSpread(node) { + var fragName = node.name.value; + var fragType = getFragmentType(context, fragName); + var parentType = context.getParentType(); + + if (fragType && parentType && !(0, _typeComparators.doTypesOverlap)(context.getSchema(), fragType, parentType)) { + var parentTypeStr = (0, _inspect.default)(parentType); + var fragTypeStr = (0, _inspect.default)(fragType); + context.reportError(new _GraphQLError.GraphQLError("Fragment \"".concat(fragName, "\" cannot be spread here as objects of type \"").concat(parentTypeStr, "\" can never be of type \"").concat(fragTypeStr, "\"."), node)); + } + } + }; +} + +function getFragmentType(context, name) { + var frag = context.getFragment(name); + + if (frag) { + var type = (0, _typeFromAST.typeFromAST)(context.getSchema(), frag.typeCondition); + + if ((0, _definition.isCompositeType)(type)) { + return type; + } + } +} + + +/***/ }), + +/***/ 70075: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PossibleTypeExtensionsRule = PossibleTypeExtensionsRule; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _didYouMean = _interopRequireDefault(__nccwpck_require__(42878)); + +var _suggestionList = _interopRequireDefault(__nccwpck_require__(57704)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +var _predicates = __nccwpck_require__(20535); + +var _definition = __nccwpck_require__(5821); + +var _defKindToExtKind; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/** + * Possible type extension + * + * A type extension is only valid if the type is defined and has the same kind. + */ +function PossibleTypeExtensionsRule(context) { + var schema = context.getSchema(); + var definedTypes = Object.create(null); + + for (var _i2 = 0, _context$getDocument$2 = context.getDocument().definitions; _i2 < _context$getDocument$2.length; _i2++) { + var def = _context$getDocument$2[_i2]; + + if ((0, _predicates.isTypeDefinitionNode)(def)) { + definedTypes[def.name.value] = def; + } + } + + return { + ScalarTypeExtension: checkExtension, + ObjectTypeExtension: checkExtension, + InterfaceTypeExtension: checkExtension, + UnionTypeExtension: checkExtension, + EnumTypeExtension: checkExtension, + InputObjectTypeExtension: checkExtension + }; + + function checkExtension(node) { + var typeName = node.name.value; + var defNode = definedTypes[typeName]; + var existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName); + var expectedKind; + + if (defNode) { + expectedKind = defKindToExtKind[defNode.kind]; + } else if (existingType) { + expectedKind = typeToExtKind(existingType); + } + + if (expectedKind) { + if (expectedKind !== node.kind) { + var kindStr = extensionKindToTypeName(node.kind); + context.reportError(new _GraphQLError.GraphQLError("Cannot extend non-".concat(kindStr, " type \"").concat(typeName, "\"."), defNode ? [defNode, node] : node)); + } + } else { + var allTypeNames = Object.keys(definedTypes); + + if (schema) { + allTypeNames = allTypeNames.concat(Object.keys(schema.getTypeMap())); + } + + var suggestedTypes = (0, _suggestionList.default)(typeName, allTypeNames); + context.reportError(new _GraphQLError.GraphQLError("Cannot extend type \"".concat(typeName, "\" because it is not defined.") + (0, _didYouMean.default)(suggestedTypes), node.name)); + } + } +} + +var defKindToExtKind = (_defKindToExtKind = {}, _defineProperty(_defKindToExtKind, _kinds.Kind.SCALAR_TYPE_DEFINITION, _kinds.Kind.SCALAR_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, _kinds.Kind.OBJECT_TYPE_DEFINITION, _kinds.Kind.OBJECT_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, _kinds.Kind.INTERFACE_TYPE_DEFINITION, _kinds.Kind.INTERFACE_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, _kinds.Kind.UNION_TYPE_DEFINITION, _kinds.Kind.UNION_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, _kinds.Kind.ENUM_TYPE_DEFINITION, _kinds.Kind.ENUM_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION, _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION), _defKindToExtKind); + +function typeToExtKind(type) { + if ((0, _definition.isScalarType)(type)) { + return _kinds.Kind.SCALAR_TYPE_EXTENSION; + } + + if ((0, _definition.isObjectType)(type)) { + return _kinds.Kind.OBJECT_TYPE_EXTENSION; + } + + if ((0, _definition.isInterfaceType)(type)) { + return _kinds.Kind.INTERFACE_TYPE_EXTENSION; + } + + if ((0, _definition.isUnionType)(type)) { + return _kinds.Kind.UNION_TYPE_EXTENSION; + } + + if ((0, _definition.isEnumType)(type)) { + return _kinds.Kind.ENUM_TYPE_EXTENSION; + } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618') + + + if ((0, _definition.isInputObjectType)(type)) { + return _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION; + } // istanbul ignore next (Not reachable. All possible types have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected type: ' + (0, _inspect.default)(type)); +} + +function extensionKindToTypeName(kind) { + switch (kind) { + case _kinds.Kind.SCALAR_TYPE_EXTENSION: + return 'scalar'; + + case _kinds.Kind.OBJECT_TYPE_EXTENSION: + return 'object'; + + case _kinds.Kind.INTERFACE_TYPE_EXTENSION: + return 'interface'; + + case _kinds.Kind.UNION_TYPE_EXTENSION: + return 'union'; + + case _kinds.Kind.ENUM_TYPE_EXTENSION: + return 'enum'; + + case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION: + return 'input object'; + } // istanbul ignore next (Not reachable. All possible types have been considered) + + + false || (0, _invariant.default)(0, 'Unexpected kind: ' + (0, _inspect.default)(kind)); +} + + +/***/ }), + +/***/ 57669: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ProvidedRequiredArgumentsRule = ProvidedRequiredArgumentsRule; +exports.ProvidedRequiredArgumentsOnDirectivesRule = ProvidedRequiredArgumentsOnDirectivesRule; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _keyMap = _interopRequireDefault(__nccwpck_require__(10711)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +var _printer = __nccwpck_require__(68203); + +var _directives = __nccwpck_require__(83614); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/** + * Provided required arguments + * + * A field or directive is only valid if all required (non-null without a + * default value) field arguments have been provided. + */ +function ProvidedRequiredArgumentsRule(context) { + return _objectSpread(_objectSpread({}, ProvidedRequiredArgumentsOnDirectivesRule(context)), {}, { + Field: { + // Validate on leave to allow for deeper errors to appear first. + leave: function leave(fieldNode) { + var _fieldNode$arguments; + + var fieldDef = context.getFieldDef(); + + if (!fieldDef) { + return false; + } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + + + var argNodes = (_fieldNode$arguments = fieldNode.arguments) !== null && _fieldNode$arguments !== void 0 ? _fieldNode$arguments : []; + var argNodeMap = (0, _keyMap.default)(argNodes, function (arg) { + return arg.name.value; + }); + + for (var _i2 = 0, _fieldDef$args2 = fieldDef.args; _i2 < _fieldDef$args2.length; _i2++) { + var argDef = _fieldDef$args2[_i2]; + var argNode = argNodeMap[argDef.name]; + + if (!argNode && (0, _definition.isRequiredArgument)(argDef)) { + var argTypeStr = (0, _inspect.default)(argDef.type); + context.reportError(new _GraphQLError.GraphQLError("Field \"".concat(fieldDef.name, "\" argument \"").concat(argDef.name, "\" of type \"").concat(argTypeStr, "\" is required, but it was not provided."), fieldNode)); + } + } + } + } + }); +} +/** + * @internal + */ + + +function ProvidedRequiredArgumentsOnDirectivesRule(context) { + var requiredArgsMap = Object.create(null); + var schema = context.getSchema(); + var definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives; + + for (var _i4 = 0; _i4 < definedDirectives.length; _i4++) { + var directive = definedDirectives[_i4]; + requiredArgsMap[directive.name] = (0, _keyMap.default)(directive.args.filter(_definition.isRequiredArgument), function (arg) { + return arg.name; + }); + } + + var astDefinitions = context.getDocument().definitions; + + for (var _i6 = 0; _i6 < astDefinitions.length; _i6++) { + var def = astDefinitions[_i6]; + + if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { + var _def$arguments; + + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; + requiredArgsMap[def.name.value] = (0, _keyMap.default)(argNodes.filter(isRequiredArgumentNode), function (arg) { + return arg.name.value; + }); + } + } + + return { + Directive: { + // Validate on leave to allow for deeper errors to appear first. + leave: function leave(directiveNode) { + var directiveName = directiveNode.name.value; + var requiredArgs = requiredArgsMap[directiveName]; + + if (requiredArgs) { + var _directiveNode$argume; + + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var _argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; + + var argNodeMap = (0, _keyMap.default)(_argNodes, function (arg) { + return arg.name.value; + }); + + for (var _i8 = 0, _Object$keys2 = Object.keys(requiredArgs); _i8 < _Object$keys2.length; _i8++) { + var argName = _Object$keys2[_i8]; + + if (!argNodeMap[argName]) { + var argType = requiredArgs[argName].type; + var argTypeStr = (0, _definition.isType)(argType) ? (0, _inspect.default)(argType) : (0, _printer.print)(argType); + context.reportError(new _GraphQLError.GraphQLError("Directive \"@".concat(directiveName, "\" argument \"").concat(argName, "\" of type \"").concat(argTypeStr, "\" is required, but it was not provided."), directiveNode)); + } + } + } + } + } + }; +} + +function isRequiredArgumentNode(arg) { + return arg.type.kind === _kinds.Kind.NON_NULL_TYPE && arg.defaultValue == null; +} + + +/***/ }), + +/***/ 16830: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ScalarLeafsRule = ScalarLeafsRule; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Scalar leafs + * + * A GraphQL document is valid only if all leaf fields (fields without + * sub selections) are of scalar or enum types. + */ +function ScalarLeafsRule(context) { + return { + Field: function Field(node) { + var type = context.getType(); + var selectionSet = node.selectionSet; + + if (type) { + if ((0, _definition.isLeafType)((0, _definition.getNamedType)(type))) { + if (selectionSet) { + var fieldName = node.name.value; + var typeStr = (0, _inspect.default)(type); + context.reportError(new _GraphQLError.GraphQLError("Field \"".concat(fieldName, "\" must not have a selection since type \"").concat(typeStr, "\" has no subfields."), selectionSet)); + } + } else if (!selectionSet) { + var _fieldName = node.name.value; + + var _typeStr = (0, _inspect.default)(type); + + context.reportError(new _GraphQLError.GraphQLError("Field \"".concat(_fieldName, "\" of type \"").concat(_typeStr, "\" must have a selection of subfields. Did you mean \"").concat(_fieldName, " { ... }\"?"), node)); + } + } + } + }; +} + + +/***/ }), + +/***/ 4365: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.SingleFieldSubscriptionsRule = SingleFieldSubscriptionsRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Subscriptions must only include one field. + * + * A GraphQL subscription is valid only if it contains a single root field. + */ +function SingleFieldSubscriptionsRule(context) { + return { + OperationDefinition: function OperationDefinition(node) { + if (node.operation === 'subscription') { + if (node.selectionSet.selections.length !== 1) { + context.reportError(new _GraphQLError.GraphQLError(node.name ? "Subscription \"".concat(node.name.value, "\" must select only one top level field.") : 'Anonymous Subscription must select only one top level field.', node.selectionSet.selections.slice(1))); + } + } + } + }; +} + + +/***/ }), + +/***/ 45799: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueArgumentNamesRule = UniqueArgumentNamesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Unique argument names + * + * A GraphQL field or directive is only valid if all supplied arguments are + * uniquely named. + */ +function UniqueArgumentNamesRule(context) { + var knownArgNames = Object.create(null); + return { + Field: function Field() { + knownArgNames = Object.create(null); + }, + Directive: function Directive() { + knownArgNames = Object.create(null); + }, + Argument: function Argument(node) { + var argName = node.name.value; + + if (knownArgNames[argName]) { + context.reportError(new _GraphQLError.GraphQLError("There can be only one argument named \"".concat(argName, "\"."), [knownArgNames[argName], node.name])); + } else { + knownArgNames[argName] = node.name; + } + + return false; + } + }; +} + + +/***/ }), + +/***/ 17074: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueDirectiveNamesRule = UniqueDirectiveNamesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Unique directive names + * + * A GraphQL document is only valid if all defined directives have unique names. + */ +function UniqueDirectiveNamesRule(context) { + var knownDirectiveNames = Object.create(null); + var schema = context.getSchema(); + return { + DirectiveDefinition: function DirectiveDefinition(node) { + var directiveName = node.name.value; + + if (schema === null || schema === void 0 ? void 0 : schema.getDirective(directiveName)) { + context.reportError(new _GraphQLError.GraphQLError("Directive \"@".concat(directiveName, "\" already exists in the schema. It cannot be redefined."), node.name)); + return; + } + + if (knownDirectiveNames[directiveName]) { + context.reportError(new _GraphQLError.GraphQLError("There can be only one directive named \"@".concat(directiveName, "\"."), [knownDirectiveNames[directiveName], node.name])); + } else { + knownDirectiveNames[directiveName] = node.name; + } + + return false; + } + }; +} + + +/***/ }), + +/***/ 61944: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueDirectivesPerLocationRule = UniqueDirectivesPerLocationRule; + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +var _predicates = __nccwpck_require__(20535); + +var _directives = __nccwpck_require__(83614); + +/** + * Unique directive names per location + * + * A GraphQL document is only valid if all non-repeatable directives at + * a given location are uniquely named. + */ +function UniqueDirectivesPerLocationRule(context) { + var uniqueDirectiveMap = Object.create(null); + var schema = context.getSchema(); + var definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives; + + for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) { + var directive = definedDirectives[_i2]; + uniqueDirectiveMap[directive.name] = !directive.isRepeatable; + } + + var astDefinitions = context.getDocument().definitions; + + for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) { + var def = astDefinitions[_i4]; + + if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) { + uniqueDirectiveMap[def.name.value] = !def.repeatable; + } + } + + var schemaDirectives = Object.create(null); + var typeDirectivesMap = Object.create(null); + return { + // Many different AST nodes may contain directives. Rather than listing + // them all, just listen for entering any node, and check to see if it + // defines any directives. + enter: function enter(node) { + if (node.directives == null) { + return; + } + + var seenDirectives; + + if (node.kind === _kinds.Kind.SCHEMA_DEFINITION || node.kind === _kinds.Kind.SCHEMA_EXTENSION) { + seenDirectives = schemaDirectives; + } else if ((0, _predicates.isTypeDefinitionNode)(node) || (0, _predicates.isTypeExtensionNode)(node)) { + var typeName = node.name.value; + seenDirectives = typeDirectivesMap[typeName]; + + if (seenDirectives === undefined) { + typeDirectivesMap[typeName] = seenDirectives = Object.create(null); + } + } else { + seenDirectives = Object.create(null); + } + + for (var _i6 = 0, _node$directives2 = node.directives; _i6 < _node$directives2.length; _i6++) { + var _directive = _node$directives2[_i6]; + var directiveName = _directive.name.value; + + if (uniqueDirectiveMap[directiveName]) { + if (seenDirectives[directiveName]) { + context.reportError(new _GraphQLError.GraphQLError("The directive \"@".concat(directiveName, "\" can only be used once at this location."), [seenDirectives[directiveName], _directive])); + } else { + seenDirectives[directiveName] = _directive; + } + } + } + } + }; +} + + +/***/ }), + +/***/ 44437: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueEnumValueNamesRule = UniqueEnumValueNamesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +var _definition = __nccwpck_require__(5821); + +/** + * Unique enum value names + * + * A GraphQL enum type is only valid if all its values are uniquely named. + */ +function UniqueEnumValueNamesRule(context) { + var schema = context.getSchema(); + var existingTypeMap = schema ? schema.getTypeMap() : Object.create(null); + var knownValueNames = Object.create(null); + return { + EnumTypeDefinition: checkValueUniqueness, + EnumTypeExtension: checkValueUniqueness + }; + + function checkValueUniqueness(node) { + var _node$values; + + var typeName = node.name.value; + + if (!knownValueNames[typeName]) { + knownValueNames[typeName] = Object.create(null); + } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + + + var valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []; + var valueNames = knownValueNames[typeName]; + + for (var _i2 = 0; _i2 < valueNodes.length; _i2++) { + var valueDef = valueNodes[_i2]; + var valueName = valueDef.name.value; + var existingType = existingTypeMap[typeName]; + + if ((0, _definition.isEnumType)(existingType) && existingType.getValue(valueName)) { + context.reportError(new _GraphQLError.GraphQLError("Enum value \"".concat(typeName, ".").concat(valueName, "\" already exists in the schema. It cannot also be defined in this type extension."), valueDef.name)); + } else if (valueNames[valueName]) { + context.reportError(new _GraphQLError.GraphQLError("Enum value \"".concat(typeName, ".").concat(valueName, "\" can only be defined once."), [valueNames[valueName], valueDef.name])); + } else { + valueNames[valueName] = valueDef.name; + } + } + + return false; + } +} + + +/***/ }), + +/***/ 9502: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueFieldDefinitionNamesRule = UniqueFieldDefinitionNamesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +var _definition = __nccwpck_require__(5821); + +/** + * Unique field definition names + * + * A GraphQL complex type is only valid if all its fields are uniquely named. + */ +function UniqueFieldDefinitionNamesRule(context) { + var schema = context.getSchema(); + var existingTypeMap = schema ? schema.getTypeMap() : Object.create(null); + var knownFieldNames = Object.create(null); + return { + InputObjectTypeDefinition: checkFieldUniqueness, + InputObjectTypeExtension: checkFieldUniqueness, + InterfaceTypeDefinition: checkFieldUniqueness, + InterfaceTypeExtension: checkFieldUniqueness, + ObjectTypeDefinition: checkFieldUniqueness, + ObjectTypeExtension: checkFieldUniqueness + }; + + function checkFieldUniqueness(node) { + var _node$fields; + + var typeName = node.name.value; + + if (!knownFieldNames[typeName]) { + knownFieldNames[typeName] = Object.create(null); + } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + + + var fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []; + var fieldNames = knownFieldNames[typeName]; + + for (var _i2 = 0; _i2 < fieldNodes.length; _i2++) { + var fieldDef = fieldNodes[_i2]; + var fieldName = fieldDef.name.value; + + if (hasField(existingTypeMap[typeName], fieldName)) { + context.reportError(new _GraphQLError.GraphQLError("Field \"".concat(typeName, ".").concat(fieldName, "\" already exists in the schema. It cannot also be defined in this type extension."), fieldDef.name)); + } else if (fieldNames[fieldName]) { + context.reportError(new _GraphQLError.GraphQLError("Field \"".concat(typeName, ".").concat(fieldName, "\" can only be defined once."), [fieldNames[fieldName], fieldDef.name])); + } else { + fieldNames[fieldName] = fieldDef.name; + } + } + + return false; + } +} + +function hasField(type, fieldName) { + if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type) || (0, _definition.isInputObjectType)(type)) { + return type.getFields()[fieldName] != null; + } + + return false; +} + + +/***/ }), + +/***/ 79402: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueFragmentNamesRule = UniqueFragmentNamesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Unique fragment names + * + * A GraphQL document is only valid if all defined fragments have unique names. + */ +function UniqueFragmentNamesRule(context) { + var knownFragmentNames = Object.create(null); + return { + OperationDefinition: function OperationDefinition() { + return false; + }, + FragmentDefinition: function FragmentDefinition(node) { + var fragmentName = node.name.value; + + if (knownFragmentNames[fragmentName]) { + context.reportError(new _GraphQLError.GraphQLError("There can be only one fragment named \"".concat(fragmentName, "\"."), [knownFragmentNames[fragmentName], node.name])); + } else { + knownFragmentNames[fragmentName] = node.name; + } + + return false; + } + }; +} + + +/***/ }), + +/***/ 83552: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueInputFieldNamesRule = UniqueInputFieldNamesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Unique input field names + * + * A GraphQL input object value is only valid if all supplied fields are + * uniquely named. + */ +function UniqueInputFieldNamesRule(context) { + var knownNameStack = []; + var knownNames = Object.create(null); + return { + ObjectValue: { + enter: function enter() { + knownNameStack.push(knownNames); + knownNames = Object.create(null); + }, + leave: function leave() { + knownNames = knownNameStack.pop(); + } + }, + ObjectField: function ObjectField(node) { + var fieldName = node.name.value; + + if (knownNames[fieldName]) { + context.reportError(new _GraphQLError.GraphQLError("There can be only one input field named \"".concat(fieldName, "\"."), [knownNames[fieldName], node.name])); + } else { + knownNames[fieldName] = node.name; + } + } + }; +} + + +/***/ }), + +/***/ 94865: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueOperationNamesRule = UniqueOperationNamesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Unique operation names + * + * A GraphQL document is only valid if all defined operations have unique names. + */ +function UniqueOperationNamesRule(context) { + var knownOperationNames = Object.create(null); + return { + OperationDefinition: function OperationDefinition(node) { + var operationName = node.name; + + if (operationName) { + if (knownOperationNames[operationName.value]) { + context.reportError(new _GraphQLError.GraphQLError("There can be only one operation named \"".concat(operationName.value, "\"."), [knownOperationNames[operationName.value], operationName])); + } else { + knownOperationNames[operationName.value] = operationName; + } + } + + return false; + }, + FragmentDefinition: function FragmentDefinition() { + return false; + } + }; +} + + +/***/ }), + +/***/ 31492: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueOperationTypesRule = UniqueOperationTypesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Unique operation types + * + * A GraphQL document is only valid if it has only one type per operation. + */ +function UniqueOperationTypesRule(context) { + var schema = context.getSchema(); + var definedOperationTypes = Object.create(null); + var existingOperationTypes = schema ? { + query: schema.getQueryType(), + mutation: schema.getMutationType(), + subscription: schema.getSubscriptionType() + } : {}; + return { + SchemaDefinition: checkOperationTypes, + SchemaExtension: checkOperationTypes + }; + + function checkOperationTypes(node) { + var _node$operationTypes; + + // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') + var operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []; + + for (var _i2 = 0; _i2 < operationTypesNodes.length; _i2++) { + var operationType = operationTypesNodes[_i2]; + var operation = operationType.operation; + var alreadyDefinedOperationType = definedOperationTypes[operation]; + + if (existingOperationTypes[operation]) { + context.reportError(new _GraphQLError.GraphQLError("Type for ".concat(operation, " already defined in the schema. It cannot be redefined."), operationType)); + } else if (alreadyDefinedOperationType) { + context.reportError(new _GraphQLError.GraphQLError("There can be only one ".concat(operation, " type in schema."), [alreadyDefinedOperationType, operationType])); + } else { + definedOperationTypes[operation] = operationType; + } + } + + return false; + } +} + + +/***/ }), + +/***/ 24316: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueTypeNamesRule = UniqueTypeNamesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Unique type names + * + * A GraphQL document is only valid if all defined types have unique names. + */ +function UniqueTypeNamesRule(context) { + var knownTypeNames = Object.create(null); + var schema = context.getSchema(); + return { + ScalarTypeDefinition: checkTypeName, + ObjectTypeDefinition: checkTypeName, + InterfaceTypeDefinition: checkTypeName, + UnionTypeDefinition: checkTypeName, + EnumTypeDefinition: checkTypeName, + InputObjectTypeDefinition: checkTypeName + }; + + function checkTypeName(node) { + var typeName = node.name.value; + + if (schema === null || schema === void 0 ? void 0 : schema.getType(typeName)) { + context.reportError(new _GraphQLError.GraphQLError("Type \"".concat(typeName, "\" already exists in the schema. It cannot also be defined in this type definition."), node.name)); + return; + } + + if (knownTypeNames[typeName]) { + context.reportError(new _GraphQLError.GraphQLError("There can be only one type named \"".concat(typeName, "\"."), [knownTypeNames[typeName], node.name])); + } else { + knownTypeNames[typeName] = node.name; + } + + return false; + } +} + + +/***/ }), + +/***/ 65931: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.UniqueVariableNamesRule = UniqueVariableNamesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +/** + * Unique variable names + * + * A GraphQL operation is only valid if all its variables are uniquely named. + */ +function UniqueVariableNamesRule(context) { + var knownVariableNames = Object.create(null); + return { + OperationDefinition: function OperationDefinition() { + knownVariableNames = Object.create(null); + }, + VariableDefinition: function VariableDefinition(node) { + var variableName = node.variable.name.value; + + if (knownVariableNames[variableName]) { + context.reportError(new _GraphQLError.GraphQLError("There can be only one variable named \"$".concat(variableName, "\"."), [knownVariableNames[variableName], node.variable.name])); + } else { + knownVariableNames[variableName] = node.variable.name; + } + } + }; +} + + +/***/ }), + +/***/ 39091: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ValuesOfCorrectTypeRule = ValuesOfCorrectTypeRule; + +var _objectValues3 = _interopRequireDefault(__nccwpck_require__(30026)); + +var _keyMap = _interopRequireDefault(__nccwpck_require__(10711)); + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _didYouMean = _interopRequireDefault(__nccwpck_require__(42878)); + +var _suggestionList = _interopRequireDefault(__nccwpck_require__(57704)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _printer = __nccwpck_require__(68203); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Value literals of correct type + * + * A GraphQL document is only valid if all value literals are of the type + * expected at their position. + */ +function ValuesOfCorrectTypeRule(context) { + return { + ListValue: function ListValue(node) { + // Note: TypeInfo will traverse into a list's item type, so look to the + // parent input type to check if it is a list. + var type = (0, _definition.getNullableType)(context.getParentInputType()); + + if (!(0, _definition.isListType)(type)) { + isValidValueNode(context, node); + return false; // Don't traverse further. + } + }, + ObjectValue: function ObjectValue(node) { + var type = (0, _definition.getNamedType)(context.getInputType()); + + if (!(0, _definition.isInputObjectType)(type)) { + isValidValueNode(context, node); + return false; // Don't traverse further. + } // Ensure every required field exists. + + + var fieldNodeMap = (0, _keyMap.default)(node.fields, function (field) { + return field.name.value; + }); + + for (var _i2 = 0, _objectValues2 = (0, _objectValues3.default)(type.getFields()); _i2 < _objectValues2.length; _i2++) { + var fieldDef = _objectValues2[_i2]; + var fieldNode = fieldNodeMap[fieldDef.name]; + + if (!fieldNode && (0, _definition.isRequiredInputField)(fieldDef)) { + var typeStr = (0, _inspect.default)(fieldDef.type); + context.reportError(new _GraphQLError.GraphQLError("Field \"".concat(type.name, ".").concat(fieldDef.name, "\" of required type \"").concat(typeStr, "\" was not provided."), node)); + } + } + }, + ObjectField: function ObjectField(node) { + var parentType = (0, _definition.getNamedType)(context.getParentInputType()); + var fieldType = context.getInputType(); + + if (!fieldType && (0, _definition.isInputObjectType)(parentType)) { + var suggestions = (0, _suggestionList.default)(node.name.value, Object.keys(parentType.getFields())); + context.reportError(new _GraphQLError.GraphQLError("Field \"".concat(node.name.value, "\" is not defined by type \"").concat(parentType.name, "\".") + (0, _didYouMean.default)(suggestions), node)); + } + }, + NullValue: function NullValue(node) { + var type = context.getInputType(); + + if ((0, _definition.isNonNullType)(type)) { + context.reportError(new _GraphQLError.GraphQLError("Expected value of type \"".concat((0, _inspect.default)(type), "\", found ").concat((0, _printer.print)(node), "."), node)); + } + }, + EnumValue: function EnumValue(node) { + return isValidValueNode(context, node); + }, + IntValue: function IntValue(node) { + return isValidValueNode(context, node); + }, + FloatValue: function FloatValue(node) { + return isValidValueNode(context, node); + }, + StringValue: function StringValue(node) { + return isValidValueNode(context, node); + }, + BooleanValue: function BooleanValue(node) { + return isValidValueNode(context, node); + } + }; +} +/** + * Any value literal may be a valid representation of a Scalar, depending on + * that scalar type. + */ + + +function isValidValueNode(context, node) { + // Report any error at the full type expected by the location. + var locationType = context.getInputType(); + + if (!locationType) { + return; + } + + var type = (0, _definition.getNamedType)(locationType); + + if (!(0, _definition.isLeafType)(type)) { + var typeStr = (0, _inspect.default)(locationType); + context.reportError(new _GraphQLError.GraphQLError("Expected value of type \"".concat(typeStr, "\", found ").concat((0, _printer.print)(node), "."), node)); + return; + } // Scalars and Enums determine if a literal value is valid via parseLiteral(), + // which may throw or return an invalid value to indicate failure. + + + try { + var parseResult = type.parseLiteral(node, undefined + /* variables */ + ); + + if (parseResult === undefined) { + var _typeStr = (0, _inspect.default)(locationType); + + context.reportError(new _GraphQLError.GraphQLError("Expected value of type \"".concat(_typeStr, "\", found ").concat((0, _printer.print)(node), "."), node)); + } + } catch (error) { + var _typeStr2 = (0, _inspect.default)(locationType); + + if (error instanceof _GraphQLError.GraphQLError) { + context.reportError(error); + } else { + context.reportError(new _GraphQLError.GraphQLError("Expected value of type \"".concat(_typeStr2, "\", found ").concat((0, _printer.print)(node), "; ") + error.message, node, undefined, undefined, undefined, error)); + } + } +} + + +/***/ }), + +/***/ 99506: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.VariablesAreInputTypesRule = VariablesAreInputTypesRule; + +var _GraphQLError = __nccwpck_require__(4797); + +var _printer = __nccwpck_require__(68203); + +var _definition = __nccwpck_require__(5821); + +var _typeFromAST = __nccwpck_require__(27664); + +/** + * Variables are input types + * + * A GraphQL operation is only valid if all the variables it defines are of + * input types (scalar, enum, or input object). + */ +function VariablesAreInputTypesRule(context) { + return { + VariableDefinition: function VariableDefinition(node) { + var type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.type); + + if (type && !(0, _definition.isInputType)(type)) { + var variableName = node.variable.name.value; + var typeName = (0, _printer.print)(node.type); + context.reportError(new _GraphQLError.GraphQLError("Variable \"$".concat(variableName, "\" cannot be non-input type \"").concat(typeName, "\"."), node.type)); + } + } + }; +} + + +/***/ }), + +/***/ 8815: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.VariablesInAllowedPositionRule = VariablesInAllowedPositionRule; + +var _inspect = _interopRequireDefault(__nccwpck_require__(10102)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _kinds = __nccwpck_require__(11927); + +var _definition = __nccwpck_require__(5821); + +var _typeFromAST = __nccwpck_require__(27664); + +var _typeComparators = __nccwpck_require__(10333); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Variables passed to field arguments conform to type + */ +function VariablesInAllowedPositionRule(context) { + var varDefMap = Object.create(null); + return { + OperationDefinition: { + enter: function enter() { + varDefMap = Object.create(null); + }, + leave: function leave(operation) { + var usages = context.getRecursiveVariableUsages(operation); + + for (var _i2 = 0; _i2 < usages.length; _i2++) { + var _ref2 = usages[_i2]; + var node = _ref2.node; + var type = _ref2.type; + var defaultValue = _ref2.defaultValue; + var varName = node.name.value; + var varDef = varDefMap[varName]; + + if (varDef && type) { + // A var type is allowed if it is the same or more strict (e.g. is + // a subtype of) than the expected type. It can be more strict if + // the variable type is non-null when the expected type is nullable. + // If both are list types, the variable item type can be more strict + // than the expected item type (contravariant). + var schema = context.getSchema(); + var varType = (0, _typeFromAST.typeFromAST)(schema, varDef.type); + + if (varType && !allowedVariableUsage(schema, varType, varDef.defaultValue, type, defaultValue)) { + var varTypeStr = (0, _inspect.default)(varType); + var typeStr = (0, _inspect.default)(type); + context.reportError(new _GraphQLError.GraphQLError("Variable \"$".concat(varName, "\" of type \"").concat(varTypeStr, "\" used in position expecting type \"").concat(typeStr, "\"."), [varDef, node])); + } + } + } + } + }, + VariableDefinition: function VariableDefinition(node) { + varDefMap[node.variable.name.value] = node; + } + }; +} +/** + * Returns true if the variable is allowed in the location it was found, + * which includes considering if default values exist for either the variable + * or the location at which it is located. + */ + + +function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) { + if ((0, _definition.isNonNullType)(locationType) && !(0, _definition.isNonNullType)(varType)) { + var hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== _kinds.Kind.NULL; + var hasLocationDefaultValue = locationDefaultValue !== undefined; + + if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) { + return false; + } + + var nullableLocationType = locationType.ofType; + return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, nullableLocationType); + } + + return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, locationType); +} + + +/***/ }), + +/***/ 33915: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoDeprecatedCustomRule = NoDeprecatedCustomRule; + +var _invariant = _interopRequireDefault(__nccwpck_require__(28847)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _definition = __nccwpck_require__(5821); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * No deprecated + * + * A GraphQL document is only valid if all selected fields and all used enum values have not been + * deprecated. + * + * Note: This rule is optional and is not part of the Validation section of the GraphQL + * Specification. The main purpose of this rule is detection of deprecated usages and not + * necessarily to forbid their use when querying a service. + */ +function NoDeprecatedCustomRule(context) { + return { + Field: function Field(node) { + var fieldDef = context.getFieldDef(); + var deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason; + + if (fieldDef && deprecationReason != null) { + var parentType = context.getParentType(); + parentType != null || (0, _invariant.default)(0); + context.reportError(new _GraphQLError.GraphQLError("The field ".concat(parentType.name, ".").concat(fieldDef.name, " is deprecated. ").concat(deprecationReason), node)); + } + }, + Argument: function Argument(node) { + var argDef = context.getArgument(); + var deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason; + + if (argDef && deprecationReason != null) { + var directiveDef = context.getDirective(); + + if (directiveDef != null) { + context.reportError(new _GraphQLError.GraphQLError("Directive \"@".concat(directiveDef.name, "\" argument \"").concat(argDef.name, "\" is deprecated. ").concat(deprecationReason), node)); + } else { + var parentType = context.getParentType(); + var fieldDef = context.getFieldDef(); + parentType != null && fieldDef != null || (0, _invariant.default)(0); + context.reportError(new _GraphQLError.GraphQLError("Field \"".concat(parentType.name, ".").concat(fieldDef.name, "\" argument \"").concat(argDef.name, "\" is deprecated. ").concat(deprecationReason), node)); + } + } + }, + ObjectField: function ObjectField(node) { + var inputObjectDef = (0, _definition.getNamedType)(context.getParentInputType()); + + if ((0, _definition.isInputObjectType)(inputObjectDef)) { + var inputFieldDef = inputObjectDef.getFields()[node.name.value]; // flowlint-next-line unnecessary-optional-chain:off + + var deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason; + + if (deprecationReason != null) { + context.reportError(new _GraphQLError.GraphQLError("The input field ".concat(inputObjectDef.name, ".").concat(inputFieldDef.name, " is deprecated. ").concat(deprecationReason), node)); + } + } + }, + EnumValue: function EnumValue(node) { + var enumValueDef = context.getEnumValue(); + var deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason; + + if (enumValueDef && deprecationReason != null) { + var enumTypeDef = (0, _definition.getNamedType)(context.getInputType()); + enumTypeDef != null || (0, _invariant.default)(0); + context.reportError(new _GraphQLError.GraphQLError("The enum value \"".concat(enumTypeDef.name, ".").concat(enumValueDef.name, "\" is deprecated. ").concat(deprecationReason), node)); + } + } + }; +} + + +/***/ }), + +/***/ 39478: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NoSchemaIntrospectionCustomRule = NoSchemaIntrospectionCustomRule; + +var _GraphQLError = __nccwpck_require__(4797); + +var _definition = __nccwpck_require__(5821); + +var _introspection = __nccwpck_require__(28344); + +/** + * Prohibit introspection queries + * + * A GraphQL document is only valid if all fields selected are not fields that + * return an introspection type. + * + * Note: This rule is optional and is not part of the Validation section of the + * GraphQL Specification. This rule effectively disables introspection, which + * does not reflect best practices and should only be done if absolutely necessary. + */ +function NoSchemaIntrospectionCustomRule(context) { + return { + Field: function Field(node) { + var type = (0, _definition.getNamedType)(context.getType()); + + if (type && (0, _introspection.isIntrospectionType)(type)) { + context.reportError(new _GraphQLError.GraphQLError("GraphQL introspection has been disabled, but the requested query contained the field \"".concat(node.name.value, "\"."), node)); + } + } + }; +} + + +/***/ }), + +/***/ 84908: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.specifiedSDLRules = exports.specifiedRules = void 0; + +var _ExecutableDefinitionsRule = __nccwpck_require__(89199); + +var _UniqueOperationNamesRule = __nccwpck_require__(94865); + +var _LoneAnonymousOperationRule = __nccwpck_require__(45726); + +var _SingleFieldSubscriptionsRule = __nccwpck_require__(4365); + +var _KnownTypeNamesRule = __nccwpck_require__(42509); + +var _FragmentsOnCompositeTypesRule = __nccwpck_require__(60381); + +var _VariablesAreInputTypesRule = __nccwpck_require__(99506); + +var _ScalarLeafsRule = __nccwpck_require__(16830); + +var _FieldsOnCorrectTypeRule = __nccwpck_require__(63016); + +var _UniqueFragmentNamesRule = __nccwpck_require__(79402); + +var _KnownFragmentNamesRule = __nccwpck_require__(15166); + +var _NoUnusedFragmentsRule = __nccwpck_require__(192); + +var _PossibleFragmentSpreadsRule = __nccwpck_require__(62450); + +var _NoFragmentCyclesRule = __nccwpck_require__(62564); + +var _UniqueVariableNamesRule = __nccwpck_require__(65931); + +var _NoUndefinedVariablesRule = __nccwpck_require__(61671); + +var _NoUnusedVariablesRule = __nccwpck_require__(40242); + +var _KnownDirectivesRule = __nccwpck_require__(85303); + +var _UniqueDirectivesPerLocationRule = __nccwpck_require__(61944); + +var _KnownArgumentNamesRule = __nccwpck_require__(67147); + +var _UniqueArgumentNamesRule = __nccwpck_require__(45799); + +var _ValuesOfCorrectTypeRule = __nccwpck_require__(39091); + +var _ProvidedRequiredArgumentsRule = __nccwpck_require__(57669); + +var _VariablesInAllowedPositionRule = __nccwpck_require__(8815); + +var _OverlappingFieldsCanBeMergedRule = __nccwpck_require__(23577); + +var _UniqueInputFieldNamesRule = __nccwpck_require__(83552); + +var _LoneSchemaDefinitionRule = __nccwpck_require__(48307); + +var _UniqueOperationTypesRule = __nccwpck_require__(31492); + +var _UniqueTypeNamesRule = __nccwpck_require__(24316); + +var _UniqueEnumValueNamesRule = __nccwpck_require__(44437); + +var _UniqueFieldDefinitionNamesRule = __nccwpck_require__(9502); + +var _UniqueDirectiveNamesRule = __nccwpck_require__(17074); + +var _PossibleTypeExtensionsRule = __nccwpck_require__(70075); + +// Spec Section: "Executable Definitions" +// Spec Section: "Operation Name Uniqueness" +// Spec Section: "Lone Anonymous Operation" +// Spec Section: "Subscriptions with Single Root Field" +// Spec Section: "Fragment Spread Type Existence" +// Spec Section: "Fragments on Composite Types" +// Spec Section: "Variables are Input Types" +// Spec Section: "Leaf Field Selections" +// Spec Section: "Field Selections on Objects, Interfaces, and Unions Types" +// Spec Section: "Fragment Name Uniqueness" +// Spec Section: "Fragment spread target defined" +// Spec Section: "Fragments must be used" +// Spec Section: "Fragment spread is possible" +// Spec Section: "Fragments must not form cycles" +// Spec Section: "Variable Uniqueness" +// Spec Section: "All Variable Used Defined" +// Spec Section: "All Variables Used" +// Spec Section: "Directives Are Defined" +// Spec Section: "Directives Are Unique Per Location" +// Spec Section: "Argument Names" +// Spec Section: "Argument Uniqueness" +// Spec Section: "Value Type Correctness" +// Spec Section: "Argument Optionality" +// Spec Section: "All Variable Usages Are Allowed" +// Spec Section: "Field Selection Merging" +// Spec Section: "Input Object Field Uniqueness" +// SDL-specific validation rules + +/** + * This set includes all validation rules defined by the GraphQL spec. + * + * The order of the rules in this list has been adjusted to lead to the + * most clear output when encountering multiple validation errors. + */ +var specifiedRules = Object.freeze([_ExecutableDefinitionsRule.ExecutableDefinitionsRule, _UniqueOperationNamesRule.UniqueOperationNamesRule, _LoneAnonymousOperationRule.LoneAnonymousOperationRule, _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule, _KnownTypeNamesRule.KnownTypeNamesRule, _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule, _VariablesAreInputTypesRule.VariablesAreInputTypesRule, _ScalarLeafsRule.ScalarLeafsRule, _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule, _UniqueFragmentNamesRule.UniqueFragmentNamesRule, _KnownFragmentNamesRule.KnownFragmentNamesRule, _NoUnusedFragmentsRule.NoUnusedFragmentsRule, _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule, _NoFragmentCyclesRule.NoFragmentCyclesRule, _UniqueVariableNamesRule.UniqueVariableNamesRule, _NoUndefinedVariablesRule.NoUndefinedVariablesRule, _NoUnusedVariablesRule.NoUnusedVariablesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _KnownArgumentNamesRule.KnownArgumentNamesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule, _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule, _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule]); +/** + * @internal + */ + +exports.specifiedRules = specifiedRules; +var specifiedSDLRules = Object.freeze([_LoneSchemaDefinitionRule.LoneSchemaDefinitionRule, _UniqueOperationTypesRule.UniqueOperationTypesRule, _UniqueTypeNamesRule.UniqueTypeNamesRule, _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule, _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule, _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule, _KnownTypeNamesRule.KnownTypeNamesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule, _KnownArgumentNamesRule.KnownArgumentNamesOnDirectivesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsOnDirectivesRule]); +exports.specifiedSDLRules = specifiedSDLRules; + + +/***/ }), + +/***/ 14193: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.validate = validate; +exports.validateSDL = validateSDL; +exports.assertValidSDL = assertValidSDL; +exports.assertValidSDLExtension = assertValidSDLExtension; + +var _devAssert = _interopRequireDefault(__nccwpck_require__(46514)); + +var _GraphQLError = __nccwpck_require__(4797); + +var _visitor = __nccwpck_require__(5678); + +var _validate = __nccwpck_require__(22430); + +var _TypeInfo = __nccwpck_require__(76625); + +var _specifiedRules = __nccwpck_require__(84908); + +var _ValidationContext = __nccwpck_require__(28263); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Implements the "Validation" section of the spec. + * + * Validation runs synchronously, returning an array of encountered errors, or + * an empty array if no errors were encountered and the document is valid. + * + * A list of specific validation rules may be provided. If not provided, the + * default list of rules defined by the GraphQL specification will be used. + * + * Each validation rules is a function which returns a visitor + * (see the language/visitor API). Visitor methods are expected to return + * GraphQLErrors, or Arrays of GraphQLErrors when invalid. + * + * Optionally a custom TypeInfo instance may be provided. If not provided, one + * will be created from the provided schema. + */ +function validate(schema, documentAST) { + var rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _specifiedRules.specifiedRules; + var typeInfo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new _TypeInfo.TypeInfo(schema); + var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : { + maxErrors: undefined + }; + documentAST || (0, _devAssert.default)(0, 'Must provide document.'); // If the schema used for validation is invalid, throw an error. + + (0, _validate.assertValidSchema)(schema); + var abortObj = Object.freeze({}); + var errors = []; + var context = new _ValidationContext.ValidationContext(schema, documentAST, typeInfo, function (error) { + if (options.maxErrors != null && errors.length >= options.maxErrors) { + errors.push(new _GraphQLError.GraphQLError('Too many validation errors, error limit reached. Validation aborted.')); + throw abortObj; + } + + errors.push(error); + }); // This uses a specialized visitor which runs multiple visitors in parallel, + // while maintaining the visitor skip and break API. + + var visitor = (0, _visitor.visitInParallel)(rules.map(function (rule) { + return rule(context); + })); // Visit the whole document with each instance of all provided rules. + + try { + (0, _visitor.visit)(documentAST, (0, _TypeInfo.visitWithTypeInfo)(typeInfo, visitor)); + } catch (e) { + if (e !== abortObj) { + throw e; + } + } + + return errors; +} +/** + * @internal + */ + + +function validateSDL(documentAST, schemaToExtend) { + var rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _specifiedRules.specifiedSDLRules; + var errors = []; + var context = new _ValidationContext.SDLValidationContext(documentAST, schemaToExtend, function (error) { + errors.push(error); + }); + var visitors = rules.map(function (rule) { + return rule(context); + }); + (0, _visitor.visit)(documentAST, (0, _visitor.visitInParallel)(visitors)); + return errors; +} +/** + * Utility function which asserts a SDL document is valid by throwing an error + * if it is invalid. + * + * @internal + */ + + +function assertValidSDL(documentAST) { + var errors = validateSDL(documentAST); + + if (errors.length !== 0) { + throw new Error(errors.map(function (error) { + return error.message; + }).join('\n\n')); + } +} +/** + * Utility function which asserts a SDL document is valid by throwing an error + * if it is invalid. + * + * @internal + */ + + +function assertValidSDLExtension(documentAST, schema) { + var errors = validateSDL(documentAST, schema); + + if (errors.length !== 0) { + throw new Error(errors.map(function (error) { + return error.message; + }).join('\n\n')); + } +} + + +/***/ }), + +/***/ 81923: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.versionInfo = exports.version = void 0; + +/** + * Note: This file is autogenerated using "resources/gen-version.js" script and + * automatically updated by "npm version" command. + */ + +/** + * A string containing the version of the GraphQL.js library + */ +var version = '15.4.0'; +/** + * An object containing the components of the GraphQL.js version string + */ + +exports.version = version; +var versionInfo = Object.freeze({ + major: 15, + minor: 4, + patch: 0, + preReleaseTag: null +}); +exports.versionInfo = versionInfo; + + +/***/ }), + +/***/ 31621: +/***/ ((module) => { + +"use strict"; + + +module.exports = (flag, argv = process.argv) => { + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const position = argv.indexOf(prefix + flag); + const terminatorPosition = argv.indexOf('--'); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); +}; + + +/***/ }), + +/***/ 91609: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var fs = __nccwpck_require__(35747) +var path = __nccwpck_require__(85622) +var through = __nccwpck_require__(14582) +var globStream = __nccwpck_require__(88963) +var concat = __nccwpck_require__(42456) +var xtend = __nccwpck_require__(91208) + +var defaults = { + dir: path.join(path.dirname(__nccwpck_require__.c[__nccwpck_require__.s].filename), 'doc'), + ext: '.txt', + help: 'help' +} + +function helpMe (opts) { + opts = xtend(defaults, opts) + + if (!opts.dir) { + throw new Error('missing directory') + } + + return { + createStream: createStream, + toStdout: toStdout + } + + function createStream (args) { + if (typeof args === 'string') { + args = args.split(' ') + } else if (!args || args.length === 0) { + args = [opts.help] + } + + var out = through() + var gs = globStream([opts.dir + '/**/*' + opts.ext]) + var re = new RegExp(args.map(function (arg) { + return arg + '[a-zA-Z0-9]*' + }).join('[ /]+')) + + gs.pipe(concat({ objectMode: true }, function (err, files) { + if (err) return out.emit('error', err) + + files = files.map(function (file) { + file.relative = file.path.replace(file.base, '').replace(/^\//, '') + return file + }).filter(function (file) { + return file.relative.match(re) + }) + + if (files.length === 0) { + return out.emit('error', new Error('no such help file')) + } else if (files.length > 1) { + out.write('There are ' + files.length + ' help pages ') + out.write('that matches the given request, please disambiguate:\n') + files.forEach(function (file) { + out.write(' * ') + out.write(file.relative.replace(opts.ext, '')) + out.write('\n') + }) + out.end() + return + } + + fs.createReadStream(files[0].path) + .on('error', function (err) { + out.emit('error', err) + }) + .pipe(out) + })) + + return out + } + + function toStdout (args) { + createStream(args) + .on('error', function () { + console.log('no such help file\n') + toStdout() + }) + .pipe(process.stdout) + } +} + +module.exports = helpMe + + +/***/ }), + +/***/ 14582: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Transform = __nccwpck_require__(51642).Transform + , inherits = __nccwpck_require__(31669).inherits + , xtend = __nccwpck_require__(91208) + +function DestroyableTransform(opts) { + Transform.call(this, opts) + this._destroyed = false +} + +inherits(DestroyableTransform, Transform) + +DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) return + this._destroyed = true + + var self = this + process.nextTick(function() { + if (err) + self.emit('error', err) + self.emit('close') + }) +} + +// a noop _transform function +function noop (chunk, enc, callback) { + callback(null, chunk) +} + + +// create a new export function, used by both the main export and +// the .ctor export, contains common logic for dealing with arguments +function through2 (construct) { + return function (options, transform, flush) { + if (typeof options == 'function') { + flush = transform + transform = options + options = {} + } + + if (typeof transform != 'function') + transform = noop + + if (typeof flush != 'function') + flush = null + + return construct(options, transform, flush) + } +} + + +// main export, just make me a transform stream! +module.exports = through2(function (options, transform, flush) { + var t2 = new DestroyableTransform(options) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) + + +// make me a reusable prototype that I can `new`, or implicitly `new` +// with a constructor call +module.exports.ctor = through2(function (options, transform, flush) { + function Through2 (override) { + if (!(this instanceof Through2)) + return new Through2(override) + + this.options = xtend(options, override) + + DestroyableTransform.call(this, this.options) + } + + inherits(Through2, DestroyableTransform) + + Through2.prototype._transform = transform + + if (flush) + Through2.prototype._flush = flush + + return Through2 +}) + + +module.exports.obj = through2(function (options, transform, flush) { + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) + + +/***/ }), + +/***/ 52492: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var wrappy = __nccwpck_require__(62940) +var reqs = Object.create(null) +var once = __nccwpck_require__(1223) + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + + // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} + + +/***/ }), + +/***/ 44124: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +try { + var util = __nccwpck_require__(31669); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = __nccwpck_require__(8544); +} + + +/***/ }), + +/***/ 8544: +/***/ ((module) => { + +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} + + +/***/ }), + +/***/ 50961: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isRelative = __nccwpck_require__(93414); +var isWindows = __nccwpck_require__(49125); + +/** + * Expose `isAbsolute` + */ + +module.exports = isAbsolute; + +/** + * Returns true if a file path is absolute. + * + * @param {String} `fp` + * @return {Boolean} + */ + +function isAbsolute(fp) { + if (typeof fp !== 'string') { + throw new TypeError('isAbsolute expects a string.'); + } + return isWindows() ? isAbsolute.win32(fp) : isAbsolute.posix(fp); +} + +/** + * Test posix paths. + */ + +isAbsolute.posix = function posixPath(fp) { + return fp.charAt(0) === '/'; +}; + +/** + * Test windows paths. + */ + +isAbsolute.win32 = function win32(fp) { + if (/[a-z]/i.test(fp.charAt(0)) && fp.charAt(1) === ':' && fp.charAt(2) === '\\') { + return true; + } + // Microsoft Azure absolute filepath + if (fp.slice(0, 2) === '\\\\') { + return true; + } + return !isRelative(fp); +}; + + +/***/ }), + +/***/ 76435: +/***/ ((module) => { + +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isExtglob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + var match; + while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + + return false; +}; + + +/***/ }), + +/***/ 59941: +/***/ ((module) => { + +"use strict"; + + +module.exports = function(pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var glob = { negated: false, pattern: pattern, original: pattern }; + if (pattern.charAt(0) === '!' && pattern.charAt(1) !== '(') { + glob.negated = true; + glob.pattern = pattern.slice(1); + } + + return glob; +}; + + +/***/ }), + +/***/ 93414: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var isUncPath = __nccwpck_require__(72411); + +module.exports = function isRelative(filepath) { + if (typeof filepath !== 'string') { + throw new TypeError('expected filepath to be a string'); + } + + // Windows UNC paths are always considered to be absolute. + return !isUncPath(filepath) && !/^([a-z]:)?[\\\/]/i.test(filepath); +}; + + +/***/ }), + +/***/ 72411: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var regex = __nccwpck_require__(49966)(); + +module.exports = function(filepath) { + if (typeof filepath !== 'string') { + throw new TypeError('expected a string'); + } + return regex.test(filepath); +}; + + +/***/ }), + +/***/ 49125: +/***/ ((module, exports) => { + +/*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +(function(factory) { + if (exports && typeof exports === 'object' && "object" !== 'undefined') { + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + define([], factory); + } else if (typeof window !== 'undefined') { + window.isWindows = factory(); + } else if (typeof global !== 'undefined') { + global.isWindows = factory(); + } else if (typeof self !== 'undefined') { + self.isWindows = factory(); + } else { + this.isWindows = factory(); + } +})(function() { + 'use strict'; + return function isWindows() { + return process && (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE)); + }; +}); + + +/***/ }), + +/***/ 20893: +/***/ ((module) => { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + + +/***/ }), + +/***/ 87783: +/***/ ((__unused_webpack_module, exports) => { + +(function(exports) { + "use strict"; + + function isArray(obj) { + if (obj !== null) { + return Object.prototype.toString.call(obj) === "[object Array]"; + } else { + return false; + } + } + + 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; + } + + function isFalse(obj) { + // From the spec: + // A false value corresponds to the following values: + // Empty list + // Empty object + // Empty string + // False boolean + // null value + + // 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; + } + } + + 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(); + }; + } else { + trimLeft = function(str) { + return str.match(/^\s*(.*)/)[1]; + }; + } + + // 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}] + } + }; + } + + 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); + }, + + _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."); + } + } + }, + + _typeMatches: function(actual, expected, argValue) { + if (expected === TYPE_ANY) { + return true; + } + 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; + } + } + 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); + + +/***/ }), + +/***/ 54690: +/***/ ((module) => { + +module.exports = function (obj, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var space = opts.space || ''; + if (typeof space === 'number') space = Array(space+1).join(' '); + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + var replacer = opts.replacer || function(key, value) { return value; }; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (parent, key, node, level) { + var indent = space ? ('\n' + new Array(level + 1).join(space)) : ''; + var colonSeparator = space ? ': ' : ':'; + + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + node = replacer.call(parent, key, node); + + if (node === undefined) { + return; + } + if (typeof node !== 'object' || node === null) { + return JSON.stringify(node); + } + if (isArray(node)) { + var out = []; + for (var i = 0; i < node.length; i++) { + var item = stringify(node, i, node[i], level+1) || JSON.stringify(null); + out.push(indent + space + item); + } + return '[' + out.join(',') + indent + ']'; + } + else { + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + else seen.push(node); + + var keys = objectKeys(node).sort(cmp && cmp(node)); + var out = []; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node, key, node[key], level+1); + + if(!value) continue; + + var keyValue = JSON.stringify(key) + + colonSeparator + + value; + ; + out.push(indent + space + keyValue); + } + seen.splice(seen.indexOf(node), 1); + return '{' + out.join(',') + indent + '}'; + } + })({ '': obj }, '', obj, 0); +}; + +var isArray = Array.isArray || function (x) { + return {}.toString.call(x) === '[object Array]'; +}; + +var objectKeys = Object.keys || function (obj) { + var has = Object.prototype.hasOwnProperty || function () { return true }; + var keys = []; + for (var key in obj) { + if (has.call(obj, key)) keys.push(key); + } + return keys; +}; + + +/***/ }), + +/***/ 44245: +/***/ ((module) => { + +(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=require,i=0;i 0) { + words += '-' + lookup(remainder, false, ord); + } else if (ord) { + words = words.substring(0, words.length - 1) + 'ieth'; + } + } else if (num < 1000) { + const hundreds = Math.floor(num / 100); + const remainder = num % 100; + words = (prev ? ', ' : '') + few[hundreds] + ' Hundred'; + if (remainder > 0) { + words += lookup(remainder, true, ord); + } else if (ord) { + words += 'th'; + } + } else { + var mag = Math.floor(Math.log10(num) / 3); + if (mag > magnitudes.length) { + mag = magnitudes.length; // the largest word + } + const factor = Math.pow(10, mag * 3); + const mant = Math.floor(num / factor); + const remainder = num - mant * factor; + words = (prev ? ', ' : '') + lookup(mant, false, false) + ' ' + magnitudes[mag - 1]; + if (remainder > 0) { + words += lookup(remainder, true, ord); + } else if (ord) { + words += 'th'; + } + } + return words; + }; + + var words = lookup(value, false, ordinal); + return words; + } + + const wordValues = {}; + few.forEach(function (word, index) { + wordValues[word.toLowerCase()] = index; + }); + ordinals.forEach(function (word, index) { + wordValues[word.toLowerCase()] = index; + }); + decades.forEach(function (word, index) { + const lword = word.toLowerCase(); + wordValues[lword] = (index + 2) * 10; + wordValues[lword.substring(0, word.length - 1) + 'ieth'] = wordValues[lword]; + }); + wordValues.hundredth = 100; + magnitudes.forEach(function (word, index) { + const lword = word.toLowerCase(); + const val = Math.pow(10, (index + 1) * 3); + wordValues[lword] = val; + wordValues[lword + 'th'] = val; + }); + + /** + * Converts a number in english words to numeric value + * @param {string} text - the number in words + * @returns {number} - the numeric value + */ + function wordsToNumber(text) { + const parts = text.split(/,\s|\sand\s|[\s\\-]/); + const values = parts.map(part => wordValues[part]); + let segs = [0]; + values.forEach(value => { + if (value < 100) { + let top = segs.pop(); + if (top >= 1000) { + segs.push(top); + top = 0; + } + segs.push(top + value); + } else { + segs.push(segs.pop() * value); + } + }); + const result = segs.reduce((a, b) => a + b, 0); + return result; + } + + const romanNumerals = [ + [1000, 'm'], + [900, 'cm'], + [500, 'd'], + [400, 'cd'], + [100, 'c'], + [90, 'xc'], + [50, 'l'], + [40, 'xl'], + [10, 'x'], + [9, 'ix'], + [5, 'v'], + [4, 'iv'], + [1, 'i'] + ]; + + const romanValues = {'M': 1000, 'D': 500, 'C': 100, 'L': 50, 'X': 10, 'V': 5, 'I': 1}; + + /** + * converts a number to roman numerals + * @param {number} value - the number + * @returns {string} - the number in roman numerals + */ + function decimalToRoman(value) { + for (var index = 0; index < romanNumerals.length; index++) { + const numeral = romanNumerals[index]; + if (value >= numeral[0]) { + return numeral[1] + decimalToRoman(value - numeral[0]); + } + } + return ''; + } + + /** + * converts roman numerals to a number + * @param {string} roman - roman number + * @returns {number} - the numeric value + */ + function romanToDecimal(roman) { + var decimal = 0; + var max = 1; + for (var i = roman.length - 1; i >= 0; i--) { + const digit = roman[i]; + const value = romanValues[digit]; + if (value < max) { + decimal -= value; + } else { + max = value; + decimal += value; + } + } + return decimal; + } + + /** + * converts a number to spreadsheet style letters + * @param {number} value - the number + * @param {string} aChar - the character representing the start of the sequence, e.g. 'A' + * @returns {string} - the letters + */ + function decimalToLetters(value, aChar) { + var letters = []; + var aCode = aChar.charCodeAt(0); + while (value > 0) { + letters.unshift(String.fromCharCode((value - 1) % 26 + aCode)); + value = Math.floor((value - 1) / 26); + } + return letters.join(''); + } + + /** + * converts spreadsheet style letters to a number + * @param {string} letters - the letters + * @param {string} aChar - the character representing the start of the sequence, e.g. 'A' + * @returns {number} - the numeric value + */ + function lettersToDecimal(letters, aChar) { + var aCode = aChar.charCodeAt(0); + var decimal = 0; + for (var i = 0; i < letters.length; i++) { + decimal += (letters.charCodeAt(letters.length - i - 1) - aCode + 1) * Math.pow(26, i); + } + return decimal; + } + + /** + * Formats an integer as specified by the XPath fn:format-integer function + * See https://www.w3.org/TR/xpath-functions-31/#func-format-integer + * @param {number} value - the number to be formatted + * @param {string} picture - the picture string that specifies the format + * @returns {string} - the formatted number + */ + function formatInteger(value, picture) { + if (typeof value === 'undefined') { + return undefined; + } + + value = Math.floor(value); + + const format = analyseIntegerPicture(picture); + return _formatInteger(value, format); + } + + const formats = { + DECIMAL: 'decimal', + LETTERS: 'letters', + ROMAN: 'roman', + WORDS: 'words', + SEQUENCE: 'sequence' + }; + + const tcase = { + UPPER: 'upper', + LOWER: 'lower', + TITLE: 'title' + }; + + /** + * formats an integer using a preprocessed representation of the picture string + * @param {number} value - the number to be formatted + * @param {object} format - the preprocessed representation of the pucture string + * @returns {string} - the formatted number + * @private + */ + function _formatInteger(value, format) { + let formattedInteger; + const negative = value < 0; + value = Math.abs(value); + switch (format.primary) { + case formats.LETTERS: + formattedInteger = decimalToLetters(value, format.case === tcase.UPPER ? 'A' : 'a'); + break; + case formats.ROMAN: + formattedInteger = decimalToRoman(value); + if (format.case === tcase.UPPER) { + formattedInteger = formattedInteger.toUpperCase(); + } + break; + case formats.WORDS: + formattedInteger = numberToWords(value, format.ordinal); + if (format.case === tcase.UPPER) { + formattedInteger = formattedInteger.toUpperCase(); + } else if (format.case === tcase.LOWER) { + formattedInteger = formattedInteger.toLowerCase(); + } + break; + case formats.DECIMAL: + formattedInteger = '' + value; + // TODO use functionPad + var padLength = format.mandatoryDigits - formattedInteger.length; + if (padLength > 0) { + var padding = (new Array(padLength + 1)).join('0'); + formattedInteger = padding + formattedInteger; + } + if (format.zeroCode !== 0x30) { + formattedInteger = stringToArray(formattedInteger).map(code => { + return String.fromCodePoint(code.codePointAt(0) + format.zeroCode - 0x30); + }).join(''); + } + // insert the grouping-separator-signs, if any + if (format.regular) { + const n = Math.floor((formattedInteger.length - 1) / format.groupingSeparators.position); + for (let ii = n; ii > 0; ii--) { + const pos = formattedInteger.length - ii * format.groupingSeparators.position; + formattedInteger = formattedInteger.substr(0, pos) + format.groupingSeparators.character + formattedInteger.substr(pos); + } + } else { + format.groupingSeparators.reverse().forEach(separator => { + const pos = formattedInteger.length - separator.position; + formattedInteger = formattedInteger.substr(0, pos) + separator.character + formattedInteger.substr(pos); + }); + } + + if (format.ordinal) { + var suffix123 = {'1': 'st', '2': 'nd', '3': 'rd'}; + var lastDigit = formattedInteger[formattedInteger.length - 1]; + var suffix = suffix123[lastDigit]; + if (!suffix || (formattedInteger.length > 1 && formattedInteger[formattedInteger.length - 2] === '1')) { + suffix = 'th'; + } + formattedInteger = formattedInteger + suffix; + } + break; + case formats.SEQUENCE: + throw { + code: 'D3130', + value: format.token + }; + } + if (negative) { + formattedInteger = '-' + formattedInteger; + } + + return formattedInteger; + } + + //TODO what about decimal groups in the unicode supplementary planes (surrogate pairs) ??? + const decimalGroups = [0x30, 0x0660, 0x06F0, 0x07C0, 0x0966, 0x09E6, 0x0A66, 0x0AE6, 0x0B66, 0x0BE6, 0x0C66, 0x0CE6, 0x0D66, 0x0DE6, 0x0E50, 0x0ED0, 0x0F20, 0x1040, 0x1090, 0x17E0, 0x1810, 0x1946, 0x19D0, 0x1A80, 0x1A90, 0x1B50, 0x1BB0, 0x1C40, 0x1C50, 0xA620, 0xA8D0, 0xA900, 0xA9D0, 0xA9F0, 0xAA50, 0xABF0, 0xFF10]; + + /** + * preprocesses the picture string + * @param {string} picture - picture string + * @returns {{type: string, primary: string, case: string, ordinal: boolean}} - analysed picture + */ + function analyseIntegerPicture(picture) { + const format = { + type: 'integer', + primary: formats.DECIMAL, + case: tcase.LOWER, + ordinal: false + }; + + let primaryFormat, formatModifier; + const semicolon = picture.lastIndexOf(';'); + if (semicolon === -1) { + primaryFormat = picture; + } else { + primaryFormat = picture.substring(0, semicolon); + formatModifier = picture.substring(semicolon + 1); + if (formatModifier[0] === 'o') { + format.ordinal = true; + } + } + + /* eslnt-disable-next no-fallthrough */ + switch (primaryFormat) { + case 'A': + format.case = tcase.UPPER; + /* eslnt-disable-next-line no-fallthrough */ + case 'a': + format.primary = formats.LETTERS; + break; + case 'I': + format.case = tcase.UPPER; + /* eslnt-disable-next-line no-fallthrough */ + case 'i': + format.primary = formats.ROMAN; + break; + case 'W': + format.case = tcase.UPPER; + format.primary = formats.WORDS; + break; + case 'Ww': + format.case = tcase.TITLE; + format.primary = formats.WORDS; + break; + case 'w': + format.primary = formats.WORDS; + break; + default: { + // this is a decimal-digit-pattern if it contains a decimal digit (from any unicode decimal digit group) + let zeroCode = null; + let mandatoryDigits = 0; + let optionalDigits = 0; + let groupingSeparators = []; + let separatorPosition = 0; + const formatCodepoints = stringToArray(primaryFormat).map(c => c.codePointAt(0)).reverse(); // reverse the array to determine positions of grouping-separator-signs + formatCodepoints.forEach((codePoint) => { + // step though each char in the picture to determine the digit group + let digit = false; + for (let ii = 0; ii < decimalGroups.length; ii++) { + const group = decimalGroups[ii]; + if (codePoint >= group && codePoint <= group + 9) { + // codepoint is part of this decimal group + digit = true; + mandatoryDigits++; + separatorPosition++; + if (zeroCode === null) { + zeroCode = group; + } else if (group !== zeroCode) { + // error! different decimal groups in the same pattern + throw { + code: 'D3131' + }; + } + break; + } + } + if (!digit) { + if (codePoint === 0x23) { // # - optional-digit-sign + separatorPosition++; + optionalDigits++; + } else { + // neither a decimal-digit-sign ot optional-digit-sign, assume it is a grouping-separator-sign + groupingSeparators.push({ + position: separatorPosition, + character: String.fromCodePoint(codePoint) + }); + } + } + }); + if (mandatoryDigits > 0) { + format.primary = formats.DECIMAL; + // TODO validate decimal-digit-pattern + + // the decimal digit family (codepoint offset) + format.zeroCode = zeroCode; + // the number of mandatory digits + format.mandatoryDigits = mandatoryDigits; + // the number of optional digits + format.optionalDigits = optionalDigits; + // grouping separator template + // are the grouping-separator-signs 'regular'? + const regularRepeat = function (separators) { + // are the grouping positions regular? i.e. same interval between each of them + // is there at least one separator? + if (separators.length === 0) { + return 0; + } + // are all the characters the same? + const sepChar = separators[0].character; + for (let ii = 1; ii < separators.length; ii++) { + if (separators[ii].character !== sepChar) { + return 0; + } + } + // are they equally spaced? + const indexes = separators.map(separator => separator.position); + const gcd = function (a, b) { + return b === 0 ? a : gcd(b, a % b); + }; + // find the greatest common divisor of all the positions + const factor = indexes.reduce(gcd); + // is every position separated by this divisor? If so, it's regular + for (let index = 1; index <= indexes.length; index++) { + if (indexes.indexOf(index * factor) === -1) { + return 0; + } + } + return factor; + }; + + const regular = regularRepeat(groupingSeparators); + if (regular > 0) { + format.regular = true; + format.groupingSeparators = { + position: regular, + character: groupingSeparators[0].character + }; + } else { + format.regular = false; + format.groupingSeparators = groupingSeparators; + } + + } else { + // this is a 'numbering sequence' which the spec says is implementation-defined + // this implementation doesn't support any numbering sequences at the moment. + format.primary = formats.SEQUENCE; + format.token = primaryFormat; + } + } + } + + return format; + } + + const defaultPresentationModifiers = { + Y: '1', M: '1', D: '1', d: '1', F: 'n', W: '1', w: '1', X: '1', x: '1', H: '1', h: '1', + P: 'n', m: '01', s: '01', f: '1', Z: '01:01', z: '01:01', C: 'n', E: 'n' + }; + + // §9.8.4.1 the format specifier is an array of string literals and variable markers + /** + * analyse the date-time picture string + * @param {string} picture - picture string + * @returns {{type: string, parts: Array}} - the analysed string + */ + function analyseDateTimePicture(picture) { + var spec = []; + const format = { + type: 'datetime', + parts: spec + }; + const addLiteral = function (start, end) { + if (end > start) { + let literal = picture.substring(start, end); + // replace any doubled ]] with single ] + // what if there are instances of single ']' ? - the spec doesn't say + literal = literal.split(']]').join(']'); + spec.push({type: 'literal', value: literal}); + } + }; + + var start = 0, pos = 0; + while (pos < picture.length) { + if (picture.charAt(pos) === '[') { + // check it's not a doubled [[ + if (picture.charAt(pos + 1) === '[') { + // literal [ + addLiteral(start, pos); + spec.push({type: 'literal', value: '['}); + pos += 2; + start = pos; + continue; + } + // start of variable marker + // push the string literal (if there is one) onto the array + addLiteral(start, pos); + start = pos; + // search forward to closing ] + pos = picture.indexOf(']', start); + // TODO handle error case if pos === -1 + if(pos === -1) { + // error - no closing bracket + throw { + code: 'D3135' + }; + } + let marker = picture.substring(start + 1, pos); + // whitespace within a variable marker is ignored (i.e. remove it) + marker = marker.split(/\s+/).join(''); + var def = { + type: 'marker', + component: marker.charAt(0) // 1. The component specifier is always present and is always a single letter. + }; + var comma = marker.lastIndexOf(','); // 2. The width modifier may be recognized by the presence of a comma + var presMod; // the presentation modifiers + if (comma !== -1) { + // §9.8.4.2 The Width Modifier + const widthMod = marker.substring(comma + 1); + const dash = widthMod.indexOf('-'); + let min, max; + const parseWidth = function (wm) { + if (typeof wm === 'undefined' || wm === '*') { + return undefined; + } else { + // TODO validate wm is an unsigned int + return parseInt(wm); + } + }; + if (dash === -1) { + min = widthMod; + } else { + min = widthMod.substring(0, dash); + max = widthMod.substring(dash + 1); + } + const widthDef = { + min: parseWidth(min), + max: parseWidth(max) + }; + def.width = widthDef; + presMod = marker.substring(1, comma); + } else { + presMod = marker.substring(1); + } + if (presMod.length === 1) { + def.presentation1 = presMod; // first presentation modifier + //TODO validate the first presentation modifier - it's either N, n, Nn or it passes analyseIntegerPicture + } else if (presMod.length > 1) { + var lastChar = presMod.charAt(presMod.length - 1); + if ('atco'.indexOf(lastChar) !== -1) { + def.presentation2 = lastChar; + if (lastChar === 'o') { + def.ordinal = true; + } + // 'c' means 'cardinal' and is the default (i.e. not 'ordinal') + // 'a' & 't' are ignored (not sure of their relevance to English numbering) + def.presentation1 = presMod.substring(0, presMod.length - 1); + } else { + def.presentation1 = presMod; + //TODO validate the first presentation modifier - it's either N, n, Nn or it passes analyseIntegerPicture, + // doesn't use ] as grouping separator, and if grouping separator is , then must have width modifier + } + } else { + // no presentation modifier specified - apply the default; + def.presentation1 = defaultPresentationModifiers[def.component]; + } + if (typeof def.presentation1 === 'undefined') { + // unknown component specifier + throw { + code: 'D3132', + value: def.component + }; + } + if (def.presentation1[0] === 'n') { + def.names = tcase.LOWER; + } else if (def.presentation1[0] === 'N') { + if (def.presentation1[1] === 'n') { + def.names = tcase.TITLE; + } else { + def.names = tcase.UPPER; + } + } else if ('YMDdFWwXxHhmsf'.indexOf(def.component) !== -1) { + var integerPattern = def.presentation1; + if (def.presentation2) { + integerPattern += ';' + def.presentation2; + } + def.integerFormat = analyseIntegerPicture(integerPattern); + if (def.width && def.width.min !== undefined) { + if (def.integerFormat.mandatoryDigits < def.width.min) { + def.integerFormat.mandatoryDigits = def.width.min; + } + } + if (def.component === 'Y') { + // §9.8.4.4 + def.n = -1; + if (def.width && def.width.max !== undefined) { + def.n = def.width.max; + def.integerFormat.mandatoryDigits = def.n; + } else { + var w = def.integerFormat.mandatoryDigits + def.integerFormat.optionalDigits; + if (w >= 2) { + def.n = w; + } + } + } + } + if (def.component === 'Z' || def.component === 'z') { + def.integerFormat = analyseIntegerPicture(def.presentation1); + } + spec.push(def); + start = pos + 1; + } + pos++; + } + addLiteral(start, pos); + return format; + } + + const days = ['', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; + const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + const millisInADay = 1000 * 60 * 60 * 24; + + const startOfFirstWeek = function (ym) { + // ISO 8601 defines the first week of the year to be the week that contains the first Thursday + // XPath F&O extends this same definition for the first week of a month + // the week starts on a Monday - calculate the millis for the start of the first week + // millis for given 1st Jan of that year (at 00:00 UTC) + const jan1 = Date.UTC(ym.year, ym.month); + var dayOfJan1 = (new Date(jan1)).getUTCDay(); + if (dayOfJan1 === 0) { + dayOfJan1 = 7; + } + // if Jan 1 is Fri, Sat or Sun, then add the number of days (in millis) to jan1 to get the start of week 1 + return dayOfJan1 > 4 ? jan1 + (8 - dayOfJan1) * millisInADay : jan1 - (dayOfJan1 - 1) * millisInADay; + }; + + const yearMonth = function (year, month) { + return { + year: year, + month: month, + nextMonth: function () { + return (month === 11) ? yearMonth(year + 1, 0) : yearMonth(year, month + 1); + }, + previousMonth: function () { + return (month === 0) ? yearMonth(year - 1, 11) : yearMonth(year, month - 1); + }, + nextYear: function () { + return yearMonth(year + 1, month); + }, + previousYear: function () { + return yearMonth(year - 1, month); + } + }; + }; + + const deltaWeeks = function (start, end) { + return (end - start) / (millisInADay * 7) + 1; + }; + + const getDateTimeFragment = (date, component) => { + let componentValue; + switch (component) { + case 'Y': // year + componentValue = date.getUTCFullYear(); + break; + case 'M': // month in year + componentValue = date.getUTCMonth() + 1; + break; + case 'D': // day in month + componentValue = date.getUTCDate(); + break; + case 'd': { // day in year + // millis for given date (at 00:00 UTC) + const today = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()); + // millis for given 1st Jan of that year (at 00:00 UTC) + const firstJan = Date.UTC(date.getUTCFullYear(), 0); + componentValue = (today - firstJan) / millisInADay + 1; + break; + } + case 'F': // day of week + componentValue = date.getUTCDay(); + if (componentValue === 0) { + // ISO 8601 defines days 1-7: Mon-Sun + componentValue = 7; + } + break; + case 'W': { // week in year + const thisYear = yearMonth(date.getUTCFullYear(), 0); + const startOfWeek1 = startOfFirstWeek(thisYear); + const today = Date.UTC(thisYear.year, date.getUTCMonth(), date.getUTCDate()); + let week = deltaWeeks(startOfWeek1, today); + if (week > 52) { + // might be first week of the following year + const startOfFollowingYear = startOfFirstWeek(thisYear.nextYear()); + if (today >= startOfFollowingYear) { + week = 1; + } + } else if (week < 1) { + // must be end of the previous year + const startOfPreviousYear = startOfFirstWeek(thisYear.previousYear()); + week = deltaWeeks(startOfPreviousYear, today); + } + componentValue = Math.floor(week); + break; + } + case 'w': { // week in month + const thisMonth = yearMonth(date.getUTCFullYear(), date.getUTCMonth()); + const startOfWeek1 = startOfFirstWeek(thisMonth); + const today = Date.UTC(thisMonth.year, thisMonth.month, date.getUTCDate()); + let week = deltaWeeks(startOfWeek1, today); + if (week > 4) { + // might be first week of the following month + const startOfFollowingMonth = startOfFirstWeek(thisMonth.nextMonth()); + if (today >= startOfFollowingMonth) { + week = 1; + } + } else if (week < 1) { + // must be end of the previous month + const startOfPreviousMonth = startOfFirstWeek(thisMonth.previousMonth()); + week = deltaWeeks(startOfPreviousMonth, today); + } + componentValue = Math.floor(week); + break; + } + case 'X': { // ISO week-numbering year + // Extension: The F&O spec says nothing about how to access the year associated with the week-of-the-year + // e.g. Sat 1 Jan 2005 is in the 53rd week of 2004. + // The 'W' component specifier gives 53, but 'Y' will give 2005. + // I propose to add 'X' as the component specifier to give the ISO week-numbering year (2004 in this example) + const thisYear = yearMonth(date.getUTCFullYear(), 0); + const startOfISOYear = startOfFirstWeek(thisYear); + const endOfISOYear = startOfFirstWeek(thisYear.nextYear()); + const now = date.getTime(); + if (now < startOfISOYear) { + componentValue = thisYear.year - 1; + } else if (now >= endOfISOYear) { + componentValue = thisYear.year + 1; + } else { + componentValue = thisYear.year; + } + break; + } + case 'x': { // ISO week-numbering month + // Extension: The F&O spec says nothing about how to access the month associated with the week-of-the-month + // e.g. Sat 1 Jan 2005 is in the 5th week of December 2004. + // The 'w' component specifier gives 5, but 'W' will give January and 'Y' will give 2005. + // I propose to add 'x' as the component specifier to give the 'week-numbering' month (December in this example) + const thisMonth = yearMonth(date.getUTCFullYear(), date.getUTCMonth()); + const startOfISOMonth = startOfFirstWeek(thisMonth); + const nextMonth = thisMonth.nextMonth(); + const endOfISOMonth = startOfFirstWeek(nextMonth); + const now = date.getTime(); + if (now < startOfISOMonth) { + componentValue = thisMonth.previousMonth().month + 1; + } else if (now >= endOfISOMonth) { + componentValue = nextMonth.month + 1; + } else { + componentValue = thisMonth.month + 1; + } + break; + } + case 'H': // hour in day (24 hours) + componentValue = date.getUTCHours(); + break; + case 'h': // hour in half-day (12 hours) + componentValue = date.getUTCHours(); + componentValue = componentValue % 12; + if (componentValue === 0) { + componentValue = 12; + } + break; + case 'P': // am/pm marker + componentValue = date.getUTCHours() >= 12 ? 'pm' : 'am'; + break; + case 'm': // minute in hour + componentValue = date.getUTCMinutes(); + break; + case 's': // second in minute + componentValue = date.getUTCSeconds(); + break; + case 'f': // fractional seconds + componentValue = date.getUTCMilliseconds(); + break; + case 'Z': // timezone + case 'z': + // since the date object is constructed from epoch millis, the TZ component is always be UTC. + break; + case 'C': // calendar name + componentValue = 'ISO'; + break; + case 'E': // era + componentValue = 'ISO'; + break; + } + return componentValue; + }; + + let iso8601Spec = null; + + /** + * formats the date/time as specified by the XPath fn:format-dateTime function + * @param {number} millis - the timestamp to be formatted, in millis since the epoch + * @param {string} picture - the picture string that specifies the format + * @param {string} timezone - the timezone to use + * @returns {string} - the formatted timestamp + */ + function formatDateTime(millis, picture, timezone) { + var offsetHours = 0; + var offsetMinutes = 0; + + if (typeof timezone !== 'undefined') { + // parse the hour and minute offsets + // assume for now the format supplied is +hhmm + const offset = parseInt(timezone); + offsetHours = Math.floor(offset / 100); + offsetMinutes = offset % 100; + } + + var formatComponent = function (date, markerSpec) { + var componentValue = getDateTimeFragment(date, markerSpec.component); + + // §9.8.4.3 Formatting Integer-Valued Date/Time Components + if ('YMDdFWwXxHhms'.indexOf(markerSpec.component) !== -1) { + if (markerSpec.component === 'Y') { + // §9.8.4.4 Formatting the Year Component + if (markerSpec.n !== -1) { + componentValue = componentValue % Math.pow(10, markerSpec.n); + } + } + if (markerSpec.names) { + if (markerSpec.component === 'M' || markerSpec.component === 'x') { + componentValue = months[componentValue - 1]; + } else if (markerSpec.component === 'F') { + componentValue = days[componentValue]; + } else { + throw { + code: 'D3133', + value: markerSpec.component + }; + } + if (markerSpec.names === tcase.UPPER) { + componentValue = componentValue.toUpperCase(); + } else if (markerSpec.names === tcase.LOWER) { + componentValue = componentValue.toLowerCase(); + } + if (markerSpec.width && componentValue.length > markerSpec.width.max) { + componentValue = componentValue.substring(0, markerSpec.width.max); + } + } else { + componentValue = _formatInteger(componentValue, markerSpec.integerFormat); + } + } else if (markerSpec.component === 'f') { + // TODO §9.8.4.5 Formatting Fractional Seconds + componentValue = _formatInteger(componentValue, markerSpec.integerFormat); + } else if (markerSpec.component === 'Z' || markerSpec.component === 'z') { + // §9.8.4.6 Formatting timezones + const offset = offsetHours * 100 + offsetMinutes; + if (markerSpec.integerFormat.regular) { + componentValue = _formatInteger(offset, markerSpec.integerFormat); + } else { + const numDigits = markerSpec.integerFormat.mandatoryDigits; + if (numDigits === 1 || numDigits === 2) { + componentValue = _formatInteger(offsetHours, markerSpec.integerFormat); + if (offsetMinutes !== 0) { + componentValue += ':' + formatInteger(offsetMinutes, '00'); + } + } else if (numDigits === 3 || numDigits === 4) { + componentValue = _formatInteger(offset, markerSpec.integerFormat); + } else { + throw { + code: 'D3134', + value: numDigits + }; + } + } + if (offset >= 0) { + componentValue = '+' + componentValue; + } + if (markerSpec.component === 'z') { + componentValue = 'GMT' + componentValue; + } + if (offset === 0 && markerSpec.presentation2 === 't') { + componentValue = 'Z'; + } + } + return componentValue; + }; + + let formatSpec; + if(typeof picture === 'undefined') { + // default to ISO 8601 format + if (iso8601Spec === null) { + iso8601Spec = analyseDateTimePicture('[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]'); + } + formatSpec = iso8601Spec; + } else { + formatSpec = analyseDateTimePicture(picture); + } + + const offsetMillis = (60 * offsetHours + offsetMinutes) * 60 * 1000; + const dateTime = new Date(millis + offsetMillis); + + let result = ''; + formatSpec.parts.forEach(function (part) { + if (part.type === 'literal') { + result += part.value; + } else { + result += formatComponent(dateTime, part); + } + }); + + return result; + } + + /** + * Generate a regex to parse integers or timestamps + * @param {object} formatSpec - object representing the format + * @returns {object} - regex + */ + function generateRegex(formatSpec) { + var matcher = {}; + if (formatSpec.type === 'datetime') { + matcher.type = 'datetime'; + matcher.parts = formatSpec.parts.map(function (part) { + var res = {}; + if (part.type === 'literal') { + res.regex = part.value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } else if (part.component === 'Z' || part.component === 'z') { + // timezone + let separator; + if (!Array.isArray(part.integerFormat.groupingSeparators)) { + separator = part.integerFormat.groupingSeparators; + } + res.regex = ''; + if (part.component === 'z') { + res.regex = 'GMT'; + } + res.regex += '[-+][0-9]+'; + if (separator) { + res.regex += separator.character + '[0-9]+'; + } + res.parse = function(value) { + if (part.component === 'z') { + value = value.substring(3); // remove the leading GMT + } + let offsetHours = 0, offsetMinutes = 0; + if (separator) { + offsetHours = Number.parseInt(value.substring(0, value.indexOf(separator.character))); + offsetMinutes = Number.parseInt(value.substring(value.indexOf(separator.character) + 1)); + } else { + // depends on number of digits + const numdigits = value.length - 1; + if (numdigits <= 2) { + // just hour offset + offsetHours = Number.parseInt(value); + } else { + offsetHours = Number.parseInt(value.substring(0, 3)); + offsetMinutes = Number.parseInt(value.substring(3)); + } + } + return offsetHours * 60 + offsetMinutes; + }; + } else if (part.integerFormat) { + res = generateRegex(part.integerFormat); + } else { + // must be a month or day name + res.regex = '[a-zA-Z]+'; + var lookup = {}; + if (part.component === 'M' || part.component === 'x') { + // months + months.forEach(function (name, index) { + if (part.width && part.width.max) { + lookup[name.substring(0, part.width.max)] = index + 1; + } else { + lookup[name] = index + 1; + } + }); + } else if (part.component === 'F') { + // days + days.forEach(function (name, index) { + if (index > 0) { + if (part.width && part.width.max) { + lookup[name.substring(0, part.width.max)] = index; + } else { + lookup[name] = index; + } + } + }); + } else if (part.component === 'P') { + lookup = {'am': 0, 'AM': 0, 'pm': 1, 'PM': 1}; + } else { + // unsupported 'name' option for this component + throw { + code: 'D3133', + value: part.component + }; + } + res.parse = function (value) { + return lookup[value]; + }; + } + res.component = part.component; + return res; + }); + } else { // type === 'integer' + matcher.type = 'integer'; + const isUpper = formatSpec.case === tcase.UPPER; + switch (formatSpec.primary) { + case formats.LETTERS: + matcher.regex = isUpper ? '[A-Z]+' : '[a-z]+'; + matcher.parse = function (value) { + return lettersToDecimal(value, isUpper ? 'A' : 'a'); + }; + break; + case formats.ROMAN: + matcher.regex = isUpper ? '[MDCLXVI]+' : '[mdclxvi]+'; + matcher.parse = function (value) { + return romanToDecimal(isUpper ? value : value.toUpperCase()); + }; + break; + case formats.WORDS: + matcher.regex = '(?:' + Object.keys(wordValues).concat('and', '[\\-, ]').join('|') + ')+'; + matcher.parse = function (value) { + return wordsToNumber(value.toLowerCase()); + }; + break; + case formats.DECIMAL: + matcher.regex = '[0-9]+'; + if (formatSpec.ordinal) { + // ordinals + matcher.regex += '(?:th|st|nd|rd)'; + } + matcher.parse = function (value) { + let digits = value; + if (formatSpec.ordinal) { + // strip off the suffix + digits = value.substring(0, value.length - 2); + } + // strip out the separators + if (formatSpec.regular) { + digits = digits.split(',').join(''); + } else { + formatSpec.groupingSeparators.forEach(sep => { + digits = digits.split(sep.character).join(''); + }); + } + if (formatSpec.zeroCode !== 0x30) { + // apply offset + digits = digits.split('').map(char => String.fromCodePoint(char.codePointAt(0) - formatSpec.zeroCode + 0x30)).join(''); + } + return parseInt(digits); + }; + break; + case formats.SEQUENCE: + throw { + code: 'D3130', + value: formatSpec.token + }; + } + + } + return matcher; + } + + /** + * parse a string containing an integer as specified by the picture string + * @param {string} value - the string to parse + * @param {string} picture - the picture string + * @returns {number} - the parsed number + */ + function parseInteger(value, picture) { + if (typeof value === 'undefined') { + return undefined; + } + + const formatSpec = analyseIntegerPicture(picture); + const matchSpec = generateRegex(formatSpec); + //const fullRegex = '^' + matchSpec.regex + '$'; + //const matcher = new RegExp(fullRegex); + // TODO validate input based on the matcher regex + const result = matchSpec.parse(value); + return result; + } + + /** + * parse a string containing a timestamp as specified by the picture string + * @param {string} timestamp - the string to parse + * @param {string} picture - the picture string + * @returns {number} - the parsed timestamp in millis since the epoch + */ + function parseDateTime(timestamp, picture) { + const formatSpec = analyseDateTimePicture(picture); + const matchSpec = generateRegex(formatSpec); + const fullRegex = '^' + matchSpec.parts.map(part => '(' + part.regex + ')').join('') + '$'; + + const matcher = new RegExp(fullRegex, 'i'); // TODO can cache this against the picture + var info = matcher.exec(timestamp); + if (info !== null) { + // validate what we've just parsed - do we have enough information to create a timestamp? + // rules: + // The date is specified by one of: + // {Y, M, D} (dateA) + // or {Y, d} (dateB) + // or {Y, x, w, F} (dateC) + // or {X, W, F} (dateD) + // The time is specified by one of: + // {H, m, s, f} (timeA) + // or {P, h, m, s, f} (timeB) + // All sets can have an optional Z + // To create a timestamp (epoch millis) we need both date and time, but we can default missing + // information according to the following rules: + // - line up one combination of the above from date, and one from time, most significant value (MSV) to least significant (LSV + // - for the values that have been captured, if there are any gaps between MSV and LSV, then throw an error + // (e.g.) if hour and seconds, but not minutes is given - throw + // (e.g.) if month, hour and minutes, but not day-of-month is given - throw + // - anything right of the LSV should be defaulted to zero + // (e.g.) if hour and minutes given, default seconds and fractional seconds to zero + // (e.g.) if date only given, default the time to 0:00:00.000 (midnight) + // - anything left of the MSV should be defaulted to the value of that component returned by $now() + // (e.g.) if time only given, default the date to today + // (e.g.) if month and date given, default to this year (and midnight, by previous rule) + // -- default values for X, x, W, w, F will be derived from the values returned by $now() + + // implement the above rules + // determine which of the above date/time combinations we have by using bit masks + + // Y X M x W w d D F P H h m s f Z + // dateA 1 0 1 0 0 0 0 1 ? 0 - must not appear + // dateB 1 0 0 0 0 0 1 0 ? 1 - can appear - relevant + // dateC 0 1 0 1 0 1 0 0 1 ? - can appear - ignored + // dateD 0 1 0 0 1 0 0 0 1 + // timeA 0 1 0 1 1 1 + // timeB 1 0 1 1 1 1 + + // create bitmasks based on the above + // date mask YXMxWwdD + const dmA = 161; // binary 10100001 + const dmB = 130; // binary 10000010 + const dmC = 84; // binary 01010100 + const dmD = 72; // binary 01001000 + // time mask PHhmsf + const tmA = 23; // binary 010111 + const tmB = 47; // binary 101111 + + const components = {}; + for (let i = 1; i < info.length; i++) { + const mpart = matchSpec.parts[i - 1]; + if (mpart.parse) { + components[mpart.component] = mpart.parse(info[i]); + } + } + + if(Object.getOwnPropertyNames(components).length === 0) { + // nothing specified + return undefined; + } + + let mask = 0; + + const shift = bit => { + mask <<= 1; + mask += bit ? 1 : 0; + }; + + const isType = type => { + // shouldn't match any 0's, must match at least one 1 + return !(~type & mask) && !!(type & mask); + }; + + 'YXMxWwdD'.split('').forEach(part => shift(components[part])); + + const dateA = isType(dmA); + const dateB = !dateA && isType(dmB); + const dateC = isType(dmC); + const dateD = !dateC && isType(dmD); + + mask = 0; + 'PHhmsf'.split('').forEach(part => shift(components[part])); + + const timeA = isType(tmA); + const timeB = !timeA && isType(tmB); + + // should only be zero or one date type and zero or one time type + + const dateComps = dateB ? 'YD' : dateC ? 'XxwF' : dateD? 'XWF' : 'YMD'; + const timeComps = timeB ? 'Phmsf' : 'Hmsf'; + + const comps = dateComps + timeComps; + + // step through the candidate parts from most significant to least significant + // default the most significant unspecified parts to current timestamp component + // default the least significant unspecified parts to zero + // if any gaps in between the specified parts, throw an error + + const now = this.environment.timestamp; // must get the fixed timestamp from jsonata + + let startSpecified = false; + let endSpecified = false; + comps.split('').forEach(part => { + if(typeof components[part] === 'undefined') { + if(startSpecified) { + // past the specified block - default to zero + components[part] = ('MDd'.indexOf(part) !== -1) ? 1 : 0; + endSpecified = true; + } else { + // haven't hit the specified block yet, default to current timestamp + components[part] = getDateTimeFragment(now, part); + } + } else { + startSpecified = true; + if(endSpecified) { + throw { + code: 'D3136' + }; + } + } + }); + + // validate and fill in components + if (components.M > 0) { + components.M -= 1; // Date.UTC requires a zero-indexed month + } else { + components.M = 0; // default to January + } + if (dateB) { + // millis for given 1st Jan of that year (at 00:00 UTC) + const firstJan = Date.UTC(components.Y, 0); + const offsetMillis = (components.d - 1) * 1000 * 60 * 60 * 24; + const derivedDate = new Date(firstJan + offsetMillis); + components.M = derivedDate.getUTCMonth(); + components.D = derivedDate.getUTCDate(); + } + if (dateC) { + // TODO implement this + // parsing this format not currently supported + throw { + code: 'D3136' + }; + } + if (dateD) { + // TODO implement this + // parsing this format (ISO week date) not currently supported + throw { + code: 'D3136' + }; + } + if (timeB) { + // 12hr to 24hr + components.H = components.h === 12 ? 0 : components.h; + if (components.P === 1) { + components.H += 12; + } + } + + var millis = Date.UTC(components.Y, components.M, components.D, components.H, components.m, components.s, components.f); + if(components.Z || components.z) { + // adjust for timezone + millis -= (components.Z || components.z) * 60 * 1000; + } + return millis; + } + } + + // Regular expression to match an ISO 8601 formatted timestamp + var iso8601regex = new RegExp('^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$'); + + /** + * Converts an ISO 8601 timestamp to milliseconds since the epoch + * + * @param {string} timestamp - the timestamp to be converted + * @param {string} [picture] - the picture string defining the format of the timestamp (defaults to ISO 8601) + * @returns {Number} - milliseconds since the epoch + */ + function toMillis(timestamp, picture) { + // undefined inputs always return undefined + if(typeof timestamp === 'undefined') { + return undefined; + } + + if(typeof picture === 'undefined') { + if (!iso8601regex.test(timestamp)) { + throw { + stack: (new Error()).stack, + code: "D3110", + value: timestamp + }; + } + + return Date.parse(timestamp); + } else { + return parseDateTime.call(this, timestamp, picture); + } + } + + /** + * Converts milliseconds since the epoch to an ISO 8601 timestamp + * @param {Number} millis - milliseconds since the epoch to be converted + * @param {string} [picture] - the picture string defining the format of the timestamp (defaults to ISO 8601) + * @param {string} [timezone] - the timezone to format the timestamp in (defaults to UTC) + * @returns {String} - the formatted timestamp + */ + function fromMillis(millis, picture, timezone) { + // undefined inputs always return undefined + if(typeof millis === 'undefined') { + return undefined; + } + + return formatDateTime.call(this, millis, picture, timezone); + } + + return { + formatInteger, parseInteger, fromMillis, toMillis + }; +})(); + +module.exports = dateTime; + +},{"./utils":6}],2:[function(require,module,exports){ +(function (global){(function (){ +/** + * © Copyright IBM Corp. 2016, 2018 All Rights Reserved + * Project name: JSONata + * This project is licensed under the MIT License, see LICENSE + */ + +var utils = require('./utils'); + +const functions = (() => { + 'use strict'; + + var isNumeric = utils.isNumeric; + var isArrayOfStrings = utils.isArrayOfStrings; + var isArrayOfNumbers = utils.isArrayOfNumbers; + var createSequence = utils.createSequence; + var isSequence = utils.isSequence; + var isFunction = utils.isFunction; + var isLambda = utils.isLambda; + var isIterable = utils.isIterable; + var getFunctionArity = utils.getFunctionArity; + var deepEquals = utils.isDeepEqual; + var stringToArray = utils.stringToArray; + + /** + * Sum function + * @param {Object} args - Arguments + * @returns {number} Total value of arguments + */ + function sum(args) { + // undefined inputs always return undefined + if (typeof args === 'undefined') { + return undefined; + } + + var total = 0; + args.forEach(function (num) { + total += num; + }); + return total; + } + + /** + * Count function + * @param {Object} args - Arguments + * @returns {number} Number of elements in the array + */ + function count(args) { + // undefined inputs always return undefined + if (typeof args === 'undefined') { + return 0; + } + + return args.length; + } + + /** + * Max function + * @param {Object} args - Arguments + * @returns {number} Max element in the array + */ + function max(args) { + // undefined inputs always return undefined + if (typeof args === 'undefined' || args.length === 0) { + return undefined; + } + + return Math.max.apply(Math, args); + } + + /** + * Min function + * @param {Object} args - Arguments + * @returns {number} Min element in the array + */ + function min(args) { + // undefined inputs always return undefined + if (typeof args === 'undefined' || args.length === 0) { + return undefined; + } + + return Math.min.apply(Math, args); + } + + /** + * Average function + * @param {Object} args - Arguments + * @returns {number} Average element in the array + */ + function average(args) { + // undefined inputs always return undefined + if (typeof args === 'undefined' || args.length === 0) { + return undefined; + } + + var total = 0; + args.forEach(function (num) { + total += num; + }); + return total / args.length; + } + + /** + * Stringify arguments + * @param {Object} arg - Arguments + * @param {boolean} [prettify] - Pretty print the result + * @returns {String} String from arguments + */ + function string(arg, prettify = false) { + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + var str; + + if (typeof arg === 'string') { + // already a string + str = arg; + } else if (isFunction(arg)) { + // functions (built-in and lambda convert to empty string + str = ''; + } else if (typeof arg === 'number' && !isFinite(arg)) { + throw { + code: "D3001", + value: arg, + stack: (new Error()).stack + }; + } else { + var space = prettify ? 2 : 0; + if(Array.isArray(arg) && arg.outerWrapper) { + arg = arg[0]; + } + str = JSON.stringify(arg, function (key, val) { + return (typeof val !== 'undefined' && val !== null && val.toPrecision && isNumeric(val)) ? Number(val.toPrecision(15)) : + (val && isFunction(val)) ? '' : val; + }, space); + } + return str; + } + + /** + * Create substring based on character number and length + * @param {String} str - String to evaluate + * @param {Integer} start - Character number to start substring + * @param {Integer} [length] - Number of characters in substring + * @returns {string|*} Substring + */ + function substring(str, start, length) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + var strArray = stringToArray(str); + var strLength = strArray.length; + + if (strLength + start < 0) { + start = 0; + } + + if (typeof length !== 'undefined') { + if (length <= 0) { + return ''; + } + var end = start >= 0 ? start + length : strLength + start + length; + return strArray.slice(start, end).join(''); + } + + return strArray.slice(start).join(''); + } + + /** + * Create substring up until a character + * @param {String} str - String to evaluate + * @param {String} chars - Character to define substring boundary + * @returns {*} Substring + */ + function substringBefore(str, chars) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + var pos = str.indexOf(chars); + if (pos > -1) { + return str.substr(0, pos); + } else { + return str; + } + } + + /** + * Create substring after a character + * @param {String} str - String to evaluate + * @param {String} chars - Character to define substring boundary + * @returns {*} Substring + */ + function substringAfter(str, chars) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + var pos = str.indexOf(chars); + if (pos > -1) { + return str.substr(pos + chars.length); + } else { + return str; + } + } + + /** + * Lowercase a string + * @param {String} str - String to evaluate + * @returns {string} Lowercase string + */ + function lowercase(str) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + return str.toLowerCase(); + } + + /** + * Uppercase a string + * @param {String} str - String to evaluate + * @returns {string} Uppercase string + */ + function uppercase(str) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + return str.toUpperCase(); + } + + /** + * length of a string + * @param {String} str - string + * @returns {Number} The number of characters in the string + */ + function length(str) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + return stringToArray(str).length; + } + + /** + * Normalize and trim whitespace within a string + * @param {string} str - string to be trimmed + * @returns {string} - trimmed string + */ + function trim(str) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + // normalize whitespace + var result = str.replace(/[ \t\n\r]+/gm, ' '); + if (result.charAt(0) === ' ') { + // strip leading space + result = result.substring(1); + } + if (result.charAt(result.length - 1) === ' ') { + // strip trailing space + result = result.substring(0, result.length - 1); + } + return result; + } + + /** + * Pad a string to a minimum width by adding characters to the start or end + * @param {string} str - string to be padded + * @param {number} width - the minimum width; +ve pads to the right, -ve pads to the left + * @param {string} [char] - the pad character(s); defaults to ' ' + * @returns {string} - padded string + */ + function pad(str, width, char) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + if (typeof char === 'undefined' || char.length === 0) { + char = ' '; + } + + var result; + var padLength = Math.abs(width) - length(str); + if (padLength > 0) { + var padding = (new Array(padLength + 1)).join(char); + if (char.length > 1) { + padding = substring(padding, 0, padLength); + } + if (width > 0) { + result = str + padding; + } else { + result = padding + str; + } + } else { + result = str; + } + return result; + } + + /** + * Evaluate the matcher function against the str arg + * + * @param {*} matcher - matching function (native or lambda) + * @param {string} str - the string to match against + * @returns {object} - structure that represents the match(es) + */ + function* evaluateMatcher(matcher, str) { + var result = matcher.apply(this, [str]); // eslint-disable-line no-useless-call + if(isIterable(result)) { + result = yield * result; + } + if(result && !(typeof result.start === 'number' || result.end === 'number' || Array.isArray(result.groups) || isFunction(result.next))) { + // the matcher function didn't return the correct structure + throw { + code: "T1010", + stack: (new Error()).stack, + }; + } + return result; + } + + /** + * Tests if the str contains the token + * @param {String} str - string to test + * @param {String} token - substring or regex to find + * @returns {Boolean} - true if str contains token + */ + function* contains(str, token) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + var result; + + if (typeof token === 'string') { + result = (str.indexOf(token) !== -1); + } else { + var matches = yield* evaluateMatcher(token, str); + result = (typeof matches !== 'undefined'); + } + + return result; + } + + /** + * Match a string with a regex returning an array of object containing details of each match + * @param {String} str - string + * @param {String} regex - the regex applied to the string + * @param {Integer} [limit] - max number of matches to return + * @returns {Array} The array of match objects + */ + function* match(str, regex, limit) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + // limit, if specified, must be a non-negative number + if (limit < 0) { + throw { + stack: (new Error()).stack, + value: limit, + code: 'D3040', + index: 3 + }; + } + + var result = createSequence(); + + if (typeof limit === 'undefined' || limit > 0) { + var count = 0; + var matches = yield* evaluateMatcher(regex, str); + if (typeof matches !== 'undefined') { + while (typeof matches !== 'undefined' && (typeof limit === 'undefined' || count < limit)) { + result.push({ + match: matches.match, + index: matches.start, + groups: matches.groups + }); + matches = yield* evaluateMatcher(matches.next); + count++; + } + } + } + + return result; + } + + /** + * Match a string with a regex returning an array of object containing details of each match + * @param {String} str - string + * @param {String} pattern - the substring/regex applied to the string + * @param {String} replacement - text to replace the matched substrings + * @param {Integer} [limit] - max number of matches to return + * @returns {Array} The array of match objects + */ + function* replace(str, pattern, replacement, limit) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + var self = this; + + // pattern cannot be an empty string + if (pattern === '') { + throw { + code: "D3010", + stack: (new Error()).stack, + value: pattern, + index: 2 + }; + } + + // limit, if specified, must be a non-negative number + if (limit < 0) { + throw { + code: "D3011", + stack: (new Error()).stack, + value: limit, + index: 4 + }; + } + + var replacer; + if (typeof replacement === 'string') { + replacer = function (regexMatch) { + var substitute = ''; + // scan forward, copying the replacement text into the substitute string + // and replace any occurrence of $n with the values matched by the regex + var position = 0; + var index = replacement.indexOf('$', position); + while (index !== -1 && position < replacement.length) { + substitute += replacement.substring(position, index); + position = index + 1; + var dollarVal = replacement.charAt(position); + if (dollarVal === '$') { + // literal $ + substitute += '$'; + position++; + } else if (dollarVal === '0') { + substitute += regexMatch.match; + position++; + } else { + var maxDigits; + if (regexMatch.groups.length === 0) { + // no sub-matches; any $ followed by a digit will be replaced by an empty string + maxDigits = 1; + } else { + // max number of digits to parse following the $ + maxDigits = Math.floor(Math.log(regexMatch.groups.length) * Math.LOG10E) + 1; + } + index = parseInt(replacement.substring(position, position + maxDigits), 10); + if (maxDigits > 1 && index > regexMatch.groups.length) { + index = parseInt(replacement.substring(position, position + maxDigits - 1), 10); + } + if (!isNaN(index)) { + if (regexMatch.groups.length > 0) { + var submatch = regexMatch.groups[index - 1]; + if (typeof submatch !== 'undefined') { + substitute += submatch; + } + } + position += index.toString().length; + } else { + // not a capture group, treat the $ as literal + substitute += '$'; + } + } + index = replacement.indexOf('$', position); + } + substitute += replacement.substring(position); + return substitute; + }; + } else { + replacer = replacement; + } + + var result = ''; + var position = 0; + + if (typeof limit === 'undefined' || limit > 0) { + var count = 0; + if (typeof pattern === 'string') { + var index = str.indexOf(pattern, position); + while (index !== -1 && (typeof limit === 'undefined' || count < limit)) { + result += str.substring(position, index); + result += replacement; + position = index + pattern.length; + count++; + index = str.indexOf(pattern, position); + } + result += str.substring(position); + } else { + var matches = yield* evaluateMatcher(pattern, str); + if (typeof matches !== 'undefined') { + while (typeof matches !== 'undefined' && (typeof limit === 'undefined' || count < limit)) { + result += str.substring(position, matches.start); + var replacedWith = replacer.apply(self, [matches]); + if (isIterable(replacedWith)) { + replacedWith = yield* replacedWith; + } + // check replacedWith is a string + if (typeof replacedWith === 'string') { + result += replacedWith; + } else { + // not a string - throw error + throw { + code: "D3012", + stack: (new Error()).stack, + value: replacedWith + }; + } + position = matches.start + matches.match.length; + count++; + matches = yield* evaluateMatcher(matches.next); + } + result += str.substring(position); + } else { + result = str; + } + } + } else { + result = str; + } + + return result; + } + + /** + * Base64 encode a string + * @param {String} str - string + * @returns {String} Base 64 encoding of the binary data + */ + function base64encode(str) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + // Use btoa in a browser, or Buffer in Node.js + + var btoa = typeof window !== 'undefined' ? + /* istanbul ignore next */ window.btoa : + function (str) { + // Simply doing `new Buffer` at this point causes Browserify to pull + // in the entire Buffer browser library, which is large and unnecessary. + // Using `global.Buffer` defeats this. + return new global.Buffer.from(str, 'binary').toString('base64'); // eslint-disable-line new-cap + }; + return btoa(str); + } + + /** + * Base64 decode a string + * @param {String} str - string + * @returns {String} Base 64 encoding of the binary data + */ + function base64decode(str) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + // Use btoa in a browser, or Buffer in Node.js + var atob = typeof window !== 'undefined' ? + /* istanbul ignore next */ window.atob : + function (str) { + // Simply doing `new Buffer` at this point causes Browserify to pull + // in the entire Buffer browser library, which is large and unnecessary. + // Using `global.Buffer` defeats this. + return new global.Buffer(str, 'base64').toString('binary'); + }; + return atob(str); + } + + /** + * Encode a string into a component for a url + * @param {String} str - String to encode + * @returns {string} Encoded string + */ + function encodeUrlComponent(str) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + // Catch URIErrors when URI sequence is malformed + var returnVal; + try { + returnVal = encodeURIComponent(str); + } catch (e) { + throw { + code: "D3140", + stack: (new Error()).stack, + value: str, + functionName: "encodeUrlComponent" + }; + } + return returnVal; + } + + /** + * Encode a string into a url + * @param {String} str - String to encode + * @returns {string} Encoded string + */ + function encodeUrl(str) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + // Catch URIErrors when URI sequence is malformed + var returnVal; + try { + returnVal = encodeURI(str); + } catch (e) { + throw { + code: "D3140", + stack: (new Error()).stack, + value: str, + functionName: "encodeUrl" + }; + } + return returnVal; + } + + /** + * Decode a string from a component for a url + * @param {String} str - String to decode + * @returns {string} Decoded string + */ + function decodeUrlComponent(str) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + // Catch URIErrors when URI sequence is malformed + var returnVal; + try { + returnVal = decodeURIComponent(str); + } catch (e) { + throw { + code: "D3140", + stack: (new Error()).stack, + value: str, + functionName: "decodeUrlComponent" + }; + } + return returnVal; + } + + /** + * Decode a string from a url + * @param {String} str - String to decode + * @returns {string} Decoded string + */ + function decodeUrl(str) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + // Catch URIErrors when URI sequence is malformed + var returnVal; + try { + returnVal = decodeURI(str); + } catch (e) { + throw { + code: "D3140", + stack: (new Error()).stack, + value: str, + functionName: "decodeUrl" + }; + } + return returnVal; + } + + /** + * Split a string into an array of substrings + * @param {String} str - string + * @param {String} separator - the token or regex that splits the string + * @param {Integer} [limit] - max number of substrings + * @returns {Array} The array of string + */ + function* split(str, separator, limit) { + // undefined inputs always return undefined + if (typeof str === 'undefined') { + return undefined; + } + + // limit, if specified, must be a non-negative number + if (limit < 0) { + throw { + code: "D3020", + stack: (new Error()).stack, + value: limit, + index: 3 + }; + } + + var result = []; + + if (typeof limit === 'undefined' || limit > 0) { + if (typeof separator === 'string') { + result = str.split(separator, limit); + } else { + var count = 0; + var matches = yield* evaluateMatcher(separator, str); + if (typeof matches !== 'undefined') { + var start = 0; + while (typeof matches !== 'undefined' && (typeof limit === 'undefined' || count < limit)) { + result.push(str.substring(start, matches.start)); + start = matches.end; + matches = yield* evaluateMatcher(matches.next); + count++; + } + if (typeof limit === 'undefined' || count < limit) { + result.push(str.substring(start)); + } + } else { + result.push(str); + } + } + } + + return result; + } + + /** + * Join an array of strings + * @param {Array} strs - array of string + * @param {String} [separator] - the token that splits the string + * @returns {String} The concatenated string + */ + function join(strs, separator) { + // undefined inputs always return undefined + if (typeof strs === 'undefined') { + return undefined; + } + + // if separator is not specified, default to empty string + if (typeof separator === 'undefined') { + separator = ""; + } + + return strs.join(separator); + } + + /** + * Formats a number into a decimal string representation using XPath 3.1 F&O fn:format-number spec + * @param {number} value - number to format + * @param {String} picture - picture string definition + * @param {Object} [options] - override locale defaults + * @returns {String} The formatted string + */ + function formatNumber(value, picture, options) { + // undefined inputs always return undefined + if (typeof value === 'undefined') { + return undefined; + } + + var defaults = { + "decimal-separator": ".", + "grouping-separator": ",", + "exponent-separator": "e", + "infinity": "Infinity", + "minus-sign": "-", + "NaN": "NaN", + "percent": "%", + "per-mille": "\u2030", + "zero-digit": "0", + "digit": "#", + "pattern-separator": ";" + }; + + // if `options` is specified, then its entries override defaults + var properties = defaults; + if (typeof options !== 'undefined') { + Object.keys(options).forEach(function (key) { + properties[key] = options[key]; + }); + } + + var decimalDigitFamily = []; + var zeroCharCode = properties['zero-digit'].charCodeAt(0); + for (var ii = zeroCharCode; ii < zeroCharCode + 10; ii++) { + decimalDigitFamily.push(String.fromCharCode(ii)); + } + + var activeChars = decimalDigitFamily.concat([properties['decimal-separator'], properties['exponent-separator'], properties['grouping-separator'], properties.digit, properties['pattern-separator']]); + + var subPictures = picture.split(properties['pattern-separator']); + + if (subPictures.length > 2) { + throw { + code: 'D3080', + stack: (new Error()).stack + }; + } + + var splitParts = function (subpicture) { + var prefix = (function () { + var ch; + for (var ii = 0; ii < subpicture.length; ii++) { + ch = subpicture.charAt(ii); + if (activeChars.indexOf(ch) !== -1 && ch !== properties['exponent-separator']) { + return subpicture.substring(0, ii); + } + } + })(); + var suffix = (function () { + var ch; + for (var ii = subpicture.length - 1; ii >= 0; ii--) { + ch = subpicture.charAt(ii); + if (activeChars.indexOf(ch) !== -1 && ch !== properties['exponent-separator']) { + return subpicture.substring(ii + 1); + } + } + })(); + var activePart = subpicture.substring(prefix.length, subpicture.length - suffix.length); + var mantissaPart, exponentPart, integerPart, fractionalPart; + var exponentPosition = subpicture.indexOf(properties['exponent-separator'], prefix.length); + if (exponentPosition === -1 || exponentPosition > subpicture.length - suffix.length) { + mantissaPart = activePart; + exponentPart = undefined; + } else { + mantissaPart = activePart.substring(0, exponentPosition); + exponentPart = activePart.substring(exponentPosition + 1); + } + var decimalPosition = mantissaPart.indexOf(properties['decimal-separator']); + if (decimalPosition === -1) { + integerPart = mantissaPart; + fractionalPart = suffix; + } else { + integerPart = mantissaPart.substring(0, decimalPosition); + fractionalPart = mantissaPart.substring(decimalPosition + 1); + } + return { + prefix: prefix, + suffix: suffix, + activePart: activePart, + mantissaPart: mantissaPart, + exponentPart: exponentPart, + integerPart: integerPart, + fractionalPart: fractionalPart, + subpicture: subpicture + }; + }; + + // validate the picture string, F&O 4.7.3 + var validate = function (parts) { + var error; + var ii; + var subpicture = parts.subpicture; + var decimalPos = subpicture.indexOf(properties['decimal-separator']); + if (decimalPos !== subpicture.lastIndexOf(properties['decimal-separator'])) { + error = 'D3081'; + } + if (subpicture.indexOf(properties.percent) !== subpicture.lastIndexOf(properties.percent)) { + error = 'D3082'; + } + if (subpicture.indexOf(properties['per-mille']) !== subpicture.lastIndexOf(properties['per-mille'])) { + error = 'D3083'; + } + if (subpicture.indexOf(properties.percent) !== -1 && subpicture.indexOf(properties['per-mille']) !== -1) { + error = 'D3084'; + } + var valid = false; + for (ii = 0; ii < parts.mantissaPart.length; ii++) { + var ch = parts.mantissaPart.charAt(ii); + if (decimalDigitFamily.indexOf(ch) !== -1 || ch === properties.digit) { + valid = true; + break; + } + } + if (!valid) { + error = 'D3085'; + } + var charTypes = parts.activePart.split('').map(function (char) { + return activeChars.indexOf(char) === -1 ? 'p' : 'a'; + }).join(''); + if (charTypes.indexOf('p') !== -1) { + error = 'D3086'; + } + if (decimalPos !== -1) { + if (subpicture.charAt(decimalPos - 1) === properties['grouping-separator'] || subpicture.charAt(decimalPos + 1) === properties['grouping-separator']) { + error = 'D3087'; + } + } else if (parts.integerPart.charAt(parts.integerPart.length - 1) === properties['grouping-separator']) { + error = 'D3088'; + } + if (subpicture.indexOf(properties['grouping-separator'] + properties['grouping-separator']) !== -1) { + error = 'D3089'; + } + var optionalDigitPos = parts.integerPart.indexOf(properties.digit); + if (optionalDigitPos !== -1 && parts.integerPart.substring(0, optionalDigitPos).split('').filter(function (char) { + return decimalDigitFamily.indexOf(char) > -1; + }).length > 0) { + error = 'D3090'; + } + optionalDigitPos = parts.fractionalPart.lastIndexOf(properties.digit); + if (optionalDigitPos !== -1 && parts.fractionalPart.substring(optionalDigitPos).split('').filter(function (char) { + return decimalDigitFamily.indexOf(char) > -1; + }).length > 0) { + error = 'D3091'; + } + var exponentExists = (typeof parts.exponentPart === 'string'); + if (exponentExists && parts.exponentPart.length > 0 && (subpicture.indexOf(properties.percent) !== -1 || subpicture.indexOf(properties['per-mille']) !== -1)) { + error = 'D3092'; + } + if (exponentExists && (parts.exponentPart.length === 0 || parts.exponentPart.split('').filter(function (char) { + return decimalDigitFamily.indexOf(char) === -1; + }).length > 0)) { + error = 'D3093'; + } + if (error) { + throw { + code: error, + stack: (new Error()).stack + }; + } + }; + + // analyse the picture string, F&O 4.7.4 + var analyse = function (parts) { + var getGroupingPositions = function (part, toLeft) { + var positions = []; + var groupingPosition = part.indexOf(properties['grouping-separator']); + while (groupingPosition !== -1) { + var charsToTheRight = (toLeft ? part.substring(0, groupingPosition) : part.substring(groupingPosition)).split('').filter(function (char) { + return decimalDigitFamily.indexOf(char) !== -1 || char === properties.digit; + }).length; + positions.push(charsToTheRight); + groupingPosition = parts.integerPart.indexOf(properties['grouping-separator'], groupingPosition + 1); + } + return positions; + }; + var integerPartGroupingPositions = getGroupingPositions(parts.integerPart); + var regular = function (indexes) { + // are the grouping positions regular? i.e. same interval between each of them + if (indexes.length === 0) { + return 0; + } + var gcd = function (a, b) { + return b === 0 ? a : gcd(b, a % b); + }; + // find the greatest common divisor of all the positions + var factor = indexes.reduce(gcd); + // is every position separated by this divisor? If so, it's regular + for (var index = 1; index <= indexes.length; index++) { + if (indexes.indexOf(index * factor) === -1) { + return 0; + } + } + return factor; + }; + + var regularGrouping = regular(integerPartGroupingPositions); + var fractionalPartGroupingPositions = getGroupingPositions(parts.fractionalPart, true); + + var minimumIntegerPartSize = parts.integerPart.split('').filter(function (char) { + return decimalDigitFamily.indexOf(char) !== -1; + }).length; + var scalingFactor = minimumIntegerPartSize; + + var fractionalPartArray = parts.fractionalPart.split(''); + var minimumFactionalPartSize = fractionalPartArray.filter(function (char) { + return decimalDigitFamily.indexOf(char) !== -1; + }).length; + var maximumFactionalPartSize = fractionalPartArray.filter(function (char) { + return decimalDigitFamily.indexOf(char) !== -1 || char === properties.digit; + }).length; + var exponentPresent = typeof parts.exponentPart === 'string'; + if (minimumIntegerPartSize === 0 && maximumFactionalPartSize === 0) { + if (exponentPresent) { + minimumFactionalPartSize = 1; + maximumFactionalPartSize = 1; + } else { + minimumIntegerPartSize = 1; + } + } + if (exponentPresent && minimumIntegerPartSize === 0 && parts.integerPart.indexOf(properties.digit) !== -1) { + minimumIntegerPartSize = 1; + } + if (minimumIntegerPartSize === 0 && minimumFactionalPartSize === 0) { + minimumFactionalPartSize = 1; + } + var minimumExponentSize = 0; + if (exponentPresent) { + minimumExponentSize = parts.exponentPart.split('').filter(function (char) { + return decimalDigitFamily.indexOf(char) !== -1; + }).length; + } + + return { + integerPartGroupingPositions: integerPartGroupingPositions, + regularGrouping: regularGrouping, + minimumIntegerPartSize: minimumIntegerPartSize, + scalingFactor: scalingFactor, + prefix: parts.prefix, + fractionalPartGroupingPositions: fractionalPartGroupingPositions, + minimumFactionalPartSize: minimumFactionalPartSize, + maximumFactionalPartSize: maximumFactionalPartSize, + minimumExponentSize: minimumExponentSize, + suffix: parts.suffix, + picture: parts.subpicture + }; + }; + + var parts = subPictures.map(splitParts); + parts.forEach(validate); + + var variables = parts.map(analyse); + + var minus_sign = properties['minus-sign']; + var zero_digit = properties['zero-digit']; + var decimal_separator = properties['decimal-separator']; + var grouping_separator = properties['grouping-separator']; + + if (variables.length === 1) { + variables.push(JSON.parse(JSON.stringify(variables[0]))); + variables[1].prefix = minus_sign + variables[1].prefix; + } + + // TODO cache the result of the analysis + + // format the number + // bullet 1: TODO: NaN - not sure we'd ever get this in JSON + var pic; + // bullet 2: + if (value >= 0) { + pic = variables[0]; + } else { + pic = variables[1]; + } + var adjustedNumber; + // bullet 3: + if (pic.picture.indexOf(properties.percent) !== -1) { + adjustedNumber = value * 100; + } else if (pic.picture.indexOf(properties['per-mille']) !== -1) { + adjustedNumber = value * 1000; + } else { + adjustedNumber = value; + } + // bullet 4: + // TODO: infinity - not sure we'd ever get this in JSON + // bullet 5: + var mantissa, exponent; + if (pic.minimumExponentSize === 0) { + mantissa = adjustedNumber; + } else { + // mantissa * 10^exponent = adjustedNumber + var maxMantissa = Math.pow(10, pic.scalingFactor); + var minMantissa = Math.pow(10, pic.scalingFactor - 1); + mantissa = adjustedNumber; + exponent = 0; + while (mantissa < minMantissa) { + mantissa *= 10; + exponent -= 1; + } + while (mantissa > maxMantissa) { + mantissa /= 10; + exponent += 1; + } + } + // bullet 6: + var roundedNumber = round(mantissa, pic.maximumFactionalPartSize); + // bullet 7: + var makeString = function (value, dp) { + var str = Math.abs(value).toFixed(dp); + if (zero_digit !== '0') { + str = str.split('').map(function (digit) { + if (digit >= '0' && digit <= '9') { + return decimalDigitFamily[digit.charCodeAt(0) - 48]; + } else { + return digit; + } + }).join(''); + } + return str; + }; + var stringValue = makeString(roundedNumber, pic.maximumFactionalPartSize); + var decimalPos = stringValue.indexOf('.'); + if (decimalPos === -1) { + stringValue = stringValue + decimal_separator; + } else { + stringValue = stringValue.replace('.', decimal_separator); + } + while (stringValue.charAt(0) === zero_digit) { + stringValue = stringValue.substring(1); + } + while (stringValue.charAt(stringValue.length - 1) === zero_digit) { + stringValue = stringValue.substring(0, stringValue.length - 1); + } + // bullets 8 & 9: + decimalPos = stringValue.indexOf(decimal_separator); + var padLeft = pic.minimumIntegerPartSize - decimalPos; + var padRight = pic.minimumFactionalPartSize - (stringValue.length - decimalPos - 1); + stringValue = (padLeft > 0 ? new Array(padLeft + 1).join(zero_digit) : '') + stringValue; + stringValue = stringValue + (padRight > 0 ? new Array(padRight + 1).join(zero_digit) : ''); + decimalPos = stringValue.indexOf(decimal_separator); + // bullet 10: + if (pic.regularGrouping > 0) { + var groupCount = Math.floor((decimalPos - 1) / pic.regularGrouping); + for (var group = 1; group <= groupCount; group++) { + stringValue = [stringValue.slice(0, decimalPos - group * pic.regularGrouping), grouping_separator, stringValue.slice(decimalPos - group * pic.regularGrouping)].join(''); + } + } else { + pic.integerPartGroupingPositions.forEach(function (pos) { + stringValue = [stringValue.slice(0, decimalPos - pos), grouping_separator, stringValue.slice(decimalPos - pos)].join(''); + decimalPos++; + }); + } + // bullet 11: + decimalPos = stringValue.indexOf(decimal_separator); + pic.fractionalPartGroupingPositions.forEach(function (pos) { + stringValue = [stringValue.slice(0, pos + decimalPos + 1), grouping_separator, stringValue.slice(pos + decimalPos + 1)].join(''); + }); + // bullet 12: + decimalPos = stringValue.indexOf(decimal_separator); + if (pic.picture.indexOf(decimal_separator) === -1 || decimalPos === stringValue.length - 1) { + stringValue = stringValue.substring(0, stringValue.length - 1); + } + // bullet 13: + if (typeof exponent !== 'undefined') { + var stringExponent = makeString(exponent, 0); + padLeft = pic.minimumExponentSize - stringExponent.length; + if (padLeft > 0) { + stringExponent = new Array(padLeft + 1).join(zero_digit) + stringExponent; + } + stringValue = stringValue + properties['exponent-separator'] + (exponent < 0 ? minus_sign : '') + stringExponent; + } + // bullet 14: + stringValue = pic.prefix + stringValue + pic.suffix; + return stringValue; + } + + /** + * Converts a number to a string using a specified number base + * @param {number} value - the number to convert + * @param {number} [radix] - the number base; must be between 2 and 36. Defaults to 10 + * @returns {string} - the converted string + */ + function formatBase(value, radix) { + // undefined inputs always return undefined + if (typeof value === 'undefined') { + return undefined; + } + + value = round(value); + + if (typeof radix === 'undefined') { + radix = 10; + } else { + radix = round(radix); + } + + if (radix < 2 || radix > 36) { + throw { + code: 'D3100', + stack: (new Error()).stack, + value: radix + }; + + } + + var result = value.toString(radix); + + return result; + } + + /** + * Cast argument to number + * @param {Object} arg - Argument + * @returns {Number} numeric value of argument + */ + function number(arg) { + var result; + + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + if (typeof arg === 'number') { + // already a number + result = arg; + } else if (typeof arg === 'string' && /^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(arg) && !isNaN(parseFloat(arg)) && isFinite(arg)) { + result = parseFloat(arg); + } else if (arg === true) { + // boolean true casts to 1 + result = 1; + } else if (arg === false) { + // boolean false casts to 0 + result = 0; + } else { + throw { + code: "D3030", + value: arg, + stack: (new Error()).stack, + index: 1 + }; + } + return result; + } + + /** + * Absolute value of a number + * @param {Number} arg - Argument + * @returns {Number} absolute value of argument + */ + function abs(arg) { + var result; + + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + result = Math.abs(arg); + return result; + } + + /** + * Rounds a number down to integer + * @param {Number} arg - Argument + * @returns {Number} rounded integer + */ + function floor(arg) { + var result; + + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + result = Math.floor(arg); + return result; + } + + /** + * Rounds a number up to integer + * @param {Number} arg - Argument + * @returns {Number} rounded integer + */ + function ceil(arg) { + var result; + + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + result = Math.ceil(arg); + return result; + } + + /** + * Round to half even + * @param {Number} arg - Argument + * @param {Number} [precision] - number of decimal places + * @returns {Number} rounded integer + */ + function round(arg, precision) { + var result; + + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + if (precision) { + // shift the decimal place - this needs to be done in a string since multiplying + // by a power of ten can introduce floating point precision errors which mess up + // this rounding algorithm - See 'Decimal rounding' in + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round + // Shift + var value = arg.toString().split('e'); + arg = +(value[0] + 'e' + (value[1] ? (+value[1] + precision) : precision)); + + } + + // round up to nearest int + result = Math.round(arg); + var diff = result - arg; + if (Math.abs(diff) === 0.5 && Math.abs(result % 2) === 1) { + // rounded the wrong way - adjust to nearest even number + result = result - 1; + } + if (precision) { + // Shift back + value = result.toString().split('e'); + /* istanbul ignore next */ + result = +(value[0] + 'e' + (value[1] ? (+value[1] - precision) : -precision)); + } + if (Object.is(result, -0)) { // ESLint rule 'no-compare-neg-zero' suggests this way + // JSON doesn't do -0 + result = 0; + } + return result; + } + + /** + * Square root of number + * @param {Number} arg - Argument + * @returns {Number} square root + */ + function sqrt(arg) { + var result; + + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + if (arg < 0) { + throw { + stack: (new Error()).stack, + code: "D3060", + index: 1, + value: arg + }; + } + + result = Math.sqrt(arg); + + return result; + } + + /** + * Raises number to the power of the second number + * @param {Number} arg - the base + * @param {Number} exp - the exponent + * @returns {Number} rounded integer + */ + function power(arg, exp) { + var result; + + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + result = Math.pow(arg, exp); + + if (!isFinite(result)) { + throw { + stack: (new Error()).stack, + code: "D3061", + index: 1, + value: arg, + exp: exp + }; + } + + return result; + } + + /** + * Returns a random number 0 <= n < 1 + * @returns {number} random number + */ + function random() { + return Math.random(); + } + + /** + * Evaluate an input and return a boolean + * @param {*} arg - Arguments + * @returns {boolean} Boolean + */ + function boolean(arg) { + // cast arg to its effective boolean value + // boolean: unchanged + // string: zero-length -> false; otherwise -> true + // number: 0 -> false; otherwise -> true + // null -> false + // array: empty -> false; length > 1 -> true + // object: empty -> false; non-empty -> true + // function -> false + + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + var result = false; + if (Array.isArray(arg)) { + if (arg.length === 1) { + result = boolean(arg[0]); + } else if (arg.length > 1) { + var trues = arg.filter(function (val) { + return boolean(val); + }); + result = trues.length > 0; + } + } else if (typeof arg === 'string') { + if (arg.length > 0) { + result = true; + } + } else if (isNumeric(arg)) { + if (arg !== 0) { + result = true; + } + } else if (arg !== null && typeof arg === 'object') { + if (Object.keys(arg).length > 0) { + result = true; + } + } else if (typeof arg === 'boolean' && arg === true) { + result = true; + } + return result; + } + + /** + * returns the Boolean NOT of the arg + * @param {*} arg - argument + * @returns {boolean} - NOT arg + */ + function not(arg) { + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + return !boolean(arg); + } + + /** + * Helper function to build the arguments to be supplied to the function arg of the + * HOFs map, filter, each, sift and single + * @param {function} func - the function to be invoked + * @param {*} arg1 - the first (required) arg - the value + * @param {*} arg2 - the second (optional) arg - the position (index or key) + * @param {*} arg3 - the third (optional) arg - the whole structure (array or object) + * @returns {*[]} the argument list + */ + function hofFuncArgs(func, arg1, arg2, arg3) { + var func_args = [arg1]; // the first arg (the value) is required + // the other two are optional - only supply it if the function can take it + var length = getFunctionArity(func); + if (length >= 2) { + func_args.push(arg2); + } + if (length >= 3) { + func_args.push(arg3); + } + return func_args; + } + + /** + * Create a map from an array of arguments + * @param {Array} [arr] - array to map over + * @param {Function} func - function to apply + * @returns {Array} Map array + */ + function* map(arr, func) { + // undefined inputs always return undefined + if (typeof arr === 'undefined') { + return undefined; + } + + var result = createSequence(); + // do the map - iterate over the arrays, and invoke func + for (var i = 0; i < arr.length; i++) { + var func_args = hofFuncArgs(func, arr[i], i, arr); + // invoke func + var res = yield* func.apply(this, func_args); + if (typeof res !== 'undefined') { + result.push(res); + } + } + + return result; + } + + /** + * Create a map from an array of arguments + * @param {Array} [arr] - array to filter + * @param {Function} func - predicate function + * @returns {Array} Map array + */ + function* filter(arr, func) { // eslint-disable-line require-yield + // undefined inputs always return undefined + if (typeof arr === 'undefined') { + return undefined; + } + + var result = createSequence(); + + for (var i = 0; i < arr.length; i++) { + var entry = arr[i]; + var func_args = hofFuncArgs(func, entry, i, arr); + // invoke func + var res = yield* func.apply(this, func_args); + if (boolean(res)) { + result.push(entry); + } + } + + return result; + } + + /** + * Given an array, find the single element matching a specified condition + * Throws an exception if the number of matching elements is not exactly one + * @param {Array} [arr] - array to filter + * @param {Function} [func] - predicate function + * @returns {*} Matching element + */ + function* single(arr, func) { // eslint-disable-line require-yield + // undefined inputs always return undefined + if (typeof arr === 'undefined') { + return undefined; + } + + var hasFoundMatch = false; + var result; + + for (var i = 0; i < arr.length; i++) { + var entry = arr[i]; + var positiveResult = true; + if (typeof func !== 'undefined') { + var func_args = hofFuncArgs(func, entry, i, arr); + // invoke func + var res = yield* func.apply(this, func_args); + positiveResult = boolean(res); + } + if (positiveResult) { + if(!hasFoundMatch) { + result = entry; + hasFoundMatch = true; + } else { + throw { + stack: (new Error()).stack, + code: "D3138", + index: i + }; + } + } + } + + if(!hasFoundMatch) { + throw { + stack: (new Error()).stack, + code: "D3139" + }; + } + + return result; + } + + /** + * Convolves (zips) each value from a set of arrays + * @param {Array} [args] - arrays to zip + * @returns {Array} Zipped array + */ + function zip() { + // this can take a variable number of arguments + var result = []; + var args = Array.prototype.slice.call(arguments); + // length of the shortest array + var length = Math.min.apply(Math, args.map(function (arg) { + if (Array.isArray(arg)) { + return arg.length; + } + return 0; + })); + for (var i = 0; i < length; i++) { + var tuple = args.map((arg) => { + return arg[i]; + }); + result.push(tuple); + } + return result; + } + + /** + * Fold left function + * @param {Array} sequence - Sequence + * @param {Function} func - Function + * @param {Object} init - Initial value + * @returns {*} Result + */ + function* foldLeft(sequence, func, init) { + // undefined inputs always return undefined + if (typeof sequence === 'undefined') { + return undefined; + } + + var result; + + var arity = getFunctionArity(func); + if (arity < 2) { + throw { + stack: (new Error()).stack, + code: "D3050", + index: 1 + }; + } + + var index; + if (typeof init === 'undefined' && sequence.length > 0) { + result = sequence[0]; + index = 1; + } else { + result = init; + index = 0; + } + + while (index < sequence.length) { + var args = [result, sequence[index]]; + if (arity >= 3) { + args.push(index); + } + if (arity >= 4) { + args.push(sequence); + } + result = yield* func.apply(this, args); + index++; + } + + return result; + } + + /** + * Return keys for an object + * @param {Object} arg - Object + * @returns {Array} Array of keys + */ + function keys(arg) { + var result = createSequence(); + + if (Array.isArray(arg)) { + // merge the keys of all of the items in the array + var merge = {}; + arg.forEach(function (item) { + var allkeys = keys(item); + allkeys.forEach(function (key) { + merge[key] = true; + }); + }); + result = keys(merge); + } else if (arg !== null && typeof arg === 'object' && !(isLambda(arg))) { + Object.keys(arg).forEach(key => result.push(key)); + } + return result; + } + + /** + * Return value from an object for a given key + * @param {Object} input - Object/Array + * @param {String} key - Key in object + * @returns {*} Value of key in object + */ + function lookup(input, key) { + // lookup the 'name' item in the input + var result; + if (Array.isArray(input)) { + result = createSequence(); + for(var ii = 0; ii < input.length; ii++) { + var res = lookup(input[ii], key); + if (typeof res !== 'undefined') { + if (Array.isArray(res)) { + res.forEach(val => result.push(val)); + } else { + result.push(res); + } + } + } + } else if (input !== null && typeof input === 'object') { + result = input[key]; + } + return result; + } + + /** + * Append second argument to first + * @param {Array|Object} arg1 - First argument + * @param {Array|Object} arg2 - Second argument + * @returns {*} Appended arguments + */ + function append(arg1, arg2) { + // disregard undefined args + if (typeof arg1 === 'undefined') { + return arg2; + } + if (typeof arg2 === 'undefined') { + return arg1; + } + // if either argument is not an array, make it so + if (!Array.isArray(arg1)) { + arg1 = createSequence(arg1); + } + if (!Array.isArray(arg2)) { + arg2 = [arg2]; + } + return arg1.concat(arg2); + } + + /** + * Determines if the argument is undefined + * @param {*} arg - argument + * @returns {boolean} False if argument undefined, otherwise true + */ + function exists(arg) { + if (typeof arg === 'undefined') { + return false; + } else { + return true; + } + } + + /** + * Splits an object into an array of object with one property each + * @param {*} arg - the object to split + * @returns {*} - the array + */ + function spread(arg) { + var result = createSequence(); + + if (Array.isArray(arg)) { + // spread all of the items in the array + arg.forEach(function (item) { + result = append(result, spread(item)); + }); + } else if (arg !== null && typeof arg === 'object' && !isLambda(arg)) { + for (var key in arg) { + var obj = {}; + obj[key] = arg[key]; + result.push(obj); + } + } else { + result = arg; + } + return result; + } + + /** + * Merges an array of objects into a single object. Duplicate properties are + * overridden by entries later in the array + * @param {*} arg - the objects to merge + * @returns {*} - the object + */ + function merge(arg) { + // undefined inputs always return undefined + if (typeof arg === 'undefined') { + return undefined; + } + + var result = {}; + + arg.forEach(function (obj) { + for (var prop in obj) { + result[prop] = obj[prop]; + } + }); + return result; + } + + /** + * Reverses the order of items in an array + * @param {Array} arr - the array to reverse + * @returns {Array} - the reversed array + */ + function reverse(arr) { + // undefined inputs always return undefined + if (typeof arr === 'undefined') { + return undefined; + } + + if (arr.length <= 1) { + return arr; + } + + var length = arr.length; + var result = new Array(length); + for (var i = 0; i < length; i++) { + result[length - i - 1] = arr[i]; + } + + return result; + } + + /** + * + * @param {*} obj - the input object to iterate over + * @param {*} func - the function to apply to each key/value pair + * @returns {Array} - the resultant array + */ + function* each(obj, func) { + var result = createSequence(); + + for (var key in obj) { + var func_args = hofFuncArgs(func, obj[key], key, obj); + // invoke func + var val = yield* func.apply(this, func_args); + if(typeof val !== 'undefined') { + result.push(val); + } + } + + return result; + } + + /** + * + * @param {string} [message] - the message to attach to the error + * @throws custom error with code 'D3137' + */ + function error(message) { + throw { + code: "D3137", + stack: (new Error()).stack, + message: message || "$error() function evaluated" + }; + } + + /** + * + * @param {boolean} condition - the condition to evaluate + * @param {string} [message] - the message to attach to the error + * @throws custom error with code 'D3137' + * @returns {undefined} + */ + function assert(condition, message) { + if(!condition) { + throw { + code: "D3141", + stack: (new Error()).stack, + message: message || "$assert() statement failed" + }; + } + + return undefined; + } + + /** + * + * @param {*} [value] - the input to which the type will be checked + * @returns {string} - the type of the input + */ + function type(value) { + if (value === undefined) { + return undefined; + } + + if (value === null) { + return 'null'; + } + + if (isNumeric(value)) { + return 'number'; + } + + if (typeof value === 'string') { + return 'string'; + } + + if (typeof value === 'boolean') { + return 'boolean'; + } + + if(Array.isArray(value)) { + return 'array'; + } + + if(isFunction(value)) { + return 'function'; + } + + return 'object'; + } + + /** + * Implements the merge sort (stable) with optional comparator function + * + * @param {Array} arr - the array to sort + * @param {*} comparator - comparator function + * @returns {Array} - sorted array + */ + function* sort(arr, comparator) { + // undefined inputs always return undefined + if (typeof arr === 'undefined') { + return undefined; + } + + if (arr.length <= 1) { + return arr; + } + + var comp; + if (typeof comparator === 'undefined') { + // inject a default comparator - only works for numeric or string arrays + if (!isArrayOfNumbers(arr) && !isArrayOfStrings(arr)) { + throw { + stack: (new Error()).stack, + code: "D3070", + index: 1 + }; + } + + comp = function* (a, b) { // eslint-disable-line require-yield + return a > b; + }; + } else { + // for internal usage of functionSort (i.e. order-by syntax) + comp = comparator; + } + + var merge = function* (l, r) { + var merge_iter = function* (result, left, right) { + if (left.length === 0) { + Array.prototype.push.apply(result, right); + } else if (right.length === 0) { + Array.prototype.push.apply(result, left); + } else if (yield* comp(left[0], right[0])) { // invoke the comparator function + // if it returns true - swap left and right + result.push(right[0]); + yield* merge_iter(result, left, right.slice(1)); + } else { + // otherwise keep the same order + result.push(left[0]); + yield* merge_iter(result, left.slice(1), right); + } + }; + var merged = []; + yield* merge_iter(merged, l, r); + return merged; + }; + + var msort = function* (array) { + if (!Array.isArray(array) || array.length <= 1) { + return array; + } else { + var middle = Math.floor(array.length / 2); + var left = array.slice(0, middle); + var right = array.slice(middle); + left = yield* msort(left); + right = yield* msort(right); + return yield* merge(left, right); + } + }; + + var result = yield* msort(arr); + + return result; + } + + /** + * Randomly shuffles the contents of an array + * @param {Array} arr - the input array + * @returns {Array} the shuffled array + */ + function shuffle(arr) { + // undefined inputs always return undefined + if (typeof arr === 'undefined') { + return undefined; + } + + if (arr.length <= 1) { + return arr; + } + + // shuffle using the 'inside-out' variant of the Fisher-Yates algorithm + var result = new Array(arr.length); + for (var i = 0; i < arr.length; i++) { + var j = Math.floor(Math.random() * (i + 1)); // random integer such that 0 ≤ j ≤ i + if (i !== j) { + result[i] = result[j]; + } + result[j] = arr[i]; + } + + return result; + } + + /** + * Returns the values that appear in a sequence, with duplicates eliminated. + * @param {Array} arr - An array or sequence of values + * @returns {Array} - sequence of distinct values + */ + function distinct(arr) { + // undefined inputs always return undefined + if (typeof arr === 'undefined') { + return undefined; + } + + if(!Array.isArray(arr) || arr.length <= 1) { + return arr; + } + + var results = isSequence(arr) ? createSequence() : []; + + for(var ii = 0; ii < arr.length; ii++) { + var value = arr[ii]; + // is this value already in the result sequence? + var includes = false; + for(var jj = 0; jj < results.length; jj++) { + if (deepEquals(value, results[jj])) { + includes = true; + break; + } + } + if(!includes) { + results.push(value); + } + } + return results; + } + + /** + * Applies a predicate function to each key/value pair in an object, and returns an object containing + * only the key/value pairs that passed the predicate + * + * @param {object} arg - the object to be sifted + * @param {object} func - the predicate function (lambda or native) + * @returns {object} - sifted object + */ + function* sift(arg, func) { + var result = {}; + + for (var item in arg) { + var entry = arg[item]; + var func_args = hofFuncArgs(func, entry, item, arg); + // invoke func + var res = yield* func.apply(this, func_args); + if (boolean(res)) { + result[item] = entry; + } + } + + // empty objects should be changed to undefined + if (Object.keys(result).length === 0) { + result = undefined; + } + + return result; + } + + return { + sum, count, max, min, average, + string, substring, substringBefore, substringAfter, lowercase, uppercase, length, trim, pad, + match, contains, replace, split, join, + formatNumber, formatBase, number, floor, ceil, round, abs, sqrt, power, random, + boolean, not, + map, zip, filter, single, foldLeft, sift, + keys, lookup, append, exists, spread, merge, reverse, each, error, assert, type, sort, shuffle, distinct, + base64encode, base64decode, encodeUrlComponent, encodeUrl, decodeUrlComponent, decodeUrl + }; +})(); + +module.exports = functions; + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./utils":6}],3:[function(require,module,exports){ +/** + * © Copyright IBM Corp. 2016, 2017 All Rights Reserved + * Project name: JSONata + * This project is licensed under the MIT License, see LICENSE + */ + +/** + * @module JSONata + * @description JSON query and transformation language + */ + +var datetime = require('./datetime'); +var fn = require('./functions'); +var utils = require('./utils'); +var parser = require('./parser'); +var parseSignature = require('./signature'); + +/** + * jsonata + * @function + * @param {Object} expr - JSONata expression + * @returns {{evaluate: evaluate, assign: assign}} Evaluated expression + */ +var jsonata = (function() { + 'use strict'; + + var isNumeric = utils.isNumeric; + var isArrayOfStrings = utils.isArrayOfStrings; + var isArrayOfNumbers = utils.isArrayOfNumbers; + var createSequence = utils.createSequence; + var isSequence = utils.isSequence; + var isFunction = utils.isFunction; + var isLambda = utils.isLambda; + var isIterable = utils.isIterable; + var getFunctionArity = utils.getFunctionArity; + var isDeepEqual = utils.isDeepEqual; + + // Start of Evaluator code + + var staticFrame = createFrame(null); + + /** + * Evaluate expression against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function* evaluate(expr, input, environment) { + var result; + + var entryCallback = environment.lookup('__evaluate_entry'); + if(entryCallback) { + entryCallback(expr, input, environment); + } + + switch (expr.type) { + case 'path': + result = yield * evaluatePath(expr, input, environment); + break; + case 'binary': + result = yield * evaluateBinary(expr, input, environment); + break; + case 'unary': + result = yield * evaluateUnary(expr, input, environment); + break; + case 'name': + result = evaluateName(expr, input, environment); + break; + case 'string': + case 'number': + case 'value': + result = evaluateLiteral(expr, input, environment); + break; + case 'wildcard': + result = evaluateWildcard(expr, input, environment); + break; + case 'descendant': + result = evaluateDescendants(expr, input, environment); + break; + case 'parent': + result = environment.lookup(expr.slot.label); + break; + case 'condition': + result = yield * evaluateCondition(expr, input, environment); + break; + case 'block': + result = yield * evaluateBlock(expr, input, environment); + break; + case 'bind': + result = yield * evaluateBindExpression(expr, input, environment); + break; + case 'regex': + result = evaluateRegex(expr, input, environment); + break; + case 'function': + result = yield * evaluateFunction(expr, input, environment); + break; + case 'variable': + result = evaluateVariable(expr, input, environment); + break; + case 'lambda': + result = evaluateLambda(expr, input, environment); + break; + case 'partial': + result = yield * evaluatePartialApplication(expr, input, environment); + break; + case 'apply': + result = yield * evaluateApplyExpression(expr, input, environment); + break; + case 'transform': + result = evaluateTransformExpression(expr, input, environment); + break; + } + + if(environment.async && + (typeof result === 'undefined' || result === null || typeof result.then !== 'function')) { + result = Promise.resolve(result); + } + if(environment.async && typeof result.then === 'function' && expr.nextFunction && typeof result[expr.nextFunction] === 'function') { + // although this is a 'thenable', it is chaining a different function + // so don't yield since yielding will trigger the .then() + } else { + result = yield result; + } + + if (Object.prototype.hasOwnProperty.call(expr, 'predicate')) { + for(var ii = 0; ii < expr.predicate.length; ii++) { + result = yield * evaluateFilter(expr.predicate[ii].expr, result, environment); + } + } + + if (expr.type !== 'path' && Object.prototype.hasOwnProperty.call(expr, 'group')) { + result = yield * evaluateGroupExpression(expr.group, result, environment); + } + + var exitCallback = environment.lookup('__evaluate_exit'); + if(exitCallback) { + exitCallback(expr, input, environment, result); + } + + if(result && isSequence(result) && !result.tupleStream) { + if(expr.keepArray) { + result.keepSingleton = true; + } + if(result.length === 0) { + result = undefined; + } else if(result.length === 1) { + result = result.keepSingleton ? result : result[0]; + } + + } + + return result; + } + + /** + * Evaluate path expression against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function* evaluatePath(expr, input, environment) { + var inputSequence; + // expr is an array of steps + // if the first step is a variable reference ($...), including root reference ($$), + // then the path is absolute rather than relative + if (Array.isArray(input) && expr.steps[0].type !== 'variable') { + inputSequence = input; + } else { + // if input is not an array, make it so + inputSequence = createSequence(input); + } + + var resultSequence; + var isTupleStream = false; + var tupleBindings = undefined; + + // evaluate each step in turn + for(var ii = 0; ii < expr.steps.length; ii++) { + var step = expr.steps[ii]; + + if(step.tuple) { + isTupleStream = true; + } + + // if the first step is an explicit array constructor, then just evaluate that (i.e. don't iterate over a context array) + if(ii === 0 && step.consarray) { + resultSequence = yield * evaluate(step, inputSequence, environment); + } else { + if(isTupleStream) { + tupleBindings = yield * evaluateTupleStep(step, inputSequence, tupleBindings, environment); + } else { + resultSequence = yield * evaluateStep(step, inputSequence, environment, ii === expr.steps.length - 1); + } + } + + if (!isTupleStream && (typeof resultSequence === 'undefined' || resultSequence.length === 0)) { + break; + } + + if(typeof step.focus === 'undefined') { + inputSequence = resultSequence; + } + + } + + if(isTupleStream) { + if(expr.tuple) { + // tuple stream is carrying ancestry information - keep this + resultSequence = tupleBindings; + } else { + resultSequence = createSequence(); + for (ii = 0; ii < tupleBindings.length; ii++) { + resultSequence.push(tupleBindings[ii]['@']); + } + } + } + + if(expr.keepSingletonArray) { + if(!isSequence(resultSequence)) { + resultSequence = createSequence(resultSequence); + } + resultSequence.keepSingleton = true; + } + + if (expr.hasOwnProperty('group')) { + resultSequence = yield* evaluateGroupExpression(expr.group, isTupleStream ? tupleBindings : resultSequence, environment) + } + + return resultSequence; + } + + function createFrameFromTuple(environment, tuple) { + var frame = createFrame(environment); + for(const prop in tuple) { + frame.bind(prop, tuple[prop]); + } + return frame; + } + + /** + * Evaluate a step within a path + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @param {boolean} lastStep - flag the last step in a path + * @returns {*} Evaluated input data + */ + function* evaluateStep(expr, input, environment, lastStep) { + var result; + if(expr.type === 'sort') { + result = yield* evaluateSortExpression(expr, input, environment); + if(expr.stages) { + result = yield* evaluateStages(expr.stages, result, environment); + } + return result; + } + + result = createSequence(); + + for(var ii = 0; ii < input.length; ii++) { + var res = yield * evaluate(expr, input[ii], environment); + if(expr.stages) { + for(var ss = 0; ss < expr.stages.length; ss++) { + res = yield* evaluateFilter(expr.stages[ss].expr, res, environment); + } + } + if(typeof res !== 'undefined') { + result.push(res); + } + } + + var resultSequence = createSequence(); + if(lastStep && result.length === 1 && Array.isArray(result[0]) && !isSequence(result[0])) { + resultSequence = result[0]; + } else { + // flatten the sequence + result.forEach(function(res) { + if (!Array.isArray(res) || res.cons) { + // it's not an array - just push into the result sequence + resultSequence.push(res); + } else { + // res is a sequence - flatten it into the parent sequence + res.forEach(val => resultSequence.push(val)); + } + }); + } + + return resultSequence; + } + + function* evaluateStages(stages, input, environment) { + var result = input; + for(var ss = 0; ss < stages.length; ss++) { + var stage = stages[ss]; + switch(stage.type) { + case 'filter': + result = yield * evaluateFilter(stage.expr, result, environment); + break; + case 'index': + for(var ee = 0; ee < result.length; ee++) { + var tuple = result[ee]; + tuple[stage.value] = ee; + } + break; + } + } + return result; + } + + /** + * Evaluate a step within a path + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} tupleBindings - The tuple stream + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function* evaluateTupleStep(expr, input, tupleBindings, environment) { + var result; + if(expr.type === 'sort') { + if(tupleBindings) { + result = yield* evaluateSortExpression(expr, tupleBindings, environment); + } else { + var sorted = yield* evaluateSortExpression(expr, input, environment); + result = createSequence(); + result.tupleStream = true; + for(var ss = 0; ss < sorted.length; ss++) { + var tuple = {'@': sorted[ss]}; + tuple[expr.index] = ss; + result.push(tuple); + } + } + if(expr.stages) { + result = yield* evaluateStages(expr.stages, result, environment); + } + return result; + } + + result = createSequence(); + result.tupleStream = true; + var stepEnv = environment; + if(tupleBindings === undefined) { + tupleBindings = input.map(item => { return {'@': item} }); + } + + for(var ee = 0; ee < tupleBindings.length; ee++) { + stepEnv = createFrameFromTuple(environment, tupleBindings[ee]); + var res = yield* evaluate(expr, tupleBindings[ee]['@'], stepEnv); + // res is the binding sequence for the output tuple stream + if(typeof res !== 'undefined') { + if (!Array.isArray(res)) { + res = [res]; + } + for (var bb = 0; bb < res.length; bb++) { + tuple = {}; + Object.assign(tuple, tupleBindings[ee]); + if(res.tupleStream) { + Object.assign(tuple, res[bb]); + } else { + if (expr.focus) { + tuple[expr.focus] = res[bb]; + tuple['@'] = tupleBindings[ee]['@']; + } else { + tuple['@'] = res[bb]; + } + if (expr.index) { + tuple[expr.index] = bb; + } + if (expr.ancestor) { + tuple[expr.ancestor.label] = tupleBindings[ee]['@']; + } + } + result.push(tuple); + } + } + } + + if(expr.stages) { + result = yield * evaluateStages(expr.stages, result, environment); + } + + return result; + } + + /** + * Apply filter predicate to input data + * @param {Object} predicate - filter expression + * @param {Object} input - Input data to apply predicates against + * @param {Object} environment - Environment + * @returns {*} Result after applying predicates + */ + function* evaluateFilter(predicate, input, environment) { + var results = createSequence(); + if( input && input.tupleStream) { + results.tupleStream = true; + } + if (!Array.isArray(input)) { + input = createSequence(input); + } + if (predicate.type === 'number') { + var index = Math.floor(predicate.value); // round it down + if (index < 0) { + // count in from end of array + index = input.length + index; + } + var item = input[index]; + if(typeof item !== 'undefined') { + if(Array.isArray(item)) { + results = item; + } else { + results.push(item); + } + } + } else { + for (index = 0; index < input.length; index++) { + var item = input[index]; + var context = item; + var env = environment; + if(input.tupleStream) { + context = item['@']; + env = createFrameFromTuple(environment, item); + } + var res = yield* evaluate(predicate, context, env); + if (isNumeric(res)) { + res = [res]; + } + if (isArrayOfNumbers(res)) { + res.forEach(function (ires) { + // round it down + var ii = Math.floor(ires); + if (ii < 0) { + // count in from end of array + ii = input.length + ii; + } + if (ii === index) { + results.push(item); + } + }); + } else if (fn.boolean(res)) { // truthy + results.push(item); + } + } + } + return results; + } + + /** + * Evaluate binary expression against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function * evaluateBinary(expr, input, environment) { + var result; + var lhs = yield * evaluate(expr.lhs, input, environment); + var rhs = yield * evaluate(expr.rhs, input, environment); + var op = expr.value; + + try { + switch (op) { + case '+': + case '-': + case '*': + case '/': + case '%': + result = evaluateNumericExpression(lhs, rhs, op); + break; + case '=': + case '!=': + result = evaluateEqualityExpression(lhs, rhs, op); + break; + case '<': + case '<=': + case '>': + case '>=': + result = evaluateComparisonExpression(lhs, rhs, op); + break; + case '&': + result = evaluateStringConcat(lhs, rhs); + break; + case 'and': + case 'or': + result = evaluateBooleanExpression(lhs, rhs, op); + break; + case '..': + result = evaluateRangeExpression(lhs, rhs); + break; + case 'in': + result = evaluateIncludesExpression(lhs, rhs); + break; + } + } catch(err) { + err.position = expr.position; + err.token = op; + throw err; + } + return result; + } + + /** + * Evaluate unary expression against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function* evaluateUnary(expr, input, environment) { + var result; + + switch (expr.value) { + case '-': + result = yield * evaluate(expr.expression, input, environment); + if(typeof result === 'undefined') { + result = undefined; + } else if (isNumeric(result)) { + result = -result; + } else { + throw { + code: "D1002", + stack: (new Error()).stack, + position: expr.position, + token: expr.value, + value: result + }; + } + break; + case '[': + // array constructor - evaluate each item + result = []; + for(var ii = 0; ii < expr.expressions.length; ii++) { + var item = expr.expressions[ii]; + var value = yield * evaluate(item, input, environment); + if (typeof value !== 'undefined') { + if(item.value === '[') { + result.push(value); + } else { + result = fn.append(result, value); + } + } + } + if(expr.consarray) { + Object.defineProperty(result, 'cons', { + enumerable: false, + configurable: false, + value: true + }); + } + break; + case '{': + // object constructor - apply grouping + result = yield * evaluateGroupExpression(expr, input, environment); + break; + + } + return result; + } + + /** + * Evaluate name object against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function evaluateName(expr, input, environment) { + // lookup the 'name' item in the input + return fn.lookup(input, expr.value); + } + + /** + * Evaluate literal against input data + * @param {Object} expr - JSONata expression + * @returns {*} Evaluated input data + */ + function evaluateLiteral(expr) { + return expr.value; + } + + /** + * Evaluate wildcard against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @returns {*} Evaluated input data + */ + function evaluateWildcard(expr, input) { + var results = createSequence(); + if (input !== null && typeof input === 'object') { + Object.keys(input).forEach(function (key) { + var value = input[key]; + if(Array.isArray(value)) { + value = flatten(value); + results = fn.append(results, value); + } else { + results.push(value); + } + }); + } + + // result = normalizeSequence(results); + return results; + } + + /** + * Returns a flattened array + * @param {Array} arg - the array to be flatten + * @param {Array} flattened - carries the flattened array - if not defined, will initialize to [] + * @returns {Array} - the flattened array + */ + function flatten(arg, flattened) { + if(typeof flattened === 'undefined') { + flattened = []; + } + if(Array.isArray(arg)) { + arg.forEach(function (item) { + flatten(item, flattened); + }); + } else { + flattened.push(arg); + } + return flattened; + } + + /** + * Evaluate descendants against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @returns {*} Evaluated input data + */ + function evaluateDescendants(expr, input) { + var result; + var resultSequence = createSequence(); + if (typeof input !== 'undefined') { + // traverse all descendants of this object/array + recurseDescendants(input, resultSequence); + if (resultSequence.length === 1) { + result = resultSequence[0]; + } else { + result = resultSequence; + } + } + return result; + } + + /** + * Recurse through descendants + * @param {Object} input - Input data + * @param {Object} results - Results + */ + function recurseDescendants(input, results) { + // this is the equivalent of //* in XPath + if (!Array.isArray(input)) { + results.push(input); + } + if (Array.isArray(input)) { + input.forEach(function (member) { + recurseDescendants(member, results); + }); + } else if (input !== null && typeof input === 'object') { + Object.keys(input).forEach(function (key) { + recurseDescendants(input[key], results); + }); + } + } + + /** + * Evaluate numeric expression against input data + * @param {Object} lhs - LHS value + * @param {Object} rhs - RHS value + * @param {Object} op - opcode + * @returns {*} Result + */ + function evaluateNumericExpression(lhs, rhs, op) { + var result; + + if (typeof lhs !== 'undefined' && !isNumeric(lhs)) { + throw { + code: "T2001", + stack: (new Error()).stack, + value: lhs + }; + } + if (typeof rhs !== 'undefined' && !isNumeric(rhs)) { + throw { + code: "T2002", + stack: (new Error()).stack, + value: rhs + }; + } + + if (typeof lhs === 'undefined' || typeof rhs === 'undefined') { + // if either side is undefined, the result is undefined + return result; + } + + switch (op) { + case '+': + result = lhs + rhs; + break; + case '-': + result = lhs - rhs; + break; + case '*': + result = lhs * rhs; + break; + case '/': + result = lhs / rhs; + break; + case '%': + result = lhs % rhs; + break; + } + return result; + } + + /** + * Evaluate equality expression against input data + * @param {Object} lhs - LHS value + * @param {Object} rhs - RHS value + * @param {Object} op - opcode + * @returns {*} Result + */ + function evaluateEqualityExpression(lhs, rhs, op) { + var result; + + // type checks + var ltype = typeof lhs; + var rtype = typeof rhs; + + if (ltype === 'undefined' || rtype === 'undefined') { + // if either side is undefined, the result is false + return false; + } + + switch (op) { + case '=': + result = isDeepEqual(lhs, rhs); + break; + case '!=': + result = !isDeepEqual(lhs, rhs); + break; + } + return result; + } + + /** + * Evaluate comparison expression against input data + * @param {Object} lhs - LHS value + * @param {Object} rhs - RHS value + * @param {Object} op - opcode + * @returns {*} Result + */ + function evaluateComparisonExpression(lhs, rhs, op) { + var result; + + // type checks + var ltype = typeof lhs; + var rtype = typeof rhs; + + var lcomparable = (ltype === 'undefined' || ltype === 'string' || ltype === 'number'); + var rcomparable = (rtype === 'undefined' || rtype === 'string' || rtype === 'number'); + + // if either aa or bb are not comparable (string or numeric) values, then throw an error + if (!lcomparable || !rcomparable) { + throw { + code: "T2010", + stack: (new Error()).stack, + value: !(ltype === 'string' || ltype === 'number') ? lhs : rhs + }; + } + + // if either side is undefined, the result is undefined + if (ltype === 'undefined' || rtype === 'undefined') { + return undefined; + } + + //if aa and bb are not of the same type + if (ltype !== rtype) { + throw { + code: "T2009", + stack: (new Error()).stack, + value: lhs, + value2: rhs + }; + } + + switch (op) { + case '<': + result = lhs < rhs; + break; + case '<=': + result = lhs <= rhs; + break; + case '>': + result = lhs > rhs; + break; + case '>=': + result = lhs >= rhs; + break; + } + return result; + } + + /** + * Inclusion operator - in + * + * @param {Object} lhs - LHS value + * @param {Object} rhs - RHS value + * @returns {boolean} - true if lhs is a member of rhs + */ + function evaluateIncludesExpression(lhs, rhs) { + var result = false; + + if (typeof lhs === 'undefined' || typeof rhs === 'undefined') { + // if either side is undefined, the result is false + return false; + } + + if(!Array.isArray(rhs)) { + rhs = [rhs]; + } + + for(var i = 0; i < rhs.length; i++) { + if(rhs[i] === lhs) { + result = true; + break; + } + } + + return result; + } + + /** + * Evaluate boolean expression against input data + * @param {Object} lhs - LHS value + * @param {Object} rhs - RHS value + * @param {Object} op - opcode + * @returns {*} Result + */ + function evaluateBooleanExpression(lhs, rhs, op) { + var result; + + var lBool = fn.boolean(lhs); + var rBool = fn.boolean(rhs); + + if (typeof lBool === 'undefined') { + lBool = false; + } + + if (typeof rBool === 'undefined') { + rBool = false; + } + + switch (op) { + case 'and': + result = lBool && rBool; + break; + case 'or': + result = lBool || rBool; + break; + } + return result; + } + + /** + * Evaluate string concatenation against input data + * @param {Object} lhs - LHS value + * @param {Object} rhs - RHS value + * @returns {string|*} Concatenated string + */ + function evaluateStringConcat(lhs, rhs) { + var result; + + var lstr = ''; + var rstr = ''; + if (typeof lhs !== 'undefined') { + lstr = fn.string(lhs); + } + if (typeof rhs !== 'undefined') { + rstr = fn.string(rhs); + } + + result = lstr.concat(rstr); + return result; + } + + /** + * Evaluate group expression against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {{}} Evaluated input data + */ + function* evaluateGroupExpression(expr, input, environment) { + var result = {}; + var groups = {}; + var reduce = input && input.tupleStream ? true : false; + // group the input sequence by 'key' expression + if (!Array.isArray(input)) { + input = createSequence(input); + } + + for(var itemIndex = 0; itemIndex < input.length; itemIndex++) { + var item = input[itemIndex]; + var env = reduce ? createFrameFromTuple(environment, item) : environment; + for(var pairIndex = 0; pairIndex < expr.lhs.length; pairIndex++) { + var pair = expr.lhs[pairIndex]; + var key = yield * evaluate(pair[0], reduce ? item['@'] : item, env); + // key has to be a string + if (typeof key !== 'string') { + throw { + code: "T1003", + stack: (new Error()).stack, + position: expr.position, + value: key + }; + } + var entry = {data: item, exprIndex: pairIndex}; + if (groups.hasOwnProperty(key)) { + // a value already exists in this slot + if(groups[key].exprIndex !== pairIndex) { + // this key has been generated by another expression in this group + // when multiple key expressions evaluate to the same key, then error D1009 must be thrown + throw { + code: "D1009", + stack: (new Error()).stack, + position: expr.position, + value: key + }; + } + + // append it as an array + groups[key].data = fn.append(groups[key].data, item); + } else { + groups[key] = entry; + } + } + } + + // iterate over the groups to evaluate the 'value' expression + for (key in groups) { + entry = groups[key]; + var context = entry.data; + var env = environment; + if (reduce) { + var tuple = reduceTupleStream(entry.data); + context = tuple['@']; + delete tuple['@']; + env = createFrameFromTuple(environment, tuple); + } + var value = yield * evaluate(expr.lhs[entry.exprIndex][1], context, env); + if(typeof value !== 'undefined') { + result[key] = value; + } + } + + return result; + } + + function reduceTupleStream(tupleStream) { + if(!Array.isArray(tupleStream)) { + return tupleStream; + } + var result = {}; + Object.assign(result, tupleStream[0]); + for(var ii = 1; ii < tupleStream.length; ii++) { + for(const prop in tupleStream[ii]) { + result[prop] = fn.append(result[prop], tupleStream[ii][prop]); + } + } + return result; + } + + /** + * Evaluate range expression against input data + * @param {Object} lhs - LHS value + * @param {Object} rhs - RHS value + * @returns {Array} Resultant array + */ + function evaluateRangeExpression(lhs, rhs) { + var result; + + if (typeof lhs !== 'undefined' && !Number.isInteger(lhs)) { + throw { + code: "T2003", + stack: (new Error()).stack, + value: lhs + }; + } + if (typeof rhs !== 'undefined' && !Number.isInteger(rhs)) { + throw { + code: "T2004", + stack: (new Error()).stack, + value: rhs + }; + } + + if (typeof lhs === 'undefined' || typeof rhs === 'undefined') { + // if either side is undefined, the result is undefined + return result; + } + + if (lhs > rhs) { + // if the lhs is greater than the rhs, return undefined + return result; + } + + // limit the size of the array to ten million entries (1e7) + // this is an implementation defined limit to protect against + // memory and performance issues. This value may increase in the future. + var size = rhs - lhs + 1; + if(size > 1e7) { + throw { + code: "D2014", + stack: (new Error()).stack, + value: size + }; + } + + result = new Array(size); + for (var item = lhs, index = 0; item <= rhs; item++, index++) { + result[index] = item; + } + result.sequence = true; + return result; + } + + /** + * Evaluate bind expression against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function* evaluateBindExpression(expr, input, environment) { + // The RHS is the expression to evaluate + // The LHS is the name of the variable to bind to - should be a VARIABLE token (enforced by parser) + var value = yield * evaluate(expr.rhs, input, environment); + environment.bind(expr.lhs.value, value); + return value; + } + + /** + * Evaluate condition against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function* evaluateCondition(expr, input, environment) { + var result; + var condition = yield * evaluate(expr.condition, input, environment); + if (fn.boolean(condition)) { + result = yield * evaluate(expr.then, input, environment); + } else if (typeof expr.else !== 'undefined') { + result = yield * evaluate(expr.else, input, environment); + } + return result; + } + + /** + * Evaluate block against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function* evaluateBlock(expr, input, environment) { + var result; + // create a new frame to limit the scope of variable assignments + // TODO, only do this if the post-parse stage has flagged this as required + var frame = createFrame(environment); + // invoke each expression in turn + // only return the result of the last one + for(var ii = 0; ii < expr.expressions.length; ii++) { + result = yield * evaluate(expr.expressions[ii], input, frame); + } + + return result; + } + + /** + * Prepare a regex + * @param {Object} expr - expression containing regex + * @returns {Function} Higher order function representing prepared regex + */ + function evaluateRegex(expr) { + var re = new RegExp(expr.value); + var closure = function(str, fromIndex) { + var result; + re.lastIndex = fromIndex || 0; + var match = re.exec(str); + if(match !== null) { + result = { + match: match[0], + start: match.index, + end: match.index + match[0].length, + groups: [] + }; + if(match.length > 1) { + for(var i = 1; i < match.length; i++) { + result.groups.push(match[i]); + } + } + result.next = function() { + if(re.lastIndex >= str.length) { + return undefined; + } else { + var next = closure(str, re.lastIndex); + if(next && next.match === '') { + // matches zero length string; this will never progress + throw { + code: "D1004", + stack: (new Error()).stack, + position: expr.position, + value: expr.value.source + }; + } + return next; + } + }; + } + + return result; + }; + return closure; + } + + /** + * Evaluate variable against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function evaluateVariable(expr, input, environment) { + // lookup the variable value in the environment + var result; + // if the variable name is empty string, then it refers to context value + if (expr.value === '') { + result = input && input.outerWrapper ? input[0] : input; + } else { + result = environment.lookup(expr.value); + } + return result; + } + + /** + * sort / order-by operator + * @param {Object} expr - AST for operator + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Ordered sequence + */ + function* evaluateSortExpression(expr, input, environment) { + var result; + + // evaluate the lhs, then sort the results in order according to rhs expression + //var lhs = yield * evaluate(expr.lhs, input, environment); + var lhs = input; + var isTupleSort = input.tupleStream ? true : false; + + // sort the lhs array + // use comparator function + var comparator = function*(a, b) { // eslint-disable-line require-yield + // expr.terms is an array of order-by in priority order + var comp = 0; + for(var index = 0; comp === 0 && index < expr.terms.length; index++) { + var term = expr.terms[index]; + //evaluate the sort term in the context of a + var context = a; + var env = environment; + if(isTupleSort) { + context = a['@']; + env = createFrameFromTuple(environment, a); + } + var aa = yield * evaluate(term.expression, context, env); + //evaluate the sort term in the context of b + context = b; + env = environment; + if(isTupleSort) { + context = b['@']; + env = createFrameFromTuple(environment, b); + } + var bb = yield * evaluate(term.expression, context, env); + + // type checks + var atype = typeof aa; + var btype = typeof bb; + // undefined should be last in sort order + if(atype === 'undefined') { + // swap them, unless btype is also undefined + comp = (btype === 'undefined') ? 0 : 1; + continue; + } + if(btype === 'undefined') { + comp = -1; + continue; + } + + // if aa or bb are not string or numeric values, then throw an error + if(!(atype === 'string' || atype === 'number') || !(btype === 'string' || btype === 'number')) { + throw { + code: "T2008", + stack: (new Error()).stack, + position: expr.position, + value: !(atype === 'string' || atype === 'number') ? aa : bb + }; + } + + //if aa and bb are not of the same type + if(atype !== btype) { + throw { + code: "T2007", + stack: (new Error()).stack, + position: expr.position, + value: aa, + value2: bb + }; + } + if(aa === bb) { + // both the same - move on to next term + continue; + } else if (aa < bb) { + comp = -1; + } else { + comp = 1; + } + if(term.descending === true) { + comp = -comp; + } + } + // only swap a & b if comp equals 1 + return comp === 1; + }; + + var focus = { + environment: environment, + input: input + }; + // the `focus` is passed in as the `this` for the invoked function + result = yield * fn.sort.apply(focus, [lhs, comparator]); + + return result; + } + + /** + * create a transformer function + * @param {Object} expr - AST for operator + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} tranformer function + */ + function evaluateTransformExpression(expr, input, environment) { + // create a function to implement the transform definition + var transformer = function*(obj) { // signature <(oa):o> + // undefined inputs always return undefined + if(typeof obj === 'undefined') { + return undefined; + } + + // this function returns a copy of obj with changes specified by the pattern/operation + var cloneFunction = environment.lookup('clone'); + if(!isFunction(cloneFunction)) { + // throw type error + throw { + code: "T2013", + stack: (new Error()).stack, + position: expr.position + }; + } + var result = yield * apply(cloneFunction, [obj], null, environment); + var matches = yield * evaluate(expr.pattern, result, environment); + if(typeof matches !== 'undefined') { + if(!Array.isArray(matches)) { + matches = [matches]; + } + for(var ii = 0; ii < matches.length; ii++) { + var match = matches[ii]; + // evaluate the update value for each match + var update = yield * evaluate(expr.update, match, environment); + // update must be an object + var updateType = typeof update; + if(updateType !== 'undefined') { + if(updateType !== 'object' || update === null || Array.isArray(update)) { + // throw type error + throw { + code: "T2011", + stack: (new Error()).stack, + position: expr.update.position, + value: update + }; + } + // merge the update + for(var prop in update) { + match[prop] = update[prop]; + } + } + + // delete, if specified, must be an array of strings (or single string) + if(typeof expr.delete !== 'undefined') { + var deletions = yield * evaluate(expr.delete, match, environment); + if(typeof deletions !== 'undefined') { + var val = deletions; + if (!Array.isArray(deletions)) { + deletions = [deletions]; + } + if (!isArrayOfStrings(deletions)) { + // throw type error + throw { + code: "T2012", + stack: (new Error()).stack, + position: expr.delete.position, + value: val + }; + } + for (var jj = 0; jj < deletions.length; jj++) { + if(typeof match === 'object' && match !== null) { + delete match[deletions[jj]]; + } + } + } + } + } + } + + return result; + }; + + return defineFunction(transformer, '<(oa):o>'); + } + + var chainAST = parser('function($f, $g) { function($x){ $g($f($x)) } }'); + + /** + * Apply the function on the RHS using the sequence on the LHS as the first argument + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function* evaluateApplyExpression(expr, input, environment) { + var result; + + + var lhs = yield * evaluate(expr.lhs, input, environment); + if(expr.rhs.type === 'function') { + // this is a function _invocation_; invoke it with lhs expression as the first argument + result = yield * evaluateFunction(expr.rhs, input, environment, { context: lhs }); + } else { + var func = yield * evaluate(expr.rhs, input, environment); + + if(!isFunction(func)) { + throw { + code: "T2006", + stack: (new Error()).stack, + position: expr.position, + value: func + }; + } + + if(isFunction(lhs)) { + // this is function chaining (func1 ~> func2) + // λ($f, $g) { λ($x){ $g($f($x)) } } + var chain = yield * evaluate(chainAST, null, environment); + result = yield * apply(chain, [lhs, func], null, environment); + } else { + result = yield * apply(func, [lhs], null, environment); + } + + } + + return result; + } + + /** + * Evaluate function against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function* evaluateFunction(expr, input, environment, applyto) { + var result; + + // create the procedure + // can't assume that expr.procedure is a lambda type directly + // could be an expression that evaluates to a function (e.g. variable reference, parens expr etc. + // evaluate it generically first, then check that it is a function. Throw error if not. + var proc = yield * evaluate(expr.procedure, input, environment); + + if (typeof proc === 'undefined' && expr.procedure.type === 'path' && environment.lookup(expr.procedure.steps[0].value)) { + // help the user out here if they simply forgot the leading $ + throw { + code: "T1005", + stack: (new Error()).stack, + position: expr.position, + token: expr.procedure.steps[0].value + }; + } + + var evaluatedArgs = []; + if(typeof applyto !== 'undefined') { + evaluatedArgs.push(applyto.context); + } + // eager evaluation - evaluate the arguments + for (var jj = 0; jj < expr.arguments.length; jj++) { + const arg = yield* evaluate(expr.arguments[jj], input, environment); + if(isFunction(arg)) { + // wrap this in a closure + const closure = function* (...params) { + // invoke func + return yield * apply(arg, params, null, environment); + }; + closure.arity = getFunctionArity(arg); + evaluatedArgs.push(closure); + } else { + evaluatedArgs.push(arg); + } + } + // apply the procedure + var procName = expr.procedure.type === 'path' ? expr.procedure.steps[0].value : expr.procedure.value; + try { + if(typeof proc === 'object') { + proc.token = procName; + proc.position = expr.position; + } + result = yield * apply(proc, evaluatedArgs, input, environment); + } catch (err) { + if(!err.position) { + // add the position field to the error + err.position = expr.position; + } + if (!err.token) { + // and the function identifier + err.token = procName; + } + throw err; + } + return result; + } + + /** + * Apply procedure or function + * @param {Object} proc - Procedure + * @param {Array} args - Arguments + * @param {Object} input - input + * @param {Object} environment - environment + * @returns {*} Result of procedure + */ + function* apply(proc, args, input, environment) { + var result; + result = yield * applyInner(proc, args, input, environment); + while(isLambda(result) && result.thunk === true) { + // trampoline loop - this gets invoked as a result of tail-call optimization + // the function returned a tail-call thunk + // unpack it, evaluate its arguments, and apply the tail call + var next = yield * evaluate(result.body.procedure, result.input, result.environment); + if(result.body.procedure.type === 'variable') { + next.token = result.body.procedure.value; + } + next.position = result.body.procedure.position; + var evaluatedArgs = []; + for(var ii = 0; ii < result.body.arguments.length; ii++) { + evaluatedArgs.push(yield * evaluate(result.body.arguments[ii], result.input, result.environment)); + } + + result = yield * applyInner(next, evaluatedArgs, input, environment); + } + return result; + } + + /** + * Apply procedure or function + * @param {Object} proc - Procedure + * @param {Array} args - Arguments + * @param {Object} input - input + * @param {Object} environment - environment + * @returns {*} Result of procedure + */ + function* applyInner(proc, args, input, environment) { + var result; + try { + var validatedArgs = args; + if (proc) { + validatedArgs = validateArguments(proc.signature, args, input); + } + + if (isLambda(proc)) { + result = yield* applyProcedure(proc, validatedArgs); + } else if (proc && proc._jsonata_function === true) { + var focus = { + environment: environment, + input: input + }; + // the `focus` is passed in as the `this` for the invoked function + result = proc.implementation.apply(focus, validatedArgs); + // `proc.implementation` might be a generator function + // and `result` might be a generator - if so, yield + if (isIterable(result)) { + result = yield* result; + } + } else if (typeof proc === 'function') { + // typically these are functions that are returned by the invocation of plugin functions + // the `input` is being passed in as the `this` for the invoked function + // this is so that functions that return objects containing functions can chain + // e.g. $func().next().next() + result = proc.apply(input, validatedArgs); + /* istanbul ignore next */ + if (isIterable(result)) { + result = yield* result; + } + } else { + throw { + code: "T1006", + stack: (new Error()).stack + }; + } + } catch(err) { + if(proc) { + if (typeof err.token == 'undefined' && typeof proc.token !== 'undefined') { + err.token = proc.token; + } + err.position = proc.position; + } + throw err; + } + return result; + } + + /** + * Evaluate lambda against input data + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {{lambda: boolean, input: *, environment: *, arguments: *, body: *}} Evaluated input data + */ + function evaluateLambda(expr, input, environment) { + // make a function (closure) + var procedure = { + _jsonata_lambda: true, + input: input, + environment: environment, + arguments: expr.arguments, + signature: expr.signature, + body: expr.body + }; + if(expr.thunk === true) { + procedure.thunk = true; + } + procedure.apply = function*(self, args) { + return yield * apply(procedure, args, input, self.environment); + }; + return procedure; + } + + /** + * Evaluate partial application + * @param {Object} expr - JSONata expression + * @param {Object} input - Input data to evaluate against + * @param {Object} environment - Environment + * @returns {*} Evaluated input data + */ + function* evaluatePartialApplication(expr, input, environment) { + // partially apply a function + var result; + // evaluate the arguments + var evaluatedArgs = []; + for(var ii = 0; ii < expr.arguments.length; ii++) { + var arg = expr.arguments[ii]; + if (arg.type === 'operator' && arg.value === '?') { + evaluatedArgs.push(arg); + } else { + evaluatedArgs.push(yield * evaluate(arg, input, environment)); + } + } + // lookup the procedure + var proc = yield * evaluate(expr.procedure, input, environment); + if (typeof proc === 'undefined' && expr.procedure.type === 'path' && environment.lookup(expr.procedure.steps[0].value)) { + // help the user out here if they simply forgot the leading $ + throw { + code: "T1007", + stack: (new Error()).stack, + position: expr.position, + token: expr.procedure.steps[0].value + }; + } + if (isLambda(proc)) { + result = partialApplyProcedure(proc, evaluatedArgs); + } else if (proc && proc._jsonata_function === true) { + result = partialApplyNativeFunction(proc.implementation, evaluatedArgs); + } else if (typeof proc === 'function') { + result = partialApplyNativeFunction(proc, evaluatedArgs); + } else { + throw { + code: "T1008", + stack: (new Error()).stack, + position: expr.position, + token: expr.procedure.type === 'path' ? expr.procedure.steps[0].value : expr.procedure.value + }; + } + return result; + } + + /** + * Validate the arguments against the signature validator (if it exists) + * @param {Function} signature - validator function + * @param {Array} args - function arguments + * @param {*} context - context value + * @returns {Array} - validated arguments + */ + function validateArguments(signature, args, context) { + if(typeof signature === 'undefined') { + // nothing to validate + return args; + } + var validatedArgs = signature.validate(args, context); + return validatedArgs; + } + + /** + * Apply procedure + * @param {Object} proc - Procedure + * @param {Array} args - Arguments + * @returns {*} Result of procedure + */ + function* applyProcedure(proc, args) { + var result; + var env = createFrame(proc.environment); + proc.arguments.forEach(function (param, index) { + env.bind(param.value, args[index]); + }); + if (typeof proc.body === 'function') { + // this is a lambda that wraps a native function - generated by partially evaluating a native + result = yield * applyNativeFunction(proc.body, env); + } else { + result = yield * evaluate(proc.body, proc.input, env); + } + return result; + } + + /** + * Partially apply procedure + * @param {Object} proc - Procedure + * @param {Array} args - Arguments + * @returns {{lambda: boolean, input: *, environment: {bind, lookup}, arguments: Array, body: *}} Result of partially applied procedure + */ + function partialApplyProcedure(proc, args) { + // create a closure, bind the supplied parameters and return a function that takes the remaining (?) parameters + var env = createFrame(proc.environment); + var unboundArgs = []; + proc.arguments.forEach(function (param, index) { + var arg = args[index]; + if (arg && arg.type === 'operator' && arg.value === '?') { + unboundArgs.push(param); + } else { + env.bind(param.value, arg); + } + }); + var procedure = { + _jsonata_lambda: true, + input: proc.input, + environment: env, + arguments: unboundArgs, + body: proc.body + }; + return procedure; + } + + /** + * Partially apply native function + * @param {Function} native - Native function + * @param {Array} args - Arguments + * @returns {{lambda: boolean, input: *, environment: {bind, lookup}, arguments: Array, body: *}} Result of partially applying native function + */ + function partialApplyNativeFunction(native, args) { + // create a lambda function that wraps and invokes the native function + // get the list of declared arguments from the native function + // this has to be picked out from the toString() value + var sigArgs = getNativeFunctionArguments(native); + sigArgs = sigArgs.map(function (sigArg) { + return '$' + sigArg.trim(); + }); + var body = 'function(' + sigArgs.join(', ') + '){ _ }'; + + var bodyAST = parser(body); + bodyAST.body = native; + + var partial = partialApplyProcedure(bodyAST, args); + return partial; + } + + /** + * Apply native function + * @param {Object} proc - Procedure + * @param {Object} env - Environment + * @returns {*} Result of applying native function + */ + function* applyNativeFunction(proc, env) { + var sigArgs = getNativeFunctionArguments(proc); + // generate the array of arguments for invoking the function - look them up in the environment + var args = sigArgs.map(function (sigArg) { + return env.lookup(sigArg.trim()); + }); + + var focus = { + environment: env + }; + var result = proc.apply(focus, args); + if(isIterable(result)) { + result = yield * result; + } + return result; + } + + /** + * Get native function arguments + * @param {Function} func - Function + * @returns {*|Array} Native function arguments + */ + function getNativeFunctionArguments(func) { + var signature = func.toString(); + var sigParens = /\(([^)]*)\)/.exec(signature)[1]; // the contents of the parens + var sigArgs = sigParens.split(','); + return sigArgs; + } + + /** + * Creates a function definition + * @param {Function} func - function implementation in Javascript + * @param {string} signature - JSONata function signature definition + * @returns {{implementation: *, signature: *}} function definition + */ + function defineFunction(func, signature) { + var definition = { + _jsonata_function: true, + implementation: func + }; + if(typeof signature !== 'undefined') { + definition.signature = parseSignature(signature); + } + return definition; + } + + + /** + * parses and evaluates the supplied expression + * @param {string} expr - expression to evaluate + * @returns {*} - result of evaluating the expression + */ + function* functionEval(expr, focus) { + // undefined inputs always return undefined + if(typeof expr === 'undefined') { + return undefined; + } + var input = this.input; + if(typeof focus !== 'undefined') { + input = focus; + // if the input is a JSON array, then wrap it in a singleton sequence so it gets treated as a single input + if(Array.isArray(input) && !isSequence(input)) { + input = createSequence(input); + input.outerWrapper = true; + } + } + + try { + var ast = parser(expr, false); + } catch(err) { + // error parsing the expression passed to $eval + populateMessage(err); + throw { + stack: (new Error()).stack, + code: "D3120", + value: err.message, + error: err + }; + } + try { + var result = yield* evaluate(ast, input, this.environment); + } catch(err) { + // error evaluating the expression passed to $eval + populateMessage(err); + throw { + stack: (new Error()).stack, + code: "D3121", + value:err.message, + error: err + }; + } + + return result; + } + + /** + * Clones an object + * @param {Object} arg - object to clone (deep copy) + * @returns {*} - the cloned object + */ + function functionClone(arg) { + // undefined inputs always return undefined + if(typeof arg === 'undefined') { + return undefined; + } + + return JSON.parse(fn.string(arg)); + } + + /** + * Create frame + * @param {Object} enclosingEnvironment - Enclosing environment + * @returns {{bind: bind, lookup: lookup}} Created frame + */ + function createFrame(enclosingEnvironment) { + var bindings = {}; + return { + bind: function (name, value) { + bindings[name] = value; + }, + lookup: function (name) { + var value; + if(bindings.hasOwnProperty(name)) { + value = bindings[name]; + } else if (enclosingEnvironment) { + value = enclosingEnvironment.lookup(name); + } + return value; + }, + timestamp: enclosingEnvironment ? enclosingEnvironment.timestamp : null, + async: enclosingEnvironment ? enclosingEnvironment.async : false, + global: enclosingEnvironment ? enclosingEnvironment.global : { + ancestry: [ null ] + } + }; + } + + // Function registration + staticFrame.bind('sum', defineFunction(fn.sum, ':n>')); + staticFrame.bind('count', defineFunction(fn.count, '')); + staticFrame.bind('max', defineFunction(fn.max, ':n>')); + staticFrame.bind('min', defineFunction(fn.min, ':n>')); + staticFrame.bind('average', defineFunction(fn.average, ':n>')); + staticFrame.bind('string', defineFunction(fn.string, '')); + staticFrame.bind('substring', defineFunction(fn.substring, '')); + staticFrame.bind('substringBefore', defineFunction(fn.substringBefore, '')); + staticFrame.bind('substringAfter', defineFunction(fn.substringAfter, '')); + staticFrame.bind('lowercase', defineFunction(fn.lowercase, '')); + staticFrame.bind('uppercase', defineFunction(fn.uppercase, '')); + staticFrame.bind('length', defineFunction(fn.length, '')); + staticFrame.bind('trim', defineFunction(fn.trim, '')); + staticFrame.bind('pad', defineFunction(fn.pad, '')); + staticFrame.bind('match', defineFunction(fn.match, 'n?:a>')); + staticFrame.bind('contains', defineFunction(fn.contains, '')); // TODO ):b> + staticFrame.bind('replace', defineFunction(fn.replace, '')); // TODO )(sf)n?:s> + staticFrame.bind('split', defineFunction(fn.split, '>')); // TODO )n?:a> + staticFrame.bind('join', defineFunction(fn.join, 's?:s>')); + staticFrame.bind('formatNumber', defineFunction(fn.formatNumber, '')); + staticFrame.bind('formatBase', defineFunction(fn.formatBase, '')); + staticFrame.bind('formatInteger', defineFunction(datetime.formatInteger, '')); + staticFrame.bind('parseInteger', defineFunction(datetime.parseInteger, '')); + staticFrame.bind('number', defineFunction(fn.number, '<(nsb)-:n>')); + staticFrame.bind('floor', defineFunction(fn.floor, '')); + staticFrame.bind('ceil', defineFunction(fn.ceil, '')); + staticFrame.bind('round', defineFunction(fn.round, '')); + staticFrame.bind('abs', defineFunction(fn.abs, '')); + staticFrame.bind('sqrt', defineFunction(fn.sqrt, '')); + staticFrame.bind('power', defineFunction(fn.power, '')); + staticFrame.bind('random', defineFunction(fn.random, '<:n>')); + staticFrame.bind('boolean', defineFunction(fn.boolean, '')); + staticFrame.bind('not', defineFunction(fn.not, '')); + staticFrame.bind('map', defineFunction(fn.map, '')); + staticFrame.bind('zip', defineFunction(fn.zip, '')); + staticFrame.bind('filter', defineFunction(fn.filter, '')); + staticFrame.bind('single', defineFunction(fn.single, '')); + staticFrame.bind('reduce', defineFunction(fn.foldLeft, '')); // TODO aj?:j> + staticFrame.bind('sift', defineFunction(fn.sift, '')); + staticFrame.bind('keys', defineFunction(fn.keys, '>')); + staticFrame.bind('lookup', defineFunction(fn.lookup, '')); + staticFrame.bind('append', defineFunction(fn.append, '')); + staticFrame.bind('exists', defineFunction(fn.exists, '')); + staticFrame.bind('spread', defineFunction(fn.spread, '>')); + staticFrame.bind('merge', defineFunction(fn.merge, ':o>')); + staticFrame.bind('reverse', defineFunction(fn.reverse, '')); + staticFrame.bind('each', defineFunction(fn.each, '')); + staticFrame.bind('error', defineFunction(fn.error, '')); + staticFrame.bind('assert', defineFunction(fn.assert, '')); + staticFrame.bind('type', defineFunction(fn.type, '')); + staticFrame.bind('sort', defineFunction(fn.sort, '')); + staticFrame.bind('shuffle', defineFunction(fn.shuffle, '')); + staticFrame.bind('distinct', defineFunction(fn.distinct, '')); + staticFrame.bind('base64encode', defineFunction(fn.base64encode, '')); + staticFrame.bind('base64decode', defineFunction(fn.base64decode, '')); + staticFrame.bind('encodeUrlComponent', defineFunction(fn.encodeUrlComponent, '')); + staticFrame.bind('encodeUrl', defineFunction(fn.encodeUrl, '')); + staticFrame.bind('decodeUrlComponent', defineFunction(fn.decodeUrlComponent, '')); + staticFrame.bind('decodeUrl', defineFunction(fn.decodeUrl, '')); + staticFrame.bind('eval', defineFunction(functionEval, '')); + staticFrame.bind('toMillis', defineFunction(datetime.toMillis, '')); + staticFrame.bind('fromMillis', defineFunction(datetime.fromMillis, '')); + staticFrame.bind('clone', defineFunction(functionClone, '<(oa)-:o>')); + + /** + * Error codes + * + * Sxxxx - Static errors (compile time) + * Txxxx - Type errors + * Dxxxx - Dynamic errors (evaluate time) + * 01xx - tokenizer + * 02xx - parser + * 03xx - regex parser + * 04xx - function signature parser/evaluator + * 10xx - evaluator + * 20xx - operators + * 3xxx - functions (blocks of 10 for each function) + */ + var errorCodes = { + "S0101": "String literal must be terminated by a matching quote", + "S0102": "Number out of range: {{token}}", + "S0103": "Unsupported escape sequence: \\{{token}}", + "S0104": "The escape sequence \\u must be followed by 4 hex digits", + "S0105": "Quoted property name must be terminated with a backquote (`)", + "S0106": "Comment has no closing tag", + "S0201": "Syntax error: {{token}}", + "S0202": "Expected {{value}}, got {{token}}", + "S0203": "Expected {{value}} before end of expression", + "S0204": "Unknown operator: {{token}}", + "S0205": "Unexpected token: {{token}}", + "S0206": "Unknown expression type: {{token}}", + "S0207": "Unexpected end of expression", + "S0208": "Parameter {{value}} of function definition must be a variable name (start with $)", + "S0209": "A predicate cannot follow a grouping expression in a step", + "S0210": "Each step can only have one grouping expression", + "S0211": "The symbol {{token}} cannot be used as a unary operator", + "S0212": "The left side of := must be a variable name (start with $)", + "S0213": "The literal value {{value}} cannot be used as a step within a path expression", + "S0214": "The right side of {{token}} must be a variable name (start with $)", + "S0215": "A context variable binding must precede any predicates on a step", + "S0216": "A context variable binding must precede the 'order-by' clause on a step", + "S0217": "The object representing the 'parent' cannot be derived from this expression", + "S0301": "Empty regular expressions are not allowed", + "S0302": "No terminating / in regular expression", + "S0402": "Choice groups containing parameterized types are not supported", + "S0401": "Type parameters can only be applied to functions and arrays", + "S0500": "Attempted to evaluate an expression containing syntax error(s)", + "T0410": "Argument {{index}} of function {{token}} does not match function signature", + "T0411": "Context value is not a compatible type with argument {{index}} of function {{token}}", + "T0412": "Argument {{index}} of function {{token}} must be an array of {{type}}", + "D1001": "Number out of range: {{value}}", + "D1002": "Cannot negate a non-numeric value: {{value}}", + "T1003": "Key in object structure must evaluate to a string; got: {{value}}", + "D1004": "Regular expression matches zero length string", + "T1005": "Attempted to invoke a non-function. Did you mean ${{{token}}}?", + "T1006": "Attempted to invoke a non-function", + "T1007": "Attempted to partially apply a non-function. Did you mean ${{{token}}}?", + "T1008": "Attempted to partially apply a non-function", + "D1009": "Multiple key definitions evaluate to same key: {{value}}", + "T1010": "The matcher function argument passed to function {{token}} does not return the correct object structure", + "T2001": "The left side of the {{token}} operator must evaluate to a number", + "T2002": "The right side of the {{token}} operator must evaluate to a number", + "T2003": "The left side of the range operator (..) must evaluate to an integer", + "T2004": "The right side of the range operator (..) must evaluate to an integer", + "D2005": "The left side of := must be a variable name (start with $)", // defunct - replaced by S0212 parser error + "T2006": "The right side of the function application operator ~> must be a function", + "T2007": "Type mismatch when comparing values {{value}} and {{value2}} in order-by clause", + "T2008": "The expressions within an order-by clause must evaluate to numeric or string values", + "T2009": "The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type", + "T2010": "The expressions either side of operator {{token}} must evaluate to numeric or string values", + "T2011": "The insert/update clause of the transform expression must evaluate to an object: {{value}}", + "T2012": "The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}", + "T2013": "The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.", + "D2014": "The size of the sequence allocated by the range operator (..) must not exceed 1e6. Attempted to allocate {{value}}.", + "D3001": "Attempting to invoke string function on Infinity or NaN", + "D3010": "Second argument of replace function cannot be an empty string", + "D3011": "Fourth argument of replace function must evaluate to a positive number", + "D3012": "Attempted to replace a matched string with a non-string value", + "D3020": "Third argument of split function must evaluate to a positive number", + "D3030": "Unable to cast value to a number: {{value}}", + "D3040": "Third argument of match function must evaluate to a positive number", + "D3050": "The second argument of reduce function must be a function with at least two arguments", + "D3060": "The sqrt function cannot be applied to a negative number: {{value}}", + "D3061": "The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}", + "D3070": "The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function", + "D3080": "The picture string must only contain a maximum of two sub-pictures", + "D3081": "The sub-picture must not contain more than one instance of the 'decimal-separator' character", + "D3082": "The sub-picture must not contain more than one instance of the 'percent' character", + "D3083": "The sub-picture must not contain more than one instance of the 'per-mille' character", + "D3084": "The sub-picture must not contain both a 'percent' and a 'per-mille' character", + "D3085": "The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'", + "D3086": "The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character", + "D3087": "The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character", + "D3088": "The sub-picture must not contain a 'grouping-separator' at the end of the integer part", + "D3089": "The sub-picture must not contain two adjacent instances of the 'grouping-separator' character", + "D3090": "The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'", + "D3091": "The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'", + "D3092": "A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'", + "D3093": "The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'", + "D3100": "The radix of the formatBase function must be between 2 and 36. It was given {{value}}", + "D3110": "The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}", + "D3120": "Syntax error in expression passed to function eval: {{value}}", + "D3121": "Dynamic error evaluating the expression passed to function eval: {{value}}", + "D3130": "Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation", + "D3131": "In a decimal digit pattern, all digits must be from the same decimal group", + "D3132": "Unknown component specifier {{value}} in date/time picture string", + "D3133": "The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}", + "D3134": "The timezone integer format specifier cannot have more than four digits", + "D3135": "No matching closing bracket ']' in date/time picture string", + "D3136": "The date/time picture string is missing specifiers required to parse the timestamp", + "D3137": "{{{message}}}", + "D3138": "The $single() function expected exactly 1 matching result. Instead it matched more.", + "D3139": "The $single() function expected exactly 1 matching result. Instead it matched 0.", + "D3140": "Malformed URL passed to ${{{functionName}}}(): {{value}}", + "D3141": "{{{message}}}" + }; + + /** + * lookup a message template from the catalog and substitute the inserts. + * Populates `err.message` with the substituted message. Leaves `err.message` + * untouched if code lookup fails. + * @param {string} err - error code to lookup + * @returns {undefined} - `err` is modified in place + */ + function populateMessage(err) { + var template = errorCodes[err.code]; + if(typeof template !== 'undefined') { + // if there are any handlebars, replace them with the field references + // triple braces - replace with value + // double braces - replace with json stringified value + var message = template.replace(/\{\{\{([^}]+)}}}/g, function() { + return err[arguments[1]]; + }); + message = message.replace(/\{\{([^}]+)}}/g, function() { + return JSON.stringify(err[arguments[1]]); + }); + err.message = message; + } + // Otherwise retain the original `err.message` + } + + /** + * JSONata + * @param {Object} expr - JSONata expression + * @param {boolean} options - recover: attempt to recover on parse error + * @returns {{evaluate: evaluate, assign: assign}} Evaluated expression + */ + function jsonata(expr, options) { + var ast; + var errors; + try { + ast = parser(expr, options && options.recover); + errors = ast.errors; + delete ast.errors; + } catch(err) { + // insert error message into structure + populateMessage(err); // possible side-effects on `err` + throw err; + } + var environment = createFrame(staticFrame); + + var timestamp = new Date(); // will be overridden on each call to evalute() + environment.bind('now', defineFunction(function(picture, timezone) { + return datetime.fromMillis(timestamp.getTime(), picture, timezone); + }, '')); + environment.bind('millis', defineFunction(function() { + return timestamp.getTime(); + }, '<:n>')); + + return { + evaluate: function (input, bindings, callback) { + // throw if the expression compiled with syntax errors + if(typeof errors !== 'undefined') { + var err = { + code: 'S0500', + position: 0 + }; + populateMessage(err); // possible side-effects on `err` + throw err; + } + + if (typeof bindings !== 'undefined') { + var exec_env; + // the variable bindings have been passed in - create a frame to hold these + exec_env = createFrame(environment); + for (var v in bindings) { + exec_env.bind(v, bindings[v]); + } + } else { + exec_env = environment; + } + // put the input document into the environment as the root object + exec_env.bind('$', input); + + // capture the timestamp and put it in the execution environment + // the $now() and $millis() functions will return this value - whenever it is called + timestamp = new Date(); + exec_env.timestamp = timestamp; + + // if the input is a JSON array, then wrap it in a singleton sequence so it gets treated as a single input + if(Array.isArray(input) && !isSequence(input)) { + input = createSequence(input); + input.outerWrapper = true; + } + + var result, it; + // if a callback function is supplied, then drive the generator in a promise chain + if(typeof callback === 'function') { + exec_env.async = true; + var catchHandler = function (err) { + populateMessage(err); // possible side-effects on `err` + callback(err, null); + }; + var thenHandler = function (response) { + result = it.next(response); + if (result.done) { + callback(null, result.value); + } else { + result.value.then(thenHandler).catch(catchHandler); + } + }; + it = evaluate(ast, input, exec_env); + result = it.next(); + result.value.then(thenHandler).catch(catchHandler); + } else { + // no callback function - drive the generator to completion synchronously + try { + it = evaluate(ast, input, exec_env); + result = it.next(); + while (!result.done) { + result = it.next(result.value); + } + return result.value; + } catch (err) { + // insert error message into structure + populateMessage(err); // possible side-effects on `err` + throw err; + } + } + }, + assign: function (name, value) { + environment.bind(name, value); + }, + registerFunction: function(name, implementation, signature) { + var func = defineFunction(implementation, signature); + environment.bind(name, func); + }, + ast: function() { + return ast; + }, + errors: function() { + return errors; + } + }; + } + + jsonata.parser = parser; // TODO remove this in a future release - use ast() instead + + return jsonata; + +})(); + +module.exports = jsonata; + +},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(require,module,exports){ +/** + * © Copyright IBM Corp. 2016, 2018 All Rights Reserved + * Project name: JSONata + * This project is licensed under the MIT License, see LICENSE + */ + +var parseSignature = require('./signature'); + +const parser = (() => { + 'use strict'; + + var operators = { + '.': 75, + '[': 80, + ']': 0, + '{': 70, + '}': 0, + '(': 80, + ')': 0, + ',': 0, + '@': 80, + '#': 80, + ';': 80, + ':': 80, + '?': 20, + '+': 50, + '-': 50, + '*': 60, + '/': 60, + '%': 60, + '|': 20, + '=': 40, + '<': 40, + '>': 40, + '^': 40, + '**': 60, + '..': 20, + ':=': 10, + '!=': 40, + '<=': 40, + '>=': 40, + '~>': 40, + 'and': 30, + 'or': 25, + 'in': 40, + '&': 50, + '!': 0, // not an operator, but needed as a stop character for name tokens + '~': 0 // not an operator, but needed as a stop character for name tokens + }; + + var escapes = { // JSON string escape sequences - see json.org + '"': '"', + '\\': '\\', + '/': '/', + 'b': '\b', + 'f': '\f', + 'n': '\n', + 'r': '\r', + 't': '\t' + }; + + // Tokenizer (lexer) - invoked by the parser to return one token at a time + var tokenizer = function (path) { + var position = 0; + var length = path.length; + + var create = function (type, value) { + var obj = {type: type, value: value, position: position}; + return obj; + }; + + var scanRegex = function () { + // the prefix '/' will have been previously scanned. Find the end of the regex. + // search for closing '/' ignoring any that are escaped, or within brackets + var start = position; + var depth = 0; + var pattern; + var flags; + while (position < length) { + var currentChar = path.charAt(position); + if (currentChar === '/' && path.charAt(position - 1) !== '\\' && depth === 0) { + // end of regex found + pattern = path.substring(start, position); + if (pattern === '') { + throw { + code: "S0301", + stack: (new Error()).stack, + position: position + }; + } + position++; + currentChar = path.charAt(position); + // flags + start = position; + while (currentChar === 'i' || currentChar === 'm') { + position++; + currentChar = path.charAt(position); + } + flags = path.substring(start, position) + 'g'; + return new RegExp(pattern, flags); + } + if ((currentChar === '(' || currentChar === '[' || currentChar === '{') && path.charAt(position - 1) !== '\\') { + depth++; + } + if ((currentChar === ')' || currentChar === ']' || currentChar === '}') && path.charAt(position - 1) !== '\\') { + depth--; + } + + position++; + } + throw { + code: "S0302", + stack: (new Error()).stack, + position: position + }; + }; + + var next = function (prefix) { + if (position >= length) return null; + var currentChar = path.charAt(position); + // skip whitespace + while (position < length && ' \t\n\r\v'.indexOf(currentChar) > -1) { + position++; + currentChar = path.charAt(position); + } + // skip comments + if (currentChar === '/' && path.charAt(position + 1) === '*') { + var commentStart = position; + position += 2; + currentChar = path.charAt(position); + while (!(currentChar === '*' && path.charAt(position + 1) === '/')) { + currentChar = path.charAt(++position); + if (position >= length) { + // no closing tag + throw { + code: "S0106", + stack: (new Error()).stack, + position: commentStart + }; + } + } + position += 2; + currentChar = path.charAt(position); + return next(prefix); // need this to swallow any following whitespace + } + // test for regex + if (prefix !== true && currentChar === '/') { + position++; + return create('regex', scanRegex()); + } + // handle double-char operators + if (currentChar === '.' && path.charAt(position + 1) === '.') { + // double-dot .. range operator + position += 2; + return create('operator', '..'); + } + if (currentChar === ':' && path.charAt(position + 1) === '=') { + // := assignment + position += 2; + return create('operator', ':='); + } + if (currentChar === '!' && path.charAt(position + 1) === '=') { + // != + position += 2; + return create('operator', '!='); + } + if (currentChar === '>' && path.charAt(position + 1) === '=') { + // >= + position += 2; + return create('operator', '>='); + } + if (currentChar === '<' && path.charAt(position + 1) === '=') { + // <= + position += 2; + return create('operator', '<='); + } + if (currentChar === '*' && path.charAt(position + 1) === '*') { + // ** descendant wildcard + position += 2; + return create('operator', '**'); + } + if (currentChar === '~' && path.charAt(position + 1) === '>') { + // ~> chain function + position += 2; + return create('operator', '~>'); + } + // test for single char operators + if (Object.prototype.hasOwnProperty.call(operators, currentChar)) { + position++; + return create('operator', currentChar); + } + // test for string literals + if (currentChar === '"' || currentChar === "'") { + var quoteType = currentChar; + // double quoted string literal - find end of string + position++; + var qstr = ""; + while (position < length) { + currentChar = path.charAt(position); + if (currentChar === '\\') { // escape sequence + position++; + currentChar = path.charAt(position); + if (Object.prototype.hasOwnProperty.call(escapes, currentChar)) { + qstr += escapes[currentChar]; + } else if (currentChar === 'u') { + // \u should be followed by 4 hex digits + var octets = path.substr(position + 1, 4); + if (/^[0-9a-fA-F]+$/.test(octets)) { + var codepoint = parseInt(octets, 16); + qstr += String.fromCharCode(codepoint); + position += 4; + } else { + throw { + code: "S0104", + stack: (new Error()).stack, + position: position + }; + } + } else { + // illegal escape sequence + throw { + code: "S0103", + stack: (new Error()).stack, + position: position, + token: currentChar + }; + + } + } else if (currentChar === quoteType) { + position++; + return create('string', qstr); + } else { + qstr += currentChar; + } + position++; + } + throw { + code: "S0101", + stack: (new Error()).stack, + position: position + }; + } + // test for numbers + var numregex = /^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/; + var match = numregex.exec(path.substring(position)); + if (match !== null) { + var num = parseFloat(match[0]); + if (!isNaN(num) && isFinite(num)) { + position += match[0].length; + return create('number', num); + } else { + throw { + code: "S0102", + stack: (new Error()).stack, + position: position, + token: match[0] + }; + } + } + // test for quoted names (backticks) + var name; + if (currentChar === '`') { + // scan for closing quote + position++; + var end = path.indexOf('`', position); + if (end !== -1) { + name = path.substring(position, end); + position = end + 1; + return create('name', name); + } + position = length; + throw { + code: "S0105", + stack: (new Error()).stack, + position: position + }; + } + // test for names + var i = position; + var ch; + for (; ;) { + ch = path.charAt(i); + if (i === length || ' \t\n\r\v'.indexOf(ch) > -1 || Object.prototype.hasOwnProperty.call(operators, ch)) { + if (path.charAt(position) === '$') { + // variable reference + name = path.substring(position + 1, i); + position = i; + return create('variable', name); + } else { + name = path.substring(position, i); + position = i; + switch (name) { + case 'or': + case 'in': + case 'and': + return create('operator', name); + case 'true': + return create('value', true); + case 'false': + return create('value', false); + case 'null': + return create('value', null); + default: + if (position === length && name === '') { + // whitespace at end of input + return null; + } + return create('name', name); + } + } + } else { + i++; + } + } + }; + + return next; + }; + + // This parser implements the 'Top down operator precedence' algorithm developed by Vaughan R Pratt; http://dl.acm.org/citation.cfm?id=512931. + // and builds on the Javascript framework described by Douglas Crockford at http://javascript.crockford.com/tdop/tdop.html + // and in 'Beautiful Code', edited by Andy Oram and Greg Wilson, Copyright 2007 O'Reilly Media, Inc. 798-0-596-51004-6 + + var parser = function (source, recover) { + var node; + var lexer; + + var symbol_table = {}; + var errors = []; + + var remainingTokens = function () { + var remaining = []; + if (node.id !== '(end)') { + remaining.push({type: node.type, value: node.value, position: node.position}); + } + var nxt = lexer(); + while (nxt !== null) { + remaining.push(nxt); + nxt = lexer(); + } + return remaining; + }; + + var base_symbol = { + nud: function () { + // error - symbol has been invoked as a unary operator + var err = { + code: 'S0211', + token: this.value, + position: this.position + }; + + if (recover) { + err.remaining = remainingTokens(); + err.type = 'error'; + errors.push(err); + return err; + } else { + err.stack = (new Error()).stack; + throw err; + } + } + }; + + var symbol = function (id, bp) { + var s = symbol_table[id]; + bp = bp || 0; + if (s) { + if (bp >= s.lbp) { + s.lbp = bp; + } + } else { + s = Object.create(base_symbol); + s.id = s.value = id; + s.lbp = bp; + symbol_table[id] = s; + } + return s; + }; + + var handleError = function (err) { + if (recover) { + // tokenize the rest of the buffer and add it to an error token + err.remaining = remainingTokens(); + errors.push(err); + var symbol = symbol_table["(error)"]; + node = Object.create(symbol); + node.error = err; + node.type = "(error)"; + return node; + } else { + err.stack = (new Error()).stack; + throw err; + } + }; + + var advance = function (id, infix) { + if (id && node.id !== id) { + var code; + if (node.id === '(end)') { + // unexpected end of buffer + code = "S0203"; + } else { + code = "S0202"; + } + var err = { + code: code, + position: node.position, + token: node.value, + value: id + }; + return handleError(err); + } + var next_token = lexer(infix); + if (next_token === null) { + node = symbol_table["(end)"]; + node.position = source.length; + return node; + } + var value = next_token.value; + var type = next_token.type; + var symbol; + switch (type) { + case 'name': + case 'variable': + symbol = symbol_table["(name)"]; + break; + case 'operator': + symbol = symbol_table[value]; + if (!symbol) { + return handleError({ + code: "S0204", + stack: (new Error()).stack, + position: next_token.position, + token: value + }); + } + break; + case 'string': + case 'number': + case 'value': + symbol = symbol_table["(literal)"]; + break; + case 'regex': + type = "regex"; + symbol = symbol_table["(regex)"]; + break; + /* istanbul ignore next */ + default: + return handleError({ + code: "S0205", + stack: (new Error()).stack, + position: next_token.position, + token: value + }); + } + + node = Object.create(symbol); + node.value = value; + node.type = type; + node.position = next_token.position; + return node; + }; + + // Pratt's algorithm + var expression = function (rbp) { + var left; + var t = node; + advance(null, true); + left = t.nud(); + while (rbp < node.lbp) { + t = node; + advance(); + left = t.led(left); + } + return left; + }; + + var terminal = function (id) { + var s = symbol(id, 0); + s.nud = function () { + return this; + }; + }; + + // match infix operators + // + // left associative + var infix = function (id, bp, led) { + var bindingPower = bp || operators[id]; + var s = symbol(id, bindingPower); + s.led = led || function (left) { + this.lhs = left; + this.rhs = expression(bindingPower); + this.type = "binary"; + return this; + }; + return s; + }; + + // match infix operators + // + // right associative + var infixr = function (id, bp, led) { + var s = symbol(id, bp); + s.led = led; + return s; + }; + + // match prefix operators + // + var prefix = function (id, nud) { + var s = symbol(id); + s.nud = nud || function () { + this.expression = expression(70); + this.type = "unary"; + return this; + }; + return s; + }; + + terminal("(end)"); + terminal("(name)"); + terminal("(literal)"); + terminal("(regex)"); + symbol(":"); + symbol(";"); + symbol(","); + symbol(")"); + symbol("]"); + symbol("}"); + symbol(".."); // range operator + infix("."); // map operator + infix("+"); // numeric addition + infix("-"); // numeric subtraction + infix("*"); // numeric multiplication + infix("/"); // numeric division + infix("%"); // numeric modulus + infix("="); // equality + infix("<"); // less than + infix(">"); // greater than + infix("!="); // not equal to + infix("<="); // less than or equal + infix(">="); // greater than or equal + infix("&"); // string concatenation + infix("and"); // Boolean AND + infix("or"); // Boolean OR + infix("in"); // is member of array + terminal("and"); // the 'keywords' can also be used as terminals (field names) + terminal("or"); // + terminal("in"); // + prefix("-"); // unary numeric negation + infix("~>"); // function application + + infixr("(error)", 10, function (left) { + this.lhs = left; + + this.error = node.error; + this.remaining = remainingTokens(); + this.type = 'error'; + return this; + }); + + // field wildcard (single level) + prefix('*', function () { + this.type = "wildcard"; + return this; + }); + + // descendant wildcard (multi-level) + prefix('**', function () { + this.type = "descendant"; + return this; + }); + + // parent operator + prefix('%', function () { + this.type = "parent"; + return this; + }); + + // function invocation + infix("(", operators['('], function (left) { + // left is is what we are trying to invoke + this.procedure = left; + this.type = 'function'; + this.arguments = []; + if (node.id !== ')') { + for (; ;) { + if (node.type === 'operator' && node.id === '?') { + // partial function application + this.type = 'partial'; + this.arguments.push(node); + advance('?'); + } else { + this.arguments.push(expression(0)); + } + if (node.id !== ',') break; + advance(','); + } + } + advance(")", true); + // if the name of the function is 'function' or λ, then this is function definition (lambda function) + if (left.type === 'name' && (left.value === 'function' || left.value === '\u03BB')) { + // all of the args must be VARIABLE tokens + this.arguments.forEach(function (arg, index) { + if (arg.type !== 'variable') { + return handleError({ + code: "S0208", + stack: (new Error()).stack, + position: arg.position, + token: arg.value, + value: index + 1 + }); + } + }); + this.type = 'lambda'; + // is the next token a '<' - if so, parse the function signature + if (node.id === '<') { + var sigPos = node.position; + var depth = 1; + var sig = '<'; + while (depth > 0 && node.id !== '{' && node.id !== '(end)') { + var tok = advance(); + if (tok.id === '>') { + depth--; + } else if (tok.id === '<') { + depth++; + } + sig += tok.value; + } + advance('>'); + try { + this.signature = parseSignature(sig); + } catch (err) { + // insert the position into this error + err.position = sigPos + err.offset; + return handleError(err); + } + } + // parse the function body + advance('{'); + this.body = expression(0); + advance('}'); + } + return this; + }); + + // parenthesis - block expression + prefix("(", function () { + var expressions = []; + while (node.id !== ")") { + expressions.push(expression(0)); + if (node.id !== ";") { + break; + } + advance(";"); + } + advance(")", true); + this.type = 'block'; + this.expressions = expressions; + return this; + }); + + // array constructor + prefix("[", function () { + var a = []; + if (node.id !== "]") { + for (; ;) { + var item = expression(0); + if (node.id === "..") { + // range operator + var range = {type: "binary", value: "..", position: node.position, lhs: item}; + advance(".."); + range.rhs = expression(0); + item = range; + } + a.push(item); + if (node.id !== ",") { + break; + } + advance(","); + } + } + advance("]", true); + this.expressions = a; + this.type = "unary"; + return this; + }); + + // filter - predicate or array index + infix("[", operators['['], function (left) { + if (node.id === "]") { + // empty predicate means maintain singleton arrays in the output + var step = left; + while (step && step.type === 'binary' && step.value === '[') { + step = step.lhs; + } + step.keepArray = true; + advance("]"); + return left; + } else { + this.lhs = left; + this.rhs = expression(operators[']']); + this.type = 'binary'; + advance("]", true); + return this; + } + }); + + // order-by + infix("^", operators['^'], function (left) { + advance("("); + var terms = []; + for (; ;) { + var term = { + descending: false + }; + if (node.id === "<") { + // ascending sort + advance("<"); + } else if (node.id === ">") { + // descending sort + term.descending = true; + advance(">"); + } else { + //unspecified - default to ascending + } + term.expression = expression(0); + terms.push(term); + if (node.id !== ",") { + break; + } + advance(","); + } + advance(")"); + this.lhs = left; + this.rhs = terms; + this.type = 'binary'; + return this; + }); + + var objectParser = function (left) { + var a = []; + if (node.id !== "}") { + for (; ;) { + var n = expression(0); + advance(":"); + var v = expression(0); + a.push([n, v]); // holds an array of name/value expression pairs + if (node.id !== ",") { + break; + } + advance(","); + } + } + advance("}", true); + if (typeof left === 'undefined') { + // NUD - unary prefix form + this.lhs = a; + this.type = "unary"; + } else { + // LED - binary infix form + this.lhs = left; + this.rhs = a; + this.type = 'binary'; + } + return this; + }; + + // object constructor + prefix("{", objectParser); + + // object grouping + infix("{", operators['{'], objectParser); + + // bind variable + infixr(":=", operators[':='], function (left) { + if (left.type !== 'variable') { + return handleError({ + code: "S0212", + stack: (new Error()).stack, + position: left.position, + token: left.value + }); + } + this.lhs = left; + this.rhs = expression(operators[':='] - 1); // subtract 1 from bindingPower for right associative operators + this.type = "binary"; + return this; + }); + + // focus variable bind + infix("@", operators['@'], function (left) { + this.lhs = left; + this.rhs = expression(operators['@']); + if(this.rhs.type !== 'variable') { + return handleError({ + code: "S0214", + stack: (new Error()).stack, + position: this.rhs.position, + token: "@" + }); + } + this.type = "binary"; + return this; + }); + + // index (position) variable bind + infix("#", operators['#'], function (left) { + this.lhs = left; + this.rhs = expression(operators['#']); + if(this.rhs.type !== 'variable') { + return handleError({ + code: "S0214", + stack: (new Error()).stack, + position: this.rhs.position, + token: "#" + }); + } + this.type = "binary"; + return this; + }); + + // if/then/else ternary operator ?: + infix("?", operators['?'], function (left) { + this.type = 'condition'; + this.condition = left; + this.then = expression(0); + if (node.id === ':') { + // else condition + advance(":"); + this.else = expression(0); + } + return this; + }); + + // object transformer + prefix("|", function () { + this.type = 'transform'; + this.pattern = expression(0); + advance('|'); + this.update = expression(0); + if (node.id === ',') { + advance(','); + this.delete = expression(0); + } + advance('|'); + return this; + }); + + // tail call optimization + // this is invoked by the post parser to analyse lambda functions to see + // if they make a tail call. If so, it is replaced by a thunk which will + // be invoked by the trampoline loop during function application. + // This enables tail-recursive functions to be written without growing the stack + var tailCallOptimize = function (expr) { + var result; + if (expr.type === 'function' && !expr.predicate) { + var thunk = {type: 'lambda', thunk: true, arguments: [], position: expr.position}; + thunk.body = expr; + result = thunk; + } else if (expr.type === 'condition') { + // analyse both branches + expr.then = tailCallOptimize(expr.then); + if (typeof expr.else !== 'undefined') { + expr.else = tailCallOptimize(expr.else); + } + result = expr; + } else if (expr.type === 'block') { + // only the last expression in the block + var length = expr.expressions.length; + if (length > 0) { + expr.expressions[length - 1] = tailCallOptimize(expr.expressions[length - 1]); + } + result = expr; + } else { + result = expr; + } + return result; + }; + + var ancestorLabel = 0; + var ancestorIndex = 0; + var ancestry = []; + + var seekParent = function (node, slot) { + switch (node.type) { + case 'name': + case 'wildcard': + slot.level--; + if(slot.level === 0) { + if (typeof node.ancestor === 'undefined') { + node.ancestor = slot; + } else { + // reuse the existing label + ancestry[slot.index].slot.label = node.ancestor.label; + node.ancestor = slot; + } + node.tuple = true; + } + break; + case 'parent': + slot.level++; + break; + case 'block': + // look in last expression in the block + if(node.expressions.length > 0) { + node.tuple = true; + slot = seekParent(node.expressions[node.expressions.length - 1], slot); + } + break; + case 'path': + // last step in path + node.tuple = true; + var index = node.steps.length - 1; + slot = seekParent(node.steps[index--], slot); + while (slot.level > 0 && index >= 0) { + // check previous steps + slot = seekParent(node.steps[index--], slot); + } + break; + default: + // error - can't derive ancestor + throw { + code: "S0217", + token: node.type, + position: node.position + }; + } + return slot; + }; + + var pushAncestry = function(result, value) { + if(typeof value.seekingParent !== 'undefined' || value.type === 'parent') { + var slots = (typeof value.seekingParent !== 'undefined') ? value.seekingParent : []; + if (value.type === 'parent') { + slots.push(value.slot); + } + if(typeof result.seekingParent === 'undefined') { + result.seekingParent = slots; + } else { + Array.prototype.push.apply(result.seekingParent, slots); + } + } + }; + + var resolveAncestry = function(path) { + var index = path.steps.length - 1; + var laststep = path.steps[index]; + var slots = (typeof laststep.seekingParent !== 'undefined') ? laststep.seekingParent : []; + if (laststep.type === 'parent') { + slots.push(laststep.slot); + } + for(var is = 0; is < slots.length; is++) { + var slot = slots[is]; + index = path.steps.length - 2; + while (slot.level > 0) { + if (index < 0) { + if(typeof path.seekingParent === 'undefined') { + path.seekingParent = [slot]; + } else { + path.seekingParent.push(slot); + } + break; + } + // try previous step + var step = path.steps[index--]; + // multiple contiguous steps that bind the focus should be skipped + while(index >= 0 && step.focus && path.steps[index].focus) { + step = path.steps[index--]; + } + slot = seekParent(step, slot); + } + } + }; + + // post-parse stage + // the purpose of this is to add as much semantic value to the parse tree as possible + // in order to simplify the work of the evaluator. + // This includes flattening the parts of the AST representing location paths, + // converting them to arrays of steps which in turn may contain arrays of predicates. + // following this, nodes containing '.' and '[' should be eliminated from the AST. + var processAST = function (expr) { + var result; + switch (expr.type) { + case 'binary': + switch (expr.value) { + case '.': + var lstep = processAST(expr.lhs); + + if (lstep.type === 'path') { + result = lstep; + } else { + result = {type: 'path', steps: [lstep]}; + } + if(lstep.type === 'parent') { + result.seekingParent = [lstep.slot]; + } + var rest = processAST(expr.rhs); + if (rest.type === 'function' && + rest.procedure.type === 'path' && + rest.procedure.steps.length === 1 && + rest.procedure.steps[0].type === 'name' && + result.steps[result.steps.length - 1].type === 'function') { + // next function in chain of functions - will override a thenable + result.steps[result.steps.length - 1].nextFunction = rest.procedure.steps[0].value; + } + if (rest.type === 'path') { + Array.prototype.push.apply(result.steps, rest.steps); + } else { + if(typeof rest.predicate !== 'undefined') { + rest.stages = rest.predicate; + delete rest.predicate; + } + result.steps.push(rest); + } + // any steps within a path that are string literals, should be changed to 'name' + result.steps.filter(function (step) { + if (step.type === 'number' || step.type === 'value') { + // don't allow steps to be numbers or the values true/false/null + throw { + code: "S0213", + stack: (new Error()).stack, + position: step.position, + value: step.value + }; + } + return step.type === 'string'; + }).forEach(function (lit) { + lit.type = 'name'; + }); + // any step that signals keeping a singleton array, should be flagged on the path + if (result.steps.filter(function (step) { + return step.keepArray === true; + }).length > 0) { + result.keepSingletonArray = true; + } + // if first step is a path constructor, flag it for special handling + var firststep = result.steps[0]; + if (firststep.type === 'unary' && firststep.value === '[') { + firststep.consarray = true; + } + // if the last step is an array constructor, flag it so it doesn't flatten + var laststep = result.steps[result.steps.length - 1]; + if (laststep.type === 'unary' && laststep.value === '[') { + laststep.consarray = true; + } + resolveAncestry(result); + break; + case '[': + // predicated step + // LHS is a step or a predicated step + // RHS is the predicate expr + result = processAST(expr.lhs); + var step = result; + var type = 'predicate'; + if (result.type === 'path') { + step = result.steps[result.steps.length - 1]; + type = 'stages'; + } + if (typeof step.group !== 'undefined') { + throw { + code: "S0209", + stack: (new Error()).stack, + position: expr.position + }; + } + if (typeof step[type] === 'undefined') { + step[type] = []; + } + var predicate = processAST(expr.rhs); + if(typeof predicate.seekingParent !== 'undefined') { + predicate.seekingParent.forEach(slot => { + if(slot.level === 1) { + seekParent(step, slot); + } else { + slot.level--; + } + }); + pushAncestry(step, predicate); + } + step[type].push({type: 'filter', expr: predicate, position: expr.position}); + break; + case '{': + // group-by + // LHS is a step or a predicated step + // RHS is the object constructor expr + result = processAST(expr.lhs); + if (typeof result.group !== 'undefined') { + throw { + code: "S0210", + stack: (new Error()).stack, + position: expr.position + }; + } + // object constructor - process each pair + result.group = { + lhs: expr.rhs.map(function (pair) { + return [processAST(pair[0]), processAST(pair[1])]; + }), + position: expr.position + }; + break; + case '^': + // order-by + // LHS is the array to be ordered + // RHS defines the terms + result = processAST(expr.lhs); + if (result.type !== 'path') { + result = {type: 'path', steps: [result]}; + } + var sortStep = {type: 'sort', position: expr.position}; + sortStep.terms = expr.rhs.map(function (terms) { + var expression = processAST(terms.expression); + pushAncestry(sortStep, expression); + return { + descending: terms.descending, + expression: expression + }; + }); + result.steps.push(sortStep); + resolveAncestry(result); + break; + case ':=': + result = {type: 'bind', value: expr.value, position: expr.position}; + result.lhs = processAST(expr.lhs); + result.rhs = processAST(expr.rhs); + pushAncestry(result, result.rhs); + break; + case '@': + result = processAST(expr.lhs); + step = result; + if (result.type === 'path') { + step = result.steps[result.steps.length - 1]; + } + // throw error if there are any predicates defined at this point + // at this point the only type of stages can be predicates + if(typeof step.stages !== 'undefined' || typeof step.predicate !== 'undefined') { + throw { + code: "S0215", + stack: (new Error()).stack, + position: expr.position + }; + } + // also throw if this is applied after an 'order-by' clause + if(step.type === 'sort') { + throw { + code: "S0216", + stack: (new Error()).stack, + position: expr.position + }; + } + if(expr.keepArray) { + step.keepArray = true; + } + step.focus = expr.rhs.value; + step.tuple = true; + break; + case '#': + result = processAST(expr.lhs); + step = result; + if (result.type === 'path') { + step = result.steps[result.steps.length - 1]; + } else { + result = {type: 'path', steps: [result]}; + if (typeof step.predicate !== 'undefined') { + step.stages = step.predicate; + delete step.predicate; + } + } + if (typeof step.stages === 'undefined') { + step.index = expr.rhs.value; + } else { + step.stages.push({type: 'index', value: expr.rhs.value, position: expr.position}); + } + step.tuple = true; + break; + case '~>': + result = {type: 'apply', value: expr.value, position: expr.position}; + result.lhs = processAST(expr.lhs); + result.rhs = processAST(expr.rhs); + break; + default: + result = {type: expr.type, value: expr.value, position: expr.position}; + result.lhs = processAST(expr.lhs); + result.rhs = processAST(expr.rhs); + pushAncestry(result, result.lhs); + pushAncestry(result, result.rhs); + } + break; + case 'unary': + result = {type: expr.type, value: expr.value, position: expr.position}; + if (expr.value === '[') { + // array constructor - process each item + result.expressions = expr.expressions.map(function (item) { + var value = processAST(item); + pushAncestry(result, value); + return value; + }); + } else if (expr.value === '{') { + // object constructor - process each pair + result.lhs = expr.lhs.map(function (pair) { + var key = processAST(pair[0]); + pushAncestry(result, key); + var value = processAST(pair[1]); + pushAncestry(result, value); + return [key, value]; + }); + } else { + // all other unary expressions - just process the expression + result.expression = processAST(expr.expression); + // if unary minus on a number, then pre-process + if (expr.value === '-' && result.expression.type === 'number') { + result = result.expression; + result.value = -result.value; + } else { + pushAncestry(result, result.expression); + } + } + break; + case 'function': + case 'partial': + result = {type: expr.type, name: expr.name, value: expr.value, position: expr.position}; + result.arguments = expr.arguments.map(function (arg) { + var argAST = processAST(arg); + pushAncestry(result, argAST); + return argAST; + }); + result.procedure = processAST(expr.procedure); + break; + case 'lambda': + result = { + type: expr.type, + arguments: expr.arguments, + signature: expr.signature, + position: expr.position + }; + var body = processAST(expr.body); + result.body = tailCallOptimize(body); + break; + case 'condition': + result = {type: expr.type, position: expr.position}; + result.condition = processAST(expr.condition); + pushAncestry(result, result.condition); + result.then = processAST(expr.then); + pushAncestry(result, result.then); + if (typeof expr.else !== 'undefined') { + result.else = processAST(expr.else); + pushAncestry(result, result.else); + } + break; + case 'transform': + result = {type: expr.type, position: expr.position}; + result.pattern = processAST(expr.pattern); + result.update = processAST(expr.update); + if (typeof expr.delete !== 'undefined') { + result.delete = processAST(expr.delete); + } + break; + case 'block': + result = {type: expr.type, position: expr.position}; + // array of expressions - process each one + result.expressions = expr.expressions.map(function (item) { + var part = processAST(item); + pushAncestry(result, part); + if (part.consarray || (part.type === 'path' && part.steps[0].consarray)) { + result.consarray = true; + } + return part; + }); + // TODO scan the array of expressions to see if any of them assign variables + // if so, need to mark the block as one that needs to create a new frame + break; + case 'name': + result = {type: 'path', steps: [expr]}; + if (expr.keepArray) { + result.keepSingletonArray = true; + } + break; + case 'parent': + result = {type: 'parent', slot: { label: '!' + ancestorLabel++, level: 1, index: ancestorIndex++ } }; + ancestry.push(result); + break; + case 'string': + case 'number': + case 'value': + case 'wildcard': + case 'descendant': + case 'variable': + case 'regex': + result = expr; + break; + case 'operator': + // the tokens 'and' and 'or' might have been used as a name rather than an operator + if (expr.value === 'and' || expr.value === 'or' || expr.value === 'in') { + expr.type = 'name'; + result = processAST(expr); + } else /* istanbul ignore else */ if (expr.value === '?') { + // partial application + result = expr; + } else { + throw { + code: "S0201", + stack: (new Error()).stack, + position: expr.position, + token: expr.value + }; + } + break; + case 'error': + result = expr; + if (expr.lhs) { + result = processAST(expr.lhs); + } + break; + default: + var code = "S0206"; + /* istanbul ignore else */ + if (expr.id === '(end)') { + code = "S0207"; + } + var err = { + code: code, + position: expr.position, + token: expr.value + }; + if (recover) { + errors.push(err); + return {type: 'error', error: err}; + } else { + err.stack = (new Error()).stack; + throw err; + } + } + if (expr.keepArray) { + result.keepArray = true; + } + return result; + }; + + // now invoke the tokenizer and the parser and return the syntax tree + lexer = tokenizer(source); + advance(); + // parse the tokens + var expr = expression(0); + if (node.id !== '(end)') { + var err = { + code: "S0201", + position: node.position, + token: node.value + }; + handleError(err); + } + expr = processAST(expr); + + if(expr.type === 'parent' || typeof expr.seekingParent !== 'undefined') { + // error - trying to derive ancestor at top level + throw { + code: "S0217", + token: expr.type, + position: expr.position + }; + } + + if (errors.length > 0) { + expr.errors = errors; + } + + return expr; + }; + + return parser; +})(); + +module.exports = parser; + +},{"./signature":5}],5:[function(require,module,exports){ +/** + * © Copyright IBM Corp. 2016, 2018 All Rights Reserved + * Project name: JSONata + * This project is licensed under the MIT License, see LICENSE + */ + +var utils = require('./utils'); + +const signature = (() => { + 'use strict'; + + // A mapping between the function signature symbols and the full plural of the type + // Expected to be used in error messages + var arraySignatureMapping = { + "a": "arrays", + "b": "booleans", + "f": "functions", + "n": "numbers", + "o": "objects", + "s": "strings" + }; + + /** + * Parses a function signature definition and returns a validation function + * @param {string} signature - the signature between the + * @returns {Function} validation function + */ + function parseSignature(signature) { + // create a Regex that represents this signature and return a function that when invoked, + // returns the validated (possibly fixed-up) arguments, or throws a validation error + // step through the signature, one symbol at a time + var position = 1; + var params = []; + var param = {}; + var prevParam = param; + while (position < signature.length) { + var symbol = signature.charAt(position); + if (symbol === ':') { + // TODO figure out what to do with the return type + // ignore it for now + break; + } + + var next = function () { + params.push(param); + prevParam = param; + param = {}; + }; + + var findClosingBracket = function (str, start, openSymbol, closeSymbol) { + // returns the position of the closing symbol (e.g. bracket) in a string + // that balances the opening symbol at position start + var depth = 1; + var position = start; + while (position < str.length) { + position++; + symbol = str.charAt(position); + if (symbol === closeSymbol) { + depth--; + if (depth === 0) { + // we're done + break; // out of while loop + } + } else if (symbol === openSymbol) { + depth++; + } + } + return position; + }; + + switch (symbol) { + case 's': // string + case 'n': // number + case 'b': // boolean + case 'l': // not so sure about expecting null? + case 'o': // object + param.regex = '[' + symbol + 'm]'; + param.type = symbol; + next(); + break; + case 'a': // array + // normally treat any value as singleton array + param.regex = '[asnblfom]'; + param.type = symbol; + param.array = true; + next(); + break; + case 'f': // function + param.regex = 'f'; + param.type = symbol; + next(); + break; + case 'j': // any JSON type + param.regex = '[asnblom]'; + param.type = symbol; + next(); + break; + case 'x': // any type + param.regex = '[asnblfom]'; + param.type = symbol; + next(); + break; + case '-': // use context if param not supplied + prevParam.context = true; + prevParam.contextRegex = new RegExp(prevParam.regex); // pre-compiled to test the context type at runtime + prevParam.regex += '?'; + break; + case '?': // optional param + case '+': // one or more + prevParam.regex += symbol; + break; + case '(': // choice of types + // search forward for matching ')' + var endParen = findClosingBracket(signature, position, '(', ')'); + var choice = signature.substring(position + 1, endParen); + if (choice.indexOf('<') === -1) { + // no parameterized types, simple regex + param.regex = '[' + choice + 'm]'; + } else { + // TODO harder + throw { + code: "S0402", + stack: (new Error()).stack, + value: choice, + offset: position + }; + } + param.type = '(' + choice + ')'; + position = endParen; + next(); + break; + case '<': // type parameter - can only be applied to 'a' and 'f' + if (prevParam.type === 'a' || prevParam.type === 'f') { + // search forward for matching '>' + var endPos = findClosingBracket(signature, position, '<', '>'); + prevParam.subtype = signature.substring(position + 1, endPos); + position = endPos; + } else { + throw { + code: "S0401", + stack: (new Error()).stack, + value: prevParam.type, + offset: position + }; + } + break; + } + position++; + } + var regexStr = '^' + + params.map(function (param) { + return '(' + param.regex + ')'; + }).join('') + + '$'; + var regex = new RegExp(regexStr); + var getSymbol = function (value) { + var symbol; + if (utils.isFunction(value)) { + symbol = 'f'; + } else { + var type = typeof value; + switch (type) { + case 'string': + symbol = 's'; + break; + case 'number': + symbol = 'n'; + break; + case 'boolean': + symbol = 'b'; + break; + case 'object': + if (value === null) { + symbol = 'l'; + } else if (Array.isArray(value)) { + symbol = 'a'; + } else { + symbol = 'o'; + } + break; + case 'undefined': + default: + // any value can be undefined, but should be allowed to match + symbol = 'm'; // m for missing + } + } + return symbol; + }; + + var throwValidationError = function (badArgs, badSig) { + // to figure out where this went wrong we need apply each component of the + // regex to each argument until we get to the one that fails to match + var partialPattern = '^'; + var goodTo = 0; + for (var index = 0; index < params.length; index++) { + partialPattern += params[index].regex; + var match = badSig.match(partialPattern); + if (match === null) { + // failed here + throw { + code: "T0410", + stack: (new Error()).stack, + value: badArgs[goodTo], + index: goodTo + 1 + }; + } + goodTo = match[0].length; + } + // if it got this far, it's probably because of extraneous arguments (we + // haven't added the trailing '$' in the regex yet. + throw { + code: "T0410", + stack: (new Error()).stack, + value: badArgs[goodTo], + index: goodTo + 1 + }; + }; + + return { + definition: signature, + validate: function (args, context) { + var suppliedSig = ''; + args.forEach(function (arg) { + suppliedSig += getSymbol(arg); + }); + var isValid = regex.exec(suppliedSig); + if (isValid) { + var validatedArgs = []; + var argIndex = 0; + params.forEach(function (param, index) { + var arg = args[argIndex]; + var match = isValid[index + 1]; + if (match === '') { + if (param.context && param.contextRegex) { + // substitute context value for missing arg + // first check that the context value is the right type + var contextType = getSymbol(context); + // test contextType against the regex for this arg (without the trailing ?) + if (param.contextRegex.test(contextType)) { + validatedArgs.push(context); + } else { + // context value not compatible with this argument + throw { + code: "T0411", + stack: (new Error()).stack, + value: context, + index: argIndex + 1 + }; + } + } else { + validatedArgs.push(arg); + argIndex++; + } + } else { + // may have matched multiple args (if the regex ends with a '+' + // split into single tokens + match.split('').forEach(function (single) { + if (param.type === 'a') { + if (single === 'm') { + // missing (undefined) + arg = undefined; + } else { + arg = args[argIndex]; + var arrayOK = true; + // is there type information on the contents of the array? + if (typeof param.subtype !== 'undefined') { + if (single !== 'a' && match !== param.subtype) { + arrayOK = false; + } else if (single === 'a') { + if (arg.length > 0) { + var itemType = getSymbol(arg[0]); + if (itemType !== param.subtype.charAt(0)) { // TODO recurse further + arrayOK = false; + } else { + // make sure every item in the array is this type + var differentItems = arg.filter(function (val) { + return (getSymbol(val) !== itemType); + }); + arrayOK = (differentItems.length === 0); + } + } + } + } + if (!arrayOK) { + throw { + code: "T0412", + stack: (new Error()).stack, + value: arg, + index: argIndex + 1, + type: arraySignatureMapping[param.subtype] + }; + } + // the function expects an array. If it's not one, make it so + if (single !== 'a') { + arg = [arg]; + } + } + validatedArgs.push(arg); + argIndex++; + } else { + validatedArgs.push(arg); + argIndex++; + } + }); + } + }); + return validatedArgs; + } + throwValidationError(args, suppliedSig); + } + }; + } + + return parseSignature; +})(); + +module.exports = signature; + +},{"./utils":6}],6:[function(require,module,exports){ +/** + * © Copyright IBM Corp. 2016, 2018 All Rights Reserved + * Project name: JSONata + * This project is licensed under the MIT License, see LICENSE + */ + +const utils = (() => { + 'use strict'; + + /** + * Check if value is a finite number + * @param {float} n - number to evaluate + * @returns {boolean} True if n is a finite number + */ + function isNumeric(n) { + var isNum = false; + if(typeof n === 'number') { + isNum = !isNaN(n); + if (isNum && !isFinite(n)) { + throw { + code: "D1001", + value: n, + stack: (new Error()).stack + }; + } + } + return isNum; + } + + /** + * Returns true if the arg is an array of strings + * @param {*} arg - the item to test + * @returns {boolean} True if arg is an array of strings + */ + function isArrayOfStrings(arg) { + var result = false; + /* istanbul ignore else */ + if(Array.isArray(arg)) { + result = (arg.filter(function(item){return typeof item !== 'string';}).length === 0); + } + return result; + } + + /** + * Returns true if the arg is an array of numbers + * @param {*} arg - the item to test + * @returns {boolean} True if arg is an array of numbers + */ + function isArrayOfNumbers(arg) { + var result = false; + if(Array.isArray(arg)) { + result = (arg.filter(function(item){return !isNumeric(item);}).length === 0); + } + return result; + } + + /** + * Create an empty sequence to contain query results + * @returns {Array} - empty sequence + */ + function createSequence() { + var sequence = []; + sequence.sequence = true; + if (arguments.length === 1) { + sequence.push(arguments[0]); + } + return sequence; + } + + /** + * Tests if a value is a sequence + * @param {*} value the value to test + * @returns {boolean} true if it's a sequence + */ + function isSequence(value) { + return value.sequence === true && Array.isArray(value); + } + + /** + * + * @param {Object} arg - expression to test + * @returns {boolean} - true if it is a function (lambda or built-in) + */ + function isFunction(arg) { + return ((arg && (arg._jsonata_function === true || arg._jsonata_lambda === true)) || typeof arg === 'function'); + } + + /** + * Returns the arity (number of arguments) of the function + * @param {*} func - the function + * @returns {*} - the arity + */ + function getFunctionArity(func) { + var arity = typeof func.arity === 'number' ? func.arity : + typeof func.implementation === 'function' ? func.implementation.length : + typeof func.length === 'number' ? func.length : func.arguments.length; + return arity; + } + + /** + * Tests whether arg is a lambda function + * @param {*} arg - the value to test + * @returns {boolean} - true if it is a lambda function + */ + function isLambda(arg) { + return arg && arg._jsonata_lambda === true; + } + + // istanbul ignore next + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + // istanbul ignore next + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + + /** + * @param {Object} arg - expression to test + * @returns {boolean} - true if it is iterable + */ + function isIterable(arg) { + return ( + typeof arg === 'object' && + arg !== null && + iteratorSymbol in arg && + 'next' in arg && + typeof arg.next === 'function' + ); + } + + /** + * Compares two values for equality + * @param {*} lhs first value + * @param {*} rhs second value + * @returns {boolean} true if they are deep equal + */ + function isDeepEqual(lhs, rhs) { + if (lhs === rhs) { + return true; + } + if(typeof lhs === 'object' && typeof rhs === 'object' && lhs !== null && rhs !== null) { + if(Array.isArray(lhs) && Array.isArray(rhs)) { + // both arrays (or sequences) + // must be the same length + if(lhs.length !== rhs.length) { + return false; + } + // must contain same values in same order + for(var ii = 0; ii < lhs.length; ii++) { + if(!isDeepEqual(lhs[ii], rhs[ii])) { + return false; + } + } + return true; + } + // both objects + // must have the same set of keys (in any order) + var lkeys = Object.getOwnPropertyNames(lhs); + var rkeys = Object.getOwnPropertyNames(rhs); + if(lkeys.length !== rkeys.length) { + return false; + } + lkeys = lkeys.sort(); + rkeys = rkeys.sort(); + for(ii=0; ii < lkeys.length; ii++) { + if(lkeys[ii] !== rkeys[ii]) { + return false; + } + } + // must have the same values + for(ii=0; ii < lkeys.length; ii++) { + var key = lkeys[ii]; + if(!isDeepEqual(lhs[key], rhs[key])) { + return false; + } + } + return true; + } + return false; + } + + /** + * converts a string to an array of characters + * @param {string} str - the input string + * @returns {Array} - the array of characters + */ + function stringToArray(str) { + var arr = []; + for (let char of str) { + arr.push(char); + } + return arr; + } + + return { + isNumeric, + isArrayOfStrings, + isArrayOfNumbers, + createSequence, + isSequence, + isFunction, + isLambda, + isIterable, + getFunctionArity, + isDeepEqual, + stringToArray + }; +})(); + +module.exports = utils; + +},{}]},{},[3])(3) +}); + + +/***/ }), + +/***/ 9232: +/***/ ((module) => { + +"use strict"; +/* eslint-disable no-nested-ternary */ + +var arr = []; +var charCodeCache = []; + +module.exports = function (a, b) { + if (a === b) { + return 0; + } + + var swap = a; + + // Swapping the strings if `a` is longer than `b` so we know which one is the + // shortest & which one is the longest + if (a.length > b.length) { + a = b; + b = swap; + } + + var aLen = a.length; + var bLen = b.length; + + if (aLen === 0) { + return bLen; + } + + if (bLen === 0) { + return aLen; + } + + // Performing suffix trimming: + // We can linearly drop suffix common to both strings since they + // don't increase distance at all + // Note: `~-` is the bitwise way to perform a `- 1` operation + while (aLen > 0 && (a.charCodeAt(~-aLen) === b.charCodeAt(~-bLen))) { + aLen--; + bLen--; + } + + if (aLen === 0) { + return bLen; + } + + // Performing prefix trimming + // We can linearly drop prefix common to both strings since they + // don't increase distance at all + var start = 0; + + while (start < aLen && (a.charCodeAt(start) === b.charCodeAt(start))) { + start++; + } + + aLen -= start; + bLen -= start; + + if (aLen === 0) { + return bLen; + } + + var bCharCode; + var ret; + var tmp; + var tmp2; + var i = 0; + var j = 0; + + while (i < aLen) { + charCodeCache[start + i] = a.charCodeAt(start + i); + arr[i] = ++i; + } + + while (j < bLen) { + bCharCode = b.charCodeAt(start + j); + tmp = j++; + ret = j; + + for (i = 0; i < aLen; i++) { + tmp2 = bCharCode === charCodeCache[start + i] ? tmp : tmp + 1; + tmp = arr[i]; + ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2; + } + } + + return ret; +}; + + +/***/ }), + +/***/ 83973: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = __nccwpck_require__(85622) +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = __nccwpck_require__(33717) + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } + + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + + +/***/ }), + +/***/ 35871: +/***/ ((module) => { + +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {}, unknownFn: null }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } + + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + function setKey (obj, keys, value) { + var o = obj; + for (var i = 0; i < keys.length-1; i++) { + var key = keys[i]; + if (key === '__proto__') return; + if (o[key] === undefined) o[key] = {}; + if (o[key] === Object.prototype || o[key] === Number.prototype + || o[key] === String.prototype) o[key] = {}; + if (o[key] === Array.prototype) o[key] = []; + o = o[key]; + } + + var key = keys[keys.length - 1]; + if (key === '__proto__') return; + if (o === Object.prototype || o === Number.prototype + || o === String.prototype) o = {}; + if (o === Array.prototype) o = []; + if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } + } + + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + var key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== 'false'; + } + setArg(key, value, arg); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && !flags.allBools + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, next, arg); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next, arg) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { + setArg(letters[j], next.split('=')[1], arg); + broken = true; + break; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next, arg); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2), arg); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, args[i+1], arg); + i++; + } + else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { + setArg(key, args[i+1] === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + } + else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function(key) { + argv['--'].push(key); + }); + } + else { + notFlags.forEach(function(key) { + argv._.push(key); + }); + } + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + + + +/***/ }), + +/***/ 86035: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Buffer = __nccwpck_require__(21867).Buffer + +/* Protocol - protocol constants */ +var protocol = module.exports + +/* Command code => mnemonic */ +protocol.types = { + 0: 'reserved', + 1: 'connect', + 2: 'connack', + 3: 'publish', + 4: 'puback', + 5: 'pubrec', + 6: 'pubrel', + 7: 'pubcomp', + 8: 'subscribe', + 9: 'suback', + 10: 'unsubscribe', + 11: 'unsuback', + 12: 'pingreq', + 13: 'pingresp', + 14: 'disconnect', + 15: 'reserved' +} + +/* Mnemonic => Command code */ +protocol.codes = {} +for (var k in protocol.types) { + var v = protocol.types[k] + protocol.codes[v] = k +} + +/* Header */ +protocol.CMD_SHIFT = 4 +protocol.CMD_MASK = 0xF0 +protocol.DUP_MASK = 0x08 +protocol.QOS_MASK = 0x03 +protocol.QOS_SHIFT = 1 +protocol.RETAIN_MASK = 0x01 + +/* Length */ +protocol.LENGTH_MASK = 0x7F +protocol.LENGTH_FIN_MASK = 0x80 + +/* Connack */ +protocol.SESSIONPRESENT_MASK = 0x01 +protocol.SESSIONPRESENT_HEADER = Buffer.from([protocol.SESSIONPRESENT_MASK]) +protocol.CONNACK_HEADER = Buffer.from([protocol.codes['connack'] << protocol.CMD_SHIFT]) + +/* Connect */ +protocol.USERNAME_MASK = 0x80 +protocol.PASSWORD_MASK = 0x40 +protocol.WILL_RETAIN_MASK = 0x20 +protocol.WILL_QOS_MASK = 0x18 +protocol.WILL_QOS_SHIFT = 3 +protocol.WILL_FLAG_MASK = 0x04 +protocol.CLEAN_SESSION_MASK = 0x02 +protocol.CONNECT_HEADER = Buffer.from([protocol.codes['connect'] << protocol.CMD_SHIFT]) + +function genHeader (type) { + return [0, 1, 2].map(function (qos) { + return [0, 1].map(function (dup) { + return [0, 1].map(function (retain) { + var buf = new Buffer(1) + buf.writeUInt8( + protocol.codes[type] << protocol.CMD_SHIFT | + (dup ? protocol.DUP_MASK : 0) | + qos << protocol.QOS_SHIFT | retain, 0, true) + return buf + }) + }) + }) +} + +/* Publish */ +protocol.PUBLISH_HEADER = genHeader('publish') + +/* Subscribe */ +protocol.SUBSCRIBE_HEADER = genHeader('subscribe') + +/* Unsubscribe */ +protocol.UNSUBSCRIBE_HEADER = genHeader('unsubscribe') + +/* Confirmations */ +protocol.ACKS = { + unsuback: genHeader('unsuback'), + puback: genHeader('puback'), + pubcomp: genHeader('pubcomp'), + pubrel: genHeader('pubrel'), + pubrec: genHeader('pubrec') +} + +protocol.SUBACK_HEADER = Buffer.from([protocol.codes['suback'] << protocol.CMD_SHIFT]) + +/* Protocol versions */ +protocol.VERSION3 = Buffer.from([3]) +protocol.VERSION4 = Buffer.from([4]) + +/* QoS */ +protocol.QOS = [0, 1, 2].map(function (qos) { + return Buffer.from([qos]) +}) + +/* Empty packets */ +protocol.EMPTY = { + pingreq: Buffer.from([protocol.codes['pingreq'] << 4, 0]), + pingresp: Buffer.from([protocol.codes['pingresp'] << 4, 0]), + disconnect: Buffer.from([protocol.codes['disconnect'] << 4, 0]) +} + + +/***/ }), + +/***/ 37918: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Buffer = __nccwpck_require__(21867).Buffer +var writeToStream = __nccwpck_require__(97593) +var EE = __nccwpck_require__(28614).EventEmitter +var inherits = __nccwpck_require__(44124) + +function generate (packet) { + var stream = new Accumulator() + writeToStream(packet, stream) + return stream.concat() +} + +function Accumulator () { + this._array = new Array(20) + this._i = 0 +} + +inherits(Accumulator, EE) + +Accumulator.prototype.write = function (chunk) { + this._array[this._i++] = chunk + return true +} + +Accumulator.prototype.concat = function () { + var length = 0 + var lengths = new Array(this._array.length) + var list = this._array + var pos = 0 + var i + var result + + for (i = 0; i < list.length && list[i] !== undefined; i++) { + if (typeof list[i] !== 'string') lengths[i] = list[i].length + else lengths[i] = Buffer.byteLength(list[i]) + + length += lengths[i] + } + + result = Buffer.allocUnsafe(length) + + for (i = 0; i < list.length && list[i] !== undefined; i++) { + if (typeof list[i] !== 'string') { + list[i].copy(result, pos) + pos += lengths[i] + } else { + result.write(list[i], pos) + pos += lengths[i] + } + } + + return result +} + +module.exports = generate + + +/***/ }), + +/***/ 835: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +exports.parser = __nccwpck_require__(8564) +exports.generate = __nccwpck_require__(37918) +exports.writeToStream = __nccwpck_require__(97593) + + +/***/ }), + +/***/ 6716: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var DuplexStream = __nccwpck_require__(23874) + , util = __nccwpck_require__(31669) + , Buffer = __nccwpck_require__(21867).Buffer + + +function BufferList (callback) { + if (!(this instanceof BufferList)) + return new BufferList(callback) + + this._bufs = [] + this.length = 0 + + if (typeof callback == 'function') { + this._callback = callback + + var piper = function piper (err) { + if (this._callback) { + this._callback(err) + this._callback = null + } + }.bind(this) + + this.on('pipe', function onPipe (src) { + src.on('error', piper) + }) + this.on('unpipe', function onUnpipe (src) { + src.removeListener('error', piper) + }) + } else { + this.append(callback) + } + + DuplexStream.call(this) +} + + +util.inherits(BufferList, DuplexStream) + + +BufferList.prototype._offset = function _offset (offset) { + var tot = 0, i = 0, _t + if (offset === 0) return [ 0, 0 ] + for (; i < this._bufs.length; i++) { + _t = tot + this._bufs[i].length + if (offset < _t || i == this._bufs.length - 1) + return [ i, offset - tot ] + tot = _t + } +} + + +BufferList.prototype.append = function append (buf) { + var i = 0 + + if (Buffer.isBuffer(buf)) { + this._appendBuffer(buf); + } else if (Array.isArray(buf)) { + for (; i < buf.length; i++) + this.append(buf[i]) + } else if (buf instanceof BufferList) { + // unwrap argument into individual BufferLists + for (; i < buf._bufs.length; i++) + this.append(buf._bufs[i]) + } else if (buf != null) { + // coerce number arguments to strings, since Buffer(number) does + // uninitialized memory allocation + if (typeof buf == 'number') + buf = buf.toString() + + this._appendBuffer(Buffer.from(buf)); + } + + return this +} + + +BufferList.prototype._appendBuffer = function appendBuffer (buf) { + this._bufs.push(buf) + this.length += buf.length +} + + +BufferList.prototype._write = function _write (buf, encoding, callback) { + this._appendBuffer(buf) + + if (typeof callback == 'function') + callback() +} + + +BufferList.prototype._read = function _read (size) { + if (!this.length) + return this.push(null) + + size = Math.min(size, this.length) + this.push(this.slice(0, size)) + this.consume(size) +} + + +BufferList.prototype.end = function end (chunk) { + DuplexStream.prototype.end.call(this, chunk) + + if (this._callback) { + this._callback(null, this.slice()) + this._callback = null + } +} + + +BufferList.prototype.get = function get (index) { + return this.slice(index, index + 1)[0] +} + + +BufferList.prototype.slice = function slice (start, end) { + if (typeof start == 'number' && start < 0) + start += this.length + if (typeof end == 'number' && end < 0) + end += this.length + return this.copy(null, 0, start, end) +} + + +BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) { + if (typeof srcStart != 'number' || srcStart < 0) + srcStart = 0 + if (typeof srcEnd != 'number' || srcEnd > this.length) + srcEnd = this.length + if (srcStart >= this.length) + return dst || Buffer.alloc(0) + if (srcEnd <= 0) + return dst || Buffer.alloc(0) + + var copy = !!dst + , off = this._offset(srcStart) + , len = srcEnd - srcStart + , bytes = len + , bufoff = (copy && dstStart) || 0 + , start = off[1] + , l + , i + + // copy/slice everything + if (srcStart === 0 && srcEnd == this.length) { + if (!copy) { // slice, but full concat if multiple buffers + return this._bufs.length === 1 + ? this._bufs[0] + : Buffer.concat(this._bufs, this.length) + } + + // copy, need to copy individual buffers + for (i = 0; i < this._bufs.length; i++) { + this._bufs[i].copy(dst, bufoff) + bufoff += this._bufs[i].length + } + + return dst + } + + // easy, cheap case where it's a subset of one of the buffers + if (bytes <= this._bufs[off[0]].length - start) { + return copy + ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) + : this._bufs[off[0]].slice(start, start + bytes) + } + + if (!copy) // a slice, we need something to copy in to + dst = Buffer.allocUnsafe(len) + + for (i = off[0]; i < this._bufs.length; i++) { + l = this._bufs[i].length - start + + if (bytes > l) { + this._bufs[i].copy(dst, bufoff, start) + bufoff += l + } else { + this._bufs[i].copy(dst, bufoff, start, start + bytes) + bufoff += l + break + } + + bytes -= l + + if (start) + start = 0 + } + + // safeguard so that we don't return uninitialized memory + if (dst.length > bufoff) return dst.slice(0, bufoff) + + return dst +} + +BufferList.prototype.shallowSlice = function shallowSlice (start, end) { + start = start || 0 + end = end || this.length + + if (start < 0) + start += this.length + if (end < 0) + end += this.length + + var startOffset = this._offset(start) + , endOffset = this._offset(end) + , buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1) + + if (endOffset[1] == 0) + buffers.pop() + else + buffers[buffers.length-1] = buffers[buffers.length-1].slice(0, endOffset[1]) + + if (startOffset[1] != 0) + buffers[0] = buffers[0].slice(startOffset[1]) + + return new BufferList(buffers) +} + +BufferList.prototype.toString = function toString (encoding, start, end) { + return this.slice(start, end).toString(encoding) +} + +BufferList.prototype.consume = function consume (bytes) { + // first, normalize the argument, in accordance with how Buffer does it + bytes = Math.trunc(bytes) + // do nothing if not a positive number + if (Number.isNaN(bytes) || bytes <= 0) return this + + while (this._bufs.length) { + if (bytes >= this._bufs[0].length) { + bytes -= this._bufs[0].length + this.length -= this._bufs[0].length + this._bufs.shift() + } else { + this._bufs[0] = this._bufs[0].slice(bytes) + this.length -= bytes + break + } + } + return this +} + + +BufferList.prototype.duplicate = function duplicate () { + var i = 0 + , copy = new BufferList() + + for (; i < this._bufs.length; i++) + copy.append(this._bufs[i]) + + return copy +} + + +BufferList.prototype.destroy = function destroy () { + this._bufs.length = 0 + this.length = 0 + this.push(null) +} + + +;(function () { + var methods = { + 'readDoubleBE' : 8 + , 'readDoubleLE' : 8 + , 'readFloatBE' : 4 + , 'readFloatLE' : 4 + , 'readInt32BE' : 4 + , 'readInt32LE' : 4 + , 'readUInt32BE' : 4 + , 'readUInt32LE' : 4 + , 'readInt16BE' : 2 + , 'readInt16LE' : 2 + , 'readUInt16BE' : 2 + , 'readUInt16LE' : 2 + , 'readInt8' : 1 + , 'readUInt8' : 1 + } + + for (var m in methods) { + (function (m) { + BufferList.prototype[m] = function (offset) { + return this.slice(offset, offset + methods[m])[m](0) + } + }(m)) + } +}()) + + +module.exports = BufferList + + +/***/ }), + +/***/ 88653: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Buffer = __nccwpck_require__(21867).Buffer +var max = 65536 +var cache = {} + +function generateBuffer (i) { + var buffer = Buffer.allocUnsafe(2) + buffer.writeUInt8(i >> 8, 0) + buffer.writeUInt8(i & 0x00FF, 0 + 1) + + return buffer +} + +function generateCache () { + for (var i = 0; i < max; i++) { + cache[i] = generateBuffer(i) + } +} + +module.exports = { + cache: cache, + generateCache: generateCache, + generateNumber: generateBuffer +} + + +/***/ }), + +/***/ 25030: +/***/ ((module) => { + + +function Packet () { + this.cmd = null + this.retain = false + this.qos = 0 + this.dup = false + this.length = -1 + this.topic = null + this.payload = null +} + +module.exports = Packet + + +/***/ }), + +/***/ 8564: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var bl = __nccwpck_require__(6716) +var inherits = __nccwpck_require__(44124) +var EE = __nccwpck_require__(28614).EventEmitter +var Packet = __nccwpck_require__(25030) +var constants = __nccwpck_require__(86035) + +function Parser () { + if (!(this instanceof Parser)) return new Parser() + + this._states = [ + '_parseHeader', + '_parseLength', + '_parsePayload', + '_newPacket' + ] + + this._resetState() +} + +inherits(Parser, EE) + +Parser.prototype._resetState = function () { + this.packet = new Packet() + this.error = null + this._list = bl() + this._stateCounter = 0 +} + +Parser.prototype.parse = function (buf) { + if (this.error) this._resetState() + + this._list.append(buf) + + while ((this.packet.length !== -1 || this._list.length > 0) && + this[this._states[this._stateCounter]]() && + !this.error) { + this._stateCounter++ + + if (this._stateCounter >= this._states.length) this._stateCounter = 0 + } + + return this._list.length +} + +Parser.prototype._parseHeader = function () { + // There is at least one byte in the buffer + var zero = this._list.readUInt8(0) + this.packet.cmd = constants.types[zero >> constants.CMD_SHIFT] + this.packet.retain = (zero & constants.RETAIN_MASK) !== 0 + this.packet.qos = (zero >> constants.QOS_SHIFT) & constants.QOS_MASK + this.packet.dup = (zero & constants.DUP_MASK) !== 0 + + this._list.consume(1) + + return true +} + +Parser.prototype._parseLength = function () { + // There is at least one byte in the list + var bytes = 0 + var mul = 1 + var length = 0 + var result = true + var current + + while (bytes < 5) { + current = this._list.readUInt8(bytes++) + length += mul * (current & constants.LENGTH_MASK) + mul *= 0x80 + + if ((current & constants.LENGTH_FIN_MASK) === 0) break + if (this._list.length <= bytes) { + result = false + break + } + } + + if (result) { + this.packet.length = length + this._list.consume(bytes) + } + + return result +} + +Parser.prototype._parsePayload = function () { + var result = false + + // Do we have a payload? Do we have enough data to complete the payload? + // PINGs have no payload + if (this.packet.length === 0 || this._list.length >= this.packet.length) { + this._pos = 0 + + switch (this.packet.cmd) { + case 'connect': + this._parseConnect() + break + case 'connack': + this._parseConnack() + break + case 'publish': + this._parsePublish() + break + case 'puback': + case 'pubrec': + case 'pubrel': + case 'pubcomp': + this._parseMessageId() + break + case 'subscribe': + this._parseSubscribe() + break + case 'suback': + this._parseSuback() + break + case 'unsubscribe': + this._parseUnsubscribe() + break + case 'unsuback': + this._parseUnsuback() + break + case 'pingreq': + case 'pingresp': + case 'disconnect': + // These are empty, nothing to do + break + default: + this._emitError(new Error('Not supported')) + } + + result = true + } + + return result +} + +Parser.prototype._parseConnect = function () { + var protocolId // Protocol ID + var clientId // Client ID + var topic // Will topic + var payload // Will payload + var password // Password + var username // Username + var flags = {} + var packet = this.packet + + // Parse protocolId + protocolId = this._parseString() + + if (protocolId === null) return this._emitError(new Error('Cannot parse protocolId')) + if (protocolId !== 'MQTT' && protocolId !== 'MQIsdp') { + return this._emitError(new Error('Invalid protocolId')) + } + + packet.protocolId = protocolId + + // Parse constants version number + if (this._pos >= this._list.length) return this._emitError(new Error('Packet too short')) + + packet.protocolVersion = this._list.readUInt8(this._pos) + + if (packet.protocolVersion !== 3 && packet.protocolVersion !== 4) { + return this._emitError(new Error('Invalid protocol version')) + } + + this._pos++ + + if (this._pos >= this._list.length) { + return this._emitError(new Error('Packet too short')) + } + + // Parse connect flags + flags.username = (this._list.readUInt8(this._pos) & constants.USERNAME_MASK) + flags.password = (this._list.readUInt8(this._pos) & constants.PASSWORD_MASK) + flags.will = (this._list.readUInt8(this._pos) & constants.WILL_FLAG_MASK) + + if (flags.will) { + packet.will = {} + packet.will.retain = (this._list.readUInt8(this._pos) & constants.WILL_RETAIN_MASK) !== 0 + packet.will.qos = (this._list.readUInt8(this._pos) & + constants.WILL_QOS_MASK) >> constants.WILL_QOS_SHIFT + } + + packet.clean = (this._list.readUInt8(this._pos) & constants.CLEAN_SESSION_MASK) !== 0 + this._pos++ + + // Parse keepalive + packet.keepalive = this._parseNum() + if (packet.keepalive === -1) return this._emitError(new Error('Packet too short')) + + // Parse clientId + clientId = this._parseString() + if (clientId === null) return this._emitError(new Error('Packet too short')) + packet.clientId = clientId + + if (flags.will) { + // Parse will topic + topic = this._parseString() + if (topic === null) return this._emitError(new Error('Cannot parse will topic')) + packet.will.topic = topic + + // Parse will payload + payload = this._parseBuffer() + if (payload === null) return this._emitError(new Error('Cannot parse will payload')) + packet.will.payload = payload + } + + // Parse username + if (flags.username) { + username = this._parseString() + if (username === null) return this._emitError(new Error('Cannot parse username')) + packet.username = username + } + + // Parse password + if (flags.password) { + password = this._parseBuffer() + if (password === null) return this._emitError(new Error('Cannot parse password')) + packet.password = password + } + + return packet +} + +Parser.prototype._parseConnack = function () { + var packet = this.packet + + if (this._list.length < 2) return null + + packet.sessionPresent = !!(this._list.readUInt8(this._pos++) & constants.SESSIONPRESENT_MASK) + packet.returnCode = this._list.readUInt8(this._pos) + + if (packet.returnCode === -1) return this._emitError(new Error('Cannot parse return code')) +} + +Parser.prototype._parsePublish = function () { + var packet = this.packet + packet.topic = this._parseString() + + if (packet.topic === null) return this._emitError(new Error('Cannot parse topic')) + + // Parse messageId + if (packet.qos > 0) if (!this._parseMessageId()) { return } + + packet.payload = this._list.slice(this._pos, packet.length) +} + +Parser.prototype._parseSubscribe = function () { + var packet = this.packet + var topic + var qos + + if (packet.qos !== 1) { + return this._emitError(new Error('Wrong subscribe header')) + } + + packet.subscriptions = [] + + if (!this._parseMessageId()) { return } + + while (this._pos < packet.length) { + // Parse topic + topic = this._parseString() + if (topic === null) return this._emitError(new Error('Cannot parse topic')) + + if (this._pos >= packet.length) return this._emitError(new Error('Malformed Subscribe Payload')) + qos = this._list.readUInt8(this._pos++) + + // Push pair to subscriptions + packet.subscriptions.push({ topic: topic, qos: qos }) + } +} + +Parser.prototype._parseSuback = function () { + this.packet.granted = [] + + if (!this._parseMessageId()) { return } + + // Parse granted QoSes + while (this._pos < this.packet.length) { + this.packet.granted.push(this._list.readUInt8(this._pos++)) + } +} + +Parser.prototype._parseUnsubscribe = function () { + var packet = this.packet + + packet.unsubscriptions = [] + + // Parse messageId + if (!this._parseMessageId()) { return } + + while (this._pos < packet.length) { + var topic + + // Parse topic + topic = this._parseString() + if (topic === null) return this._emitError(new Error('Cannot parse topic')) + + // Push topic to unsubscriptions + packet.unsubscriptions.push(topic) + } +} + +Parser.prototype._parseUnsuback = function () { + if (!this._parseMessageId()) return this._emitError(new Error('Cannot parse messageId')) +} + +Parser.prototype._parseMessageId = function () { + var packet = this.packet + + packet.messageId = this._parseNum() + + if (packet.messageId === null) { + this._emitError(new Error('Cannot parse messageId')) + return false + } + + return true +} + +Parser.prototype._parseString = function (maybeBuffer) { + var length = this._parseNum() + var result + var end = length + this._pos + + if (length === -1 || end > this._list.length || end > this.packet.length) return null + + result = this._list.toString('utf8', this._pos, end) + this._pos += length + + return result +} + +Parser.prototype._parseBuffer = function () { + var length = this._parseNum() + var result + var end = length + this._pos + + if (length === -1 || end > this._list.length || end > this.packet.length) return null + + result = this._list.slice(this._pos, end) + + this._pos += length + + return result +} + +Parser.prototype._parseNum = function () { + if (this._list.length - this._pos < 2) return -1 + + var result = this._list.readUInt16BE(this._pos) + this._pos += 2 + + return result +} + +Parser.prototype._newPacket = function () { + if (this.packet) { + this._list.consume(this.packet.length) + this.emit('packet', this.packet) + } + + this.packet = new Packet() + + return true +} + +Parser.prototype._emitError = function (err) { + this.error = err + this.emit('error', err) +} + +module.exports = Parser + + +/***/ }), + +/***/ 97593: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var protocol = __nccwpck_require__(86035) +var Buffer = __nccwpck_require__(21867).Buffer +var empty = Buffer.allocUnsafe(0) +var zeroBuf = Buffer.from([0]) +var numbers = __nccwpck_require__(88653) +var nextTick = __nccwpck_require__(77714).nextTick + +var numCache = numbers.cache +var generateNumber = numbers.generateNumber +var generateCache = numbers.generateCache +var writeNumber = writeNumberCached +var toGenerate = true + +function generate (packet, stream) { + if (stream.cork) { + stream.cork() + nextTick(uncork, stream) + } + + if (toGenerate) { + toGenerate = false + generateCache() + } + + switch (packet.cmd) { + case 'connect': + return connect(packet, stream) + case 'connack': + return connack(packet, stream) + case 'publish': + return publish(packet, stream) + case 'puback': + case 'pubrec': + case 'pubrel': + case 'pubcomp': + case 'unsuback': + return confirmation(packet, stream) + case 'subscribe': + return subscribe(packet, stream) + case 'suback': + return suback(packet, stream) + case 'unsubscribe': + return unsubscribe(packet, stream) + case 'pingreq': + case 'pingresp': + case 'disconnect': + return emptyPacket(packet, stream) + default: + stream.emit('error', new Error('Unknown command')) + return false + } +} +/** + * Controls numbers cache. + * Set to "false" to allocate buffers on-the-flight instead of pre-generated cache + */ +Object.defineProperty(generate, 'cacheNumbers', { + get: function () { + return writeNumber === writeNumberCached + }, + set: function (value) { + if (value) { + if (!numCache || Object.keys(numCache).length === 0) toGenerate = true + writeNumber = writeNumberCached + } else { + toGenerate = false + writeNumber = writeNumberGenerated + } + } +}) + +function uncork (stream) { + stream.uncork() +} + +function connect (opts, stream) { + var settings = opts || {} + var protocolId = settings.protocolId || 'MQTT' + var protocolVersion = settings.protocolVersion || 4 + var will = settings.will + var clean = settings.clean + var keepalive = settings.keepalive || 0 + var clientId = settings.clientId || '' + var username = settings.username + var password = settings.password + + if (clean === undefined) clean = true + + var length = 0 + + // Must be a string and non-falsy + if (!protocolId || + (typeof protocolId !== 'string' && !Buffer.isBuffer(protocolId))) { + stream.emit('error', new Error('Invalid protocolId')) + return false + } else length += protocolId.length + 2 + + // Must be 3 or 4 + if (protocolVersion !== 3 && protocolVersion !== 4) { + stream.emit('error', new Error('Invalid protocol version')) + return false + } else length += 1 + + // ClientId might be omitted in 3.1.1, but only if cleanSession is set to 1 + if ((typeof clientId === 'string' || Buffer.isBuffer(clientId)) && + (clientId || protocolVersion === 4) && (clientId || clean)) { + length += clientId.length + 2 + } else { + if (protocolVersion < 4) { + stream.emit('error', new Error('clientId must be supplied before 3.1.1')) + return false + } + if ((clean * 1) === 0) { + stream.emit('error', new Error('clientId must be given if cleanSession set to 0')) + return false + } + } + + // Must be a two byte number + if (typeof keepalive !== 'number' || + keepalive < 0 || + keepalive > 65535 || + keepalive % 1 !== 0) { + stream.emit('error', new Error('Invalid keepalive')) + return false + } else length += 2 + + // Connect flags + length += 1 + + // If will exists... + if (will) { + // It must be an object + if (typeof will !== 'object') { + stream.emit('error', new Error('Invalid will')) + return false + } + // It must have topic typeof string + if (!will.topic || typeof will.topic !== 'string') { + stream.emit('error', new Error('Invalid will topic')) + return false + } else { + length += Buffer.byteLength(will.topic) + 2 + } + + // Payload + if (will.payload && will.payload) { + if (will.payload.length >= 0) { + if (typeof will.payload === 'string') { + length += Buffer.byteLength(will.payload) + 2 + } else { + length += will.payload.length + 2 + } + } else { + stream.emit('error', new Error('Invalid will payload')) + return false + } + } else { + length += 2 + } + } + + // Username + var providedUsername = false + if (username != null) { + if (isStringOrBuffer(username)) { + providedUsername = true + length += Buffer.byteLength(username) + 2 + } else { + stream.emit('error', new Error('Invalid username')) + return false + } + } + + // Password + if (password != null) { + if (!providedUsername) { + stream.emit('error', new Error('Username is required to use password')) + return false + } + + if (isStringOrBuffer(password)) { + length += byteLength(password) + 2 + } else { + stream.emit('error', new Error('Invalid password')) + return false + } + } + + // Generate header + stream.write(protocol.CONNECT_HEADER) + + // Generate length + writeLength(stream, length) + + // Generate protocol ID + writeStringOrBuffer(stream, protocolId) + stream.write( + protocolVersion === 4 ? protocol.VERSION4 : protocol.VERSION3 + ) + + // Connect flags + var flags = 0 + flags |= (username != null) ? protocol.USERNAME_MASK : 0 + flags |= (password != null) ? protocol.PASSWORD_MASK : 0 + flags |= (will && will.retain) ? protocol.WILL_RETAIN_MASK : 0 + flags |= (will && will.qos) ? will.qos << protocol.WILL_QOS_SHIFT : 0 + flags |= will ? protocol.WILL_FLAG_MASK : 0 + flags |= clean ? protocol.CLEAN_SESSION_MASK : 0 + + stream.write(Buffer.from([flags])) + + // Keepalive + writeNumber(stream, keepalive) + + // Client ID + writeStringOrBuffer(stream, clientId) + + // Will + if (will) { + writeString(stream, will.topic) + writeStringOrBuffer(stream, will.payload) + } + + // Username and password + if (username != null) { + writeStringOrBuffer(stream, username) + } + if (password != null) { + writeStringOrBuffer(stream, password) + } + // This is a small packet that happens only once on a stream + // We assume the stream is always free to receive more data after this + return true +} + +function connack (opts, stream) { + var settings = opts || {} + var rc = settings.returnCode + + // Check return code + if (typeof rc !== 'number') { + stream.emit('error', new Error('Invalid return code')) + return false + } + + stream.write(protocol.CONNACK_HEADER) + writeLength(stream, 2) + stream.write(opts.sessionPresent ? protocol.SESSIONPRESENT_HEADER : zeroBuf) + + return stream.write(Buffer.from([rc])) +} + +function publish (opts, stream) { + var settings = opts || {} + var qos = settings.qos || 0 + var retain = settings.retain ? protocol.RETAIN_MASK : 0 + var topic = settings.topic + var payload = settings.payload || empty + var id = settings.messageId + + var length = 0 + + // Topic must be a non-empty string or Buffer + if (typeof topic === 'string') length += Buffer.byteLength(topic) + 2 + else if (Buffer.isBuffer(topic)) length += topic.length + 2 + else { + stream.emit('error', new Error('Invalid topic')) + return false + } + + // Get the payload length + if (!Buffer.isBuffer(payload)) length += Buffer.byteLength(payload) + else length += payload.length + + // Message ID must a number if qos > 0 + if (qos && typeof id !== 'number') { + stream.emit('error', new Error('Invalid messageId')) + return false + } else if (qos) length += 2 + + // Header + stream.write(protocol.PUBLISH_HEADER[qos][opts.dup ? 1 : 0][retain ? 1 : 0]) + + // Remaining length + writeLength(stream, length) + + // Topic + writeNumber(stream, byteLength(topic)) + stream.write(topic) + + // Message ID + if (qos > 0) writeNumber(stream, id) + + // Payload + return stream.write(payload) +} + +/* Puback, pubrec, pubrel and pubcomp */ +function confirmation (opts, stream) { + var settings = opts || {} + var type = settings.cmd || 'puback' + var id = settings.messageId + var dup = (settings.dup && type === 'pubrel') ? protocol.DUP_MASK : 0 + var qos = 0 + + if (type === 'pubrel') qos = 1 + + // Check message ID + if (typeof id !== 'number') { + stream.emit('error', new Error('Invalid messageId')) + return false + } + + // Header + stream.write(protocol.ACKS[type][qos][dup][0]) + + // Length + writeLength(stream, 2) + + // Message ID + return writeNumber(stream, id) +} + +function subscribe (opts, stream) { + var settings = opts || {} + var dup = settings.dup ? protocol.DUP_MASK : 0 + var id = settings.messageId + var subs = settings.subscriptions + + var length = 0 + + // Check message ID + if (typeof id !== 'number') { + stream.emit('error', new Error('Invalid messageId')) + return false + } else length += 2 + + // Check subscriptions + if (typeof subs === 'object' && subs.length) { + for (var i = 0; i < subs.length; i += 1) { + var itopic = subs[i].topic + var iqos = subs[i].qos + + if (typeof itopic !== 'string') { + stream.emit('error', new Error('Invalid subscriptions - invalid topic')) + return false + } + if (typeof iqos !== 'number') { + stream.emit('error', new Error('Invalid subscriptions - invalid qos')) + return false + } + + length += Buffer.byteLength(itopic) + 2 + 1 + } + } else { + stream.emit('error', new Error('Invalid subscriptions')) + return false + } + + // Generate header + stream.write(protocol.SUBSCRIBE_HEADER[1][dup ? 1 : 0][0]) + + // Generate length + writeLength(stream, length) + + // Generate message ID + writeNumber(stream, id) + + var result = true + + // Generate subs + for (var j = 0; j < subs.length; j++) { + var sub = subs[j] + var jtopic = sub.topic + var jqos = sub.qos + + // Write topic string + writeString(stream, jtopic) + + // Write qos + result = stream.write(protocol.QOS[jqos]) + } + + return result +} + +function suback (opts, stream) { + var settings = opts || {} + var id = settings.messageId + var granted = settings.granted + + var length = 0 + + // Check message ID + if (typeof id !== 'number') { + stream.emit('error', new Error('Invalid messageId')) + return false + } else length += 2 + + // Check granted qos vector + if (typeof granted === 'object' && granted.length) { + for (var i = 0; i < granted.length; i += 1) { + if (typeof granted[i] !== 'number') { + stream.emit('error', new Error('Invalid qos vector')) + return false + } + length += 1 + } + } else { + stream.emit('error', new Error('Invalid qos vector')) + return false + } + + // header + stream.write(protocol.SUBACK_HEADER) + + // Length + writeLength(stream, length) + + // Message ID + writeNumber(stream, id) + + return stream.write(Buffer.from(granted)) +} + +function unsubscribe (opts, stream) { + var settings = opts || {} + var id = settings.messageId + var dup = settings.dup ? protocol.DUP_MASK : 0 + var unsubs = settings.unsubscriptions + + var length = 0 + + // Check message ID + if (typeof id !== 'number') { + stream.emit('error', new Error('Invalid messageId')) + return false + } else { + length += 2 + } + // Check unsubs + if (typeof unsubs === 'object' && unsubs.length) { + for (var i = 0; i < unsubs.length; i += 1) { + if (typeof unsubs[i] !== 'string') { + stream.emit('error', new Error('Invalid unsubscriptions')) + return false + } + length += Buffer.byteLength(unsubs[i]) + 2 + } + } else { + stream.emit('error', new Error('Invalid unsubscriptions')) + return false + } + + // Header + stream.write(protocol.UNSUBSCRIBE_HEADER[1][dup ? 1 : 0][0]) + + // Length + writeLength(stream, length) + + // Message ID + writeNumber(stream, id) + + // Unsubs + var result = true + for (var j = 0; j < unsubs.length; j++) { + result = writeString(stream, unsubs[j]) + } + + return result +} + +function emptyPacket (opts, stream) { + return stream.write(protocol.EMPTY[opts.cmd]) +} + +/** + * calcLengthLength - calculate the length of the remaining + * length field + * + * @api private + */ +function calcLengthLength (length) { + if (length >= 0 && length < 128) return 1 + else if (length >= 128 && length < 16384) return 2 + else if (length >= 16384 && length < 2097152) return 3 + else if (length >= 2097152 && length < 268435456) return 4 + else return 0 +} + +function genBufLength (length) { + var digit = 0 + var pos = 0 + var buffer = Buffer.allocUnsafe(calcLengthLength(length)) + + do { + digit = length % 128 | 0 + length = length / 128 | 0 + if (length > 0) digit = digit | 0x80 + + buffer.writeUInt8(digit, pos++) + } while (length > 0) + + return buffer +} + +/** + * writeLength - write an MQTT style length field to the buffer + * + * @param buffer - destination + * @param pos - offset + * @param length - length (>0) + * @returns number of bytes written + * + * @api private + */ + +var lengthCache = {} +function writeLength (stream, length) { + var buffer = lengthCache[length] + + if (!buffer) { + buffer = genBufLength(length) + if (length < 16384) lengthCache[length] = buffer + } + + stream.write(buffer) +} + +/** + * writeString - write a utf8 string to the buffer + * + * @param buffer - destination + * @param pos - offset + * @param string - string to write + * @return number of bytes written + * + * @api private + */ + +function writeString (stream, string) { + var strlen = Buffer.byteLength(string) + writeNumber(stream, strlen) + + stream.write(string, 'utf8') +} + +/** + * writeNumber - write a two byte number to the buffer + * + * @param buffer - destination + * @param pos - offset + * @param number - number to write + * @return number of bytes written + * + * @api private + */ +function writeNumberCached (stream, number) { + return stream.write(numCache[number]) +} +function writeNumberGenerated (stream, number) { + return stream.write(generateNumber(number)) +} + +/** + * writeStringOrBuffer - write a String or Buffer with the its length prefix + * + * @param buffer - destination + * @param pos - offset + * @param toWrite - String or Buffer + * @return number of bytes written + */ +function writeStringOrBuffer (stream, toWrite) { + if (typeof toWrite === 'string') { + writeString(stream, toWrite) + } else if (toWrite) { + writeNumber(stream, toWrite.length) + stream.write(toWrite) + } else writeNumber(stream, 0) +} + +function byteLength (bufOrString) { + if (!bufOrString) return 0 + else if (bufOrString instanceof Buffer) return bufOrString.length + else return Buffer.byteLength(bufOrString) +} + +function isStringOrBuffer (field) { + return typeof field === 'string' || field instanceof Buffer +} + +module.exports = generate + + +/***/ }), + +/***/ 10071: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + + +var mqtt = __nccwpck_require__(38017) +var pump = __nccwpck_require__(18341) +var path = __nccwpck_require__(85622) +var fs = __nccwpck_require__(35747) +var concat = __nccwpck_require__(25107) +var Writable = __nccwpck_require__(51642).Writable +var helpMe = __nccwpck_require__(91609)({ + dir: __nccwpck_require__.ab + "doc" +}) +var minimist = __nccwpck_require__(35871) +var split2 = __nccwpck_require__(15000) + +function send (args) { + var client = mqtt.connect(args) + client.on('connect', function () { + client.publish(args.topic, args.message, args, function (err) { + if (err) { + console.warn(err) + } + client.end() + }) + }) + client.on('error', function (err) { + console.warn(err) + client.end() + }) +} + +function multisend (args) { + var client = mqtt.connect(args) + var sender = new Writable({ + objectMode: true + }) + sender._write = function (line, enc, cb) { + client.publish(args.topic, line.trim(), args, cb) + } + + client.on('connect', function () { + pump(process.stdin, split2(), sender, function (err) { + client.end() + if (err) { + throw err + } + }) + }) +} + +function start (args) { + args = minimist(args, { + string: ['hostname', 'username', 'password', 'key', 'cert', 'ca', 'message', 'clientId', 'i', 'id'], + boolean: ['stdin', 'retain', 'help', 'insecure', 'multiline'], + alias: { + port: 'p', + hostname: ['h', 'host'], + topic: 't', + message: 'm', + qos: 'q', + clientId: ['i', 'id'], + retain: 'r', + username: 'u', + password: 'P', + stdin: 's', + multiline: 'M', + protocol: ['C', 'l'], + help: 'H', + ca: 'cafile' + }, + default: { + host: 'localhost', + qos: 0, + retain: false, + topic: '', + message: '' + } + }) + + if (args.help) { + return helpMe.toStdout('publish') + } + + if (args.key) { + args.key = fs.readFileSync(args.key) + } + + if (args.cert) { + args.cert = fs.readFileSync(args.cert) + } + + if (args.ca) { + args.ca = fs.readFileSync(args.ca) + } + + if (args.key && args.cert && !args.protocol) { + args.protocol = 'mqtts' + } + + if (args.port) { + if (typeof args.port !== 'number') { + console.warn('# Port: number expected, \'%s\' was given.', typeof args.port) + return + } + } + + if (args['will-topic']) { + args.will = {} + args.will.topic = args['will-topic'] + args.will.payload = args['will-message'] + args.will.qos = args['will-qos'] + args.will.retain = args['will-retain'] + } + + if (args.insecure) { + args.rejectUnauthorized = false + } + + args.topic = (args.topic || args._.shift()).toString() + args.message = (args.message || args._.shift()).toString() + + if (!args.topic) { + console.error('missing topic\n') + return helpMe.toStdout('publish') + } + + if (args.stdin) { + if (args.multiline) { + multisend(args) + } else { + process.stdin.pipe(concat(function (data) { + args.message = data + send(args) + })) + } + } else { + send(args) + } +} + +module.exports = start + +if (false) {} + + +/***/ }), + +/***/ 31769: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +var mqtt = __nccwpck_require__(38017) +var path = __nccwpck_require__(85622) +var fs = __nccwpck_require__(35747) +var helpMe = __nccwpck_require__(91609)({ + dir: __nccwpck_require__.ab + "doc" +}) +var minimist = __nccwpck_require__(35871) + +function start (args) { + args = minimist(args, { + string: ['hostname', 'username', 'password', 'key', 'cert', 'ca', 'clientId', 'i', 'id'], + boolean: ['stdin', 'help', 'clean', 'insecure'], + alias: { + port: 'p', + hostname: ['h', 'host'], + topic: 't', + qos: 'q', + clean: 'c', + keepalive: 'k', + clientId: ['i', 'id'], + username: 'u', + password: 'P', + protocol: ['C', 'l'], + verbose: 'v', + help: '-H', + ca: 'cafile' + }, + default: { + host: 'localhost', + qos: 0, + retain: false, + clean: true, + keepAlive: 30 // 30 sec + } + }) + + if (args.help) { + return helpMe.toStdout('subscribe') + } + + args.topic = args.topic || args._.shift() + + if (!args.topic) { + console.error('missing topic\n') + return helpMe.toStdout('subscribe') + } + + if (args.key) { + args.key = fs.readFileSync(args.key) + } + + if (args.cert) { + args.cert = fs.readFileSync(args.cert) + } + + if (args.ca) { + args.ca = fs.readFileSync(args.ca) + } + + if (args.key && args.cert && !args.protocol) { + args.protocol = 'mqtts' + } + + if (args.insecure) { + args.rejectUnauthorized = false + } + + if (args.port) { + if (typeof args.port !== 'number') { + console.warn('# Port: number expected, \'%s\' was given.', typeof args.port) + return + } + } + + if (args['will-topic']) { + args.will = {} + args.will.topic = args['will-topic'] + args.will.payload = args['will-message'] + args.will.qos = args['will-qos'] + args.will.retain = args['will-retain'] + } + + args.keepAlive = args['keep-alive'] + + var client = mqtt.connect(args) + + client.on('connect', function () { + client.subscribe(args.topic, { qos: args.qos }, function (err, result) { + if (err) { + console.error(err) + process.exit(1) + } + + result.forEach(function (sub) { + if (sub.qos > 2) { + console.error('subscription negated to', sub.topic, 'with code', sub.qos) + process.exit(1) + } + }) + }) + }) + + client.on('message', function (topic, payload) { + if (args.verbose) { + console.log(topic, payload.toString()) + } else { + console.log(payload.toString()) + } + }) + + client.on('error', function (err) { + console.warn(err) + client.end() + }) +} + +module.exports = start + +if (false) {} + + +/***/ }), + +/***/ 85823: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/** + * Module dependencies + */ +var events = __nccwpck_require__(28614) +var Store = __nccwpck_require__(95498) +var eos = __nccwpck_require__(88434) +var mqttPacket = __nccwpck_require__(835) +var Writable = __nccwpck_require__(51642).Writable +var inherits = __nccwpck_require__(44124) +var reInterval = __nccwpck_require__(68045) +var validations = __nccwpck_require__(19465) +var xtend = __nccwpck_require__(91208) +var setImmediate = global.setImmediate || function (callback) { + // works in node v0.8 + process.nextTick(callback) +} +var defaultConnectOptions = { + keepalive: 60, + reschedulePings: true, + protocolId: 'MQTT', + protocolVersion: 4, + reconnectPeriod: 1000, + connectTimeout: 30 * 1000, + clean: true, + resubscribe: true +} + +function defaultId () { + return 'mqttjs_' + Math.random().toString(16).substr(2, 8) +} + +function sendPacket (client, packet, cb) { + client.emit('packetsend', packet) + + var result = mqttPacket.writeToStream(packet, client.stream) + + if (!result && cb) { + client.stream.once('drain', cb) + } else if (cb) { + cb() + } +} + +function flush (queue) { + if (queue) { + Object.keys(queue).forEach(function (messageId) { + if (typeof queue[messageId] === 'function') { + queue[messageId](new Error('Connection closed')) + delete queue[messageId] + } + }) + } +} + +function storeAndSend (client, packet, cb) { + client.outgoingStore.put(packet, function storedPacket (err) { + if (err) { + return cb && cb(err) + } + sendPacket(client, packet, cb) + }) +} + +function nop () {} + +/** + * MqttClient constructor + * + * @param {Stream} stream - stream + * @param {Object} [options] - connection options + * (see Connection#connect) + */ +function MqttClient (streamBuilder, options) { + var k + var that = this + + if (!(this instanceof MqttClient)) { + return new MqttClient(streamBuilder, options) + } + + this.options = options || {} + + // Defaults + for (k in defaultConnectOptions) { + if (typeof this.options[k] === 'undefined') { + this.options[k] = defaultConnectOptions[k] + } else { + this.options[k] = options[k] + } + } + + this.options.clientId = (typeof this.options.clientId === 'string') ? this.options.clientId : defaultId() + + this.streamBuilder = streamBuilder + + // Inflight message storages + this.outgoingStore = this.options.outgoingStore || new Store() + this.incomingStore = this.options.incomingStore || new Store() + + // Should QoS zero messages be queued when the connection is broken? + this.queueQoSZero = this.options.queueQoSZero === undefined ? true : this.options.queueQoSZero + + // map of subscribed topics to support reconnection + this._resubscribeTopics = {} + + // map of a subscribe messageId and a topic + this.messageIdToTopic = {} + + // Ping timer, setup in _setupPingTimer + this.pingTimer = null + // Is the client connected? + this.connected = false + // Are we disconnecting? + this.disconnecting = false + // Packet queue + this.queue = [] + // connack timer + this.connackTimer = null + // Reconnect timer + this.reconnectTimer = null + /** + * MessageIDs starting with 1 + * ensure that nextId is min. 1, see https://github.com/mqttjs/MQTT.js/issues/810 + */ + this.nextId = Math.max(1, Math.floor(Math.random() * 65535)) + + // Inflight callbacks + this.outgoing = {} + + // Mark connected on connect + this.on('connect', function () { + if (this.disconnected) { + return + } + + this.connected = true + var outStore = this.outgoingStore.createStream() + + this.once('close', remove) + outStore.on('end', function () { + that.removeListener('close', remove) + }) + outStore.on('error', function (err) { + that.removeListener('close', remove) + that.emit('error', err) + }) + + function remove () { + outStore.destroy() + outStore = null + } + + function storeDeliver () { + // edge case, we wrapped this twice + if (!outStore) { + return + } + + var packet = outStore.read(1) + var cb + + if (!packet) { + // read when data is available in the future + outStore.once('readable', storeDeliver) + return + } + + // Avoid unnecessary stream read operations when disconnected + if (!that.disconnecting && !that.reconnectTimer) { + cb = that.outgoing[packet.messageId] + that.outgoing[packet.messageId] = function (err, status) { + // Ensure that the original callback passed in to publish gets invoked + if (cb) { + cb(err, status) + } + + storeDeliver() + } + that._sendPacket(packet) + } else if (outStore.destroy) { + outStore.destroy() + } + } + + // start flowing + storeDeliver() + }) + + // Mark disconnected on stream close + this.on('close', function () { + this.connected = false + clearTimeout(this.connackTimer) + }) + + // Setup ping timer + this.on('connect', this._setupPingTimer) + + // Send queued packets + this.on('connect', function () { + var queue = this.queue + + function deliver () { + var entry = queue.shift() + var packet = null + + if (!entry) { + return + } + + packet = entry.packet + + that._sendPacket( + packet, + function (err) { + if (entry.cb) { + entry.cb(err) + } + deliver() + } + ) + } + + deliver() + }) + + var firstConnection = true + // resubscribe + this.on('connect', function () { + if (!firstConnection && + this.options.clean && + Object.keys(this._resubscribeTopics).length > 0) { + if (this.options.resubscribe) { + this._resubscribeTopics.resubscribe = true + this.subscribe(this._resubscribeTopics) + } else { + this._resubscribeTopics = {} + } + } + + firstConnection = false + }) + + // Clear ping timer + this.on('close', function () { + if (that.pingTimer !== null) { + that.pingTimer.clear() + that.pingTimer = null + } + }) + + // Setup reconnect timer on disconnect + this.on('close', this._setupReconnect) + + events.EventEmitter.call(this) + + this._setupStream() +} +inherits(MqttClient, events.EventEmitter) + +/** + * setup the event handlers in the inner stream. + * + * @api private + */ +MqttClient.prototype._setupStream = function () { + var connectPacket + var that = this + var writable = new Writable() + var parser = mqttPacket.parser(this.options) + var completeParse = null + var packets = [] + + this._clearReconnect() + + this.stream = this.streamBuilder(this) + + parser.on('packet', function (packet) { + packets.push(packet) + }) + + function nextTickWork () { + process.nextTick(work) + } + + function work () { + var packet = packets.shift() + var done = completeParse + + if (packet) { + that._handlePacket(packet, nextTickWork) + } else { + completeParse = null + done() + } + } + + writable._write = function (buf, enc, done) { + completeParse = done + parser.parse(buf) + work() + } + + this.stream.pipe(writable) + + // Suppress connection errors + this.stream.on('error', nop) + + // Echo stream close + eos(this.stream, this.emit.bind(this, 'close')) + + // Send a connect packet + connectPacket = Object.create(this.options) + connectPacket.cmd = 'connect' + // avoid message queue + sendPacket(this, connectPacket) + + // Echo connection errors + parser.on('error', this.emit.bind(this, 'error')) + + // many drain listeners are needed for qos 1 callbacks if the connection is intermittent + this.stream.setMaxListeners(1000) + + clearTimeout(this.connackTimer) + this.connackTimer = setTimeout(function () { + that._cleanUp(true) + }, this.options.connectTimeout) +} + +MqttClient.prototype._handlePacket = function (packet, done) { + this.emit('packetreceive', packet) + + switch (packet.cmd) { + case 'publish': + this._handlePublish(packet, done) + break + case 'puback': + case 'pubrec': + case 'pubcomp': + case 'suback': + case 'unsuback': + this._handleAck(packet) + done() + break + case 'pubrel': + this._handlePubrel(packet, done) + break + case 'connack': + this._handleConnack(packet) + done() + break + case 'pingresp': + this._handlePingresp(packet) + done() + break + default: + // do nothing + // maybe we should do an error handling + // or just log it + break + } +} + +MqttClient.prototype._checkDisconnecting = function (callback) { + if (this.disconnecting) { + if (callback) { + callback(new Error('client disconnecting')) + } else { + this.emit('error', new Error('client disconnecting')) + } + } + return this.disconnecting +} + +/** + * publish - publish to + * + * @param {String} topic - topic to publish to + * @param {String, Buffer} message - message to publish + * @param {Object} [opts] - publish options, includes: + * {Number} qos - qos level to publish on + * {Boolean} retain - whether or not to retain the message + * {Boolean} dup - whether or not mark a message as duplicate + * @param {Function} [callback] - function(err){} + * called when publish succeeds or fails + * @returns {MqttClient} this - for chaining + * @api public + * + * @example client.publish('topic', 'message'); + * @example + * client.publish('topic', 'message', {qos: 1, retain: true, dup: true}); + * @example client.publish('topic', 'message', console.log); + */ +MqttClient.prototype.publish = function (topic, message, opts, callback) { + var packet + + // .publish(topic, payload, cb); + if (typeof opts === 'function') { + callback = opts + opts = null + } + + // default opts + var defaultOpts = {qos: 0, retain: false, dup: false} + opts = xtend(defaultOpts, opts) + + if (this._checkDisconnecting(callback)) { + return this + } + + packet = { + cmd: 'publish', + topic: topic, + payload: message, + qos: opts.qos, + retain: opts.retain, + messageId: this._nextId(), + dup: opts.dup + } + + switch (opts.qos) { + case 1: + case 2: + + // Add to callbacks + this.outgoing[packet.messageId] = callback || nop + this._sendPacket(packet) + break + default: + this._sendPacket(packet, callback) + break + } + + return this +} + +/** + * subscribe - subscribe to + * + * @param {String, Array, Object} topic - topic(s) to subscribe to, supports objects in the form {'topic': qos} + * @param {Object} [opts] - optional subscription options, includes: + * {Number} qos - subscribe qos level + * @param {Function} [callback] - function(err, granted){} where: + * {Error} err - subscription error (none at the moment!) + * {Array} granted - array of {topic: 't', qos: 0} + * @returns {MqttClient} this - for chaining + * @api public + * @example client.subscribe('topic'); + * @example client.subscribe('topic', {qos: 1}); + * @example client.subscribe({'topic': 0, 'topic2': 1}, console.log); + * @example client.subscribe('topic', console.log); + */ +MqttClient.prototype.subscribe = function () { + var packet + var args = Array.prototype.slice.call(arguments) + var subs = [] + var obj = args.shift() + var resubscribe = obj.resubscribe + var callback = args.pop() || nop + var opts = args.pop() + var invalidTopic + var that = this + + delete obj.resubscribe + + if (typeof obj === 'string') { + obj = [obj] + } + + if (typeof callback !== 'function') { + opts = callback + callback = nop + } + + invalidTopic = validations.validateTopics(obj) + if (invalidTopic !== null) { + setImmediate(callback, new Error('Invalid topic ' + invalidTopic)) + return this + } + + if (this._checkDisconnecting(callback)) { + return this + } + + var defaultOpts = { qos: 0 } + opts = xtend(defaultOpts, opts) + + if (Array.isArray(obj)) { + obj.forEach(function (topic) { + if (that._resubscribeTopics[topic] < opts.qos || + !that._resubscribeTopics.hasOwnProperty(topic) || + resubscribe) { + subs.push({ + topic: topic, + qos: opts.qos + }) + } + }) + } else { + Object + .keys(obj) + .forEach(function (k) { + if (that._resubscribeTopics[k] < obj[k] || + !that._resubscribeTopics.hasOwnProperty(k) || + resubscribe) { + subs.push({ + topic: k, + qos: obj[k] + }) + } + }) + } + + packet = { + cmd: 'subscribe', + subscriptions: subs, + qos: 1, + retain: false, + dup: false, + messageId: this._nextId() + } + + if (!subs.length) { + callback(null, []) + return + } + + // subscriptions to resubscribe to in case of disconnect + if (this.options.resubscribe) { + var topics = [] + subs.forEach(function (sub) { + if (that.options.reconnectPeriod > 0) { + that._resubscribeTopics[sub.topic] = sub.qos + topics.push(sub.topic) + } + }) + that.messageIdToTopic[packet.messageId] = topics + } + + this.outgoing[packet.messageId] = function (err, packet) { + if (!err) { + var granted = packet.granted + for (var i = 0; i < granted.length; i += 1) { + subs[i].qos = granted[i] + } + } + + callback(err, subs) + } + + this._sendPacket(packet) + + return this +} + +/** + * unsubscribe - unsubscribe from topic(s) + * + * @param {String, Array} topic - topics to unsubscribe from + * @param {Function} [callback] - callback fired on unsuback + * @returns {MqttClient} this - for chaining + * @api public + * @example client.unsubscribe('topic'); + * @example client.unsubscribe('topic', console.log); + */ +MqttClient.prototype.unsubscribe = function (topic, callback) { + var packet = { + cmd: 'unsubscribe', + qos: 1, + messageId: this._nextId() + } + var that = this + + callback = callback || nop + + if (this._checkDisconnecting(callback)) { + return this + } + + if (typeof topic === 'string') { + packet.unsubscriptions = [topic] + } else if (typeof topic === 'object' && topic.length) { + packet.unsubscriptions = topic + } + + if (this.options.resubscribe) { + packet.unsubscriptions.forEach(function (topic) { + delete that._resubscribeTopics[topic] + }) + } + + this.outgoing[packet.messageId] = callback + + this._sendPacket(packet) + + return this +} + +/** + * end - close connection + * + * @returns {MqttClient} this - for chaining + * @param {Boolean} force - do not wait for all in-flight messages to be acked + * @param {Function} cb - called when the client has been closed + * + * @api public + */ +MqttClient.prototype.end = function (force, cb) { + var that = this + + if (typeof force === 'function') { + cb = force + force = false + } + + function closeStores () { + that.disconnected = true + that.incomingStore.close(function () { + that.outgoingStore.close(function () { + if (cb) { + cb.apply(null, arguments) + } + that.emit('end') + }) + }) + if (that._deferredReconnect) { + that._deferredReconnect() + } + } + + function finish () { + // defer closesStores of an I/O cycle, + // just to make sure things are + // ok for websockets + that._cleanUp(force, setImmediate.bind(null, closeStores)) + } + + if (this.disconnecting) { + return this + } + + this._clearReconnect() + + this.disconnecting = true + + if (!force && Object.keys(this.outgoing).length > 0) { + // wait 10ms, just to be sure we received all of it + this.once('outgoingEmpty', setTimeout.bind(null, finish, 10)) + } else { + finish() + } + + return this +} + +/** + * removeOutgoingMessage - remove a message in outgoing store + * the outgoing callback will be called withe Error('Message removed') if the message is removed + * + * @param {Number} mid - messageId to remove message + * @returns {MqttClient} this - for chaining + * @api public + * + * @example client.removeOutgoingMessage(client.getLastMessageId()); + */ +MqttClient.prototype.removeOutgoingMessage = function (mid) { + var cb = this.outgoing[mid] + delete this.outgoing[mid] + this.outgoingStore.del({messageId: mid}, function () { + cb(new Error('Message removed')) + }) + return this +} + +/** + * reconnect - connect again using the same options as connect() + * + * @param {Object} [opts] - optional reconnect options, includes: + * {Store} incomingStore - a store for the incoming packets + * {Store} outgoingStore - a store for the outgoing packets + * if opts is not given, current stores are used + * @returns {MqttClient} this - for chaining + * + * @api public + */ +MqttClient.prototype.reconnect = function (opts) { + var that = this + var f = function () { + if (opts) { + that.options.incomingStore = opts.incomingStore + that.options.outgoingStore = opts.outgoingStore + } else { + that.options.incomingStore = null + that.options.outgoingStore = null + } + that.incomingStore = that.options.incomingStore || new Store() + that.outgoingStore = that.options.outgoingStore || new Store() + that.disconnecting = false + that.disconnected = false + that._deferredReconnect = null + that._reconnect() + } + + if (this.disconnecting && !this.disconnected) { + this._deferredReconnect = f + } else { + f() + } + return this +} + +/** + * _reconnect - implement reconnection + * @api privateish + */ +MqttClient.prototype._reconnect = function () { + this.emit('reconnect') + this._setupStream() +} + +/** + * _setupReconnect - setup reconnect timer + */ +MqttClient.prototype._setupReconnect = function () { + var that = this + + if (!that.disconnecting && !that.reconnectTimer && (that.options.reconnectPeriod > 0)) { + if (!this.reconnecting) { + this.emit('offline') + this.reconnecting = true + } + that.reconnectTimer = setInterval(function () { + that._reconnect() + }, that.options.reconnectPeriod) + } +} + +/** + * _clearReconnect - clear the reconnect timer + */ +MqttClient.prototype._clearReconnect = function () { + if (this.reconnectTimer) { + clearInterval(this.reconnectTimer) + this.reconnectTimer = null + } +} + +/** + * _cleanUp - clean up on connection end + * @api private + */ +MqttClient.prototype._cleanUp = function (forced, done) { + if (done) { + this.stream.on('close', done) + } + + if (forced) { + if ((this.options.reconnectPeriod === 0) && this.options.clean) { + flush(this.outgoing) + } + this.stream.destroy() + } else { + this._sendPacket( + { cmd: 'disconnect' }, + setImmediate.bind( + null, + this.stream.end.bind(this.stream) + ) + ) + } + + if (!this.disconnecting) { + this._clearReconnect() + this._setupReconnect() + } + + if (this.pingTimer !== null) { + this.pingTimer.clear() + this.pingTimer = null + } + + if (done && !this.connected) { + this.stream.removeListener('close', done) + done() + } +} + +/** + * _sendPacket - send or queue a packet + * @param {String} type - packet type (see `protocol`) + * @param {Object} packet - packet options + * @param {Function} cb - callback when the packet is sent + * @api private + */ +MqttClient.prototype._sendPacket = function (packet, cb) { + if (!this.connected) { + if (((packet.qos || 0) === 0 && this.queueQoSZero) || packet.cmd !== 'publish') { + this.queue.push({ packet: packet, cb: cb }) + } else if (packet.qos > 0) { + cb = this.outgoing[packet.messageId] + this.outgoingStore.put(packet, function (err) { + if (err) { + return cb && cb(err) + } + }) + } else if (cb) { + cb(new Error('No connection to broker')) + } + + return + } + + // When sending a packet, reschedule the ping timer + this._shiftPingInterval() + + switch (packet.cmd) { + case 'publish': + break + case 'pubrel': + storeAndSend(this, packet, cb) + return + default: + sendPacket(this, packet, cb) + return + } + + switch (packet.qos) { + case 2: + case 1: + storeAndSend(this, packet, cb) + break + /** + * no need of case here since it will be caught by default + * and jshint comply that before default it must be a break + * anyway it will result in -1 evaluation + */ + case 0: + /* falls through */ + default: + sendPacket(this, packet, cb) + break + } +} + +/** + * _setupPingTimer - setup the ping timer + * + * @api private + */ +MqttClient.prototype._setupPingTimer = function () { + var that = this + + if (!this.pingTimer && this.options.keepalive) { + this.pingResp = true + this.pingTimer = reInterval(function () { + that._checkPing() + }, this.options.keepalive * 1000) + } +} + +/** + * _shiftPingInterval - reschedule the ping interval + * + * @api private + */ +MqttClient.prototype._shiftPingInterval = function () { + if (this.pingTimer && this.options.keepalive && this.options.reschedulePings) { + this.pingTimer.reschedule(this.options.keepalive * 1000) + } +} +/** + * _checkPing - check if a pingresp has come back, and ping the server again + * + * @api private + */ +MqttClient.prototype._checkPing = function () { + if (this.pingResp) { + this.pingResp = false + this._sendPacket({ cmd: 'pingreq' }) + } else { + // do a forced cleanup since socket will be in bad shape + this._cleanUp(true) + } +} + +/** + * _handlePingresp - handle a pingresp + * + * @api private + */ +MqttClient.prototype._handlePingresp = function () { + this.pingResp = true +} + +/** + * _handleConnack + * + * @param {Object} packet + * @api private + */ + +MqttClient.prototype._handleConnack = function (packet) { + var rc = packet.returnCode + var errors = [ + '', + 'Unacceptable protocol version', + 'Identifier rejected', + 'Server unavailable', + 'Bad username or password', + 'Not authorized' + ] + + clearTimeout(this.connackTimer) + + if (rc === 0) { + this.reconnecting = false + this.emit('connect', packet) + } else if (rc > 0) { + var err = new Error('Connection refused: ' + errors[rc]) + err.code = rc + this.emit('error', err) + } +} + +/** + * _handlePublish + * + * @param {Object} packet + * @api private + */ +/* +those late 2 case should be rewrite to comply with coding style: + +case 1: +case 0: + // do not wait sending a puback + // no callback passed + if (1 === qos) { + this._sendPacket({ + cmd: 'puback', + messageId: mid + }); + } + // emit the message event for both qos 1 and 0 + this.emit('message', topic, message, packet); + this.handleMessage(packet, done); + break; +default: + // do nothing but every switch mus have a default + // log or throw an error about unknown qos + break; + +for now i just suppressed the warnings +*/ +MqttClient.prototype._handlePublish = function (packet, done) { + done = typeof done !== 'undefined' ? done : nop + var topic = packet.topic.toString() + var message = packet.payload + var qos = packet.qos + var mid = packet.messageId + var that = this + + switch (qos) { + case 2: + this.incomingStore.put(packet, function (err) { + if (err) { + return done(err) + } + that._sendPacket({cmd: 'pubrec', messageId: mid}, done) + }) + break + case 1: + // emit the message event + this.emit('message', topic, message, packet) + this.handleMessage(packet, function (err) { + if (err) { + return done(err) + } + // send 'puback' if the above 'handleMessage' method executed + // successfully. + that._sendPacket({cmd: 'puback', messageId: mid}, done) + }) + break + case 0: + // emit the message event + this.emit('message', topic, message, packet) + this.handleMessage(packet, done) + break + default: + // do nothing + // log or throw an error about unknown qos + break + } +} + +/** + * Handle messages with backpressure support, one at a time. + * Override at will. + * + * @param Packet packet the packet + * @param Function callback call when finished + * @api public + */ +MqttClient.prototype.handleMessage = function (packet, callback) { + callback() +} + +/** + * _handleAck + * + * @param {Object} packet + * @api private + */ + +MqttClient.prototype._handleAck = function (packet) { + /* eslint no-fallthrough: "off" */ + var mid = packet.messageId + var type = packet.cmd + var response = null + var cb = this.outgoing[mid] + var that = this + + if (!cb) { + // Server sent an ack in error, ignore it. + return + } + + // Process + switch (type) { + case 'pubcomp': + // same thing as puback for QoS 2 + case 'puback': + // Callback - we're done + delete this.outgoing[mid] + this.outgoingStore.del(packet, cb) + break + case 'pubrec': + response = { + cmd: 'pubrel', + qos: 2, + messageId: mid + } + + this._sendPacket(response) + break + case 'suback': + delete this.outgoing[mid] + if (packet.granted.length === 1 && (packet.granted[0] & 0x80) !== 0) { + // suback with Failure status + var topics = this.messageIdToTopic[mid] + if (topics) { + topics.forEach(function (topic) { + delete that._resubscribeTopics[topic] + }) + } + } + cb(null, packet) + break + case 'unsuback': + delete this.outgoing[mid] + cb(null) + break + default: + that.emit('error', new Error('unrecognized packet type')) + } + + if (this.disconnecting && + Object.keys(this.outgoing).length === 0) { + this.emit('outgoingEmpty') + } +} + +/** + * _handlePubrel + * + * @param {Object} packet + * @api private + */ +MqttClient.prototype._handlePubrel = function (packet, callback) { + callback = typeof callback !== 'undefined' ? callback : nop + var mid = packet.messageId + var that = this + + var comp = {cmd: 'pubcomp', messageId: mid} + + that.incomingStore.get(packet, function (err, pub) { + if (!err && pub.cmd !== 'pubrel') { + that.emit('message', pub.topic, pub.payload, pub) + that.incomingStore.put(packet, function (err) { + if (err) { + return callback(err) + } + that.handleMessage(pub, function (err) { + if (err) { + return callback(err) + } + that._sendPacket(comp, callback) + }) + }) + } else { + that._sendPacket(comp, callback) + } + }) +} + +/** + * _nextId + * @return unsigned int + */ +MqttClient.prototype._nextId = function () { + // id becomes current state of this.nextId and increments afterwards + var id = this.nextId++ + // Ensure 16 bit unsigned int (max 65535, nextId got one higher) + if (this.nextId === 65536) { + this.nextId = 1 + } + return id +} + +/** + * getLastMessageId + * @return unsigned int + */ +MqttClient.prototype.getLastMessageId = function () { + return (this.nextId === 1) ? 65535 : (this.nextId - 1) +} + +module.exports = MqttClient + + +/***/ }), + +/***/ 99675: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var MqttClient = __nccwpck_require__(85823) +var Store = __nccwpck_require__(95498) +var url = __nccwpck_require__(78835) +var xtend = __nccwpck_require__(91208) +var protocols = {} + +if (process.title !== 'browser') { + protocols.mqtt = __nccwpck_require__(20116) + protocols.tcp = __nccwpck_require__(20116) + protocols.ssl = __nccwpck_require__(36998) + protocols.tls = __nccwpck_require__(36998) + protocols.mqtts = __nccwpck_require__(36998) +} else { + protocols.wx = __nccwpck_require__(85525) + protocols.wxs = __nccwpck_require__(85525) +} + +protocols.ws = __nccwpck_require__(33985) +protocols.wss = __nccwpck_require__(33985) + +/** + * Parse the auth attribute and merge username and password in the options object. + * + * @param {Object} [opts] option object + */ +function parseAuthOptions (opts) { + var matches + if (opts.auth) { + matches = opts.auth.match(/^(.+):(.+)$/) + if (matches) { + opts.username = matches[1] + opts.password = matches[2] + } else { + opts.username = opts.auth + } + } +} + +/** + * connect - connect to an MQTT broker. + * + * @param {String} [brokerUrl] - url of the broker, optional + * @param {Object} opts - see MqttClient#constructor + */ +function connect (brokerUrl, opts) { + if ((typeof brokerUrl === 'object') && !opts) { + opts = brokerUrl + brokerUrl = null + } + + opts = opts || {} + + if (brokerUrl) { + var parsed = url.parse(brokerUrl, true) + if (parsed.port != null) { + parsed.port = Number(parsed.port) + } + + opts = xtend(parsed, opts) + + if (opts.protocol === null) { + throw new Error('Missing protocol') + } + opts.protocol = opts.protocol.replace(/:$/, '') + } + + // merge in the auth options if supplied + parseAuthOptions(opts) + + // support clientId passed in the query string of the url + if (opts.query && typeof opts.query.clientId === 'string') { + opts.clientId = opts.query.clientId + } + + if (opts.cert && opts.key) { + if (opts.protocol) { + if (['mqtts', 'wss', 'wxs'].indexOf(opts.protocol) === -1) { + switch (opts.protocol) { + case 'mqtt': + opts.protocol = 'mqtts' + break + case 'ws': + opts.protocol = 'wss' + break + case 'wx': + opts.protocol = 'wxs' + break + default: + throw new Error('Unknown protocol for secure connection: "' + opts.protocol + '"!') + } + } + } else { + // don't know what protocol he want to use, mqtts or wss + throw new Error('Missing secure protocol key') + } + } + + if (!protocols[opts.protocol]) { + var isSecure = ['mqtts', 'wss'].indexOf(opts.protocol) !== -1 + opts.protocol = [ + 'mqtt', + 'mqtts', + 'ws', + 'wss', + 'wx', + 'wxs' + ].filter(function (key, index) { + if (isSecure && index % 2 === 0) { + // Skip insecure protocols when requesting a secure one. + return false + } + return (typeof protocols[key] === 'function') + })[0] + } + + if (opts.clean === false && !opts.clientId) { + throw new Error('Missing clientId for unclean clients') + } + + if (opts.protocol) { + opts.defaultProtocol = opts.protocol + } + + function wrapper (client) { + if (opts.servers) { + if (!client._reconnectCount || client._reconnectCount === opts.servers.length) { + client._reconnectCount = 0 + } + + opts.host = opts.servers[client._reconnectCount].host + opts.port = opts.servers[client._reconnectCount].port + opts.protocol = (!opts.servers[client._reconnectCount].protocol ? opts.defaultProtocol : opts.servers[client._reconnectCount].protocol) + opts.hostname = opts.host + + client._reconnectCount++ + } + + return protocols[opts.protocol](client, opts) + } + + return new MqttClient(wrapper, opts) +} + +module.exports = connect +module.exports.connect = connect +module.exports.MqttClient = MqttClient +module.exports.Store = Store + + +/***/ }), + +/***/ 20116: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var net = __nccwpck_require__(11631) + +/* + variables port and host can be removed since + you have all required information in opts object +*/ +function buildBuilder (client, opts) { + var port, host + opts.port = opts.port || 1883 + opts.hostname = opts.hostname || opts.host || 'localhost' + + port = opts.port + host = opts.hostname + + return net.createConnection(port, host) +} + +module.exports = buildBuilder + + +/***/ }), + +/***/ 36998: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var tls = __nccwpck_require__(4016) + +function buildBuilder (mqttClient, opts) { + var connection + opts.port = opts.port || 8883 + opts.host = opts.hostname || opts.host || 'localhost' + + opts.rejectUnauthorized = opts.rejectUnauthorized !== false + + delete opts.path + + connection = tls.connect(opts) + /* eslint no-use-before-define: [2, "nofunc"] */ + connection.on('secureConnect', function () { + if (opts.rejectUnauthorized && !connection.authorized) { + connection.emit('error', new Error('TLS not authorized')) + } else { + connection.removeListener('error', handleTLSerrors) + } + }) + + function handleTLSerrors (err) { + // How can I get verify this error is a tls error? + if (opts.rejectUnauthorized) { + mqttClient.emit('error', err) + } + + // close this connection to match the behaviour of net + // otherwise all we get is an error from the connection + // and close event doesn't fire. This is a work around + // to enable the reconnect code to work the same as with + // net.createConnection + connection.end() + } + + connection.on('error', handleTLSerrors) + return connection +} + +module.exports = buildBuilder + + +/***/ }), + +/***/ 33985: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var websocket = __nccwpck_require__(93777) +var urlModule = __nccwpck_require__(78835) +var WSS_OPTIONS = [ + 'rejectUnauthorized', + 'ca', + 'cert', + 'key', + 'pfx', + 'passphrase' +] +var IS_BROWSER = process.title === 'browser' + +function buildUrl (opts, client) { + var url = opts.protocol + '://' + opts.hostname + ':' + opts.port + opts.path + if (typeof (opts.transformWsUrl) === 'function') { + url = opts.transformWsUrl(url, opts, client) + } + return url +} + +function setDefaultOpts (opts) { + if (!opts.hostname) { + opts.hostname = 'localhost' + } + if (!opts.port) { + if (opts.protocol === 'wss') { + opts.port = 443 + } else { + opts.port = 80 + } + } + if (!opts.path) { + opts.path = '/' + } + + if (!opts.wsOptions) { + opts.wsOptions = {} + } + if (!IS_BROWSER && opts.protocol === 'wss') { + // Add cert/key/ca etc options + WSS_OPTIONS.forEach(function (prop) { + if (opts.hasOwnProperty(prop) && !opts.wsOptions.hasOwnProperty(prop)) { + opts.wsOptions[prop] = opts[prop] + } + }) + } +} + +function createWebSocket (client, opts) { + var websocketSubProtocol = + (opts.protocolId === 'MQIsdp') && (opts.protocolVersion === 3) + ? 'mqttv3.1' + : 'mqtt' + + setDefaultOpts(opts) + var url = buildUrl(opts, client) + return websocket(url, [websocketSubProtocol], opts.wsOptions) +} + +function buildBuilder (client, opts) { + return createWebSocket(client, opts) +} + +function buildBuilderBrowser (client, opts) { + if (!opts.hostname) { + opts.hostname = opts.host + } + + if (!opts.hostname) { + // Throwing an error in a Web Worker if no `hostname` is given, because we + // can not determine the `hostname` automatically. If connecting to + // localhost, please supply the `hostname` as an argument. + if (typeof (document) === 'undefined') { + throw new Error('Could not determine host. Specify host manually.') + } + var parsed = urlModule.parse(document.URL) + opts.hostname = parsed.hostname + + if (!opts.port) { + opts.port = parsed.port + } + } + return createWebSocket(client, opts) +} + +if (IS_BROWSER) { + module.exports = buildBuilderBrowser +} else { + module.exports = buildBuilder +} + + +/***/ }), + +/***/ 85525: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/* global wx */ +var socketOpen = false +var socketMsgQueue = [] + +function sendSocketMessage (msg) { + if (socketOpen) { + wx.sendSocketMessage({ + data: msg.buffer || msg + }) + } else { + socketMsgQueue.push(msg) + } +} + +function WebSocket (url, protocols) { + var ws = { + OPEN: 1, + CLOSING: 2, + CLOSED: 3, + readyState: socketOpen ? 1 : 0, + send: sendSocketMessage, + close: wx.closeSocket, + onopen: null, + onmessage: null, + onclose: null, + onerror: null + } + + wx.connectSocket({ + url: url, + protocols: protocols + }) + wx.onSocketOpen(function (res) { + ws.readyState = ws.OPEN + socketOpen = true + for (var i = 0; i < socketMsgQueue.length; i++) { + sendSocketMessage(socketMsgQueue[i]) + } + socketMsgQueue = [] + + ws.onopen && ws.onopen.apply(ws, arguments) + }) + wx.onSocketMessage(function (res) { + ws.onmessage && ws.onmessage.apply(ws, arguments) + }) + wx.onSocketClose(function () { + ws.onclose && ws.onclose.apply(ws, arguments) + ws.readyState = ws.CLOSED + socketOpen = false + }) + wx.onSocketError(function () { + ws.onerror && ws.onerror.apply(ws, arguments) + ws.readyState = ws.CLOSED + socketOpen = false + }) + + return ws +} + +var websocket = __nccwpck_require__(93777) + +function buildUrl (opts, client) { + var protocol = opts.protocol === 'wxs' ? 'wss' : 'ws' + var url = protocol + '://' + opts.hostname + opts.path + if (opts.port && opts.port !== 80 && opts.port !== 443) { + url = protocol + '://' + opts.hostname + ':' + opts.port + opts.path + } + if (typeof (opts.transformWsUrl) === 'function') { + url = opts.transformWsUrl(url, opts, client) + } + return url +} + +function setDefaultOpts (opts) { + if (!opts.hostname) { + opts.hostname = 'localhost' + } + if (!opts.path) { + opts.path = '/' + } + + if (!opts.wsOptions) { + opts.wsOptions = {} + } +} + +function createWebSocket (client, opts) { + var websocketSubProtocol = + (opts.protocolId === 'MQIsdp') && (opts.protocolVersion === 3) + ? 'mqttv3.1' + : 'mqtt' + + setDefaultOpts(opts) + var url = buildUrl(opts, client) + return websocket(WebSocket(url, [websocketSubProtocol])) +} + +function buildBuilder (client, opts) { + opts.hostname = opts.hostname || opts.host + + if (!opts.hostname) { + throw new Error('Could not determine host. Specify host manually.') + } + + return createWebSocket(client, opts) +} + +module.exports = buildBuilder + + +/***/ }), + +/***/ 95498: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/** + * Module dependencies + */ +var xtend = __nccwpck_require__(91208) + +var Readable = __nccwpck_require__(51642).Readable +var streamsOpts = { objectMode: true } +var defaultStoreOptions = { + clean: true +} + +/** + * es6-map can preserve insertion order even if ES version is older. + * + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Description + * It should be noted that a Map which is a map of an object, especially + * a dictionary of dictionaries, will only map to the object's insertion + * order. In ES2015 this is ordered for objects but for older versions of + * ES, this may be random and not ordered. + * + */ +var Map = __nccwpck_require__(97063) + +/** + * In-memory implementation of the message store + * This can actually be saved into files. + * + * @param {Object} [options] - store options + */ +function Store (options) { + if (!(this instanceof Store)) { + return new Store(options) + } + + this.options = options || {} + + // Defaults + this.options = xtend(defaultStoreOptions, options) + + this._inflights = new Map() +} + +/** + * Adds a packet to the store, a packet is + * anything that has a messageId property. + * + */ +Store.prototype.put = function (packet, cb) { + this._inflights.set(packet.messageId, packet) + + if (cb) { + cb() + } + + return this +} + +/** + * Creates a stream with all the packets in the store + * + */ +Store.prototype.createStream = function () { + var stream = new Readable(streamsOpts) + var destroyed = false + var values = [] + var i = 0 + + this._inflights.forEach(function (value, key) { + values.push(value) + }) + + stream._read = function () { + if (!destroyed && i < values.length) { + this.push(values[i++]) + } else { + this.push(null) + } + } + + stream.destroy = function () { + if (destroyed) { + return + } + + var self = this + + destroyed = true + + process.nextTick(function () { + self.emit('close') + }) + } + + return stream +} + +/** + * deletes a packet from the store. + */ +Store.prototype.del = function (packet, cb) { + packet = this._inflights.get(packet.messageId) + if (packet) { + this._inflights.delete(packet.messageId) + cb(null, packet) + } else if (cb) { + cb(new Error('missing packet')) + } + + return this +} + +/** + * get a packet from the store. + */ +Store.prototype.get = function (packet, cb) { + packet = this._inflights.get(packet.messageId) + if (packet) { + cb(null, packet) + } else if (cb) { + cb(new Error('missing packet')) + } + + return this +} + +/** + * Close the store + */ +Store.prototype.close = function (cb) { + if (this.options.clean) { + this._inflights = null + } + if (cb) { + cb() + } +} + +module.exports = Store + + +/***/ }), + +/***/ 19465: +/***/ ((module) => { + +"use strict"; + + +/** + * Validate a topic to see if it's valid or not. + * A topic is valid if it follow below rules: + * - Rule #1: If any part of the topic is not `+` or `#`, then it must not contain `+` and '#' + * - Rule #2: Part `#` must be located at the end of the mailbox + * + * @param {String} topic - A topic + * @returns {Boolean} If the topic is valid, returns true. Otherwise, returns false. + */ +function validateTopic (topic) { + var parts = topic.split('/') + + for (var i = 0; i < parts.length; i++) { + if (parts[i] === '+') { + continue + } + + if (parts[i] === '#') { + // for Rule #2 + return i === parts.length - 1 + } + + if (parts[i].indexOf('+') !== -1 || parts[i].indexOf('#') !== -1) { + return false + } + } + + return true +} + +/** + * Validate an array of topics to see if any of them is valid or not + * @param {Array} topics - Array of topics + * @returns {String} If the topics is valid, returns null. Otherwise, returns the invalid one + */ +function validateTopics (topics) { + if (topics.length === 0) { + return 'empty_topic_list' + } + for (var i = 0; i < topics.length; i++) { + if (!validateTopic(topics[i])) { + return topics[i] + } + } + return null +} + +module.exports = { + validateTopics: validateTopics +} + + +/***/ }), + +/***/ 38017: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/* + * Copyright (c) 2015-2015 MQTT.js contributors. + * Copyright (c) 2011-2014 Adam Rudd. + * + * See LICENSE for more information + */ + +var MqttClient = __nccwpck_require__(85823) +var connect = __nccwpck_require__(99675) +var Store = __nccwpck_require__(95498) + +module.exports.connect = connect + +// Expose MqttClient +module.exports.MqttClient = MqttClient +module.exports.Client = MqttClient +module.exports.Store = Store + +function cli () { + var commist = __nccwpck_require__(53665)() + var helpMe = __nccwpck_require__(91609)() + + commist.register('publish', __nccwpck_require__(10071)) + commist.register('subscribe', __nccwpck_require__(31769)) + commist.register('version', function () { + console.log('MQTT.js version:', __nccwpck_require__(99062)/* .version */ .i8) + }) + commist.register('help', helpMe.toStdout) + + if (commist.parse(process.argv.slice(2)) !== null) { + console.log('No such command:', process.argv[2], '\n') + helpMe.toStdout() + } +} + +if (false) {} + + +/***/ }), + +/***/ 80467: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var Stream = _interopDefault(__nccwpck_require__(92413)); +var http = _interopDefault(__nccwpck_require__(98605)); +var Url = _interopDefault(__nccwpck_require__(78835)); +var https = _interopDefault(__nccwpck_require__(57211)); +var zlib = _interopDefault(__nccwpck_require__(78761)); + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = __nccwpck_require__(22877).convert; +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parse_url(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parse_url(`${input}`); + } + input = {}; + } else { + parsedURL = parse_url(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +module.exports = exports = fetch; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.default = exports; +exports.Headers = Headers; +exports.Request = Request; +exports.Response = Response; +exports.FetchError = FetchError; + + +/***/ }), + +/***/ 1223: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var wrappy = __nccwpck_require__(62940) +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} + + +/***/ }), + +/***/ 41051: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Readable = __nccwpck_require__(51642); +var util = __nccwpck_require__(31669); + +function isReadable(stream) { + if (typeof stream.pipe !== 'function') { + return false; + } + + if (!stream.readable) { + return false; + } + + if (typeof stream._read !== 'function') { + return false; + } + + if (!stream._readableState) { + return false; + } + + return true; +} + +function addStream (streams, stream) { + if (!isReadable(stream)) { + throw new Error('All input streams must be readable'); + } + + var self = this; + + stream._buffer = []; + + stream.on('readable', function () { + var chunk = stream.read(); + while (chunk) { + if (this === streams[0]) { + self.push(chunk); + } else { + this._buffer.push(chunk); + } + chunk = stream.read(); + } + }); + + stream.on('end', function () { + for (var stream = streams[0]; + stream && stream._readableState.ended; + stream = streams[0]) { + while (stream._buffer.length) { + self.push(stream._buffer.shift()); + } + + streams.shift(); + } + + if (!streams.length) { + self.push(null); + } + }); + + stream.on('error', this.emit.bind(this, 'error')); + + streams.push(stream); +} + +function OrderedStreams (streams, options) { + if (!(this instanceof(OrderedStreams))) { + return new OrderedStreams(streams, options); + } + + streams = streams || []; + options = options || {}; + + options.objectMode = true; + + Readable.call(this, options); + + if (!Array.isArray(streams)) { + streams = [streams]; + } + if (!streams.length) { + return this.push(null); // no streams, close + } + + var addStreamBinded = addStream.bind(this, []); + + streams.forEach(function (item) { + if (Array.isArray(item)) { + item.forEach(addStreamBinded); + } else { + addStreamBinded(item); + } + }); +} +util.inherits(OrderedStreams, Readable); + +OrderedStreams.prototype._read = function () {}; + +module.exports = OrderedStreams; + + +/***/ }), + +/***/ 88822: +/***/ (function(module) { + +/******************************************************************************* + * Copyright (c) 2013 IBM Corp. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Andrew Banks - initial API and implementation and initial documentation + *******************************************************************************/ + + +// Only expose a single object name in the global namespace. +// Everything must go through this module. Global Paho module +// only has a single public function, client, which returns +// a Paho client object given connection details. + +/** + * Send and receive messages using web browsers. + *

+ * This programming interface lets a JavaScript client application use the MQTT V3.1 or + * V3.1.1 protocol to connect to an MQTT-supporting messaging server. + * + * The function supported includes: + *

    + *
  1. Connecting to and disconnecting from a server. The server is identified by its host name and port number. + *
  2. Specifying options that relate to the communications link with the server, + * for example the frequency of keep-alive heartbeats, and whether SSL/TLS is required. + *
  3. Subscribing to and receiving messages from MQTT Topics. + *
  4. Publishing messages to MQTT Topics. + *
+ *

+ * The API consists of two main objects: + *

+ *
{@link Paho.Client}
+ *
This contains methods that provide the functionality of the API, + * including provision of callbacks that notify the application when a message + * arrives from or is delivered to the messaging server, + * or when the status of its connection to the messaging server changes.
+ *
{@link Paho.Message}
+ *
This encapsulates the payload of the message along with various attributes + * associated with its delivery, in particular the destination to which it has + * been (or is about to be) sent.
+ *
+ *

+ * The programming interface validates parameters passed to it, and will throw + * an Error containing an error message intended for developer use, if it detects + * an error with any parameter. + *

+ * Example: + * + *

+var client = new Paho.MQTT.Client(location.hostname, Number(location.port), "clientId");
+client.onConnectionLost = onConnectionLost;
+client.onMessageArrived = onMessageArrived;
+client.connect({onSuccess:onConnect});
+
+function onConnect() {
+  // Once a connection has been made, make a subscription and send a message.
+  console.log("onConnect");
+  client.subscribe("/World");
+  var message = new Paho.MQTT.Message("Hello");
+  message.destinationName = "/World";
+  client.send(message);
+};
+function onConnectionLost(responseObject) {
+  if (responseObject.errorCode !== 0)
+	console.log("onConnectionLost:"+responseObject.errorMessage);
+};
+function onMessageArrived(message) {
+  console.log("onMessageArrived:"+message.payloadString);
+  client.disconnect();
+};
+ * 
+ * @namespace Paho + */ + +/* jshint shadow:true */ +(function ExportLibrary(root, factory) { + if(true){ + module.exports = factory(); + } else {} +})(this, function LibraryFactory(){ + + + var PahoMQTT = (function (global) { + + // Private variables below, these are only visible inside the function closure + // which is used to define the module. + var version = "@VERSION@-@BUILDLEVEL@"; + + /** + * @private + */ + var localStorage = global.localStorage || (function () { + var data = {}; + + return { + setItem: function (key, item) { data[key] = item; }, + getItem: function (key) { return data[key]; }, + removeItem: function (key) { delete data[key]; }, + }; + })(); + + /** + * Unique message type identifiers, with associated + * associated integer values. + * @private + */ + var MESSAGE_TYPE = { + CONNECT: 1, + CONNACK: 2, + PUBLISH: 3, + PUBACK: 4, + PUBREC: 5, + PUBREL: 6, + PUBCOMP: 7, + SUBSCRIBE: 8, + SUBACK: 9, + UNSUBSCRIBE: 10, + UNSUBACK: 11, + PINGREQ: 12, + PINGRESP: 13, + DISCONNECT: 14 + }; + + // Collection of utility methods used to simplify module code + // and promote the DRY pattern. + + /** + * Validate an object's parameter names to ensure they + * match a list of expected variables name for this option + * type. Used to ensure option object passed into the API don't + * contain erroneous parameters. + * @param {Object} obj - User options object + * @param {Object} keys - valid keys and types that may exist in obj. + * @throws {Error} Invalid option parameter found. + * @private + */ + var validate = function(obj, keys) { + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + if (keys.hasOwnProperty(key)) { + if (typeof obj[key] !== keys[key]) + throw new Error(format(ERROR.INVALID_TYPE, [typeof obj[key], key])); + } else { + var errorStr = "Unknown property, " + key + ". Valid properties are:"; + for (var validKey in keys) + if (keys.hasOwnProperty(validKey)) + errorStr = errorStr+" "+validKey; + throw new Error(errorStr); + } + } + } + }; + + /** + * Return a new function which runs the user function bound + * to a fixed scope. + * @param {function} User function + * @param {object} Function scope + * @return {function} User function bound to another scope + * @private + */ + var scope = function (f, scope) { + return function () { + return f.apply(scope, arguments); + }; + }; + + /** + * Unique message type identifiers, with associated + * associated integer values. + * @private + */ + var ERROR = { + OK: {code:0, text:"AMQJSC0000I OK."}, + CONNECT_TIMEOUT: {code:1, text:"AMQJSC0001E Connect timed out."}, + SUBSCRIBE_TIMEOUT: {code:2, text:"AMQJS0002E Subscribe timed out."}, + UNSUBSCRIBE_TIMEOUT: {code:3, text:"AMQJS0003E Unsubscribe timed out."}, + PING_TIMEOUT: {code:4, text:"AMQJS0004E Ping timed out."}, + INTERNAL_ERROR: {code:5, text:"AMQJS0005E Internal error. Error Message: {0}, Stack trace: {1}"}, + CONNACK_RETURNCODE: {code:6, text:"AMQJS0006E Bad Connack return code:{0} {1}."}, + SOCKET_ERROR: {code:7, text:"AMQJS0007E Socket error:{0}."}, + SOCKET_CLOSE: {code:8, text:"AMQJS0008I Socket closed."}, + MALFORMED_UTF: {code:9, text:"AMQJS0009E Malformed UTF data:{0} {1} {2}."}, + UNSUPPORTED: {code:10, text:"AMQJS0010E {0} is not supported by this browser."}, + INVALID_STATE: {code:11, text:"AMQJS0011E Invalid state {0}."}, + INVALID_TYPE: {code:12, text:"AMQJS0012E Invalid type {0} for {1}."}, + INVALID_ARGUMENT: {code:13, text:"AMQJS0013E Invalid argument {0} for {1}."}, + UNSUPPORTED_OPERATION: {code:14, text:"AMQJS0014E Unsupported operation."}, + INVALID_STORED_DATA: {code:15, text:"AMQJS0015E Invalid data in local storage key={0} value={1}."}, + INVALID_MQTT_MESSAGE_TYPE: {code:16, text:"AMQJS0016E Invalid MQTT message type {0}."}, + MALFORMED_UNICODE: {code:17, text:"AMQJS0017E Malformed Unicode string:{0} {1}."}, + BUFFER_FULL: {code:18, text:"AMQJS0018E Message buffer is full, maximum buffer size: {0}."}, + }; + + /** CONNACK RC Meaning. */ + var CONNACK_RC = { + 0:"Connection Accepted", + 1:"Connection Refused: unacceptable protocol version", + 2:"Connection Refused: identifier rejected", + 3:"Connection Refused: server unavailable", + 4:"Connection Refused: bad user name or password", + 5:"Connection Refused: not authorized" + }; + + /** + * Format an error message text. + * @private + * @param {error} ERROR value above. + * @param {substitutions} [array] substituted into the text. + * @return the text with the substitutions made. + */ + var format = function(error, substitutions) { + var text = error.text; + if (substitutions) { + var field,start; + for (var i=0; i 0) { + var part1 = text.substring(0,start); + var part2 = text.substring(start+field.length); + text = part1+substitutions[i]+part2; + } + } + } + return text; + }; + + //MQTT protocol and version 6 M Q I s d p 3 + var MqttProtoIdentifierv3 = [0x00,0x06,0x4d,0x51,0x49,0x73,0x64,0x70,0x03]; + //MQTT proto/version for 311 4 M Q T T 4 + var MqttProtoIdentifierv4 = [0x00,0x04,0x4d,0x51,0x54,0x54,0x04]; + + /** + * Construct an MQTT wire protocol message. + * @param type MQTT packet type. + * @param options optional wire message attributes. + * + * Optional properties + * + * messageIdentifier: message ID in the range [0..65535] + * payloadMessage: Application Message - PUBLISH only + * connectStrings: array of 0 or more Strings to be put into the CONNECT payload + * topics: array of strings (SUBSCRIBE, UNSUBSCRIBE) + * requestQoS: array of QoS values [0..2] + * + * "Flag" properties + * cleanSession: true if present / false if absent (CONNECT) + * willMessage: true if present / false if absent (CONNECT) + * isRetained: true if present / false if absent (CONNECT) + * userName: true if present / false if absent (CONNECT) + * password: true if present / false if absent (CONNECT) + * keepAliveInterval: integer [0..65535] (CONNECT) + * + * @private + * @ignore + */ + var WireMessage = function (type, options) { + this.type = type; + for (var name in options) { + if (options.hasOwnProperty(name)) { + this[name] = options[name]; + } + } + }; + + WireMessage.prototype.encode = function() { + // Compute the first byte of the fixed header + var first = ((this.type & 0x0f) << 4); + + /* + * Now calculate the length of the variable header + payload by adding up the lengths + * of all the component parts + */ + + var remLength = 0; + var topicStrLength = []; + var destinationNameLength = 0; + var willMessagePayloadBytes; + + // if the message contains a messageIdentifier then we need two bytes for that + if (this.messageIdentifier !== undefined) + remLength += 2; + + switch(this.type) { + // If this a Connect then we need to include 12 bytes for its header + case MESSAGE_TYPE.CONNECT: + switch(this.mqttVersion) { + case 3: + remLength += MqttProtoIdentifierv3.length + 3; + break; + case 4: + remLength += MqttProtoIdentifierv4.length + 3; + break; + } + + remLength += UTF8Length(this.clientId) + 2; + if (this.willMessage !== undefined) { + remLength += UTF8Length(this.willMessage.destinationName) + 2; + // Will message is always a string, sent as UTF-8 characters with a preceding length. + willMessagePayloadBytes = this.willMessage.payloadBytes; + if (!(willMessagePayloadBytes instanceof Uint8Array)) + willMessagePayloadBytes = new Uint8Array(payloadBytes); + remLength += willMessagePayloadBytes.byteLength +2; + } + if (this.userName !== undefined) + remLength += UTF8Length(this.userName) + 2; + if (this.password !== undefined) + remLength += UTF8Length(this.password) + 2; + break; + + // Subscribe, Unsubscribe can both contain topic strings + case MESSAGE_TYPE.SUBSCRIBE: + first |= 0x02; // Qos = 1; + for ( var i = 0; i < this.topics.length; i++) { + topicStrLength[i] = UTF8Length(this.topics[i]); + remLength += topicStrLength[i] + 2; + } + remLength += this.requestedQos.length; // 1 byte for each topic's Qos + // QoS on Subscribe only + break; + + case MESSAGE_TYPE.UNSUBSCRIBE: + first |= 0x02; // Qos = 1; + for ( var i = 0; i < this.topics.length; i++) { + topicStrLength[i] = UTF8Length(this.topics[i]); + remLength += topicStrLength[i] + 2; + } + break; + + case MESSAGE_TYPE.PUBREL: + first |= 0x02; // Qos = 1; + break; + + case MESSAGE_TYPE.PUBLISH: + if (this.payloadMessage.duplicate) first |= 0x08; + first = first |= (this.payloadMessage.qos << 1); + if (this.payloadMessage.retained) first |= 0x01; + destinationNameLength = UTF8Length(this.payloadMessage.destinationName); + remLength += destinationNameLength + 2; + var payloadBytes = this.payloadMessage.payloadBytes; + remLength += payloadBytes.byteLength; + if (payloadBytes instanceof ArrayBuffer) + payloadBytes = new Uint8Array(payloadBytes); + else if (!(payloadBytes instanceof Uint8Array)) + payloadBytes = new Uint8Array(payloadBytes.buffer); + break; + + case MESSAGE_TYPE.DISCONNECT: + break; + + default: + break; + } + + // Now we can allocate a buffer for the message + + var mbi = encodeMBI(remLength); // Convert the length to MQTT MBI format + var pos = mbi.length + 1; // Offset of start of variable header + var buffer = new ArrayBuffer(remLength + pos); + var byteStream = new Uint8Array(buffer); // view it as a sequence of bytes + + //Write the fixed header into the buffer + byteStream[0] = first; + byteStream.set(mbi,1); + + // If this is a PUBLISH then the variable header starts with a topic + if (this.type == MESSAGE_TYPE.PUBLISH) + pos = writeString(this.payloadMessage.destinationName, destinationNameLength, byteStream, pos); + // If this is a CONNECT then the variable header contains the protocol name/version, flags and keepalive time + + else if (this.type == MESSAGE_TYPE.CONNECT) { + switch (this.mqttVersion) { + case 3: + byteStream.set(MqttProtoIdentifierv3, pos); + pos += MqttProtoIdentifierv3.length; + break; + case 4: + byteStream.set(MqttProtoIdentifierv4, pos); + pos += MqttProtoIdentifierv4.length; + break; + } + var connectFlags = 0; + if (this.cleanSession) + connectFlags = 0x02; + if (this.willMessage !== undefined ) { + connectFlags |= 0x04; + connectFlags |= (this.willMessage.qos<<3); + if (this.willMessage.retained) { + connectFlags |= 0x20; + } + } + if (this.userName !== undefined) + connectFlags |= 0x80; + if (this.password !== undefined) + connectFlags |= 0x40; + byteStream[pos++] = connectFlags; + pos = writeUint16 (this.keepAliveInterval, byteStream, pos); + } + + // Output the messageIdentifier - if there is one + if (this.messageIdentifier !== undefined) + pos = writeUint16 (this.messageIdentifier, byteStream, pos); + + switch(this.type) { + case MESSAGE_TYPE.CONNECT: + pos = writeString(this.clientId, UTF8Length(this.clientId), byteStream, pos); + if (this.willMessage !== undefined) { + pos = writeString(this.willMessage.destinationName, UTF8Length(this.willMessage.destinationName), byteStream, pos); + pos = writeUint16(willMessagePayloadBytes.byteLength, byteStream, pos); + byteStream.set(willMessagePayloadBytes, pos); + pos += willMessagePayloadBytes.byteLength; + + } + if (this.userName !== undefined) + pos = writeString(this.userName, UTF8Length(this.userName), byteStream, pos); + if (this.password !== undefined) + pos = writeString(this.password, UTF8Length(this.password), byteStream, pos); + break; + + case MESSAGE_TYPE.PUBLISH: + // PUBLISH has a text or binary payload, if text do not add a 2 byte length field, just the UTF characters. + byteStream.set(payloadBytes, pos); + + break; + + // case MESSAGE_TYPE.PUBREC: + // case MESSAGE_TYPE.PUBREL: + // case MESSAGE_TYPE.PUBCOMP: + // break; + + case MESSAGE_TYPE.SUBSCRIBE: + // SUBSCRIBE has a list of topic strings and request QoS + for (var i=0; i> 4; + var messageInfo = first &= 0x0f; + pos += 1; + + + // Decode the remaining length (MBI format) + + var digit; + var remLength = 0; + var multiplier = 1; + do { + if (pos == input.length) { + return [null,startingPos]; + } + digit = input[pos++]; + remLength += ((digit & 0x7F) * multiplier); + multiplier *= 128; + } while ((digit & 0x80) !== 0); + + var endPos = pos+remLength; + if (endPos > input.length) { + return [null,startingPos]; + } + + var wireMessage = new WireMessage(type); + switch(type) { + case MESSAGE_TYPE.CONNACK: + var connectAcknowledgeFlags = input[pos++]; + if (connectAcknowledgeFlags & 0x01) + wireMessage.sessionPresent = true; + wireMessage.returnCode = input[pos++]; + break; + + case MESSAGE_TYPE.PUBLISH: + var qos = (messageInfo >> 1) & 0x03; + + var len = readUint16(input, pos); + pos += 2; + var topicName = parseUTF8(input, pos, len); + pos += len; + // If QoS 1 or 2 there will be a messageIdentifier + if (qos > 0) { + wireMessage.messageIdentifier = readUint16(input, pos); + pos += 2; + } + + var message = new Message(input.subarray(pos, endPos)); + if ((messageInfo & 0x01) == 0x01) + message.retained = true; + if ((messageInfo & 0x08) == 0x08) + message.duplicate = true; + message.qos = qos; + message.destinationName = topicName; + wireMessage.payloadMessage = message; + break; + + case MESSAGE_TYPE.PUBACK: + case MESSAGE_TYPE.PUBREC: + case MESSAGE_TYPE.PUBREL: + case MESSAGE_TYPE.PUBCOMP: + case MESSAGE_TYPE.UNSUBACK: + wireMessage.messageIdentifier = readUint16(input, pos); + break; + + case MESSAGE_TYPE.SUBACK: + wireMessage.messageIdentifier = readUint16(input, pos); + pos += 2; + wireMessage.returnCode = input.subarray(pos, endPos); + break; + + default: + break; + } + + return [wireMessage,endPos]; + } + + function writeUint16(input, buffer, offset) { + buffer[offset++] = input >> 8; //MSB + buffer[offset++] = input % 256; //LSB + return offset; + } + + function writeString(input, utf8Length, buffer, offset) { + offset = writeUint16(utf8Length, buffer, offset); + stringToUTF8(input, buffer, offset); + return offset + utf8Length; + } + + function readUint16(buffer, offset) { + return 256*buffer[offset] + buffer[offset+1]; + } + + /** + * Encodes an MQTT Multi-Byte Integer + * @private + */ + function encodeMBI(number) { + var output = new Array(1); + var numBytes = 0; + + do { + var digit = number % 128; + number = number >> 7; + if (number > 0) { + digit |= 0x80; + } + output[numBytes++] = digit; + } while ( (number > 0) && (numBytes<4) ); + + return output; + } + + /** + * Takes a String and calculates its length in bytes when encoded in UTF8. + * @private + */ + function UTF8Length(input) { + var output = 0; + for (var i = 0; i 0x7FF) + { + // Surrogate pair means its a 4 byte character + if (0xD800 <= charCode && charCode <= 0xDBFF) + { + i++; + output++; + } + output +=3; + } + else if (charCode > 0x7F) + output +=2; + else + output++; + } + return output; + } + + /** + * Takes a String and writes it into an array as UTF8 encoded bytes. + * @private + */ + function stringToUTF8(input, output, start) { + var pos = start; + for (var i = 0; i>6 & 0x1F | 0xC0; + output[pos++] = charCode & 0x3F | 0x80; + } else if (charCode <= 0xFFFF) { + output[pos++] = charCode>>12 & 0x0F | 0xE0; + output[pos++] = charCode>>6 & 0x3F | 0x80; + output[pos++] = charCode & 0x3F | 0x80; + } else { + output[pos++] = charCode>>18 & 0x07 | 0xF0; + output[pos++] = charCode>>12 & 0x3F | 0x80; + output[pos++] = charCode>>6 & 0x3F | 0x80; + output[pos++] = charCode & 0x3F | 0x80; + } + } + return output; + } + + function parseUTF8(input, offset, length) { + var output = ""; + var utf16; + var pos = offset; + + while (pos < offset+length) + { + var byte1 = input[pos++]; + if (byte1 < 128) + utf16 = byte1; + else + { + var byte2 = input[pos++]-128; + if (byte2 < 0) + throw new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16),""])); + if (byte1 < 0xE0) // 2 byte character + utf16 = 64*(byte1-0xC0) + byte2; + else + { + var byte3 = input[pos++]-128; + if (byte3 < 0) + throw new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16), byte3.toString(16)])); + if (byte1 < 0xF0) // 3 byte character + utf16 = 4096*(byte1-0xE0) + 64*byte2 + byte3; + else + { + var byte4 = input[pos++]-128; + if (byte4 < 0) + throw new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16), byte3.toString(16), byte4.toString(16)])); + if (byte1 < 0xF8) // 4 byte character + utf16 = 262144*(byte1-0xF0) + 4096*byte2 + 64*byte3 + byte4; + else // longer encodings are not supported + throw new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16), byte3.toString(16), byte4.toString(16)])); + } + } + } + + if (utf16 > 0xFFFF) // 4 byte character - express as a surrogate pair + { + utf16 -= 0x10000; + output += String.fromCharCode(0xD800 + (utf16 >> 10)); // lead character + utf16 = 0xDC00 + (utf16 & 0x3FF); // trail character + } + output += String.fromCharCode(utf16); + } + return output; + } + + /** + * Repeat keepalive requests, monitor responses. + * @ignore + */ + var Pinger = function(client, keepAliveInterval) { + this._client = client; + this._keepAliveInterval = keepAliveInterval*1000; + this.isReset = false; + + var pingReq = new WireMessage(MESSAGE_TYPE.PINGREQ).encode(); + + var doTimeout = function (pinger) { + return function () { + return doPing.apply(pinger); + }; + }; + + /** @ignore */ + var doPing = function() { + if (!this.isReset) { + this._client._trace("Pinger.doPing", "Timed out"); + this._client._disconnected( ERROR.PING_TIMEOUT.code , format(ERROR.PING_TIMEOUT)); + } else { + this.isReset = false; + this._client._trace("Pinger.doPing", "send PINGREQ"); + this._client.socket.send(pingReq); + this.timeout = setTimeout(doTimeout(this), this._keepAliveInterval); + } + }; + + this.reset = function() { + this.isReset = true; + clearTimeout(this.timeout); + if (this._keepAliveInterval > 0) + this.timeout = setTimeout(doTimeout(this), this._keepAliveInterval); + }; + + this.cancel = function() { + clearTimeout(this.timeout); + }; + }; + + /** + * Monitor request completion. + * @ignore + */ + var Timeout = function(client, timeoutSeconds, action, args) { + if (!timeoutSeconds) + timeoutSeconds = 30; + + var doTimeout = function (action, client, args) { + return function () { + return action.apply(client, args); + }; + }; + this.timeout = setTimeout(doTimeout(action, client, args), timeoutSeconds * 1000); + + this.cancel = function() { + clearTimeout(this.timeout); + }; + }; + + /** + * Internal implementation of the Websockets MQTT V3.1 client. + * + * @name Paho.ClientImpl @constructor + * @param {String} host the DNS nameof the webSocket host. + * @param {Number} port the port number for that host. + * @param {String} clientId the MQ client identifier. + */ + var ClientImpl = function (uri, host, port, path, clientId) { + // Check dependencies are satisfied in this browser. + if (!("WebSocket" in global && global.WebSocket !== null)) { + throw new Error(format(ERROR.UNSUPPORTED, ["WebSocket"])); + } + if (!("ArrayBuffer" in global && global.ArrayBuffer !== null)) { + throw new Error(format(ERROR.UNSUPPORTED, ["ArrayBuffer"])); + } + this._trace("Paho.Client", uri, host, port, path, clientId); + + this.host = host; + this.port = port; + this.path = path; + this.uri = uri; + this.clientId = clientId; + this._wsuri = null; + + // Local storagekeys are qualified with the following string. + // The conditional inclusion of path in the key is for backward + // compatibility to when the path was not configurable and assumed to + // be /mqtt + this._localKey=host+":"+port+(path!="/mqtt"?":"+path:"")+":"+clientId+":"; + + // Create private instance-only message queue + // Internal queue of messages to be sent, in sending order. + this._msg_queue = []; + this._buffered_msg_queue = []; + + // Messages we have sent and are expecting a response for, indexed by their respective message ids. + this._sentMessages = {}; + + // Messages we have received and acknowleged and are expecting a confirm message for + // indexed by their respective message ids. + this._receivedMessages = {}; + + // Internal list of callbacks to be executed when messages + // have been successfully sent over web socket, e.g. disconnect + // when it doesn't have to wait for ACK, just message is dispatched. + this._notify_msg_sent = {}; + + // Unique identifier for SEND messages, incrementing + // counter as messages are sent. + this._message_identifier = 1; + + // Used to determine the transmission sequence of stored sent messages. + this._sequence = 0; + + + // Load the local state, if any, from the saved version, only restore state relevant to this client. + for (var key in localStorage) + if ( key.indexOf("Sent:"+this._localKey) === 0 || key.indexOf("Received:"+this._localKey) === 0) + this.restore(key); + }; + + // Messaging Client public instance members. + ClientImpl.prototype.host = null; + ClientImpl.prototype.port = null; + ClientImpl.prototype.path = null; + ClientImpl.prototype.uri = null; + ClientImpl.prototype.clientId = null; + + // Messaging Client private instance members. + ClientImpl.prototype.socket = null; + /* true once we have received an acknowledgement to a CONNECT packet. */ + ClientImpl.prototype.connected = false; + /* The largest message identifier allowed, may not be larger than 2**16 but + * if set smaller reduces the maximum number of outbound messages allowed. + */ + ClientImpl.prototype.maxMessageIdentifier = 65536; + ClientImpl.prototype.connectOptions = null; + ClientImpl.prototype.hostIndex = null; + ClientImpl.prototype.onConnected = null; + ClientImpl.prototype.onConnectionLost = null; + ClientImpl.prototype.onMessageDelivered = null; + ClientImpl.prototype.onMessageArrived = null; + ClientImpl.prototype.traceFunction = null; + ClientImpl.prototype._msg_queue = null; + ClientImpl.prototype._buffered_msg_queue = null; + ClientImpl.prototype._connectTimeout = null; + /* The sendPinger monitors how long we allow before we send data to prove to the server that we are alive. */ + ClientImpl.prototype.sendPinger = null; + /* The receivePinger monitors how long we allow before we require evidence that the server is alive. */ + ClientImpl.prototype.receivePinger = null; + ClientImpl.prototype._reconnectInterval = 1; // Reconnect Delay, starts at 1 second + ClientImpl.prototype._reconnecting = false; + ClientImpl.prototype._reconnectTimeout = null; + ClientImpl.prototype.disconnectedPublishing = false; + ClientImpl.prototype.disconnectedBufferSize = 5000; + + ClientImpl.prototype.receiveBuffer = null; + + ClientImpl.prototype._traceBuffer = null; + ClientImpl.prototype._MAX_TRACE_ENTRIES = 100; + + ClientImpl.prototype.connect = function (connectOptions) { + var connectOptionsMasked = this._traceMask(connectOptions, "password"); + this._trace("Client.connect", connectOptionsMasked, this.socket, this.connected); + + if (this.connected) + throw new Error(format(ERROR.INVALID_STATE, ["already connected"])); + if (this.socket) + throw new Error(format(ERROR.INVALID_STATE, ["already connected"])); + + if (this._reconnecting) { + // connect() function is called while reconnect is in progress. + // Terminate the auto reconnect process to use new connect options. + this._reconnectTimeout.cancel(); + this._reconnectTimeout = null; + this._reconnecting = false; + } + + this.connectOptions = connectOptions; + this._reconnectInterval = 1; + this._reconnecting = false; + if (connectOptions.uris) { + this.hostIndex = 0; + this._doConnect(connectOptions.uris[0]); + } else { + this._doConnect(this.uri); + } + + }; + + ClientImpl.prototype.subscribe = function (filter, subscribeOptions) { + this._trace("Client.subscribe", filter, subscribeOptions); + + if (!this.connected) + throw new Error(format(ERROR.INVALID_STATE, ["not connected"])); + + var wireMessage = new WireMessage(MESSAGE_TYPE.SUBSCRIBE); + wireMessage.topics = filter.constructor === Array ? filter : [filter]; + if (subscribeOptions.qos === undefined) + subscribeOptions.qos = 0; + wireMessage.requestedQos = []; + for (var i = 0; i < wireMessage.topics.length; i++) + wireMessage.requestedQos[i] = subscribeOptions.qos; + + if (subscribeOptions.onSuccess) { + wireMessage.onSuccess = function(grantedQos) {subscribeOptions.onSuccess({invocationContext:subscribeOptions.invocationContext,grantedQos:grantedQos});}; + } + + if (subscribeOptions.onFailure) { + wireMessage.onFailure = function(errorCode) {subscribeOptions.onFailure({invocationContext:subscribeOptions.invocationContext,errorCode:errorCode, errorMessage:format(errorCode)});}; + } + + if (subscribeOptions.timeout) { + wireMessage.timeOut = new Timeout(this, subscribeOptions.timeout, subscribeOptions.onFailure, + [{invocationContext:subscribeOptions.invocationContext, + errorCode:ERROR.SUBSCRIBE_TIMEOUT.code, + errorMessage:format(ERROR.SUBSCRIBE_TIMEOUT)}]); + } + + // All subscriptions return a SUBACK. + this._requires_ack(wireMessage); + this._schedule_message(wireMessage); + }; + + /** @ignore */ + ClientImpl.prototype.unsubscribe = function(filter, unsubscribeOptions) { + this._trace("Client.unsubscribe", filter, unsubscribeOptions); + + if (!this.connected) + throw new Error(format(ERROR.INVALID_STATE, ["not connected"])); + + var wireMessage = new WireMessage(MESSAGE_TYPE.UNSUBSCRIBE); + wireMessage.topics = filter.constructor === Array ? filter : [filter]; + + if (unsubscribeOptions.onSuccess) { + wireMessage.callback = function() {unsubscribeOptions.onSuccess({invocationContext:unsubscribeOptions.invocationContext});}; + } + if (unsubscribeOptions.timeout) { + wireMessage.timeOut = new Timeout(this, unsubscribeOptions.timeout, unsubscribeOptions.onFailure, + [{invocationContext:unsubscribeOptions.invocationContext, + errorCode:ERROR.UNSUBSCRIBE_TIMEOUT.code, + errorMessage:format(ERROR.UNSUBSCRIBE_TIMEOUT)}]); + } + + // All unsubscribes return a SUBACK. + this._requires_ack(wireMessage); + this._schedule_message(wireMessage); + }; + + ClientImpl.prototype.send = function (message) { + this._trace("Client.send", message); + + var wireMessage = new WireMessage(MESSAGE_TYPE.PUBLISH); + wireMessage.payloadMessage = message; + + if (this.connected) { + // Mark qos 1 & 2 message as "ACK required" + // For qos 0 message, invoke onMessageDelivered callback if there is one. + // Then schedule the message. + if (message.qos > 0) { + this._requires_ack(wireMessage); + } else if (this.onMessageDelivered) { + this._notify_msg_sent[wireMessage] = this.onMessageDelivered(wireMessage.payloadMessage); + } + this._schedule_message(wireMessage); + } else { + // Currently disconnected, will not schedule this message + // Check if reconnecting is in progress and disconnected publish is enabled. + if (this._reconnecting && this.disconnectedPublishing) { + // Check the limit which include the "required ACK" messages + var messageCount = Object.keys(this._sentMessages).length + this._buffered_msg_queue.length; + if (messageCount > this.disconnectedBufferSize) { + throw new Error(format(ERROR.BUFFER_FULL, [this.disconnectedBufferSize])); + } else { + if (message.qos > 0) { + // Mark this message as "ACK required" + this._requires_ack(wireMessage); + } else { + wireMessage.sequence = ++this._sequence; + // Add messages in fifo order to array, by adding to start + this._buffered_msg_queue.unshift(wireMessage); + } + } + } else { + throw new Error(format(ERROR.INVALID_STATE, ["not connected"])); + } + } + }; + + ClientImpl.prototype.disconnect = function () { + this._trace("Client.disconnect"); + + if (this._reconnecting) { + // disconnect() function is called while reconnect is in progress. + // Terminate the auto reconnect process. + this._reconnectTimeout.cancel(); + this._reconnectTimeout = null; + this._reconnecting = false; + } + + if (!this.socket) + throw new Error(format(ERROR.INVALID_STATE, ["not connecting or connected"])); + + var wireMessage = new WireMessage(MESSAGE_TYPE.DISCONNECT); + + // Run the disconnected call back as soon as the message has been sent, + // in case of a failure later on in the disconnect processing. + // as a consequence, the _disconected call back may be run several times. + this._notify_msg_sent[wireMessage] = scope(this._disconnected, this); + + this._schedule_message(wireMessage); + }; + + ClientImpl.prototype.getTraceLog = function () { + if ( this._traceBuffer !== null ) { + this._trace("Client.getTraceLog", new Date()); + this._trace("Client.getTraceLog in flight messages", this._sentMessages.length); + for (var key in this._sentMessages) + this._trace("_sentMessages ",key, this._sentMessages[key]); + for (var key in this._receivedMessages) + this._trace("_receivedMessages ",key, this._receivedMessages[key]); + + return this._traceBuffer; + } + }; + + ClientImpl.prototype.startTrace = function () { + if ( this._traceBuffer === null ) { + this._traceBuffer = []; + } + this._trace("Client.startTrace", new Date(), version); + }; + + ClientImpl.prototype.stopTrace = function () { + delete this._traceBuffer; + }; + + ClientImpl.prototype._doConnect = function (wsurl) { + // When the socket is open, this client will send the CONNECT WireMessage using the saved parameters. + if (this.connectOptions.useSSL) { + var uriParts = wsurl.split(":"); + uriParts[0] = "wss"; + wsurl = uriParts.join(":"); + } + this._wsuri = wsurl; + this.connected = false; + + + + if (this.connectOptions.mqttVersion < 4) { + this.socket = new WebSocket(wsurl, ["mqttv3.1"]); + } else { + this.socket = new WebSocket(wsurl, ["mqtt"]); + } + this.socket.binaryType = "arraybuffer"; + this.socket.onopen = scope(this._on_socket_open, this); + this.socket.onmessage = scope(this._on_socket_message, this); + this.socket.onerror = scope(this._on_socket_error, this); + this.socket.onclose = scope(this._on_socket_close, this); + + this.sendPinger = new Pinger(this, this.connectOptions.keepAliveInterval); + this.receivePinger = new Pinger(this, this.connectOptions.keepAliveInterval); + if (this._connectTimeout) { + this._connectTimeout.cancel(); + this._connectTimeout = null; + } + this._connectTimeout = new Timeout(this, this.connectOptions.timeout, this._disconnected, [ERROR.CONNECT_TIMEOUT.code, format(ERROR.CONNECT_TIMEOUT)]); + }; + + + // Schedule a new message to be sent over the WebSockets + // connection. CONNECT messages cause WebSocket connection + // to be started. All other messages are queued internally + // until this has happened. When WS connection starts, process + // all outstanding messages. + ClientImpl.prototype._schedule_message = function (message) { + // Add messages in fifo order to array, by adding to start + this._msg_queue.unshift(message); + // Process outstanding messages in the queue if we have an open socket, and have received CONNACK. + if (this.connected) { + this._process_queue(); + } + }; + + ClientImpl.prototype.store = function(prefix, wireMessage) { + var storedMessage = {type:wireMessage.type, messageIdentifier:wireMessage.messageIdentifier, version:1}; + + switch(wireMessage.type) { + case MESSAGE_TYPE.PUBLISH: + if(wireMessage.pubRecReceived) + storedMessage.pubRecReceived = true; + + // Convert the payload to a hex string. + storedMessage.payloadMessage = {}; + var hex = ""; + var messageBytes = wireMessage.payloadMessage.payloadBytes; + for (var i=0; i= 2) { + var x = parseInt(hex.substring(0, 2), 16); + hex = hex.substring(2, hex.length); + byteStream[i++] = x; + } + var payloadMessage = new Message(byteStream); + + payloadMessage.qos = storedMessage.payloadMessage.qos; + payloadMessage.destinationName = storedMessage.payloadMessage.destinationName; + if (storedMessage.payloadMessage.duplicate) + payloadMessage.duplicate = true; + if (storedMessage.payloadMessage.retained) + payloadMessage.retained = true; + wireMessage.payloadMessage = payloadMessage; + + break; + + default: + throw Error(format(ERROR.INVALID_STORED_DATA, [key, value])); + } + + if (key.indexOf("Sent:"+this._localKey) === 0) { + wireMessage.payloadMessage.duplicate = true; + this._sentMessages[wireMessage.messageIdentifier] = wireMessage; + } else if (key.indexOf("Received:"+this._localKey) === 0) { + this._receivedMessages[wireMessage.messageIdentifier] = wireMessage; + } + }; + + ClientImpl.prototype._process_queue = function () { + var message = null; + + // Send all queued messages down socket connection + while ((message = this._msg_queue.pop())) { + this._socket_send(message); + // Notify listeners that message was successfully sent + if (this._notify_msg_sent[message]) { + this._notify_msg_sent[message](); + delete this._notify_msg_sent[message]; + } + } + }; + + /** + * Expect an ACK response for this message. Add message to the set of in progress + * messages and set an unused identifier in this message. + * @ignore + */ + ClientImpl.prototype._requires_ack = function (wireMessage) { + var messageCount = Object.keys(this._sentMessages).length; + if (messageCount > this.maxMessageIdentifier) + throw Error ("Too many messages:"+messageCount); + + while(this._sentMessages[this._message_identifier] !== undefined) { + this._message_identifier++; + } + wireMessage.messageIdentifier = this._message_identifier; + this._sentMessages[wireMessage.messageIdentifier] = wireMessage; + if (wireMessage.type === MESSAGE_TYPE.PUBLISH) { + this.store("Sent:", wireMessage); + } + if (this._message_identifier === this.maxMessageIdentifier) { + this._message_identifier = 1; + } + }; + + /** + * Called when the underlying websocket has been opened. + * @ignore + */ + ClientImpl.prototype._on_socket_open = function () { + // Create the CONNECT message object. + var wireMessage = new WireMessage(MESSAGE_TYPE.CONNECT, this.connectOptions); + wireMessage.clientId = this.clientId; + this._socket_send(wireMessage); + }; + + /** + * Called when the underlying websocket has received a complete packet. + * @ignore + */ + ClientImpl.prototype._on_socket_message = function (event) { + this._trace("Client._on_socket_message", event.data); + var messages = this._deframeMessages(event.data); + for (var i = 0; i < messages.length; i+=1) { + this._handleMessage(messages[i]); + } + }; + + ClientImpl.prototype._deframeMessages = function(data) { + var byteArray = new Uint8Array(data); + var messages = []; + if (this.receiveBuffer) { + var newData = new Uint8Array(this.receiveBuffer.length+byteArray.length); + newData.set(this.receiveBuffer); + newData.set(byteArray,this.receiveBuffer.length); + byteArray = newData; + delete this.receiveBuffer; + } + try { + var offset = 0; + while(offset < byteArray.length) { + var result = decodeMessage(byteArray,offset); + var wireMessage = result[0]; + offset = result[1]; + if (wireMessage !== null) { + messages.push(wireMessage); + } else { + break; + } + } + if (offset < byteArray.length) { + this.receiveBuffer = byteArray.subarray(offset); + } + } catch (error) { + var errorStack = ((error.hasOwnProperty("stack") == "undefined") ? error.stack.toString() : "No Error Stack Available"); + this._disconnected(ERROR.INTERNAL_ERROR.code , format(ERROR.INTERNAL_ERROR, [error.message,errorStack])); + return; + } + return messages; + }; + + ClientImpl.prototype._handleMessage = function(wireMessage) { + + this._trace("Client._handleMessage", wireMessage); + + try { + switch(wireMessage.type) { + case MESSAGE_TYPE.CONNACK: + this._connectTimeout.cancel(); + if (this._reconnectTimeout) + this._reconnectTimeout.cancel(); + + // If we have started using clean session then clear up the local state. + if (this.connectOptions.cleanSession) { + for (var key in this._sentMessages) { + var sentMessage = this._sentMessages[key]; + localStorage.removeItem("Sent:"+this._localKey+sentMessage.messageIdentifier); + } + this._sentMessages = {}; + + for (var key in this._receivedMessages) { + var receivedMessage = this._receivedMessages[key]; + localStorage.removeItem("Received:"+this._localKey+receivedMessage.messageIdentifier); + } + this._receivedMessages = {}; + } + // Client connected and ready for business. + if (wireMessage.returnCode === 0) { + + this.connected = true; + // Jump to the end of the list of uris and stop looking for a good host. + + if (this.connectOptions.uris) + this.hostIndex = this.connectOptions.uris.length; + + } else { + this._disconnected(ERROR.CONNACK_RETURNCODE.code , format(ERROR.CONNACK_RETURNCODE, [wireMessage.returnCode, CONNACK_RC[wireMessage.returnCode]])); + break; + } + + // Resend messages. + var sequencedMessages = []; + for (var msgId in this._sentMessages) { + if (this._sentMessages.hasOwnProperty(msgId)) + sequencedMessages.push(this._sentMessages[msgId]); + } + + // Also schedule qos 0 buffered messages if any + if (this._buffered_msg_queue.length > 0) { + var msg = null; + while ((msg = this._buffered_msg_queue.pop())) { + sequencedMessages.push(msg); + if (this.onMessageDelivered) + this._notify_msg_sent[msg] = this.onMessageDelivered(msg.payloadMessage); + } + } + + // Sort sentMessages into the original sent order. + var sequencedMessages = sequencedMessages.sort(function(a,b) {return a.sequence - b.sequence;} ); + for (var i=0, len=sequencedMessages.length; i + * Most applications will create just one Client object and then call its connect() method, + * however applications can create more than one Client object if they wish. + * In this case the combination of host, port and clientId attributes must be different for each Client object. + *

+ * The send, subscribe and unsubscribe methods are implemented as asynchronous JavaScript methods + * (even though the underlying protocol exchange might be synchronous in nature). + * This means they signal their completion by calling back to the application, + * via Success or Failure callback functions provided by the application on the method in question. + * Such callbacks are called at most once per method invocation and do not persist beyond the lifetime + * of the script that made the invocation. + *

+ * In contrast there are some callback functions, most notably onMessageArrived, + * that are defined on the {@link Paho.Client} object. + * These may get called multiple times, and aren't directly related to specific method invocations made by the client. + * + * @name Paho.Client + * + * @constructor + * + * @param {string} host - the address of the messaging server, as a fully qualified WebSocket URI, as a DNS name or dotted decimal IP address. + * @param {number} port - the port number to connect to - only required if host is not a URI + * @param {string} path - the path on the host to connect to - only used if host is not a URI. Default: '/mqtt'. + * @param {string} clientId - the Messaging client identifier, between 1 and 23 characters in length. + * + * @property {string} host - read only the server's DNS hostname or dotted decimal IP address. + * @property {number} port - read only the server's port. + * @property {string} path - read only the server's path. + * @property {string} clientId - read only used when connecting to the server. + * @property {function} onConnectionLost - called when a connection has been lost. + * after a connect() method has succeeded. + * Establish the call back used when a connection has been lost. The connection may be + * lost because the client initiates a disconnect or because the server or network + * cause the client to be disconnected. The disconnect call back may be called without + * the connectionComplete call back being invoked if, for example the client fails to + * connect. + * A single response object parameter is passed to the onConnectionLost callback containing the following fields: + *

    + *
  1. errorCode + *
  2. errorMessage + *
+ * @property {function} onMessageDelivered - called when a message has been delivered. + * All processing that this Client will ever do has been completed. So, for example, + * in the case of a Qos=2 message sent by this client, the PubComp flow has been received from the server + * and the message has been removed from persistent storage before this callback is invoked. + * Parameters passed to the onMessageDelivered callback are: + *
    + *
  1. {@link Paho.Message} that was delivered. + *
+ * @property {function} onMessageArrived - called when a message has arrived in this Paho.client. + * Parameters passed to the onMessageArrived callback are: + *
    + *
  1. {@link Paho.Message} that has arrived. + *
+ * @property {function} onConnected - called when a connection is successfully made to the server. + * after a connect() method. + * Parameters passed to the onConnected callback are: + *
    + *
  1. reconnect (boolean) - If true, the connection was the result of a reconnect.
  2. + *
  3. URI (string) - The URI used to connect to the server.
  4. + *
+ * @property {boolean} disconnectedPublishing - if set, will enable disconnected publishing in + * in the event that the connection to the server is lost. + * @property {number} disconnectedBufferSize - Used to set the maximum number of messages that the disconnected + * buffer will hold before rejecting new messages. Default size: 5000 messages + * @property {function} trace - called whenever trace is called. TODO + */ + var Client = function (host, port, path, clientId) { + + var uri; + + if (typeof host !== "string") + throw new Error(format(ERROR.INVALID_TYPE, [typeof host, "host"])); + + if (arguments.length == 2) { + // host: must be full ws:// uri + // port: clientId + clientId = port; + uri = host; + var match = uri.match(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/); + if (match) { + host = match[4]||match[2]; + port = parseInt(match[7]); + path = match[8]; + } else { + throw new Error(format(ERROR.INVALID_ARGUMENT,[host,"host"])); + } + } else { + if (arguments.length == 3) { + clientId = path; + path = "/mqtt"; + } + if (typeof port !== "number" || port < 0) + throw new Error(format(ERROR.INVALID_TYPE, [typeof port, "port"])); + if (typeof path !== "string") + throw new Error(format(ERROR.INVALID_TYPE, [typeof path, "path"])); + + var ipv6AddSBracket = (host.indexOf(":") !== -1 && host.slice(0,1) !== "[" && host.slice(-1) !== "]"); + uri = "ws://"+(ipv6AddSBracket?"["+host+"]":host)+":"+port+path; + } + + var clientIdLength = 0; + for (var i = 0; i 65535) + throw new Error(format(ERROR.INVALID_ARGUMENT, [clientId, "clientId"])); + + var client = new ClientImpl(uri, host, port, path, clientId); + + //Public Properties + Object.defineProperties(this,{ + "host":{ + get: function() { return host; }, + set: function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); } + }, + "port":{ + get: function() { return port; }, + set: function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); } + }, + "path":{ + get: function() { return path; }, + set: function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); } + }, + "uri":{ + get: function() { return uri; }, + set: function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); } + }, + "clientId":{ + get: function() { return client.clientId; }, + set: function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); } + }, + "onConnected":{ + get: function() { return client.onConnected; }, + set: function(newOnConnected) { + if (typeof newOnConnected === "function") + client.onConnected = newOnConnected; + else + throw new Error(format(ERROR.INVALID_TYPE, [typeof newOnConnected, "onConnected"])); + } + }, + "disconnectedPublishing":{ + get: function() { return client.disconnectedPublishing; }, + set: function(newDisconnectedPublishing) { + client.disconnectedPublishing = newDisconnectedPublishing; + } + }, + "disconnectedBufferSize":{ + get: function() { return client.disconnectedBufferSize; }, + set: function(newDisconnectedBufferSize) { + client.disconnectedBufferSize = newDisconnectedBufferSize; + } + }, + "onConnectionLost":{ + get: function() { return client.onConnectionLost; }, + set: function(newOnConnectionLost) { + if (typeof newOnConnectionLost === "function") + client.onConnectionLost = newOnConnectionLost; + else + throw new Error(format(ERROR.INVALID_TYPE, [typeof newOnConnectionLost, "onConnectionLost"])); + } + }, + "onMessageDelivered":{ + get: function() { return client.onMessageDelivered; }, + set: function(newOnMessageDelivered) { + if (typeof newOnMessageDelivered === "function") + client.onMessageDelivered = newOnMessageDelivered; + else + throw new Error(format(ERROR.INVALID_TYPE, [typeof newOnMessageDelivered, "onMessageDelivered"])); + } + }, + "onMessageArrived":{ + get: function() { return client.onMessageArrived; }, + set: function(newOnMessageArrived) { + if (typeof newOnMessageArrived === "function") + client.onMessageArrived = newOnMessageArrived; + else + throw new Error(format(ERROR.INVALID_TYPE, [typeof newOnMessageArrived, "onMessageArrived"])); + } + }, + "trace":{ + get: function() { return client.traceFunction; }, + set: function(trace) { + if(typeof trace === "function"){ + client.traceFunction = trace; + }else{ + throw new Error(format(ERROR.INVALID_TYPE, [typeof trace, "onTrace"])); + } + } + }, + }); + + /** + * Connect this Messaging client to its server. + * + * @name Paho.Client#connect + * @function + * @param {object} connectOptions - Attributes used with the connection. + * @param {number} connectOptions.timeout - If the connect has not succeeded within this + * number of seconds, it is deemed to have failed. + * The default is 30 seconds. + * @param {string} connectOptions.userName - Authentication username for this connection. + * @param {string} connectOptions.password - Authentication password for this connection. + * @param {Paho.Message} connectOptions.willMessage - sent by the server when the client + * disconnects abnormally. + * @param {number} connectOptions.keepAliveInterval - the server disconnects this client if + * there is no activity for this number of seconds. + * The default value of 60 seconds is assumed if not set. + * @param {boolean} connectOptions.cleanSession - if true(default) the client and server + * persistent state is deleted on successful connect. + * @param {boolean} connectOptions.useSSL - if present and true, use an SSL Websocket connection. + * @param {object} connectOptions.invocationContext - passed to the onSuccess callback or onFailure callback. + * @param {function} connectOptions.onSuccess - called when the connect acknowledgement + * has been received from the server. + * A single response object parameter is passed to the onSuccess callback containing the following fields: + *
    + *
  1. invocationContext as passed in to the onSuccess method in the connectOptions. + *
+ * @param {function} connectOptions.onFailure - called when the connect request has failed or timed out. + * A single response object parameter is passed to the onFailure callback containing the following fields: + *
    + *
  1. invocationContext as passed in to the onFailure method in the connectOptions. + *
  2. errorCode a number indicating the nature of the error. + *
  3. errorMessage text describing the error. + *
+ * @param {array} connectOptions.hosts - If present this contains either a set of hostnames or fully qualified + * WebSocket URIs (ws://iot.eclipse.org:80/ws), that are tried in order in place + * of the host and port paramater on the construtor. The hosts are tried one at at time in order until + * one of then succeeds. + * @param {array} connectOptions.ports - If present the set of ports matching the hosts. If hosts contains URIs, this property + * is not used. + * @param {boolean} connectOptions.reconnect - Sets whether the client will automatically attempt to reconnect + * to the server if the connection is lost. + *
    + *
  • If set to false, the client will not attempt to automatically reconnect to the server in the event that the + * connection is lost.
  • + *
  • If set to true, in the event that the connection is lost, the client will attempt to reconnect to the server. + * It will initially wait 1 second before it attempts to reconnect, for every failed reconnect attempt, the delay + * will double until it is at 2 minutes at which point the delay will stay at 2 minutes.
  • + *
+ * @param {number} connectOptions.mqttVersion - The version of MQTT to use to connect to the MQTT Broker. + *
    + *
  • 3 - MQTT V3.1
  • + *
  • 4 - MQTT V3.1.1
  • + *
+ * @param {boolean} connectOptions.mqttVersionExplicit - If set to true, will force the connection to use the + * selected MQTT Version or will fail to connect. + * @param {array} connectOptions.uris - If present, should contain a list of fully qualified WebSocket uris + * (e.g. ws://iot.eclipse.org:80/ws), that are tried in order in place of the host and port parameter of the construtor. + * The uris are tried one at a time in order until one of them succeeds. Do not use this in conjunction with hosts as + * the hosts array will be converted to uris and will overwrite this property. + * @throws {InvalidState} If the client is not in disconnected state. The client must have received connectionLost + * or disconnected before calling connect for a second or subsequent time. + */ + this.connect = function (connectOptions) { + connectOptions = connectOptions || {} ; + validate(connectOptions, {timeout:"number", + userName:"string", + password:"string", + willMessage:"object", + keepAliveInterval:"number", + cleanSession:"boolean", + useSSL:"boolean", + invocationContext:"object", + onSuccess:"function", + onFailure:"function", + hosts:"object", + ports:"object", + reconnect:"boolean", + mqttVersion:"number", + mqttVersionExplicit:"boolean", + uris: "object"}); + + // If no keep alive interval is set, assume 60 seconds. + if (connectOptions.keepAliveInterval === undefined) + connectOptions.keepAliveInterval = 60; + + if (connectOptions.mqttVersion > 4 || connectOptions.mqttVersion < 3) { + throw new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.mqttVersion, "connectOptions.mqttVersion"])); + } + + if (connectOptions.mqttVersion === undefined) { + connectOptions.mqttVersionExplicit = false; + connectOptions.mqttVersion = 4; + } else { + connectOptions.mqttVersionExplicit = true; + } + + //Check that if password is set, so is username + if (connectOptions.password !== undefined && connectOptions.userName === undefined) + throw new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.password, "connectOptions.password"])); + + if (connectOptions.willMessage) { + if (!(connectOptions.willMessage instanceof Message)) + throw new Error(format(ERROR.INVALID_TYPE, [connectOptions.willMessage, "connectOptions.willMessage"])); + // The will message must have a payload that can be represented as a string. + // Cause the willMessage to throw an exception if this is not the case. + connectOptions.willMessage.stringPayload = null; + + if (typeof connectOptions.willMessage.destinationName === "undefined") + throw new Error(format(ERROR.INVALID_TYPE, [typeof connectOptions.willMessage.destinationName, "connectOptions.willMessage.destinationName"])); + } + if (typeof connectOptions.cleanSession === "undefined") + connectOptions.cleanSession = true; + if (connectOptions.hosts) { + + if (!(connectOptions.hosts instanceof Array) ) + throw new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.hosts, "connectOptions.hosts"])); + if (connectOptions.hosts.length <1 ) + throw new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.hosts, "connectOptions.hosts"])); + + var usingURIs = false; + for (var i = 0; i + * @param {object} subscribeOptions - used to control the subscription + * + * @param {number} subscribeOptions.qos - the maximum qos of any publications sent + * as a result of making this subscription. + * @param {object} subscribeOptions.invocationContext - passed to the onSuccess callback + * or onFailure callback. + * @param {function} subscribeOptions.onSuccess - called when the subscribe acknowledgement + * has been received from the server. + * A single response object parameter is passed to the onSuccess callback containing the following fields: + *
    + *
  1. invocationContext if set in the subscribeOptions. + *
+ * @param {function} subscribeOptions.onFailure - called when the subscribe request has failed or timed out. + * A single response object parameter is passed to the onFailure callback containing the following fields: + *
    + *
  1. invocationContext - if set in the subscribeOptions. + *
  2. errorCode - a number indicating the nature of the error. + *
  3. errorMessage - text describing the error. + *
+ * @param {number} subscribeOptions.timeout - which, if present, determines the number of + * seconds after which the onFailure calback is called. + * The presence of a timeout does not prevent the onSuccess + * callback from being called when the subscribe completes. + * @throws {InvalidState} if the client is not in connected state. + */ + this.subscribe = function (filter, subscribeOptions) { + if (typeof filter !== "string" && filter.constructor !== Array) + throw new Error("Invalid argument:"+filter); + subscribeOptions = subscribeOptions || {} ; + validate(subscribeOptions, {qos:"number", + invocationContext:"object", + onSuccess:"function", + onFailure:"function", + timeout:"number" + }); + if (subscribeOptions.timeout && !subscribeOptions.onFailure) + throw new Error("subscribeOptions.timeout specified with no onFailure callback."); + if (typeof subscribeOptions.qos !== "undefined" && !(subscribeOptions.qos === 0 || subscribeOptions.qos === 1 || subscribeOptions.qos === 2 )) + throw new Error(format(ERROR.INVALID_ARGUMENT, [subscribeOptions.qos, "subscribeOptions.qos"])); + client.subscribe(filter, subscribeOptions); + }; + + /** + * Unsubscribe for messages, stop receiving messages sent to destinations described by the filter. + * + * @name Paho.Client#unsubscribe + * @function + * @param {string} filter - describing the destinations to receive messages from. + * @param {object} unsubscribeOptions - used to control the subscription + * @param {object} unsubscribeOptions.invocationContext - passed to the onSuccess callback + or onFailure callback. + * @param {function} unsubscribeOptions.onSuccess - called when the unsubscribe acknowledgement has been received from the server. + * A single response object parameter is passed to the + * onSuccess callback containing the following fields: + *
    + *
  1. invocationContext - if set in the unsubscribeOptions. + *
+ * @param {function} unsubscribeOptions.onFailure called when the unsubscribe request has failed or timed out. + * A single response object parameter is passed to the onFailure callback containing the following fields: + *
    + *
  1. invocationContext - if set in the unsubscribeOptions. + *
  2. errorCode - a number indicating the nature of the error. + *
  3. errorMessage - text describing the error. + *
+ * @param {number} unsubscribeOptions.timeout - which, if present, determines the number of seconds + * after which the onFailure callback is called. The presence of + * a timeout does not prevent the onSuccess callback from being + * called when the unsubscribe completes + * @throws {InvalidState} if the client is not in connected state. + */ + this.unsubscribe = function (filter, unsubscribeOptions) { + if (typeof filter !== "string" && filter.constructor !== Array) + throw new Error("Invalid argument:"+filter); + unsubscribeOptions = unsubscribeOptions || {} ; + validate(unsubscribeOptions, {invocationContext:"object", + onSuccess:"function", + onFailure:"function", + timeout:"number" + }); + if (unsubscribeOptions.timeout && !unsubscribeOptions.onFailure) + throw new Error("unsubscribeOptions.timeout specified with no onFailure callback."); + client.unsubscribe(filter, unsubscribeOptions); + }; + + /** + * Send a message to the consumers of the destination in the Message. + * + * @name Paho.Client#send + * @function + * @param {string|Paho.Message} topic - mandatory The name of the destination to which the message is to be sent. + * - If it is the only parameter, used as Paho.Message object. + * @param {String|ArrayBuffer} payload - The message data to be sent. + * @param {number} qos The Quality of Service used to deliver the message. + *
+ *
0 Best effort (default). + *
1 At least once. + *
2 Exactly once. + *
+ * @param {Boolean} retained If true, the message is to be retained by the server and delivered + * to both current and future subscriptions. + * If false the server only delivers the message to current subscribers, this is the default for new Messages. + * A received message has the retained boolean set to true if the message was published + * with the retained boolean set to true + * and the subscrption was made after the message has been published. + * @throws {InvalidState} if the client is not connected. + */ + this.send = function (topic,payload,qos,retained) { + var message ; + + if(arguments.length === 0){ + throw new Error("Invalid argument."+"length"); + + }else if(arguments.length == 1) { + + if (!(topic instanceof Message) && (typeof topic !== "string")) + throw new Error("Invalid argument:"+ typeof topic); + + message = topic; + if (typeof message.destinationName === "undefined") + throw new Error(format(ERROR.INVALID_ARGUMENT,[message.destinationName,"Message.destinationName"])); + client.send(message); + + }else { + //parameter checking in Message object + message = new Message(payload); + message.destinationName = topic; + if(arguments.length >= 3) + message.qos = qos; + if(arguments.length >= 4) + message.retained = retained; + client.send(message); + } + }; + + /** + * Publish a message to the consumers of the destination in the Message. + * Synonym for Paho.Mqtt.Client#send + * + * @name Paho.Client#publish + * @function + * @param {string|Paho.Message} topic - mandatory The name of the topic to which the message is to be published. + * - If it is the only parameter, used as Paho.Message object. + * @param {String|ArrayBuffer} payload - The message data to be published. + * @param {number} qos The Quality of Service used to deliver the message. + *
+ *
0 Best effort (default). + *
1 At least once. + *
2 Exactly once. + *
+ * @param {Boolean} retained If true, the message is to be retained by the server and delivered + * to both current and future subscriptions. + * If false the server only delivers the message to current subscribers, this is the default for new Messages. + * A received message has the retained boolean set to true if the message was published + * with the retained boolean set to true + * and the subscrption was made after the message has been published. + * @throws {InvalidState} if the client is not connected. + */ + this.publish = function(topic,payload,qos,retained) { + var message ; + + if(arguments.length === 0){ + throw new Error("Invalid argument."+"length"); + + }else if(arguments.length == 1) { + + if (!(topic instanceof Message) && (typeof topic !== "string")) + throw new Error("Invalid argument:"+ typeof topic); + + message = topic; + if (typeof message.destinationName === "undefined") + throw new Error(format(ERROR.INVALID_ARGUMENT,[message.destinationName,"Message.destinationName"])); + client.send(message); + + }else { + //parameter checking in Message object + message = new Message(payload); + message.destinationName = topic; + if(arguments.length >= 3) + message.qos = qos; + if(arguments.length >= 4) + message.retained = retained; + client.send(message); + } + }; + + /** + * Normal disconnect of this Messaging client from its server. + * + * @name Paho.Client#disconnect + * @function + * @throws {InvalidState} if the client is already disconnected. + */ + this.disconnect = function () { + client.disconnect(); + }; + + /** + * Get the contents of the trace log. + * + * @name Paho.Client#getTraceLog + * @function + * @return {Object[]} tracebuffer containing the time ordered trace records. + */ + this.getTraceLog = function () { + return client.getTraceLog(); + }; + + /** + * Start tracing. + * + * @name Paho.Client#startTrace + * @function + */ + this.startTrace = function () { + client.startTrace(); + }; + + /** + * Stop tracing. + * + * @name Paho.Client#stopTrace + * @function + */ + this.stopTrace = function () { + client.stopTrace(); + }; + + this.isConnected = function() { + return client.connected; + }; + }; + + /** + * An application message, sent or received. + *

+ * All attributes may be null, which implies the default values. + * + * @name Paho.Message + * @constructor + * @param {String|ArrayBuffer} payload The message data to be sent. + *

+ * @property {string} payloadString read only The payload as a string if the payload consists of valid UTF-8 characters. + * @property {ArrayBuffer} payloadBytes read only The payload as an ArrayBuffer. + *

+ * @property {string} destinationName mandatory The name of the destination to which the message is to be sent + * (for messages about to be sent) or the name of the destination from which the message has been received. + * (for messages received by the onMessage function). + *

+ * @property {number} qos The Quality of Service used to deliver the message. + *

+ *
0 Best effort (default). + *
1 At least once. + *
2 Exactly once. + *
+ *

+ * @property {Boolean} retained If true, the message is to be retained by the server and delivered + * to both current and future subscriptions. + * If false the server only delivers the message to current subscribers, this is the default for new Messages. + * A received message has the retained boolean set to true if the message was published + * with the retained boolean set to true + * and the subscrption was made after the message has been published. + *

+ * @property {Boolean} duplicate read only If true, this message might be a duplicate of one which has already been received. + * This is only set on messages received from the server. + * + */ + var Message = function (newPayload) { + var payload; + if ( typeof newPayload === "string" || + newPayload instanceof ArrayBuffer || + (ArrayBuffer.isView(newPayload) && !(newPayload instanceof DataView)) + ) { + payload = newPayload; + } else { + throw (format(ERROR.INVALID_ARGUMENT, [newPayload, "newPayload"])); + } + + var destinationName; + var qos = 0; + var retained = false; + var duplicate = false; + + Object.defineProperties(this,{ + "payloadString":{ + enumerable : true, + get : function () { + if (typeof payload === "string") + return payload; + else + return parseUTF8(payload, 0, payload.length); + } + }, + "payloadBytes":{ + enumerable: true, + get: function() { + if (typeof payload === "string") { + var buffer = new ArrayBuffer(UTF8Length(payload)); + var byteStream = new Uint8Array(buffer); + stringToUTF8(payload, byteStream, 0); + + return byteStream; + } else { + return payload; + } + } + }, + "destinationName":{ + enumerable: true, + get: function() { return destinationName; }, + set: function(newDestinationName) { + if (typeof newDestinationName === "string") + destinationName = newDestinationName; + else + throw new Error(format(ERROR.INVALID_ARGUMENT, [newDestinationName, "newDestinationName"])); + } + }, + "qos":{ + enumerable: true, + get: function() { return qos; }, + set: function(newQos) { + if (newQos === 0 || newQos === 1 || newQos === 2 ) + qos = newQos; + else + throw new Error("Invalid argument:"+newQos); + } + }, + "retained":{ + enumerable: true, + get: function() { return retained; }, + set: function(newRetained) { + if (typeof newRetained === "boolean") + retained = newRetained; + else + throw new Error(format(ERROR.INVALID_ARGUMENT, [newRetained, "newRetained"])); + } + }, + "topic":{ + enumerable: true, + get: function() { return destinationName; }, + set: function(newTopic) {destinationName=newTopic;} + }, + "duplicate":{ + enumerable: true, + get: function() { return duplicate; }, + set: function(newDuplicate) {duplicate=newDuplicate;} + } + }); + }; + + // Module contents. + return { + Client: Client, + Message: Message + }; + // eslint-disable-next-line no-nested-ternary + })(typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + return PahoMQTT; +}); + + +/***/ }), + +/***/ 75440: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var path = __nccwpck_require__(85622); +var inspect = __nccwpck_require__(31669).inspect; + +function assertPath(path) { + if (typeof path !== 'string') { + throw new TypeError('Path must be a string. Received ' + inspect(path)); + } +} + +function posix(path) { + assertPath(path); + if (path.length === 0) + return '.'; + var code = path.charCodeAt(0); + var hasRoot = (code === 47/*/*/); + var end = -1; + var matchedSlash = true; + for (var i = path.length - 1; i >= 1; --i) { + code = path.charCodeAt(i); + if (code === 47/*/*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + + if (end === -1) + return hasRoot ? '/' : '.'; + if (hasRoot && end === 1) + return '//'; + return path.slice(0, end); +} + +function win32(path) { + assertPath(path); + var len = path.length; + if (len === 0) + return '.'; + var rootEnd = -1; + var end = -1; + var matchedSlash = true; + var offset = 0; + var code = path.charCodeAt(0); + + // Try to match a root + if (len > 1) { + if (code === 47/*/*/ || code === 92/*\*/) { + // Possible UNC root + + rootEnd = offset = 1; + + code = path.charCodeAt(1); + if (code === 47/*/*/ || code === 92/*\*/) { + // Matched double path separator at beginning + var j = 2; + var last = j; + // Match 1 or more non-path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code === 47/*/*/ || code === 92/*\*/) + break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code !== 47/*/*/ && code !== 92/*\*/) + break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code === 47/*/*/ || code === 92/*\*/) + break; + } + if (j === len) { + // We matched a UNC root only + return path; + } + if (j !== last) { + // We matched a UNC root with leftovers + + // Offset by 1 to include the separator after the UNC root to + // treat it as a "normal root" on top of a (UNC) root + rootEnd = offset = j + 1; + } + } + } + } + } else if ((code >= 65/*A*/ && code <= 90/*Z*/) || + (code >= 97/*a*/ && code <= 122/*z*/)) { + // Possible device root + + code = path.charCodeAt(1); + if (path.charCodeAt(1) === 58/*:*/) { + rootEnd = offset = 2; + if (len > 2) { + code = path.charCodeAt(2); + if (code === 47/*/*/ || code === 92/*\*/) + rootEnd = offset = 3; + } + } + } + } else if (code === 47/*/*/ || code === 92/*\*/) { + return path[0]; + } + + for (var i = len - 1; i >= offset; --i) { + code = path.charCodeAt(i); + if (code === 47/*/*/ || code === 92/*\*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + + if (end === -1) { + if (rootEnd === -1) + return '.'; + else + end = rootEnd; + } + return path.slice(0, end); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; + + +/***/ }), + +/***/ 38714: +/***/ ((module) => { + +"use strict"; + + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; + + +/***/ }), + +/***/ 26401: +/***/ ((module) => { + +"use strict"; + + +/* ! + * Chai - pathval utility + * Copyright(c) 2012-2014 Jake Luer + * @see https://github.com/logicalparadox/filtr + * MIT Licensed + */ + +/** + * ### .hasProperty(object, name) + * + * This allows checking whether an object has own + * or inherited from prototype chain named property. + * + * Basically does the same thing as the `in` + * operator but works properly with null/undefined values + * and other primitives. + * + * var obj = { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * + * The following would be the results. + * + * hasProperty(obj, 'str'); // true + * hasProperty(obj, 'constructor'); // true + * hasProperty(obj, 'bar'); // false + * + * hasProperty(obj.str, 'length'); // true + * hasProperty(obj.str, 1); // true + * hasProperty(obj.str, 5); // false + * + * hasProperty(obj.arr, 'length'); // true + * hasProperty(obj.arr, 2); // true + * hasProperty(obj.arr, 3); // false + * + * @param {Object} object + * @param {String|Symbol} name + * @returns {Boolean} whether it exists + * @namespace Utils + * @name hasProperty + * @api public + */ + +function hasProperty(obj, name) { + if (typeof obj === 'undefined' || obj === null) { + return false; + } + + // The `in` operator does not work with primitives. + return name in Object(obj); +} + +/* ! + * ## parsePath(path) + * + * Helper function used to parse string object + * paths. Use in conjunction with `internalGetPathValue`. + * + * var parsed = parsePath('myobject.property.subprop'); + * + * ### Paths: + * + * * Can be infinitely deep and nested. + * * Arrays are also valid using the formal `myobject.document[3].property`. + * * Literal dots and brackets (not delimiter) must be backslash-escaped. + * + * @param {String} path + * @returns {Object} parsed + * @api private + */ + +function parsePath(path) { + var str = path.replace(/([^\\])\[/g, '$1.['); + var parts = str.match(/(\\\.|[^.]+?)+/g); + return parts.map(function mapMatches(value) { + var regexp = /^\[(\d+)\]$/; + var mArr = regexp.exec(value); + var parsed = null; + if (mArr) { + parsed = { i: parseFloat(mArr[1]) }; + } else { + parsed = { p: value.replace(/\\([.\[\]])/g, '$1') }; + } + + return parsed; + }); +} + +/* ! + * ## internalGetPathValue(obj, parsed[, pathDepth]) + * + * Helper companion function for `.parsePath` that returns + * the value located at the parsed address. + * + * var value = getPathValue(obj, parsed); + * + * @param {Object} object to search against + * @param {Object} parsed definition from `parsePath`. + * @param {Number} depth (nesting level) of the property we want to retrieve + * @returns {Object|Undefined} value + * @api private + */ + +function internalGetPathValue(obj, parsed, pathDepth) { + var temporaryValue = obj; + var res = null; + pathDepth = (typeof pathDepth === 'undefined' ? parsed.length : pathDepth); + + for (var i = 0; i < pathDepth; i++) { + var part = parsed[i]; + if (temporaryValue) { + if (typeof part.p === 'undefined') { + temporaryValue = temporaryValue[part.i]; + } else { + temporaryValue = temporaryValue[part.p]; + } + + if (i === (pathDepth - 1)) { + res = temporaryValue; + } + } + } + + return res; +} + +/* ! + * ## internalSetPathValue(obj, value, parsed) + * + * Companion function for `parsePath` that sets + * the value located at a parsed address. + * + * internalSetPathValue(obj, 'value', parsed); + * + * @param {Object} object to search and define on + * @param {*} value to use upon set + * @param {Object} parsed definition from `parsePath` + * @api private + */ + +function internalSetPathValue(obj, val, parsed) { + var tempObj = obj; + var pathDepth = parsed.length; + var part = null; + // Here we iterate through every part of the path + for (var i = 0; i < pathDepth; i++) { + var propName = null; + var propVal = null; + part = parsed[i]; + + // If it's the last part of the path, we set the 'propName' value with the property name + if (i === (pathDepth - 1)) { + propName = typeof part.p === 'undefined' ? part.i : part.p; + // Now we set the property with the name held by 'propName' on object with the desired val + tempObj[propName] = val; + } else if (typeof part.p !== 'undefined' && tempObj[part.p]) { + tempObj = tempObj[part.p]; + } else if (typeof part.i !== 'undefined' && tempObj[part.i]) { + tempObj = tempObj[part.i]; + } else { + // If the obj doesn't have the property we create one with that name to define it + var next = parsed[i + 1]; + // Here we set the name of the property which will be defined + propName = typeof part.p === 'undefined' ? part.i : part.p; + // Here we decide if this property will be an array or a new object + propVal = typeof next.p === 'undefined' ? [] : {}; + tempObj[propName] = propVal; + tempObj = tempObj[propName]; + } + } +} + +/** + * ### .getPathInfo(object, path) + * + * This allows the retrieval of property info in an + * object given a string path. + * + * The path info consists of an object with the + * following properties: + * + * * parent - The parent object of the property referenced by `path` + * * name - The name of the final property, a number if it was an array indexer + * * value - The value of the property, if it exists, otherwise `undefined` + * * exists - Whether the property exists or not + * + * @param {Object} object + * @param {String} path + * @returns {Object} info + * @namespace Utils + * @name getPathInfo + * @api public + */ + +function getPathInfo(obj, path) { + var parsed = parsePath(path); + var last = parsed[parsed.length - 1]; + var info = { + parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj, + name: last.p || last.i, + value: internalGetPathValue(obj, parsed), + }; + info.exists = hasProperty(info.parent, info.name); + + return info; +} + +/** + * ### .getPathValue(object, path) + * + * This allows the retrieval of values in an + * object given a string path. + * + * var obj = { + * prop1: { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * , prop2: { + * arr: [ { nested: 'Universe' } ] + * , str: 'Hello again!' + * } + * } + * + * The following would be the results. + * + * getPathValue(obj, 'prop1.str'); // Hello + * getPathValue(obj, 'prop1.att[2]'); // b + * getPathValue(obj, 'prop2.arr[0].nested'); // Universe + * + * @param {Object} object + * @param {String} path + * @returns {Object} value or `undefined` + * @namespace Utils + * @name getPathValue + * @api public + */ + +function getPathValue(obj, path) { + var info = getPathInfo(obj, path); + return info.value; +} + +/** + * ### .setPathValue(object, path, value) + * + * Define the value in an object at a given string path. + * + * ```js + * var obj = { + * prop1: { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * , prop2: { + * arr: [ { nested: 'Universe' } ] + * , str: 'Hello again!' + * } + * }; + * ``` + * + * The following would be acceptable. + * + * ```js + * var properties = require('tea-properties'); + * properties.set(obj, 'prop1.str', 'Hello Universe!'); + * properties.set(obj, 'prop1.arr[2]', 'B'); + * properties.set(obj, 'prop2.arr[0].nested.value', { hello: 'universe' }); + * ``` + * + * @param {Object} object + * @param {String} path + * @param {Mixed} value + * @api private + */ + +function setPathValue(obj, path, val) { + var parsed = parsePath(path); + internalSetPathValue(obj, val, parsed); + return obj; +} + +module.exports = { + hasProperty: hasProperty, + getPathInfo: getPathInfo, + getPathValue: getPathValue, + setPathValue: setPathValue, +}; + + +/***/ }), + +/***/ 21231: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * Copyright (c) 2012 Mathieu Turcotte + * Licensed under the MIT license. + */ + +module.exports = __nccwpck_require__(6709); + +/***/ }), + +/***/ 6709: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * Copyright (c) 2012 Mathieu Turcotte + * Licensed under the MIT license. + */ + +var util = __nccwpck_require__(31669); + +var errors = module.exports = __nccwpck_require__(70140); + +function failCheck(ExceptionConstructor, callee, messageFormat, formatArgs) { + messageFormat = messageFormat || ''; + var message = util.format.apply(this, [messageFormat].concat(formatArgs)); + var error = new ExceptionConstructor(message); + Error.captureStackTrace(error, callee); + throw error; +} + +function failArgumentCheck(callee, message, formatArgs) { + failCheck(errors.IllegalArgumentError, callee, message, formatArgs); +} + +function failStateCheck(callee, message, formatArgs) { + failCheck(errors.IllegalStateError, callee, message, formatArgs); +} + +module.exports.checkArgument = function(value, message) { + if (!value) { + failArgumentCheck(arguments.callee, message, + Array.prototype.slice.call(arguments, 2)); + } +}; + +module.exports.checkState = function(value, message) { + if (!value) { + failStateCheck(arguments.callee, message, + Array.prototype.slice.call(arguments, 2)); + } +}; + +module.exports.checkIsDef = function(value, message) { + if (value !== undefined) { + return value; + } + + failArgumentCheck(arguments.callee, message || + 'Expected value to be defined but was undefined.', + Array.prototype.slice.call(arguments, 2)); +}; + +module.exports.checkIsDefAndNotNull = function(value, message) { + // Note that undefined == null. + if (value != null) { + return value; + } + + failArgumentCheck(arguments.callee, message || + 'Expected value to be defined and not null but got "' + + typeOf(value) + '".', Array.prototype.slice.call(arguments, 2)); +}; + +// Fixed version of the typeOf operator which returns 'null' for null values +// and 'array' for arrays. +function typeOf(value) { + var s = typeof value; + if (s == 'object') { + if (!value) { + return 'null'; + } else if (value instanceof Array) { + return 'array'; + } + } + return s; +} + +function typeCheck(expect) { + return function(value, message) { + var type = typeOf(value); + + if (type == expect) { + return value; + } + + failArgumentCheck(arguments.callee, message || + 'Expected "' + expect + '" but got "' + type + '".', + Array.prototype.slice.call(arguments, 2)); + }; +} + +module.exports.checkIsString = typeCheck('string'); +module.exports.checkIsArray = typeCheck('array'); +module.exports.checkIsNumber = typeCheck('number'); +module.exports.checkIsBoolean = typeCheck('boolean'); +module.exports.checkIsFunction = typeCheck('function'); +module.exports.checkIsObject = typeCheck('object'); + + +/***/ }), + +/***/ 70140: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* + * Copyright (c) 2012 Mathieu Turcotte + * Licensed under the MIT license. + */ + +var util = __nccwpck_require__(31669); + +function IllegalArgumentError(message) { + Error.call(this, message); + this.message = message; +} +util.inherits(IllegalArgumentError, Error); + +IllegalArgumentError.prototype.name = 'IllegalArgumentError'; + +function IllegalStateError(message) { + Error.call(this, message); + this.message = message; +} +util.inherits(IllegalStateError, Error); + +IllegalStateError.prototype.name = 'IllegalStateError'; + +module.exports.IllegalStateError = IllegalStateError; +module.exports.IllegalArgumentError = IllegalArgumentError; + +/***/ }), + +/***/ 77714: +/***/ ((module) => { + +"use strict"; + + +if (typeof process === 'undefined' || + !process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} + + + +/***/ }), + +/***/ 85881: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// full library entry point. + + +module.exports = __nccwpck_require__(15360); + + +/***/ }), + +/***/ 96916: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// minimal library entry point. + + +module.exports = __nccwpck_require__(73242); + + +/***/ }), + +/***/ 12134: +/***/ ((module) => { + +"use strict"; + +module.exports = common; + +var commonRe = /\/|\./; + +/** + * Provides common type definitions. + * Can also be used to provide additional google types or your own custom types. + * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name + * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition + * @returns {undefined} + * @property {INamespace} google/protobuf/any.proto Any + * @property {INamespace} google/protobuf/duration.proto Duration + * @property {INamespace} google/protobuf/empty.proto Empty + * @property {INamespace} google/protobuf/field_mask.proto FieldMask + * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue + * @property {INamespace} google/protobuf/timestamp.proto Timestamp + * @property {INamespace} google/protobuf/wrappers.proto Wrappers + * @example + * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension) + * protobuf.common("descriptor", descriptorJson); + * + * // manually provides a custom definition (uses my.foo namespace) + * protobuf.common("my/foo/bar.proto", myFooBarJson); + */ +function common(name, json) { + if (!commonRe.test(name)) { + name = "google/protobuf/" + name + ".proto"; + json = { nested: { google: { nested: { protobuf: { nested: json } } } } }; + } + common[name] = json; +} + +// Not provided because of limited use (feel free to discuss or to provide yourself): +// +// google/protobuf/descriptor.proto +// google/protobuf/source_context.proto +// google/protobuf/type.proto +// +// Stripped and pre-parsed versions of these non-bundled files are instead available as part of +// the repository or package within the google/protobuf directory. + +common("any", { + + /** + * Properties of a google.protobuf.Any message. + * @interface IAny + * @type {Object} + * @property {string} [typeUrl] + * @property {Uint8Array} [bytes] + * @memberof common + */ + Any: { + fields: { + type_url: { + type: "string", + id: 1 + }, + value: { + type: "bytes", + id: 2 + } + } + } +}); + +var timeType; + +common("duration", { + + /** + * Properties of a google.protobuf.Duration message. + * @interface IDuration + * @type {Object} + * @property {number|Long} [seconds] + * @property {number} [nanos] + * @memberof common + */ + Duration: timeType = { + fields: { + seconds: { + type: "int64", + id: 1 + }, + nanos: { + type: "int32", + id: 2 + } + } + } +}); + +common("timestamp", { + + /** + * Properties of a google.protobuf.Timestamp message. + * @interface ITimestamp + * @type {Object} + * @property {number|Long} [seconds] + * @property {number} [nanos] + * @memberof common + */ + Timestamp: timeType +}); + +common("empty", { + + /** + * Properties of a google.protobuf.Empty message. + * @interface IEmpty + * @memberof common + */ + Empty: { + fields: {} + } +}); + +common("struct", { + + /** + * Properties of a google.protobuf.Struct message. + * @interface IStruct + * @type {Object} + * @property {Object.} [fields] + * @memberof common + */ + Struct: { + fields: { + fields: { + keyType: "string", + type: "Value", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.Value message. + * @interface IValue + * @type {Object} + * @property {string} [kind] + * @property {0} [nullValue] + * @property {number} [numberValue] + * @property {string} [stringValue] + * @property {boolean} [boolValue] + * @property {IStruct} [structValue] + * @property {IListValue} [listValue] + * @memberof common + */ + Value: { + oneofs: { + kind: { + oneof: [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + fields: { + nullValue: { + type: "NullValue", + id: 1 + }, + numberValue: { + type: "double", + id: 2 + }, + stringValue: { + type: "string", + id: 3 + }, + boolValue: { + type: "bool", + id: 4 + }, + structValue: { + type: "Struct", + id: 5 + }, + listValue: { + type: "ListValue", + id: 6 + } + } + }, + + NullValue: { + values: { + NULL_VALUE: 0 + } + }, + + /** + * Properties of a google.protobuf.ListValue message. + * @interface IListValue + * @type {Object} + * @property {Array.} [values] + * @memberof common + */ + ListValue: { + fields: { + values: { + rule: "repeated", + type: "Value", + id: 1 + } + } + } +}); + +common("wrappers", { + + /** + * Properties of a google.protobuf.DoubleValue message. + * @interface IDoubleValue + * @type {Object} + * @property {number} [value] + * @memberof common + */ + DoubleValue: { + fields: { + value: { + type: "double", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.FloatValue message. + * @interface IFloatValue + * @type {Object} + * @property {number} [value] + * @memberof common + */ + FloatValue: { + fields: { + value: { + type: "float", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.Int64Value message. + * @interface IInt64Value + * @type {Object} + * @property {number|Long} [value] + * @memberof common + */ + Int64Value: { + fields: { + value: { + type: "int64", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.UInt64Value message. + * @interface IUInt64Value + * @type {Object} + * @property {number|Long} [value] + * @memberof common + */ + UInt64Value: { + fields: { + value: { + type: "uint64", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.Int32Value message. + * @interface IInt32Value + * @type {Object} + * @property {number} [value] + * @memberof common + */ + Int32Value: { + fields: { + value: { + type: "int32", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.UInt32Value message. + * @interface IUInt32Value + * @type {Object} + * @property {number} [value] + * @memberof common + */ + UInt32Value: { + fields: { + value: { + type: "uint32", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.BoolValue message. + * @interface IBoolValue + * @type {Object} + * @property {boolean} [value] + * @memberof common + */ + BoolValue: { + fields: { + value: { + type: "bool", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.StringValue message. + * @interface IStringValue + * @type {Object} + * @property {string} [value] + * @memberof common + */ + StringValue: { + fields: { + value: { + type: "string", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.BytesValue message. + * @interface IBytesValue + * @type {Object} + * @property {Uint8Array} [value] + * @memberof common + */ + BytesValue: { + fields: { + value: { + type: "bytes", + id: 1 + } + } + } +}); + +common("field_mask", { + + /** + * Properties of a google.protobuf.FieldMask message. + * @interface IDoubleValue + * @type {Object} + * @property {number} [value] + * @memberof common + */ + FieldMask: { + fields: { + paths: { + rule: "repeated", + type: "string", + id: 1 + } + } + } +}); + +/** + * Gets the root definition of the specified common proto file. + * + * Bundled definitions are: + * - google/protobuf/any.proto + * - google/protobuf/duration.proto + * - google/protobuf/empty.proto + * - google/protobuf/field_mask.proto + * - google/protobuf/struct.proto + * - google/protobuf/timestamp.proto + * - google/protobuf/wrappers.proto + * + * @param {string} file Proto file name + * @returns {INamespace|null} Root definition or `null` if not defined + */ +common.get = function get(file) { + return common[file] || null; +}; + + +/***/ }), + +/***/ 13617: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/** + * Runtime message from/to plain object converters. + * @namespace + */ +var converter = exports; + +var Enum = __nccwpck_require__(17732), + util = __nccwpck_require__(47174); + +/** + * Generates a partial value fromObject conveter. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {number} fieldIndex Field index + * @param {string} prop Property reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genValuePartial_fromObject(gen, field, fieldIndex, prop) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + if (field.resolvedType) { + if (field.resolvedType instanceof Enum) { gen + ("switch(d%s){", prop); + for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) { + if (field.repeated && values[keys[i]] === field.typeDefault) gen + ("default:"); + gen + ("case%j:", keys[i]) + ("case %i:", values[keys[i]]) + ("m%s=%j", prop, values[keys[i]]) + ("break"); + } gen + ("}"); + } else gen + ("if(typeof d%s!==\"object\")", prop) + ("throw TypeError(%j)", field.fullName + ": object expected") + ("m%s=types[%i].fromObject(d%s)", prop, fieldIndex, prop); + } else { + var isUnsigned = false; + switch (field.type) { + case "double": + case "float": gen + ("m%s=Number(d%s)", prop, prop); // also catches "NaN", "Infinity" + break; + case "uint32": + case "fixed32": gen + ("m%s=d%s>>>0", prop, prop); + break; + case "int32": + case "sint32": + case "sfixed32": gen + ("m%s=d%s|0", prop, prop); + break; + case "uint64": + isUnsigned = true; + // eslint-disable-line no-fallthrough + case "int64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(util.Long)") + ("(m%s=util.Long.fromValue(d%s)).unsigned=%j", prop, prop, isUnsigned) + ("else if(typeof d%s===\"string\")", prop) + ("m%s=parseInt(d%s,10)", prop, prop) + ("else if(typeof d%s===\"number\")", prop) + ("m%s=d%s", prop, prop) + ("else if(typeof d%s===\"object\")", prop) + ("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", prop, prop, prop, isUnsigned ? "true" : ""); + break; + case "bytes": gen + ("if(typeof d%s===\"string\")", prop) + ("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", prop, prop, prop) + ("else if(d%s.length)", prop) + ("m%s=d%s", prop, prop); + break; + case "string": gen + ("m%s=String(d%s)", prop, prop); + break; + case "bool": gen + ("m%s=Boolean(d%s)", prop, prop); + break; + /* default: gen + ("m%s=d%s", prop, prop); + break; */ + } + } + return gen; + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + +/** + * Generates a plain object to runtime message converter specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +converter.fromObject = function fromObject(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var fields = mtype.fieldsArray; + var gen = util.codegen(["d"], mtype.name + "$fromObject") + ("if(d instanceof this.ctor)") + ("return d"); + if (!fields.length) return gen + ("return new this.ctor"); + gen + ("var m=new this.ctor"); + for (var i = 0; i < fields.length; ++i) { + var field = fields[i].resolve(), + prop = util.safeProp(field.name); + + // Map fields + if (field.map) { gen + ("if(d%s){", prop) + ("if(typeof d%s!==\"object\")", prop) + ("throw TypeError(%j)", field.fullName + ": object expected") + ("m%s={}", prop) + ("for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true": "", prop); + break; + case "bytes": gen + ("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", prop, prop, prop, prop, prop); + break; + default: gen + ("d%s=m%s", prop, prop); + break; + } + } + return gen; + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + +/** + * Generates a runtime message to plain object converter specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +converter.toObject = function toObject(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById); + if (!fields.length) + return util.codegen()("return {}"); + var gen = util.codegen(["m", "o"], mtype.name + "$toObject") + ("if(!o)") + ("o={}") + ("var d={}"); + + var repeatedFields = [], + mapFields = [], + normalFields = [], + i = 0; + for (; i < fields.length; ++i) + if (!fields[i].partOf) + ( fields[i].resolve().repeated ? repeatedFields + : fields[i].map ? mapFields + : normalFields).push(fields[i]); + + if (repeatedFields.length) { gen + ("if(o.arrays||o.defaults){"); + for (i = 0; i < repeatedFields.length; ++i) gen + ("d%s=[]", util.safeProp(repeatedFields[i].name)); + gen + ("}"); + } + + if (mapFields.length) { gen + ("if(o.objects||o.defaults){"); + for (i = 0; i < mapFields.length; ++i) gen + ("d%s={}", util.safeProp(mapFields[i].name)); + gen + ("}"); + } + + if (normalFields.length) { gen + ("if(o.defaults){"); + for (i = 0; i < normalFields.length; ++i) { + var field = normalFields[i], + prop = util.safeProp(field.name); + if (field.resolvedType instanceof Enum) gen + ("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault); + else if (field.long) gen + ("if(util.Long){") + ("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned) + ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", prop) + ("}else") + ("d%s=o.longs===String?%j:%i", prop, field.typeDefault.toString(), field.typeDefault.toNumber()); + else if (field.bytes) { + var arrayDefault = "[" + Array.prototype.slice.call(field.typeDefault).join(",") + "]"; + gen + ("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault)) + ("else{") + ("d%s=%s", prop, arrayDefault) + ("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop) + ("}"); + } else gen + ("d%s=%j", prop, field.typeDefault); // also messages (=null) + } gen + ("}"); + } + var hasKs2 = false; + for (i = 0; i < fields.length; ++i) { + var field = fields[i], + index = mtype._fieldsArray.indexOf(field), + prop = util.safeProp(field.name); + if (field.map) { + if (!hasKs2) { hasKs2 = true; gen + ("var ks2"); + } gen + ("if(m%s&&(ks2=Object.keys(m%s)).length){", prop, prop) + ("d%s={}", prop) + ("for(var j=0;j { + +"use strict"; + +module.exports = decoder; + +var Enum = __nccwpck_require__(17732), + types = __nccwpck_require__(6581), + util = __nccwpck_require__(47174); + +function missing(field) { + return "missing required '" + field.name + "'"; +} + +/** + * Generates a decoder specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +function decoder(mtype) { + /* eslint-disable no-unexpected-multiline */ + var gen = util.codegen(["r", "l"], mtype.name + "$decode") + ("if(!(r instanceof Reader))") + ("r=Reader.create(r)") + ("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (mtype.fieldsArray.filter(function(field) { return field.map; }).length ? ",k,value" : "")) + ("while(r.pos>>3){"); + + var i = 0; + for (; i < /* initializes */ mtype.fieldsArray.length; ++i) { + var field = mtype._fieldsArray[i].resolve(), + type = field.resolvedType instanceof Enum ? "int32" : field.type, + ref = "m" + util.safeProp(field.name); gen + ("case %i:", field.id); + + // Map fields + if (field.map) { gen + ("if(%s===util.emptyObject)", ref) + ("%s={}", ref) + ("var c2 = r.uint32()+r.pos"); + + if (types.defaults[field.keyType] !== undefined) gen + ("k=%j", types.defaults[field.keyType]); + else gen + ("k=null"); + + if (types.defaults[type] !== undefined) gen + ("value=%j", types.defaults[type]); + else gen + ("value=null"); + + gen + ("while(r.pos>>3){") + ("case 1: k=r.%s(); break", field.keyType) + ("case 2:"); + + if (types.basic[type] === undefined) gen + ("value=types[%i].decode(r,r.uint32())", i); // can't be groups + else gen + ("value=r.%s()", type); + + gen + ("break") + ("default:") + ("r.skipType(tag2&7)") + ("break") + ("}") + ("}"); + + if (types.long[field.keyType] !== undefined) gen + ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref); + else gen + ("%s[k]=value", ref); + + // Repeated fields + } else if (field.repeated) { gen + + ("if(!(%s&&%s.length))", ref, ref) + ("%s=[]", ref); + + // Packable (always check for forward and backward compatiblity) + if (types.packed[type] !== undefined) gen + ("if((t&7)===2){") + ("var c2=r.uint32()+r.pos") + ("while(r.pos { + +"use strict"; + +module.exports = encoder; + +var Enum = __nccwpck_require__(17732), + types = __nccwpck_require__(6581), + util = __nccwpck_require__(47174); + +/** + * Generates a partial message type encoder. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {number} fieldIndex Field index + * @param {string} ref Variable reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genTypePartial(gen, field, fieldIndex, ref) { + return field.resolvedType.group + ? gen("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0) + : gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0); +} + +/** + * Generates an encoder specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +function encoder(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var gen = util.codegen(["m", "w"], mtype.name + "$encode") + ("if(!w)") + ("w=Writer.create()"); + + var i, ref; + + // "when a message is serialized its known fields should be written sequentially by field number" + var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById); + + for (var i = 0; i < fields.length; ++i) { + var field = fields[i].resolve(), + index = mtype._fieldsArray.indexOf(field), + type = field.resolvedType instanceof Enum ? "int32" : field.type, + wireType = types.basic[type]; + ref = "m" + util.safeProp(field.name); + + // Map fields + if (field.map) { + gen + ("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name) // !== undefined && !== null + ("for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType); + if (wireType === undefined) gen + ("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", index, ref); // can't be groups + else gen + (".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref); + gen + ("}") + ("}"); + + // Repeated fields + } else if (field.repeated) { gen + ("if(%s!=null&&%s.length){", ref, ref); // !== undefined && !== null + + // Packed repeated + if (field.packed && types.packed[type] !== undefined) { gen + + ("w.uint32(%i).fork()", (field.id << 3 | 2) >>> 0) + ("for(var i=0;i<%s.length;++i)", ref) + ("w.%s(%s[i])", type, ref) + ("w.ldelim()"); + + // Non-packed + } else { gen + + ("for(var i=0;i<%s.length;++i)", ref); + if (wireType === undefined) + genTypePartial(gen, field, index, ref + "[i]"); + else gen + ("w.uint32(%i).%s(%s[i])", (field.id << 3 | wireType) >>> 0, type, ref); + + } gen + ("}"); + + // Non-repeated + } else { + if (field.optional) gen + ("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", ref, field.name); // !== undefined && !== null + + if (wireType === undefined) + genTypePartial(gen, field, index, ref); + else gen + ("w.uint32(%i).%s(%s)", (field.id << 3 | wireType) >>> 0, type, ref); + + } + } + + return gen + ("return w"); + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + + +/***/ }), + +/***/ 17732: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Enum; + +// extends ReflectionObject +var ReflectionObject = __nccwpck_require__(83575); +((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = "Enum"; + +var Namespace = __nccwpck_require__(76189), + util = __nccwpck_require__(47174); + +/** + * Constructs a new enum instance. + * @classdesc Reflected enum. + * @extends ReflectionObject + * @constructor + * @param {string} name Unique name within its namespace + * @param {Object.} [values] Enum values as an object, by name + * @param {Object.} [options] Declared options + * @param {string} [comment] The comment for this enum + * @param {Object.} [comments] The value comments for this enum + */ +function Enum(name, values, options, comment, comments) { + ReflectionObject.call(this, name, options); + + if (values && typeof values !== "object") + throw TypeError("values must be an object"); + + /** + * Enum values by id. + * @type {Object.} + */ + this.valuesById = {}; + + /** + * Enum values by name. + * @type {Object.} + */ + this.values = Object.create(this.valuesById); // toJSON, marker + + /** + * Enum comment text. + * @type {string|null} + */ + this.comment = comment; + + /** + * Value comment texts, if any. + * @type {Object.} + */ + this.comments = comments || {}; + + /** + * Reserved ranges, if any. + * @type {Array.} + */ + this.reserved = undefined; // toJSON + + // Note that values inherit valuesById on their prototype which makes them a TypeScript- + // compatible enum. This is used by pbts to write actual enum definitions that work for + // static and reflection code alike instead of emitting generic object definitions. + + if (values) + for (var keys = Object.keys(values), i = 0; i < keys.length; ++i) + if (typeof values[keys[i]] === "number") // use forward entries only + this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i]; +} + +/** + * Enum descriptor. + * @interface IEnum + * @property {Object.} values Enum values + * @property {Object.} [options] Enum options + */ + +/** + * Constructs an enum from an enum descriptor. + * @param {string} name Enum name + * @param {IEnum} json Enum descriptor + * @returns {Enum} Created enum + * @throws {TypeError} If arguments are invalid + */ +Enum.fromJSON = function fromJSON(name, json) { + var enm = new Enum(name, json.values, json.options, json.comment, json.comments); + enm.reserved = json.reserved; + return enm; +}; + +/** + * Converts this enum to an enum descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IEnum} Enum descriptor + */ +Enum.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , this.options, + "values" , this.values, + "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, + "comment" , keepComments ? this.comment : undefined, + "comments" , keepComments ? this.comments : undefined + ]); +}; + +/** + * Adds a value to this enum. + * @param {string} name Value name + * @param {number} id Value id + * @param {string} [comment] Comment, if any + * @returns {Enum} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a value with this name or id + */ +Enum.prototype.add = function add(name, id, comment) { + // utilized by the parser but not by .fromJSON + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + if (!util.isInteger(id)) + throw TypeError("id must be an integer"); + + if (this.values[name] !== undefined) + throw Error("duplicate name '" + name + "' in " + this); + + if (this.isReservedId(id)) + throw Error("id " + id + " is reserved in " + this); + + if (this.isReservedName(name)) + throw Error("name '" + name + "' is reserved in " + this); + + if (this.valuesById[id] !== undefined) { + if (!(this.options && this.options.allow_alias)) + throw Error("duplicate id " + id + " in " + this); + this.values[name] = id; + } else + this.valuesById[this.values[name] = id] = name; + + this.comments[name] = comment || null; + return this; +}; + +/** + * Removes a value from this enum + * @param {string} name Value name + * @returns {Enum} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `name` is not a name of this enum + */ +Enum.prototype.remove = function remove(name) { + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + var val = this.values[name]; + if (val == null) + throw Error("name '" + name + "' does not exist in " + this); + + delete this.valuesById[val]; + delete this.values[name]; + delete this.comments[name]; + + return this; +}; + +/** + * Tests if the specified id is reserved. + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Enum.prototype.isReservedId = function isReservedId(id) { + return Namespace.isReservedId(this.reserved, id); +}; + +/** + * Tests if the specified name is reserved. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Enum.prototype.isReservedName = function isReservedName(name) { + return Namespace.isReservedName(this.reserved, name); +}; + + +/***/ }), + +/***/ 48213: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Field; + +// extends ReflectionObject +var ReflectionObject = __nccwpck_require__(83575); +((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = "Field"; + +var Enum = __nccwpck_require__(17732), + types = __nccwpck_require__(6581), + util = __nccwpck_require__(47174); + +var Type; // cyclic + +var ruleRe = /^required|optional|repeated$/; + +/** + * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. + * @name Field + * @classdesc Reflected message field. + * @extends FieldBase + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} type Value type + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options + */ + +/** + * Constructs a field from a field descriptor. + * @param {string} name Field name + * @param {IField} json Field descriptor + * @returns {Field} Created field + * @throws {TypeError} If arguments are invalid + */ +Field.fromJSON = function fromJSON(name, json) { + return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment); +}; + +/** + * Not an actual constructor. Use {@link Field} instead. + * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions. + * @exports FieldBase + * @extends ReflectionObject + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} type Value type + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function Field(name, id, type, rule, extend, options, comment) { + + if (util.isObject(rule)) { + comment = extend; + options = rule; + rule = extend = undefined; + } else if (util.isObject(extend)) { + comment = options; + options = extend; + extend = undefined; + } + + ReflectionObject.call(this, name, options); + + if (!util.isInteger(id) || id < 0) + throw TypeError("id must be a non-negative integer"); + + if (!util.isString(type)) + throw TypeError("type must be a string"); + + if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase())) + throw TypeError("rule must be a string rule"); + + if (extend !== undefined && !util.isString(extend)) + throw TypeError("extend must be a string"); + + /** + * Field rule, if any. + * @type {string|undefined} + */ + this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON + + /** + * Field type. + * @type {string} + */ + this.type = type; // toJSON + + /** + * Unique field id. + * @type {number} + */ + this.id = id; // toJSON, marker + + /** + * Extended type if different from parent. + * @type {string|undefined} + */ + this.extend = extend || undefined; // toJSON + + /** + * Whether this field is required. + * @type {boolean} + */ + this.required = rule === "required"; + + /** + * Whether this field is optional. + * @type {boolean} + */ + this.optional = !this.required; + + /** + * Whether this field is repeated. + * @type {boolean} + */ + this.repeated = rule === "repeated"; + + /** + * Whether this field is a map or not. + * @type {boolean} + */ + this.map = false; + + /** + * Message this field belongs to. + * @type {Type|null} + */ + this.message = null; + + /** + * OneOf this field belongs to, if any, + * @type {OneOf|null} + */ + this.partOf = null; + + /** + * The field type's default value. + * @type {*} + */ + this.typeDefault = null; + + /** + * The field's default value on prototypes. + * @type {*} + */ + this.defaultValue = null; + + /** + * Whether this field's value should be treated as a long. + * @type {boolean} + */ + this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false; + + /** + * Whether this field's value is a buffer. + * @type {boolean} + */ + this.bytes = type === "bytes"; + + /** + * Resolved type if not a basic type. + * @type {Type|Enum|null} + */ + this.resolvedType = null; + + /** + * Sister-field within the extended type if a declaring extension field. + * @type {Field|null} + */ + this.extensionField = null; + + /** + * Sister-field within the declaring namespace if an extended field. + * @type {Field|null} + */ + this.declaringField = null; + + /** + * Internally remembers whether this field is packed. + * @type {boolean|null} + * @private + */ + this._packed = null; + + /** + * Comment for this field. + * @type {string|null} + */ + this.comment = comment; +} + +/** + * Determines whether this field is packed. Only relevant when repeated and working with proto2. + * @name Field#packed + * @type {boolean} + * @readonly + */ +Object.defineProperty(Field.prototype, "packed", { + get: function() { + // defaults to packed=true if not explicity set to false + if (this._packed === null) + this._packed = this.getOption("packed") !== false; + return this._packed; + } +}); + +/** + * @override + */ +Field.prototype.setOption = function setOption(name, value, ifNotSet) { + if (name === "packed") // clear cached before setting + this._packed = null; + return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet); +}; + +/** + * Field descriptor. + * @interface IField + * @property {string} [rule="optional"] Field rule + * @property {string} type Field type + * @property {number} id Field id + * @property {Object.} [options] Field options + */ + +/** + * Extension field descriptor. + * @interface IExtensionField + * @extends IField + * @property {string} extend Extended type + */ + +/** + * Converts this field to a field descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IField} Field descriptor + */ +Field.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "rule" , this.rule !== "optional" && this.rule || undefined, + "type" , this.type, + "id" , this.id, + "extend" , this.extend, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Resolves this field's type references. + * @returns {Field} `this` + * @throws {Error} If any reference cannot be resolved + */ +Field.prototype.resolve = function resolve() { + + if (this.resolved) + return this; + + if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it + this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type); + if (this.resolvedType instanceof Type) + this.typeDefault = null; + else // instanceof Enum + this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined + } + + // use explicitly set default value if present + if (this.options && this.options["default"] != null) { + this.typeDefault = this.options["default"]; + if (this.resolvedType instanceof Enum && typeof this.typeDefault === "string") + this.typeDefault = this.resolvedType.values[this.typeDefault]; + } + + // remove unnecessary options + if (this.options) { + if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum)) + delete this.options.packed; + if (!Object.keys(this.options).length) + this.options = undefined; + } + + // convert to internal data type if necesssary + if (this.long) { + this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"); + + /* istanbul ignore else */ + if (Object.freeze) + Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) + + } else if (this.bytes && typeof this.typeDefault === "string") { + var buf; + if (util.base64.test(this.typeDefault)) + util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0); + else + util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0); + this.typeDefault = buf; + } + + // take special care of maps and repeated fields + if (this.map) + this.defaultValue = util.emptyObject; + else if (this.repeated) + this.defaultValue = util.emptyArray; + else + this.defaultValue = this.typeDefault; + + // ensure proper value on prototype + if (this.parent instanceof Type) + this.parent.ctor.prototype[this.name] = this.defaultValue; + + return ReflectionObject.prototype.resolve.call(this); +}; + +/** + * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript). + * @typedef FieldDecorator + * @type {function} + * @param {Object} prototype Target prototype + * @param {string} fieldName Field name + * @returns {undefined} + */ + +/** + * Field decorator (TypeScript). + * @name Field.d + * @function + * @param {number} fieldId Field id + * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|Object} fieldType Field type + * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule + * @param {T} [defaultValue] Default value + * @returns {FieldDecorator} Decorator function + * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[] + */ +Field.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) { + + // submessage: decorate the submessage and use its name as the type + if (typeof fieldType === "function") + fieldType = util.decorateType(fieldType).name; + + // enum reference: create a reflected copy of the enum and keep reuseing it + else if (fieldType && typeof fieldType === "object") + fieldType = util.decorateEnum(fieldType).name; + + return function fieldDecorator(prototype, fieldName) { + util.decorateType(prototype.constructor) + .add(new Field(fieldName, fieldId, fieldType, fieldRule, { "default": defaultValue })); + }; +}; + +/** + * Field decorator (TypeScript). + * @name Field.d + * @function + * @param {number} fieldId Field id + * @param {Constructor|string} fieldType Field type + * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule + * @returns {FieldDecorator} Decorator function + * @template T extends Message + * @variation 2 + */ +// like Field.d but without a default value + +// Sets up cyclic dependencies (called in index-light) +Field._configure = function configure(Type_) { + Type = Type_; +}; + + +/***/ }), + +/***/ 26119: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var protobuf = module.exports = __nccwpck_require__(73242); + +protobuf.build = "light"; + +/** + * A node-style callback as used by {@link load} and {@link Root#load}. + * @typedef LoadCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Root} [root] Root, if there hasn't been an error + * @returns {undefined} + */ + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. + * @param {string|string[]} filename One or multiple files to load + * @param {Root} root Root namespace, defaults to create a new one if omitted. + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @see {@link Root#load} + */ +function load(filename, root, callback) { + if (typeof root === "function") { + callback = root; + root = new protobuf.Root(); + } else if (!root) + root = new protobuf.Root(); + return root.load(filename, callback); +} + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. + * @name load + * @function + * @param {string|string[]} filename One or multiple files to load + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @see {@link Root#load} + * @variation 2 + */ +// function load(filename:string, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise. + * @name load + * @function + * @param {string|string[]} filename One or multiple files to load + * @param {Root} [root] Root namespace, defaults to create a new one if omitted. + * @returns {Promise} Promise + * @see {@link Root#load} + * @variation 3 + */ +// function load(filename:string, [root:Root]):Promise + +protobuf.load = load; + +/** + * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only). + * @param {string|string[]} filename One or multiple files to load + * @param {Root} [root] Root namespace, defaults to create a new one if omitted. + * @returns {Root} Root namespace + * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid + * @see {@link Root#loadSync} + */ +function loadSync(filename, root) { + if (!root) + root = new protobuf.Root(); + return root.loadSync(filename); +} + +protobuf.loadSync = loadSync; + +// Serialization +protobuf.encoder = __nccwpck_require__(23072); +protobuf.decoder = __nccwpck_require__(65871); +protobuf.verifier = __nccwpck_require__(34334); +protobuf.converter = __nccwpck_require__(13617); + +// Reflection +protobuf.ReflectionObject = __nccwpck_require__(83575); +protobuf.Namespace = __nccwpck_require__(76189); +protobuf.Root = __nccwpck_require__(32614); +protobuf.Enum = __nccwpck_require__(17732); +protobuf.Type = __nccwpck_require__(38520); +protobuf.Field = __nccwpck_require__(48213); +protobuf.OneOf = __nccwpck_require__(44408); +protobuf.MapField = __nccwpck_require__(67777); +protobuf.Service = __nccwpck_require__(6178); +protobuf.Method = __nccwpck_require__(57771); + +// Runtime +protobuf.Message = __nccwpck_require__(68027); +protobuf.wrappers = __nccwpck_require__(63216); + +// Utility +protobuf.types = __nccwpck_require__(6581); +protobuf.util = __nccwpck_require__(47174); + +// Set up possibly cyclic reflection dependencies +protobuf.ReflectionObject._configure(protobuf.Root); +protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum); +protobuf.Root._configure(protobuf.Type); +protobuf.Field._configure(protobuf.Type); + + +/***/ }), + +/***/ 73242: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +var protobuf = exports; + +/** + * Build type, one of `"full"`, `"light"` or `"minimal"`. + * @name build + * @type {string} + * @const + */ +protobuf.build = "minimal"; + +// Serialization +protobuf.Writer = __nccwpck_require__(13098); +protobuf.BufferWriter = __nccwpck_require__(41863); +protobuf.Reader = __nccwpck_require__(41011); +protobuf.BufferReader = __nccwpck_require__(80339); + +// Utility +protobuf.util = __nccwpck_require__(71241); +protobuf.rpc = __nccwpck_require__(86444); +protobuf.roots = __nccwpck_require__(50073); +protobuf.configure = configure; + +/* istanbul ignore next */ +/** + * Reconfigures the library according to the environment. + * @returns {undefined} + */ +function configure() { + protobuf.util._configure(); + protobuf.Writer._configure(protobuf.BufferWriter); + protobuf.Reader._configure(protobuf.BufferReader); +} + +// Set up buffer utility according to the environment +configure(); + + +/***/ }), + +/***/ 15360: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var protobuf = module.exports = __nccwpck_require__(26119); + +protobuf.build = "full"; + +// Parser +protobuf.tokenize = __nccwpck_require__(61157); +protobuf.parse = __nccwpck_require__(32137); +protobuf.common = __nccwpck_require__(12134); + +// Configure parser +protobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common); + + +/***/ }), + +/***/ 67777: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = MapField; + +// extends Field +var Field = __nccwpck_require__(48213); +((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = "MapField"; + +var types = __nccwpck_require__(6581), + util = __nccwpck_require__(47174); + +/** + * Constructs a new map field instance. + * @classdesc Reflected map field. + * @extends FieldBase + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} keyType Key type + * @param {string} type Value type + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function MapField(name, id, keyType, type, options, comment) { + Field.call(this, name, id, type, undefined, undefined, options, comment); + + /* istanbul ignore if */ + if (!util.isString(keyType)) + throw TypeError("keyType must be a string"); + + /** + * Key type. + * @type {string} + */ + this.keyType = keyType; // toJSON, marker + + /** + * Resolved key type if not a basic type. + * @type {ReflectionObject|null} + */ + this.resolvedKeyType = null; + + // Overrides Field#map + this.map = true; +} + +/** + * Map field descriptor. + * @interface IMapField + * @extends {IField} + * @property {string} keyType Key type + */ + +/** + * Extension map field descriptor. + * @interface IExtensionMapField + * @extends IMapField + * @property {string} extend Extended type + */ + +/** + * Constructs a map field from a map field descriptor. + * @param {string} name Field name + * @param {IMapField} json Map field descriptor + * @returns {MapField} Created map field + * @throws {TypeError} If arguments are invalid + */ +MapField.fromJSON = function fromJSON(name, json) { + return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment); +}; + +/** + * Converts this map field to a map field descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IMapField} Map field descriptor + */ +MapField.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "keyType" , this.keyType, + "type" , this.type, + "id" , this.id, + "extend" , this.extend, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * @override + */ +MapField.prototype.resolve = function resolve() { + if (this.resolved) + return this; + + // Besides a value type, map fields have a key type that may be "any scalar type except for floating point types and bytes" + if (types.mapKey[this.keyType] === undefined) + throw Error("invalid key type: " + this.keyType); + + return Field.prototype.resolve.call(this); +}; + +/** + * Map field decorator (TypeScript). + * @name MapField.d + * @function + * @param {number} fieldId Field id + * @param {"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"} fieldKeyType Field key type + * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|Object|Constructor<{}>} fieldValueType Field value type + * @returns {FieldDecorator} Decorator function + * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> } + */ +MapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) { + + // submessage value: decorate the submessage and use its name as the type + if (typeof fieldValueType === "function") + fieldValueType = util.decorateType(fieldValueType).name; + + // enum reference value: create a reflected copy of the enum and keep reuseing it + else if (fieldValueType && typeof fieldValueType === "object") + fieldValueType = util.decorateEnum(fieldValueType).name; + + return function mapFieldDecorator(prototype, fieldName) { + util.decorateType(prototype.constructor) + .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType)); + }; +}; + + +/***/ }), + +/***/ 68027: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Message; + +var util = __nccwpck_require__(71241); + +/** + * Constructs a new message instance. + * @classdesc Abstract runtime message. + * @constructor + * @param {Properties} [properties] Properties to set + * @template T extends object = object + */ +function Message(properties) { + // not used internally + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + this[keys[i]] = properties[keys[i]]; +} + +/** + * Reference to the reflected type. + * @name Message.$type + * @type {Type} + * @readonly + */ + +/** + * Reference to the reflected type. + * @name Message#$type + * @type {Type} + * @readonly + */ + +/*eslint-disable valid-jsdoc*/ + +/** + * Creates a new message of this type using the specified properties. + * @param {Object.} [properties] Properties to set + * @returns {Message} Message instance + * @template T extends Message + * @this Constructor + */ +Message.create = function create(properties) { + return this.$type.create(properties); +}; + +/** + * Encodes a message of this type. + * @param {T|Object.} message Message to encode + * @param {Writer} [writer] Writer to use + * @returns {Writer} Writer + * @template T extends Message + * @this Constructor + */ +Message.encode = function encode(message, writer) { + return this.$type.encode(message, writer); +}; + +/** + * Encodes a message of this type preceeded by its length as a varint. + * @param {T|Object.} message Message to encode + * @param {Writer} [writer] Writer to use + * @returns {Writer} Writer + * @template T extends Message + * @this Constructor + */ +Message.encodeDelimited = function encodeDelimited(message, writer) { + return this.$type.encodeDelimited(message, writer); +}; + +/** + * Decodes a message of this type. + * @name Message.decode + * @function + * @param {Reader|Uint8Array} reader Reader or buffer to decode + * @returns {T} Decoded message + * @template T extends Message + * @this Constructor + */ +Message.decode = function decode(reader) { + return this.$type.decode(reader); +}; + +/** + * Decodes a message of this type preceeded by its length as a varint. + * @name Message.decodeDelimited + * @function + * @param {Reader|Uint8Array} reader Reader or buffer to decode + * @returns {T} Decoded message + * @template T extends Message + * @this Constructor + */ +Message.decodeDelimited = function decodeDelimited(reader) { + return this.$type.decodeDelimited(reader); +}; + +/** + * Verifies a message of this type. + * @name Message.verify + * @function + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ +Message.verify = function verify(message) { + return this.$type.verify(message); +}; + +/** + * Creates a new message of this type from a plain object. Also converts values to their respective internal types. + * @param {Object.} object Plain object + * @returns {T} Message instance + * @template T extends Message + * @this Constructor + */ +Message.fromObject = function fromObject(object) { + return this.$type.fromObject(object); +}; + +/** + * Creates a plain object from a message of this type. Also converts values to other types if specified. + * @param {T} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + * @template T extends Message + * @this Constructor + */ +Message.toObject = function toObject(message, options) { + return this.$type.toObject(message, options); +}; + +/** + * Converts this message to JSON. + * @returns {Object.} JSON object + */ +Message.prototype.toJSON = function toJSON() { + return this.$type.toObject(this, util.toJSONOptions); +}; + +/*eslint-enable valid-jsdoc*/ + +/***/ }), + +/***/ 57771: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Method; + +// extends ReflectionObject +var ReflectionObject = __nccwpck_require__(83575); +((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method"; + +var util = __nccwpck_require__(47174); + +/** + * Constructs a new service method instance. + * @classdesc Reflected service method. + * @extends ReflectionObject + * @constructor + * @param {string} name Method name + * @param {string|undefined} type Method type, usually `"rpc"` + * @param {string} requestType Request message type + * @param {string} responseType Response message type + * @param {boolean|Object.} [requestStream] Whether the request is streamed + * @param {boolean|Object.} [responseStream] Whether the response is streamed + * @param {Object.} [options] Declared options + * @param {string} [comment] The comment for this method + * @param {Object.} [parsedOptions] Declared options, properly parsed into an object + */ +function Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) { + + /* istanbul ignore next */ + if (util.isObject(requestStream)) { + options = requestStream; + requestStream = responseStream = undefined; + } else if (util.isObject(responseStream)) { + options = responseStream; + responseStream = undefined; + } + + /* istanbul ignore if */ + if (!(type === undefined || util.isString(type))) + throw TypeError("type must be a string"); + + /* istanbul ignore if */ + if (!util.isString(requestType)) + throw TypeError("requestType must be a string"); + + /* istanbul ignore if */ + if (!util.isString(responseType)) + throw TypeError("responseType must be a string"); + + ReflectionObject.call(this, name, options); + + /** + * Method type. + * @type {string} + */ + this.type = type || "rpc"; // toJSON + + /** + * Request type. + * @type {string} + */ + this.requestType = requestType; // toJSON, marker + + /** + * Whether requests are streamed or not. + * @type {boolean|undefined} + */ + this.requestStream = requestStream ? true : undefined; // toJSON + + /** + * Response type. + * @type {string} + */ + this.responseType = responseType; // toJSON + + /** + * Whether responses are streamed or not. + * @type {boolean|undefined} + */ + this.responseStream = responseStream ? true : undefined; // toJSON + + /** + * Resolved request type. + * @type {Type|null} + */ + this.resolvedRequestType = null; + + /** + * Resolved response type. + * @type {Type|null} + */ + this.resolvedResponseType = null; + + /** + * Comment for this method + * @type {string|null} + */ + this.comment = comment; + + /** + * Options properly parsed into an object + */ + this.parsedOptions = parsedOptions; +} + +/** + * Method descriptor. + * @interface IMethod + * @property {string} [type="rpc"] Method type + * @property {string} requestType Request type + * @property {string} responseType Response type + * @property {boolean} [requestStream=false] Whether requests are streamed + * @property {boolean} [responseStream=false] Whether responses are streamed + * @property {Object.} [options] Method options + * @property {string} comment Method comments + * @property {Object.} [parsedOptions] Method options properly parsed into an object + */ + +/** + * Constructs a method from a method descriptor. + * @param {string} name Method name + * @param {IMethod} json Method descriptor + * @returns {Method} Created method + * @throws {TypeError} If arguments are invalid + */ +Method.fromJSON = function fromJSON(name, json) { + return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions); +}; + +/** + * Converts this method to a method descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IMethod} Method descriptor + */ +Method.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "type" , this.type !== "rpc" && /* istanbul ignore next */ this.type || undefined, + "requestType" , this.requestType, + "requestStream" , this.requestStream, + "responseType" , this.responseType, + "responseStream" , this.responseStream, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined, + "parsedOptions" , this.parsedOptions, + ]); +}; + +/** + * @override + */ +Method.prototype.resolve = function resolve() { + + /* istanbul ignore if */ + if (this.resolved) + return this; + + this.resolvedRequestType = this.parent.lookupType(this.requestType); + this.resolvedResponseType = this.parent.lookupType(this.responseType); + + return ReflectionObject.prototype.resolve.call(this); +}; + + +/***/ }), + +/***/ 76189: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Namespace; + +// extends ReflectionObject +var ReflectionObject = __nccwpck_require__(83575); +((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace"; + +var Field = __nccwpck_require__(48213), + util = __nccwpck_require__(47174); + +var Type, // cyclic + Service, + Enum; + +/** + * Constructs a new namespace instance. + * @name Namespace + * @classdesc Reflected namespace. + * @extends NamespaceBase + * @constructor + * @param {string} name Namespace name + * @param {Object.} [options] Declared options + */ + +/** + * Constructs a namespace from JSON. + * @memberof Namespace + * @function + * @param {string} name Namespace name + * @param {Object.} json JSON object + * @returns {Namespace} Created namespace + * @throws {TypeError} If arguments are invalid + */ +Namespace.fromJSON = function fromJSON(name, json) { + return new Namespace(name, json.options).addJSON(json.nested); +}; + +/** + * Converts an array of reflection objects to JSON. + * @memberof Namespace + * @param {ReflectionObject[]} array Object array + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {Object.|undefined} JSON object or `undefined` when array is empty + */ +function arrayToJSON(array, toJSONOptions) { + if (!(array && array.length)) + return undefined; + var obj = {}; + for (var i = 0; i < array.length; ++i) + obj[array[i].name] = array[i].toJSON(toJSONOptions); + return obj; +} + +Namespace.arrayToJSON = arrayToJSON; + +/** + * Tests if the specified id is reserved. + * @param {Array.|undefined} reserved Array of reserved ranges and names + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Namespace.isReservedId = function isReservedId(reserved, id) { + if (reserved) + for (var i = 0; i < reserved.length; ++i) + if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] > id) + return true; + return false; +}; + +/** + * Tests if the specified name is reserved. + * @param {Array.|undefined} reserved Array of reserved ranges and names + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Namespace.isReservedName = function isReservedName(reserved, name) { + if (reserved) + for (var i = 0; i < reserved.length; ++i) + if (reserved[i] === name) + return true; + return false; +}; + +/** + * Not an actual constructor. Use {@link Namespace} instead. + * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions. + * @exports NamespaceBase + * @extends ReflectionObject + * @abstract + * @constructor + * @param {string} name Namespace name + * @param {Object.} [options] Declared options + * @see {@link Namespace} + */ +function Namespace(name, options) { + ReflectionObject.call(this, name, options); + + /** + * Nested objects by name. + * @type {Object.|undefined} + */ + this.nested = undefined; // toJSON + + /** + * Cached nested objects as an array. + * @type {ReflectionObject[]|null} + * @private + */ + this._nestedArray = null; +} + +function clearCache(namespace) { + namespace._nestedArray = null; + return namespace; +} + +/** + * Nested objects of this namespace as an array for iteration. + * @name NamespaceBase#nestedArray + * @type {ReflectionObject[]} + * @readonly + */ +Object.defineProperty(Namespace.prototype, "nestedArray", { + get: function() { + return this._nestedArray || (this._nestedArray = util.toArray(this.nested)); + } +}); + +/** + * Namespace descriptor. + * @interface INamespace + * @property {Object.} [options] Namespace options + * @property {Object.} [nested] Nested object descriptors + */ + +/** + * Any extension field descriptor. + * @typedef AnyExtensionField + * @type {IExtensionField|IExtensionMapField} + */ + +/** + * Any nested object descriptor. + * @typedef AnyNestedObject + * @type {IEnum|IType|IService|AnyExtensionField|INamespace} + */ +// ^ BEWARE: VSCode hangs forever when using more than 5 types (that's why AnyExtensionField exists in the first place) + +/** + * Converts this namespace to a namespace descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {INamespace} Namespace descriptor + */ +Namespace.prototype.toJSON = function toJSON(toJSONOptions) { + return util.toObject([ + "options" , this.options, + "nested" , arrayToJSON(this.nestedArray, toJSONOptions) + ]); +}; + +/** + * Adds nested objects to this namespace from nested object descriptors. + * @param {Object.} nestedJson Any nested object descriptors + * @returns {Namespace} `this` + */ +Namespace.prototype.addJSON = function addJSON(nestedJson) { + var ns = this; + /* istanbul ignore else */ + if (nestedJson) { + for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) { + nested = nestedJson[names[i]]; + ns.add( // most to least likely + ( nested.fields !== undefined + ? Type.fromJSON + : nested.values !== undefined + ? Enum.fromJSON + : nested.methods !== undefined + ? Service.fromJSON + : nested.id !== undefined + ? Field.fromJSON + : Namespace.fromJSON )(names[i], nested) + ); + } + } + return this; +}; + +/** + * Gets the nested object of the specified name. + * @param {string} name Nested object name + * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist + */ +Namespace.prototype.get = function get(name) { + return this.nested && this.nested[name] + || null; +}; + +/** + * Gets the values of the nested {@link Enum|enum} of the specified name. + * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`. + * @param {string} name Nested enum name + * @returns {Object.} Enum values + * @throws {Error} If there is no such enum + */ +Namespace.prototype.getEnum = function getEnum(name) { + if (this.nested && this.nested[name] instanceof Enum) + return this.nested[name].values; + throw Error("no such enum: " + name); +}; + +/** + * Adds a nested object to this namespace. + * @param {ReflectionObject} object Nested object to add + * @returns {Namespace} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a nested object with this name + */ +Namespace.prototype.add = function add(object) { + + if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof Enum || object instanceof Service || object instanceof Namespace)) + throw TypeError("object must be a valid nested object"); + + if (!this.nested) + this.nested = {}; + else { + var prev = this.get(object.name); + if (prev) { + if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) { + // replace plain namespace but keep existing nested elements and options + var nested = prev.nestedArray; + for (var i = 0; i < nested.length; ++i) + object.add(nested[i]); + this.remove(prev); + if (!this.nested) + this.nested = {}; + object.setOptions(prev.options, true); + + } else + throw Error("duplicate name '" + object.name + "' in " + this); + } + } + this.nested[object.name] = object; + object.onAdd(this); + return clearCache(this); +}; + +/** + * Removes a nested object from this namespace. + * @param {ReflectionObject} object Nested object to remove + * @returns {Namespace} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `object` is not a member of this namespace + */ +Namespace.prototype.remove = function remove(object) { + + if (!(object instanceof ReflectionObject)) + throw TypeError("object must be a ReflectionObject"); + if (object.parent !== this) + throw Error(object + " is not a member of " + this); + + delete this.nested[object.name]; + if (!Object.keys(this.nested).length) + this.nested = undefined; + + object.onRemove(this); + return clearCache(this); +}; + +/** + * Defines additial namespaces within this one if not yet existing. + * @param {string|string[]} path Path to create + * @param {*} [json] Nested types to create from JSON + * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty + */ +Namespace.prototype.define = function define(path, json) { + + if (util.isString(path)) + path = path.split("."); + else if (!Array.isArray(path)) + throw TypeError("illegal path"); + if (path && path.length && path[0] === "") + throw Error("path must be relative"); + + var ptr = this; + while (path.length > 0) { + var part = path.shift(); + if (ptr.nested && ptr.nested[part]) { + ptr = ptr.nested[part]; + if (!(ptr instanceof Namespace)) + throw Error("path conflicts with non-namespace objects"); + } else + ptr.add(ptr = new Namespace(part)); + } + if (json) + ptr.addJSON(json); + return ptr; +}; + +/** + * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. + * @returns {Namespace} `this` + */ +Namespace.prototype.resolveAll = function resolveAll() { + var nested = this.nestedArray, i = 0; + while (i < nested.length) + if (nested[i] instanceof Namespace) + nested[i++].resolveAll(); + else + nested[i++].resolve(); + return this.resolve(); +}; + +/** + * Recursively looks up the reflection object matching the specified path in the scope of this namespace. + * @param {string|string[]} path Path to look up + * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc. + * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked + * @returns {ReflectionObject|null} Looked up object or `null` if none could be found + */ +Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) { + + /* istanbul ignore next */ + if (typeof filterTypes === "boolean") { + parentAlreadyChecked = filterTypes; + filterTypes = undefined; + } else if (filterTypes && !Array.isArray(filterTypes)) + filterTypes = [ filterTypes ]; + + if (util.isString(path) && path.length) { + if (path === ".") + return this.root; + path = path.split("."); + } else if (!path.length) + return this; + + // Start at root if path is absolute + if (path[0] === "") + return this.root.lookup(path.slice(1), filterTypes); + + // Test if the first part matches any nested object, and if so, traverse if path contains more + var found = this.get(path[0]); + if (found) { + if (path.length === 1) { + if (!filterTypes || filterTypes.indexOf(found.constructor) > -1) + return found; + } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true))) + return found; + + // Otherwise try each nested namespace + } else + for (var i = 0; i < this.nestedArray.length; ++i) + if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true))) + return found; + + // If there hasn't been a match, try again at the parent + if (this.parent === null || parentAlreadyChecked) + return null; + return this.parent.lookup(path, filterTypes); +}; + +/** + * Looks up the reflection object at the specified path, relative to this namespace. + * @name NamespaceBase#lookup + * @function + * @param {string|string[]} path Path to look up + * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked + * @returns {ReflectionObject|null} Looked up object or `null` if none could be found + * @variation 2 + */ +// lookup(path: string, [parentAlreadyChecked: boolean]) + +/** + * Looks up the {@link Type|type} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Type} Looked up type + * @throws {Error} If `path` does not point to a type + */ +Namespace.prototype.lookupType = function lookupType(path) { + var found = this.lookup(path, [ Type ]); + if (!found) + throw Error("no such type: " + path); + return found; +}; + +/** + * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Enum} Looked up enum + * @throws {Error} If `path` does not point to an enum + */ +Namespace.prototype.lookupEnum = function lookupEnum(path) { + var found = this.lookup(path, [ Enum ]); + if (!found) + throw Error("no such Enum '" + path + "' in " + this); + return found; +}; + +/** + * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Type} Looked up type or enum + * @throws {Error} If `path` does not point to a type or enum + */ +Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) { + var found = this.lookup(path, [ Type, Enum ]); + if (!found) + throw Error("no such Type or Enum '" + path + "' in " + this); + return found; +}; + +/** + * Looks up the {@link Service|service} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Service} Looked up service + * @throws {Error} If `path` does not point to a service + */ +Namespace.prototype.lookupService = function lookupService(path) { + var found = this.lookup(path, [ Service ]); + if (!found) + throw Error("no such Service '" + path + "' in " + this); + return found; +}; + +// Sets up cyclic dependencies (called in index-light) +Namespace._configure = function(Type_, Service_, Enum_) { + Type = Type_; + Service = Service_; + Enum = Enum_; +}; + + +/***/ }), + +/***/ 83575: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = ReflectionObject; + +ReflectionObject.className = "ReflectionObject"; + +var util = __nccwpck_require__(47174); + +var Root; // cyclic + +/** + * Constructs a new reflection object instance. + * @classdesc Base class of all reflection objects. + * @constructor + * @param {string} name Object name + * @param {Object.} [options] Declared options + * @abstract + */ +function ReflectionObject(name, options) { + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + if (options && !util.isObject(options)) + throw TypeError("options must be an object"); + + /** + * Options. + * @type {Object.|undefined} + */ + this.options = options; // toJSON + + /** + * Parsed Options. + * @type {Array.>|undefined} + */ + this.parsedOptions = null; + + /** + * Unique name within its namespace. + * @type {string} + */ + this.name = name; + + /** + * Parent namespace. + * @type {Namespace|null} + */ + this.parent = null; + + /** + * Whether already resolved or not. + * @type {boolean} + */ + this.resolved = false; + + /** + * Comment text, if any. + * @type {string|null} + */ + this.comment = null; + + /** + * Defining file name. + * @type {string|null} + */ + this.filename = null; +} + +Object.defineProperties(ReflectionObject.prototype, { + + /** + * Reference to the root namespace. + * @name ReflectionObject#root + * @type {Root} + * @readonly + */ + root: { + get: function() { + var ptr = this; + while (ptr.parent !== null) + ptr = ptr.parent; + return ptr; + } + }, + + /** + * Full name including leading dot. + * @name ReflectionObject#fullName + * @type {string} + * @readonly + */ + fullName: { + get: function() { + var path = [ this.name ], + ptr = this.parent; + while (ptr) { + path.unshift(ptr.name); + ptr = ptr.parent; + } + return path.join("."); + } + } +}); + +/** + * Converts this reflection object to its descriptor representation. + * @returns {Object.} Descriptor + * @abstract + */ +ReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() { + throw Error(); // not implemented, shouldn't happen +}; + +/** + * Called when this object is added to a parent. + * @param {ReflectionObject} parent Parent added to + * @returns {undefined} + */ +ReflectionObject.prototype.onAdd = function onAdd(parent) { + if (this.parent && this.parent !== parent) + this.parent.remove(this); + this.parent = parent; + this.resolved = false; + var root = parent.root; + if (root instanceof Root) + root._handleAdd(this); +}; + +/** + * Called when this object is removed from a parent. + * @param {ReflectionObject} parent Parent removed from + * @returns {undefined} + */ +ReflectionObject.prototype.onRemove = function onRemove(parent) { + var root = parent.root; + if (root instanceof Root) + root._handleRemove(this); + this.parent = null; + this.resolved = false; +}; + +/** + * Resolves this objects type references. + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.resolve = function resolve() { + if (this.resolved) + return this; + if (this.root instanceof Root) + this.resolved = true; // only if part of a root + return this; +}; + +/** + * Gets an option value. + * @param {string} name Option name + * @returns {*} Option value or `undefined` if not set + */ +ReflectionObject.prototype.getOption = function getOption(name) { + if (this.options) + return this.options[name]; + return undefined; +}; + +/** + * Sets an option. + * @param {string} name Option name + * @param {*} value Option value + * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) { + if (!ifNotSet || !this.options || this.options[name] === undefined) + (this.options || (this.options = {}))[name] = value; + return this; +}; + +/** + * Sets a parsed option. + * @param {string} name parsed Option name + * @param {*} value Option value + * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) { + if (!this.parsedOptions) { + this.parsedOptions = []; + } + var parsedOptions = this.parsedOptions; + if (propName) { + // If setting a sub property of an option then try to merge it + // with an existing option + var opt = parsedOptions.find(function (opt) { + return Object.prototype.hasOwnProperty.call(opt, name); + }); + if (opt) { + // If we found an existing option - just merge the property value + var newValue = opt[name]; + util.setProperty(newValue, propName, value); + } else { + // otherwise, create a new option, set it's property and add it to the list + opt = {}; + opt[name] = util.setProperty({}, propName, value); + parsedOptions.push(opt); + } + } else { + // Always create a new option when setting the value of the option itself + var newOpt = {}; + newOpt[name] = value; + parsedOptions.push(newOpt); + } + return this; +}; + +/** + * Sets multiple options. + * @param {Object.} options Options to set + * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) { + if (options) + for (var keys = Object.keys(options), i = 0; i < keys.length; ++i) + this.setOption(keys[i], options[keys[i]], ifNotSet); + return this; +}; + +/** + * Converts this instance to its string representation. + * @returns {string} Class name[, space, full name] + */ +ReflectionObject.prototype.toString = function toString() { + var className = this.constructor.className, + fullName = this.fullName; + if (fullName.length) + return className + " " + fullName; + return className; +}; + +// Sets up cyclic dependencies (called in index-light) +ReflectionObject._configure = function(Root_) { + Root = Root_; +}; + + +/***/ }), + +/***/ 44408: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = OneOf; + +// extends ReflectionObject +var ReflectionObject = __nccwpck_require__(83575); +((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf"; + +var Field = __nccwpck_require__(48213), + util = __nccwpck_require__(47174); + +/** + * Constructs a new oneof instance. + * @classdesc Reflected oneof. + * @extends ReflectionObject + * @constructor + * @param {string} name Oneof name + * @param {string[]|Object.} [fieldNames] Field names + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function OneOf(name, fieldNames, options, comment) { + if (!Array.isArray(fieldNames)) { + options = fieldNames; + fieldNames = undefined; + } + ReflectionObject.call(this, name, options); + + /* istanbul ignore if */ + if (!(fieldNames === undefined || Array.isArray(fieldNames))) + throw TypeError("fieldNames must be an Array"); + + /** + * Field names that belong to this oneof. + * @type {string[]} + */ + this.oneof = fieldNames || []; // toJSON, marker + + /** + * Fields that belong to this oneof as an array for iteration. + * @type {Field[]} + * @readonly + */ + this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent + + /** + * Comment for this field. + * @type {string|null} + */ + this.comment = comment; +} + +/** + * Oneof descriptor. + * @interface IOneOf + * @property {Array.} oneof Oneof field names + * @property {Object.} [options] Oneof options + */ + +/** + * Constructs a oneof from a oneof descriptor. + * @param {string} name Oneof name + * @param {IOneOf} json Oneof descriptor + * @returns {OneOf} Created oneof + * @throws {TypeError} If arguments are invalid + */ +OneOf.fromJSON = function fromJSON(name, json) { + return new OneOf(name, json.oneof, json.options, json.comment); +}; + +/** + * Converts this oneof to a oneof descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IOneOf} Oneof descriptor + */ +OneOf.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , this.options, + "oneof" , this.oneof, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Adds the fields of the specified oneof to the parent if not already done so. + * @param {OneOf} oneof The oneof + * @returns {undefined} + * @inner + * @ignore + */ +function addFieldsToParent(oneof) { + if (oneof.parent) + for (var i = 0; i < oneof.fieldsArray.length; ++i) + if (!oneof.fieldsArray[i].parent) + oneof.parent.add(oneof.fieldsArray[i]); +} + +/** + * Adds a field to this oneof and removes it from its current parent, if any. + * @param {Field} field Field to add + * @returns {OneOf} `this` + */ +OneOf.prototype.add = function add(field) { + + /* istanbul ignore if */ + if (!(field instanceof Field)) + throw TypeError("field must be a Field"); + + if (field.parent && field.parent !== this.parent) + field.parent.remove(field); + this.oneof.push(field.name); + this.fieldsArray.push(field); + field.partOf = this; // field.parent remains null + addFieldsToParent(this); + return this; +}; + +/** + * Removes a field from this oneof and puts it back to the oneof's parent. + * @param {Field} field Field to remove + * @returns {OneOf} `this` + */ +OneOf.prototype.remove = function remove(field) { + + /* istanbul ignore if */ + if (!(field instanceof Field)) + throw TypeError("field must be a Field"); + + var index = this.fieldsArray.indexOf(field); + + /* istanbul ignore if */ + if (index < 0) + throw Error(field + " is not a member of " + this); + + this.fieldsArray.splice(index, 1); + index = this.oneof.indexOf(field.name); + + /* istanbul ignore else */ + if (index > -1) // theoretical + this.oneof.splice(index, 1); + + field.partOf = null; + return this; +}; + +/** + * @override + */ +OneOf.prototype.onAdd = function onAdd(parent) { + ReflectionObject.prototype.onAdd.call(this, parent); + var self = this; + // Collect present fields + for (var i = 0; i < this.oneof.length; ++i) { + var field = parent.get(this.oneof[i]); + if (field && !field.partOf) { + field.partOf = self; + self.fieldsArray.push(field); + } + } + // Add not yet present fields + addFieldsToParent(this); +}; + +/** + * @override + */ +OneOf.prototype.onRemove = function onRemove(parent) { + for (var i = 0, field; i < this.fieldsArray.length; ++i) + if ((field = this.fieldsArray[i]).parent) + field.parent.remove(field); + ReflectionObject.prototype.onRemove.call(this, parent); +}; + +/** + * Decorator function as returned by {@link OneOf.d} (TypeScript). + * @typedef OneOfDecorator + * @type {function} + * @param {Object} prototype Target prototype + * @param {string} oneofName OneOf name + * @returns {undefined} + */ + +/** + * OneOf decorator (TypeScript). + * @function + * @param {...string} fieldNames Field names + * @returns {OneOfDecorator} Decorator function + * @template T extends string + */ +OneOf.d = function decorateOneOf() { + var fieldNames = new Array(arguments.length), + index = 0; + while (index < arguments.length) + fieldNames[index] = arguments[index++]; + return function oneOfDecorator(prototype, oneofName) { + util.decorateType(prototype.constructor) + .add(new OneOf(oneofName, fieldNames)); + Object.defineProperty(prototype, oneofName, { + get: util.oneOfGetter(fieldNames), + set: util.oneOfSetter(fieldNames) + }); + }; +}; + + +/***/ }), + +/***/ 32137: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = parse; + +parse.filename = null; +parse.defaults = { keepCase: false }; + +var tokenize = __nccwpck_require__(61157), + Root = __nccwpck_require__(32614), + Type = __nccwpck_require__(38520), + Field = __nccwpck_require__(48213), + MapField = __nccwpck_require__(67777), + OneOf = __nccwpck_require__(44408), + Enum = __nccwpck_require__(17732), + Service = __nccwpck_require__(6178), + Method = __nccwpck_require__(57771), + types = __nccwpck_require__(6581), + util = __nccwpck_require__(47174); + +var base10Re = /^[1-9][0-9]*$/, + base10NegRe = /^-?[1-9][0-9]*$/, + base16Re = /^0[x][0-9a-fA-F]+$/, + base16NegRe = /^-?0[x][0-9a-fA-F]+$/, + base8Re = /^0[0-7]+$/, + base8NegRe = /^-?0[0-7]+$/, + numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, + nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/, + typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/, + fqTypeRefRe = /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/; + +/** + * Result object returned from {@link parse}. + * @interface IParserResult + * @property {string|undefined} package Package name, if declared + * @property {string[]|undefined} imports Imports, if any + * @property {string[]|undefined} weakImports Weak imports, if any + * @property {string|undefined} syntax Syntax, if specified (either `"proto2"` or `"proto3"`) + * @property {Root} root Populated root instance + */ + +/** + * Options modifying the behavior of {@link parse}. + * @interface IParseOptions + * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case + * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments. + * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist. + */ + +/** + * Options modifying the behavior of JSON serialization. + * @interface IToJSONOptions + * @property {boolean} [keepComments=false] Serializes comments. + */ + +/** + * Parses the given .proto source and returns an object with the parsed contents. + * @param {string} source Source contents + * @param {Root} root Root to populate + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {IParserResult} Parser result + * @property {string} filename=null Currently processing file name for error reporting, if known + * @property {IParseOptions} defaults Default {@link IParseOptions} + */ +function parse(source, root, options) { + /* eslint-disable callback-return */ + if (!(root instanceof Root)) { + options = root; + root = new Root(); + } + if (!options) + options = parse.defaults; + + var preferTrailingComment = options.preferTrailingComment || false; + var tn = tokenize(source, options.alternateCommentMode || false), + next = tn.next, + push = tn.push, + peek = tn.peek, + skip = tn.skip, + cmnt = tn.cmnt; + + var head = true, + pkg, + imports, + weakImports, + syntax, + isProto3 = false; + + var ptr = root; + + var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase; + + /* istanbul ignore next */ + function illegal(token, name, insideTryCatch) { + var filename = parse.filename; + if (!insideTryCatch) + parse.filename = null; + return Error("illegal " + (name || "token") + " '" + token + "' (" + (filename ? filename + ", " : "") + "line " + tn.line + ")"); + } + + function readString() { + var values = [], + token; + do { + /* istanbul ignore if */ + if ((token = next()) !== "\"" && token !== "'") + throw illegal(token); + + values.push(next()); + skip(token); + token = peek(); + } while (token === "\"" || token === "'"); + return values.join(""); + } + + function readValue(acceptTypeRef) { + var token = next(); + switch (token) { + case "'": + case "\"": + push(token); + return readString(); + case "true": case "TRUE": + return true; + case "false": case "FALSE": + return false; + } + try { + return parseNumber(token, /* insideTryCatch */ true); + } catch (e) { + + /* istanbul ignore else */ + if (acceptTypeRef && typeRefRe.test(token)) + return token; + + /* istanbul ignore next */ + throw illegal(token, "value"); + } + } + + function readRanges(target, acceptStrings) { + var token, start; + do { + if (acceptStrings && ((token = peek()) === "\"" || token === "'")) + target.push(readString()); + else + target.push([ start = parseId(next()), skip("to", true) ? parseId(next()) : start ]); + } while (skip(",", true)); + skip(";"); + } + + function parseNumber(token, insideTryCatch) { + var sign = 1; + if (token.charAt(0) === "-") { + sign = -1; + token = token.substring(1); + } + switch (token) { + case "inf": case "INF": case "Inf": + return sign * Infinity; + case "nan": case "NAN": case "Nan": case "NaN": + return NaN; + case "0": + return 0; + } + if (base10Re.test(token)) + return sign * parseInt(token, 10); + if (base16Re.test(token)) + return sign * parseInt(token, 16); + if (base8Re.test(token)) + return sign * parseInt(token, 8); + + /* istanbul ignore else */ + if (numberRe.test(token)) + return sign * parseFloat(token); + + /* istanbul ignore next */ + throw illegal(token, "number", insideTryCatch); + } + + function parseId(token, acceptNegative) { + switch (token) { + case "max": case "MAX": case "Max": + return 536870911; + case "0": + return 0; + } + + /* istanbul ignore if */ + if (!acceptNegative && token.charAt(0) === "-") + throw illegal(token, "id"); + + if (base10NegRe.test(token)) + return parseInt(token, 10); + if (base16NegRe.test(token)) + return parseInt(token, 16); + + /* istanbul ignore else */ + if (base8NegRe.test(token)) + return parseInt(token, 8); + + /* istanbul ignore next */ + throw illegal(token, "id"); + } + + function parsePackage() { + + /* istanbul ignore if */ + if (pkg !== undefined) + throw illegal("package"); + + pkg = next(); + + /* istanbul ignore if */ + if (!typeRefRe.test(pkg)) + throw illegal(pkg, "name"); + + ptr = ptr.define(pkg); + skip(";"); + } + + function parseImport() { + var token = peek(); + var whichImports; + switch (token) { + case "weak": + whichImports = weakImports || (weakImports = []); + next(); + break; + case "public": + next(); + // eslint-disable-line no-fallthrough + default: + whichImports = imports || (imports = []); + break; + } + token = readString(); + skip(";"); + whichImports.push(token); + } + + function parseSyntax() { + skip("="); + syntax = readString(); + isProto3 = syntax === "proto3"; + + /* istanbul ignore if */ + if (!isProto3 && syntax !== "proto2") + throw illegal(syntax, "syntax"); + + skip(";"); + } + + function parseCommon(parent, token) { + switch (token) { + + case "option": + parseOption(parent, token); + skip(";"); + return true; + + case "message": + parseType(parent, token); + return true; + + case "enum": + parseEnum(parent, token); + return true; + + case "service": + parseService(parent, token); + return true; + + case "extend": + parseExtension(parent, token); + return true; + } + return false; + } + + function ifBlock(obj, fnIf, fnElse) { + var trailingLine = tn.line; + if (obj) { + if(typeof obj.comment !== "string") { + obj.comment = cmnt(); // try block-type comment + } + obj.filename = parse.filename; + } + if (skip("{", true)) { + var token; + while ((token = next()) !== "}") + fnIf(token); + skip(";", true); + } else { + if (fnElse) + fnElse(); + skip(";"); + if (obj && (typeof obj.comment !== "string" || preferTrailingComment)) + obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment + } + } + + function parseType(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "type name"); + + var type = new Type(token); + ifBlock(type, function parseType_block(token) { + if (parseCommon(type, token)) + return; + + switch (token) { + + case "map": + parseMapField(type, token); + break; + + case "required": + case "optional": + case "repeated": + parseField(type, token); + break; + + case "oneof": + parseOneOf(type, token); + break; + + case "extensions": + readRanges(type.extensions || (type.extensions = [])); + break; + + case "reserved": + readRanges(type.reserved || (type.reserved = []), true); + break; + + default: + /* istanbul ignore if */ + if (!isProto3 || !typeRefRe.test(token)) + throw illegal(token); + + push(token); + parseField(type, "optional"); + break; + } + }); + parent.add(type); + } + + function parseField(parent, rule, extend) { + var type = next(); + if (type === "group") { + parseGroup(parent, rule); + return; + } + + /* istanbul ignore if */ + if (!typeRefRe.test(type)) + throw illegal(type, "type"); + + var name = next(); + + /* istanbul ignore if */ + if (!nameRe.test(name)) + throw illegal(name, "name"); + + name = applyCase(name); + skip("="); + + var field = new Field(name, parseId(next()), type, rule, extend); + ifBlock(field, function parseField_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(field, token); + skip(";"); + } else + throw illegal(token); + + }, function parseField_line() { + parseInlineOptions(field); + }); + parent.add(field); + + // JSON defaults to packed=true if not set so we have to set packed=false explicity when + // parsing proto2 descriptors without the option, where applicable. This must be done for + // all known packable types and anything that could be an enum (= is not a basic type). + if (!isProto3 && field.repeated && (types.packed[type] !== undefined || types.basic[type] === undefined)) + field.setOption("packed", false, /* ifNotSet */ true); + } + + function parseGroup(parent, rule) { + var name = next(); + + /* istanbul ignore if */ + if (!nameRe.test(name)) + throw illegal(name, "name"); + + var fieldName = util.lcFirst(name); + if (name === fieldName) + name = util.ucFirst(name); + skip("="); + var id = parseId(next()); + var type = new Type(name); + type.group = true; + var field = new Field(fieldName, id, name, rule); + field.filename = parse.filename; + ifBlock(type, function parseGroup_block(token) { + switch (token) { + + case "option": + parseOption(type, token); + skip(";"); + break; + + case "required": + case "optional": + case "repeated": + parseField(type, token); + break; + + /* istanbul ignore next */ + default: + throw illegal(token); // there are no groups with proto3 semantics + } + }); + parent.add(type) + .add(field); + } + + function parseMapField(parent) { + skip("<"); + var keyType = next(); + + /* istanbul ignore if */ + if (types.mapKey[keyType] === undefined) + throw illegal(keyType, "type"); + + skip(","); + var valueType = next(); + + /* istanbul ignore if */ + if (!typeRefRe.test(valueType)) + throw illegal(valueType, "type"); + + skip(">"); + var name = next(); + + /* istanbul ignore if */ + if (!nameRe.test(name)) + throw illegal(name, "name"); + + skip("="); + var field = new MapField(applyCase(name), parseId(next()), keyType, valueType); + ifBlock(field, function parseMapField_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(field, token); + skip(";"); + } else + throw illegal(token); + + }, function parseMapField_line() { + parseInlineOptions(field); + }); + parent.add(field); + } + + function parseOneOf(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "name"); + + var oneof = new OneOf(applyCase(token)); + ifBlock(oneof, function parseOneOf_block(token) { + if (token === "option") { + parseOption(oneof, token); + skip(";"); + } else { + push(token); + parseField(oneof, "optional"); + } + }); + parent.add(oneof); + } + + function parseEnum(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "name"); + + var enm = new Enum(token); + ifBlock(enm, function parseEnum_block(token) { + switch(token) { + case "option": + parseOption(enm, token); + skip(";"); + break; + + case "reserved": + readRanges(enm.reserved || (enm.reserved = []), true); + break; + + default: + parseEnumValue(enm, token); + } + }); + parent.add(enm); + } + + function parseEnumValue(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token)) + throw illegal(token, "name"); + + skip("="); + var value = parseId(next(), true), + dummy = {}; + ifBlock(dummy, function parseEnumValue_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(dummy, token); // skip + skip(";"); + } else + throw illegal(token); + + }, function parseEnumValue_line() { + parseInlineOptions(dummy); // skip + }); + parent.add(token, value, dummy.comment); + } + + function parseOption(parent, token) { + var isCustom = skip("(", true); + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token, "name"); + + var name = token; + var option = name; + var propName; + + if (isCustom) { + skip(")"); + name = "(" + name + ")"; + option = name; + token = peek(); + if (fqTypeRefRe.test(token)) { + propName = token.substr(1); //remove '.' before property name + name += token; + next(); + } + } + skip("="); + var optionValue = parseOptionValue(parent, name); + setParsedOption(parent, option, optionValue, propName); + } + + function parseOptionValue(parent, name) { + if (skip("{", true)) { // { a: "foo" b { c: "bar" } } + var result = {}; + while (!skip("}", true)) { + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "name"); + + var value; + var propName = token; + if (peek() === "{") + value = parseOptionValue(parent, name + "." + token); + else { + skip(":"); + if (peek() === "{") + value = parseOptionValue(parent, name + "." + token); + else { + value = readValue(true); + setOption(parent, name + "." + token, value); + } + } + var prevValue = result[propName]; + if (prevValue) + value = [].concat(prevValue).concat(value); + result[propName] = value; + skip(",", true); + } + return result; + } + + var simpleValue = readValue(true); + setOption(parent, name, simpleValue); + return simpleValue; + // Does not enforce a delimiter to be universal + } + + function setOption(parent, name, value) { + if (parent.setOption) + parent.setOption(name, value); + } + + function setParsedOption(parent, name, value, propName) { + if (parent.setParsedOption) + parent.setParsedOption(name, value, propName); + } + + function parseInlineOptions(parent) { + if (skip("[", true)) { + do { + parseOption(parent, "option"); + } while (skip(",", true)); + skip("]"); + } + return parent; + } + + function parseService(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "service name"); + + var service = new Service(token); + ifBlock(service, function parseService_block(token) { + if (parseCommon(service, token)) + return; + + /* istanbul ignore else */ + if (token === "rpc") + parseMethod(service, token); + else + throw illegal(token); + }); + parent.add(service); + } + + function parseMethod(parent, token) { + // Get the comment of the preceding line now (if one exists) in case the + // method is defined across multiple lines. + var commentText = cmnt(); + + var type = token; + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "name"); + + var name = token, + requestType, requestStream, + responseType, responseStream; + + skip("("); + if (skip("stream", true)) + requestStream = true; + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token); + + requestType = token; + skip(")"); skip("returns"); skip("("); + if (skip("stream", true)) + responseStream = true; + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token); + + responseType = token; + skip(")"); + + var method = new Method(name, type, requestType, responseType, requestStream, responseStream); + method.comment = commentText; + ifBlock(method, function parseMethod_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(method, token); + skip(";"); + } else + throw illegal(token); + + }); + parent.add(method); + } + + function parseExtension(parent, token) { + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token, "reference"); + + var reference = token; + ifBlock(null, function parseExtension_block(token) { + switch (token) { + + case "required": + case "repeated": + case "optional": + parseField(parent, token, reference); + break; + + default: + /* istanbul ignore if */ + if (!isProto3 || !typeRefRe.test(token)) + throw illegal(token); + push(token); + parseField(parent, "optional", reference); + break; + } + }); + } + + var token; + while ((token = next()) !== null) { + switch (token) { + + case "package": + + /* istanbul ignore if */ + if (!head) + throw illegal(token); + + parsePackage(); + break; + + case "import": + + /* istanbul ignore if */ + if (!head) + throw illegal(token); + + parseImport(); + break; + + case "syntax": + + /* istanbul ignore if */ + if (!head) + throw illegal(token); + + parseSyntax(); + break; + + case "option": + + parseOption(ptr, token); + skip(";"); + break; + + default: + + /* istanbul ignore else */ + if (parseCommon(ptr, token)) { + head = false; + continue; + } + + /* istanbul ignore next */ + throw illegal(token); + } + } + + parse.filename = null; + return { + "package" : pkg, + "imports" : imports, + weakImports : weakImports, + syntax : syntax, + root : root + }; +} + +/** + * Parses the given .proto source and returns an object with the parsed contents. + * @name parse + * @function + * @param {string} source Source contents + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {IParserResult} Parser result + * @property {string} filename=null Currently processing file name for error reporting, if known + * @property {IParseOptions} defaults Default {@link IParseOptions} + * @variation 2 + */ + + +/***/ }), + +/***/ 41011: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Reader; + +var util = __nccwpck_require__(71241); + +var BufferReader; // cyclic + +var LongBits = util.LongBits, + utf8 = util.utf8; + +/* istanbul ignore next */ +function indexOutOfRange(reader, writeLength) { + return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); +} + +/** + * Constructs a new reader instance using the specified buffer. + * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. + * @constructor + * @param {Uint8Array} buffer Buffer to read from + */ +function Reader(buffer) { + + /** + * Read buffer. + * @type {Uint8Array} + */ + this.buf = buffer; + + /** + * Read buffer position. + * @type {number} + */ + this.pos = 0; + + /** + * Read buffer length. + * @type {number} + */ + this.len = buffer.length; +} + +var create_array = typeof Uint8Array !== "undefined" + ? function create_typed_array(buffer) { + if (buffer instanceof Uint8Array || Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + } + /* istanbul ignore next */ + : function create_array(buffer) { + if (Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + }; + +var create = function create() { + return util.Buffer + ? function create_buffer_setup(buffer) { + return (Reader.create = function create_buffer(buffer) { + return util.Buffer.isBuffer(buffer) + ? new BufferReader(buffer) + /* istanbul ignore next */ + : create_array(buffer); + })(buffer); + } + /* istanbul ignore next */ + : create_array; +}; + +/** + * Creates a new reader using the specified buffer. + * @function + * @param {Uint8Array|Buffer} buffer Buffer to read from + * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} + * @throws {Error} If `buffer` is not a valid buffer + */ +Reader.create = create(); + +Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; + +/** + * Reads a varint as an unsigned 32 bit value. + * @function + * @returns {number} Value read + */ +Reader.prototype.uint32 = (function read_uint32_setup() { + var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) + return function read_uint32() { + value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; + + /* istanbul ignore if */ + if ((this.pos += 5) > this.len) { + this.pos = this.len; + throw indexOutOfRange(this, 10); + } + return value; + }; +})(); + +/** + * Reads a varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.int32 = function read_int32() { + return this.uint32() | 0; +}; + +/** + * Reads a zig-zag encoded varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.sint32 = function read_sint32() { + var value = this.uint32(); + return value >>> 1 ^ -(value & 1) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readLongVarint() { + // tends to deopt with local vars for octet etc. + var bits = new LongBits(0, 0); + var i = 0; + if (this.len - this.pos > 4) { // fast route (lo) + for (; i < 4; ++i) { + // 1st..4th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 5th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; + bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + i = 0; + } else { + for (; i < 3; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 1st..3th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 4th + bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; + return bits; + } + if (this.len - this.pos > 4) { // fast route (hi) + for (; i < 5; ++i) { + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } else { + for (; i < 5; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } + /* istanbul ignore next */ + throw Error("invalid varint encoding"); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads a varint as a signed 64 bit value. + * @name Reader#int64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as an unsigned 64 bit value. + * @name Reader#uint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a zig-zag encoded varint as a signed 64 bit value. + * @name Reader#sint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as a boolean. + * @returns {boolean} Value read + */ +Reader.prototype.bool = function read_bool() { + return this.uint32() !== 0; +}; + +function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` + return (buf[end - 4] + | buf[end - 3] << 8 + | buf[end - 2] << 16 + | buf[end - 1] << 24) >>> 0; +} + +/** + * Reads fixed 32 bits as an unsigned 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.fixed32 = function read_fixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4); +}; + +/** + * Reads fixed 32 bits as a signed 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.sfixed32 = function read_sfixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readFixed64(/* this: Reader */) { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 8); + + return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads fixed 64 bits. + * @name Reader#fixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads zig-zag encoded fixed 64 bits. + * @name Reader#sfixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a float (32 bit) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.float = function read_float() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readFloatLE(this.buf, this.pos); + this.pos += 4; + return value; +}; + +/** + * Reads a double (64 bit float) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.double = function read_double() { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readDoubleLE(this.buf, this.pos); + this.pos += 8; + return value; +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @returns {Uint8Array} Value read + */ +Reader.prototype.bytes = function read_bytes() { + var length = this.uint32(), + start = this.pos, + end = this.pos + length; + + /* istanbul ignore if */ + if (end > this.len) + throw indexOutOfRange(this, length); + + this.pos += length; + if (Array.isArray(this.buf)) // plain array + return this.buf.slice(start, end); + return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1 + ? new this.buf.constructor(0) + : this._slice.call(this.buf, start, end); +}; + +/** + * Reads a string preceeded by its byte length as a varint. + * @returns {string} Value read + */ +Reader.prototype.string = function read_string() { + var bytes = this.bytes(); + return utf8.read(bytes, 0, bytes.length); +}; + +/** + * Skips the specified number of bytes if specified, otherwise skips a varint. + * @param {number} [length] Length if known, otherwise a varint is assumed + * @returns {Reader} `this` + */ +Reader.prototype.skip = function skip(length) { + if (typeof length === "number") { + /* istanbul ignore if */ + if (this.pos + length > this.len) + throw indexOutOfRange(this, length); + this.pos += length; + } else { + do { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + } while (this.buf[this.pos++] & 128); + } + return this; +}; + +/** + * Skips the next element of the specified wire type. + * @param {number} wireType Wire type received + * @returns {Reader} `this` + */ +Reader.prototype.skipType = function(wireType) { + switch (wireType) { + case 0: + this.skip(); + break; + case 1: + this.skip(8); + break; + case 2: + this.skip(this.uint32()); + break; + case 3: + while ((wireType = this.uint32() & 7) !== 4) { + this.skipType(wireType); + } + break; + case 5: + this.skip(4); + break; + + /* istanbul ignore next */ + default: + throw Error("invalid wire type " + wireType + " at offset " + this.pos); + } + return this; +}; + +Reader._configure = function(BufferReader_) { + BufferReader = BufferReader_; + Reader.create = create(); + BufferReader._configure(); + + var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; + util.merge(Reader.prototype, { + + int64: function read_int64() { + return readLongVarint.call(this)[fn](false); + }, + + uint64: function read_uint64() { + return readLongVarint.call(this)[fn](true); + }, + + sint64: function read_sint64() { + return readLongVarint.call(this).zzDecode()[fn](false); + }, + + fixed64: function read_fixed64() { + return readFixed64.call(this)[fn](true); + }, + + sfixed64: function read_sfixed64() { + return readFixed64.call(this)[fn](false); + } + + }); +}; + + +/***/ }), + +/***/ 80339: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = BufferReader; + +// extends Reader +var Reader = __nccwpck_require__(41011); +(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; + +var util = __nccwpck_require__(71241); + +/** + * Constructs a new buffer reader instance. + * @classdesc Wire format reader using node buffers. + * @extends Reader + * @constructor + * @param {Buffer} buffer Buffer to read from + */ +function BufferReader(buffer) { + Reader.call(this, buffer); + + /** + * Read buffer. + * @name BufferReader#buf + * @type {Buffer} + */ +} + +BufferReader._configure = function () { + /* istanbul ignore else */ + if (util.Buffer) + BufferReader.prototype._slice = util.Buffer.prototype.slice; +}; + + +/** + * @override + */ +BufferReader.prototype.string = function read_string_buffer() { + var len = this.uint32(); // modifies pos + return this.buf.utf8Slice + ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) + : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @name BufferReader#bytes + * @function + * @returns {Buffer} Value read + */ + +BufferReader._configure(); + + +/***/ }), + +/***/ 32614: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Root; + +// extends Namespace +var Namespace = __nccwpck_require__(76189); +((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = "Root"; + +var Field = __nccwpck_require__(48213), + Enum = __nccwpck_require__(17732), + OneOf = __nccwpck_require__(44408), + util = __nccwpck_require__(47174); + +var Type, // cyclic + parse, // might be excluded + common; // " + +/** + * Constructs a new root namespace instance. + * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. + * @extends NamespaceBase + * @constructor + * @param {Object.} [options] Top level options + */ +function Root(options) { + Namespace.call(this, "", options); + + /** + * Deferred extension fields. + * @type {Field[]} + */ + this.deferred = []; + + /** + * Resolved file names of loaded files. + * @type {string[]} + */ + this.files = []; +} + +/** + * Loads a namespace descriptor into a root namespace. + * @param {INamespace} json Nameespace descriptor + * @param {Root} [root] Root namespace, defaults to create a new one if omitted + * @returns {Root} Root namespace + */ +Root.fromJSON = function fromJSON(json, root) { + if (!root) + root = new Root(); + if (json.options) + root.setOptions(json.options); + return root.addJSON(json.nested); +}; + +/** + * Resolves the path of an imported file, relative to the importing origin. + * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories. + * @function + * @param {string} origin The file name of the importing file + * @param {string} target The file name being imported + * @returns {string|null} Resolved path to `target` or `null` to skip the file + */ +Root.prototype.resolvePath = util.path.resolve; + +/** + * Fetch content from file path or url + * This method exists so you can override it with your own logic. + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + */ +Root.prototype.fetch = util.fetch; + +// A symbol-like function to safely signal synchronous loading +/* istanbul ignore next */ +function SYNC() {} // eslint-disable-line no-empty-function + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} options Parse options + * @param {LoadCallback} callback Callback function + * @returns {undefined} + */ +Root.prototype.load = function load(filename, options, callback) { + if (typeof options === "function") { + callback = options; + options = undefined; + } + var self = this; + if (!callback) + return util.asPromise(load, self, filename, options); + + var sync = callback === SYNC; // undocumented + + // Finishes loading by calling the callback (exactly once) + function finish(err, root) { + /* istanbul ignore if */ + if (!callback) + return; + var cb = callback; + callback = null; + if (sync) + throw err; + cb(err, root); + } + + // Bundled definition existence checking + function getBundledFileName(filename) { + var idx = filename.lastIndexOf("google/protobuf/"); + if (idx > -1) { + var altname = filename.substring(idx); + if (altname in common) return altname; + } + return null; + } + + // Processes a single file + function process(filename, source) { + try { + if (util.isString(source) && source.charAt(0) === "{") + source = JSON.parse(source); + if (!util.isString(source)) + self.setOptions(source.options).addJSON(source.nested); + else { + parse.filename = filename; + var parsed = parse(source, self, options), + resolved, + i = 0; + if (parsed.imports) + for (; i < parsed.imports.length; ++i) + if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i])) + fetch(resolved); + if (parsed.weakImports) + for (i = 0; i < parsed.weakImports.length; ++i) + if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i])) + fetch(resolved, true); + } + } catch (err) { + finish(err); + } + if (!sync && !queued) + finish(null, self); // only once anyway + } + + // Fetches a single file + function fetch(filename, weak) { + + // Skip if already loaded / attempted + if (self.files.indexOf(filename) > -1) + return; + self.files.push(filename); + + // Shortcut bundled definitions + if (filename in common) { + if (sync) + process(filename, common[filename]); + else { + ++queued; + setTimeout(function() { + --queued; + process(filename, common[filename]); + }); + } + return; + } + + // Otherwise fetch from disk or network + if (sync) { + var source; + try { + source = util.fs.readFileSync(filename).toString("utf8"); + } catch (err) { + if (!weak) + finish(err); + return; + } + process(filename, source); + } else { + ++queued; + self.fetch(filename, function(err, source) { + --queued; + /* istanbul ignore if */ + if (!callback) + return; // terminated meanwhile + if (err) { + /* istanbul ignore else */ + if (!weak) + finish(err); + else if (!queued) // can't be covered reliably + finish(null, self); + return; + } + process(filename, source); + }); + } + } + var queued = 0; + + // Assembling the root namespace doesn't require working type + // references anymore, so we can load everything in parallel + if (util.isString(filename)) + filename = [ filename ]; + for (var i = 0, resolved; i < filename.length; ++i) + if (resolved = self.resolvePath("", filename[i])) + fetch(resolved); + + if (sync) + return self; + if (!queued) + finish(null, self); + return undefined; +}; +// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @function Root#load + * @param {string|string[]} filename Names of one or multiple files to load + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ +// function load(filename:string, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. + * @function Root#load + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {Promise} Promise + * @variation 3 + */ +// function load(filename:string, [options:IParseOptions]):Promise + +/** + * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). + * @function Root#loadSync + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {Root} Root namespace + * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid + */ +Root.prototype.loadSync = function loadSync(filename, options) { + if (!util.isNode) + throw Error("not supported"); + return this.load(filename, options, SYNC); +}; + +/** + * @override + */ +Root.prototype.resolveAll = function resolveAll() { + if (this.deferred.length) + throw Error("unresolvable extensions: " + this.deferred.map(function(field) { + return "'extend " + field.extend + "' in " + field.parent.fullName; + }).join(", ")); + return Namespace.prototype.resolveAll.call(this); +}; + +// only uppercased (and thus conflict-free) children are exposed, see below +var exposeRe = /^[A-Z]/; + +/** + * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type. + * @param {Root} root Root instance + * @param {Field} field Declaring extension field witin the declaring type + * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise + * @inner + * @ignore + */ +function tryHandleExtension(root, field) { + var extendedType = field.parent.lookup(field.extend); + if (extendedType) { + var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options); + sisterField.declaringField = field; + field.extensionField = sisterField; + extendedType.add(sisterField); + return true; + } + return false; +} + +/** + * Called when any object is added to this root or its sub-namespaces. + * @param {ReflectionObject} object Object added + * @returns {undefined} + * @private + */ +Root.prototype._handleAdd = function _handleAdd(object) { + if (object instanceof Field) { + + if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField) + if (!tryHandleExtension(this, object)) + this.deferred.push(object); + + } else if (object instanceof Enum) { + + if (exposeRe.test(object.name)) + object.parent[object.name] = object.values; // expose enum values as property of its parent + + } else if (!(object instanceof OneOf)) /* everything else is a namespace */ { + + if (object instanceof Type) // Try to handle any deferred extensions + for (var i = 0; i < this.deferred.length;) + if (tryHandleExtension(this, this.deferred[i])) + this.deferred.splice(i, 1); + else + ++i; + for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace + this._handleAdd(object._nestedArray[j]); + if (exposeRe.test(object.name)) + object.parent[object.name] = object; // expose namespace as property of its parent + } + + // The above also adds uppercased (and thus conflict-free) nested types, services and enums as + // properties of namespaces just like static code does. This allows using a .d.ts generated for + // a static module with reflection-based solutions where the condition is met. +}; + +/** + * Called when any object is removed from this root or its sub-namespaces. + * @param {ReflectionObject} object Object removed + * @returns {undefined} + * @private + */ +Root.prototype._handleRemove = function _handleRemove(object) { + if (object instanceof Field) { + + if (/* an extension field */ object.extend !== undefined) { + if (/* already handled */ object.extensionField) { // remove its sister field + object.extensionField.parent.remove(object.extensionField); + object.extensionField = null; + } else { // cancel the extension + var index = this.deferred.indexOf(object); + /* istanbul ignore else */ + if (index > -1) + this.deferred.splice(index, 1); + } + } + + } else if (object instanceof Enum) { + + if (exposeRe.test(object.name)) + delete object.parent[object.name]; // unexpose enum values + + } else if (object instanceof Namespace) { + + for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace + this._handleRemove(object._nestedArray[i]); + + if (exposeRe.test(object.name)) + delete object.parent[object.name]; // unexpose namespaces + + } +}; + +// Sets up cyclic dependencies (called in index-light) +Root._configure = function(Type_, parse_, common_) { + Type = Type_; + parse = parse_; + common = common_; +}; + + +/***/ }), + +/***/ 50073: +/***/ ((module) => { + +"use strict"; + +module.exports = {}; + +/** + * Named roots. + * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). + * Can also be used manually to make roots available accross modules. + * @name roots + * @type {Object.} + * @example + * // pbjs -r myroot -o compiled.js ... + * + * // in another module: + * require("./compiled.js"); + * + * // in any subsequent module: + * var root = protobuf.roots["myroot"]; + */ + + +/***/ }), + +/***/ 86444: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +/** + * Streaming RPC helpers. + * @namespace + */ +var rpc = exports; + +/** + * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. + * @typedef RPCImpl + * @type {function} + * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called + * @param {Uint8Array} requestData Request data + * @param {RPCImplCallback} callback Callback function + * @returns {undefined} + * @example + * function rpcImpl(method, requestData, callback) { + * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code + * throw Error("no such method"); + * asynchronouslyObtainAResponse(requestData, function(err, responseData) { + * callback(err, responseData); + * }); + * } + */ + +/** + * Node-style callback as used by {@link RPCImpl}. + * @typedef RPCImplCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error + * @returns {undefined} + */ + +rpc.Service = __nccwpck_require__(12439); + + +/***/ }), + +/***/ 12439: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Service; + +var util = __nccwpck_require__(71241); + +// Extends EventEmitter +(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; + +/** + * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. + * + * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. + * @typedef rpc.ServiceMethodCallback + * @template TRes extends Message + * @type {function} + * @param {Error|null} error Error, if any + * @param {TRes} [response] Response message + * @returns {undefined} + */ + +/** + * A service method part of a {@link rpc.Service} as created by {@link Service.create}. + * @typedef rpc.ServiceMethod + * @template TReq extends Message + * @template TRes extends Message + * @type {function} + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message + * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` + */ + +/** + * Constructs a new RPC service instance. + * @classdesc An RPC service as returned by {@link Service#create}. + * @exports rpc.Service + * @extends util.EventEmitter + * @constructor + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ +function Service(rpcImpl, requestDelimited, responseDelimited) { + + if (typeof rpcImpl !== "function") + throw TypeError("rpcImpl must be a function"); + + util.EventEmitter.call(this); + + /** + * RPC implementation. Becomes `null` once the service is ended. + * @type {RPCImpl|null} + */ + this.rpcImpl = rpcImpl; + + /** + * Whether requests are length-delimited. + * @type {boolean} + */ + this.requestDelimited = Boolean(requestDelimited); + + /** + * Whether responses are length-delimited. + * @type {boolean} + */ + this.responseDelimited = Boolean(responseDelimited); +} + +/** + * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. + * @param {Method|rpc.ServiceMethod} method Reflected or static method + * @param {Constructor} requestCtor Request constructor + * @param {Constructor} responseCtor Response constructor + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} callback Service callback + * @returns {undefined} + * @template TReq extends Message + * @template TRes extends Message + */ +Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { + + if (!request) + throw TypeError("request must be specified"); + + var self = this; + if (!callback) + return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); + + if (!self.rpcImpl) { + setTimeout(function() { callback(Error("already ended")); }, 0); + return undefined; + } + + try { + return self.rpcImpl( + method, + requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), + function rpcCallback(err, response) { + + if (err) { + self.emit("error", err, method); + return callback(err); + } + + if (response === null) { + self.end(/* endedByRPC */ true); + return undefined; + } + + if (!(response instanceof responseCtor)) { + try { + response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); + } catch (err) { + self.emit("error", err, method); + return callback(err); + } + } + + self.emit("data", response, method); + return callback(null, response); + } + ); + } catch (err) { + self.emit("error", err, method); + setTimeout(function() { callback(err); }, 0); + return undefined; + } +}; + +/** + * Ends this service and emits the `end` event. + * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. + * @returns {rpc.Service} `this` + */ +Service.prototype.end = function end(endedByRPC) { + if (this.rpcImpl) { + if (!endedByRPC) // signal end to rpcImpl + this.rpcImpl(null, null, null); + this.rpcImpl = null; + this.emit("end").off(); + } + return this; +}; + + +/***/ }), + +/***/ 6178: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Service; + +// extends Namespace +var Namespace = __nccwpck_require__(76189); +((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = "Service"; + +var Method = __nccwpck_require__(57771), + util = __nccwpck_require__(47174), + rpc = __nccwpck_require__(86444); + +/** + * Constructs a new service instance. + * @classdesc Reflected service. + * @extends NamespaceBase + * @constructor + * @param {string} name Service name + * @param {Object.} [options] Service options + * @throws {TypeError} If arguments are invalid + */ +function Service(name, options) { + Namespace.call(this, name, options); + + /** + * Service methods. + * @type {Object.} + */ + this.methods = {}; // toJSON, marker + + /** + * Cached methods as an array. + * @type {Method[]|null} + * @private + */ + this._methodsArray = null; +} + +/** + * Service descriptor. + * @interface IService + * @extends INamespace + * @property {Object.} methods Method descriptors + */ + +/** + * Constructs a service from a service descriptor. + * @param {string} name Service name + * @param {IService} json Service descriptor + * @returns {Service} Created service + * @throws {TypeError} If arguments are invalid + */ +Service.fromJSON = function fromJSON(name, json) { + var service = new Service(name, json.options); + /* istanbul ignore else */ + if (json.methods) + for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i) + service.add(Method.fromJSON(names[i], json.methods[names[i]])); + if (json.nested) + service.addJSON(json.nested); + service.comment = json.comment; + return service; +}; + +/** + * Converts this service to a service descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IService} Service descriptor + */ +Service.prototype.toJSON = function toJSON(toJSONOptions) { + var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , inherited && inherited.options || undefined, + "methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {}, + "nested" , inherited && inherited.nested || undefined, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Methods of this service as an array for iteration. + * @name Service#methodsArray + * @type {Method[]} + * @readonly + */ +Object.defineProperty(Service.prototype, "methodsArray", { + get: function() { + return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); + } +}); + +function clearCache(service) { + service._methodsArray = null; + return service; +} + +/** + * @override + */ +Service.prototype.get = function get(name) { + return this.methods[name] + || Namespace.prototype.get.call(this, name); +}; + +/** + * @override + */ +Service.prototype.resolveAll = function resolveAll() { + var methods = this.methodsArray; + for (var i = 0; i < methods.length; ++i) + methods[i].resolve(); + return Namespace.prototype.resolve.call(this); +}; + +/** + * @override + */ +Service.prototype.add = function add(object) { + + /* istanbul ignore if */ + if (this.get(object.name)) + throw Error("duplicate name '" + object.name + "' in " + this); + + if (object instanceof Method) { + this.methods[object.name] = object; + object.parent = this; + return clearCache(this); + } + return Namespace.prototype.add.call(this, object); +}; + +/** + * @override + */ +Service.prototype.remove = function remove(object) { + if (object instanceof Method) { + + /* istanbul ignore if */ + if (this.methods[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.methods[object.name]; + object.parent = null; + return clearCache(this); + } + return Namespace.prototype.remove.call(this, object); +}; + +/** + * Creates a runtime service using the specified rpc implementation. + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed. + */ +Service.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) { + var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited); + for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) { + var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, ""); + rpcService[methodName] = util.codegen(["r","c"], util.isReserved(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({ + m: method, + q: method.resolvedRequestType.ctor, + s: method.resolvedResponseType.ctor + }); + } + return rpcService; +}; + + +/***/ }), + +/***/ 61157: +/***/ ((module) => { + +"use strict"; + +module.exports = tokenize; + +var delimRe = /[\s{}=;:[\],'"()<>]/g, + stringDoubleRe = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, + stringSingleRe = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g; + +var setCommentRe = /^ *[*/]+ */, + setCommentAltRe = /^\s*\*?\/*/, + setCommentSplitRe = /\n/g, + whitespaceRe = /\s/, + unescapeRe = /\\(.?)/g; + +var unescapeMap = { + "0": "\0", + "r": "\r", + "n": "\n", + "t": "\t" +}; + +/** + * Unescapes a string. + * @param {string} str String to unescape + * @returns {string} Unescaped string + * @property {Object.} map Special characters map + * @memberof tokenize + */ +function unescape(str) { + return str.replace(unescapeRe, function($0, $1) { + switch ($1) { + case "\\": + case "": + return $1; + default: + return unescapeMap[$1] || ""; + } + }); +} + +tokenize.unescape = unescape; + +/** + * Gets the next token and advances. + * @typedef TokenizerHandleNext + * @type {function} + * @returns {string|null} Next token or `null` on eof + */ + +/** + * Peeks for the next token. + * @typedef TokenizerHandlePeek + * @type {function} + * @returns {string|null} Next token or `null` on eof + */ + +/** + * Pushes a token back to the stack. + * @typedef TokenizerHandlePush + * @type {function} + * @param {string} token Token + * @returns {undefined} + */ + +/** + * Skips the next token. + * @typedef TokenizerHandleSkip + * @type {function} + * @param {string} expected Expected token + * @param {boolean} [optional=false] If optional + * @returns {boolean} Whether the token matched + * @throws {Error} If the token didn't match and is not optional + */ + +/** + * Gets the comment on the previous line or, alternatively, the line comment on the specified line. + * @typedef TokenizerHandleCmnt + * @type {function} + * @param {number} [line] Line number + * @returns {string|null} Comment text or `null` if none + */ + +/** + * Handle object returned from {@link tokenize}. + * @interface ITokenizerHandle + * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof) + * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof) + * @property {TokenizerHandlePush} push Pushes a token back to the stack + * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws + * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any + * @property {number} line Current line number + */ + +/** + * Tokenizes the given .proto source and returns an object with useful utility functions. + * @param {string} source Source contents + * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode. + * @returns {ITokenizerHandle} Tokenizer handle + */ +function tokenize(source, alternateCommentMode) { + /* eslint-disable callback-return */ + source = source.toString(); + + var offset = 0, + length = source.length, + line = 1, + commentType = null, + commentText = null, + commentLine = 0, + commentLineEmpty = false, + commentIsLeading = false; + + var stack = []; + + var stringDelim = null; + + /* istanbul ignore next */ + /** + * Creates an error for illegal syntax. + * @param {string} subject Subject + * @returns {Error} Error created + * @inner + */ + function illegal(subject) { + return Error("illegal " + subject + " (line " + line + ")"); + } + + /** + * Reads a string till its end. + * @returns {string} String read + * @inner + */ + function readString() { + var re = stringDelim === "'" ? stringSingleRe : stringDoubleRe; + re.lastIndex = offset - 1; + var match = re.exec(source); + if (!match) + throw illegal("string"); + offset = re.lastIndex; + push(stringDelim); + stringDelim = null; + return unescape(match[1]); + } + + /** + * Gets the character at `pos` within the source. + * @param {number} pos Position + * @returns {string} Character + * @inner + */ + function charAt(pos) { + return source.charAt(pos); + } + + /** + * Sets the current comment text. + * @param {number} start Start offset + * @param {number} end End offset + * @param {boolean} isLeading set if a leading comment + * @returns {undefined} + * @inner + */ + function setComment(start, end, isLeading) { + commentType = source.charAt(start++); + commentLine = line; + commentLineEmpty = false; + commentIsLeading = isLeading; + var lookback; + if (alternateCommentMode) { + lookback = 2; // alternate comment parsing: "//" or "/*" + } else { + lookback = 3; // "///" or "/**" + } + var commentOffset = start - lookback, + c; + do { + if (--commentOffset < 0 || + (c = source.charAt(commentOffset)) === "\n") { + commentLineEmpty = true; + break; + } + } while (c === " " || c === "\t"); + var lines = source + .substring(start, end) + .split(setCommentSplitRe); + for (var i = 0; i < lines.length; ++i) + lines[i] = lines[i] + .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, "") + .trim(); + commentText = lines + .join("\n") + .trim(); + } + + function isDoubleSlashCommentLine(startOffset) { + var endOffset = findEndOfLine(startOffset); + + // see if remaining line matches comment pattern + var lineText = source.substring(startOffset, endOffset); + // look for 1 or 2 slashes since startOffset would already point past + // the first slash that started the comment. + var isComment = /^\s*\/{1,2}/.test(lineText); + return isComment; + } + + function findEndOfLine(cursor) { + // find end of cursor's line + var endOffset = cursor; + while (endOffset < length && charAt(endOffset) !== "\n") { + endOffset++; + } + return endOffset; + } + + /** + * Obtains the next token. + * @returns {string|null} Next token or `null` on eof + * @inner + */ + function next() { + if (stack.length > 0) + return stack.shift(); + if (stringDelim) + return readString(); + var repeat, + prev, + curr, + start, + isDoc, + isLeadingComment = offset === 0; + do { + if (offset === length) + return null; + repeat = false; + while (whitespaceRe.test(curr = charAt(offset))) { + if (curr === "\n") { + isLeadingComment = true; + ++line; + } + if (++offset === length) + return null; + } + + if (charAt(offset) === "/") { + if (++offset === length) { + throw illegal("comment"); + } + if (charAt(offset) === "/") { // Line + if (!alternateCommentMode) { + // check for triple-slash comment + isDoc = charAt(start = offset + 1) === "/"; + + while (charAt(++offset) !== "\n") { + if (offset === length) { + return null; + } + } + ++offset; + if (isDoc) { + setComment(start, offset - 1, isLeadingComment); + } + ++line; + repeat = true; + } else { + // check for double-slash comments, consolidating consecutive lines + start = offset; + isDoc = false; + if (isDoubleSlashCommentLine(offset)) { + isDoc = true; + do { + offset = findEndOfLine(offset); + if (offset === length) { + break; + } + offset++; + } while (isDoubleSlashCommentLine(offset)); + } else { + offset = Math.min(length, findEndOfLine(offset) + 1); + } + if (isDoc) { + setComment(start, offset, isLeadingComment); + } + line++; + repeat = true; + } + } else if ((curr = charAt(offset)) === "*") { /* Block */ + // check for /** (regular comment mode) or /* (alternate comment mode) + start = offset + 1; + isDoc = alternateCommentMode || charAt(start) === "*"; + do { + if (curr === "\n") { + ++line; + } + if (++offset === length) { + throw illegal("comment"); + } + prev = curr; + curr = charAt(offset); + } while (prev !== "*" || curr !== "/"); + ++offset; + if (isDoc) { + setComment(start, offset - 2, isLeadingComment); + } + repeat = true; + } else { + return "/"; + } + } + } while (repeat); + + // offset !== length if we got here + + var end = offset; + delimRe.lastIndex = 0; + var delim = delimRe.test(charAt(end++)); + if (!delim) + while (end < length && !delimRe.test(charAt(end))) + ++end; + var token = source.substring(offset, offset = end); + if (token === "\"" || token === "'") + stringDelim = token; + return token; + } + + /** + * Pushes a token back to the stack. + * @param {string} token Token + * @returns {undefined} + * @inner + */ + function push(token) { + stack.push(token); + } + + /** + * Peeks for the next token. + * @returns {string|null} Token or `null` on eof + * @inner + */ + function peek() { + if (!stack.length) { + var token = next(); + if (token === null) + return null; + push(token); + } + return stack[0]; + } + + /** + * Skips a token. + * @param {string} expected Expected token + * @param {boolean} [optional=false] Whether the token is optional + * @returns {boolean} `true` when skipped, `false` if not + * @throws {Error} When a required token is not present + * @inner + */ + function skip(expected, optional) { + var actual = peek(), + equals = actual === expected; + if (equals) { + next(); + return true; + } + if (!optional) + throw illegal("token '" + actual + "', '" + expected + "' expected"); + return false; + } + + /** + * Gets a comment. + * @param {number} [trailingLine] Line number if looking for a trailing comment + * @returns {string|null} Comment text + * @inner + */ + function cmnt(trailingLine) { + var ret = null; + if (trailingLine === undefined) { + if (commentLine === line - 1 && (alternateCommentMode || commentType === "*" || commentLineEmpty)) { + ret = commentIsLeading ? commentText : null; + } + } else { + /* istanbul ignore else */ + if (commentLine < trailingLine) { + peek(); + } + if (commentLine === trailingLine && !commentLineEmpty && (alternateCommentMode || commentType === "/")) { + ret = commentIsLeading ? null : commentText; + } + } + return ret; + } + + return Object.defineProperty({ + next: next, + peek: peek, + push: push, + skip: skip, + cmnt: cmnt + }, "line", { + get: function() { return line; } + }); + /* eslint-enable callback-return */ +} + + +/***/ }), + +/***/ 38520: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Type; + +// extends Namespace +var Namespace = __nccwpck_require__(76189); +((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = "Type"; + +var Enum = __nccwpck_require__(17732), + OneOf = __nccwpck_require__(44408), + Field = __nccwpck_require__(48213), + MapField = __nccwpck_require__(67777), + Service = __nccwpck_require__(6178), + Message = __nccwpck_require__(68027), + Reader = __nccwpck_require__(41011), + Writer = __nccwpck_require__(13098), + util = __nccwpck_require__(47174), + encoder = __nccwpck_require__(23072), + decoder = __nccwpck_require__(65871), + verifier = __nccwpck_require__(34334), + converter = __nccwpck_require__(13617), + wrappers = __nccwpck_require__(63216); + +/** + * Constructs a new reflected message type instance. + * @classdesc Reflected message type. + * @extends NamespaceBase + * @constructor + * @param {string} name Message name + * @param {Object.} [options] Declared options + */ +function Type(name, options) { + Namespace.call(this, name, options); + + /** + * Message fields. + * @type {Object.} + */ + this.fields = {}; // toJSON, marker + + /** + * Oneofs declared within this namespace, if any. + * @type {Object.} + */ + this.oneofs = undefined; // toJSON + + /** + * Extension ranges, if any. + * @type {number[][]} + */ + this.extensions = undefined; // toJSON + + /** + * Reserved ranges, if any. + * @type {Array.} + */ + this.reserved = undefined; // toJSON + + /*? + * Whether this type is a legacy group. + * @type {boolean|undefined} + */ + this.group = undefined; // toJSON + + /** + * Cached fields by id. + * @type {Object.|null} + * @private + */ + this._fieldsById = null; + + /** + * Cached fields as an array. + * @type {Field[]|null} + * @private + */ + this._fieldsArray = null; + + /** + * Cached oneofs as an array. + * @type {OneOf[]|null} + * @private + */ + this._oneofsArray = null; + + /** + * Cached constructor. + * @type {Constructor<{}>} + * @private + */ + this._ctor = null; +} + +Object.defineProperties(Type.prototype, { + + /** + * Message fields by id. + * @name Type#fieldsById + * @type {Object.} + * @readonly + */ + fieldsById: { + get: function() { + + /* istanbul ignore if */ + if (this._fieldsById) + return this._fieldsById; + + this._fieldsById = {}; + for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) { + var field = this.fields[names[i]], + id = field.id; + + /* istanbul ignore if */ + if (this._fieldsById[id]) + throw Error("duplicate id " + id + " in " + this); + + this._fieldsById[id] = field; + } + return this._fieldsById; + } + }, + + /** + * Fields of this message as an array for iteration. + * @name Type#fieldsArray + * @type {Field[]} + * @readonly + */ + fieldsArray: { + get: function() { + return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields)); + } + }, + + /** + * Oneofs of this message as an array for iteration. + * @name Type#oneofsArray + * @type {OneOf[]} + * @readonly + */ + oneofsArray: { + get: function() { + return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs)); + } + }, + + /** + * The registered constructor, if any registered, otherwise a generic constructor. + * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor. + * @name Type#ctor + * @type {Constructor<{}>} + */ + ctor: { + get: function() { + return this._ctor || (this.ctor = Type.generateConstructor(this)()); + }, + set: function(ctor) { + + // Ensure proper prototype + var prototype = ctor.prototype; + if (!(prototype instanceof Message)) { + (ctor.prototype = new Message()).constructor = ctor; + util.merge(ctor.prototype, prototype); + } + + // Classes and messages reference their reflected type + ctor.$type = ctor.prototype.$type = this; + + // Mix in static methods + util.merge(ctor, Message, true); + + this._ctor = ctor; + + // Messages have non-enumerable default values on their prototype + var i = 0; + for (; i < /* initializes */ this.fieldsArray.length; ++i) + this._fieldsArray[i].resolve(); // ensures a proper value + + // Messages have non-enumerable getters and setters for each virtual oneof field + var ctorProperties = {}; + for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i) + ctorProperties[this._oneofsArray[i].resolve().name] = { + get: util.oneOfGetter(this._oneofsArray[i].oneof), + set: util.oneOfSetter(this._oneofsArray[i].oneof) + }; + if (i) + Object.defineProperties(ctor.prototype, ctorProperties); + } + } +}); + +/** + * Generates a constructor function for the specified type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +Type.generateConstructor = function generateConstructor(mtype) { + /* eslint-disable no-unexpected-multiline */ + var gen = util.codegen(["p"], mtype.name); + // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype + for (var i = 0, field; i < mtype.fieldsArray.length; ++i) + if ((field = mtype._fieldsArray[i]).map) gen + ("this%s={}", util.safeProp(field.name)); + else if (field.repeated) gen + ("this%s=[]", util.safeProp(field.name)); + return gen + ("if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors + * @property {Object.} fields Field descriptors + * @property {number[][]} [extensions] Extension ranges + * @property {number[][]} [reserved] Reserved ranges + * @property {boolean} [group=false] Whether a legacy group or not + */ + +/** + * Creates a message type from a message type descriptor. + * @param {string} name Message name + * @param {IType} json Message type descriptor + * @returns {Type} Created message type + */ +Type.fromJSON = function fromJSON(name, json) { + var type = new Type(name, json.options); + type.extensions = json.extensions; + type.reserved = json.reserved; + var names = Object.keys(json.fields), + i = 0; + for (; i < names.length; ++i) + type.add( + ( typeof json.fields[names[i]].keyType !== "undefined" + ? MapField.fromJSON + : Field.fromJSON )(names[i], json.fields[names[i]]) + ); + if (json.oneofs) + for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i) + type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]])); + if (json.nested) + for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) { + var nested = json.nested[names[i]]; + type.add( // most to least likely + ( nested.id !== undefined + ? Field.fromJSON + : nested.fields !== undefined + ? Type.fromJSON + : nested.values !== undefined + ? Enum.fromJSON + : nested.methods !== undefined + ? Service.fromJSON + : Namespace.fromJSON )(names[i], nested) + ); + } + if (json.extensions && json.extensions.length) + type.extensions = json.extensions; + if (json.reserved && json.reserved.length) + type.reserved = json.reserved; + if (json.group) + type.group = true; + if (json.comment) + type.comment = json.comment; + return type; +}; + +/** + * Converts this message type to a message type descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IType} Message type descriptor + */ +Type.prototype.toJSON = function toJSON(toJSONOptions) { + var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , inherited && inherited.options || undefined, + "oneofs" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions), + "fields" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {}, + "extensions" , this.extensions && this.extensions.length ? this.extensions : undefined, + "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, + "group" , this.group || undefined, + "nested" , inherited && inherited.nested || undefined, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * @override + */ +Type.prototype.resolveAll = function resolveAll() { + var fields = this.fieldsArray, i = 0; + while (i < fields.length) + fields[i++].resolve(); + var oneofs = this.oneofsArray; i = 0; + while (i < oneofs.length) + oneofs[i++].resolve(); + return Namespace.prototype.resolveAll.call(this); +}; + +/** + * @override + */ +Type.prototype.get = function get(name) { + return this.fields[name] + || this.oneofs && this.oneofs[name] + || this.nested && this.nested[name] + || null; +}; + +/** + * Adds a nested object to this type. + * @param {ReflectionObject} object Nested object to add + * @returns {Type} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id + */ +Type.prototype.add = function add(object) { + + if (this.get(object.name)) + throw Error("duplicate name '" + object.name + "' in " + this); + + if (object instanceof Field && object.extend === undefined) { + // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects. + // The root object takes care of adding distinct sister-fields to the respective extended + // type instead. + + // avoids calling the getter if not absolutely necessary because it's called quite frequently + if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id]) + throw Error("duplicate id " + object.id + " in " + this); + if (this.isReservedId(object.id)) + throw Error("id " + object.id + " is reserved in " + this); + if (this.isReservedName(object.name)) + throw Error("name '" + object.name + "' is reserved in " + this); + + if (object.parent) + object.parent.remove(object); + this.fields[object.name] = object; + object.message = this; + object.onAdd(this); + return clearCache(this); + } + if (object instanceof OneOf) { + if (!this.oneofs) + this.oneofs = {}; + this.oneofs[object.name] = object; + object.onAdd(this); + return clearCache(this); + } + return Namespace.prototype.add.call(this, object); +}; + +/** + * Removes a nested object from this type. + * @param {ReflectionObject} object Nested object to remove + * @returns {Type} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `object` is not a member of this type + */ +Type.prototype.remove = function remove(object) { + if (object instanceof Field && object.extend === undefined) { + // See Type#add for the reason why extension fields are excluded here. + + /* istanbul ignore if */ + if (!this.fields || this.fields[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.fields[object.name]; + object.parent = null; + object.onRemove(this); + return clearCache(this); + } + if (object instanceof OneOf) { + + /* istanbul ignore if */ + if (!this.oneofs || this.oneofs[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.oneofs[object.name]; + object.parent = null; + object.onRemove(this); + return clearCache(this); + } + return Namespace.prototype.remove.call(this, object); +}; + +/** + * Tests if the specified id is reserved. + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Type.prototype.isReservedId = function isReservedId(id) { + return Namespace.isReservedId(this.reserved, id); +}; + +/** + * Tests if the specified name is reserved. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Type.prototype.isReservedName = function isReservedName(name) { + return Namespace.isReservedName(this.reserved, name); +}; + +/** + * Creates a new message of this type using the specified properties. + * @param {Object.} [properties] Properties to set + * @returns {Message<{}>} Message instance + */ +Type.prototype.create = function create(properties) { + return new this.ctor(properties); +}; + +/** + * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. + * @returns {Type} `this` + */ +Type.prototype.setup = function setup() { + // Sets up everything at once so that the prototype chain does not have to be re-evaluated + // multiple times (V8, soft-deopt prototype-check). + + var fullName = this.fullName, + types = []; + for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i) + types.push(this._fieldsArray[i].resolve().resolvedType); + + // Replace setup methods with type-specific generated functions + this.encode = encoder(this)({ + Writer : Writer, + types : types, + util : util + }); + this.decode = decoder(this)({ + Reader : Reader, + types : types, + util : util + }); + this.verify = verifier(this)({ + types : types, + util : util + }); + this.fromObject = converter.fromObject(this)({ + types : types, + util : util + }); + this.toObject = converter.toObject(this)({ + types : types, + util : util + }); + + // Inject custom wrappers for common types + var wrapper = wrappers[fullName]; + if (wrapper) { + var originalThis = Object.create(this); + // if (wrapper.fromObject) { + originalThis.fromObject = this.fromObject; + this.fromObject = wrapper.fromObject.bind(originalThis); + // } + // if (wrapper.toObject) { + originalThis.toObject = this.toObject; + this.toObject = wrapper.toObject.bind(originalThis); + // } + } + + return this; +}; + +/** + * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. + * @param {Message<{}>|Object.} message Message instance or plain object + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} writer + */ +Type.prototype.encode = function encode_setup(message, writer) { + return this.setup().encode(message, writer); // overrides this method +}; + +/** + * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. + * @param {Message<{}>|Object.} message Message instance or plain object + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} writer + */ +Type.prototype.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); +}; + +/** + * Decodes a message of this type. + * @param {Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Length of the message, if known beforehand + * @returns {Message<{}>} Decoded message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {util.ProtocolError<{}>} If required fields are missing + */ +Type.prototype.decode = function decode_setup(reader, length) { + return this.setup().decode(reader, length); // overrides this method +}; + +/** + * Decodes a message of this type preceeded by its byte length as a varint. + * @param {Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {Message<{}>} Decoded message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {util.ProtocolError} If required fields are missing + */ +Type.prototype.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof Reader)) + reader = Reader.create(reader); + return this.decode(reader, reader.uint32()); +}; + +/** + * Verifies that field values are valid and that required fields are present. + * @param {Object.} message Plain object to verify + * @returns {null|string} `null` if valid, otherwise the reason why it is not + */ +Type.prototype.verify = function verify_setup(message) { + return this.setup().verify(message); // overrides this method +}; + +/** + * Creates a new message of this type from a plain object. Also converts values to their respective internal types. + * @param {Object.} object Plain object to convert + * @returns {Message<{}>} Message instance + */ +Type.prototype.fromObject = function fromObject(object) { + return this.setup().fromObject(object); +}; + +/** + * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}. + * @interface IConversionOptions + * @property {Function} [longs] Long conversion type. + * Valid values are `String` and `Number` (the global types). + * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library. + * @property {Function} [enums] Enum value conversion type. + * Only valid value is `String` (the global type). + * Defaults to copy the present value, which is the numeric id. + * @property {Function} [bytes] Bytes value conversion type. + * Valid values are `Array` and (a base64 encoded) `String` (the global types). + * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser. + * @property {boolean} [defaults=false] Also sets default values on the resulting object + * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false` + * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false` + * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any + * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings + */ + +/** + * Creates a plain object from a message of this type. Also converts values to other types if specified. + * @param {Message<{}>} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ +Type.prototype.toObject = function toObject(message, options) { + return this.setup().toObject(message, options); +}; + +/** + * Decorator function as returned by {@link Type.d} (TypeScript). + * @typedef TypeDecorator + * @type {function} + * @param {Constructor} target Target constructor + * @returns {undefined} + * @template T extends Message + */ + +/** + * Type decorator (TypeScript). + * @param {string} [typeName] Type name, defaults to the constructor's name + * @returns {TypeDecorator} Decorator function + * @template T extends Message + */ +Type.d = function decorateType(typeName) { + return function typeDecorator(target) { + util.decorateType(target, typeName); + }; +}; + + +/***/ }), + +/***/ 6581: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +/** + * Common type constants. + * @namespace + */ +var types = exports; + +var util = __nccwpck_require__(47174); + +var s = [ + "double", // 0 + "float", // 1 + "int32", // 2 + "uint32", // 3 + "sint32", // 4 + "fixed32", // 5 + "sfixed32", // 6 + "int64", // 7 + "uint64", // 8 + "sint64", // 9 + "fixed64", // 10 + "sfixed64", // 11 + "bool", // 12 + "string", // 13 + "bytes" // 14 +]; + +function bake(values, offset) { + var i = 0, o = {}; + offset |= 0; + while (i < values.length) o[s[i + offset]] = values[i++]; + return o; +} + +/** + * Basic type wire types. + * @type {Object.} + * @const + * @property {number} double=1 Fixed64 wire type + * @property {number} float=5 Fixed32 wire type + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + * @property {number} string=2 Ldelim wire type + * @property {number} bytes=2 Ldelim wire type + */ +types.basic = bake([ + /* double */ 1, + /* float */ 5, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0, + /* string */ 2, + /* bytes */ 2 +]); + +/** + * Basic type defaults. + * @type {Object.} + * @const + * @property {number} double=0 Double default + * @property {number} float=0 Float default + * @property {number} int32=0 Int32 default + * @property {number} uint32=0 Uint32 default + * @property {number} sint32=0 Sint32 default + * @property {number} fixed32=0 Fixed32 default + * @property {number} sfixed32=0 Sfixed32 default + * @property {number} int64=0 Int64 default + * @property {number} uint64=0 Uint64 default + * @property {number} sint64=0 Sint32 default + * @property {number} fixed64=0 Fixed64 default + * @property {number} sfixed64=0 Sfixed64 default + * @property {boolean} bool=false Bool default + * @property {string} string="" String default + * @property {Array.} bytes=Array(0) Bytes default + * @property {null} message=null Message default + */ +types.defaults = bake([ + /* double */ 0, + /* float */ 0, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 0, + /* sfixed32 */ 0, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 0, + /* sfixed64 */ 0, + /* bool */ false, + /* string */ "", + /* bytes */ util.emptyArray, + /* message */ null +]); + +/** + * Basic long type wire types. + * @type {Object.} + * @const + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + */ +types.long = bake([ + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1 +], 7); + +/** + * Allowed types for map keys with their associated wire type. + * @type {Object.} + * @const + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + * @property {number} string=2 Ldelim wire type + */ +types.mapKey = bake([ + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0, + /* string */ 2 +], 2); + +/** + * Allowed types for packed repeated fields with their associated wire type. + * @type {Object.} + * @const + * @property {number} double=1 Fixed64 wire type + * @property {number} float=5 Fixed32 wire type + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + */ +types.packed = bake([ + /* double */ 1, + /* float */ 5, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0 +]); + + +/***/ }), + +/***/ 47174: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/** + * Various utility functions. + * @namespace + */ +var util = module.exports = __nccwpck_require__(71241); + +var roots = __nccwpck_require__(50073); + +var Type, // cyclic + Enum; + +util.codegen = __nccwpck_require__(58882); +util.fetch = __nccwpck_require__(50663); +util.path = __nccwpck_require__(24761); + +/** + * Node's fs module if available. + * @type {Object.} + */ +util.fs = util.inquire("fs"); + +/** + * Converts an object's values to an array. + * @param {Object.} object Object to convert + * @returns {Array.<*>} Converted array + */ +util.toArray = function toArray(object) { + if (object) { + var keys = Object.keys(object), + array = new Array(keys.length), + index = 0; + while (index < keys.length) + array[index] = object[keys[index++]]; + return array; + } + return []; +}; + +/** + * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values. + * @param {Array.<*>} array Array to convert + * @returns {Object.} Converted object + */ +util.toObject = function toObject(array) { + var object = {}, + index = 0; + while (index < array.length) { + var key = array[index++], + val = array[index++]; + if (val !== undefined) + object[key] = val; + } + return object; +}; + +var safePropBackslashRe = /\\/g, + safePropQuoteRe = /"/g; + +/** + * Tests whether the specified name is a reserved word in JS. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +util.isReserved = function isReserved(name) { + return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name); +}; + +/** + * Returns a safe property accessor for the specified property name. + * @param {string} prop Property name + * @returns {string} Safe accessor + */ +util.safeProp = function safeProp(prop) { + if (!/^[$\w_]+$/.test(prop) || util.isReserved(prop)) + return "[\"" + prop.replace(safePropBackslashRe, "\\\\").replace(safePropQuoteRe, "\\\"") + "\"]"; + return "." + prop; +}; + +/** + * Converts the first character of a string to upper case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.ucFirst = function ucFirst(str) { + return str.charAt(0).toUpperCase() + str.substring(1); +}; + +var camelCaseRe = /_([a-z])/g; + +/** + * Converts a string to camel case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.camelCase = function camelCase(str) { + return str.substring(0, 1) + + str.substring(1) + .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); }); +}; + +/** + * Compares reflected fields by id. + * @param {Field} a First field + * @param {Field} b Second field + * @returns {number} Comparison value + */ +util.compareFieldsById = function compareFieldsById(a, b) { + return a.id - b.id; +}; + +/** + * Decorator helper for types (TypeScript). + * @param {Constructor} ctor Constructor function + * @param {string} [typeName] Type name, defaults to the constructor's name + * @returns {Type} Reflected type + * @template T extends Message + * @property {Root} root Decorators root + */ +util.decorateType = function decorateType(ctor, typeName) { + + /* istanbul ignore if */ + if (ctor.$type) { + if (typeName && ctor.$type.name !== typeName) { + util.decorateRoot.remove(ctor.$type); + ctor.$type.name = typeName; + util.decorateRoot.add(ctor.$type); + } + return ctor.$type; + } + + /* istanbul ignore next */ + if (!Type) + Type = __nccwpck_require__(38520); + + var type = new Type(typeName || ctor.name); + util.decorateRoot.add(type); + type.ctor = ctor; // sets up .encode, .decode etc. + Object.defineProperty(ctor, "$type", { value: type, enumerable: false }); + Object.defineProperty(ctor.prototype, "$type", { value: type, enumerable: false }); + return type; +}; + +var decorateEnumIndex = 0; + +/** + * Decorator helper for enums (TypeScript). + * @param {Object} object Enum object + * @returns {Enum} Reflected enum + */ +util.decorateEnum = function decorateEnum(object) { + + /* istanbul ignore if */ + if (object.$type) + return object.$type; + + /* istanbul ignore next */ + if (!Enum) + Enum = __nccwpck_require__(17732); + + var enm = new Enum("Enum" + decorateEnumIndex++, object); + util.decorateRoot.add(enm); + Object.defineProperty(object, "$type", { value: enm, enumerable: false }); + return enm; +}; + + +/** + * Sets the value of a property by property path. If a value already exists, it is turned to an array + * @param {Object.} dst Destination object + * @param {string} path dot '.' delimited path of the property to set + * @param {Object} value the value to set + * @returns {Object.} Destination object + */ +util.setProperty = function setProperty(dst, path, value) { + function setProp(dst, path, value) { + var part = path.shift(); + if (path.length > 0) { + dst[part] = setProp(dst[part] || {}, path, value); + } else { + var prevValue = dst[part]; + if (prevValue) + value = [].concat(prevValue).concat(value); + dst[part] = value; + } + return dst; + } + + if (typeof dst !== "object") + throw TypeError("dst must be an object"); + if (!path) + throw TypeError("path must be specified"); + + path = path.split("."); + return setProp(dst, path, value); +}; + +/** + * Decorator root (TypeScript). + * @name util.decorateRoot + * @type {Root} + * @readonly + */ +Object.defineProperty(util, "decorateRoot", { + get: function() { + return roots["decorated"] || (roots["decorated"] = new (__nccwpck_require__(32614))()); + } +}); + + +/***/ }), + +/***/ 8374: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = LongBits; + +var util = __nccwpck_require__(71241); + +/** + * Constructs new long bits. + * @classdesc Helper class for working with the low and high bits of a 64 bit value. + * @memberof util + * @constructor + * @param {number} lo Low 32 bits, unsigned + * @param {number} hi High 32 bits, unsigned + */ +function LongBits(lo, hi) { + + // note that the casts below are theoretically unnecessary as of today, but older statically + // generated converter code might still call the ctor with signed 32bits. kept for compat. + + /** + * Low bits. + * @type {number} + */ + this.lo = lo >>> 0; + + /** + * High bits. + * @type {number} + */ + this.hi = hi >>> 0; +} + +/** + * Zero bits. + * @memberof util.LongBits + * @type {util.LongBits} + */ +var zero = LongBits.zero = new LongBits(0, 0); + +zero.toNumber = function() { return 0; }; +zero.zzEncode = zero.zzDecode = function() { return this; }; +zero.length = function() { return 1; }; + +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + +/** + * Constructs new long bits from the specified number. + * @param {number} value Value + * @returns {util.LongBits} Instance + */ +LongBits.fromNumber = function fromNumber(value) { + if (value === 0) + return zero; + var sign = value < 0; + if (sign) + value = -value; + var lo = value >>> 0, + hi = (value - lo) / 4294967296 >>> 0; + if (sign) { + hi = ~hi >>> 0; + lo = ~lo >>> 0; + if (++lo > 4294967295) { + lo = 0; + if (++hi > 4294967295) + hi = 0; + } + } + return new LongBits(lo, hi); +}; + +/** + * Constructs new long bits from a number, long or string. + * @param {Long|number|string} value Value + * @returns {util.LongBits} Instance + */ +LongBits.from = function from(value) { + if (typeof value === "number") + return LongBits.fromNumber(value); + if (util.isString(value)) { + /* istanbul ignore else */ + if (util.Long) + value = util.Long.fromString(value); + else + return LongBits.fromNumber(parseInt(value, 10)); + } + return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; +}; + +/** + * Converts this long bits to a possibly unsafe JavaScript number. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {number} Possibly unsafe number + */ +LongBits.prototype.toNumber = function toNumber(unsigned) { + if (!unsigned && this.hi >>> 31) { + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); + } + return this.lo + this.hi * 4294967296; +}; + +/** + * Converts this long bits to a long. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long} Long + */ +LongBits.prototype.toLong = function toLong(unsigned) { + return util.Long + ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ + : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; +}; + +var charCodeAt = String.prototype.charCodeAt; + +/** + * Constructs new long bits from the specified 8 characters long hash. + * @param {string} hash Hash + * @returns {util.LongBits} Bits + */ +LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; + return new LongBits( + ( charCodeAt.call(hash, 0) + | charCodeAt.call(hash, 1) << 8 + | charCodeAt.call(hash, 2) << 16 + | charCodeAt.call(hash, 3) << 24) >>> 0 + , + ( charCodeAt.call(hash, 4) + | charCodeAt.call(hash, 5) << 8 + | charCodeAt.call(hash, 6) << 16 + | charCodeAt.call(hash, 7) << 24) >>> 0 + ); +}; + +/** + * Converts this long bits to a 8 characters long hash. + * @returns {string} Hash + */ +LongBits.prototype.toHash = function toHash() { + return String.fromCharCode( + this.lo & 255, + this.lo >>> 8 & 255, + this.lo >>> 16 & 255, + this.lo >>> 24 , + this.hi & 255, + this.hi >>> 8 & 255, + this.hi >>> 16 & 255, + this.hi >>> 24 + ); +}; + +/** + * Zig-zag encodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzEncode = function zzEncode() { + var mask = this.hi >> 31; + this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; + this.lo = ( this.lo << 1 ^ mask) >>> 0; + return this; +}; + +/** + * Zig-zag decodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzDecode = function zzDecode() { + var mask = -(this.lo & 1); + this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; + this.hi = ( this.hi >>> 1 ^ mask) >>> 0; + return this; +}; + +/** + * Calculates the length of this longbits when encoded as a varint. + * @returns {number} Length + */ +LongBits.prototype.length = function length() { + var part0 = this.lo, + part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, + part2 = this.hi >>> 24; + return part2 === 0 + ? part1 === 0 + ? part0 < 16384 + ? part0 < 128 ? 1 : 2 + : part0 < 2097152 ? 3 : 4 + : part1 < 16384 + ? part1 < 128 ? 5 : 6 + : part1 < 2097152 ? 7 : 8 + : part2 < 128 ? 9 : 10; +}; + + +/***/ }), + +/***/ 71241: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var util = exports; + +// used to return a Promise where callback is omitted +util.asPromise = __nccwpck_require__(252); + +// converts to / from base64 encoded strings +util.base64 = __nccwpck_require__(26718); + +// base class of rpc.Service +util.EventEmitter = __nccwpck_require__(86850); + +// float handling accross browsers +util.float = __nccwpck_require__(21843); + +// requires modules optionally and hides the call from bundlers +util.inquire = __nccwpck_require__(60094); + +// converts to / from utf8 encoded strings +util.utf8 = __nccwpck_require__(99049); + +// provides a node-like buffer pool in the browser +util.pool = __nccwpck_require__(47743); + +// utility to work with the low and high bits of a 64 bit value +util.LongBits = __nccwpck_require__(8374); + +/** + * Whether running within node or not. + * @memberof util + * @type {boolean} + */ +util.isNode = Boolean(typeof global !== "undefined" + && global + && global.process + && global.process.versions + && global.process.versions.node); + +/** + * Global object reference. + * @memberof util + * @type {Object} + */ +util.global = util.isNode && global + || typeof window !== "undefined" && window + || typeof self !== "undefined" && self + || this; // eslint-disable-line no-invalid-this + +/** + * An immuable empty array. + * @memberof util + * @type {Array.<*>} + * @const + */ +util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes + +/** + * An immutable empty object. + * @type {Object} + * @const + */ +util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes + +/** + * Tests if the specified value is an integer. + * @function + * @param {*} value Value to test + * @returns {boolean} `true` if the value is an integer + */ +util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { + return typeof value === "number" && isFinite(value) && Math.floor(value) === value; +}; + +/** + * Tests if the specified value is a string. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a string + */ +util.isString = function isString(value) { + return typeof value === "string" || value instanceof String; +}; + +/** + * Tests if the specified value is a non-null object. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a non-null object + */ +util.isObject = function isObject(value) { + return value && typeof value === "object"; +}; + +/** + * Checks if a property on a message is considered to be present. + * This is an alias of {@link util.isSet}. + * @function + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isset = + +/** + * Checks if a property on a message is considered to be present. + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isSet = function isSet(obj, prop) { + var value = obj[prop]; + if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins + return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; + return false; +}; + +/** + * Any compatible Buffer instance. + * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. + * @interface Buffer + * @extends Uint8Array + */ + +/** + * Node's Buffer class if available. + * @type {Constructor} + */ +util.Buffer = (function() { + try { + var Buffer = util.inquire("buffer").Buffer; + // refuse to use non-node buffers if not explicitly assigned (perf reasons): + return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; + } catch (e) { + /* istanbul ignore next */ + return null; + } +})(); + +// Internal alias of or polyfull for Buffer.from. +util._Buffer_from = null; + +// Internal alias of or polyfill for Buffer.allocUnsafe. +util._Buffer_allocUnsafe = null; + +/** + * Creates a new buffer of whatever type supported by the environment. + * @param {number|number[]} [sizeOrArray=0] Buffer size or number array + * @returns {Uint8Array|Buffer} Buffer + */ +util.newBuffer = function newBuffer(sizeOrArray) { + /* istanbul ignore next */ + return typeof sizeOrArray === "number" + ? util.Buffer + ? util._Buffer_allocUnsafe(sizeOrArray) + : new util.Array(sizeOrArray) + : util.Buffer + ? util._Buffer_from(sizeOrArray) + : typeof Uint8Array === "undefined" + ? sizeOrArray + : new Uint8Array(sizeOrArray); +}; + +/** + * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. + * @type {Constructor} + */ +util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; + +/** + * Any compatible Long instance. + * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. + * @interface Long + * @property {number} low Low bits + * @property {number} high High bits + * @property {boolean} unsigned Whether unsigned or not + */ + +/** + * Long.js's Long class if available. + * @type {Constructor} + */ +util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long + || /* istanbul ignore next */ util.global.Long + || util.inquire("long"); + +/** + * Regular expression used to verify 2 bit (`bool`) map keys. + * @type {RegExp} + * @const + */ +util.key2Re = /^true|false|0|1$/; + +/** + * Regular expression used to verify 32 bit (`int32` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; + +/** + * Regular expression used to verify 64 bit (`int64` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; + +/** + * Converts a number or long to an 8 characters long hash string. + * @param {Long|number} value Value to convert + * @returns {string} Hash + */ +util.longToHash = function longToHash(value) { + return value + ? util.LongBits.from(value).toHash() + : util.LongBits.zeroHash; +}; + +/** + * Converts an 8 characters long hash string to a long or number. + * @param {string} hash Hash + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long|number} Original value + */ +util.longFromHash = function longFromHash(hash, unsigned) { + var bits = util.LongBits.fromHash(hash); + if (util.Long) + return util.Long.fromBits(bits.lo, bits.hi, unsigned); + return bits.toNumber(Boolean(unsigned)); +}; + +/** + * Merges the properties of the source object into the destination object. + * @memberof util + * @param {Object.} dst Destination object + * @param {Object.} src Source object + * @param {boolean} [ifNotSet=false] Merges only if the key is not already set + * @returns {Object.} Destination object + */ +function merge(dst, src, ifNotSet) { // used by converters + for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) + if (dst[keys[i]] === undefined || !ifNotSet) + dst[keys[i]] = src[keys[i]]; + return dst; +} + +util.merge = merge; + +/** + * Converts the first character of a string to lower case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.lcFirst = function lcFirst(str) { + return str.charAt(0).toLowerCase() + str.substring(1); +}; + +/** + * Creates a custom error constructor. + * @memberof util + * @param {string} name Error name + * @returns {Constructor} Custom error constructor + */ +function newError(name) { + + function CustomError(message, properties) { + + if (!(this instanceof CustomError)) + return new CustomError(message, properties); + + // Error.call(this, message); + // ^ just returns a new error instance because the ctor can be called as a function + + Object.defineProperty(this, "message", { get: function() { return message; } }); + + /* istanbul ignore next */ + if (Error.captureStackTrace) // node + Error.captureStackTrace(this, CustomError); + else + Object.defineProperty(this, "stack", { value: new Error().stack || "" }); + + if (properties) + merge(this, properties); + } + + (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError; + + Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } }); + + CustomError.prototype.toString = function toString() { + return this.name + ": " + this.message; + }; + + return CustomError; +} + +util.newError = newError; + +/** + * Constructs a new protocol error. + * @classdesc Error subclass indicating a protocol specifc error. + * @memberof util + * @extends Error + * @template T extends Message + * @constructor + * @param {string} message Error message + * @param {Object.} [properties] Additional properties + * @example + * try { + * MyMessage.decode(someBuffer); // throws if required fields are missing + * } catch (e) { + * if (e instanceof ProtocolError && e.instance) + * console.log("decoded so far: " + JSON.stringify(e.instance)); + * } + */ +util.ProtocolError = newError("ProtocolError"); + +/** + * So far decoded message instance. + * @name util.ProtocolError#instance + * @type {Message} + */ + +/** + * A OneOf getter as returned by {@link util.oneOfGetter}. + * @typedef OneOfGetter + * @type {function} + * @returns {string|undefined} Set field name, if any + */ + +/** + * Builds a getter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfGetter} Unbound getter + */ +util.oneOfGetter = function getOneOf(fieldNames) { + var fieldMap = {}; + for (var i = 0; i < fieldNames.length; ++i) + fieldMap[fieldNames[i]] = 1; + + /** + * @returns {string|undefined} Set field name, if any + * @this Object + * @ignore + */ + return function() { // eslint-disable-line consistent-return + for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) + if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) + return keys[i]; + }; +}; + +/** + * A OneOf setter as returned by {@link util.oneOfSetter}. + * @typedef OneOfSetter + * @type {function} + * @param {string|undefined} value Field name + * @returns {undefined} + */ + +/** + * Builds a setter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfSetter} Unbound setter + */ +util.oneOfSetter = function setOneOf(fieldNames) { + + /** + * @param {string} name Field name + * @returns {undefined} + * @this Object + * @ignore + */ + return function(name) { + for (var i = 0; i < fieldNames.length; ++i) + if (fieldNames[i] !== name) + delete this[fieldNames[i]]; + }; +}; + +/** + * Default conversion options used for {@link Message#toJSON} implementations. + * + * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: + * + * - Longs become strings + * - Enums become string keys + * - Bytes become base64 encoded strings + * - (Sub-)Messages become plain objects + * - Maps become plain objects with all string keys + * - Repeated fields become arrays + * - NaN and Infinity for float and double fields become strings + * + * @type {IConversionOptions} + * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json + */ +util.toJSONOptions = { + longs: String, + enums: String, + bytes: String, + json: true +}; + +// Sets up buffer utility according to the environment (called in index-minimal) +util._configure = function() { + var Buffer = util.Buffer; + /* istanbul ignore if */ + if (!Buffer) { + util._Buffer_from = util._Buffer_allocUnsafe = null; + return; + } + // because node 4.x buffers are incompatible & immutable + // see: https://github.com/dcodeIO/protobuf.js/pull/665 + util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || + /* istanbul ignore next */ + function Buffer_from(value, encoding) { + return new Buffer(value, encoding); + }; + util._Buffer_allocUnsafe = Buffer.allocUnsafe || + /* istanbul ignore next */ + function Buffer_allocUnsafe(size) { + return new Buffer(size); + }; +}; + + +/***/ }), + +/***/ 34334: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = verifier; + +var Enum = __nccwpck_require__(17732), + util = __nccwpck_require__(47174); + +function invalid(field, expected) { + return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected"; +} + +/** + * Generates a partial value verifier. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {number} fieldIndex Field index + * @param {string} ref Variable reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genVerifyValue(gen, field, fieldIndex, ref) { + /* eslint-disable no-unexpected-multiline */ + if (field.resolvedType) { + if (field.resolvedType instanceof Enum) { gen + ("switch(%s){", ref) + ("default:") + ("return%j", invalid(field, "enum value")); + for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen + ("case %i:", field.resolvedType.values[keys[j]]); + gen + ("break") + ("}"); + } else { + gen + ("{") + ("var e=types[%i].verify(%s);", fieldIndex, ref) + ("if(e)") + ("return%j+e", field.name + ".") + ("}"); + } + } else { + switch (field.type) { + case "int32": + case "uint32": + case "sint32": + case "fixed32": + case "sfixed32": gen + ("if(!util.isInteger(%s))", ref) + ("return%j", invalid(field, "integer")); + break; + case "int64": + case "uint64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", ref, ref, ref, ref) + ("return%j", invalid(field, "integer|Long")); + break; + case "float": + case "double": gen + ("if(typeof %s!==\"number\")", ref) + ("return%j", invalid(field, "number")); + break; + case "bool": gen + ("if(typeof %s!==\"boolean\")", ref) + ("return%j", invalid(field, "boolean")); + break; + case "string": gen + ("if(!util.isString(%s))", ref) + ("return%j", invalid(field, "string")); + break; + case "bytes": gen + ("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))", ref, ref, ref) + ("return%j", invalid(field, "buffer")); + break; + } + } + return gen; + /* eslint-enable no-unexpected-multiline */ +} + +/** + * Generates a partial key verifier. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {string} ref Variable reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genVerifyKey(gen, field, ref) { + /* eslint-disable no-unexpected-multiline */ + switch (field.keyType) { + case "int32": + case "uint32": + case "sint32": + case "fixed32": + case "sfixed32": gen + ("if(!util.key32Re.test(%s))", ref) + ("return%j", invalid(field, "integer key")); + break; + case "int64": + case "uint64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(!util.key64Re.test(%s))", ref) // see comment above: x is ok, d is not + ("return%j", invalid(field, "integer|Long key")); + break; + case "bool": gen + ("if(!util.key2Re.test(%s))", ref) + ("return%j", invalid(field, "boolean key")); + break; + } + return gen; + /* eslint-enable no-unexpected-multiline */ +} + +/** + * Generates a verifier specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +function verifier(mtype) { + /* eslint-disable no-unexpected-multiline */ + + var gen = util.codegen(["m"], mtype.name + "$verify") + ("if(typeof m!==\"object\"||m===null)") + ("return%j", "object expected"); + var oneofs = mtype.oneofsArray, + seenFirstField = {}; + if (oneofs.length) gen + ("var p={}"); + + for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) { + var field = mtype._fieldsArray[i].resolve(), + ref = "m" + util.safeProp(field.name); + + if (field.optional) gen + ("if(%s!=null&&m.hasOwnProperty(%j)){", ref, field.name); // !== undefined && !== null + + // map fields + if (field.map) { gen + ("if(!util.isObject(%s))", ref) + ("return%j", invalid(field, "object")) + ("var k=Object.keys(%s)", ref) + ("for(var i=0;i { + +"use strict"; + + +/** + * Wrappers for common types. + * @type {Object.} + * @const + */ +var wrappers = exports; + +var Message = __nccwpck_require__(68027); + +/** + * From object converter part of an {@link IWrapper}. + * @typedef WrapperFromObjectConverter + * @type {function} + * @param {Object.} object Plain object + * @returns {Message<{}>} Message instance + * @this Type + */ + +/** + * To object converter part of an {@link IWrapper}. + * @typedef WrapperToObjectConverter + * @type {function} + * @param {Message<{}>} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + * @this Type + */ + +/** + * Common type wrapper part of {@link wrappers}. + * @interface IWrapper + * @property {WrapperFromObjectConverter} [fromObject] From object converter + * @property {WrapperToObjectConverter} [toObject] To object converter + */ + +// Custom wrapper for Any +wrappers[".google.protobuf.Any"] = { + + fromObject: function(object) { + + // unwrap value type if mapped + if (object && object["@type"]) { + // Only use fully qualified type name after the last '/' + var name = object["@type"].substring(object["@type"].lastIndexOf("/") + 1); + var type = this.lookup(name); + /* istanbul ignore else */ + if (type) { + // type_url does not accept leading "." + var type_url = object["@type"].charAt(0) === "." ? + object["@type"].substr(1) : object["@type"]; + // type_url prefix is optional, but path seperator is required + if (type_url.indexOf("/") === -1) { + type_url = "/" + type_url; + } + return this.create({ + type_url: type_url, + value: type.encode(type.fromObject(object)).finish() + }); + } + } + + return this.fromObject(object); + }, + + toObject: function(message, options) { + + // Default prefix + var googleApi = "type.googleapis.com/"; + var prefix = ""; + var name = ""; + + // decode value if requested and unmapped + if (options && options.json && message.type_url && message.value) { + // Only use fully qualified type name after the last '/' + name = message.type_url.substring(message.type_url.lastIndexOf("/") + 1); + // Separate the prefix used + prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1); + var type = this.lookup(name); + /* istanbul ignore else */ + if (type) + message = type.decode(message.value); + } + + // wrap value if unmapped + if (!(message instanceof this.ctor) && message instanceof Message) { + var object = message.$type.toObject(message, options); + var messageName = message.$type.fullName[0] === "." ? + message.$type.fullName.substr(1) : message.$type.fullName; + // Default to type.googleapis.com prefix if no prefix is used + if (prefix === "") { + prefix = googleApi; + } + name = prefix + messageName; + object["@type"] = name; + return object; + } + + return this.toObject(message, options); + } +}; + + +/***/ }), + +/***/ 13098: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = Writer; + +var util = __nccwpck_require__(71241); + +var BufferWriter; // cyclic + +var LongBits = util.LongBits, + base64 = util.base64, + utf8 = util.utf8; + +/** + * Constructs a new writer operation instance. + * @classdesc Scheduled writer operation. + * @constructor + * @param {function(*, Uint8Array, number)} fn Function to call + * @param {number} len Value byte length + * @param {*} val Value to write + * @ignore + */ +function Op(fn, len, val) { + + /** + * Function to call. + * @type {function(Uint8Array, number, *)} + */ + this.fn = fn; + + /** + * Value byte length. + * @type {number} + */ + this.len = len; + + /** + * Next operation. + * @type {Writer.Op|undefined} + */ + this.next = undefined; + + /** + * Value to write. + * @type {*} + */ + this.val = val; // type varies +} + +/* istanbul ignore next */ +function noop() {} // eslint-disable-line no-empty-function + +/** + * Constructs a new writer state instance. + * @classdesc Copied writer state. + * @memberof Writer + * @constructor + * @param {Writer} writer Writer to copy state from + * @ignore + */ +function State(writer) { + + /** + * Current head. + * @type {Writer.Op} + */ + this.head = writer.head; + + /** + * Current tail. + * @type {Writer.Op} + */ + this.tail = writer.tail; + + /** + * Current buffer length. + * @type {number} + */ + this.len = writer.len; + + /** + * Next state. + * @type {State|null} + */ + this.next = writer.states; +} + +/** + * Constructs a new writer instance. + * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. + * @constructor + */ +function Writer() { + + /** + * Current length. + * @type {number} + */ + this.len = 0; + + /** + * Operations head. + * @type {Object} + */ + this.head = new Op(noop, 0, 0); + + /** + * Operations tail + * @type {Object} + */ + this.tail = this.head; + + /** + * Linked forked states. + * @type {Object|null} + */ + this.states = null; + + // When a value is written, the writer calculates its byte length and puts it into a linked + // list of operations to perform when finish() is called. This both allows us to allocate + // buffers of the exact required size and reduces the amount of work we have to do compared + // to first calculating over objects and then encoding over objects. In our case, the encoding + // part is just a linked list walk calling operations with already prepared values. +} + +var create = function create() { + return util.Buffer + ? function create_buffer_setup() { + return (Writer.create = function create_buffer() { + return new BufferWriter(); + })(); + } + /* istanbul ignore next */ + : function create_array() { + return new Writer(); + }; +}; + +/** + * Creates a new writer. + * @function + * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} + */ +Writer.create = create(); + +/** + * Allocates a buffer of the specified size. + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ +Writer.alloc = function alloc(size) { + return new util.Array(size); +}; + +// Use Uint8Array buffer pool in the browser, just like node does with buffers +/* istanbul ignore else */ +if (util.Array !== Array) + Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); + +/** + * Pushes a new operation to the queue. + * @param {function(Uint8Array, number, *)} fn Function to call + * @param {number} len Value byte length + * @param {number} val Value to write + * @returns {Writer} `this` + * @private + */ +Writer.prototype._push = function push(fn, len, val) { + this.tail = this.tail.next = new Op(fn, len, val); + this.len += len; + return this; +}; + +function writeByte(val, buf, pos) { + buf[pos] = val & 255; +} + +function writeVarint32(val, buf, pos) { + while (val > 127) { + buf[pos++] = val & 127 | 128; + val >>>= 7; + } + buf[pos] = val; +} + +/** + * Constructs a new varint writer operation instance. + * @classdesc Scheduled varint writer operation. + * @extends Op + * @constructor + * @param {number} len Value byte length + * @param {number} val Value to write + * @ignore + */ +function VarintOp(len, val) { + this.len = len; + this.next = undefined; + this.val = val; +} + +VarintOp.prototype = Object.create(Op.prototype); +VarintOp.prototype.fn = writeVarint32; + +/** + * Writes an unsigned 32 bit value as a varint. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.uint32 = function write_uint32(value) { + // here, the call to this.push has been inlined and a varint specific Op subclass is used. + // uint32 is by far the most frequently used operation and benefits significantly from this. + this.len += (this.tail = this.tail.next = new VarintOp( + (value = value >>> 0) + < 128 ? 1 + : value < 16384 ? 2 + : value < 2097152 ? 3 + : value < 268435456 ? 4 + : 5, + value)).len; + return this; +}; + +/** + * Writes a signed 32 bit value as a varint. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.int32 = function write_int32(value) { + return value < 0 + ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec + : this.uint32(value); +}; + +/** + * Writes a 32 bit value as a varint, zig-zag encoded. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sint32 = function write_sint32(value) { + return this.uint32((value << 1 ^ value >> 31) >>> 0); +}; + +function writeVarint64(val, buf, pos) { + while (val.hi) { + buf[pos++] = val.lo & 127 | 128; + val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; + val.hi >>>= 7; + } + while (val.lo > 127) { + buf[pos++] = val.lo & 127 | 128; + val.lo = val.lo >>> 7; + } + buf[pos++] = val.lo; +} + +/** + * Writes an unsigned 64 bit value as a varint. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.uint64 = function write_uint64(value) { + var bits = LongBits.from(value); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a signed 64 bit value as a varint. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.int64 = Writer.prototype.uint64; + +/** + * Writes a signed 64 bit value as a varint, zig-zag encoded. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sint64 = function write_sint64(value) { + var bits = LongBits.from(value).zzEncode(); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a boolish value as a varint. + * @param {boolean} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.bool = function write_bool(value) { + return this._push(writeByte, 1, value ? 1 : 0); +}; + +function writeFixed32(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +/** + * Writes an unsigned 32 bit value as fixed 32 bits. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.fixed32 = function write_fixed32(value) { + return this._push(writeFixed32, 4, value >>> 0); +}; + +/** + * Writes a signed 32 bit value as fixed 32 bits. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sfixed32 = Writer.prototype.fixed32; + +/** + * Writes an unsigned 64 bit value as fixed 64 bits. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.fixed64 = function write_fixed64(value) { + var bits = LongBits.from(value); + return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); +}; + +/** + * Writes a signed 64 bit value as fixed 64 bits. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sfixed64 = Writer.prototype.fixed64; + +/** + * Writes a float (32 bit). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.float = function write_float(value) { + return this._push(util.float.writeFloatLE, 4, value); +}; + +/** + * Writes a double (64 bit float). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.double = function write_double(value) { + return this._push(util.float.writeDoubleLE, 8, value); +}; + +var writeBytes = util.Array.prototype.set + ? function writeBytes_set(val, buf, pos) { + buf.set(val, pos); // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytes_for(val, buf, pos) { + for (var i = 0; i < val.length; ++i) + buf[pos + i] = val[i]; + }; + +/** + * Writes a sequence of bytes. + * @param {Uint8Array|string} value Buffer or base64 encoded string to write + * @returns {Writer} `this` + */ +Writer.prototype.bytes = function write_bytes(value) { + var len = value.length >>> 0; + if (!len) + return this._push(writeByte, 1, 0); + if (util.isString(value)) { + var buf = Writer.alloc(len = base64.length(value)); + base64.decode(value, buf, 0); + value = buf; + } + return this.uint32(len)._push(writeBytes, len, value); +}; + +/** + * Writes a string. + * @param {string} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.string = function write_string(value) { + var len = utf8.length(value); + return len + ? this.uint32(len)._push(utf8.write, len, value) + : this._push(writeByte, 1, 0); +}; + +/** + * Forks this writer's state by pushing it to a stack. + * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. + * @returns {Writer} `this` + */ +Writer.prototype.fork = function fork() { + this.states = new State(this); + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + return this; +}; + +/** + * Resets this instance to the last state. + * @returns {Writer} `this` + */ +Writer.prototype.reset = function reset() { + if (this.states) { + this.head = this.states.head; + this.tail = this.states.tail; + this.len = this.states.len; + this.states = this.states.next; + } else { + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + } + return this; +}; + +/** + * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. + * @returns {Writer} `this` + */ +Writer.prototype.ldelim = function ldelim() { + var head = this.head, + tail = this.tail, + len = this.len; + this.reset().uint32(len); + if (len) { + this.tail.next = head.next; // skip noop + this.tail = tail; + this.len += len; + } + return this; +}; + +/** + * Finishes the write operation. + * @returns {Uint8Array} Finished buffer + */ +Writer.prototype.finish = function finish() { + var head = this.head.next, // skip noop + buf = this.constructor.alloc(this.len), + pos = 0; + while (head) { + head.fn(head.val, buf, pos); + pos += head.len; + head = head.next; + } + // this.head = this.tail = null; + return buf; +}; + +Writer._configure = function(BufferWriter_) { + BufferWriter = BufferWriter_; + Writer.create = create(); + BufferWriter._configure(); +}; + + +/***/ }), + +/***/ 41863: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +module.exports = BufferWriter; + +// extends Writer +var Writer = __nccwpck_require__(13098); +(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; + +var util = __nccwpck_require__(71241); + +/** + * Constructs a new buffer writer instance. + * @classdesc Wire format writer using node buffers. + * @extends Writer + * @constructor + */ +function BufferWriter() { + Writer.call(this); +} + +BufferWriter._configure = function () { + /** + * Allocates a buffer of the specified size. + * @function + * @param {number} size Buffer size + * @returns {Buffer} Buffer + */ + BufferWriter.alloc = util._Buffer_allocUnsafe; + + BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" + ? function writeBytesBuffer_set(val, buf, pos) { + buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) + // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytesBuffer_copy(val, buf, pos) { + if (val.copy) // Buffer values + val.copy(buf, pos, 0, val.length); + else for (var i = 0; i < val.length;) // plain array values + buf[pos++] = val[i++]; + }; +}; + + +/** + * @override + */ +BufferWriter.prototype.bytes = function write_bytes_buffer(value) { + if (util.isString(value)) + value = util._Buffer_from(value, "base64"); + var len = value.length >>> 0; + this.uint32(len); + if (len) + this._push(BufferWriter.writeBytesBuffer, len, value); + return this; +}; + +function writeStringBuffer(val, buf, pos) { + if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) + util.utf8.write(val, buf, pos); + else if (buf.utf8Write) + buf.utf8Write(val, pos); + else + buf.write(val, pos); +} + +/** + * @override + */ +BufferWriter.prototype.string = function write_string_buffer(value) { + var len = util.Buffer.byteLength(value); + this.uint32(len); + if (len) + this._push(writeStringBuffer, len, value); + return this; +}; + + +/** + * Finishes the write operation. + * @name BufferWriter#finish + * @function + * @returns {Buffer} Finished buffer + */ + +BufferWriter._configure(); + + +/***/ }), + +/***/ 18341: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var once = __nccwpck_require__(1223) +var eos = __nccwpck_require__(88434) +var fs = __nccwpck_require__(35747) // we only need fs to get the ReadStream and WriteStream prototypes + +var noop = function () {} +var ancient = /^v?\.0/.test(process.version) + +var isFn = function (fn) { + return typeof fn === 'function' +} + +var isFS = function (stream) { + if (!ancient) return false // newer node version do not need to care about fs is a special way + if (!fs) return false // browser + return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) +} + +var isRequest = function (stream) { + return stream.setHeader && isFn(stream.abort) +} + +var destroyer = function (stream, reading, writing, callback) { + callback = once(callback) + + var closed = false + stream.on('close', function () { + closed = true + }) + + eos(stream, {readable: reading, writable: writing}, function (err) { + if (err) return callback(err) + closed = true + callback() + }) + + var destroyed = false + return function (err) { + if (closed) return + if (destroyed) return + destroyed = true + + if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks + if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want + + if (isFn(stream.destroy)) return stream.destroy() + + callback(err || new Error('stream was destroyed')) + } +} + +var call = function (fn) { + fn() +} + +var pipe = function (from, to) { + return from.pipe(to) +} + +var pump = function () { + var streams = Array.prototype.slice.call(arguments) + var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop + + if (Array.isArray(streams[0])) streams = streams[0] + if (streams.length < 2) throw new Error('pump requires two streams per minimum') + + var error + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1 + var writing = i > 0 + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err + if (err) destroys.forEach(call) + if (reading) return + destroys.forEach(call) + callback(error) + }) + }) + + return streams.reduce(pipe) +} + +module.exports = pump + + +/***/ }), + +/***/ 40212: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var pump = __nccwpck_require__(48382) +var inherits = __nccwpck_require__(44124) +var Duplexify = __nccwpck_require__(76599) + +var toArray = function(args) { + if (!args.length) return [] + return Array.isArray(args[0]) ? args[0] : Array.prototype.slice.call(args) +} + +var define = function(opts) { + var Pumpify = function() { + var streams = toArray(arguments) + if (!(this instanceof Pumpify)) return new Pumpify(streams) + Duplexify.call(this, null, null, opts) + if (streams.length) this.setPipeline(streams) + } + + inherits(Pumpify, Duplexify) + + Pumpify.prototype.setPipeline = function() { + var streams = toArray(arguments) + var self = this + var ended = false + var w = streams[0] + var r = streams[streams.length-1] + + r = r.readable ? r : null + w = w.writable ? w : null + + var onclose = function() { + streams[0].emit('error', new Error('stream was destroyed')) + } + + this.on('close', onclose) + this.on('prefinish', function() { + if (!ended) self.cork() + }) + + pump(streams, function(err) { + self.removeListener('close', onclose) + if (err) return self.destroy(err.message === 'premature close' ? null : err) + ended = true + // pump ends after the last stream is not writable *but* + // pumpify still forwards the readable part so we need to catch errors + // still, so reenable autoDestroy in this case + if (self._autoDestroy === false) self._autoDestroy = true + self.uncork() + }) + + if (this.destroyed) return onclose() + this.setWritable(w) + this.setReadable(r) + } + + return Pumpify +} + +module.exports = define({autoDestroy:false, destroy:false}) +module.exports.obj = define({autoDestroy: false, destroy:false, objectMode:true, highWaterMark:16}) +module.exports.ctor = define + + +/***/ }), + +/***/ 48382: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var once = __nccwpck_require__(1223) +var eos = __nccwpck_require__(88434) +var fs = __nccwpck_require__(35747) // we only need fs to get the ReadStream and WriteStream prototypes + +var noop = function () {} +var ancient = /^v?\.0/.test(process.version) + +var isFn = function (fn) { + return typeof fn === 'function' +} + +var isFS = function (stream) { + if (!ancient) return false // newer node version do not need to care about fs is a special way + if (!fs) return false // browser + return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) +} + +var isRequest = function (stream) { + return stream.setHeader && isFn(stream.abort) +} + +var destroyer = function (stream, reading, writing, callback) { + callback = once(callback) + + var closed = false + stream.on('close', function () { + closed = true + }) + + eos(stream, {readable: reading, writable: writing}, function (err) { + if (err) return callback(err) + closed = true + callback() + }) + + var destroyed = false + return function (err) { + if (closed) return + if (destroyed) return + destroyed = true + + if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks + if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want + + if (isFn(stream.destroy)) return stream.destroy() + + callback(err || new Error('stream was destroyed')) + } +} + +var call = function (fn) { + fn() +} + +var pipe = function (from, to) { + return from.pipe(to) +} + +var pump = function () { + var streams = Array.prototype.slice.call(arguments) + var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop + + if (Array.isArray(streams[0])) streams = streams[0] + if (streams.length < 2) throw new Error('pump requires two streams per minimum') + + var error + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1 + var writing = i > 0 + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err + if (err) destroys.forEach(call) + if (reading) return + destroys.forEach(call) + callback(error) + }) + }) + + streams.reduce(pipe) +} + +module.exports = pump + + +/***/ }), + +/***/ 48880: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = __nccwpck_require__(61296); + +/***/ }), + +/***/ 61296: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Promise = __nccwpck_require__(78710); +var crypto = Promise.promisifyAll(__nccwpck_require__(76417)); +var createError = __nccwpck_require__(56220); + +var RandomGenerationError = createError("RandomGenerationError", { + code: "RandomGenerationError" +}); + +function calculateParameters(range) { + /* This does the equivalent of: + * + * bitsNeeded = Math.ceil(Math.log2(range)); + * bytesNeeded = Math.ceil(bitsNeeded / 8); + * mask = Math.pow(2, bitsNeeded) - 1; + * + * ... however, it implements it as bitwise operations, to sidestep any + * possible implementation errors regarding floating point numbers in + * JavaScript runtimes. This is an easier solution than assessing each + * runtime and architecture individually. + */ + + var bitsNeeded = 0; + var bytesNeeded = 0; + var mask = 1; + + while (range > 0) { + if (bitsNeeded % 8 === 0) { + bytesNeeded += 1; + } + + bitsNeeded += 1; + mask = mask << 1 | 1; /* 0x00001111 -> 0x00011111 */ + + /* SECURITY PATCH (March 8, 2016): + * As it turns out, `>>` is not the right operator to use here, and + * using it would cause strange outputs, that wouldn't fall into + * the specified range. This was remedied by switching to `>>>` + * instead, and adding checks for input parameters being within the + * range of 'safe integers' in JavaScript. + */ + range = range >>> 1; /* 0x01000000 -> 0x00100000 */ + } + + return { bitsNeeded: bitsNeeded, bytesNeeded: bytesNeeded, mask: mask }; +} + +module.exports = function secureRandomNumber(minimum, maximum, cb) { + return Promise.try(function () { + if (crypto == null || crypto.randomBytesAsync == null) { + throw new RandomGenerationError("No suitable random number generator available. Ensure that your runtime is linked against OpenSSL (or an equivalent) correctly."); + } + + if (minimum == null) { + throw new RandomGenerationError("You must specify a minimum value."); + } + + if (maximum == null) { + throw new RandomGenerationError("You must specify a maximum value."); + } + + if (minimum % 1 !== 0) { + throw new RandomGenerationError("The minimum value must be an integer."); + } + + if (maximum % 1 !== 0) { + throw new RandomGenerationError("The maximum value must be an integer."); + } + + if (!(maximum > minimum)) { + throw new RandomGenerationError("The maximum value must be higher than the minimum value."); + } + + /* We hardcode the values for the following: + * + * https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER + * https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER + * + * ... as Babel does not appear to transpile them, despite being ES6. + */ + + if (minimum < -9007199254740991 || minimum > 9007199254740991) { + throw new RandomGenerationError("The minimum value must be inbetween MIN_SAFE_INTEGER and MAX_SAFE_INTEGER."); + } + + if (maximum < -9007199254740991 || maximum > 9007199254740991) { + throw new RandomGenerationError("The maximum value must be inbetween MIN_SAFE_INTEGER and MAX_SAFE_INTEGER."); + } + + var range = maximum - minimum; + + if (range < -9007199254740991 || range > 9007199254740991) { + throw new RandomGenerationError("The range between the minimum and maximum value must be inbetween MIN_SAFE_INTEGER and MAX_SAFE_INTEGER."); + } + + var _calculateParameters = calculateParameters(range); + + var bitsNeeded = _calculateParameters.bitsNeeded; + var bytesNeeded = _calculateParameters.bytesNeeded; + var mask = _calculateParameters.mask; + + + return Promise.try(function () { + return crypto.randomBytesAsync(bytesNeeded); + }).then(function (randomBytes) { + var randomValue = 0; + + /* Turn the random bytes into an integer, using bitwise operations. */ + for (var i = 0; i < bytesNeeded; i++) { + randomValue |= randomBytes[i] << 8 * i; + } + + /* We apply the mask to reduce the amount of attempts we might need + * to make to get a number that is in range. This is somewhat like + * the commonly used 'modulo trick', but without the bias: + * + * "Let's say you invoke secure_rand(0, 60). When the other code + * generates a random integer, you might get 243. If you take + * (243 & 63)-- noting that the mask is 63-- you get 51. Since + * 51 is less than 60, we can return this without bias. If we + * got 255, then 255 & 63 is 63. 63 > 60, so we try again. + * + * The purpose of the mask is to reduce the number of random + * numbers discarded for the sake of ensuring an unbiased + * distribution. In the example above, 243 would discard, but + * (243 & 63) is in the range of 0 and 60." + * + * (Source: Scott Arciszewski) + */ + randomValue = randomValue & mask; + + if (randomValue <= range) { + /* We've been working with 0 as a starting point, so we need to + * add the `minimum` here. */ + return minimum + randomValue; + } else { + /* Outside of the acceptable range, throw it away and try again. + * We don't try any modulo tricks, as this would introduce bias. */ + return secureRandomNumber(minimum, maximum); + } + }); + }).nodeify(cb); +}; + +module.exports.RandomGenerationError = RandomGenerationError; + +/***/ }), + +/***/ 23874: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(51642).Duplex + + +/***/ }), + +/***/ 41359: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + + + +/**/ + +var pna = __nccwpck_require__(77714); +/**/ + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var util = Object.create(__nccwpck_require__(95898)); +util.inherits = __nccwpck_require__(44124); +/**/ + +var Readable = __nccwpck_require__(51433); +var Writable = __nccwpck_require__(26993); + +util.inherits(Duplex, Readable); + +{ + // avoid scope creep, the keys array can then be collected + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); + +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + + pna.nextTick(cb, err); +}; + +/***/ }), + +/***/ 81542: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + + + +module.exports = PassThrough; + +var Transform = __nccwpck_require__(34415); + +/**/ +var util = Object.create(__nccwpck_require__(95898)); +util.inherits = __nccwpck_require__(44124); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; + +/***/ }), + +/***/ 51433: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +/**/ + +var pna = __nccwpck_require__(77714); +/**/ + +module.exports = Readable; + +/**/ +var isArray = __nccwpck_require__(20893); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = __nccwpck_require__(28614).EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = __nccwpck_require__(62387); +/**/ + +/**/ + +var Buffer = __nccwpck_require__(21867).Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +/**/ +var util = Object.create(__nccwpck_require__(95898)); +util.inherits = __nccwpck_require__(44124); +/**/ + +/**/ +var debugUtil = __nccwpck_require__(31669); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = __nccwpck_require__(27053); +var destroyImpl = __nccwpck_require__(97049); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +function ReadableState(options, stream) { + Duplex = Duplex || __nccwpck_require__(41359); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = __nccwpck_require__(94841)/* .StringDecoder */ .s; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || __nccwpck_require__(41359); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); +} + +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); + +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; + +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + + return needMoreData(state); +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = __nccwpck_require__(94841)/* .StringDecoder */ .s; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, unpipeInfo); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this, unpipeInfo); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + + var state = this._readableState; + var paused = false; + + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + + _this.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return this; +}; + +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._readableState.highWaterMark; + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = Buffer.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} + +/***/ }), + +/***/ 34415: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + + + +module.exports = Transform; + +var Duplex = __nccwpck_require__(41359); + +/**/ +var util = Object.create(__nccwpck_require__(95898)); +util.inherits = __nccwpck_require__(44124); +/**/ + +util.inherits(Transform, Duplex); + +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } + + ts.writechunk = null; + ts.writecb = null; + + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + + cb(er); + + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); + + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} + +/***/ }), + +/***/ 26993: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + + + +/**/ + +var pna = __nccwpck_require__(77714); +/**/ + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = Object.create(__nccwpck_require__(95898)); +util.inherits = __nccwpck_require__(44124); +/**/ + +/**/ +var internalUtil = { + deprecate: __nccwpck_require__(65278) +}; +/**/ + +/**/ +var Stream = __nccwpck_require__(62387); +/**/ + +/**/ + +var Buffer = __nccwpck_require__(21867).Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +var destroyImpl = __nccwpck_require__(97049); + +util.inherits(Writable, Stream); + +function nop() {} + +function WritableState(options, stream) { + Duplex = Duplex || __nccwpck_require__(41359); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || __nccwpck_require__(41359); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + + if (typeof options.final === 'function') this._final = options.final; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + pna.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + pna.nextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} + +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + pna.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } +} + +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); + +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; + +/***/ }), + +/***/ 27053: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Buffer = __nccwpck_require__(21867).Buffer; +var util = __nccwpck_require__(31669); + +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} + +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); + + this.head = null; + this.tail = null; + this.length = 0; + } + + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; + + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + }; + + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; + + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + if (this.length === 1) return this.head.data; + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + + return BufferList; +}(); + +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} + +/***/ }), + +/***/ 97049: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/**/ + +var pna = __nccwpck_require__(77714); +/**/ + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + pna.nextTick(emitErrorNT, this, err); + } + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + + this._destroy(err || null, function (err) { + if (!cb && err) { + pna.nextTick(emitErrorNT, _this, err); + if (_this._writableState) { + _this._writableState.errorEmitted = true; + } + } else if (cb) { + cb(err); + } + }); + + return this; +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} + +function emitErrorNT(self, err) { + self.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy +}; + +/***/ }), + +/***/ 62387: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(92413); + + +/***/ }), + +/***/ 51642: +/***/ ((module, exports, __nccwpck_require__) => { + +var Stream = __nccwpck_require__(92413); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = __nccwpck_require__(51433); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = __nccwpck_require__(26993); + exports.Duplex = __nccwpck_require__(41359); + exports.Transform = __nccwpck_require__(34415); + exports.PassThrough = __nccwpck_require__(81542); +} + + +/***/ }), + +/***/ 68045: +/***/ ((module) => { + +"use strict"; + + +function ReInterval (callback, interval, args) { + var self = this; + + this._callback = callback; + this._args = args; + + this._interval = setInterval(callback, interval, this._args); + + this.reschedule = function (interval) { + // if no interval entered, use the interval passed in on creation + if (!interval) + interval = self._interval; + + if (self._interval) + clearInterval(self._interval); + self._interval = setInterval(self._callback, interval, self._args); + }; + + this.clear = function () { + if (self._interval) { + clearInterval(self._interval); + self._interval = undefined; + } + }; + + this.destroy = function () { + if (self._interval) { + clearInterval(self._interval); + } + self._callback = undefined; + self._interval = undefined; + self._args = undefined; + }; +} + +function reInterval () { + if (typeof arguments[0] !== 'function') + throw new Error('callback needed'); + if (typeof arguments[1] !== 'number') + throw new Error('interval needed'); + + var args; + + if (arguments.length > 0) { + args = new Array(arguments.length - 2); + + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i + 2]; + } + } + + return new ReInterval(arguments[0], arguments[1], args); +} + +module.exports = reInterval; + + +/***/ }), + +/***/ 39499: +/***/ ((module) => { + +var isWin = process.platform === 'win32'; + +module.exports = function (str) { + var i = str.length - 1; + if (i < 2) { + return str; + } + while (isSeparator(str, i)) { + i--; + } + return str.substr(0, i + 1); +}; + +function isSeparator(str, i) { + var char = str[i]; + return i > 0 && (char === '/' || (isWin && char === '\\')); +} + + +/***/ }), + +/***/ 21867: +/***/ ((module, exports, __nccwpck_require__) => { + +/* eslint-disable node/no-deprecated-api */ +var buffer = __nccwpck_require__(64293) +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} + + +/***/ }), + +/***/ 72043: +/***/ ((__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 + + // 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' + ] + + sax.EVENTS = [ + 'text', + 'processinginstruction', + 'sgmldeclaration', + 'doctype', + 'comment', + 'opentagstart', + 'attribute', + 'opentag', + 'closetag', + 'opencdata', + 'cdata', + 'closecdata', + 'error', + 'end', + 'ready', + 'script', + 'opennamespace', + 'closenamespace' + ] + + function SAXParser (strict, opt) { + if (!(this instanceof SAXParser)) { + return new SAXParser(strict, opt) + } + + 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 = [] + + // 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) + } + + // mostly just for error reporting + parser.trackPosition = parser.opt.position !== false + if (parser.trackPosition) { + parser.position = parser.line = parser.column = 0 + } + emit(parser, 'onready') + } + + if (!Object.create) { + Object.create = function (o) { + function F () {} + F.prototype = o + var newf = new F() + return newf + } + } + + if (!Object.keys) { + Object.keys = function (o) { + var a = [] + for (var i in o) if (o.hasOwnProperty(i)) a.push(i) + return a + } + } + + 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 + + case 'cdata': + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + break + + case 'script': + emitNode(parser, 'onscript', parser.script) + parser.script = '' + break + + default: + error(parser, 'Max buffer length exceeded: ' + buffers[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]] = '' + } + } + + 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 = '' + } + } + + 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 () {} + } + + var streamWraps = sax.EVENTS.filter(function (ev) { + return ev !== 'error' && ev !== 'end' + }) + + function createStream (strict, opt) { + return new SAXStream(strict, opt) + } + + function SAXStream (strict, opt) { + if (!(this instanceof SAXStream)) { + return new SAXStream(strict, opt) + } + + 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) + } + + // character classes and tokens + var whitespace = '\r\n\t ' + + // this really needs to be replaced with character classes. + // XML allows all manner of ridiculous numbers and digits. + var number = '0124356789' + var letter = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' + + // (Letter | "_" | ":") + var quote = '\'"' + var attribEnd = whitespace + '>' + 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 } + + // turn all the string character sets into character class objects. + whitespace = charClass(whitespace) + number = charClass(number) + letter = charClass(letter) + + // 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-]/ + + quote = charClass(quote) + attribEnd = charClass(attribEnd) + + function charClass (str) { + return str.split('').reduce(function (s, c) { + s[c] = true + return s + }, {}) + } + + function isRegExp (c) { + return Object.prototype.toString.call(c) === '[object RegExp]' + } + + function is (charclass, c) { + return isRegExp(charclass) ? !!c.match(charclass) : charclass[c] + } + + function not (charclass, c) { + return !is(charclass, 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++, //