diff --git a/CHANGELOG.md b/CHANGELOG.md index c903751c..13754ba9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG.md +## 2.4.5 +- Revert the AgentDataProvider change that was introduced in 2.4.1 and caused a performance degradation. ## 2.4.2 - Fix an issue in Streams’ Voice ID APIs that may have led to incorrect values being set against the generatedSpeakerID field in the VoiceIdResult segment of Connect Contact Trace Records (CTRs). diff --git a/package-lock.json b/package-lock.json index 743d225d..d700b1e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,4014 @@ { "name": "amazon-connect-streams", - "version": "2.4.4", - "lockfileVersion": 1, + "version": "2.4.5", + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "version": "2.4.4", + "license": "Apache-2.0", + "devDependencies": { + "chai": "^4.1.2", + "jshint": "^2.9.7", + "mocha": "^9.1.3", + "mocha-jsdom": "^2.0.0", + "nyc": "^15.1.0", + "pump": "^3.0.0", + "sinon": "^9.0.0", + "terser-webpack-plugin": "^5.2.5", + "typescript": "^4.2.4", + "webpack": "^5.64.4", + "webpack-cli": "^4.9.1", + "webpack-plugin-replace": "^1.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.19.4", + "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.19.3", + "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.3", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.3", + "@babel/types": "^7.19.3", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.19.5", + "integrity": "sha512-DxbNz9Lz4aMZ99qPpO1raTbcrI1ZeYh+9NR9qhfkQIbFtVEqotHojEBxHzmxhVONkGt6VyrqVQcgpefMy9pqcg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.19.4", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.19.3", + "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.19.3", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.9", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.19.0", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dev": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.18.6", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.19.0", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.19.4", + "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.19.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.18.6", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.19.4", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.18.6", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.19.4", + "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.4", + "@babel/types": "^7.19.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.19.4", + "integrity": "sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.18.10", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.19.4", + "integrity": "sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.4", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.4", + "@babel/types": "^7.19.4", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.19.4", + "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.2", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.16", + "integrity": "sha512-LCQ+NeThyJ4k1W2d+vIKdxuSt9R3pQSZ4P92m7EakaYuXcVWbHuT5bjNcqLd4Rdgi6xYWYDvBJZJLZSLanjDcA==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@sinonjs/commons": { + "version": "1.8.3", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "6.0.1", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@sinonjs/samsam": { + "version": "5.3.1", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "node_modules/@sinonjs/text-encoding": { + "version": "0.7.2", + "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", + "dev": true + }, + "node_modules/@types/eslint": { + "version": "8.4.6", + "integrity": "sha512-/fqTbjxyFUaYNO7VcW5g+4npmqVACz1bB7RTHYuLj+PRjw9hrCwrUXVQFpChUS0JsyEFvMZ7U/PfmvWgxJhI9g==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.4", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "dev": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "0.0.51", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.8.5", + "integrity": "sha512-Bq7G3AErwe5A/Zki5fdD3O6+0zDChhg671NfPjtIcbtzDNZTv4NPKMRFr7gtYPG7y+B8uTiNK4Ngd9T0FTar6Q==", + "dev": true + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.1", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.1", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dev": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.1", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dev": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.1", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "dev": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.1", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "1.2.0", + "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", + "dev": true + }, + "node_modules/@webpack-cli/info": { + "version": "1.5.0", + "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", + "dev": true, + "dependencies": { + "envinfo": "^7.7.3" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "1.7.0", + "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", + "dev": true + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "node_modules/abab": { + "version": "2.0.6", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true + }, + "node_modules/acorn": { + "version": "5.7.4", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals": { + "version": "4.3.4", + "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", + "dev": true, + "dependencies": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" + } + }, + "node_modules/acorn-globals/node_modules/acorn": { + "version": "6.4.2", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "6.2.0", + "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/append-transform": { + "version": "2.0.0", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "dependencies": { + "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-equal": { + "version": "1.0.0", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", + "dev": true + }, + "node_modules/asn1": { + "version": "0.2.6", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/async-limiter": { + "version": "1.0.1", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-process-hrtime": { + "version": "1.0.0", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/browserslist": { + "version": "4.21.4", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/caching-transform": { + "version": "4.0.0", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "dependencies": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001418", + "integrity": "sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==", + "dev": true + }, + "node_modules/caseless": { + "version": "0.12.0", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "node_modules/chai": { + "version": "4.3.6", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli": { + "version": "1.0.1", + "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", + "dev": true, + "dependencies": { + "exit": "0.1.2", + "glob": "^7.1.1" + }, + "engines": { + "node": ">=0.2.5" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.19", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/commondir": { + "version": "1.0.1", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/console-browserify": { + "version": "1.1.0", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "dependencies": { + "date-now": "^0.1.4" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssom": { + "version": "0.3.8", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + }, + "node_modules/cssstyle": { + "version": "1.4.0", + "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==", + "dev": true, + "dependencies": { + "cssom": "0.3.x" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/data-urls": { + "version": "1.1.0", + "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", + "dev": true, + "dependencies": { + "abab": "^2.0.0", + "whatwg-mimetype": "^2.2.0", + "whatwg-url": "^7.0.0" + } + }, + "node_modules/data-urls/node_modules/whatwg-url": { + "version": "7.1.0", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/date-now": { + "version": "0.1.4", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.3", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/decamelize": { + "version": "1.2.0", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/default-require-extensions": { + "version": "3.0.1", + "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", + "dev": true, + "dependencies": { + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dom-serializer": { + "version": "0.2.2", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/dom-serializer/node_modules/domelementtype": { + "version": "2.3.0", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true + }, + "node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + }, + "node_modules/domelementtype": { + "version": "1.3.1", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "node_modules/domexception": { + "version": "1.0.1", + "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", + "dev": true, + "dependencies": { + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/domhandler": { + "version": "2.3.0", + "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "dev": true, + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/domutils": { + "version": "1.5.1", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.279", + "integrity": "sha512-xs7vEuSZ84+JsHSTFqqG0TE3i8EAivHomRQZhhcRvsmnjsh5C2KdhwNKf4ZRYtzq75wojpFyqb62m32Oam57wA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.10.0", + "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "1.0.0", + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", + "dev": true + }, + "node_modules/envinfo": { + "version": "7.8.1", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true, + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/es-module-lexer": { + "version": "0.9.3", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "dev": true + }, + "node_modules/es6-error": { + "version": "4.1.1", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/escodegen": { + "version": "1.14.3", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/events": { + "version": "3.3.0", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/foreground-child": { + "version": "2.0.0", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fromentries": { + "version": "1.3.2", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/growl": { + "version": "1.10.5", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hasha": { + "version": "5.2.2", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dev": true, + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "1.0.2", + "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", + "dev": true, + "dependencies": { + "whatwg-encoding": "^1.0.1" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/htmlparser2": { + "version": "3.8.3", + "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "dev": true, + "dependencies": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/interpret": { + "version": "2.2.0", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.10.0", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isstream": { + "version": "0.1.2", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-hook": { + "version": "3.0.0", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "dependencies": { + "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo": { + "version": "2.0.3", + "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", + "dev": true, + "dependencies": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.3", + "istanbul-lib-coverage": "^3.2.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.5", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "node_modules/jsdom": { + "version": "11.12.0", + "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "dev": true, + "dependencies": { + "abab": "^2.0.0", + "acorn": "^5.5.3", + "acorn-globals": "^4.1.0", + "array-equal": "^1.0.0", + "cssom": ">= 0.3.2 < 0.4.0", + "cssstyle": "^1.0.0", + "data-urls": "^1.0.0", + "domexception": "^1.0.1", + "escodegen": "^1.9.1", + "html-encoding-sniffer": "^1.0.2", + "left-pad": "^1.3.0", + "nwsapi": "^2.0.7", + "parse5": "4.0.0", + "pn": "^1.1.0", + "request": "^2.87.0", + "request-promise-native": "^1.0.5", + "sax": "^1.2.4", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.3.4", + "w3c-hr-time": "^1.0.1", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.3", + "whatwg-mimetype": "^2.1.0", + "whatwg-url": "^6.4.1", + "ws": "^5.2.0", + "xml-name-validator": "^3.0.0" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jshint": { + "version": "2.13.5", + "integrity": "sha512-dB2n1w3OaQ35PLcBGIWXlszjbPZwsgZoxsg6G8PtNf2cFMC1l0fObkYLUuXqTTdi6tKw4sAjfUseTdmDMHQRcg==", + "dev": true, + "dependencies": { + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.21", + "minimatch": "~3.0.2", + "strip-json-comments": "1.0.x" + }, + "bin": { + "jshint": "bin/jshint" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema": { + "version": "0.4.0", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.1", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsprim": { + "version": "1.4.2", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dev": true, + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/just-extend": { + "version": "4.2.1", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "node_modules/kind-of": { + "version": "6.0.3", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/left-pad": { + "version": "1.3.0", + "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", + "dev": true + }, + "node_modules/levn": { + "version": "0.3.0", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "node_modules/lodash.get": { + "version": "4.4.2", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/loupe": { + "version": "2.3.4", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/mime-db": { + "version": "1.52.0", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.0.8", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha": { + "version": "9.2.2", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "dev": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "4.2.1", + "ms": "2.1.3", + "nanoid": "3.3.1", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.2.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/mocha-jsdom": { + "version": "2.0.0", + "integrity": "sha512-+3D++FPXHXEesbBD7Q/r4dkc3XzVFMPLJVIECaQ685dj9qKQYzliqX8IXyIUbUL4x1QfgD9h8Zao8cn03NKKEA==", + "dev": true, + "dependencies": { + "jsdom": "^11.11.0" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "7.2.0", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "4.2.1", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/strip-json-comments": { + "version": "3.1.1", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.1", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/nise": { + "version": "4.1.0", + "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "node_modules/node-preload": { + "version": "0.2.1", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "dependencies": { + "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/node-releases": { + "version": "2.0.6", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nwsapi": { + "version": "2.2.2", + "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==", + "dev": true + }, + "node_modules/nyc": { + "version": "15.1.0", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "dev": true, + "dependencies": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/nyc/node_modules/cliui": { + "version": "6.0.0", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/nyc/node_modules/find-up": { + "version": "4.1.0", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/locate-path": { + "version": "5.0.0", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/p-limit": { + "version": "2.3.0", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/nyc/node_modules/p-locate": { + "version": "4.1.0", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/wrap-ansi": { + "version": "6.2.0", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/y18n": { + "version": "4.0.3", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/nyc/node_modules/yargs": { + "version": "15.4.1", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/yargs-parser": { + "version": "18.1.3", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/once": { + "version": "1.4.0", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.8.3", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/p-map": { + "version": "3.0.0", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-hash": { + "version": "4.0.0", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/parse5": { + "version": "4.0.0", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "1.8.0", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pn": { + "version": "1.1.0", + "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", + "dev": true + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/process-on-spawn": { + "version": "1.0.0", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "dependencies": { + "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.5.3", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readable-stream": { + "version": "1.1.14", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.7.1", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "dev": true, + "dependencies": { + "resolve": "^1.9.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/release-zalgo": { + "version": "1.0.0", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/request": { + "version": "2.88.2", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request-promise-core": { + "version": "1.1.4", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.19" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/request-promise-native": { + "version": "1.0.9", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "dev": true, + "dependencies": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.22.1", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sax": { + "version": "1.2.4", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "node_modules/schema-utils": { + "version": "3.1.1", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/semver": { + "version": "6.3.0", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sinon": { + "version": "9.2.4", + "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.8.1", + "@sinonjs/fake-timers": "^6.0.1", + "@sinonjs/samsam": "^5.3.1", + "diff": "^4.0.2", + "nise": "^4.0.4", + "supports-color": "^7.1.0" + } + }, + "node_modules/sinon/node_modules/diff": { + "version": "4.0.2", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/sinon/node_modules/supports-color": { + "version": "7.2.0", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spawn-wrap": { + "version": "2.0.0", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "dev": true, + "dependencies": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/sshpk": { + "version": "1.17.0", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dev": true, + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stealthy-require": { + "version": "1.1.1", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "node_modules/string-width": { + "version": "4.2.3", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "1.0.4", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "dev": true, + "bin": { + "strip-json-comments": "cli.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "node_modules/tapable": { + "version": "2.2.1", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser": { + "version": "5.15.1", + "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.6", + "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/terser/node_modules/acorn": { + "version": "8.8.0", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tr46": { + "version": "1.0.1", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "node_modules/type-check": { + "version": "0.3.2", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.8.1", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typescript": { + "version": "4.8.4", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.10", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/w3c-hr-time": { + "version": "1.0.2", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "dev": true, + "dependencies": { + "browser-process-hrtime": "^1.0.0" + } + }, + "node_modules/watchpack": { + "version": "2.4.0", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "node_modules/webpack": { + "version": "5.74.0", + "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", + "dev": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-cli": { + "version": "4.10.0", + "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", + "dev": true, + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.2.0", + "@webpack-cli/info": "^1.5.0", + "@webpack-cli/serve": "^1.7.0", + "colorette": "^2.0.14", + "commander": "^7.0.0", + "cross-spawn": "^7.0.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "7.2.0", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/webpack-merge": { + "version": "5.8.0", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-plugin-replace": { + "version": "1.2.0", + "integrity": "sha512-1HA3etHpJW55qonJqv84o5w5GY7iqF8fqSHpTWdNwarj1llkkt4jT4QSvYs1hoaU8Lu5akDnq/spHHO5mXwo1w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/acorn": { + "version": "8.8.0", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/webpack/node_modules/acorn-import-assertions": { + "version": "1.8.0", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "dev": true + }, + "node_modules/whatwg-encoding": { + "version": "1.0.5", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "dependencies": { + "iconv-lite": "0.4.24" + } + }, + "node_modules/whatwg-mimetype": { + "version": "2.3.0", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "6.5.0", + "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "dev": true, + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/which": { + "version": "2.0.2", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/wildcard": { + "version": "2.0.0", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/workerpool": { + "version": "6.2.0", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/ws": { + "version": "5.2.3", + "integrity": "sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==", + "dev": true, + "dependencies": { + "async-limiter": "~1.0.0" + } + }, + "node_modules/xml-name-validator": { + "version": "3.0.0", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + } + } + }, "dependencies": { "@ampproject/remapping": { "version": "2.2.0", - "resolved": false, "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", "dev": true, "requires": { @@ -16,7 +4018,6 @@ }, "@babel/code-frame": { "version": "7.18.6", - "resolved": false, "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dev": true, "requires": { @@ -25,13 +4026,11 @@ }, "@babel/compat-data": { "version": "7.19.4", - "resolved": false, "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==", "dev": true }, "@babel/core": { "version": "7.19.3", - "resolved": false, "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", "dev": true, "requires": { @@ -54,7 +4053,6 @@ }, "@babel/generator": { "version": "7.19.5", - "resolved": false, "integrity": "sha512-DxbNz9Lz4aMZ99qPpO1raTbcrI1ZeYh+9NR9qhfkQIbFtVEqotHojEBxHzmxhVONkGt6VyrqVQcgpefMy9pqcg==", "dev": true, "requires": { @@ -65,7 +4063,6 @@ "dependencies": { "@jridgewell/gen-mapping": { "version": "0.3.2", - "resolved": false, "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dev": true, "requires": { @@ -78,7 +4075,6 @@ }, "@babel/helper-compilation-targets": { "version": "7.19.3", - "resolved": false, "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", "dev": true, "requires": { @@ -90,13 +4086,11 @@ }, "@babel/helper-environment-visitor": { "version": "7.18.9", - "resolved": false, "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", "dev": true }, "@babel/helper-function-name": { "version": "7.19.0", - "resolved": false, "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", "dev": true, "requires": { @@ -106,7 +4100,6 @@ }, "@babel/helper-hoist-variables": { "version": "7.18.6", - "resolved": false, "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", "dev": true, "requires": { @@ -115,7 +4108,6 @@ }, "@babel/helper-module-imports": { "version": "7.18.6", - "resolved": false, "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", "dev": true, "requires": { @@ -124,7 +4116,6 @@ }, "@babel/helper-module-transforms": { "version": "7.19.0", - "resolved": false, "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", "dev": true, "requires": { @@ -140,7 +4131,6 @@ }, "@babel/helper-simple-access": { "version": "7.19.4", - "resolved": false, "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==", "dev": true, "requires": { @@ -149,7 +4139,6 @@ }, "@babel/helper-split-export-declaration": { "version": "7.18.6", - "resolved": false, "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", "dev": true, "requires": { @@ -158,25 +4147,21 @@ }, "@babel/helper-string-parser": { "version": "7.19.4", - "resolved": false, "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", "dev": true }, "@babel/helper-validator-identifier": { "version": "7.19.1", - "resolved": false, "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", "dev": true }, "@babel/helper-validator-option": { "version": "7.18.6", - "resolved": false, "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", "dev": true }, "@babel/helpers": { "version": "7.19.4", - "resolved": false, "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==", "dev": true, "requires": { @@ -187,7 +4172,6 @@ }, "@babel/highlight": { "version": "7.18.6", - "resolved": false, "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "requires": { @@ -198,7 +4182,6 @@ "dependencies": { "ansi-styles": { "version": "3.2.1", - "resolved": false, "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { @@ -207,7 +4190,6 @@ }, "chalk": { "version": "2.4.2", - "resolved": false, "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { @@ -218,7 +4200,6 @@ }, "color-convert": { "version": "1.9.3", - "resolved": false, "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { @@ -227,25 +4208,21 @@ }, "color-name": { "version": "1.1.3", - "resolved": false, "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "escape-string-regexp": { "version": "1.0.5", - "resolved": false, "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, "has-flag": { "version": "3.0.0", - "resolved": false, "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "supports-color": { "version": "5.5.0", - "resolved": false, "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { @@ -256,13 +4233,11 @@ }, "@babel/parser": { "version": "7.19.4", - "resolved": false, "integrity": "sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==", "dev": true }, "@babel/template": { "version": "7.18.10", - "resolved": false, "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", "dev": true, "requires": { @@ -273,7 +4248,6 @@ }, "@babel/traverse": { "version": "7.19.4", - "resolved": false, "integrity": "sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==", "dev": true, "requires": { @@ -291,7 +4265,6 @@ }, "@babel/types": { "version": "7.19.4", - "resolved": false, "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==", "dev": true, "requires": { @@ -302,13 +4275,11 @@ }, "@discoveryjs/json-ext": { "version": "0.5.7", - "resolved": false, "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", - "resolved": false, "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, "requires": { @@ -321,7 +4292,6 @@ "dependencies": { "argparse": { "version": "1.0.10", - "resolved": false, "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { @@ -330,7 +4300,6 @@ }, "find-up": { "version": "4.1.0", - "resolved": false, "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { @@ -340,7 +4309,6 @@ }, "js-yaml": { "version": "3.14.1", - "resolved": false, "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { @@ -350,7 +4318,6 @@ }, "locate-path": { "version": "5.0.0", - "resolved": false, "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { @@ -359,7 +4326,6 @@ }, "p-limit": { "version": "2.3.0", - "resolved": false, "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { @@ -368,7 +4334,6 @@ }, "p-locate": { "version": "4.1.0", - "resolved": false, "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { @@ -379,13 +4344,11 @@ }, "@istanbuljs/schema": { "version": "0.1.3", - "resolved": false, "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, "@jridgewell/gen-mapping": { "version": "0.1.1", - "resolved": false, "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", "dev": true, "requires": { @@ -395,19 +4358,16 @@ }, "@jridgewell/resolve-uri": { "version": "3.1.0", - "resolved": false, "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true }, "@jridgewell/set-array": { "version": "1.1.2", - "resolved": false, "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true }, "@jridgewell/source-map": { "version": "0.3.2", - "resolved": false, "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", "dev": true, "requires": { @@ -417,7 +4377,6 @@ "dependencies": { "@jridgewell/gen-mapping": { "version": "0.3.2", - "resolved": false, "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dev": true, "requires": { @@ -430,13 +4389,11 @@ }, "@jridgewell/sourcemap-codec": { "version": "1.4.14", - "resolved": false, "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, "@jridgewell/trace-mapping": { "version": "0.3.16", - "resolved": false, "integrity": "sha512-LCQ+NeThyJ4k1W2d+vIKdxuSt9R3pQSZ4P92m7EakaYuXcVWbHuT5bjNcqLd4Rdgi6xYWYDvBJZJLZSLanjDcA==", "dev": true, "requires": { @@ -446,7 +4403,6 @@ }, "@sinonjs/commons": { "version": "1.8.3", - "resolved": false, "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", "dev": true, "requires": { @@ -455,7 +4411,6 @@ }, "@sinonjs/fake-timers": { "version": "6.0.1", - "resolved": false, "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", "dev": true, "requires": { @@ -464,7 +4419,6 @@ }, "@sinonjs/samsam": { "version": "5.3.1", - "resolved": false, "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", "dev": true, "requires": { @@ -475,13 +4429,11 @@ }, "@sinonjs/text-encoding": { "version": "0.7.2", - "resolved": false, "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, "@types/eslint": { "version": "8.4.6", - "resolved": false, "integrity": "sha512-/fqTbjxyFUaYNO7VcW5g+4npmqVACz1bB7RTHYuLj+PRjw9hrCwrUXVQFpChUS0JsyEFvMZ7U/PfmvWgxJhI9g==", "dev": true, "requires": { @@ -491,7 +4443,6 @@ }, "@types/eslint-scope": { "version": "3.7.4", - "resolved": false, "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", "dev": true, "requires": { @@ -501,31 +4452,26 @@ }, "@types/estree": { "version": "0.0.51", - "resolved": false, "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", "dev": true }, "@types/json-schema": { "version": "7.0.11", - "resolved": false, "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, "@types/node": { "version": "18.8.5", - "resolved": false, "integrity": "sha512-Bq7G3AErwe5A/Zki5fdD3O6+0zDChhg671NfPjtIcbtzDNZTv4NPKMRFr7gtYPG7y+B8uTiNK4Ngd9T0FTar6Q==", "dev": true }, "@ungap/promise-all-settled": { "version": "1.1.2", - "resolved": false, "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, "@webassemblyjs/ast": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", "dev": true, "requires": { @@ -535,25 +4481,21 @@ }, "@webassemblyjs/floating-point-hex-parser": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", "dev": true }, "@webassemblyjs/helper-api-error": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", "dev": true }, "@webassemblyjs/helper-buffer": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", "dev": true }, "@webassemblyjs/helper-numbers": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", "dev": true, "requires": { @@ -564,13 +4506,11 @@ }, "@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", "dev": true }, "@webassemblyjs/helper-wasm-section": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", "dev": true, "requires": { @@ -582,7 +4522,6 @@ }, "@webassemblyjs/ieee754": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", "dev": true, "requires": { @@ -591,7 +4530,6 @@ }, "@webassemblyjs/leb128": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", "dev": true, "requires": { @@ -600,13 +4538,11 @@ }, "@webassemblyjs/utf8": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", "dev": true }, "@webassemblyjs/wasm-edit": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", "dev": true, "requires": { @@ -622,7 +4558,6 @@ }, "@webassemblyjs/wasm-gen": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", "dev": true, "requires": { @@ -635,7 +4570,6 @@ }, "@webassemblyjs/wasm-opt": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", "dev": true, "requires": { @@ -647,7 +4581,6 @@ }, "@webassemblyjs/wasm-parser": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", "dev": true, "requires": { @@ -661,7 +4594,6 @@ }, "@webassemblyjs/wast-printer": { "version": "1.11.1", - "resolved": false, "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", "dev": true, "requires": { @@ -671,13 +4603,11 @@ }, "@webpack-cli/configtest": { "version": "1.2.0", - "resolved": false, "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", "dev": true }, "@webpack-cli/info": { "version": "1.5.0", - "resolved": false, "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", "dev": true, "requires": { @@ -686,37 +4616,31 @@ }, "@webpack-cli/serve": { "version": "1.7.0", - "resolved": false, "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", "dev": true }, "@xtuc/ieee754": { "version": "1.2.0", - "resolved": false, "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", "dev": true }, "@xtuc/long": { "version": "4.2.2", - "resolved": false, "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, "abab": { "version": "2.0.6", - "resolved": false, "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "dev": true }, "acorn": { "version": "5.7.4", - "resolved": false, "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", "dev": true }, "acorn-globals": { "version": "4.3.4", - "resolved": false, "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", "dev": true, "requires": { @@ -726,7 +4650,6 @@ "dependencies": { "acorn": { "version": "6.4.2", - "resolved": false, "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true } @@ -734,13 +4657,11 @@ }, "acorn-walk": { "version": "6.2.0", - "resolved": false, "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==", "dev": true }, "aggregate-error": { "version": "3.1.0", - "resolved": false, "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "requires": { @@ -750,7 +4671,6 @@ }, "ajv": { "version": "6.12.6", - "resolved": false, "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { @@ -762,25 +4682,21 @@ }, "ajv-keywords": { "version": "3.5.2", - "resolved": false, "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true }, "ansi-colors": { "version": "4.1.1", - "resolved": false, "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-regex": { "version": "5.0.1", - "resolved": false, "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { "version": "4.3.0", - "resolved": false, "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { @@ -789,7 +4705,6 @@ }, "anymatch": { "version": "3.1.2", - "resolved": false, "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { @@ -799,7 +4714,6 @@ }, "append-transform": { "version": "2.0.0", - "resolved": false, "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", "dev": true, "requires": { @@ -808,25 +4722,21 @@ }, "archy": { "version": "1.0.0", - "resolved": false, "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", "dev": true }, "argparse": { "version": "2.0.1", - "resolved": false, "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "array-equal": { "version": "1.0.0", - "resolved": false, "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, "asn1": { "version": "0.2.6", - "resolved": false, "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, "requires": { @@ -835,49 +4745,41 @@ }, "assert-plus": { "version": "1.0.0", - "resolved": false, "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, "assertion-error": { "version": "1.1.0", - "resolved": false, "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, "async-limiter": { "version": "1.0.1", - "resolved": false, "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", "dev": true }, "asynckit": { "version": "0.4.0", - "resolved": false, "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, "aws-sign2": { "version": "0.7.0", - "resolved": false, "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", "dev": true }, "aws4": { "version": "1.11.0", - "resolved": false, "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, "balanced-match": { "version": "1.0.2", - "resolved": false, "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "bcrypt-pbkdf": { "version": "1.0.2", - "resolved": false, "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, "requires": { @@ -886,13 +4788,11 @@ }, "binary-extensions": { "version": "2.2.0", - "resolved": false, "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, "brace-expansion": { "version": "1.1.11", - "resolved": false, "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { @@ -902,7 +4802,6 @@ }, "braces": { "version": "3.0.2", - "resolved": false, "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { @@ -911,19 +4810,16 @@ }, "browser-process-hrtime": { "version": "1.0.0", - "resolved": false, "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, "browser-stdout": { "version": "1.3.1", - "resolved": false, "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, "browserslist": { "version": "4.21.4", - "resolved": false, "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", "dev": true, "requires": { @@ -935,13 +4831,11 @@ }, "buffer-from": { "version": "1.1.2", - "resolved": false, "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, "caching-transform": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", "dev": true, "requires": { @@ -953,25 +4847,21 @@ }, "camelcase": { "version": "5.3.1", - "resolved": false, "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "caniuse-lite": { "version": "1.0.30001418", - "resolved": false, "integrity": "sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==", "dev": true }, "caseless": { "version": "0.12.0", - "resolved": false, "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, "chai": { "version": "4.3.6", - "resolved": false, "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", "dev": true, "requires": { @@ -986,7 +4876,6 @@ }, "chalk": { "version": "4.1.2", - "resolved": false, "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { @@ -996,7 +4885,6 @@ "dependencies": { "supports-color": { "version": "7.2.0", - "resolved": false, "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { @@ -1007,13 +4895,11 @@ }, "check-error": { "version": "1.0.2", - "resolved": false, "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, "chokidar": { "version": "3.5.3", - "resolved": false, "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { @@ -1029,19 +4915,16 @@ }, "chrome-trace-event": { "version": "1.0.3", - "resolved": false, "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", "dev": true }, "clean-stack": { "version": "2.2.0", - "resolved": false, "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, "cli": { "version": "1.0.1", - "resolved": false, "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", "dev": true, "requires": { @@ -1051,7 +4934,6 @@ }, "cliui": { "version": "7.0.4", - "resolved": false, "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { @@ -1062,7 +4944,6 @@ }, "clone-deep": { "version": "4.0.1", - "resolved": false, "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", "dev": true, "requires": { @@ -1073,7 +4954,6 @@ }, "color-convert": { "version": "2.0.1", - "resolved": false, "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { @@ -1082,19 +4962,16 @@ }, "color-name": { "version": "1.1.4", - "resolved": false, "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "colorette": { "version": "2.0.19", - "resolved": false, "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, "combined-stream": { "version": "1.0.8", - "resolved": false, "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { @@ -1103,25 +4980,21 @@ }, "commander": { "version": "2.20.3", - "resolved": false, "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, "commondir": { "version": "1.0.1", - "resolved": false, "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": false, "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "console-browserify": { "version": "1.1.0", - "resolved": false, "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { @@ -1130,19 +5003,16 @@ }, "convert-source-map": { "version": "1.9.0", - "resolved": false, "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, "core-util-is": { "version": "1.0.3", - "resolved": false, "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, "cross-spawn": { "version": "7.0.3", - "resolved": false, "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { @@ -1153,13 +5023,11 @@ }, "cssom": { "version": "0.3.8", - "resolved": false, "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "dev": true }, "cssstyle": { "version": "1.4.0", - "resolved": false, "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==", "dev": true, "requires": { @@ -1168,7 +5036,6 @@ }, "dashdash": { "version": "1.14.1", - "resolved": false, "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { @@ -1177,7 +5044,6 @@ }, "data-urls": { "version": "1.1.0", - "resolved": false, "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", "dev": true, "requires": { @@ -1188,7 +5054,6 @@ "dependencies": { "whatwg-url": { "version": "7.1.0", - "resolved": false, "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", "dev": true, "requires": { @@ -1201,13 +5066,11 @@ }, "date-now": { "version": "0.1.4", - "resolved": false, "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", "dev": true }, "debug": { "version": "4.3.3", - "resolved": false, "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { @@ -1216,7 +5079,6 @@ "dependencies": { "ms": { "version": "2.1.2", - "resolved": false, "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } @@ -1224,13 +5086,11 @@ }, "decamelize": { "version": "1.2.0", - "resolved": false, "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, "deep-eql": { "version": "3.0.1", - "resolved": false, "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { @@ -1239,13 +5099,11 @@ }, "deep-is": { "version": "0.1.4", - "resolved": false, "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "default-require-extensions": { "version": "3.0.1", - "resolved": false, "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", "dev": true, "requires": { @@ -1254,19 +5112,16 @@ }, "delayed-stream": { "version": "1.0.0", - "resolved": false, "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, "diff": { "version": "5.0.0", - "resolved": false, "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "dom-serializer": { "version": "0.2.2", - "resolved": false, "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", "dev": true, "requires": { @@ -1276,13 +5131,11 @@ "dependencies": { "domelementtype": { "version": "2.3.0", - "resolved": false, "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true }, "entities": { "version": "2.2.0", - "resolved": false, "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", "dev": true } @@ -1290,13 +5143,11 @@ }, "domelementtype": { "version": "1.3.1", - "resolved": false, "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", "dev": true }, "domexception": { "version": "1.0.1", - "resolved": false, "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", "dev": true, "requires": { @@ -1305,7 +5156,6 @@ }, "domhandler": { "version": "2.3.0", - "resolved": false, "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", "dev": true, "requires": { @@ -1314,7 +5164,6 @@ }, "domutils": { "version": "1.5.1", - "resolved": false, "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", "dev": true, "requires": { @@ -1324,7 +5173,6 @@ }, "ecc-jsbn": { "version": "0.1.2", - "resolved": false, "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, "requires": { @@ -1334,19 +5182,16 @@ }, "electron-to-chromium": { "version": "1.4.279", - "resolved": false, "integrity": "sha512-xs7vEuSZ84+JsHSTFqqG0TE3i8EAivHomRQZhhcRvsmnjsh5C2KdhwNKf4ZRYtzq75wojpFyqb62m32Oam57wA==", "dev": true }, "emoji-regex": { "version": "8.0.0", - "resolved": false, "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "end-of-stream": { "version": "1.4.4", - "resolved": false, "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { @@ -1355,7 +5200,6 @@ }, "enhanced-resolve": { "version": "5.10.0", - "resolved": false, "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", "dev": true, "requires": { @@ -1365,43 +5209,36 @@ }, "entities": { "version": "1.0.0", - "resolved": false, "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", "dev": true }, "envinfo": { "version": "7.8.1", - "resolved": false, "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", "dev": true }, "es-module-lexer": { "version": "0.9.3", - "resolved": false, "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", "dev": true }, "es6-error": { "version": "4.1.1", - "resolved": false, "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, "escalade": { "version": "3.1.1", - "resolved": false, "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, "escape-string-regexp": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "escodegen": { "version": "1.14.3", - "resolved": false, "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", "dev": true, "requires": { @@ -1414,7 +5251,6 @@ }, "eslint-scope": { "version": "5.1.1", - "resolved": false, "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { @@ -1424,13 +5260,11 @@ }, "esprima": { "version": "4.0.1", - "resolved": false, "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esrecurse": { "version": "4.3.0", - "resolved": false, "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { @@ -1439,7 +5273,6 @@ "dependencies": { "estraverse": { "version": "5.3.0", - "resolved": false, "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } @@ -1447,67 +5280,56 @@ }, "estraverse": { "version": "4.3.0", - "resolved": false, "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "esutils": { "version": "2.0.3", - "resolved": false, "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "events": { "version": "3.3.0", - "resolved": false, "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "dev": true }, "exit": { "version": "0.1.2", - "resolved": false, "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", "dev": true }, "extend": { "version": "3.0.2", - "resolved": false, "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, "extsprintf": { "version": "1.3.0", - "resolved": false, "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", "dev": true }, "fast-deep-equal": { "version": "3.1.3", - "resolved": false, "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-json-stable-stringify": { "version": "2.1.0", - "resolved": false, "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "fast-levenshtein": { "version": "2.0.6", - "resolved": false, "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, "fastest-levenshtein": { "version": "1.0.16", - "resolved": false, "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", "dev": true }, "fill-range": { "version": "7.0.1", - "resolved": false, "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { @@ -1516,7 +5338,6 @@ }, "find-cache-dir": { "version": "3.3.2", - "resolved": false, "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, "requires": { @@ -1527,7 +5348,6 @@ }, "find-up": { "version": "5.0.0", - "resolved": false, "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { @@ -1537,13 +5357,11 @@ }, "flat": { "version": "5.0.2", - "resolved": false, "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true }, "foreground-child": { "version": "2.0.0", - "resolved": false, "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, "requires": { @@ -1553,13 +5371,11 @@ }, "forever-agent": { "version": "0.6.1", - "resolved": false, "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "dev": true }, "form-data": { "version": "2.3.3", - "resolved": false, "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "requires": { @@ -1570,13 +5386,11 @@ }, "fromentries": { "version": "1.3.2", - "resolved": false, "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", "dev": true }, "fs.realpath": { "version": "1.0.0", - "resolved": false, "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, @@ -1589,37 +5403,31 @@ }, "function-bind": { "version": "1.1.1", - "resolved": false, "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "gensync": { "version": "1.0.0-beta.2", - "resolved": false, "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, "get-caller-file": { "version": "2.0.5", - "resolved": false, "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-func-name": { "version": "2.0.0", - "resolved": false, "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, "get-package-type": { "version": "0.1.0", - "resolved": false, "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, "getpass": { "version": "0.1.7", - "resolved": false, "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, "requires": { @@ -1628,7 +5436,6 @@ }, "glob": { "version": "7.2.3", - "resolved": false, "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { @@ -1642,7 +5449,6 @@ "dependencies": { "minimatch": { "version": "3.1.2", - "resolved": false, "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { @@ -1653,7 +5459,6 @@ }, "glob-parent": { "version": "5.1.2", - "resolved": false, "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { @@ -1662,37 +5467,31 @@ }, "glob-to-regexp": { "version": "0.4.1", - "resolved": false, "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true }, "globals": { "version": "11.12.0", - "resolved": false, "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, "graceful-fs": { "version": "4.2.10", - "resolved": false, "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "growl": { "version": "1.10.5", - "resolved": false, "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, "har-schema": { "version": "2.0.0", - "resolved": false, "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", "dev": true }, "har-validator": { "version": "5.1.5", - "resolved": false, "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, "requires": { @@ -1702,7 +5501,6 @@ }, "has": { "version": "1.0.3", - "resolved": false, "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { @@ -1711,13 +5509,11 @@ }, "has-flag": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "hasha": { "version": "5.2.2", - "resolved": false, "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", "dev": true, "requires": { @@ -1727,13 +5523,11 @@ }, "he": { "version": "1.2.0", - "resolved": false, "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, "html-encoding-sniffer": { "version": "1.0.2", - "resolved": false, "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", "dev": true, "requires": { @@ -1742,13 +5536,11 @@ }, "html-escaper": { "version": "2.0.2", - "resolved": false, "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, "htmlparser2": { "version": "3.8.3", - "resolved": false, "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", "dev": true, "requires": { @@ -1761,7 +5553,6 @@ }, "http-signature": { "version": "1.2.0", - "resolved": false, "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, "requires": { @@ -1772,7 +5563,6 @@ }, "iconv-lite": { "version": "0.4.24", - "resolved": false, "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { @@ -1781,7 +5571,6 @@ }, "import-local": { "version": "3.1.0", - "resolved": false, "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, "requires": { @@ -1791,19 +5580,16 @@ }, "imurmurhash": { "version": "0.1.4", - "resolved": false, "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, "indent-string": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, "inflight": { "version": "1.0.6", - "resolved": false, "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { @@ -1813,19 +5599,16 @@ }, "inherits": { "version": "2.0.4", - "resolved": false, "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "interpret": { "version": "2.2.0", - "resolved": false, "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", "dev": true }, "is-binary-path": { "version": "2.1.0", - "resolved": false, "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { @@ -1834,7 +5617,6 @@ }, "is-core-module": { "version": "2.10.0", - "resolved": false, "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dev": true, "requires": { @@ -1843,19 +5625,16 @@ }, "is-extglob": { "version": "2.1.1", - "resolved": false, "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-glob": { "version": "4.0.3", - "resolved": false, "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { @@ -1864,19 +5643,16 @@ }, "is-number": { "version": "7.0.0", - "resolved": false, "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, "is-plain-obj": { "version": "2.1.0", - "resolved": false, "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, "is-plain-object": { "version": "2.0.4", - "resolved": false, "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { @@ -1885,61 +5661,51 @@ }, "is-stream": { "version": "2.0.1", - "resolved": false, "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, "is-typedarray": { "version": "1.0.0", - "resolved": false, "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, "is-unicode-supported": { "version": "0.1.0", - "resolved": false, "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, "is-windows": { "version": "1.0.2", - "resolved": false, "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, "isarray": { "version": "0.0.1", - "resolved": false, "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", "dev": true }, "isexe": { "version": "2.0.0", - "resolved": false, "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "isobject": { "version": "3.0.1", - "resolved": false, "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, "isstream": { "version": "0.1.2", - "resolved": false, "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, "istanbul-lib-coverage": { "version": "3.2.0", - "resolved": false, "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true }, "istanbul-lib-hook": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", "dev": true, "requires": { @@ -1948,7 +5714,6 @@ }, "istanbul-lib-instrument": { "version": "4.0.3", - "resolved": false, "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", "dev": true, "requires": { @@ -1960,7 +5725,6 @@ }, "istanbul-lib-processinfo": { "version": "2.0.3", - "resolved": false, "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", "dev": true, "requires": { @@ -1974,7 +5738,6 @@ }, "istanbul-lib-report": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", "dev": true, "requires": { @@ -1985,7 +5748,6 @@ "dependencies": { "supports-color": { "version": "7.2.0", - "resolved": false, "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { @@ -1996,7 +5758,6 @@ }, "istanbul-lib-source-maps": { "version": "4.0.1", - "resolved": false, "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, "requires": { @@ -2007,7 +5768,6 @@ }, "istanbul-reports": { "version": "3.1.5", - "resolved": false, "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "requires": { @@ -2017,7 +5777,6 @@ }, "jest-worker": { "version": "27.5.1", - "resolved": false, "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, "requires": { @@ -2028,13 +5787,11 @@ }, "js-tokens": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "js-yaml": { "version": "4.1.0", - "resolved": false, "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { @@ -2043,13 +5800,11 @@ }, "jsbn": { "version": "0.1.1", - "resolved": false, "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true }, "jsdom": { "version": "11.12.0", - "resolved": false, "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", "dev": true, "requires": { @@ -2083,13 +5838,11 @@ }, "jsesc": { "version": "2.5.2", - "resolved": false, "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, "jshint": { "version": "2.13.5", - "resolved": false, "integrity": "sha512-dB2n1w3OaQ35PLcBGIWXlszjbPZwsgZoxsg6G8PtNf2cFMC1l0fObkYLUuXqTTdi6tKw4sAjfUseTdmDMHQRcg==", "dev": true, "requires": { @@ -2104,37 +5857,31 @@ }, "json-parse-even-better-errors": { "version": "2.3.1", - "resolved": false, "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, "json-schema": { "version": "0.4.0", - "resolved": false, "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, "json-schema-traverse": { "version": "0.4.1", - "resolved": false, "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stringify-safe": { "version": "5.0.1", - "resolved": false, "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, "json5": { "version": "2.2.1", - "resolved": false, "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true }, "jsprim": { "version": "1.4.2", - "resolved": false, "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, "requires": { @@ -2146,25 +5893,21 @@ }, "just-extend": { "version": "4.2.1", - "resolved": false, "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", "dev": true }, "kind-of": { "version": "6.0.3", - "resolved": false, "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "left-pad": { "version": "1.3.0", - "resolved": false, "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", "dev": true }, "levn": { "version": "0.3.0", - "resolved": false, "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { @@ -2174,13 +5917,11 @@ }, "loader-runner": { "version": "4.3.0", - "resolved": false, "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", "dev": true }, "locate-path": { "version": "6.0.0", - "resolved": false, "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { @@ -2189,36 +5930,26 @@ }, "lodash": { "version": "4.17.21", - "resolved": false, "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": false, - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" - }, "lodash.flattendeep": { "version": "4.4.0", - "resolved": false, "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, "lodash.get": { "version": "4.4.2", - "resolved": false, "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, "lodash.sortby": { "version": "4.7.0", - "resolved": false, "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, "log-symbols": { "version": "4.1.0", - "resolved": false, "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { @@ -2228,7 +5959,6 @@ }, "loupe": { "version": "2.3.4", - "resolved": false, "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", "dev": true, "requires": { @@ -2237,7 +5967,6 @@ }, "make-dir": { "version": "3.1.0", - "resolved": false, "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { @@ -2246,19 +5975,16 @@ }, "merge-stream": { "version": "2.0.0", - "resolved": false, "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, "mime-db": { "version": "1.52.0", - "resolved": false, "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true }, "mime-types": { "version": "2.1.35", - "resolved": false, "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "requires": { @@ -2267,7 +5993,6 @@ }, "minimatch": { "version": "3.0.8", - "resolved": false, "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", "dev": true, "requires": { @@ -2276,7 +6001,6 @@ }, "mocha": { "version": "9.2.2", - "resolved": false, "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", "dev": true, "requires": { @@ -2308,7 +6032,6 @@ "dependencies": { "glob": { "version": "7.2.0", - "resolved": false, "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { @@ -2322,7 +6045,6 @@ "dependencies": { "minimatch": { "version": "3.1.2", - "resolved": false, "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { @@ -2333,7 +6055,6 @@ }, "minimatch": { "version": "4.2.1", - "resolved": false, "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", "dev": true, "requires": { @@ -2342,7 +6063,6 @@ }, "strip-json-comments": { "version": "3.1.1", - "resolved": false, "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true } @@ -2350,7 +6070,6 @@ }, "mocha-jsdom": { "version": "2.0.0", - "resolved": false, "integrity": "sha512-+3D++FPXHXEesbBD7Q/r4dkc3XzVFMPLJVIECaQ685dj9qKQYzliqX8IXyIUbUL4x1QfgD9h8Zao8cn03NKKEA==", "dev": true, "requires": { @@ -2359,25 +6078,21 @@ }, "ms": { "version": "2.1.3", - "resolved": false, "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "nanoid": { "version": "3.3.1", - "resolved": false, "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "dev": true }, "neo-async": { "version": "2.6.2", - "resolved": false, "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, "nise": { "version": "4.1.0", - "resolved": false, "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", "dev": true, "requires": { @@ -2390,7 +6105,6 @@ }, "node-preload": { "version": "0.2.1", - "resolved": false, "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", "dev": true, "requires": { @@ -2399,25 +6113,21 @@ }, "node-releases": { "version": "2.0.6", - "resolved": false, "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "dev": true }, "normalize-path": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, "nwsapi": { "version": "2.2.2", - "resolved": false, "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==", "dev": true }, "nyc": { "version": "15.1.0", - "resolved": false, "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", "dev": true, "requires": { @@ -2452,7 +6162,6 @@ "dependencies": { "cliui": { "version": "6.0.0", - "resolved": false, "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "requires": { @@ -2463,7 +6172,6 @@ }, "find-up": { "version": "4.1.0", - "resolved": false, "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { @@ -2473,7 +6181,6 @@ }, "locate-path": { "version": "5.0.0", - "resolved": false, "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { @@ -2482,7 +6189,6 @@ }, "p-limit": { "version": "2.3.0", - "resolved": false, "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { @@ -2491,7 +6197,6 @@ }, "p-locate": { "version": "4.1.0", - "resolved": false, "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { @@ -2500,7 +6205,6 @@ }, "wrap-ansi": { "version": "6.2.0", - "resolved": false, "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { @@ -2511,13 +6215,11 @@ }, "y18n": { "version": "4.0.3", - "resolved": false, "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yargs": { "version": "15.4.1", - "resolved": false, "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "requires": { @@ -2536,7 +6238,6 @@ }, "yargs-parser": { "version": "18.1.3", - "resolved": false, "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "requires": { @@ -2548,13 +6249,11 @@ }, "oauth-sign": { "version": "0.9.0", - "resolved": false, "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, "once": { "version": "1.4.0", - "resolved": false, "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { @@ -2563,7 +6262,6 @@ }, "optionator": { "version": "0.8.3", - "resolved": false, "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "requires": { @@ -2577,7 +6275,6 @@ }, "p-limit": { "version": "3.1.0", - "resolved": false, "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { @@ -2586,7 +6283,6 @@ }, "p-locate": { "version": "5.0.0", - "resolved": false, "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { @@ -2595,7 +6291,6 @@ }, "p-map": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, "requires": { @@ -2604,13 +6299,11 @@ }, "p-try": { "version": "2.2.0", - "resolved": false, "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "package-hash": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, "requires": { @@ -2622,37 +6315,31 @@ }, "parse5": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", "dev": true }, "path-exists": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { "version": "1.0.1", - "resolved": false, "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-key": { "version": "3.1.1", - "resolved": false, "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "path-parse": { "version": "1.0.7", - "resolved": false, "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "path-to-regexp": { "version": "1.8.0", - "resolved": false, "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", "dev": true, "requires": { @@ -2661,31 +6348,26 @@ }, "pathval": { "version": "1.1.1", - "resolved": false, "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, "performance-now": { "version": "2.1.0", - "resolved": false, "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, "picocolors": { "version": "1.0.0", - "resolved": false, "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, "picomatch": { "version": "2.3.1", - "resolved": false, "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pkg-dir": { "version": "4.2.0", - "resolved": false, "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { @@ -2694,7 +6376,6 @@ "dependencies": { "find-up": { "version": "4.1.0", - "resolved": false, "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { @@ -2704,7 +6385,6 @@ }, "locate-path": { "version": "5.0.0", - "resolved": false, "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { @@ -2713,7 +6393,6 @@ }, "p-limit": { "version": "2.3.0", - "resolved": false, "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { @@ -2722,7 +6401,6 @@ }, "p-locate": { "version": "4.1.0", - "resolved": false, "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { @@ -2733,19 +6411,16 @@ }, "pn": { "version": "1.1.0", - "resolved": false, "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", "dev": true }, "prelude-ls": { "version": "1.1.2", - "resolved": false, "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, "process-on-spawn": { "version": "1.0.0", - "resolved": false, "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", "dev": true, "requires": { @@ -2754,13 +6429,11 @@ }, "psl": { "version": "1.9.0", - "resolved": false, "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, "pump": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { @@ -2770,19 +6443,16 @@ }, "punycode": { "version": "2.1.1", - "resolved": false, "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, "qs": { "version": "6.5.3", - "resolved": false, "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, "randombytes": { "version": "2.1.0", - "resolved": false, "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { @@ -2791,7 +6461,6 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": false, "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -2803,7 +6472,6 @@ }, "readdirp": { "version": "3.6.0", - "resolved": false, "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { @@ -2812,7 +6480,6 @@ }, "rechoir": { "version": "0.7.1", - "resolved": false, "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", "dev": true, "requires": { @@ -2821,7 +6488,6 @@ }, "release-zalgo": { "version": "1.0.0", - "resolved": false, "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { @@ -2830,7 +6496,6 @@ }, "request": { "version": "2.88.2", - "resolved": false, "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "dev": true, "requires": { @@ -2858,7 +6523,6 @@ "dependencies": { "uuid": { "version": "3.4.0", - "resolved": false, "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true } @@ -2866,7 +6530,6 @@ }, "request-promise-core": { "version": "1.1.4", - "resolved": false, "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", "dev": true, "requires": { @@ -2875,7 +6538,6 @@ }, "request-promise-native": { "version": "1.0.9", - "resolved": false, "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", "dev": true, "requires": { @@ -2886,19 +6548,16 @@ }, "require-directory": { "version": "2.1.1", - "resolved": false, "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, "require-main-filename": { "version": "2.0.0", - "resolved": false, "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "resolve": { "version": "1.22.1", - "resolved": false, "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "requires": { @@ -2909,7 +6568,6 @@ }, "resolve-cwd": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, "requires": { @@ -2918,13 +6576,11 @@ }, "resolve-from": { "version": "5.0.0", - "resolved": false, "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, "rimraf": { "version": "3.0.2", - "resolved": false, "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { @@ -2933,25 +6589,21 @@ }, "safe-buffer": { "version": "5.2.1", - "resolved": false, "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "safer-buffer": { "version": "2.1.2", - "resolved": false, "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, "sax": { "version": "1.2.4", - "resolved": false, "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true }, "schema-utils": { "version": "3.1.1", - "resolved": false, "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", "dev": true, "requires": { @@ -2962,13 +6614,11 @@ }, "semver": { "version": "6.3.0", - "resolved": false, "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, "serialize-javascript": { "version": "6.0.0", - "resolved": false, "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, "requires": { @@ -2977,13 +6627,11 @@ }, "set-blocking": { "version": "2.0.0", - "resolved": false, "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "shallow-clone": { "version": "3.0.1", - "resolved": false, "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", "dev": true, "requires": { @@ -2992,7 +6640,6 @@ }, "shebang-command": { "version": "2.0.0", - "resolved": false, "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { @@ -3001,19 +6648,16 @@ }, "shebang-regex": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "signal-exit": { "version": "3.0.7", - "resolved": false, "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "sinon": { "version": "9.2.4", - "resolved": false, "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", "dev": true, "requires": { @@ -3027,13 +6671,11 @@ "dependencies": { "diff": { "version": "4.0.2", - "resolved": false, "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, "supports-color": { "version": "7.2.0", - "resolved": false, "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { @@ -3044,13 +6686,11 @@ }, "source-map": { "version": "0.6.1", - "resolved": false, "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, "source-map-support": { "version": "0.5.21", - "resolved": false, "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "requires": { @@ -3060,7 +6700,6 @@ }, "spawn-wrap": { "version": "2.0.0", - "resolved": false, "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, "requires": { @@ -3074,13 +6713,11 @@ }, "sprintf-js": { "version": "1.0.3", - "resolved": false, "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, "sshpk": { "version": "1.17.0", - "resolved": false, "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dev": true, "requires": { @@ -3097,13 +6734,16 @@ }, "stealthy-require": { "version": "1.1.1", - "resolved": false, "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", "dev": true }, + "string_decoder": { + "version": "0.10.31", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, "string-width": { "version": "4.2.3", - "resolved": false, "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { @@ -3112,15 +6752,8 @@ "strip-ansi": "^6.0.1" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": false, - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, "strip-ansi": { "version": "6.0.1", - "resolved": false, "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { @@ -3129,19 +6762,16 @@ }, "strip-bom": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true }, "strip-json-comments": { "version": "1.0.4", - "resolved": false, "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", "dev": true }, "supports-color": { "version": "8.1.1", - "resolved": false, "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { @@ -3150,25 +6780,21 @@ }, "supports-preserve-symlinks-flag": { "version": "1.0.0", - "resolved": false, "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, "symbol-tree": { "version": "3.2.4", - "resolved": false, "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, "tapable": { "version": "2.2.1", - "resolved": false, "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true }, "terser": { "version": "5.15.1", - "resolved": false, "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", "dev": true, "requires": { @@ -3180,7 +6806,6 @@ "dependencies": { "acorn": { "version": "8.8.0", - "resolved": false, "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true } @@ -3188,7 +6813,6 @@ }, "terser-webpack-plugin": { "version": "5.3.6", - "resolved": false, "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", "dev": true, "requires": { @@ -3201,7 +6825,6 @@ }, "test-exclude": { "version": "6.0.0", - "resolved": false, "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "requires": { @@ -3212,13 +6835,11 @@ }, "to-fast-properties": { "version": "2.0.0", - "resolved": false, "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, "to-regex-range": { "version": "5.0.1", - "resolved": false, "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { @@ -3227,7 +6848,6 @@ }, "tough-cookie": { "version": "2.5.0", - "resolved": false, "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, "requires": { @@ -3237,7 +6857,6 @@ }, "tr46": { "version": "1.0.1", - "resolved": false, "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", "dev": true, "requires": { @@ -3246,7 +6865,6 @@ }, "tunnel-agent": { "version": "0.6.0", - "resolved": false, "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "requires": { @@ -3255,13 +6873,11 @@ }, "tweetnacl": { "version": "0.14.5", - "resolved": false, "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true }, "type-check": { "version": "0.3.2", - "resolved": false, "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { @@ -3270,19 +6886,16 @@ }, "type-detect": { "version": "4.0.8", - "resolved": false, "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, "type-fest": { "version": "0.8.1", - "resolved": false, "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, "typedarray-to-buffer": { "version": "3.1.5", - "resolved": false, "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, "requires": { @@ -3291,13 +6904,11 @@ }, "typescript": { "version": "4.8.4", - "resolved": false, "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true }, "update-browserslist-db": { "version": "1.0.10", - "resolved": false, "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", "dev": true, "requires": { @@ -3307,7 +6918,6 @@ }, "uri-js": { "version": "4.4.1", - "resolved": false, "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { @@ -3316,13 +6926,11 @@ }, "uuid": { "version": "8.3.2", - "resolved": false, "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, "verror": { "version": "1.10.0", - "resolved": false, "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "requires": { @@ -3333,7 +6941,6 @@ "dependencies": { "core-util-is": { "version": "1.0.2", - "resolved": false, "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true } @@ -3341,7 +6948,6 @@ }, "w3c-hr-time": { "version": "1.0.2", - "resolved": false, "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, "requires": { @@ -3350,7 +6956,6 @@ }, "watchpack": { "version": "2.4.0", - "resolved": false, "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "requires": { @@ -3360,13 +6965,11 @@ }, "webidl-conversions": { "version": "4.0.2", - "resolved": false, "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", "dev": true }, "webpack": { "version": "5.74.0", - "resolved": false, "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", "dev": true, "requires": { @@ -3398,13 +7001,11 @@ "dependencies": { "acorn": { "version": "8.8.0", - "resolved": false, "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true }, "acorn-import-assertions": { "version": "1.8.0", - "resolved": false, "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", "dev": true } @@ -3412,7 +7013,6 @@ }, "webpack-cli": { "version": "4.10.0", - "resolved": false, "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, "requires": { @@ -3432,7 +7032,6 @@ "dependencies": { "commander": { "version": "7.2.0", - "resolved": false, "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true } @@ -3440,7 +7039,6 @@ }, "webpack-merge": { "version": "5.8.0", - "resolved": false, "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", "dev": true, "requires": { @@ -3450,19 +7048,16 @@ }, "webpack-plugin-replace": { "version": "1.2.0", - "resolved": false, "integrity": "sha512-1HA3etHpJW55qonJqv84o5w5GY7iqF8fqSHpTWdNwarj1llkkt4jT4QSvYs1hoaU8Lu5akDnq/spHHO5mXwo1w==", "dev": true }, "webpack-sources": { "version": "3.2.3", - "resolved": false, "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true }, "whatwg-encoding": { "version": "1.0.5", - "resolved": false, "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", "dev": true, "requires": { @@ -3471,13 +7066,11 @@ }, "whatwg-mimetype": { "version": "2.3.0", - "resolved": false, "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", "dev": true }, "whatwg-url": { "version": "6.5.0", - "resolved": false, "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", "dev": true, "requires": { @@ -3488,7 +7081,6 @@ }, "which": { "version": "2.0.2", - "resolved": false, "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { @@ -3497,31 +7089,26 @@ }, "which-module": { "version": "2.0.0", - "resolved": false, "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "wildcard": { "version": "2.0.0", - "resolved": false, "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", "dev": true }, "word-wrap": { "version": "1.2.3", - "resolved": false, "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "workerpool": { "version": "6.2.0", - "resolved": false, "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", "dev": true }, "wrap-ansi": { "version": "7.0.0", - "resolved": false, "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { @@ -3532,13 +7119,11 @@ }, "wrappy": { "version": "1.0.2", - "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "write-file-atomic": { "version": "3.0.3", - "resolved": false, "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { @@ -3550,7 +7135,6 @@ }, "ws": { "version": "5.2.3", - "resolved": false, "integrity": "sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==", "dev": true, "requires": { @@ -3559,19 +7143,16 @@ }, "xml-name-validator": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, "y18n": { "version": "5.0.8", - "resolved": false, "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yargs": { "version": "16.2.0", - "resolved": false, "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { @@ -3586,13 +7167,11 @@ }, "yargs-parser": { "version": "20.2.4", - "resolved": false, "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true }, "yargs-unparser": { "version": "2.0.0", - "resolved": false, "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { @@ -3604,13 +7183,11 @@ "dependencies": { "camelcase": { "version": "6.3.0", - "resolved": false, "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, "decamelize": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true } @@ -3618,7 +7195,6 @@ }, "yocto-queue": { "version": "0.1.0", - "resolved": false, "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true } diff --git a/package.json b/package.json index dcc9228a..21b900f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amazon-connect-streams", - "version": "2.4.4", + "version": "2.4.5", "description": "Amazon Connect Streams Library", "engines": { "node": ">=12.0.0" @@ -49,8 +49,5 @@ "webpack": "^5.64.4", "webpack-cli": "^4.9.1", "webpack-plugin-replace": "^1.2.0" - }, - "dependencies": { - "lodash.clonedeep": "^4.5.0" } } diff --git a/release/connect-streams-min.js b/release/connect-streams-min.js index bbdf28d4..396b2b06 100644 --- a/release/connect-streams-min.js +++ b/release/connect-streams-min.js @@ -1 +1 @@ -(()=>{var e={465:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Boolean]",a="[object Date]",c="[object Function]",u="[object GeneratorFunction]",l="[object Map]",p="[object Number]",d="[object Object]",h="[object Promise]",f="[object RegExp]",g="[object Set]",m="[object String]",v="[object Symbol]",y="[object WeakMap]",E="[object ArrayBuffer]",S="[object DataView]",b="[object Float32Array]",T="[object Float64Array]",C="[object Int8Array]",I="[object Int16Array]",_="[object Int32Array]",A="[object Uint8Array]",w="[object Uint8ClampedArray]",R="[object Uint16Array]",k="[object Uint32Array]",N=/\w*$/,O=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,D={};D[i]=D["[object Array]"]=D[E]=D[S]=D[s]=D[a]=D[b]=D[T]=D[C]=D[I]=D[_]=D[l]=D[p]=D[d]=D[f]=D[g]=D[m]=D[v]=D[A]=D[w]=D[R]=D[k]=!0,D["[object Error]"]=D[c]=D[y]=!1;var P="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,x="object"==typeof self&&self&&self.Object===Object&&self,M=P||x||Function("return this")(),U=t&&!t.nodeType&&t,F=U&&e&&!e.nodeType&&e,q=F&&F.exports===U;function j(e,t){return e.set(t[0],t[1]),e}function B(e,t){return e.add(t),e}function V(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o-1},we.prototype.set=function(e,t){var n=this.__data__,r=Le(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Re.prototype.clear=function(){this.__data__={hash:new Ae,map:new(fe||we),string:new Ae}},Re.prototype.delete=function(e){return Ue(this,e).delete(e)},Re.prototype.get=function(e){return Ue(this,e).get(e)},Re.prototype.has=function(e){return Ue(this,e).has(e)},Re.prototype.set=function(e,t){return Ue(this,e).set(e,t),this},ke.prototype.clear=function(){this.__data__=new we},ke.prototype.delete=function(e){return this.__data__.delete(e)},ke.prototype.get=function(e){return this.__data__.get(e)},ke.prototype.has=function(e){return this.__data__.has(e)},ke.prototype.set=function(e,t){var n=this.__data__;if(n instanceof we){var r=n.__data__;if(!fe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Re(r)}return n.set(e,t),this};var qe=le?z(le,Object):function(){return[]},je=function(e){return te.call(e)};function Be(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||L.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=o}(e.length)&&!Xe(e)}var Ke=pe||function(){return!1};function Xe(e){var t=Ye(e)?te.call(e):"";return t==c||t==u}function Ye(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Je(e){return Ge(e)?Ne(e):function(e){if(!Ve(e))return de(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return De(e,!0,!0)}},821:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,t.agentApp={};var n="ccp";t.agentApp.initCCP=t.core.initCCP,t.agentApp.isInitialized=function(e){},t.agentApp.initAppCommunication=function(e,n){var r=document.getElementById(e),o=new t.IFrameConduit(n,window,r),i=[t.AgentEvents.UPDATE,t.ContactEvents.VIEW,t.EventType.ACKNOWLEDGE,t.EventType.TERMINATED,t.TaskEvents.CREATED];r.addEventListener("load",(function(e){i.forEach((function(e){t.core.getUpstream().onUpstream(e,(function(t){o.sendUpstream(e,t)}))}))}))};var r=function(e){var t=e.indexOf("ccp-v2");return e.slice(0,t-1)};t.agentApp.initApp=function(e,o,i,s){s=s||{};var a=i.endsWith("/")?i:i+"/",c=s.onLoad?s.onLoad:null,u={endpoint:a,style:s.style,onLoad:c};t.agentApp.AppRegistry.register(e,u,document.getElementById(o)),t.agentApp.AppRegistry.start(e,(function(o){var i=o.endpoint,a=o.containerDOM;return{init:function(){return e===n?(s.ccpParams=s.ccpParams?s.ccpParams:{},s.style&&(s.ccpParams.style=s.style),function(e,n,o){var i={ccpUrl:e,ccpLoadTimeout:1e4,loginPopup:!0,loginUrl:r(e)+"/login",softphone:{allowFramedSoftphone:!0,disableRingtone:!1}},s=t.merge(i,o.ccpParams);t.core.initCCP(n,s)}(i,a,s)):t.agentApp.initAppCommunication(e,i)},destroy:function(){return e===n?(o=r(i)+"/logout",t.fetch(o,{credentials:"include"}).then((function(){return t.core.getEventBus().trigger(t.EventType.TERMINATE),!0})).catch((function(e){return t.getLog().error("An error occured on logout."+e).withException(e),window.location.href=o,!1}))):null;var o}}}))},t.agentApp.stopApp=function(e){return t.agentApp.AppRegistry.stop(e)}}()},500:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t;var n,r="ccp";e.connect.agentApp.AppRegistry=(n={},{register:function(e,t,r){n[e]={containerDOM:r,endpoint:t.endpoint,style:t.style,instance:void 0,onLoad:t.onLoad}},start:function(e,t){if(n[e]){var o=n[e].containerDOM,i=n[e].endpoint,s=n[e].style,a=n[e].onLoad;if(e!==r){var c=function(e,t,n,r){var o=document.createElement("iframe");return o.src=t,o.style=n||"width: 100%; height:100%;",o.id=e,o["aria-label"]=e,o.onload=r,o.setAttribute("sandbox","allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"),o}(e,i,s,a);o.appendChild(c)}return n[e].instance=t(n[e]),n[e].instance.init()}},stop:function(e){if(n[e]){var t,r=n[e],o=r.containerDOM.querySelector("iframe");return r.containerDOM.removeChild(o),r.instance&&(t=r.instance.destroy(),delete r.instance),t}}})}()},965:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,t.AgentStateType=t.makeEnum(["init","routable","not_routable","offline"]),t.AgentStatusType=t.AgentStateType,t.AgentAvailStates=t.makeEnum(["Init","Busy","AfterCallWork","CallingCustomer","Dialing","Joining","PendingAvailable","PendingBusy"]),t.AgentErrorStates=t.makeEnum(["Error","AgentHungUp","BadAddressAgent","BadAddressCustomer","Default","FailedConnectAgent","FailedConnectCustomer","InvalidLocale","LineEngagedAgent","LineEngagedCustomer","MissedCallAgent","MissedCallCustomer","MultipleCcpWindows","RealtimeCommunicationError"]),t.EndpointType=t.makeEnum(["phone_number","agent","queue"]),t.AddressType=t.EndpointType,t.ConnectionType=t.makeEnum(["agent","inbound","outbound","monitoring"]),t.ConnectionStateType=t.makeEnum(["init","connecting","connected","hold","disconnected","silent_monitor","barge"]),t.ConnectionStatusType=t.ConnectionStateType,t.CONNECTION_ACTIVE_STATES=t.set([t.ConnectionStateType.CONNECTING,t.ConnectionStateType.CONNECTED,t.ConnectionStateType.HOLD,t.ConnectionStateType.SILENT_MONITOR,t.ConnectionStateType.BARGE]),t.CONNECTION_CONNECTED_STATES=t.set([t.ConnectionStateType.CONNECTED,t.ConnectionStateType.SILENT_MONITOR,t.ConnectionStateType.BARGE]),t.ContactStateType=t.makeEnum(["init","incoming","pending","connecting","connected","missed","error","ended"]),t.ContactStatusType=t.ContactStateType,t.CONTACT_ACTIVE_STATES=t.makeEnum(["incoming","pending","connecting","connected"]),t.ContactType=t.makeEnum(["voice","queue_callback","chat","task"]),t.ContactInitiationMethod=t.makeEnum(["inbound","outbound","transfer","queue_transfer","callback","api","disconnect"]),t.MonitoringMode=t.makeEnum(["SILENT_MONITOR","BARGE"]),t.MonitoringErrorTypes=t.makeEnum(["invalid_target_state"]),t.ChannelType=t.makeEnum(["VOICE","CHAT","TASK"]),t.MediaType=t.makeEnum(["softphone","chat","task"]),t.SoftphoneCallType=t.makeEnum(["audio_video","video_only","audio_only","none"]),t.SoftphoneErrorTypes=t.makeEnum(["unsupported_browser","microphone_not_shared","signalling_handshake_failure","signalling_connection_failure","ice_collection_timeout","user_busy_error","webrtc_error","realtime_communication_error","other"]),t.ClickType=t.makeEnum(["Accept","Reject","Hangup"]),t.VoiceIdErrorTypes=t.makeEnum(["no_speaker_id_found","speaker_id_not_enrolled","get_speaker_id_failed","get_speaker_status_failed","opt_out_speaker_failed","opt_out_speaker_in_lcms_failed","delete_speaker_failed","start_session_failed","evaluate_speaker_failed","session_not_exists","describe_session_failed","enroll_speaker_failed","update_speaker_id_failed","update_speaker_id_in_lcms_failed","not_supported_on_conference_calls","enroll_speaker_timeout","evaluate_speaker_timeout","get_domain_id_failed","no_domain_id_found"]),t.CTIExceptions=t.makeEnum(["AccessDeniedException","InvalidStateException","BadEndpointException","InvalidAgentARNException","InvalidConfigurationException","InvalidContactTypeException","PaginationException","RefreshTokenExpiredException","SendDataFailedException","UnauthorizedException","QuotaExceededException"]),t.VoiceIdStreamingStatus=t.makeEnum(["ONGOING","ENDED","PENDING_CONFIGURATION"]),t.VoiceIdAuthenticationDecision=t.makeEnum(["ACCEPT","REJECT","NOT_ENOUGH_SPEECH","SPEAKER_NOT_ENROLLED","SPEAKER_OPTED_OUT","SPEAKER_ID_NOT_PROVIDED","SPEAKER_EXPIRED"]),t.VoiceIdFraudDetectionDecision=t.makeEnum(["NOT_ENOUGH_SPEECH","HIGH_RISK","LOW_RISK"]),t.ContactFlowAuthenticationDecision=t.makeEnum(["Authenticated","NotAuthenticated","Inconclusive","NotEnrolled","OptedOut","NotEnabled","Error"]),t.ContactFlowFraudDetectionDecision=t.makeEnum(["HighRisk","LowRisk","Inconclusive","NotEnabled","Error"]),t.VoiceIdEnrollmentRequestStatus=t.makeEnum(["NOT_ENOUGH_SPEECH","IN_PROGRESS","COMPLETED","FAILED"]),t.VoiceIdSpeakerStatus=t.makeEnum(["OPTED_OUT","ENROLLED","PENDING"]),t.VoiceIdConstants={EVALUATE_SESSION_DELAY:1e4,EVALUATION_MAX_POLL_TIMES:24,EVALUATION_POLLING_INTERVAL:5e3,ENROLLMENT_MAX_POLL_TIMES:120,ENROLLMENT_POLLING_INTERVAL:5e3,START_SESSION_DELAY:8e3},t.AgentPermissions={OUTBOUND_CALL:"outboundCall",VOICE_ID:"voiceId"};var n=function(){if(!t.agent.initialized)throw new t.StateError("The agent is not yet initialized!")};n.prototype._getData=function(){return t.core.getAgentDataProvider().getAgentData()},n.prototype._createContactAPI=function(e){return new t.Contact(e.contactId)},n.prototype.onRefresh=function(e){t.core.getEventBus().subscribe(t.AgentEvents.REFRESH,e)},n.prototype.onRoutable=function(e){t.core.getEventBus().subscribe(t.AgentEvents.ROUTABLE,e)},n.prototype.onNotRoutable=function(e){t.core.getEventBus().subscribe(t.AgentEvents.NOT_ROUTABLE,e)},n.prototype.onOffline=function(e){t.core.getEventBus().subscribe(t.AgentEvents.OFFLINE,e)},n.prototype.onError=function(e){t.core.getEventBus().subscribe(t.AgentEvents.ERROR,e)},n.prototype.onSoftphoneError=function(e){t.core.getEventBus().subscribe(t.AgentEvents.SOFTPHONE_ERROR,e)},n.prototype.onWebSocketConnectionLost=function(e){t.core.getEventBus().subscribe(t.AgentEvents.WEBSOCKET_CONNECTION_LOST,e)},n.prototype.onWebSocketConnectionGained=function(e){t.core.getEventBus().subscribe(t.AgentEvents.WEBSOCKET_CONNECTION_GAINED,e)},n.prototype.onAfterCallWork=function(e){t.core.getEventBus().subscribe(t.AgentEvents.ACW,e)},n.prototype.onStateChange=function(e){t.core.getEventBus().subscribe(t.AgentEvents.STATE_CHANGE,e)},n.prototype.onMuteToggle=function(e){t.core.getUpstream().onUpstream(t.AgentEvents.MUTE_TOGGLE,e)},n.prototype.onLocalMediaStreamCreated=function(e){t.core.getUpstream().onUpstream(t.AgentEvents.LOCAL_MEDIA_STREAM_CREATED,e)},n.prototype.onSpeakerDeviceChanged=function(e){t.core.getUpstream().onUpstream(t.ConfigurationEvents.SPEAKER_DEVICE_CHANGED,e)},n.prototype.onMicrophoneDeviceChanged=function(e){t.core.getUpstream().onUpstream(t.ConfigurationEvents.MICROPHONE_DEVICE_CHANGED,e)},n.prototype.onRingerDeviceChanged=function(e){t.core.getUpstream().onUpstream(t.ConfigurationEvents.RINGER_DEVICE_CHANGED,e)},n.prototype.mute=function(){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.MUTE,data:{mute:!0}})},n.prototype.unmute=function(){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.MUTE,data:{mute:!1}})},n.prototype.setSpeakerDevice=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.SET_SPEAKER_DEVICE,data:{deviceId:e}})},n.prototype.setMicrophoneDevice=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.SET_MICROPHONE_DEVICE,data:{deviceId:e}})},n.prototype.setRingerDevice=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.SET_RINGER_DEVICE,data:{deviceId:e}})},n.prototype.getState=function(){return this._getData().snapshot.state},n.prototype.getNextState=function(){return this._getData().snapshot.nextState},n.prototype.getAvailabilityState=function(){return this._getData().snapshot.agentAvailabilityState},n.prototype.getStatus=n.prototype.getState,n.prototype.getStateDuration=function(){return t.now()-this._getData().snapshot.state.startTimestamp.getTime()+t.core.getSkew()},n.prototype.getStatusDuration=n.prototype.getStateDuration,n.prototype.getPermissions=function(){return this.getConfiguration().permissions},n.prototype.getContacts=function(e){var t=this;return this._getData().snapshot.contacts.map((function(e){return t._createContactAPI(e)})).filter((function(t){return!e||t.getType()===e}))},n.prototype.getConfiguration=function(){return this._getData().configuration},n.prototype.getAgentStates=function(){return this.getConfiguration().agentStates},n.prototype.getRoutingProfile=function(){return this.getConfiguration().routingProfile},n.prototype.getChannelConcurrency=function(e){var n=this.getRoutingProfile().channelConcurrencyMap;return n||(n=Object.keys(t.ChannelType).reduce((function(e,n){return"TASK"!==n&&(e[t.ChannelType[n]]=1),e}),{})),e?n[e]||0:n},n.prototype.getName=function(){return this.getConfiguration().name},n.prototype.getExtension=function(){return this.getConfiguration().extension},n.prototype.getDialableCountries=function(){return this.getConfiguration().dialableCountries},n.prototype.isSoftphoneEnabled=function(){return this.getConfiguration().softphoneEnabled},n.prototype.setConfiguration=function(e,n){var r=t.core.getClient();e&&e.agentPreferences&&e.agentPreferences.LANGUAGE&&!e.agentPreferences.locale&&(e.agentPreferences.locale=e.agentPreferences.LANGUAGE),e&&e.agentPreferences&&!t.isValidLocale(e.agentPreferences.locale)?n&&n.failure&&n.failure(t.AgentErrorStates.INVALID_LOCALE):r.call(t.ClientMethods.UPDATE_AGENT_CONFIGURATION,{configuration:t.assertNotNull(e,"configuration")},{success:function(e){t.core.getUpstream().sendUpstream(t.EventType.RELOAD_AGENT_CONFIGURATION),n.success&&n.success(e)},failure:n&&n.failure})},n.prototype.setState=function(e,n,r){t.core.getClient().call(t.ClientMethods.PUT_AGENT_STATE,{state:t.assertNotNull(e,"state"),enqueueNextState:r&&!!r.enqueueNextState},n)},n.prototype.onEnqueuedNextState=function(e){t.core.getEventBus().subscribe(t.AgentEvents.ENQUEUED_NEXT_STATE,e)},n.prototype.setStatus=n.prototype.setState,n.prototype.connect=function(e,n){var r=t.core.getClient(),o=new t.Endpoint(e);delete o.endpointId,r.call(t.ClientMethods.CREATE_OUTBOUND_CONTACT,{endpoint:t.assertNotNull(o,"endpoint"),queueARN:n&&(n.queueARN||n.queueId)||this.getRoutingProfile().defaultOutboundQueue.queueARN},n&&{success:n.success,failure:n.failure})},n.prototype.getAllQueueARNs=function(){return this.getConfiguration().routingProfile.queues.map((function(e){return e.queueARN}))},n.prototype.getEndpoints=function(e,n,r){var o=this,i=t.core.getClient();t.assertNotNull(n,"callbacks"),t.assertNotNull(n.success,"callbacks.success");var s=r||{};s.endpoints=s.endpoints||[],s.maxResults=s.maxResults||t.DEFAULT_BATCH_SIZE,t.isArray(e)||(e=[e]),i.call(t.ClientMethods.GET_ENDPOINTS,{queueARNs:e,nextToken:s.nextToken||null,maxResults:s.maxResults},{success:function(r){if(r.nextToken)o.getEndpoints(e,n,{nextToken:r.nextToken,maxResults:s.maxResults,endpoints:s.endpoints.concat(r.endpoints)});else{s.endpoints=s.endpoints.concat(r.endpoints);var i=s.endpoints.map((function(e){return new t.Endpoint(e)}));n.success({endpoints:i,addresses:i})}},failure:n.failure})},n.prototype.getAddresses=n.prototype.getEndpoints,n.prototype._getResourceId=function(){var e=this.getAllQueueARNs();for(let t of e){const e=t.match(/\/agent\/([^/]+)/);if(e)return e[1]}return new Error("Agent.prototype._getResourceId: queueArns did not contain agentResourceId: ",e)},n.prototype.toSnapshot=function(){return new t.AgentSnapshot(this._getData())};var r=function(e){t.Agent.call(this),this.agentData=e};(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype._getData=function(){return this.agentData},r.prototype._createContactAPI=function(e){return new t.ContactSnapshot(e)};var o=function(e){this.contactId=e};o.prototype._getData=function(){return t.core.getAgentDataProvider().getContactData(this.getContactId())},o.prototype._createConnectionAPI=function(e){return this.getType()===t.ContactType.CHAT?new t.ChatConnection(this.contactId,e.connectionId):this.getType()===t.ContactType.TASK?new t.TaskConnection(this.contactId,e.connectionId):new t.VoiceConnection(this.contactId,e.connectionId)},o.prototype.getEventName=function(e){return t.core.getContactEventName(e,this.getContactId())},o.prototype.onRefresh=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.REFRESH),e)},o.prototype.onIncoming=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.INCOMING),e)},o.prototype.onConnecting=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.CONNECTING),e)},o.prototype.onPending=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.PENDING),e)},o.prototype.onAccepted=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.ACCEPTED),e)},o.prototype.onMissed=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.MISSED),e)},o.prototype.onEnded=function(e){var n=t.core.getEventBus();n.subscribe(this.getEventName(t.ContactEvents.ENDED),e),n.subscribe(this.getEventName(t.ContactEvents.DESTROYED),e)},o.prototype.onDestroy=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.DESTROYED),e)},o.prototype.onACW=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.ACW),e)},o.prototype.onConnected=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.CONNECTED),e)},o.prototype.onError=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.ERROR),e)},o.prototype.getContactId=function(){return this.contactId},o.prototype.getOriginalContactId=function(){return this._getData().initialContactId},o.prototype.getInitialContactId=o.prototype.getOriginalContactId,o.prototype.getType=function(){return this._getData().type},o.prototype.getContactDuration=function(){return this._getData().contactDuration},o.prototype.getState=function(){return this._getData().state},o.prototype.getStatus=o.prototype.getState,o.prototype.getStateDuration=function(){return t.now()-this._getData().state.timestamp.getTime()+t.core.getSkew()},o.prototype.getStatusDuration=o.prototype.getStateDuration,o.prototype.getQueue=function(){return this._getData().queue},o.prototype.getQueueTimestamp=function(){return this._getData().queueTimestamp},o.prototype.getConnections=function(){var e=this;return this._getData().connections.map((function(n){return e.getType()===t.ContactType.CHAT?new t.ChatConnection(e.contactId,n.connectionId):e.getType()===t.ContactType.TASK?new t.TaskConnection(e.contactId,n.connectionId):new t.VoiceConnection(e.contactId,n.connectionId)}))},o.prototype.getInitialConnection=function(){return t.find(this.getConnections(),(function(e){return e.isInitialConnection()}))||null},o.prototype.getActiveInitialConnection=function(){var e=this.getInitialConnection();return null!=e&&e.isActive()?e:null},o.prototype.getThirdPartyConnections=function(){return this.getConnections().filter((function(e){return!e.isInitialConnection()&&e.getType()!==t.ConnectionType.AGENT}))},o.prototype.getSingleActiveThirdPartyConnection=function(){return this.getThirdPartyConnections().filter((function(e){return e.isActive()}))[0]||null},o.prototype.getAgentConnection=function(){return t.find(this.getConnections(),(function(e){var n=e.getType();return n===t.ConnectionType.AGENT||n===t.ConnectionType.MONITORING}))},o.prototype.getName=function(){return this._getData().name},o.prototype.getContactMetadata=function(){return this._getData().contactMetadata},o.prototype.getDescription=function(){return this._getData().description},o.prototype.getReferences=function(){return this._getData().references},o.prototype.getAttributes=function(){return this._getData().attributes},o.prototype.getContactFeatures=function(){return this._getData().contactFeatures},o.prototype.getChannelContext=function(){return this._getData().channelContext},o.prototype.isSoftphoneCall=function(){return null!=t.find(this.getConnections(),(function(e){return null!=e.getSoftphoneMediaInfo()}))},o.prototype._isInbound=function(){return this._getData().initiationMethod!==t.ContactInitiationMethod.OUTBOUND},o.prototype.isInbound=function(){var e=this.getInitialConnection();return e.getMediaType()===t.MediaType.TASK?this._isInbound():!!e&&e.getType()===t.ConnectionType.INBOUND},o.prototype.isConnected=function(){return this.getStatus().type===t.ContactStateType.CONNECTED},o.prototype.accept=function(e){var n=t.core.getClient(),r=this,o=this.getContactId();t.publishClickStreamData({contactId:this.getContactId(),clickType:t.ClickType.ACCEPT,clickTime:(new Date).toISOString()}),n.call(t.ClientMethods.ACCEPT_CONTACT,{contactId:o},{success:function(n){var i=t.core.getUpstream();i.sendUpstream(t.EventType.BROADCAST,{event:t.ContactEvents.ACCEPTED,data:new t.Contact(o)}),i.sendUpstream(t.EventType.BROADCAST,{event:t.core.getContactEventName(t.ContactEvents.ACCEPTED,r.getContactId()),data:new t.Contact(o)});var s=new t.Contact(o);t.isFirefoxBrowser()&&s.isSoftphoneCall()&&t.core.triggerReadyToStartSessionEvent(),e&&e.success&&e.success(n)},failure:e?e.failure:null})},o.prototype.destroy=function(){t.getLog().warn("contact.destroy() has been deprecated.")},o.prototype.reject=function(e){var n=t.core.getClient();t.publishClickStreamData({contactId:this.getContactId(),clickType:t.ClickType.REJECT,clickTime:(new Date).toISOString()}),n.call(t.ClientMethods.REJECT_CONTACT,{contactId:this.getContactId()},e)},o.prototype.complete=function(e){t.core.getClient().call(t.ClientMethods.COMPLETE_CONTACT,{contactId:this.getContactId()},e)},o.prototype.clear=function(e){t.core.getClient().call(t.ClientMethods.CLEAR_CONTACT,{contactId:this.getContactId()},e)},o.prototype.notifyIssue=function(e,n,r){t.core.getClient().call(t.ClientMethods.NOTIFY_CONTACT_ISSUE,{contactId:this.getContactId(),issueCode:e,description:n},r)},o.prototype.addConnection=function(e,n){var r=t.core.getClient(),o=new t.Endpoint(e);delete o.endpointId,r.call(t.ClientMethods.CREATE_ADDITIONAL_CONNECTION,{contactId:this.getContactId(),endpoint:o},n)},o.prototype.toggleActiveConnections=function(e){var n=t.core.getClient(),r=null,o=t.find(this.getConnections(),(function(e){return e.getStatus().type===t.ConnectionStateType.HOLD}));if(null!=o)r=o.getConnectionId();else{var i=this.getConnections().filter((function(e){return e.isActive()}));i.length>0&&(r=i[0].getConnectionId())}n.call(t.ClientMethods.TOGGLE_ACTIVE_CONNECTIONS,{contactId:this.getContactId(),connectionId:r},e)},o.prototype.sendSoftphoneMetrics=function(n,r){t.core.getClient().call(t.ClientMethods.SEND_SOFTPHONE_CALL_METRICS,{contactId:this.getContactId(),ccpVersion:e.ccpVersion,softphoneStreamStatistics:n},r),t.publishSoftphoneStats({contactId:this.getContactId(),ccpVersion:e.ccpVersion,stats:n})},o.prototype.sendSoftphoneReport=function(n,r){t.core.getClient().call(t.ClientMethods.SEND_SOFTPHONE_CALL_REPORT,{contactId:this.getContactId(),ccpVersion:e.ccpVersion,report:n},r),t.publishSoftphoneReport({contactId:this.getContactId(),ccpVersion:e.ccpVersion,report:n})},o.prototype.conferenceConnections=function(e){t.core.getClient().call(t.ClientMethods.CONFERENCE_CONNECTIONS,{contactId:this.getContactId()},e)},o.prototype.toSnapshot=function(){return new t.ContactSnapshot(this._getData())},o.prototype.isMultiPartyConferenceEnabled=function(){var e=this.getContactFeatures();return!(!e||!e.multiPartyConferenceEnabled)},o.prototype.updateMonitorParticipantState=function(e,n){e&&Object.values(t.MonitoringMode).includes(e.toUpperCase())?t.core.getClient().call(t.ClientMethods.UPDATE_MONITOR_PARTICIPANT_STATE,{contactId:this.getContactId(),targetMonitorMode:e.toUpperCase()},n):(t.getLog().error(`Invalid target state was provided: ${e}`).sendInternalLogToServer(),n&&n.failure&&n.failure(t.MonitoringErrorTypes.INVALID_TARGET_STATE))},o.prototype.isUnderSupervision=function(){var e=this.getConnections().filter((e=>e.getType()!==t.ConnectionType.AGENT));return void 0!==(e&&e.find((e=>e.isBarge()&&e.isActive())))};var i=function(e){t.Contact.call(this,e.contactId),this.contactData=e};(i.prototype=Object.create(o.prototype)).constructor=i,i.prototype._getData=function(){return this.contactData},i.prototype._createConnectionAPI=function(e){return new t.ConnectionSnapshot(e)};var s=function(e,t){this.contactId=e,this.connectionId=t,this._initMediaController()};s.prototype._getData=function(){return t.core.getAgentDataProvider().getConnectionData(this.getContactId(),this.getConnectionId())},s.prototype.getContactId=function(){return this.contactId},s.prototype.getConnectionId=function(){return this.connectionId},s.prototype.getEndpoint=function(){return new t.Endpoint(this._getData().endpoint)},s.prototype.getAddress=s.prototype.getEndpoint,s.prototype.getState=function(){return this._getData().state},s.prototype.getStatus=s.prototype.getState,s.prototype.getStateDuration=function(){return t.now()-this._getData().state.timestamp.getTime()+t.core.getSkew()},s.prototype.getStatusDuration=s.prototype.getStateDuration,s.prototype.getType=function(){return this._getData().type},s.prototype.isInitialConnection=function(){return this._getData().initial},s.prototype.isActive=function(){return t.contains(t.CONNECTION_ACTIVE_STATES,this.getStatus().type)},s.prototype.isConnected=function(){return t.contains(t.CONNECTION_CONNECTED_STATES,this.getStatus().type)},s.prototype.isConnecting=function(){return this.getStatus().type===t.ConnectionStateType.CONNECTING},s.prototype.isOnHold=function(){return this.getStatus().type===t.ConnectionStateType.HOLD},s.prototype.getSoftphoneMediaInfo=function(){return this._getData().softphoneMediaInfo},s.prototype.getMonitorInfo=function(){return this._getData().monitoringInfo},s.prototype.destroy=function(e){t.publishClickStreamData({contactId:this.getContactId(),clickType:t.ClickType.HANGUP,clickTime:(new Date).toISOString()}),t.core.getClient().call(t.ClientMethods.DESTROY_CONNECTION,{contactId:this.getContactId(),connectionId:this.getConnectionId()},e)},s.prototype.sendDigits=function(e,n){t.core.getClient().call(t.ClientMethods.SEND_DIGITS,{contactId:this.getContactId(),connectionId:this.getConnectionId(),digits:e},n)},s.prototype.hold=function(e){t.core.getClient().call(t.ClientMethods.HOLD_CONNECTION,{contactId:this.getContactId(),connectionId:this.getConnectionId()},e)},s.prototype.resume=function(e){t.core.getClient().call(t.ClientMethods.RESUME_CONNECTION,{contactId:this.getContactId(),connectionId:this.getConnectionId()},e)},s.prototype.toSnapshot=function(){return new t.ConnectionSnapshot(this._getData())},s.prototype._initMediaController=function(){this.getMediaInfo()&&t.core.mediaFactory.get(this).catch((function(){}))},s.prototype._isAgentConnectionType=function(){var e=this.getType();return e===t.ConnectionType.AGENT||e===t.ConnectionType.MONITORING},s.prototype._isAgentConnectionType=function(){var e=this.getType();return e===t.ConnectionType.AGENT||e===t.ConnectionType.MONITORING};var a=function(e){this.contactId=e};a.prototype.getSpeakerId=function(){var e=this;e.checkConferenceCall();var n=t.core.getClient();return new Promise((function(r,o){const i={contactId:e.contactId,instanceId:t.core.getAgentDataProvider().getInstanceId(),awsAccountId:t.core.getAgentDataProvider().getAWSAccountId()};t.getLog().info("getSpeakerId called").withObject(i).sendInternalLogToServer(),n.call(t.AgentAppClientMethods.GET_CONTACT,i,{success:function(e){if(e.contactData.customerId){var n={speakerId:e.contactData.customerId};t.getLog().info("getSpeakerId succeeded").withObject(e).sendInternalLogToServer(),r(n)}else{var i=t.VoiceIdError(t.VoiceIdErrorTypes.NO_SPEAKER_ID_FOUND,"No speakerId assotiated with this call");o(i)}},failure:function(e){t.getLog().error("Get SpeakerId failed").withObject({err:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.GET_SPEAKER_ID_FAILED,"Get SpeakerId failed",e);o(n)}})}))},a.prototype.getSpeakerStatus=function(){var e=this;e.checkConferenceCall();var n=t.core.getClient();return new Promise((function(r,o){e.getSpeakerId().then((function(i){e.getDomainId().then((function(e){const s={SpeakerId:t.assertNotNull(i.speakerId,"speakerId"),DomainId:e};t.getLog().info("getSpeakerStatus called").withObject(s).sendInternalLogToServer(),n.call(t.AgentAppClientMethods.DESCRIBE_SPEAKER,s,{success:function(e){t.getLog().info("getSpeakerStatus succeeded").withObject(e).sendInternalLogToServer(),r(e)},failure:function(e){var n=JSON.parse(e);switch(n.status){case 400:case 404:var i=n;i.type=i.type?i.type:t.VoiceIdErrorTypes.SPEAKER_ID_NOT_ENROLLED,t.getLog().info("Speaker is not enrolled.").sendInternalLogToServer(),r(i);break;default:t.getLog().error("getSpeakerStatus failed").withObject({err:e}).sendInternalLogToServer();var s=t.VoiceIdError(t.VoiceIdErrorTypes.GET_SPEAKER_STATUS_FAILED,"Get SpeakerStatus failed",e);o(s)}}})})).catch((function(e){o(e)}))})).catch((function(e){o(e)}))}))},a.prototype._optOutSpeakerInLcms=function(e,n){var r=this,o=t.core.getClient();return new Promise((function(i,s){const a={ContactId:r.contactId,InstanceId:t.core.getAgentDataProvider().getInstanceId(),AWSAccountId:t.core.getAgentDataProvider().getAWSAccountId(),CustomerId:t.assertNotNull(e,"speakerId"),VoiceIdResult:{SpeakerOptedOut:!0,generatedSpeakerId:n}};t.getLog().info("_optOutSpeakerInLcms called").withObject(a).sendInternalLogToServer(),o.call(t.AgentAppClientMethods.UPDATE_VOICE_ID_DATA,a,{success:function(e){t.getLog().info("optOutSpeakerInLcms succeeded").withObject(e).sendInternalLogToServer(),i(e)},failure:function(e){t.getLog().error("optOutSpeakerInLcms failed").withObject({err:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.OPT_OUT_SPEAKER_IN_LCMS_FAILED,"optOutSpeakerInLcms failed",e);s(n)}})}))},a.prototype.optOutSpeaker=function(){var e=this;e.checkConferenceCall();var n=t.core.getClient();return new Promise((function(r,o){e.getSpeakerId().then((function(i){e.getDomainId().then((function(s){var a=i.speakerId;const c={SpeakerId:t.assertNotNull(a,"speakerId"),DomainId:s};t.getLog().info("optOutSpeaker called").withObject(c).sendInternalLogToServer(),n.call(t.AgentAppClientMethods.OPT_OUT_SPEAKER,c,{success:function(n){e._optOutSpeakerInLcms(a,n.generatedSpeakerId).catch((function(){})),t.getLog().info("optOutSpeaker succeeded").withObject(n).sendInternalLogToServer(),r(n)},failure:function(e){t.getLog().error("optOutSpeaker failed").withObject({err:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.OPT_OUT_SPEAKER_FAILED,"optOutSpeaker failed.",e);o(n)}})})).catch((function(e){o(e)}))})).catch((function(e){o(e)}))}))},a.prototype.deleteSpeaker=function(){var e=this;e.checkConferenceCall();var n=t.core.getClient();return new Promise((function(r,o){e.getSpeakerId().then((function(i){e.getDomainId().then((function(e){const s={SpeakerId:t.assertNotNull(i.speakerId,"speakerId"),DomainId:e};t.getLog().info("deleteSpeaker called").withObject(s).sendInternalLogToServer(),n.call(t.AgentAppClientMethods.DELETE_SPEAKER,s,{success:function(e){t.getLog().info("deleteSpeaker succeeded").withObject(e).sendInternalLogToServer(),r(e)},failure:function(e){t.getLog().error("deleteSpeaker failed").withObject({err:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.DELETE_SPEAKER_FAILED,"deleteSpeaker failed.",e);o(n)}})})).catch((function(e){o(e)}))})).catch((function(e){o(e)}))}))},a.prototype.startSession=function(){var e=this;e.checkConferenceCall();var n=t.core.getClient();return new Promise((function(r,o){e.getDomainId().then((function(i){const s={contactId:e.contactId,instanceId:t.core.getAgentDataProvider().getInstanceId(),customerAccountId:t.core.getAgentDataProvider().getAWSAccountId(),clientToken:AWS.util.uuid.v4(),domainId:i};t.getLog().info("startSession called").withObject(s).sendInternalLogToServer(),n.call(t.AgentAppClientMethods.START_VOICE_ID_SESSION,s,{success:function(e){if(e.sessionId)r(e);else{t.getLog().error("startVoiceIdSession failed, no session id returned").withObject({data:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.START_SESSION_FAILED,"No session id returned from start session api");o(n)}},failure:function(e){t.getLog().error("startVoiceIdSession failed").withObject({err:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.START_SESSION_FAILED,"startVoiceIdSession failed",e);o(n)}})})).catch((function(e){o(e)}))}))},a.prototype.evaluateSpeaker=function(e){var n=this;n.checkConferenceCall();var r=t.core.getClient(),o=t.core.getAgentDataProvider().getContactData(this.contactId),i=0;return new Promise((function(s,a){function c(){n.getDomainId().then((function(e){const u={SessionNameOrId:o.initialContactId||this.contactId,DomainId:e};t.getLog().info("evaluateSpeaker called").withObject(u).sendInternalLogToServer(),r.call(t.AgentAppClientMethods.EVALUATE_SESSION,u,{success:function(e){if(++i=1&&(o=r.IntegrationAssociationSummaryList[0].IntegrationArn.replace(/^.*domain\//i,"")),!o){t.getLog().info("getDomainId: no domainId found").sendInternalLogToServer();var i=t.VoiceIdError(t.VoiceIdErrorTypes.NO_DOMAIN_ID_FOUND);return void n(i)}t.getLog().info("getDomainId succeeded").withObject(r).sendInternalLogToServer(),t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.VoiceIdEvents.UPDATE_DOMAIN_ID,data:{domainId:o}}),e(o)}catch(e){t.getLog().error("getDomainId failed").withObject({err:e}).sendInternalLogToServer(),i=t.VoiceIdError(t.VoiceIdErrorTypes.GET_DOMAIN_ID_FAILED,"getDomainId failed",e),n(i)}},failure:function(e){t.getLog().error("getDomainId failed").withObject({err:e}).sendInternalLogToServer();var r=t.VoiceIdError(t.VoiceIdErrorTypes.GET_DOMAIN_ID_FAILED,"getDomainId failed",e);n(r)}})}else n(new Error("Agent doesn't have the permission for Voice ID"))}))},a.prototype.checkConferenceCall=function(){if(t.core.getAgentDataProvider().getContactData(this.contactId).connections.filter((function(e){return t.contains(t.CONNECTION_ACTIVE_STATES,e.state.type)})).length>2)throw new t.NotImplementedError("VoiceId is not supported for conference calls")},a.prototype.isAuthEnabled=function(e){return e!==t.ContactFlowAuthenticationDecision.NOT_ENABLED},a.prototype.isAuthResultNotEnoughSpeech=function(e){return e===t.VoiceIdAuthenticationDecision.NOT_ENOUGH_SPEECH},a.prototype.isAuthResultInconclusive=function(e){return e===t.ContactFlowAuthenticationDecision.INCONCLUSIVE},a.prototype.isFraudEnabled=function(e){return e!==t.ContactFlowFraudDetectionDecision.NOT_ENABLED},a.prototype.isFraudResultNotEnoughSpeech=function(e){return e===t.VoiceIdFraudDetectionDecision.NOT_ENOUGH_SPEECH},a.prototype.isFraudResultInconclusive=function(e){return e===t.ContactFlowFraudDetectionDecision.INCONCLUSIVE};var c=function(e,t){this._speakerAuthenticator=new a(e),s.call(this,e,t)};(c.prototype=Object.create(s.prototype)).constructor=c,c.prototype.getSoftphoneMediaInfo=function(){return this._getData().softphoneMediaInfo},c.prototype.getMediaInfo=function(){return this._getData().softphoneMediaInfo},c.prototype.getMediaType=function(){return t.MediaType.SOFTPHONE},c.prototype.getMediaController=function(){return t.core.mediaFactory.get(this)},c.prototype.getVoiceIdSpeakerId=function(){return this._speakerAuthenticator.getSpeakerId()},c.prototype.getVoiceIdSpeakerStatus=function(){return this._speakerAuthenticator.getSpeakerStatus()},c.prototype.optOutVoiceIdSpeaker=function(){return this._speakerAuthenticator.optOutSpeaker()},c.prototype.deleteVoiceIdSpeaker=function(){return this._speakerAuthenticator.deleteSpeaker()},c.prototype.evaluateSpeakerWithVoiceId=function(e){return this._speakerAuthenticator.evaluateSpeaker(e)},c.prototype.enrollSpeakerInVoiceId=function(e){return this._speakerAuthenticator.enrollSpeaker(e)},c.prototype.updateVoiceIdSpeakerId=function(e){return this._speakerAuthenticator.updateSpeakerIdInVoiceId(e)},c.prototype.getQuickConnectName=function(){return this._getData().quickConnectName},c.prototype.isSilentMonitor=function(){return this.getMonitorStatus()===t.MonitoringMode.SILENT_MONITOR},c.prototype.isBarge=function(){return this.getMonitorStatus()===t.MonitoringMode.BARGE},c.prototype.isBargeEnabled=function(){var e=this.getMonitorCapabilities();return e&&e.includes(t.MonitoringMode.BARGE)},c.prototype.isSilentMonitorEnabled=function(){var e=this.getMonitorCapabilities();return e&&e.includes(t.MonitoringMode.SILENT_MONITOR)},c.prototype.getMonitorCapabilities=function(){return this._getData().monitorCapabilities},c.prototype.getMonitorStatus=function(){return this._getData().monitorStatus},c.prototype.isMute=function(){return this._getData().mute},c.prototype.isForcedMute=function(){return this._getData().forcedMute},c.prototype.muteParticipant=function(e){t.core.getClient().call(t.ClientMethods.MUTE_PARTICIPANT,{contactId:this.getContactId(),connectionId:this.getConnectionId()},e)},c.prototype.unmuteParticipant=function(e){t.core.getClient().call(t.ClientMethods.UNMUTE_PARTICIPANT,{contactId:this.getContactId(),connectionId:this.getConnectionId()},e)};var u=function(e,t){s.call(this,e,t)};(u.prototype=Object.create(s.prototype)).constructor=u,u.prototype.getMediaInfo=function(){var e=this._getData().chatMediaInfo;if(e){var n=t.core.getAgentDataProvider().getContactData(this.contactId),r={contactId:this.contactId,initialContactId:n.initialContactId||this.contactId,participantId:this.connectionId,getConnectionToken:t.hitch(this,this.getConnectionToken)};if(e.connectionData)try{r.participantToken=JSON.parse(e.connectionData).ConnectionAuthenticationToken}catch(n){t.getLog().error(t.LogComponent.CHAT,"Connection data is invalid").withObject(e).withException(n).sendInternalLogToServer(),r.participantToken=null}return r.participantToken=r.participantToken||null,r.originalInfo=this._getData().chatMediaInfo,r}return null},u.prototype.getConnectionToken=function(){var e=t.core.getClient(),n=t.core.getAgentDataProvider().getContactData(this.contactId),r={transportType:t.TRANSPORT_TYPES.CHAT_TOKEN,participantId:this.connectionId,contactId:n.initialContactId||this.contactId};return new Promise((function(n,o){e.call(t.ClientMethods.CREATE_TRANSPORT,r,{success:function(e){t.getLog().info("getConnectionToken succeeded").sendInternalLogToServer(),n(e)},failure:function(e,n){t.getLog().error("getConnectionToken failed").sendInternalLogToServer().withObject({err:e,data:n}),o(Error("getConnectionToken failed"))}})}))},u.prototype.getMediaType=function(){return t.MediaType.CHAT},u.prototype.getMediaController=function(){return t.core.mediaFactory.get(this)},u.prototype._initMediaController=function(){this._isAgentConnectionType()&&t.core.mediaFactory.get(this).catch((function(){}))};var l=function(e,t){s.call(this,e,t)};(l.prototype=Object.create(s.prototype)).constructor=l,l.prototype.getMediaType=function(){return t.MediaType.TASK},l.prototype.getMediaInfo=function(){var e=t.core.getAgentDataProvider().getContactData(this.contactId);return{contactId:this.contactId,initialContactId:e.initialContactId||this.contactId}},l.prototype.getMediaController=function(){return t.core.mediaFactory.get(this)};var p=function(e){t.Connection.call(this,e.contactId,e.connectionId),this.connectionData=e};(p.prototype=Object.create(s.prototype)).constructor=p,p.prototype._getData=function(){return this.connectionData},p.prototype._initMediaController=function(){};var d=function(e){var t=e||{};this.endpointARN=t.endpointId||t.endpointARN||null,this.endpointId=this.endpointARN,this.type=t.type||null,this.name=t.name||null,this.phoneNumber=t.phoneNumber||null,this.agentLogin=t.agentLogin||null,this.queue=t.queue||null};d.prototype.stripPhoneNumber=function(){return this.phoneNumber?this.phoneNumber.replace(/sip:([^@]*)@.*/,"$1"):""},d.byPhoneNumber=function(e,n){return new d({type:t.EndpointType.PHONE_NUMBER,phoneNumber:e,name:n||null})};var h=function(e,t,n){this.errorType=e,this.errorMessage=t,this.endPointUrl=n};h.prototype.getErrorType=function(){return this.errorType},h.prototype.getErrorMessage=function(){return this.errorMessage},h.prototype.getEndPointUrl=function(){return this.endPointUrl},t.agent=function(e){var n=t.core.getEventBus().subscribe(t.AgentEvents.INIT,e);return t.agent.initialized&&e(new t.Agent),n},t.agent.initialized=!1,t.contact=function(e){return t.core.getEventBus().subscribe(t.ContactEvents.INIT,e)},t.onWebsocketInitFailure=function(e){var n=t.core.getEventBus().subscribe(t.WebSocketEvents.INIT_FAILURE,e);return t.webSocketInitFailed&&e(),n},t.ifMaster=function(e,n,r,o){if(t.assertNotNull(e,"A topic must be provided."),t.assertNotNull(n,"A true callback must be provided."),!t.core.masterClient)return t.getLog().warn("We can't be the master for topic '%s' because there is no master client!",e).sendInternalLogToServer(),void(r&&r());t.core.getMasterClient().call(t.MasterMethods.CHECK_MASTER,{topic:e,shouldNotBecomeMasterIfNone:o},{success:function(e){e.isMaster?n():r&&r()}})},t.becomeMaster=function(e,n,r){t.assertNotNull(e,"A topic must be provided."),t.core.masterClient?t.core.getMasterClient().call(t.MasterMethods.BECOME_MASTER,{topic:e},{success:function(){n&&n()}}):(t.getLog().warn("We can't be the master for topic '%s' because there is no master client!",e),r&&r())},t.Agent=n,t.AgentSnapshot=r,t.Contact=o,t.ContactSnapshot=i,t.Connection=c,t.BaseConnection=s,t.VoiceConnection=c,t.ChatConnection=u,t.TaskConnection=l,t.ConnectionSnapshot=p,t.Endpoint=d,t.Address=d,t.SoftphoneError=h,t.VoiceId=a}()},827:(e,t,n)=>{var r;!function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){return o(t[s][1][e]||e)}),u,u.exports,e,t,n,r)}return n[s].exports}for(var i=void 0,s=0;s-1});var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"];t.exports={isEmptyData:function(e){return"string"==typeof e?0===e.length:0===e.byteLength},convertToBuffer:function(e){return"string"==typeof e&&(e=new r(e,"utf8")),ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}},{"buffer/":85}],12:[function(e,t,n){var r=e("./browserHashUtils");function o(e,t){this.hash=new e,this.outer=new e;var n=function(e,t){var n=r.convertToBuffer(t);if(n.byteLength>e.BLOCK_SIZE){var o=new e;o.update(n),n=o.digest()}var i=new Uint8Array(e.BLOCK_SIZE);return i.set(n),i}(e,t),o=new Uint8Array(e.BLOCK_SIZE);o.set(n);for(var i=0;i>>32-o)+n&4294967295}function c(e,t,n,r,o,i,s){return a(t&n|~t&r,e,t,o,i,s)}function u(e,t,n,r,o,i,s){return a(t&r|n&~r,e,t,o,i,s)}function l(e,t,n,r,o,i,s){return a(t^n^r,e,t,o,i,s)}function p(e,t,n,r,o,i,s){return a(n^(t|~r),e,t,o,i,s)}t.exports=s,s.BLOCK_SIZE=i,s.prototype.update=function(e){if(r.isEmptyData(e))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=r.convertToBuffer(e),n=0,o=t.byteLength;for(this.bytesHashed+=o;o>0;)this.buffer.setUint8(this.bufferLength++,t[n++]),o--,this.bufferLength===i&&(this.hashBuffer(),this.bufferLength=0);return this},s.prototype.digest=function(e){if(!this.finished){var t=this,n=t.buffer,r=t.bufferLength,s=8*t.bytesHashed;if(n.setUint8(this.bufferLength++,128),r%i>=56){for(var a=this.bufferLength;a>>0,!0),n.setUint32(60,Math.floor(s/4294967296),!0),this.hashBuffer(),this.finished=!0}var c=new DataView(new ArrayBuffer(16));for(a=0;a<4;a++)c.setUint32(4*a,this.state[a],!0);var u=new o(c.buffer,c.byteOffset,c.byteLength);return e?u.toString(e):u},s.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,n=t[0],r=t[1],o=t[2],i=t[3];n=c(n,r,o,i,e.getUint32(0,!0),7,3614090360),i=c(i,n,r,o,e.getUint32(4,!0),12,3905402710),o=c(o,i,n,r,e.getUint32(8,!0),17,606105819),r=c(r,o,i,n,e.getUint32(12,!0),22,3250441966),n=c(n,r,o,i,e.getUint32(16,!0),7,4118548399),i=c(i,n,r,o,e.getUint32(20,!0),12,1200080426),o=c(o,i,n,r,e.getUint32(24,!0),17,2821735955),r=c(r,o,i,n,e.getUint32(28,!0),22,4249261313),n=c(n,r,o,i,e.getUint32(32,!0),7,1770035416),i=c(i,n,r,o,e.getUint32(36,!0),12,2336552879),o=c(o,i,n,r,e.getUint32(40,!0),17,4294925233),r=c(r,o,i,n,e.getUint32(44,!0),22,2304563134),n=c(n,r,o,i,e.getUint32(48,!0),7,1804603682),i=c(i,n,r,o,e.getUint32(52,!0),12,4254626195),o=c(o,i,n,r,e.getUint32(56,!0),17,2792965006),n=u(n,r=c(r,o,i,n,e.getUint32(60,!0),22,1236535329),o,i,e.getUint32(4,!0),5,4129170786),i=u(i,n,r,o,e.getUint32(24,!0),9,3225465664),o=u(o,i,n,r,e.getUint32(44,!0),14,643717713),r=u(r,o,i,n,e.getUint32(0,!0),20,3921069994),n=u(n,r,o,i,e.getUint32(20,!0),5,3593408605),i=u(i,n,r,o,e.getUint32(40,!0),9,38016083),o=u(o,i,n,r,e.getUint32(60,!0),14,3634488961),r=u(r,o,i,n,e.getUint32(16,!0),20,3889429448),n=u(n,r,o,i,e.getUint32(36,!0),5,568446438),i=u(i,n,r,o,e.getUint32(56,!0),9,3275163606),o=u(o,i,n,r,e.getUint32(12,!0),14,4107603335),r=u(r,o,i,n,e.getUint32(32,!0),20,1163531501),n=u(n,r,o,i,e.getUint32(52,!0),5,2850285829),i=u(i,n,r,o,e.getUint32(8,!0),9,4243563512),o=u(o,i,n,r,e.getUint32(28,!0),14,1735328473),n=l(n,r=u(r,o,i,n,e.getUint32(48,!0),20,2368359562),o,i,e.getUint32(20,!0),4,4294588738),i=l(i,n,r,o,e.getUint32(32,!0),11,2272392833),o=l(o,i,n,r,e.getUint32(44,!0),16,1839030562),r=l(r,o,i,n,e.getUint32(56,!0),23,4259657740),n=l(n,r,o,i,e.getUint32(4,!0),4,2763975236),i=l(i,n,r,o,e.getUint32(16,!0),11,1272893353),o=l(o,i,n,r,e.getUint32(28,!0),16,4139469664),r=l(r,o,i,n,e.getUint32(40,!0),23,3200236656),n=l(n,r,o,i,e.getUint32(52,!0),4,681279174),i=l(i,n,r,o,e.getUint32(0,!0),11,3936430074),o=l(o,i,n,r,e.getUint32(12,!0),16,3572445317),r=l(r,o,i,n,e.getUint32(24,!0),23,76029189),n=l(n,r,o,i,e.getUint32(36,!0),4,3654602809),i=l(i,n,r,o,e.getUint32(48,!0),11,3873151461),o=l(o,i,n,r,e.getUint32(60,!0),16,530742520),n=p(n,r=l(r,o,i,n,e.getUint32(8,!0),23,3299628645),o,i,e.getUint32(0,!0),6,4096336452),i=p(i,n,r,o,e.getUint32(28,!0),10,1126891415),o=p(o,i,n,r,e.getUint32(56,!0),15,2878612391),r=p(r,o,i,n,e.getUint32(20,!0),21,4237533241),n=p(n,r,o,i,e.getUint32(48,!0),6,1700485571),i=p(i,n,r,o,e.getUint32(12,!0),10,2399980690),o=p(o,i,n,r,e.getUint32(40,!0),15,4293915773),r=p(r,o,i,n,e.getUint32(4,!0),21,2240044497),n=p(n,r,o,i,e.getUint32(32,!0),6,1873313359),i=p(i,n,r,o,e.getUint32(60,!0),10,4264355552),o=p(o,i,n,r,e.getUint32(24,!0),15,2734768916),r=p(r,o,i,n,e.getUint32(52,!0),21,1309151649),n=p(n,r,o,i,e.getUint32(16,!0),6,4149444226),i=p(i,n,r,o,e.getUint32(44,!0),10,3174756917),o=p(o,i,n,r,e.getUint32(8,!0),15,718787259),r=p(r,o,i,n,e.getUint32(36,!0),21,3951481745),t[0]=n+t[0]&4294967295,t[1]=r+t[1]&4294967295,t[2]=o+t[2]&4294967295,t[3]=i+t[3]&4294967295}},{"./browserHashUtils":11,"buffer/":85}],14:[function(e,t,n){var r=e("buffer/").Buffer,o=e("./browserHashUtils");function i(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),Math.pow(2,53),t.exports=i,i.BLOCK_SIZE=64,i.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(o.isEmptyData(e))return this;var t=(e=o.convertToBuffer(e)).length;this.totalLength+=8*t;for(var n=0;n14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var t=24;t>=0;t-=8)this.write(this.totalLength>>t);var n=new r(20),o=new DataView(n.buffer);return o.setUint32(0,this.h0,!1),o.setUint32(4,this.h1,!1),o.setUint32(8,this.h2,!1),o.setUint32(12,this.h3,!1),o.setUint32(16,this.h4,!1),e?n.toString(e):n},i.prototype.processBlock=function(){for(var e=16;e<80;e++){var t=this.block[e-3]^this.block[e-8]^this.block[e-14]^this.block[e-16];this.block[e]=t<<1|t>>>31}var n,r,o=this.h0,i=this.h1,s=this.h2,a=this.h3,c=this.h4;for(e=0;e<80;e++){e<20?(n=a^i&(s^a),r=1518500249):e<40?(n=i^s^a,r=1859775393):e<60?(n=i&s|a&(i|s),r=2400959708):(n=i^s^a,r=3395469782);var u=(o<<5|o>>>27)+n+c+r+(0|this.block[e]);c=a,a=s,s=i<<30|i>>>2,i=o,o=u}for(this.h0=this.h0+o|0,this.h1=this.h1+i|0,this.h2=this.h2+s|0,this.h3=this.h3+a|0,this.h4=this.h4+c|0,this.offset=0,e=0;e<16;e++)this.block[e]=0}},{"./browserHashUtils":11,"buffer/":85}],15:[function(e,t,n){var r=e("buffer/").Buffer,o=e("./browserHashUtils"),i=64,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=Math.pow(2,53)-1;function c(){this.state=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}t.exports=c,c.BLOCK_SIZE=i,c.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(o.isEmptyData(e))return this;var t=0,n=(e=o.convertToBuffer(e)).byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>a)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===i&&(this.hashBuffer(),this.bufferLength=0);return this},c.prototype.digest=function(e){if(!this.finished){var t=8*this.bytesHashed,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),o=this.bufferLength;if(n.setUint8(this.bufferLength++,128),o%i>=56){for(var s=this.bufferLength;s>>24&255,a[4*s+1]=this.state[s]>>>16&255,a[4*s+2]=this.state[s]>>>8&255,a[4*s+3]=this.state[s]>>>0&255;return e?a.toString(e):a},c.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],o=t[2],a=t[3],c=t[4],u=t[5],l=t[6],p=t[7],d=0;d>>17|h<<15)^(h>>>19|h<<13)^h>>>10,g=((h=this.temp[d-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[d]=(f+this.temp[d-7]|0)+(g+this.temp[d-16]|0)}var m=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&l)|0)+(p+(s[d]+this.temp[d]|0)|0)|0,v=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&o^r&o)|0;p=l,l=u,u=c,c=a+m|0,a=o,o=r,r=n,n=m+v|0}t[0]+=n,t[1]+=r,t[2]+=o,t[3]+=a,t[4]+=c,t[5]+=u,t[6]+=l,t[7]+=p}},{"./browserHashUtils":11,"buffer/":85}],16:[function(e,t,n){(function(n){(function(){var n=e("./util");n.crypto.lib=e("./browserCryptoLib"),n.Buffer=e("buffer/").Buffer,n.url=e("url/"),n.querystring=e("querystring/"),n.realClock=e("./realclock/browserClock"),n.environment="js",n.createEventStream=e("./event-stream/buffered-create-event-stream").createEventStream,n.isBrowser=function(){return!0},n.isNode=function(){return!1};var r=e("./core");if(t.exports=r,e("./credentials"),e("./credentials/credential_provider_chain"),e("./credentials/temporary_credentials"),e("./credentials/chainable_temporary_credentials"),e("./credentials/web_identity_credentials"),e("./credentials/cognito_identity_credentials"),e("./credentials/saml_credentials"),r.XML.Parser=e("./xml/browser_parser"),e("./http/xhr"),void 0===o)var o={browser:!0}}).call(this)}).call(this,e("_process"))},{"./browserCryptoLib":10,"./core":19,"./credentials":20,"./credentials/chainable_temporary_credentials":21,"./credentials/cognito_identity_credentials":22,"./credentials/credential_provider_chain":23,"./credentials/saml_credentials":24,"./credentials/temporary_credentials":25,"./credentials/web_identity_credentials":26,"./event-stream/buffered-create-event-stream":28,"./http/xhr":36,"./realclock/browserClock":53,"./util":72,"./xml/browser_parser":73,_process:90,"buffer/":85,"querystring/":96,"url/":98}],17:[function(e,t,n){var r,o=e("./core");e("./credentials"),e("./credentials/credential_provider_chain"),o.Config=o.util.inherit({constructor:function(e){void 0===e&&(e={}),e=this.extractCredentials(e),o.util.each.call(this,this.keys,(function(t,n){this.set(t,e[t],n)}))},getCredentials:function(e){var t,n=this;function r(t){e(t,t?null:n.credentials)}function i(e,t){return new o.util.error(t||new Error,{code:"CredentialsError",message:e,name:"CredentialsError"})}n.credentials?"function"==typeof n.credentials.get?n.credentials.get((function(e){e&&(e=i("Could not load credentials from "+n.credentials.constructor.name,e)),r(e)})):(t=null,n.credentials.accessKeyId&&n.credentials.secretAccessKey||(t=i("Missing credentials")),r(t)):n.credentialProvider?n.credentialProvider.resolve((function(e,t){e&&(e=i("Could not load credentials from any providers",e)),n.credentials=t,r(e)})):r(i("No credentials to load"))},update:function(e,t){t=t||!1,e=this.extractCredentials(e),o.util.each.call(this,e,(function(e,n){(t||Object.prototype.hasOwnProperty.call(this.keys,e)||o.Service.hasService(e))&&this.set(e,n)}))},loadFromPath:function(e){this.clear();var t=JSON.parse(o.util.readFileSync(e)),n=new o.FileSystemCredentials(e),r=new o.CredentialProviderChain;return r.providers.unshift(n),r.resolve((function(e,n){if(e)throw e;t.credentials=n})),this.constructor(t),this},clear:function(){o.util.each.call(this,this.keys,(function(e){delete this[e]})),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,t,n){void 0===t?(void 0===n&&(n=this.keys[e]),this[e]="function"==typeof n?n.call(this):n):"httpOptions"===e&&this[e]?this[e]=o.util.merge(this[e],t):this[e]=t},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,s3UsEast1RegionalEndpoint:"legacy",s3UseArnRegion:void 0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{},useAccelerateEndpoint:!1,clientSideMonitoring:!1,endpointDiscoveryEnabled:void 0,endpointCacheSize:1e3,hostPrefixEnabled:!0,stsRegionalEndpoints:"legacy",useFipsEndpoint:!1,useDualstackEndpoint:!1},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&((e=o.util.copy(e)).credentials=new o.Credentials(e)),e},setPromisesDependency:function(e){r=e,null===e&&"function"==typeof Promise&&(r=Promise);var t=[o.Request,o.Credentials,o.CredentialProviderChain];o.S3&&(t.push(o.S3),o.S3.ManagedUpload&&t.push(o.S3.ManagedUpload)),o.util.addPromises(t,r)},getPromisesDependency:function(){return r}}),o.config=new o.Config},{"./core":19,"./credentials":20,"./credentials/credential_provider_chain":23}],18:[function(e,t,n){(function(n){(function(){var r=e("./core");function o(e,t){if("string"==typeof e){if(["legacy","regional"].indexOf(e.toLowerCase())>=0)return e.toLowerCase();throw r.util.error(new Error,t)}}t.exports=function(e,t){var i;if((e=e||{})[t.clientConfig]&&(i=o(e[t.clientConfig],{code:"InvalidConfiguration",message:'invalid "'+t.clientConfig+'" configuration. Expect "legacy" or "regional". Got "'+e[t.clientConfig]+'".'})))return i;if(!r.util.isNode())return i;if(Object.prototype.hasOwnProperty.call(n.env,t.env)&&(i=o(n.env[t.env],{code:"InvalidEnvironmentalVariable",message:"invalid "+t.env+' environmental variable. Expect "legacy" or "regional". Got "'+n.env[t.env]+'".'})))return i;var s={};try{s=r.util.getProfilesFromSharedConfig(r.util.iniLoader)[n.env.AWS_PROFILE||r.util.defaultProfile]}catch(e){}return s&&Object.prototype.hasOwnProperty.call(s,t.sharedConfig)&&(i=o(s[t.sharedConfig],{code:"InvalidConfiguration",message:"invalid "+t.sharedConfig+' profile config. Expect "legacy" or "regional". Got "'+s[t.sharedConfig]+'".'})),i}}).call(this)}).call(this,e("_process"))},{"./core":19,_process:90}],19:[function(e,t,n){var r={util:e("./util")};({}).toString(),t.exports=r,r.util.update(r,{VERSION:"2.1200.0",Signers:{},Protocol:{Json:e("./protocol/json"),Query:e("./protocol/query"),Rest:e("./protocol/rest"),RestJson:e("./protocol/rest_json"),RestXml:e("./protocol/rest_xml")},XML:{Builder:e("./xml/builder"),Parser:null},JSON:{Builder:e("./json/builder"),Parser:e("./json/parser")},Model:{Api:e("./model/api"),Operation:e("./model/operation"),Shape:e("./model/shape"),Paginator:e("./model/paginator"),ResourceWaiter:e("./model/resource_waiter")},apiLoader:e("./api_loader"),EndpointCache:e("../vendor/endpoint-cache").EndpointCache}),e("./sequential_executor"),e("./service"),e("./config"),e("./http"),e("./event_listeners"),e("./request"),e("./response"),e("./resource_waiter"),e("./signers/request_signer"),e("./param_validator"),r.events=new r.SequentialExecutor,r.util.memoizedProperty(r,"endpointCache",(function(){return new r.EndpointCache(r.config.endpointCacheSize)}),!0)},{"../vendor/endpoint-cache":109,"./api_loader":9,"./config":17,"./event_listeners":34,"./http":35,"./json/builder":37,"./json/parser":38,"./model/api":39,"./model/operation":41,"./model/paginator":42,"./model/resource_waiter":43,"./model/shape":44,"./param_validator":45,"./protocol/json":47,"./protocol/query":48,"./protocol/rest":49,"./protocol/rest_json":50,"./protocol/rest_xml":51,"./request":57,"./resource_waiter":58,"./response":59,"./sequential_executor":60,"./service":61,"./signers/request_signer":64,"./util":72,"./xml/builder":74}],20:[function(e,t,n){var r=e("./core");r.Credentials=r.util.inherit({constructor:function(){if(r.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,this.refreshCallbacks=[],1===arguments.length&&"object"==typeof arguments[0]){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=r.util.date.getDate().getTime(),t=new Date(e+1e3*this.expiryWindow);return!!(this.expireTime&&t>this.expireTime)||this.expired||!this.accessKeyId||!this.secretAccessKey},get:function(e){var t=this;this.needsRefresh()?this.refresh((function(n){n||(t.expired=!1),e&&e(n)})):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(e,t){var n=this;1===n.refreshCallbacks.push(e)&&n.load((function(e){r.util.arrayEach(n.refreshCallbacks,(function(n){t?n(e):r.util.defer((function(){n(e)}))})),n.refreshCallbacks.length=0}))},load:function(e){e()}}),r.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=r.util.promisifyMethod("get",e),this.prototype.refreshPromise=r.util.promisifyMethod("refresh",e)},r.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},r.util.addPromises(r.Credentials)},{"./core":19}],21:[function(e,t,n){var r=e("../core"),o=e("../../clients/sts");r.ChainableTemporaryCredentials=r.util.inherit(r.Credentials,{constructor:function(e){r.Credentials.call(this),e=e||{},this.errorCode="ChainableTemporaryCredentialsProviderFailure",this.expired=!0,this.tokenCodeFn=null;var t=r.util.copy(e.params)||{};if(t.RoleArn&&(t.RoleSessionName=t.RoleSessionName||"temporary-credentials"),t.SerialNumber){if(!e.tokenCodeFn||"function"!=typeof e.tokenCodeFn)throw new r.util.error(new Error("tokenCodeFn must be a function when params.SerialNumber is given"),{code:this.errorCode});this.tokenCodeFn=e.tokenCodeFn}var n=r.util.merge({params:t,credentials:e.masterCredentials||r.config.credentials},e.stsConfig||{});this.service=new o(n)},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this,n=t.service.config.params.RoleArn?"assumeRole":"getSessionToken";this.getTokenCode((function(r,o){var i={};r?e(r):(o&&(i.TokenCode=o),t.service[n](i,(function(n,r){n||t.service.credentialsFrom(r,t),e(n)})))}))},getTokenCode:function(e){var t=this;this.tokenCodeFn?this.tokenCodeFn(this.service.config.params.SerialNumber,(function(n,o){if(n){var i=n;return n instanceof Error&&(i=n.message),void e(r.util.error(new Error("Error fetching MFA token: "+i),{code:t.errorCode}))}e(null,o)})):e(null)}})},{"../../clients/sts":8,"../core":19}],22:[function(e,t,n){var r=e("../core"),o=e("../../clients/cognitoidentity"),i=e("../../clients/sts");r.CognitoIdentityCredentials=r.util.inherit(r.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e,t){r.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this._identityId=null,this._clientConfig=r.util.copy(t||{}),this.loadCachedId();var n=this;Object.defineProperty(this,"identityId",{get:function(){return n.loadCachedId(),n._identityId||n.params.IdentityId},set:function(e){n._identityId=e}})},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.data=null,t._identityId=null,t.getId((function(n){n?(t.clearIdOnNotAuthorized(n),e(n)):t.params.RoleArn?t.getCredentialsFromSTS(e):t.getCredentialsForIdentity(e)}))},clearCachedId:function(){this._identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId,t=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+e+t],delete this.storage[this.localStorageKey.providers+e+t]},clearIdOnNotAuthorized:function(e){"NotAuthorizedException"==e.code&&this.clearCachedId()},getId:function(e){var t=this;if("string"==typeof t.params.IdentityId)return e(null,t.params.IdentityId);t.cognito.getId((function(n,r){!n&&r.IdentityId?(t.params.IdentityId=r.IdentityId,e(null,r.IdentityId)):e(n)}))},loadCredentials:function(e,t){e&&t&&(t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(e){var t=this;t.cognito.getCredentialsForIdentity((function(n,r){n?t.clearIdOnNotAuthorized(n):(t.cacheId(r),t.data=r,t.loadCredentials(t.data,t)),e(n)}))},getCredentialsFromSTS:function(e){var t=this;t.cognito.getOpenIdToken((function(n,r){n?(t.clearIdOnNotAuthorized(n),e(n)):(t.cacheId(r),t.params.WebIdentityToken=r.Token,t.webIdentityCredentials.refresh((function(n){n||(t.data=t.webIdentityCredentials.data,t.sts.credentialsFrom(t.data,t)),e(n)})))}))},loadCachedId:function(){var e=this;if(r.util.isBrowser()&&!e.params.IdentityId){var t=e.getStorage("id");if(t&&e.params.Logins){var n=Object.keys(e.params.Logins);0!==(e.getStorage("providers")||"").split(",").filter((function(e){return-1!==n.indexOf(e)})).length&&(e.params.IdentityId=t)}else t&&(e.params.IdentityId=t)}},createClients:function(){var e=this._clientConfig;if(this.webIdentityCredentials=this.webIdentityCredentials||new r.WebIdentityCredentials(this.params,e),!this.cognito){var t=r.util.merge({},e);t.params=this.params,this.cognito=new o(t)}this.sts=this.sts||new i(e)},cacheId:function(e){this._identityId=e.IdentityId,this.params.IdentityId=this._identityId,r.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(e,t){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]=t}catch(e){}},storage:function(){try{var e=r.util.isBrowser()&&null!==window.localStorage&&"object"==typeof window.localStorage?window.localStorage:{};return e["aws.test-storage"]="foobar",delete e["aws.test-storage"],e}catch(e){return{}}}()})},{"../../clients/cognitoidentity":7,"../../clients/sts":8,"../core":19}],23:[function(e,t,n){var r=e("../core");r.CredentialProviderChain=r.util.inherit(r.Credentials,{constructor:function(e){this.providers=e||r.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){var t=this;if(0===t.providers.length)return e(new Error("No providers")),t;if(1===t.resolveCallbacks.push(e)){var n=0,o=t.providers.slice(0);!function e(i,s){if(!i&&s||n===o.length)return r.util.arrayEach(t.resolveCallbacks,(function(e){e(i,s)})),void(t.resolveCallbacks.length=0);var a=o[n++];(s="function"==typeof a?a.call():a).get?s.get((function(t){e(t,t?null:s)})):e(null,s)}()}return t}}),r.CredentialProviderChain.defaultProviders=[],r.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=r.util.promisifyMethod("resolve",e)},r.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},r.util.addPromises(r.CredentialProviderChain)},{"../core":19}],24:[function(e,t,n){var r=e("../core"),o=e("../../clients/sts");r.SAMLCredentials=r.util.inherit(r.Credentials,{constructor:function(e){r.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithSAML((function(n,r){n||t.service.credentialsFrom(r,t),e(n)}))},createClients:function(){this.service=this.service||new o({params:this.params})}})},{"../../clients/sts":8,"../core":19}],25:[function(e,t,n){var r=e("../core"),o=e("../../clients/sts");r.TemporaryCredentials=r.util.inherit(r.Credentials,{constructor:function(e,t){r.Credentials.call(this),this.loadMasterCredentials(t),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.masterCredentials.get((function(){t.service.config.credentials=t.masterCredentials,(t.params.RoleArn?t.service.assumeRole:t.service.getSessionToken).call(t.service,(function(n,r){n||t.service.credentialsFrom(r,t),e(n)}))}))},loadMasterCredentials:function(e){for(this.masterCredentials=e||r.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;"function"!=typeof this.masterCredentials.get&&(this.masterCredentials=new r.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new o({params:this.params})}})},{"../../clients/sts":8,"../core":19}],26:[function(e,t,n){var r=e("../core"),o=e("../../clients/sts");r.WebIdentityCredentials=r.util.inherit(r.Credentials,{constructor:function(e,t){r.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=r.util.copy(t||{})},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithWebIdentity((function(n,r){t.data=null,n||(t.data=r,t.service.credentialsFrom(r,t)),e(n)}))},createClients:function(){if(!this.service){var e=r.util.merge({},this._clientConfig);e.params=this.params,this.service=new o(e)}}})},{"../../clients/sts":8,"../core":19}],27:[function(e,t,n){(function(n){(function(){var r=e("./core"),o=e("./util"),i=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"];function s(e){var t=e.service,n=t.api||{},r=(n.operations,{});return t.config.region&&(r.region=t.config.region),n.serviceId&&(r.serviceId=n.serviceId),t.config.credentials.accessKeyId&&(r.accessKeyId=t.config.credentials.accessKeyId),r}function a(e,t,n){n&&null!=t&&"structure"===n.type&&n.required&&n.required.length>0&&o.arrayEach(n.required,(function(r){var o=n.members[r];if(!0===o.endpointDiscoveryId){var i=o.isLocationName?o.name:r;e[i]=String(t[r])}else a(e,t[r],o)}))}function c(e,t){var n={};return a(n,e.params,t),n}function u(e){var t=e.service,n=t.api,i=n.operations?n.operations[e.operation]:void 0,a=c(e,i?i.input:void 0),u=s(e);Object.keys(a).length>0&&(u=o.update(u,a),i&&(u.operation=i.name));var l=r.endpointCache.get(u);if(!l||1!==l.length||""!==l[0].Address)if(l&&l.length>0)e.httpRequest.updateEndpoint(l[0].Address);else{var p=t.makeRequest(n.endpointOperation,{Operation:i.name,Identifiers:a});d(p),p.removeListener("validate",r.EventListeners.Core.VALIDATE_PARAMETERS),p.removeListener("retry",r.EventListeners.Core.RETRY_CHECK),r.endpointCache.put(u,[{Address:"",CachePeriodInMinutes:1}]),p.send((function(e,t){t&&t.Endpoints?r.endpointCache.put(u,t.Endpoints):e&&r.endpointCache.put(u,[{Address:"",CachePeriodInMinutes:1}])}))}}var l={};function p(e,t){var n=e.service,i=n.api,a=i.operations?i.operations[e.operation]:void 0,u=a?a.input:void 0,p=c(e,u),h=s(e);Object.keys(p).length>0&&(h=o.update(h,p),a&&(h.operation=a.name));var f=r.EndpointCache.getKeyString(h),g=r.endpointCache.get(f);if(g&&1===g.length&&""===g[0].Address)return l[f]||(l[f]=[]),void l[f].push({request:e,callback:t});if(g&&g.length>0)e.httpRequest.updateEndpoint(g[0].Address),t();else{var m=n.makeRequest(i.endpointOperation,{Operation:a.name,Identifiers:p});m.removeListener("validate",r.EventListeners.Core.VALIDATE_PARAMETERS),d(m),r.endpointCache.put(f,[{Address:"",CachePeriodInMinutes:60}]),m.send((function(n,i){if(n){if(e.response.error=o.error(n,{retryable:!1}),r.endpointCache.remove(h),l[f]){var s=l[f];o.arrayEach(s,(function(e){e.request.response.error=o.error(n,{retryable:!1}),e.callback()})),delete l[f]}}else i&&(r.endpointCache.put(f,i.Endpoints),e.httpRequest.updateEndpoint(i.Endpoints[0].Address),l[f])&&(s=l[f],o.arrayEach(s,(function(e){e.request.httpRequest.updateEndpoint(i.Endpoints[0].Address),e.callback()})),delete l[f]);t()}))}}function d(e){var t=e.service.api.apiVersion;t&&!e.httpRequest.headers["x-amz-api-version"]&&(e.httpRequest.headers["x-amz-api-version"]=t)}function h(e){var t=e.error,n=e.httpResponse;if(t&&("InvalidEndpointException"===t.code||421===n.statusCode)){var i=e.request,a=i.service.api.operations||{},u=c(i,a[i.operation]?a[i.operation].input:void 0),l=s(i);Object.keys(u).length>0&&(l=o.update(l,u),a[i.operation]&&(l.operation=a[i.operation].name)),r.endpointCache.remove(l)}}function f(e){return["false","0"].indexOf(e)>=0}t.exports={discoverEndpoint:function(e,t){var s=e.service||{};if(function(e){if(e._originalConfig&&e._originalConfig.endpoint&&!0===e._originalConfig.endpointDiscoveryEnabled)throw o.error(new Error,{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var t=r.config[e.serviceIdentifier]||{};return Boolean(r.config.endpoint||t.endpoint||e._originalConfig&&e._originalConfig.endpoint)}(s)||e.isPresigned())return t();var a=(s.api.operations||{})[e.operation],c=a?a.endpointDiscoveryRequired:"NULL",l=function(e){var t=e.service||{};if(void 0!==t.config.endpointDiscoveryEnabled)return t.config.endpointDiscoveryEnabled;if(!o.isBrowser()){for(var s=0;s-1&&(e[t]++,0===e[t]);t--);}i.fromNumber=function(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&s(t),new i(t)},i.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&s(e),parseInt(e.toString("hex"),16)*(t?-1:1)},i.prototype.toString=function(){return String(this.valueOf())},t.exports={Int64:i}},{"../core":19}],31:[function(e,t,n){var r=e("./parse-message").parseMessage;t.exports={parseEvent:function(e,t,n){var o=r(t),i=o.headers[":message-type"];if(i){if("error"===i.value)throw function(e){var t=e.headers[":error-code"],n=e.headers[":error-message"],r=new Error(n.value||n);return r.code=r.name=t.value||t,r}(o);if("event"!==i.value)return}var s=o.headers[":event-type"],a=n.members[s.value];if(a){var c={},u=a.eventPayloadMemberName;if(u){var l=a.members[u];"binary"===l.type?c[u]=o.body:c[u]=e.parse(o.body.toString(),l)}for(var p=a.eventHeaderMemberNames,d=0;d=0)return e.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",t();n.util.computeSha256(i,(function(n,r){n?t(n):(e.httpRequest.headers["X-Amz-Content-Sha256"]=r,t())}))}else t()}})),e("SET_CONTENT_LENGTH","afterBuild",(function(e){var t=function(e){if(!e.service.api.operations)return"";var t=e.service.api.operations[e.operation];return t?t.authtype:""}(e),r=n.util.getRequestPayloadShape(e);if(void 0===e.httpRequest.headers["Content-Length"])try{var o=n.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=o}catch(n){if(r&&r.isStreaming){if(r.requiresLength)throw n;if(t.indexOf("unsigned-body")>=0)return void(e.httpRequest.headers["Transfer-Encoding"]="chunked");throw n}throw n}})),e("SET_HTTP_HOST","afterBuild",(function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host})),e("SET_TRACE_ID","afterBuild",(function(e){var r="X-Amzn-Trace-Id";if(n.util.isNode()&&!Object.hasOwnProperty.call(e.httpRequest.headers,r)){var o=t.env.AWS_LAMBDA_FUNCTION_NAME,i=t.env._X_AMZN_TRACE_ID;"string"==typeof o&&o.length>0&&"string"==typeof i&&i.length>0&&(e.httpRequest.headers[r]=i)}})),e("RESTART","restart",(function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new n.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount=600?this.emit("sign",[this],(function(e){e?t(e):i()})):i()})),e("HTTP_HEADERS","httpHeaders",(function(e,t,r,o){r.httpResponse.statusCode=e,r.httpResponse.statusMessage=o,r.httpResponse.headers=t,r.httpResponse.body=n.util.buffer.toBuffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var i=t.date||t.Date,s=r.request.service;if(i){var a=Date.parse(i);s.config.correctClockSkew&&s.isClockSkewed(a)&&s.applyClockOffset(a)}})),e("HTTP_DATA","httpData",(function(e,t){if(e){if(n.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],o={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[o,t])}t.httpResponse.buffers.push(n.util.buffer.toBuffer(e))}})),e("HTTP_DONE","httpDone",(function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=n.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers})),e("FINALIZE_ERROR","retry",(function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))})),e("INVALIDATE_CREDENTIALS","retry",(function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}})),e("EXPIRED_SIGNATURE","retry",(function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)})),e("CLOCK_SKEWED","retry",(function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&(e.error.retryable=!0)})),e("REDIRECT","retry",(function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new n.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)})),e("RETRY_CHECK","retry",(function(e){e.error&&(e.error.redirect&&e.redirectCount=0?(e.error=null,setTimeout(t,n)):t()}))})),CorePost:(new r).addNamedListeners((function(e){e("EXTRACT_REQUEST_ID","extractData",n.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",n.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",(function(e){if("NetworkingError"===e.code&&function(e){return"ENOTFOUND"===e.errno||"number"==typeof e.errno&&"function"==typeof n.util.getSystemErrorName&&["EAI_NONAME","EAI_NODATA"].indexOf(n.util.getSystemErrorName(e.errno)>=0)}(e)){var t="Inaccessible host: `"+e.hostname+"' at port `"+e.port+"'. This service may not be available in the `"+e.region+"' region.";this.response.error=n.util.error(new Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}}))})),Logger:(new r).addNamedListeners((function(t){t("LOG_REQUEST","complete",(function(t){var r=t.request,o=r.service.config.logger;if(o){var i=function(){var i=(t.request.service.getSkewCorrectedDate().getTime()-r.startTime.getTime())/1e3,a=!!o.isTTY,c=t.httpResponse.statusCode,u=r.params;r.service.api.operations&&r.service.api.operations[r.operation]&&r.service.api.operations[r.operation].input&&(u=s(r.service.api.operations[r.operation].input,r.params));var l=e("util").inspect(u,!0,null),p="";return a&&(p+=""),p+="[AWS "+r.service.serviceIdentifier+" "+c,p+=" "+i.toString()+"s "+t.retryCount+" retries]",a&&(p+=""),p+=" "+n.util.string.lowerFirst(r.operation),p+="("+l+")",a&&(p+=""),p}();"function"==typeof o.log?o.log(i):"function"==typeof o.write&&o.write(i+"\n")}function s(e,t){if(!t)return t;if(e.isSensitive)return"***SensitiveInformation***";switch(e.type){case"structure":var r={};return n.util.each(t,(function(t,n){Object.prototype.hasOwnProperty.call(e.members,t)?r[t]=s(e.members[t],n):r[t]=n})),r;case"list":var o=[];return n.util.arrayEach(t,(function(t,n){o.push(s(e.member,t))})),o;case"map":var i={};return n.util.each(t,(function(t,n){i[t]=s(e.value,n)})),i;default:return t}}}))})),Json:(new r).addNamedListeners((function(t){var n=e("./protocol/json");t("BUILD","build",n.buildRequest),t("EXTRACT_DATA","extractData",n.extractData),t("EXTRACT_ERROR","extractError",n.extractError)})),Rest:(new r).addNamedListeners((function(t){var n=e("./protocol/rest");t("BUILD","build",n.buildRequest),t("EXTRACT_DATA","extractData",n.extractData),t("EXTRACT_ERROR","extractError",n.extractError)})),RestJson:(new r).addNamedListeners((function(t){var n=e("./protocol/rest_json");t("BUILD","build",n.buildRequest),t("EXTRACT_DATA","extractData",n.extractData),t("EXTRACT_ERROR","extractError",n.extractError)})),RestXml:(new r).addNamedListeners((function(t){var n=e("./protocol/rest_xml");t("BUILD","build",n.buildRequest),t("EXTRACT_DATA","extractData",n.extractData),t("EXTRACT_ERROR","extractError",n.extractError)})),Query:(new r).addNamedListeners((function(t){var n=e("./protocol/query");t("BUILD","build",n.buildRequest),t("EXTRACT_DATA","extractData",n.extractData),t("EXTRACT_ERROR","extractError",n.extractError)}))}}).call(this)}).call(this,e("_process"))},{"./core":19,"./discover_endpoint":27,"./protocol/json":47,"./protocol/query":48,"./protocol/rest":49,"./protocol/rest_json":50,"./protocol/rest_xml":51,"./sequential_executor":60,_process:90,util:84}],35:[function(e,t,n){var r=e("./core"),o=r.util.inherit;r.Endpoint=o({constructor:function(e,t){if(r.util.hideProperties(this,["slashes","auth","hash","search","query"]),null==e)throw new Error("Invalid endpoint: "+e);if("string"!=typeof e)return r.util.copy(e);e.match(/^http/)||(e=((t&&void 0!==t.sslEnabled?t.sslEnabled:r.config.sslEnabled)?"https":"http")+"://"+e),r.util.update(this,r.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),r.HttpRequest=o({constructor:function(e,t){e=new r.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=t,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=r.util.userAgent()},getUserAgentHeaderName:function(){return(r.util.isBrowser()?"X-Amz-":"")+"User-Agent"},appendToUserAgent:function(e){"string"==typeof e&&e&&(this._userAgent+=" "+e),this.headers[this.getUserAgentHeaderName()]=this._userAgent},getUserAgent:function(){return this._userAgent},pathname:function(){return this.path.split("?",1)[0]},search:function(){var e=this.path.split("?",2)[1];return e?(e=r.util.queryStringParse(e),r.util.queryParamsToString(e)):""},updateEndpoint:function(e){var t=new r.Endpoint(e);this.endpoint=t,this.path=t.path||"/",this.headers.Host&&(this.headers.Host=t.host)}}),r.HttpResponse=o({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}}),r.HttpClient=o({}),r.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}},{"./core":19}],36:[function(e,t,n){var r=e("../core"),o=e("events").EventEmitter;e("../http"),r.XHRClient=r.util.inherit({handleRequest:function(e,t,n,i){var s=this,a=e.endpoint,c=new o,u=a.protocol+"//"+a.hostname;80!==a.port&&443!==a.port&&(u+=":"+a.port),u+=e.path;var l=new XMLHttpRequest,p=!1;e.stream=l,l.addEventListener("readystatechange",(function(){try{if(0===l.status)return}catch(e){return}this.readyState>=this.HEADERS_RECEIVED&&!p&&(c.statusCode=l.status,c.headers=s.parseHeaders(l.getAllResponseHeaders()),c.emit("headers",c.statusCode,c.headers,l.statusText),p=!0),this.readyState===this.DONE&&s.finishRequest(l,c)}),!1),l.upload.addEventListener("progress",(function(e){c.emit("sendProgress",e)})),l.addEventListener("progress",(function(e){c.emit("receiveProgress",e)}),!1),l.addEventListener("timeout",(function(){i(r.util.error(new Error("Timeout"),{code:"TimeoutError"}))}),!1),l.addEventListener("error",(function(){i(r.util.error(new Error("Network Failure"),{code:"NetworkingError"}))}),!1),l.addEventListener("abort",(function(){i(r.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))}),!1),n(c),l.open(e.method,u,!1!==t.xhrAsync),r.util.each(e.headers,(function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&l.setRequestHeader(e,t)})),t.timeout&&!1!==t.xhrAsync&&(l.timeout=t.timeout),t.xhrWithCredentials&&(l.withCredentials=!0);try{l.responseType="arraybuffer"}catch(e){}try{e.body?l.send(e.body):l.send()}catch(t){if(!e.body||"object"!=typeof e.body.buffer)throw t;l.send(e.body.buffer)}return c},parseHeaders:function(e){var t={};return r.util.arrayEach(e.split(/\r?\n/),(function(e){var n=e.split(":",1)[0],r=e.substring(n.length+2);n.length>0&&(t[n.toLowerCase()]=r)})),t},finishRequest:function(e,t){var n;if("arraybuffer"===e.responseType&&e.response){var o=e.response;n=new r.util.Buffer(o.byteLength);for(var i=new Uint8Array(o),s=0;s-1?t||"":t,this.isJsonValue?JSON.parse(t):t&&"function"==typeof t.toString?t.toString():t},this.toWireFormat=function(e){return this.isJsonValue?JSON.stringify(e):e}}function h(){a.apply(this,arguments),this.toType=function(e){var t=o.base64.decode(e);if(this.isSensitive&&o.isNode()&&"function"==typeof o.Buffer.alloc){var n=o.Buffer.alloc(t.length,t);t.fill(0),t=n}return t},this.toWireFormat=o.base64.encode}function f(){h.apply(this,arguments)}function g(){a.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null==e?null:"true"===e}}a.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},a.types={structure:u,list:l,map:p,boolean:g,timestamp:function(e){var t=this;if(a.apply(this,arguments),e.timestampFormat)i(this,"timestampFormat",e.timestampFormat);else if(t.isTimestampFormatSet&&this.timestampFormat)i(this,"timestampFormat",this.timestampFormat);else if("header"===this.location)i(this,"timestampFormat","rfc822");else if("querystring"===this.location)i(this,"timestampFormat","iso8601");else if(this.api)switch(this.api.protocol){case"json":case"rest-json":i(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":i(this,"timestampFormat","iso8601")}this.toType=function(e){return null==e?null:"function"==typeof e.toUTCString?e:"string"==typeof e||"number"==typeof e?o.date.parseTimestamp(e):null},this.toWireFormat=function(e){return o.date.format(e,t.timestampFormat)}},float:function(){a.apply(this,arguments),this.toType=function(e){return null==e?null:parseFloat(e)},this.toWireFormat=this.toType},integer:function(){a.apply(this,arguments),this.toType=function(e){return null==e?null:parseInt(e,10)},this.toWireFormat=this.toType},string:d,base64:f,binary:h},a.resolve=function(e,t){if(e.shape){var n=t.api.shapes[e.shape];if(!n)throw new Error("Cannot find shape reference: "+e.shape);return n}return null},a.create=function(e,t,n){if(e.isShape)return e;var r=a.resolve(e,t);if(r){var o=Object.keys(e);t.documentation||(o=o.filter((function(e){return!e.match(/documentation/)})));var i=function(){r.constructor.call(this,e,t,n)};return i.prototype=r,new i}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var s=e.type;if(a.normalizedTypes[e.type]&&(e.type=a.normalizedTypes[e.type]),a.types[e.type])return new a.types[e.type](e,t,n);throw new Error("Unrecognized shape type: "+s)},a.shapes={StructureShape:u,ListShape:l,MapShape:p,StringShape:d,BooleanShape:g,Base64Shape:f},t.exports=a},{"../util":72,"./collection":40}],45:[function(e,t,n){var r=e("./core");r.ParamValidator=r.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(e,t,n){if(this.errors=[],this.validateMember(e,t||{},n||"params"),this.errors.length>1){var o=this.errors.join("\n* ");throw o="There were "+this.errors.length+" validation errors:\n* "+o,r.util.error(new Error(o),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(e,t){this.errors.push(r.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,n){if(e.isDocument)return!0;var r;this.validateType(t,n,["object"],"structure");for(var o=0;e.required&&o= 1, but found "'+t+'" for '+n)},validatePattern:function(e,t,n){this.validation.pattern&&void 0!==e.pattern&&(new RegExp(e.pattern).test(t)||this.fail("PatternMatchError",'Provided value "'+t+'" does not match regex pattern /'+e.pattern+"/ for "+n))},validateRange:function(e,t,n,r){this.validation.min&&void 0!==e.min&&t= "+e.min+", but found "+t+" for "+n),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+r+" <= "+e.max+", but found "+t+" for "+n)},validateEnum:function(e,t,n){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+n)},validateType:function(e,t,n,o){if(null==e)return!1;for(var i=!1,s=0;s63)throw r.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!i.test(e))throw o.util.error(new Error,{code:"ValidationError",message:e+" is not hostname compatible."})}))}return e}}},{"../core":19,"../util":72}],47:[function(e,t,n){var r=e("../util"),o=e("../json/builder"),i=e("../json/parser"),s=e("./helpers").populateHostPrefix;t.exports={buildRequest:function(e){var t=e.httpRequest,n=e.service.api,r=n.targetPrefix+"."+n.operations[e.operation].name,i=n.jsonVersion||"1.0",a=n.operations[e.operation].input,c=new o;1===i&&(i="1.0"),t.body=c.build(e.params||{},a),t.headers["Content-Type"]="application/x-amz-json-"+i,t.headers["X-Amz-Target"]=r,s(e)},extractError:function(e){var t={},n=e.httpResponse;if(t.code=n.headers["x-amzn-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),n.body.length>0)try{var o=JSON.parse(n.body.toString()),i=o.__type||o.code||o.Code;i&&(t.code=i.split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=o.message||o.Message||null}catch(o){t.statusCode=n.statusCode,t.message=n.statusMessage}else t.statusCode=n.statusCode,t.message=n.statusCode.toString();e.error=r.error(new Error,t)},extractData:function(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var n=e.request.service.api.operations[e.request.operation].output||{},r=new i;e.data=r.parse(t,n)}}}},{"../json/builder":37,"../json/parser":38,"../util":72,"./helpers":46}],48:[function(e,t,n){var r=e("../core"),o=e("../util"),i=e("../query/query_param_serializer"),s=e("../model/shape"),a=e("./helpers").populateHostPrefix;t.exports={buildRequest:function(e){var t=e.service.api.operations[e.operation],n=e.httpRequest;n.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",n.params={Version:e.service.api.apiVersion,Action:t.name},(new i).serialize(e.params,t.input,(function(e,t){n.params[e]=t})),n.body=o.queryParamsToString(n.params),a(e)},extractError:function(e){var t,n=e.httpResponse.body.toString();if(n.match("=0?"&":"?";var c=[];r.arrayEach(Object.keys(s).sort(),(function(e){Array.isArray(s[e])||(s[e]=[s[e]]);for(var t=0;t0){var p=(t=new r.XML.Parser).parse(s.toString(),c);o.update(e.data,p)}}}},{"../core":19,"../util":72,"./rest":49}],52:[function(e,t,n){var r=e("../util");function o(){}function i(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function s(e,t,n,o){r.each(n.members,(function(n,r){var s=t[n];if(null!=s){var c=i(r);a(c=e?e+"."+c:c,s,r,o)}}))}function a(e,t,n,o){null!=t&&("structure"===n.type?s(e,t,n,o):"list"===n.type?function(e,t,n,o){var s=n.member||{};0!==t.length?r.arrayEach(t,(function(t,r){var c="."+(r+1);if("ec2"===n.api.protocol)c+="";else if(n.flattened){if(s.name){var u=e.split(".");u.pop(),u.push(i(s)),e=u.join(".")}}else c="."+(s.name?s.name:"member")+c;a(e+c,t,s,o)})):o.call(this,e,null)}(e,t,n,o):"map"===n.type?function(e,t,n,o){var i=1;r.each(t,(function(t,r){var s=(n.flattened?".":".entry.")+i+++".",c=s+(n.key.name||"key"),u=s+(n.value.name||"value");a(e+c,t,n.key,o),a(e+u,r,n.value,o)}))}(e,t,n,o):o(e,n.toWireFormat(t).toString()))}o.prototype.serialize=function(e,t,n){s("",e,t,n)},t.exports=o},{"../util":72}],53:[function(e,t,n){t.exports={now:function(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}}},{}],54:[function(e,t,n){t.exports={isFipsRegion:function(e){return"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},isGlobalRegion:function(e){return"string"==typeof e&&["aws-global","aws-us-gov-global"].includes(e)},getRealRegion:function(e){return["fips-aws-global","aws-fips","aws-global"].includes(e)?"us-east-1":["fips-aws-us-gov-global","aws-us-gov-global"].includes(e)?"us-gov-west-1":e.replace(/fips-(dkr-|prod-)?|-fips/,"")}}},{}],55:[function(e,t,n){var r=e("./util"),o=e("./region_config_data.json");function i(e,t){r.each(t,(function(t,n){"globalEndpoint"!==t&&(void 0!==e.config[t]&&null!==e.config[t]||(e.config[t]=n))}))}t.exports={configureEndpoint:function(e){for(var t=function(e){var t=e.config.region,n=function(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}(t),r=e.api.endpointPrefix;return[[t,r],[n,r],[t,"*"],[n,"*"],["*",r],["*","*"]].map((function(e){return e[0]&&e[1]?e.join("/"):null}))}(e),n=e.config.useFipsEndpoint,r=e.config.useDualstackEndpoint,s=0;s=0){c=!0;var u=0}var l=function(){c&&u!==a?o.emit("error",n.util.error(new Error("Stream content length mismatch. Received "+u+" of "+a+" bytes."),{code:"StreamContentLengthMismatch"})):2===n.HttpClient.streamsApiVersion?o.end():o.emit("end")},p=s.httpResponse.createUnbufferedStream();if(2===n.HttpClient.streamsApiVersion)if(c){var d=new e.PassThrough;d._write=function(t){return t&&t.length&&(u+=t.length),e.PassThrough.prototype._write.apply(this,arguments)},d.on("end",l),o.on("error",(function(e){c=!1,p.unpipe(d),d.emit("end"),d.end()})),p.pipe(d).pipe(o,{end:!1})}else p.pipe(o);else c&&p.on("data",(function(e){e&&e.length&&(u+=e.length)})),p.on("data",(function(e){o.emit("data",e)})),p.on("end",l);p.on("error",(function(e){c=!1,o.emit("error",e)}))}})),o},emitEvent:function(e,t,r){"function"==typeof t&&(r=t,t=null),r||(r=function(){}),t||(t=this.eventParameters(e,this.response)),n.SequentialExecutor.prototype.emit.call(this,e,t,(function(e){e&&(this.response.error=e),r.call(this,e)}))},eventParameters:function(e){switch(e){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]}},presign:function(e,t){return t||"function"!=typeof e||(t=e,e=null),(new n.Signers.Presign).sign(this.toGet(),e,t)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",n.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",n.EventListeners.Core.SIGN),this},toGet:function(){return"query"!==this.service.api.protocol&&"ec2"!==this.service.api.protocol||(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),n.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return this.httpRequest.appendToUserAgent("promise"),new e((function(e,n){t.on("complete",(function(t){t.error?n(t.error):e(Object.defineProperty(t.data||{},"$response",{value:t}))})),t.runTo()}))}},n.Request.deletePromisesFromClass=function(){delete this.prototype.promise},n.util.addPromises(n.Request),n.util.mixin(n.Request,n.SequentialExecutor)}).call(this)}).call(this,e("_process"))},{"./core":19,"./state_machine":71,_process:90,jmespath:89}],58:[function(e,t,n){var r=e("./core"),o=r.util.inherit,i=e("jmespath");function s(e){var t=e.request._waiter,n=t.config.acceptors,r=!1,o="retry";n.forEach((function(n){if(!r){var i=t.matchers[n.matcher];i&&i(e,n.expected,n.argument)&&(r=!0,o=n.state)}})),!r&&e.error&&(o="failure"),"success"===o?t.setSuccess(e):t.setError(e,"retry"===o)}r.ResourceWaiter=o({constructor:function(e,t){this.service=e,this.state=t,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,n){try{var r=i.search(e.data,n)}catch(e){return!1}return i.strictDeepEqual(r,t)},pathAll:function(e,t,n){try{var r=i.search(e.data,n)}catch(e){return!1}Array.isArray(r)||(r=[r]);var o=r.length;if(!o)return!1;for(var s=0;s-1&&n.splice(o,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,n){n||(n=function(){});var r=this.listeners(e),o=r.length;return this.callListeners(r,t,n),o>0},callListeners:function(e,t,n,o){var i=this,s=o||null;function a(o){if(o&&(s=r.util.error(s||new Error,o),i._haltHandlersOnError))return n.call(i,s);i.callListeners(e,t,n,s)}for(;e.length>0;){var c=e.shift();if(c._isAsync)return void c.apply(i,t.concat([a]));try{c.apply(i,t)}catch(e){s=r.util.error(s||new Error,e)}if(s&&i._haltHandlersOnError)return void n.call(i,s)}n.call(i,s)},addListeners:function(e){var t=this;return e._events&&(e=e._events),r.util.each(e,(function(e,n){"function"==typeof n&&(n=[n]),r.util.arrayEach(n,(function(n){t.on(e,n)}))})),t},addNamedListener:function(e,t,n,r){return this[e]=n,this.addListener(t,n,r),this},addNamedAsyncListener:function(e,t,n,r){return n._isAsync=!0,this.addNamedListener(e,t,n,r)},addNamedListeners:function(e){var t=this;return e((function(){t.addNamedListener.apply(t,arguments)}),(function(){t.addNamedAsyncListener.apply(t,arguments)})),this}}),r.SequentialExecutor.prototype.addListener=r.SequentialExecutor.prototype.on,t.exports=r.SequentialExecutor},{"./core":19}],61:[function(e,t,n){(function(n){(function(){var r=e("./core"),o=e("./model/api"),i=e("./region_config"),s=r.util.inherit,a=0,c=e("./region/utils");r.Service=s({constructor:function(e){if(!this.loadServiceClass)throw r.util.error(new Error,"Service must be constructed with `new' operator");if(e){if(e.region){var t=e.region;c.isFipsRegion(t)&&(e.region=c.getRealRegion(t),e.useFipsEndpoint=!0),c.isGlobalRegion(t)&&(e.region=c.getRealRegion(t))}"boolean"==typeof e.useDualstack&&"boolean"!=typeof e.useDualstackEndpoint&&(e.useDualstackEndpoint=e.useDualstack)}var n=this.loadServiceClass(e||{});if(n){var o=r.util.copy(e),i=new n(e);return Object.defineProperty(i,"_originalConfig",{get:function(){return o},enumerable:!1,configurable:!0}),i._clientId=++a,i}this.initialize(e)},initialize:function(e){var t=r.config[this.serviceIdentifier];if(this.config=new r.Config(r.config),t&&this.config.update(t,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||i.configureEndpoint(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint),r.SequentialExecutor.call(this),r.Service.addDefaultMonitoringListeners(this),(this.config.clientSideMonitoring||r.Service._clientSideMonitoring)&&this.publisher){var o=this.publisher;this.addNamedListener("PUBLISH_API_CALL","apiCall",(function(e){n.nextTick((function(){o.eventHandler(e)}))})),this.addNamedListener("PUBLISH_API_ATTEMPT","apiCallAttempt",(function(e){n.nextTick((function(){o.eventHandler(e)}))}))}},validateService:function(){},loadServiceClass:function(e){var t=e;if(r.util.isEmpty(this.api)){if(t.apiConfig)return r.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){(t=new r.Config(r.config)).update(e,!0);var n=t.apiVersions[this.constructor.serviceIdentifier];return n=n||t.apiVersion,this.getLatestServiceClass(n)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&r.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e?r.util.isType(e,Date)&&(e=r.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(),n=null,o=t.length-1;o>=0;o--)if("*"!==t[o][t[o].length-1]&&(n=t[o]),t[o].substr(0,10)<=e)return n;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,customizeRequests:function(e){if(e){if("function"!=typeof e)throw new Error("Invalid callback type '"+typeof e+"' provided in customizeRequests");this.customRequestHandler=e}else this.customRequestHandler=null},makeRequest:function(e,t,n){if("function"==typeof t&&(n=t,t=null),t=t||{},this.config.params){var o=this.api.operations[e];o&&(t=r.util.copy(t),r.util.each(this.config.params,(function(e,n){o.input.members[e]&&(void 0!==t[e]&&null!==t[e]||(t[e]=n))})))}var i=new r.Request(this,e,t);return this.addAllRequestListeners(i),this.attachMonitoringEmitter(i),n&&i.send(n),i},makeUnauthenticatedRequest:function(e,t,n){"function"==typeof t&&(n=t,t={});var r=this.makeRequest(e,t).toUnauthenticated();return n?r.send(n):r},waitFor:function(e,t,n){return new r.ResourceWaiter(this,e).wait(t,n)},addAllRequestListeners:function(e){for(var t=[r.events,r.EventListeners.Core,this.serviceInterface(),r.EventListeners.CorePost],n=0;n299?(o.code&&(n.FinalAwsException=o.code),o.message&&(n.FinalAwsExceptionMessage=o.message)):((o.code||o.name)&&(n.FinalSdkException=o.code||o.name),o.message&&(n.FinalSdkExceptionMessage=o.message))}return n},apiAttemptEvent:function(e){var t=e.service.api.operations[e.operation],n={Type:"ApiCallAttempt",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Fqdn:e.httpRequest.endpoint.hostname,UserAgent:e.httpRequest.getUserAgent()},r=e.response;return r.httpResponse.statusCode&&(n.HttpStatusCode=r.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials&&e.service.config.credentials.accessKeyId&&(n.AccessKey=e.service.config.credentials.accessKeyId),r.httpResponse.headers?(e.httpRequest.headers["x-amz-security-token"]&&(n.SessionToken=e.httpRequest.headers["x-amz-security-token"]),r.httpResponse.headers["x-amzn-requestid"]&&(n.XAmznRequestId=r.httpResponse.headers["x-amzn-requestid"]),r.httpResponse.headers["x-amz-request-id"]&&(n.XAmzRequestId=r.httpResponse.headers["x-amz-request-id"]),r.httpResponse.headers["x-amz-id-2"]&&(n.XAmzId2=r.httpResponse.headers["x-amz-id-2"]),n):n},attemptFailEvent:function(e){var t=this.apiAttemptEvent(e),n=e.response,r=n.error;return n.httpResponse.statusCode>299?(r.code&&(t.AwsException=r.code),r.message&&(t.AwsExceptionMessage=r.message)):((r.code||r.name)&&(t.SdkException=r.code||r.name),r.message&&(t.SdkExceptionMessage=r.message)),t},attachMonitoringEmitter:function(e){var t,n,o,i,s,a,c=0,u=this;e.on("validate",(function(){i=r.util.realClock.now(),a=Date.now()}),!0),e.on("sign",(function(){n=r.util.realClock.now(),t=Date.now(),s=e.httpRequest.region,c++}),!0),e.on("validateResponse",(function(){o=Math.round(r.util.realClock.now()-n)})),e.addNamedListener("API_CALL_ATTEMPT","success",(function(){var n=u.apiAttemptEvent(e);n.Timestamp=t,n.AttemptLatency=o>=0?o:0,n.Region=s,u.emit("apiCallAttempt",[n])})),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",(function(){var i=u.attemptFailEvent(e);i.Timestamp=t,o=o||Math.round(r.util.realClock.now()-n),i.AttemptLatency=o>=0?o:0,i.Region=s,u.emit("apiCallAttempt",[i])})),e.addNamedListener("API_CALL","complete",(function(){var t=u.apiCallEvent(e);if(t.AttemptCount=c,!(t.AttemptCount<=0)){t.Timestamp=a;var n=Math.round(r.util.realClock.now()-i);t.Latency=n>=0?n:0;var o=e.response;o.error&&o.error.retryable&&"number"==typeof o.retryCount&&"number"==typeof o.maxRetries&&o.retryCount>=o.maxRetries&&(t.MaxRetriesExceeded=1),u.emit("apiCall",[t])}}))},setupRequestListeners:function(e){},getSigningName:function(){return this.api.signingName||this.api.endpointPrefix},getSignerClass:function(e){var t,n=null,o="";return e&&(o=(n=(e.service.api.operations||{})[e.operation]||null)?n.authtype:""),t=this.config.signatureVersion?this.config.signatureVersion:"v4"===o||"v4-unsigned-body"===o?"v4":this.api.signatureVersion,r.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return r.EventListeners.Query;case"json":return r.EventListeners.Json;case"rest-json":return r.EventListeners.RestJson;case"rest-xml":return r.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e,t){return r.util.calculateRetryDelay(e,this.config.retryDelayOptions,t)},retryableError:function(e){return!!this.timeoutError(e)||!!this.networkingError(e)||!!this.expiredCredentialsError(e)||!!this.throttledError(e)||e.statusCode>=500},networkingError:function(e){return"NetworkingError"===e.code},timeoutError:function(e){return"TimeoutError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(e){e&&(this.config.systemClockOffset=e-Date.now())},isClockSkewed:function(e){if(e)return Math.abs(this.getSkewCorrectedDate().getTime()-e)>=3e5},throttledError:function(e){if(429===e.statusCode)return!0;switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"RequestThrottledException":case"TooManyRequestsException":case"TransactionInProgressException":case"EC2ThrottledException":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return t=(t=(t=t.replace(/\{service\}/g,this.api.endpointPrefix)).replace(/\{region\}/g,this.config.region)).replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new r.Endpoint(e,this.config)},paginationConfig:function(e,t){var n=this.api.operations[e].paginator;if(!n){if(t){var o=new Error;throw r.util.error(o,"No pagination configuration for "+e)}return null}return n}}),r.util.update(r.Service,{defineMethods:function(e){r.util.each(e.prototype.api.operations,(function(t){e.prototype[t]||("none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,n){return this.makeUnauthenticatedRequest(t,e,n)}:e.prototype[t]=function(e,n){return this.makeRequest(t,e,n)})}))},defineService:function(e,t,n){r.Service._serviceMap[e]=!0,Array.isArray(t)||(n=t,t=[]);var o=s(r.Service,n||{});if("string"==typeof e){r.Service.addVersions(o,t);var i=o.serviceIdentifier||e;o.serviceIdentifier=i}else o.prototype.api=e,r.Service.defineMethods(o);if(r.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&r.util.clientSideMonitoring){var a=r.util.clientSideMonitoring.Publisher,c=(0,r.util.clientSideMonitoring.configProvider)();this.prototype.publisher=new a(c),c.enabled&&(r.Service._clientSideMonitoring=!0)}return r.SequentialExecutor.call(o.prototype),r.Service.addDefaultMonitoringListeners(o.prototype),o},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var n=0;n604800)throw r.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1});e.httpRequest.headers[i]=t}else{if(n!==r.Signers.S3)throw r.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});var o=e.service?e.service.getSkewCorrectedDate():r.util.date.getDate();e.httpRequest.headers[i]=parseInt(r.util.date.unixTimestamp(o)+t,10).toString()}}function a(e){var t=e.httpRequest.endpoint,n=r.util.urlParse(e.httpRequest.path),o={};n.search&&(o=r.util.queryStringParse(n.search.substr(1)));var s=e.httpRequest.headers.Authorization.split(" ");if("AWS"===s[0])s=s[1].split(":"),o.Signature=s.pop(),o.AWSAccessKeyId=s.join(":"),r.util.each(e.httpRequest.headers,(function(e,t){e===i&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete o[e],e=e.toLowerCase()),o[e]=t})),delete e.httpRequest.headers[i],delete o.Authorization,delete o.Host;else if("AWS4-HMAC-SHA256"===s[0]){s.shift();var a=s.join(" ").match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];o["X-Amz-Signature"]=a,delete o.Expires}t.pathname=n.pathname,t.search=r.util.queryParamsToString(o)}r.Signers.Presign=o({sign:function(e,t,n){if(e.httpRequest.headers[i]=t||3600,e.on("build",s),e.on("sign",a),e.removeListener("afterBuild",r.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",r.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!n){if(e.build(),e.response.error)throw e.response.error;return r.util.urlFormat(e.httpRequest.endpoint)}e.build((function(){this.response.error?n(this.response.error):n(null,r.util.urlFormat(e.httpRequest.endpoint))}))}}),t.exports=r.Signers.Presign},{"../core":19}],64:[function(e,t,n){var r=e("../core"),o=r.util.inherit;r.Signers.RequestSigner=o({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),r.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return r.Signers.V2;case"v3":return r.Signers.V3;case"s3v4":case"v4":return r.Signers.V4;case"s3":return r.Signers.S3;case"v3https":return r.Signers.V3Https}throw new Error("Unknown signing version "+e)},e("./v2"),e("./v3"),e("./v3https"),e("./v4"),e("./s3"),e("./presign")},{"../core":19,"./presign":63,"./s3":65,"./v2":66,"./v3":67,"./v3https":68,"./v4":69}],65:[function(e,t,n){var r=e("../core"),o=r.util.inherit;r.Signers.S3=o(r.Signers.RequestSigner,{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},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(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=r.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var n=this.sign(e.secretAccessKey,this.stringToSign()),o="AWS "+e.accessKeyId+":"+n;this.request.headers.Authorization=o},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var n=this.canonicalizedAmzHeaders();return n&&t.push(n),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];r.util.each(this.request.headers,(function(t){t.match(/^x-amz-/i)&&e.push(t)})),e.sort((function(e,t){return e.toLowerCase()=0?"&":"?";this.request.path+=i+r.util.queryParamsToString(o)},authorization:function(e,t){var n=[],r=this.credentialString(t);return n.push(this.algorithm+" Credential="+e.accessKeyId+"/"+r),n.push("SignedHeaders="+this.signedHeaders()),n.push("Signature="+this.signature(e,t)),n.join(", ")},signature:function(e,t){var n=o.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return r.util.crypto.hmac(n,this.stringToSign(t),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var e=[],t=this.request.pathname();return"s3"!==this.serviceName&&"s3v4"!==this.signatureVersion&&(t=r.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var e=[];r.util.each.call(this,this.request.headers,(function(t,n){e.push([t,n])})),e.sort((function(e,t){return e[0].toLowerCase()-1&&!e.body?"UNSIGNED-PAYLOAD":e.headers["X-Amz-Content-Sha256"]?e.headers["X-Amz-Content-Sha256"]:this.hexEncodedHash(this.request.body||"")},unsignableHeaders:["authorization","content-type","content-length","user-agent",s,"expect","x-amzn-trace-id"],isSignableHeader:function(e){return 0===e.toLowerCase().indexOf("x-amz-")||this.unsignableHeaders.indexOf(e)<0},isPresigned:function(){return!!this.request.headers[s]}}),t.exports=r.Signers.V4},{"../core":19,"./v4_credentials":70}],70:[function(e,t,n){var r=e("../core"),o={},i=[],s="aws4_request";t.exports={createScope:function(e,t,n){return[e.substr(0,8),t,n,s].join("/")},getSigningKey:function(e,t,n,a,c){var u=[r.util.crypto.hmac(e.secretAccessKey,e.accessKeyId,"base64"),t,n,a].join("_");if((c=!1!==c)&&u in o)return o[u];var l=r.util.crypto.hmac("AWS4"+e.secretAccessKey,t,"buffer"),p=r.util.crypto.hmac(l,n,"buffer"),d=r.util.crypto.hmac(p,a,"buffer"),h=r.util.crypto.hmac(d,s,"buffer");return c&&(o[u]=h,i.push(u),i.length>50&&delete o[i.shift()]),h},emptyCache:function(){o={},i=[]}}},{"../core":19}],71:[function(e,t,n){function r(e,t){this.currentState=t||null,this.states=e||{}}r.prototype.runTo=function(e,t,n,r){"function"==typeof e&&(r=n,n=t,t=e,e=null);var o=this,i=o.states[o.currentState];i.fn.call(n||o,r,(function(r){if(r){if(!i.fail)return t?t.call(n,r):null;o.currentState=i.fail}else{if(!i.accept)return t?t.call(n):null;o.currentState=i.accept}if(o.currentState===e)return t?t.call(n,r):null;o.runTo(e,t,n,r)}))},r.prototype.addState=function(e,t,n,r){return"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:n,fn:r},this},t.exports=r},{}],72:[function(e,t,n){(function(n,r){(function(){var o,i={environment:"nodejs",engine:function(){if(i.isBrowser()&&"undefined"!=typeof navigator)return navigator.userAgent;var e=n.platform+"/"+n.version;return n.env.AWS_EXECUTION_ENV&&(e+=" exec-env/"+n.env.AWS_EXECUTION_ENV),e},userAgent:function(){var t=i.environment,n="aws-sdk-"+t+"/"+e("./core").VERSION;return"nodejs"===t&&(n+=" "+i.engine()),n},uriEscape:function(e){var t=encodeURIComponent(e);return t=(t=t.replace(/[^A-Za-z0-9_.~\-%]+/g,escape)).replace(/[*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},uriEscapePath:function(e){var t=[];return i.arrayEach(e.split("/"),(function(e){t.push(i.uriEscape(e))})),t.join("/")},urlParse:function(e){return i.url.parse(e)},urlFormat:function(e){return i.url.format(e)},queryStringParse:function(e){return i.querystring.parse(e)},queryParamsToString:function(e){var t=[],n=i.uriEscape,r=Object.keys(e).sort();return i.arrayEach(r,(function(r){var o=e[r],s=n(r),a=s+"=";if(Array.isArray(o)){var c=[];i.arrayEach(o,(function(e){c.push(n(e))})),a=s+"="+c.sort().join("&"+s+"=")}else null!=o&&(a=s+"="+n(o));t.push(a)})),t.join("&")},readFileSync:function(t){return i.isBrowser()?null:e("fs").readFileSync(t,"utf-8")},base64:{encode:function(e){if("number"==typeof e)throw i.error(new Error("Cannot base64 encode number "+e));return null==e?e:i.buffer.toBuffer(e).toString("base64")},decode:function(e){if("number"==typeof e)throw i.error(new Error("Cannot base64 decode number "+e));return null==e?e:i.buffer.toBuffer(e,"base64")}},buffer:{toBuffer:function(e,t){return"function"==typeof i.Buffer.from&&i.Buffer.from!==Uint8Array.from?i.Buffer.from(e,t):new i.Buffer(e,t)},alloc:function(e,t,n){if("number"!=typeof e)throw new Error("size passed to alloc must be a number.");if("function"==typeof i.Buffer.alloc)return i.Buffer.alloc(e,t,n);var r=new i.Buffer(e);return void 0!==t&&"function"==typeof r.fill&&r.fill(t,void 0,void 0,n),r},toStream:function(e){i.Buffer.isBuffer(e)||(e=i.buffer.toBuffer(e));var t=new i.stream.Readable,n=0;return t._read=function(r){if(n>=e.length)return t.push(null);var o=n+r;o>e.length&&(o=e.length),t.push(e.slice(n,o)),n=o},t},concat:function(e){var t,n,r=0,o=0;for(n=0;n>>8^t[255&(n^e.readUInt8(r))];return(-1^n)>>>0},hmac:function(e,t,n,r){return n||(n="binary"),"buffer"===n&&(n=void 0),r||(r="sha256"),"string"==typeof t&&(t=i.buffer.toBuffer(t)),i.crypto.lib.createHmac(r,e).update(t).digest(n)},md5:function(e,t,n){return i.crypto.hash("md5",e,t,n)},sha256:function(e,t,n){return i.crypto.hash("sha256",e,t,n)},hash:function(e,t,n,r){var o=i.crypto.createHash(e);n||(n="binary"),"buffer"===n&&(n=void 0),"string"==typeof t&&(t=i.buffer.toBuffer(t));var s=i.arraySliceFn(t),a=i.Buffer.isBuffer(t);if(i.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(a=!0),r&&"object"==typeof t&&"function"==typeof t.on&&!a)t.on("data",(function(e){o.update(e)})),t.on("error",(function(e){r(e)})),t.on("end",(function(){r(null,o.digest(n))}));else{if(!r||!s||a||"undefined"==typeof FileReader){i.isBrowser()&&"object"==typeof t&&!a&&(t=new i.Buffer(new Uint8Array(t)));var c=o.update(t).digest(n);return r&&r(null,c),c}var u=0,l=new FileReader;l.onerror=function(){r(new Error("Failed to read data."))},l.onload=function(){var e=new i.Buffer(new Uint8Array(l.result));o.update(e),u+=e.length,l._continueReading()},l._continueReading=function(){if(u>=t.size)r(null,o.digest(n));else{var e=u+524288;e>t.size&&(e=t.size),l.readAsArrayBuffer(s.call(t,u,e))}},l._continueReading()}},toHex:function(e){for(var t=[],n=0;n=3e5,!1),o.config.isClockSkewed},applyClockOffset:function(e){e&&(o.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){var n=!1;void 0===t&&o&&o.config&&(t=o.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(n=!0),Array.isArray(e)||(e=[e]);for(var r=0;r=0)return a++,void setTimeout(u,o+(e.retryAfter||0))}n(e)},u=function(){var t="";r.handleRequest(e,s,(function(e){e.on("data",(function(e){t+=e.toString()})),e.on("end",(function(){var r=e.statusCode;if(r<300)n(null,t);else{var o=1e3*parseInt(e.headers["retry-after"],10)||0,s=i.error(new Error,{statusCode:r,retryable:r>=500||429===r});o&&s.retryable&&(s.retryAfter=o),c(s)}}))}),c)};o.util.defer(u)},uuid:{v4:function(){return e("uuid").v4()}},convertPayloadToString:function(e){var t=e.request,n=t.operation,r=t.service.api.operations[n].output||{};r.payload&&e.data[r.payload]&&(e.data[r.payload]=e.data[r.payload].toString())},defer:function(e){"object"==typeof n&&"function"==typeof n.nextTick?n.nextTick(e):"function"==typeof r?r(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var t=e.service.api.operations;if(t){var n=(t||{})[e.operation];if(n&&n.input&&n.input.payload)return n.input.members[n.input.payload]}},getProfilesFromSharedConfig:function(e,t){var r={},o={};n.env[i.configOptInEnv]&&(o=e.loadFrom({isConfig:!0,filename:n.env[i.sharedConfigFileEnv]}));var s={};try{s=e.loadFrom({filename:t||n.env[i.configOptInEnv]&&n.env[i.sharedCredentialsFileEnv]})}catch(e){if(!n.env[i.configOptInEnv])throw e}for(var a=0,c=Object.keys(o);a=6},parse:function(e){var t=e.split(":");return{partition:t[1],service:t[2],region:t[3],accountId:t[4],resource:t.slice(5).join(":")}},build:function(e){if(void 0===e.service||void 0===e.region||void 0===e.accountId||void 0===e.resource)throw i.error(new Error("Input ARN object is invalid"));return"arn:"+(e.partition||"aws")+":"+e.service+":"+e.region+":"+e.accountId+":"+e.resource}},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};t.exports=i}).call(this)}).call(this,e("_process"),e("timers").setImmediate)},{"../apis/metadata.json":4,"./core":19,_process:90,fs:80,timers:97,uuid:100}],73:[function(e,t,n){var r=e("../util"),o=e("../model/shape");function i(){}function s(e,t){for(var n=e.getElementsByTagName(t),r=0,o=n.length;r0||r?i.toString():""},t.exports=s},{"../util":72,"./xml-node":77,"./xml-text":78}],75:[function(e,t,n){t.exports={escapeAttribute:function(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(//g,">").replace(/"/g,""")}}},{}],76:[function(e,t,n){t.exports={escapeElement:function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}}},{}],77:[function(e,t,n){var r=e("./escape-attribute").escapeAttribute;function o(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}o.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},o.prototype.addChildNode=function(e){return this.children.push(e),this},o.prototype.removeAttribute=function(e){return delete this.attributes[e],this},o.prototype.toString=function(){for(var e=Boolean(this.children.length),t="<"+this.name,n=this.attributes,o=0,i=Object.keys(n);o"+this.children.map((function(e){return e.toString()})).join("")+"":"/>")},t.exports={XmlNode:o}},{"./escape-attribute":75}],78:[function(e,t,n){var r=e("./escape-element").escapeElement;function o(e){this.value=e}o.prototype.toString=function(){return r(""+this.value)},t.exports={XmlText:o}},{"./escape-element":76}],79:[function(e,t,n){"use strict";n.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=u(e),s=r[0],a=r[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),l=0,p=a>0?s-4:s;for(n=0;n>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,c[l++]=255&t),1===a&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},n.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,c=n-o;ac?c:a+s));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,s=[],a=t;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],80:[function(e,t,n){},{}],81:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],82:[function(e,t,o){(function(e){(function(){!function(i){"object"==typeof o&&o&&o.nodeType,"object"==typeof t&&t&&t.nodeType;var s="object"==typeof e&&e;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=36,l=/^xn--/,p=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,g=String.fromCharCode;function m(e){throw RangeError(h[e])}function v(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+v((e=e.replace(d,".")).split("."),t).join(".")}function E(e){for(var t,n,r=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,n){var r=0;for(e=n?f(e/700):e>>1,e+=f(e/t);e>455;r+=u)e=f(e/35);return f(r+36*e/(e+38))}function C(e){var t,n,r,o,i,s,a,l,p,d,h,g=[],v=e.length,y=0,E=128,b=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&m("not-basic"),g.push(e.charCodeAt(r));for(o=n>0?n+1:0;o=v&&m("invalid-input"),((l=(h=e.charCodeAt(o++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:u)>=u||l>f((c-y)/s))&&m("overflow"),y+=l*s,!(l<(p=a<=b?1:a>=b+26?26:a-b));a+=u)s>f(c/(d=u-p))&&m("overflow"),s*=d;b=T(y-i,t=g.length+1,0==i),f(y/t)>c-E&&m("overflow"),E+=f(y/t),y%=t,g.splice(y++,0,E)}return S(g)}function I(e){var t,n,r,o,i,s,a,l,p,d,h,v,y,S,C,I=[];for(v=(e=E(e)).length,t=128,n=0,i=72,s=0;s=t&&hf((c-n)/(y=r+1))&&m("overflow"),n+=(a-t)*y,t=a,s=0;sc&&m("overflow"),h==t){for(l=n,p=u;!(l<(d=p<=i?1:p>=i+26?26:p-i));p+=u)C=l-d,S=u-d,I.push(g(b(d+C%S,0))),l=f(C/S);I.push(g(b(l,0))),i=T(n,y,r==o),n=0,++r}++n,++t}return I.join("")}a={version:"1.3.2",ucs2:{decode:E,encode:S},decode:C,encode:I,toASCII:function(e){return y(e,(function(e){return p.test(e)?"xn--"+I(e):e}))},toUnicode:function(e){return y(e,(function(e){return l.test(e)?C(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return a}.call(o,n,o,t))||(t.exports=r)}()}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],83:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],84:[function(e,t,r){(function(t,n){(function(){var o=/%[sdj%]/g;r.format=function(e){if(!v(e)){for(var t=[],n=0;n=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),c=r[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(t)?n.showHidden=t:t&&r._extend(n,t),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),l(n,e,n.depth)}function c(e,t){var n=a.styles[t];return n?"["+a.colors[n][0]+"m"+e+"["+a.colors[n][1]+"m":e}function u(e,t){return e}function l(e,t,n){if(e.customInspect&&t&&C(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(n,e);return v(o)||(o=l(e,o,n)),o}var i=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return m(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}(e,t);if(i)return i;var s=Object.keys(t),a=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),T(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(t);if(0===s.length){if(C(t)){var c=t.name?": "+t.name:"";return e.stylize("[Function"+c+"]","special")}if(E(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(T(t))return p(t)}var u,S="",I=!1,_=["{","}"];return h(t)&&(I=!0,_=["[","]"]),C(t)&&(S=" [Function"+(t.name?": "+t.name:"")+"]"),E(t)&&(S=" "+RegExp.prototype.toString.call(t)),b(t)&&(S=" "+Date.prototype.toUTCString.call(t)),T(t)&&(S=" "+p(t)),0!==s.length||I&&0!=t.length?n<0?E(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=I?function(e,t,n,r,o){for(var i=[],s=0,a=t.length;s60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(u,S,_)):_[0]+S+_[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,o,i){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),R(r,o)||(s="["+o+"]"),a||(e.seen.indexOf(c.value)<0?(a=g(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),y(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function v(e){return"string"==typeof e}function y(e){return void 0===e}function E(e){return S(e)&&"[object RegExp]"===I(e)}function S(e){return"object"==typeof e&&null!==e}function b(e){return S(e)&&"[object Date]"===I(e)}function T(e){return S(e)&&("[object Error]"===I(e)||e instanceof Error)}function C(e){return"function"==typeof e}function I(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(y(i)&&(i=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var n=t.pid;s[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else s[e]=function(){};return s[e]},r.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=f,r.isNull=g,r.isNullOrUndefined=function(e){return null==e},r.isNumber=m,r.isString=v,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=y,r.isRegExp=E,r.isObject=S,r.isDate=b,r.isError=T,r.isFunction=C,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(){var e=new Date,t=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){console.log("%s - %s",w(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!S(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this)}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":83,_process:90,inherits:81}],85:[function(e,t,r){(function(t,n){(function(){"use strict";var n=e("base64-js"),o=e("ieee754"),i=e("isarray");function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(e).length;default:if(r)return j(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=n;ia&&(n=a-c),i=n;i>=0;i--){for(var p=!0,d=0;do&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+p<=n)switch(p){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=p}return function(e){var t=e.length;if(t<=w)return String.fromCharCode.apply(String,e);for(var n="",r=0;r0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(r,o),l=e.slice(t,n),p=0;po)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function R(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;oo)&&(n=o);for(var i="",s=t;sn)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function x(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function B(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"base64-js":79,buffer:85,ieee754:87,isarray:88}],86:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(s(n=this._events[e]))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(i(n))for(a=Array.prototype.slice.call(arguments,1),r=(u=n.slice()).length,c=0;c0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!o(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,s,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(o(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(o(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],87:[function(e,t,n){n.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,c=(1<>1,l=-7,p=n?o-1:0,d=n?-1:1,h=e[t+p];for(p+=d,i=h&(1<<-l)-1,h>>=-l,l+=a;l>0;i=256*i+e[t+p],p+=d,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+p],p+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),i-=u}return(h?-1:1)*s*Math.pow(2,i-r)},n.write=function(e,t,n,r,o,i){var s,a,c,u=8*i-o-1,l=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,f=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(s++,c/=2),s+p>=l?(a=0,s=l):s+p>=1?(a=(t*c-1)*Math.pow(2,o),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,o),s=0));o>=8;e[n+h]=255&a,h+=f,a/=256,o-=8);for(s=s<0;e[n+h]=255&s,h+=f,s/=256,u-=8);e[n+h-f]|=128*g}},{}],88:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],89:[function(e,t,n){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e,o){if(e===o)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(o))return!1;if(!0===t(e)){if(e.length!==o.length)return!1;for(var i=0;i",9:"Array"},u="EOF",l="UnquotedIdentifier",p="QuotedIdentifier",d="Rbracket",h="Rparen",f="Comma",g="Colon",m="Rbrace",v="Number",y="Current",E="Expref",S="Pipe",b="Or",T="And",C="EQ",I="GT",_="LT",A="GTE",w="LTE",R="NE",k="Flatten",N="Star",O="Filter",L="Dot",D="Not",P="Lbrace",x="Lbracket",M="Lparen",U="Literal",F={".":L,"*":N,",":f,":":g,"{":P,"}":m,"]":d,"(":M,")":h,"@":y},q={"<":!0,">":!0,"=":!0,"!":!0},j={" ":!0,"\t":!0,"\n":!0};function B(e){return e>="0"&&e<="9"||"-"===e}function V(){}V.prototype={tokenize:function(e){var t,n,r,o,i=[];for(this._current=0;this._current="a"&&o<="z"||o>="A"&&o<="Z"||"_"===o)t=this._current,n=this._consumeUnquotedIdentifier(e),i.push({type:l,value:n,start:t});else if(void 0!==F[e[this._current]])i.push({type:F[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(B(e[this._current]))r=this._consumeNumber(e),i.push(r);else if("["===e[this._current])r=this._consumeLBracket(e),i.push(r);else if('"'===e[this._current])t=this._current,n=this._consumeQuotedIdentifier(e),i.push({type:p,value:n,start:t});else if("'"===e[this._current])t=this._current,n=this._consumeRawStringLiteral(e),i.push({type:U,value:n,start:t});else if("`"===e[this._current]){t=this._current;var s=this._consumeLiteral(e);i.push({type:U,value:s,start:t})}else if(void 0!==q[e[this._current]])i.push(this._consumeOperator(e));else if(void 0!==j[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,i.push({type:T,value:"&&",start:t})):i.push({type:E,value:"&",start:t});else{if("|"!==e[this._current]){var a=new Error("Unknown character:"+e[this._current]);throw a.name="LexerError",a}t=this._current,this._current++,"|"===e[this._current]?(this._current++,i.push({type:b,value:"||",start:t})):i.push({type:S,value:"|",start:t})}return i},_consumeUnquotedIdentifier:function(e){var t,n=this._current;for(this._current++;this._current="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(n,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var n=e.length;'"'!==e[this._current]&&this._current"===n?"="===e[this._current]?(this._current++,{type:A,value:">=",start:t}):{type:I,value:">",start:t}:"="===n&&"="===e[this._current]?(this._current++,{type:C,value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,n=this._current,r=e.length;"`"!==e[this._current]&&this._current=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var W={};function H(){}function z(e){this.runtime=e}function G(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}W.EOF=0,W.UnquotedIdentifier=0,W.QuotedIdentifier=0,W.Rbracket=0,W.Rparen=0,W.Comma=0,W.Rbrace=0,W.Number=0,W.Current=0,W.Expref=0,W.Pipe=1,W.Or=2,W.And=3,W.EQ=5,W.GT=5,W.LT=5,W.GTE=5,W.LTE=5,W.NE=5,W.Flatten=9,W.Star=20,W.Filter=21,W.Dot=40,W.Not=45,W.Lbrace=50,W.Lbracket=55,W.Lparen=60,H.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if(this._lookahead(0)!==u){var n=this._lookaheadToken(0),r=new Error("Unexpected token type: "+n.type+", value: "+n.value);throw r.name="ParserError",r}return t},_loadTokens:function(e){var t=(new V).tokenize(e);t.push({type:u,value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var n=this.nud(t),r=this._lookahead(0);e=0?this.expression(e):t===x?(this._match(x),this._parseMultiselectList()):t===P?(this._match(P),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(W[this._lookahead(0)]<10)t={type:"Identity"};else if(this._lookahead(0)===x)t=this.expression(e);else if(this._lookahead(0)===O)t=this.expression(e);else{if(this._lookahead(0)!==L){var n=this._lookaheadToken(0),r=new Error("Sytanx error, unexpected token: "+n.value+"("+n.type+")");throw r.name="ParserError",r}this._match(L),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];this._lookahead(0)!==d;){var t=this.expression(0);if(e.push(t),this._lookahead(0)===f&&(this._match(f),this._lookahead(0)===d))throw new Error("Unexpected token Rbracket")}return this._match(d),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,n,r=[],o=[l,p];;){if(e=this._lookaheadToken(0),o.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match(g),n={type:"KeyValuePair",name:t,value:this.expression(0)},r.push(n),this._lookahead(0)===f)this._match(f);else if(this._lookahead(0)===m){this._match(m);break}}return{type:"MultiSelectHash",children:r}}},z.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,i){var s,a,c,u,l,p,d,h,f;switch(e.type){case"Field":return null!==i&&n(i)?void 0===(p=i[e.name])?null:p:null;case"Subexpression":for(c=this.visit(e.children[0],i),f=1;f0)for(f=b;fT;f+=N)c.push(i[f]);return c;case"Projection":var O=this.visit(e.children[0],i);if(!t(O))return null;for(h=[],f=0;fl;break;case A:c=u>=l;break;case _:c=u=e&&(t=n<0?e-1:e),t}},G.prototype={callFunction:function(e,t){var n=this.functionTable[e];if(void 0===n)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,n._signature),n._func.call(this,t)},_validateArgs:function(e,t,n){var r,o,i,s;if(n[n.length-1].variadic){if(t.length=0;r--)n+=t[r];return n}var o=e[0].slice(0);return o.reverse(),o},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,n=e[0],r=0;r=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return n(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],n=this._interpreter,r=e[0],o=e[1],i=0;i0){if(this._getTypeName(e[0][0])===s)return Math.max.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;r0){if(this._getTypeName(e[0][0])===s)return Math.min.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;ra?1:sc&&(c=n,t=o[u]);return t},_functionMinBy:function(e){for(var t,n,r=e[1],o=e[0],i=this.createKeyFunction(r,[s,a]),c=1/0,u=0;u1)for(var n=1;n0&&u>c&&(u=c);for(var l=0;l=0?(p=g.substr(0,m),d=g.substr(m+1)):(p=g,d=""),h=decodeURIComponent(p),f=decodeURIComponent(d),r(s,h)?o(s[h])?s[h].push(f):s[h]=[s[h],f]:s[h]=f}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],92:[function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(s(e),(function(s){var a=encodeURIComponent(r(s))+n;return o(e[s])?i(e[s],(function(e){return a+encodeURIComponent(r(e))})).join(t):a+encodeURIComponent(r(e[s]))})).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r0&&c>a&&(c=a);for(var u=0;u=0?(l=f.substr(0,g),p=f.substr(g+1)):(l=f,p=""),d=decodeURIComponent(l),h=decodeURIComponent(p),r(i,d)?Array.isArray(i[d])?i[d].push(h):i[d]=[i[d],h]:i[d]=h}return i}},{}],95:[function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,o){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var i=encodeURIComponent(r(o))+n;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(r(e))})).join(t):i+encodeURIComponent(r(e[o]))})).join(t):o?encodeURIComponent(r(o))+n+encodeURIComponent(r(e)):""}},{}],96:[function(e,t,n){arguments[4][93][0].apply(n,arguments)},{"./decode":94,"./encode":95,dup:93}],97:[function(e,t,n){(function(t,r){(function(){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,s=Array.prototype.slice,a={},c=0;function u(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new u(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new u(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&s.call(arguments,1);return a[t]=!0,o((function(){a[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete a[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":90,timers:97}],98:[function(e,t,n){var r=e("punycode");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}n.parse=v,n.resolve=function(e,t){return v(e,!1,!0).resolve(t)},n.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},n.format=function(e){return y(e)&&(e=v(e)),e instanceof o?e.format():o.prototype.format.call(e)},n.Url=o;var i=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(a),u=["%","/","?",";","#"].concat(c),l=["/","?","#"],p=/^[a-z0-9A-Z_-]{0,63}$/,d=/^([a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=e("querystring");function v(e,t,n){if(e&&E(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}function y(e){return"string"==typeof e}function E(e){return"object"==typeof e&&null!==e}function S(e){return null===e}o.prototype.parse=function(e,t,n){if(!y(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e;o=o.trim();var s=i.exec(o);if(s){var a=(s=s[0]).toLowerCase();this.protocol=a,o=o.substr(s.length)}if(n||s||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===o.substr(0,2);!v||s&&f[s]||(o=o.substr(2),this.slashes=!0)}if(!f[s]&&(v||s&&!g[s])){for(var E,S,b=-1,T=0;T127?R+="x":R+=w[k];if(!R.match(p)){var O=_.slice(0,T),L=_.slice(T+1),D=w.match(d);D&&(O.push(D[1]),L.unshift(D[2])),L.length&&(o="/"+L.join(".")+o),this.hostname=O.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!I){var P=this.hostname.split("."),x=[];for(T=0;T0)&&n.host.split("@"))&&(n.auth=b.shift(),n.host=n.hostname=b.shift())),n.search=e.search,n.query=e.query,S(n.pathname)&&S(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!p.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var h=p.slice(-1)[0],m=(n.host||e.host)&&("."===h||".."===h)||""===h,v=0,E=p.length;E>=0;E--)"."==(h=p[E])?p.splice(E,1):".."===h?(p.splice(E,1),v++):v&&(p.splice(E,1),v--);if(!u&&!l)for(;v--;v)p.unshift("..");!u||""===p[0]||p[0]&&"/"===p[0].charAt(0)||p.unshift(""),m&&"/"!==p.join("/").substr(-1)&&p.push("");var b,T=""===p[0]||p[0]&&"/"===p[0].charAt(0);return d&&(n.hostname=n.host=T?"":p.length?p.shift():"",(b=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=b.shift(),n.host=n.hostname=b.shift())),(u=u||n.host&&p.length)&&!T&&p.unshift(""),p.length?n.pathname=p.join("/"):(n.pathname=null,n.path=null),S(n.pathname)&&S(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:82,querystring:93}],99:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;for(var r=[],o=0;o<256;++o)r[o]=(o+256).toString(16).substr(1);var i=function(e,t){var n=t||0,o=r;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")};n.default=i},{}],100:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"v5",{enumerable:!0,get:function(){return s.default}});var r=a(e("./v1.js")),o=a(e("./v3.js")),i=a(e("./v4.js")),s=a(e("./v5.js"));function a(e){return e&&e.__esModule?e:{default:e}}},{"./v1.js":104,"./v3.js":105,"./v4.js":107,"./v5.js":108}],101:[function(e,t,n){"use strict";function r(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,i,s){return r((a=r(r(t,e),r(o,s)))<<(c=i)|a>>>32-c,n);var a,c}function i(e,t,n,r,i,s,a){return o(t&n|~t&r,e,t,i,s,a)}function s(e,t,n,r,i,s,a){return o(t&r|n&~r,e,t,i,s,a)}function a(e,t,n,r,i,s,a){return o(t^n^r,e,t,i,s,a)}function c(e,t,n,r,i,s,a){return o(n^(t|~r),e,t,i,s,a)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var n=0;n>5]>>>t%32&255,r=parseInt(s.charAt(n>>>4&15)+s.charAt(15&n),16),o.push(r);return o}(function(e,t){var n,o,u,l,p;e[t>>5]|=128<>>9<<4)]=t;var d=1732584193,h=-271733879,f=-1732584194,g=271733878;for(n=0;n>2)-1]=void 0,t=0;t>5]|=(255&e[t/8])<>>32-t}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=new Array(i.length);for(var s=0;s>>0;v=m,m=g,g=o(f,30)>>>0,f=h,h=E}n[0]=n[0]+h>>>0,n[1]=n[1]+f>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+v>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};n.default=i},{}],104:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o,i=a(e("./rng.js")),s=a(e("./bytesToUuid.js"));function a(e){return e&&e.__esModule?e:{default:e}}var c=0,u=0,l=function(e,t,n){var a=t&&n||0,l=t||[],p=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==p||null==d){var h=e.random||(e.rng||i.default)();null==p&&(p=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=o=16383&(h[6]<<8|h[7]))}var f=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:u+1,m=f-c+(g-u)/1e4;if(m<0&&void 0===e.clockseq&&(d=d+1&16383),(m<0||f>c)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=f,u=g,o=d;var v=(1e4*(268435455&(f+=122192928e5))+g)%4294967296;l[a++]=v>>>24&255,l[a++]=v>>>16&255,l[a++]=v>>>8&255,l[a++]=255&v;var y=f/4294967296*1e4&268435455;l[a++]=y>>>8&255,l[a++]=255&y,l[a++]=y>>>24&15|16,l[a++]=y>>>16&255,l[a++]=d>>>8|128,l[a++]=255&d;for(var E=0;E<6;++E)l[a+E]=p[E];return t||(0,s.default)(l)};n.default=l},{"./bytesToUuid.js":99,"./rng.js":102}],105:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(e("./v35.js")),o=i(e("./md5.js"));function i(e){return e&&e.__esModule?e:{default:e}}var s=(0,r.default)("v3",48,o.default);n.default=s},{"./md5.js":101,"./v35.js":106}],106:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t,n){var r=function(e,r,i,s){var a=i&&s||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),n=0;n=0;i--)o[i].Expire{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,t.ClientMethods=t.makeEnum(["getAgentSnapshot","putAgentState","getAgentStates","getDialableCountryCodes","getRoutingProfileQueues","getAgentPermissions","getAgentConfiguration","updateAgentConfiguration","acceptContact","createOutboundContact","createTaskContact","clearContact","completeContact","destroyContact","rejectContact","notifyContactIssue","updateContactAttributes","createAdditionalConnection","destroyConnection","holdConnection","resumeConnection","toggleActiveConnections","conferenceConnections","sendClientLogs","sendDigits","sendSoftphoneCallReport","sendSoftphoneCallMetrics","getEndpoints","getNewAuthToken","createTransport","muteParticipant","unmuteParticipant","updateMonitorParticipantState"]),t.AgentAppClientMethods={GET_CONTACT:"AgentAppService.Lcms.getContact",DELETE_SPEAKER:"AgentAppService.VoiceId.deleteSpeaker",ENROLL_BY_SESSION:"AgentAppService.VoiceId.enrollBySession",EVALUATE_SESSION:"AgentAppService.VoiceId.evaluateSession",DESCRIBE_SPEAKER:"AgentAppService.VoiceId.describeSpeaker",OPT_OUT_SPEAKER:"AgentAppService.VoiceId.optOutSpeaker",UPDATE_VOICE_ID_DATA:"AgentAppService.Lcms.updateVoiceIdData",DESCRIBE_SESSION:"AgentAppService.VoiceId.describeSession",UPDATE_SESSION:"AgentAppService.VoiceId.updateSession",START_VOICE_ID_SESSION:"AgentAppService.Nasa.startVoiceIdSession",LIST_INTEGRATION_ASSOCIATIONS:"AgentAppService.Acs.listIntegrationAssociations"},t.MasterMethods=t.makeEnum(["becomeMaster","checkMaster"]),t.TaskTemplatesClientMethods=t.makeEnum(["listTaskTemplates","getTaskTemplate","createTemplatedTask","updateContact"]);var n=function(){};n.EMPTY_CALLBACKS={success:function(){},failure:function(){}},n.prototype.call=function(e,r,o){t.assertNotNull(e,"method");var i=r||{},s=o||n.EMPTY_CALLBACKS;this._callImpl(e,i,s)},n.prototype._callImpl=function(e,n,r){throw new t.NotImplementedError};var r=function(){n.call(this)};(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype._callImpl=function(e,n,r){if(r&&r.failure){var o=t.sprintf("No such method exists on NULL client: %s",e);r.failure(new t.ValueError(o),{message:o})}};var o=function(e,r,o){n.call(this),this.conduit=e,this.requestEvent=r,this.responseEvent=o,this._requestIdCallbacksMap={},this.conduit.onUpstream(o,t.hitch(this,this._handleResponse))};(o.prototype=Object.create(n.prototype)).constructor=o,o.prototype._callImpl=function(e,n,r){var o=t.EventFactory.createRequest(this.requestEvent,e,n);this._requestIdCallbacksMap[o.requestId]=r,this.conduit.sendUpstream(o.event,o)},o.prototype._getCallbacksForRequest=function(e){var t=this._requestIdCallbacksMap[e]||null;return null!=t&&delete this._requestIdCallbacksMap[e],t},o.prototype._handleResponse=function(e){var t=this._getCallbacksForRequest(e.requestId);null!=t&&(e.err&&t.failure?t.failure(e.err,e.data):t.success&&t.success(e.data))};var i=function(e){o.call(this,e,t.EventType.API_REQUEST,t.EventType.API_RESPONSE)};(i.prototype=Object.create(o.prototype)).constructor=i;var s=function(e){o.call(this,e,t.EventType.MASTER_REQUEST,t.EventType.MASTER_RESPONSE)};(s.prototype=Object.create(o.prototype)).constructor=s;var a=function(e,r,o){t.assertNotNull(e,"authCookieName"),t.assertNotNull(r,"authToken"),t.assertNotNull(o,"endpoint"),n.call(this),this.endpointUrl=t.getUrlWithProtocol(o),this.authToken=r,this.authCookieName=e};(a.prototype=Object.create(n.prototype)).constructor=a,a.prototype._callImpl=function(e,n,r){var o=this,i={};i[o.authCookieName]=o.authToken;var s={method:"post",body:JSON.stringify(n||{}),headers:{Accept:"application/json","Content-Type":"application/json","X-Amz-target":e,"X-Amz-Bearer":JSON.stringify(i)}};t.fetch(o.endpointUrl,s).then((function(e){r.success(e)})).catch((function(e){const t=e.body.getReader();let n="";const o=new TextDecoder;t.read().then((function i({done:s,value:a}){if(s){var c=JSON.parse(n);return c.status=e.status,void r.failure(c)}return n+=o.decode(a),t.read().then(i)}))}))};var c=function(e,r,o){t.assertNotNull(e,"authToken"),t.assertNotNull(r,"region"),n.call(this),AWS.config.credentials=new AWS.Credentials({}),AWS.config.region=r,this.authToken=e;var i=t.getBaseUrl(),s=o||(i.includes(".awsapps.com")?i+"/connect/api":i+"/api"),a=new AWS.Endpoint(s);this.client=new AWS.Connect({endpoint:a})};(c.prototype=Object.create(n.prototype)).constructor=c,c.prototype._callImpl=function(e,n,r){var o=this,i=t.getLog();if(t.contains(this.client,e))n=this._translateParams(e,n),i.trace("AWSClient: --\x3e Calling operation '%s'",e).sendInternalLogToServer(),this.client[e](n).on("build",(function(e){e.httpRequest.headers["X-Amz-Bearer"]=o.authToken})).send((function(n,o){try{if(n){if(n.code===t.CTIExceptions.UNAUTHORIZED_EXCEPTION)r.authFailure();else if(!r.accessDenied||n.code!==t.CTIExceptions.ACCESS_DENIED_EXCEPTION&&403!==n.statusCode){var s={};if(s.type=n.code,s.message=n.message,s.stack=[],n.stack)try{Array.isArray(n.stack)?s.stack=n.stack:"object"==typeof n.stack?s.stack=[JSON.stringify(n.stack)]:"string"==typeof n.stack&&(s.stack=n.stack.split("\n"))}catch{}r.failure(s,o)}else r.accessDenied();i.trace("AWSClient: <-- Operation '%s' failed: %s",e,JSON.stringify(n)).sendInternalLogToServer()}else i.trace("AWSClient: <-- Operation '%s' succeeded.",e).withObject(o).sendInternalLogToServer(),r.success(o)}catch(n){t.getLog().error("Failed to handle AWS API request for method %s",e).withException(n).sendInternalLogToServer()}}));else{var s=t.sprintf("No such method exists on AWS client: %s",e);r.failure(new t.ValueError(s),{message:s})}},c.prototype._requiresAuthenticationParam=function(e){return e!==t.ClientMethods.COMPLETE_CONTACT&&e!==t.ClientMethods.CLEAR_CONTACT&&e!==t.ClientMethods.REJECT_CONTACT&&e!==t.ClientMethods.CREATE_TASK_CONTACT&&e!==t.ClientMethods.UPDATE_MONITOR_PARTICIPANT_STATE},c.prototype._translateParams=function(e,n){switch(e){case t.ClientMethods.UPDATE_AGENT_CONFIGURATION:n.configuration=this._translateAgentConfiguration(n.configuration);break;case t.ClientMethods.SEND_SOFTPHONE_CALL_METRICS:n.softphoneStreamStatistics=this._translateSoftphoneStreamStatistics(n.softphoneStreamStatistics);break;case t.ClientMethods.SEND_SOFTPHONE_CALL_REPORT:n.report=this._translateSoftphoneCallReport(n.report)}return this._requiresAuthenticationParam(e)&&(n.authentication={authToken:this.authToken}),n},c.prototype._translateAgentConfiguration=function(e){return{name:e.name,softphoneEnabled:e.softphoneEnabled,softphoneAutoAccept:e.softphoneAutoAccept,extension:e.extension,routingProfile:this._translateRoutingProfile(e.routingProfile),agentPreferences:e.agentPreferences}},c.prototype._translateRoutingProfile=function(e){return{name:e.name,routingProfileARN:e.routingProfileARN,defaultOutboundQueue:this._translateQueue(e.defaultOutboundQueue)}},c.prototype._translateQueue=function(e){return{queueARN:e.queueARN,name:e.name}},c.prototype._translateSoftphoneStreamStatistics=function(e){return e.forEach((function(e){"packetsCount"in e&&(e.packetCount=e.packetsCount,delete e.packetsCount)})),e},c.prototype._translateSoftphoneCallReport=function(e){return"handshakingTimeMillis"in e&&(e.handshakeTimeMillis=e.handshakingTimeMillis,delete e.handshakingTimeMillis),"preTalkingTimeMillis"in e&&(e.preTalkTimeMillis=e.preTalkingTimeMillis,delete e.preTalkingTimeMillis),"handshakingFailure"in e&&(e.handshakeFailure=e.handshakingFailure,delete e.handshakingFailure),"talkingTimeMillis"in e&&(e.talkTimeMillis=e.talkingTimeMillis,delete e.talkingTimeMillis),e.softphoneStreamStatistics=this._translateSoftphoneStreamStatistics(e.softphoneStreamStatistics),e};var u=function(e){if(t.assertNotNull(e,"endpoint"),n.call(this),e.includes("/task-templates"))this.endpointUrl=t.getUrlWithProtocol(e);else{var r=new AWS.Endpoint(e),o=e.includes(".awsapps.com")?"/connect":"";this.endpointUrl=t.getUrlWithProtocol(`${r.host}${o}/task-templates/api/ccp`)}};(u.prototype=Object.create(n.prototype)).constructor=u,u.prototype._callImpl=function(e,n,r){t.assertNotNull(e,"method"),t.assertNotNull(n,"params");var o={credentials:"include",method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","x-csrf-token":"csrf"}},i=n.instanceId,s=this.endpointUrl,a=t.TaskTemplatesClientMethods;switch(e){case a.LIST_TASK_TEMPLATES:if(s+=`/proxy/instance/${i}/task/template`,n.queryParams){const e=new URLSearchParams(n.queryParams).toString();e&&(s+=`?${e}`)}break;case a.GET_TASK_TEMPLATE:t.assertNotNull(n.templateParams,"params.templateParams");const r=t.assertNotNull(n.templateParams.id,"params.templateParams.id"),c=n.templateParams.version;s+=`/proxy/instance/${i}/task/template/${r}`,c&&(s+=`?snapshotVersion=${c}`);break;case a.CREATE_TEMPLATED_TASK:s+=`/${e}`,o.body=JSON.stringify(n),o.method="PUT";break;case a.UPDATE_CONTACT:s+=`/${e}`,o.body=JSON.stringify(n),o.method="POST"}t.fetch(s,o).then((function(e){r.success(e)})).catch((function(e){const t=e.body.getReader();let n="";const o=new TextDecoder;t.read().then((function i({done:s,value:a}){if(s){var c=JSON.parse(n);return c.status=e.status,void r.failure(c)}return n+=o.decode(a),t.read().then(i)}))}))},t.ClientBase=n,t.NullClient=r,t.UpstreamConduitClient=i,t.UpstreamConduitMasterClient=s,t.AWSClient=c,t.AgentAppClient=a,t.TaskTemplatesClient=u}()},895:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,t.core={},t.core.initialized=!1,t.version="2.4.4",t.DEFAULT_BATCH_SIZE=500;var n="Amazon Connect CCP",r="https://{alias}.awsapps.com/auth/?client_id={client_id}&redirect_uri={redirect}",o="06919f4fd8ed324e",i="/auth/authorize",s="/connect/auth/authorize",a="IframeRefreshAttempts",c="IframeInitializationSuccess";t.numberOfConnectedCCPs=0,t.numberOfConnectedCCPsInThisTab=0,t.core.MAX_AUTHORIZE_RETRY_COUNT_FOR_SESSION=3,t.core.MAX_CTI_AUTH_RETRY_COUNT=10,t.core.ctiAuthRetryCount=0,t.core.authorizeTimeoutId=null,t.core.ctiTimeoutId=null,t.SessionStorageKeys=t.makeEnum(["tab_id","authorize_retry_count"]);var u=function(){let n=`SoftphoneParamsStorage::${e.location.origin}`;return{set:function(r){try{r&&e.localStorage.setItem(n,JSON.stringify(r))}catch(e){t.getLog().error("SoftphoneParamsStorage:: Failed to set softphone params to local storage!").withException(e).sendInternalLogToServer()}},get:function(){try{let t=e.localStorage.getItem(n);return t&&JSON.parse(t)}catch(e){t.getLog().error("SoftphoneParamsStorage:: Failed to get softphone params from local storage!").withException(e).sendInternalLogToServer()}return null},clean:function(){e.localStorage.removeItem(n)}}}();function l(e){var t=e.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)/gi);return t.length?t[0]:""}t.core.checkNotInitialized=function(){t.core.initialized&&t.getLog().warn("Connect core already initialized, only needs to be initialized once.").sendInternalLogToServer()},t.core.init=function(e){t.core.eventBus=new t.EventBus,t.core.agentDataProvider=new g(t.core.getEventBus()),t.core.initClient(e),t.core.initAgentAppClient(e),t.core.initTaskTemplatesClient(e),t.core.initialized=!0},t.core.initClient=function(e){t.assertNotNull(e,"params");var n=t.assertNotNull(e.authToken,"params.authToken"),r=t.assertNotNull(e.region,"params.region"),o=e.endpoint||null;t.core.client=new t.AWSClient(n,r,o)},t.core.initAgentAppClient=function(e){t.assertNotNull(e,"params");var n=t.assertNotNull(e.authToken,"params.authToken"),r=t.assertNotNull(e.authCookieName,"params.authCookieName"),o=t.assertNotNull(e.agentAppEndpoint,"params.agentAppEndpoint");t.core.agentAppClient=new t.AgentAppClient(r,n,o)},t.core.initTaskTemplatesClient=function(e){t.assertNotNull(e,"params");var n=e.taskTemplatesEndpoint||e.endpoint;t.assertNotNull(n,"taskTemplatesEndpoint"),t.core.taskTemplatesClient=new t.TaskTemplatesClient(n)},t.core.terminate=function(){t.core.client=new t.NullClient,t.core.agentAppClient=new t.NullClient,t.core.taskTemplatesClient=new t.NullClient,t.core.masterClient=new t.NullClient;var e=t.core.getEventBus();e&&e.unsubscribeAll(),t.core.bus=new t.EventBus,t.core.agentDataProvider=null,t.core.softphoneManager=null,t.core.upstream=null,t.core.keepaliveManager=null,t.agent.initialized=!1,t.core.initialized=!1},t.core.softphoneUserMediaStream=null,t.core.getSoftphoneUserMediaStream=function(){return t.core.softphoneUserMediaStream},t.core.setSoftphoneUserMediaStream=function(e){t.core.softphoneUserMediaStream=e},t.core.initRingtoneEngines=function(e){t.assertNotNull(e,"params");var n=function(e){t.assertNotNull(e,"ringtoneSettings"),t.assertNotNull(e.voice,"ringtoneSettings.voice"),t.assertTrue(e.voice.ringtoneUrl||e.voice.disabled,"ringtoneSettings.voice.ringtoneUrl must be provided or ringtoneSettings.voice.disabled must be true"),t.assertNotNull(e.queue_callback,"ringtoneSettings.queue_callback"),t.assertTrue(e.queue_callback.ringtoneUrl||e.queue_callback.disabled,"ringtoneSettings.voice.ringtoneUrl must be provided or ringtoneSettings.queue_callback.disabled must be true"),t.core.ringtoneEngines={},t.agent((function(n){n.onRefresh((function(){t.ifMaster(t.MasterTopics.RINGTONE,(function(){e.voice.disabled||t.core.ringtoneEngines.voice||(t.core.ringtoneEngines.voice=new t.VoiceRingtoneEngine(e.voice),t.getLog().info("VoiceRingtoneEngine initialized.").sendInternalLogToServer()),e.chat.disabled||t.core.ringtoneEngines.chat||(t.core.ringtoneEngines.chat=new t.ChatRingtoneEngine(e.chat),t.getLog().info("ChatRingtoneEngine initialized.").sendInternalLogToServer()),e.task.disabled||t.core.ringtoneEngines.task||(t.core.ringtoneEngines.task=new t.TaskRingtoneEngine(e.task),t.getLog().info("TaskRingtoneEngine initialized.").sendInternalLogToServer()),e.queue_callback.disabled||t.core.ringtoneEngines.queue_callback||(t.core.ringtoneEngines.queue_callback=new t.QueueCallbackRingtoneEngine(e.queue_callback),t.getLog().info("QueueCallbackRingtoneEngine initialized.").sendInternalLogToServer())}))}))})),p()},r=function(e,n){e.ringtone=e.ringtone||{},e.ringtone.voice=e.ringtone.voice||{},e.ringtone.queue_callback=e.ringtone.queue_callback||{},e.ringtone.chat=e.ringtone.chat||{disabled:!0},e.ringtone.task=e.ringtone.task||{disabled:!0},n.softphone&&(n.softphone.disableRingtone&&(e.ringtone.voice.disabled=!0,e.ringtone.queue_callback.disabled=!0),n.softphone.ringtoneUrl&&(e.ringtone.voice.ringtoneUrl=n.softphone.ringtoneUrl,e.ringtone.queue_callback.ringtoneUrl=n.softphone.ringtoneUrl)),n.chat&&(n.chat.disableRingtone&&(e.ringtone.chat.disabled=!0),n.chat.ringtoneUrl&&(e.ringtone.chat.ringtoneUrl=n.chat.ringtoneUrl)),n.ringtone&&(e.ringtone.voice=t.merge(e.ringtone.voice,n.ringtone.voice||{}),e.ringtone.queue_callback=t.merge(e.ringtone.queue_callback,n.ringtone.voice||{}),e.ringtone.chat=t.merge(e.ringtone.chat,n.ringtone.chat||{}))};r(e,e),t.isFramed()?t.core.getEventBus().subscribe(t.EventType.CONFIGURE,(function(t){this.unsubscribe(),r(e,t),n(e.ringtone)})):n(e.ringtone)};var p=function(){t.core.getEventBus().subscribe(t.ConfigurationEvents.SET_RINGER_DEVICE,d)},d=function(e){if(0!==t.keys(t.core.ringtoneEngines).length&&e&&e.deviceId){var n=e.deviceId;for(var r in t.core.ringtoneEngines)t.core.ringtoneEngines[r].setOutputDevice(n);t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.RINGER_DEVICE_CHANGED,data:{deviceId:n}})}};t.core.initSoftphoneManager=function(n){var r=n||{};t.getLog().info("[Softphone Manager] initSoftphoneManager started").sendInternalLogToServer();var o=function(e){var n=t.merge(r.softphone||{},e);t.getLog().info("[Softphone Manager] competeForMasterOnAgentUpdate executed").sendInternalLogToServer(),t.agent((function(e){e.getChannelConcurrency(t.ChannelType.VOICE)&&e.onRefresh((function(){var r=this;t.getLog().info("[Softphone Manager] agent refresh handler executed").sendInternalLogToServer(),t.ifMaster(t.MasterTopics.SOFTPHONE,(function(){t.getLog().info("[Softphone Manager] confirmed as softphone master topic").sendInternalLogToServer(),!t.core.softphoneManager&&e.isSoftphoneEnabled()&&(t.becomeMaster(t.MasterTopics.SEND_LOGS),t.core.softphoneManager=new t.SoftphoneManager(n),r.unsubscribe())}))}))}))};if(t.isFramed()&&t.isCCP()){let n;t.core.getEventBus().subscribe(t.EventType.CONFIGURE,(function(r){e.clearTimeout(n),t.getLog().info("[Softphone Manager] Configure event handler executed").sendInternalLogToServer(),u.set(r.softphone),r.softphone&&r.softphone.allowFramedSoftphone&&(this.unsubscribe(),o(r.softphone)),i(r.softphone)}));let r=u.get();r&&t.core.getUpstream().onUpstream(t.EventType.ACKNOWLEDGE,(function(s){s&&s.id&&(t.getLog().info("[Softphone Manager] Embedded CCP is refreshed successfully and waiting for configure Message handler to execute").sendInternalLogToServer(),this.unsubscribe(),n=e.setTimeout((()=>{t.getLog().info("[Softphone Manager] Embedded CCP is refreshed without configure message handler execution").sendInternalLogToServer(),t.publishMetric({name:"EmbeddedCCPRefreshedWithoutInitCCP",data:{count:1}}),i(r),r.allowFramedSoftphone&&(t.getLog().info("[Softphone Manager] Embedded CCP is refreshed & Initializing competeForMasterOnAgentUpdate (Softphone manager) from localStorage softphone params").sendInternalLogToServer(),o(r))}),100))}))}else o(r),i(r);function i(e){var n=t.merge(r.softphone||{},e);t.core.softphoneParams=n,t.isFirefoxBrowser()&&(t.core.getUpstream().onUpstream(t.EventType.MASTER_RESPONSE,(function(e){if(e.data&&e.data.topic===t.MasterTopics.SOFTPHONE&&e.data.takeOver&&e.data.masterId!==t.core.portStreamId){t.core.softphoneManager&&(t.core.softphoneManager.onInitContactSub.unsubscribe(),delete t.core.softphoneManager);var n=t.core.getSoftphoneUserMediaStream();n&&(n.getTracks().forEach((function(e){e.stop()})),t.core.setSoftphoneUserMediaStream(null))}})),t.core.getEventBus().subscribe(t.ConnectionEvents.READY_TO_START_SESSION,(function(){t.ifMaster(t.MasterTopics.SOFTPHONE,(function(){t.core.softphoneManager&&t.core.softphoneManager.startSession()}),(function(){t.becomeMaster(t.MasterTopics.SOFTPHONE,(function(){t.agent((function(e){!t.core.softphoneManager&&e.isSoftphoneEnabled()&&(t.becomeMaster(t.MasterTopics.SEND_LOGS),t.core.softphoneManager=new t.SoftphoneManager(n),t.core.softphoneManager.startSession())}))}))}))})),t.contact((function(e){t.agent((function(n){e.onRefresh((function(e){if(t.hasOtherConnectedCCPs()&&"visible"===document.visibilityState&&(e.getStatus().type===t.ContactStatusType.CONNECTING||e.getStatus().type===t.ContactStatusType.INCOMING)){var r=e.isSoftphoneCall()&&!e.isInbound(),o=e.isSoftphoneCall()&&n.getConfiguration().softphoneAutoAccept,i=e.getType()===t.ContactType.QUEUE_CALLBACK;(r||o||i)&&t.core.triggerReadyToStartSessionEvent()}}))}))})))}t.agent((function(e){e.isSoftphoneEnabled()&&e.getChannelConcurrency(t.ChannelType.VOICE)&&t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.MUTE})}))},t.core.triggerReadyToStartSessionEvent=function(){var e=t.core.softphoneParams&&t.core.softphoneParams.allowFramedSoftphone;t.isCCP()?e?t.core.getEventBus().trigger(t.ConnectionEvents.READY_TO_START_SESSION):t.isFramed()?t.core.getUpstream().sendDownstream(t.ConnectionEvents.READY_TO_START_SESSION):t.core.getEventBus().trigger(t.ConnectionEvents.READY_TO_START_SESSION):e?t.core.getUpstream().sendUpstream(t.ConnectionEvents.READY_TO_START_SESSION):t.core.getEventBus().trigger(t.ConnectionEvents.READY_TO_START_SESSION)},t.core.initPageOptions=function(e){if(t.assertNotNull(e,"params"),t.isFramed()){var n=t.core.getEventBus();n.subscribe(t.EventType.CONFIGURE,(function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.CONFIGURE,data:e})})),n.subscribe(t.EventType.MEDIA_DEVICE_REQUEST,(function(){function e(e){t.core.getUpstream().sendDownstream(t.EventType.MEDIA_DEVICE_RESPONSE,e)}navigator&&navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then((function(t){devices=t||[],devices=devices.map((function(e){return e.toJSON()})),e(devices)})).catch((function(t){e({error:t.message})})):e({error:"No navigator or navigator.mediaDevices object found"})}))}},t.core.getFrameMediaDevices=function(e){var n=null,r=e||1e3,o=new Promise((function(e,t){setTimeout((function(){t(new Error("Timeout exceeded"))}),r)})),i=new Promise((function(e,r){if(t.isFramed()||t.isCCP())navigator&&navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then((function(t){devices=t||[],devices=devices.map((function(e){return e.toJSON()})),e(devices)})):r(new Error("No navigator or navigator.mediaDevices object found"));else{var o=t.core.getEventBus();n=o.subscribe(t.EventType.MEDIA_DEVICE_RESPONSE,(function(t){t.error?r(new Error(t.error)):e(t)})),t.core.getUpstream().sendUpstream(t.EventType.MEDIA_DEVICE_REQUEST)}}));return Promise.race([i,o]).finally((function(){n&&n.unsubscribe()}))},t.core.authorize=function(e){var n=e;return n||(n=t.core.isLegacyDomain()?s:i),t.fetch(n,{credentials:"include"},2e3,5)},t.core.verifyDomainAccess=function(e,n){if(t.getLog().warn("This API will be deprecated in the next major version release"),!t.isFramed())return Promise.resolve();var r={headers:{"X-Amz-Bearer":e}},o=null;return o=n||(t.core.isLegacyDomain()?"/connect/whitelisted-origins":"/whitelisted-origins"),t.fetch(o,r,2e3,5).then((function(e){var t=l(window.document.referrer);return e.whitelistedOrigins.some((function(e){return t===l(e)}))?Promise.resolve():Promise.reject()}))},t.core.isLegacyDomain=function(e){return(e=e||window.location.href).includes(".awsapps.com")},t.core.initSharedWorker=function(n){if(t.core.checkNotInitialized(),!t.core.initialized){t.assertNotNull(n,"params");var r=t.assertNotNull(n.sharedWorkerUrl,"params.sharedWorkerUrl"),o=t.assertNotNull(n.authToken,"params.authToken"),a=t.assertNotNull(n.refreshToken,"params.refreshToken"),c=t.assertNotNull(n.authTokenExpiration,"params.authTokenExpiration"),u=t.assertNotNull(n.region,"params.region"),l=n.endpoint||null,p=n.authorizeEndpoint;p||(p=t.core.isLegacyDomain()?s:i);var d=n.agentAppEndpoint||null,h=n.taskTemplatesEndpoint||null,m=n.authCookieName||null;try{t.core.eventBus=new t.EventBus({logEvents:!0}),t.core.agentDataProvider=new g(t.core.getEventBus()),t.core.mediaFactory=new t.MediaFactory(n);var v=new SharedWorker(r,"ConnectSharedWorker"),y=new t.Conduit("ConnectSharedWorkerConduit",new t.PortStream(v.port),new t.WindowIOStream(window,parent));t.core.upstream=y,t.core.webSocketProvider=new f,e.onunload=function(){y.sendUpstream(t.EventType.CLOSE),v.port.close()},t.getLog().scheduleUpstreamLogPush(y),t.getLog().scheduleDownstreamClientSideLogsPush(),y.onAllUpstream(t.core.getEventBus().bridge()),y.onAllUpstream(y.passDownstream()),t.isFramed()&&(y.onAllDownstream(t.core.getEventBus().bridge()),y.onAllDownstream(y.passUpstream())),y.sendUpstream(t.EventType.CONFIGURE,{authToken:o,authTokenExpiration:c,endpoint:l,refreshToken:a,region:u,authorizeEndpoint:p,agentAppEndpoint:d,taskTemplatesEndpoint:h,authCookieName:m,longPollingOptions:n.longPollingOptions||void 0}),y.onUpstream(t.EventType.ACKNOWLEDGE,(function(e){t.getLog().info("Acknowledged by the ConnectSharedWorker!").sendInternalLogToServer(),t.core.initialized=!0,t.core._setTabId(),t.core.portStreamId=e.id,this.unsubscribe()})),y.onUpstream(t.EventType.LOG,(function(e){e.loggerId!==t.getLog().getLoggerId()&&t.getLog().addLogEntry(t.LogEntry.fromObject(e))})),y.onUpstream(t.EventType.SERVER_BOUND_INTERNAL_LOG,(function(e){t.getLog().sendInternalLogEntryToServer(t.LogEntry.fromObject(e))})),y.onDownstream(t.EventType.SERVER_BOUND_INTERNAL_LOG,(function(e){t.isFramed()&&Array.isArray(e)&&e.forEach((function(e){t.getLog().sendInternalLogEntryToServer(t.LogEntry.fromObject(e))}))})),y.onDownstream(t.EventType.LOG,(function(e){t.isFramed()&&e.loggerId!==t.getLog().getLoggerId()&&t.getLog().addLogEntry(t.LogEntry.fromObject(e))})),t.core.onAuthFail(t.hitch(t.core,t.core._handleAuthFail,n.loginEndpoint||null,p)),t.core.onAuthorizeSuccess(t.hitch(t.core,t.core._handleAuthorizeSuccess)),t.getLog().info("User Agent: "+navigator.userAgent).sendInternalLogToServer(),t.getLog().info("isCCPv2: "+!0).sendInternalLogToServer(),t.getLog().info("isFramed: "+t.isFramed()).sendInternalLogToServer(),t.core.upstream.onDownstream(t.EventType.OUTER_CONTEXT_INFO,(function(e){var n=e.streamsVersion;t.getLog().info("StreamsJS Version: "+n).sendInternalLogToServer()})),y.onUpstream(t.EventType.UPDATE_CONNECTED_CCPS,(function(e){t.getLog().info("Number of connected CCPs updated: "+e.length).sendInternalLogToServer(),t.numberOfConnectedCCPs=e.length,e[t.core.tabId]&&!isNaN(e[t.core.tabId].length)&&t.numberOfConnectedCCPsInThisTab!==e[t.core.tabId].length&&(t.numberOfConnectedCCPsInThisTab=e[t.core.tabId].length,t.numberOfConnectedCCPsInThisTab>1&&t.getLog().warn("There are "+t.numberOfConnectedCCPsInThisTab+" connected CCPs in this tab. Please adjust your implementation to avoid complications. If you are embedding CCP, please do so exclusively with initCCP. InitCCP will not let you embed more than one CCP.").sendInternalLogToServer(),t.publishMetric({name:"ConnectedCCPSingleTabCount",data:{count:t.numberOfConnectedCCPsInThisTab}})),e.tabId&&e.streamsTabsAcrossBrowser&&t.ifMaster(t.MasterTopics.METRICS,(()=>t.agent((()=>t.publishMetric({name:"CCPTabsAcrossBrowserCount",data:{tabId:e.tabId,count:e.streamsTabsAcrossBrowser}})))))})),t.core.client=new t.UpstreamConduitClient(y),t.core.masterClient=new t.UpstreamConduitMasterClient(y),t.core.getEventBus().subscribe(t.EventType.TERMINATE,y.passUpstream()),t.core.getEventBus().subscribe(t.EventType.TERMINATED,(function(){window.location.reload(!0)})),v.port.start(),y.onUpstream(t.VoiceIdEvents.UPDATE_DOMAIN_ID,(function(e){e&&e.domainId&&(t.core.voiceIdDomainId=e.domainId)})),t.agent((function(){(new t.VoiceId).getDomainId().then((function(e){t.getLog().info("voiceId domainId successfully fetched at agent initialization: "+e).sendInternalLogToServer()})).catch((function(e){t.getLog().info("voiceId domainId not fetched at agent initialization").withObject({err:e}).sendInternalLogToServer()}))})),t.core.getNotificationManager().requestPermission()}catch(e){t.getLog().error("Failed to initialize the API shared worker, we're dead!").withException(e).sendInternalLogToServer()}}},t.core._setTabId=function(){try{t.core.tabId=window.sessionStorage.getItem(t.SessionStorageKeys.TAB_ID),t.core.tabId||(t.core.tabId=t.randomId(),window.sessionStorage.setItem(t.SessionStorageKeys.TAB_ID,t.core.tabId)),t.core.upstream.sendUpstream(t.EventType.TAB_ID,{tabId:t.core.tabId})}catch(e){t.getLog().error("[Tab Id] There was an issue setting the tab Id").withException(e).sendInternalLogToServer()}},t.core.initCCP=function(n,i){if(t.core.checkNotInitialized(),!t.core.initialized){t.getLog().info("Iframe initialization started").sendInternalLogToServer();var s=Date.now();try{if(t.core._getCCPIframe())return void t.getLog().error("Attempted to call initCCP when an iframe generated by initCCP already exists").sendInternalLogToServer()}catch(e){t.getLog().error("Error while checking if initCCP has already been called").withException(e).sendInternalLogToServer()}var l={};"string"==typeof i?l.ccpUrl=i:l=i,t.assertNotNull(n,"containerDiv"),t.assertNotNull(l.ccpUrl,"params.ccpUrl"),u.clean();var p=t.core._createCCPIframe(n,l);t.core.eventBus=new t.EventBus({logEvents:!1}),t.core.agentDataProvider=new g(t.core.getEventBus()),t.core.mediaFactory=new t.MediaFactory(l);var d=new t.IFrameConduit(l.ccpUrl,window,p);t.core._sendIframeStyleDataUpstreamAfterReasonableWaitTime(p,d),t.core.upstream=d,t.core.webSocketProvider=new f,d.onAllUpstream(t.core.getEventBus().bridge()),t.core.keepaliveManager=new h(d,t.core.getEventBus(),l.ccpSynTimeout||1e3,l.ccpAckTimeout||3e3),t.core.iframeRefreshTimeout=null,t.core.ccpLoadTimeoutInstance=e.setTimeout((function(){t.core.ccpLoadTimeoutInstance=null,t.core.getEventBus().trigger(t.EventType.ACK_TIMEOUT),t.getLog().info("CCP LoadTimeout triggered").sendInternalLogToServer()}),l.ccpLoadTimeout||5e3),t.getLog().scheduleUpstreamOuterContextCCPLogsPush(d),t.getLog().scheduleUpstreamOuterContextCCPserverBoundLogsPush(d),d.onUpstream(t.EventType.ACKNOWLEDGE,(function(n){if(t.getLog().info("Acknowledged by the CCP!").sendInternalLogToServer(),t.core.client=new t.UpstreamConduitClient(d),t.core.masterClient=new t.UpstreamConduitMasterClient(d),t.core.portStreamId=n.id,(l.softphone||l.chat||l.pageOptions||l.shouldAddNamespaceToLogs)&&d.sendUpstream(t.EventType.CONFIGURE,{softphone:l.softphone,chat:l.chat,pageOptions:l.pageOptions,shouldAddNamespaceToLogs:l.shouldAddNamespaceToLogs}),t.core.ccpLoadTimeoutInstance&&(e.clearTimeout(t.core.ccpLoadTimeoutInstance),t.core.ccpLoadTimeoutInstance=null),d.sendUpstream(t.EventType.OUTER_CONTEXT_INFO,{streamsVersion:t.version}),t.core.keepaliveManager.start(),this.unsubscribe(),t.core.initialized=!0,t.core.getEventBus().trigger(t.EventType.INIT),s){var r=Date.now()-s,o=t.core.iframeRefreshAttempt||0;t.getLog().info("Iframe initialization succeeded").sendInternalLogToServer(),t.getLog().info(`Iframe initialization time ${r}`).sendInternalLogToServer(),t.getLog().info(`Iframe refresh attempts ${o}`).sendInternalLogToServer(),setTimeout((()=>{t.publishMetric({name:a,data:{count:o}}),t.publishMetric({name:c,data:{count:1}}),t.publishMetric({name:"IframeInitializationTime",data:{count:r}}),s=null}),1e3)}})),d.onUpstream(t.EventType.LOG,(function(e){e.loggerId!==t.getLog().getLoggerId()&&t.getLog().addLogEntry(t.LogEntry.fromObject(e))})),t.core.getEventBus().subscribe(t.EventType.ACK_TIMEOUT,(function(){if(!1!==l.loginPopup)try{var i=function(n){var i="https://lily.us-east-1.amazonaws.com/taw/auth/code";return t.assertNotNull(i),n.loginUrl?n.loginUrl:n.alias?(log.warn("The `alias` param is deprecated and should not be expected to function properly. Please use `ccpUrl` or `loginUrl`. See https://github.com/amazon-connect/amazon-connect-streams/blob/master/README.md#connectcoreinitccp for valid parameters."),r.replace("{alias}",n.alias).replace("{client_id}",o).replace("{redirect}",e.encodeURIComponent(i))):n.ccpUrl}(l);t.getLog().warn("ACK_TIMEOUT occurred, attempting to pop the login page if not already open.").sendInternalLogToServer(),l.loginUrl&&t.core.getPopupManager().clear(t.MasterTopics.LOGIN_POPUP),t.core.loginWindow=t.core.getPopupManager().open(i,t.MasterTopics.LOGIN_POPUP,l.loginOptions)}catch(e){t.getLog().error("ACK_TIMEOUT occurred but we are unable to open the login popup.").withException(e).sendInternalLogToServer()}if(null==t.core.iframeRefreshTimeout)try{d.onUpstream(t.EventType.ACKNOWLEDGE,(function(){this.unsubscribe(),e.clearTimeout(t.core.iframeRefreshTimeout),t.core.iframeRefreshTimeout=null,t.core.getPopupManager().clear(t.MasterTopics.LOGIN_POPUP),(l.loginPopupAutoClose||l.loginOptions&&l.loginOptions.autoClose)&&t.core.loginWindow&&(t.core.loginWindow.close(),t.core.loginWindow=null)})),t.core._refreshIframeOnTimeout(l,n)}catch(e){t.getLog().error("Error occurred while refreshing iframe").withException(e).sendInternalLogToServer()}})),l.onViewContact&&t.core.onViewContact(l.onViewContact),d.onUpstream(t.EventType.UPDATE_CONNECTED_CCPS,(function(e){t.numberOfConnectedCCPs=e.length})),d.onUpstream(t.VoiceIdEvents.UPDATE_DOMAIN_ID,(function(e){e&&e.domainId&&(t.core.voiceIdDomainId=e.domainId)})),t.core.getEventBus().subscribe(t.EventType.IFRAME_RETRIES_EXHAUSTED,(function(){if(s){var e=t.core.iframeRefreshAttempt-1;t.getLog().info("Iframe initialization failed").sendInternalLogToServer(),t.getLog().info("Time after iframe initialization started "+(Date.now()-s)).sendInternalLogToServer(),t.getLog().info(`Iframe refresh attempts ${e}`).sendInternalLogToServer(),t.publishMetric({name:a,data:{count:e}}),t.publishMetric({name:c,data:{count:0}}),s=null}})),t.core.softphoneParams=l.softphone}},t.core.onIframeRetriesExhausted=function(e){t.core.getEventBus().subscribe(t.EventType.IFRAME_RETRIES_EXHAUSTED,e)},t.core._refreshIframeOnTimeout=function(n,r){t.assertNotNull(n,"initCCPParams"),t.assertNotNull(r,"containerDiv");var o=((n.disasterRecoveryOn?1e4:5e3)+AWS.util.calculateRetryDelay(t.core.iframeRefreshAttempt-1||0,{base:2e3}))*Math.ceil((t.core.iframeRefreshAttempt||0)/6);e.clearTimeout(t.core.iframeRefreshTimeout),t.core.iframeRefreshTimeout=e.setTimeout((function(){if(t.core.iframeRefreshAttempt=(t.core.iframeRefreshAttempt||0)+1,t.core.iframeRefreshAttempt<=6){try{var o=t.core._getCCPIframe();o&&o.parentNode.removeChild(o);var i=t.core._createCCPIframe(r,n);t.core.upstream.upstream.output=i.contentWindow,t.core._sendIframeStyleDataUpstreamAfterReasonableWaitTime(i,t.core.upstream)}catch(e){t.getLog().error("Error while checking for, and recreating, the CCP IFrame").withException(e).sendInternalLogToServer()}t.core._refreshIframeOnTimeout(n,r)}else t.core.getEventBus().trigger(t.EventType.IFRAME_RETRIES_EXHAUSTED),e.clearTimeout(t.core.iframeRefreshTimeout)}),o)},t.core._getCCPIframe=function(){for(var e of window.document.getElementsByTagName("iframe"))if(e.name===n)return e;return null},t.core._createCCPIframe=function(e,r){t.assertNotNull(r,"initCCPParams"),t.assertNotNull(e,"containerDiv");var o=document.createElement("iframe");return o.src=r.ccpUrl,o.allow="microphone; autoplay; clipboard-write",o.style=r.style||"width: 100%; height: 100%",o.title=r.iframeTitle||n,o.name=n,e.appendChild(o),o},t.core._sendIframeStyleDataUpstreamAfterReasonableWaitTime=function(e,n){t.assertNotNull(e,"iframe"),t.assertNotNull(n,"conduit"),setTimeout((function(){var r={display:window.getComputedStyle(e,null).display,offsetWidth:e.offsetWidth,offsetHeight:e.offsetHeight,clientRectsLength:e.getClientRects().length};n.sendUpstream(t.EventType.IFRAME_STYLE,r)}),1e4)};var h=function(e,t,n,r){this.conduit=e,this.eventBus=t,this.synTimeout=n,this.ackTimeout=r,this.ackTimer=null,this.synTimer=null,this.ackSub=null};h.prototype.start=function(){var n=this;this.conduit.sendUpstream(t.EventType.SYNCHRONIZE),this.ackSub=this.conduit.onUpstream(t.EventType.ACKNOWLEDGE,(function(){this.unsubscribe(),e.clearTimeout(n.ackTimer),n._deferStart()})),this.ackTimer=e.setTimeout((function(){n.ackSub.unsubscribe(),n.eventBus.trigger(t.EventType.ACK_TIMEOUT),n._deferStart()}),this.ackTimeout)},h.prototype._deferStart=function(){this.synTimer=e.setTimeout(t.hitch(this,this.start),this.synTimeout)},h.prototype.deferStart=function(){null==this.synTimer&&(this.synTimer=e.setTimeout(t.hitch(this,this.start),this.synTimeout))};var f=function(){var e={initFailure:new Set,subscriptionUpdate:new Set,subscriptionFailure:new Set,topic:new Map,allMessage:new Set,connectionGain:new Set,connectionLost:new Set,connectionOpen:new Set,connectionClose:new Set},n=function(e,t){e.forEach((function(e){e(t)}))};t.core.getUpstream().onUpstream(t.WebSocketEvents.INIT_FAILURE,(function(){n(e.initFailure)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.CONNECTION_OPEN,(function(t){n(e.connectionOpen,t)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.CONNECTION_CLOSE,(function(t){n(e.connectionClose,t)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.CONNECTION_GAIN,(function(){n(e.connectionGain)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.CONNECTION_LOST,(function(t){n(e.connectionLost,t)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.SUBSCRIPTION_UPDATE,(function(t){n(e.subscriptionUpdate,t)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.SUBSCRIPTION_FAILURE,(function(t){n(e.subscriptionFailure,t)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.ALL_MESSAGE,(function(t){n(e.allMessage,t),e.topic.has(t.topic)&&n(e.topic.get(t.topic),t)})),this.sendMessage=function(e){t.core.getUpstream().sendUpstream(t.WebSocketEvents.SEND,e)},this.onInitFailure=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.initFailure.add(n),function(){return e.initFailure.delete(n)}},this.onConnectionOpen=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.connectionOpen.add(n),function(){return e.connectionOpen.delete(n)}},this.onConnectionClose=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.connectionClose.add(n),function(){return e.connectionClose.delete(n)}},this.onConnectionGain=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.connectionGain.add(n),function(){return e.connectionGain.delete(n)}},this.onConnectionLost=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.connectionLost.add(n),function(){return e.connectionLost.delete(n)}},this.onSubscriptionUpdate=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.subscriptionUpdate.add(n),function(){return e.subscriptionUpdate.delete(n)}},this.onSubscriptionFailure=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.subscriptionFailure.add(n),function(){return e.subscriptionFailure.delete(n)}},this.subscribeTopics=function(e){t.assertNotNull(e,"topics"),t.assertTrue(t.isArray(e),"topics must be a array"),t.core.getUpstream().sendUpstream(t.WebSocketEvents.SUBSCRIBE,e)},this.onMessage=function(n,r){return t.assertNotNull(n,"topicName"),t.assertTrue(t.isFunction(r),"method must be a function"),e.topic.has(n)?e.topic.get(n).add(r):e.topic.set(n,new Set([r])),function(){return e.topic.get(n).delete(r)}},this.onAllMessage=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.allMessage.add(n),function(){return e.allMessage.delete(n)}}},g=function(e){this.bus=e,this.bus.subscribe(t.AgentEvents.UPDATE,t.hitch(this,this.updateAgentData))};g.prototype.updateAgentData=function(e){var n=this.agentData;this.agentData=e,null==n&&(t.agent.initialized=!0,this.bus.trigger(t.AgentEvents.INIT,new t.Agent)),this.bus.trigger(t.AgentEvents.REFRESH,new t.Agent),this._fireAgentUpdateEvents(n)},g.prototype.getAgentData=function(){if(null==this.agentData)throw new t.StateError("No agent data is available yet!");return t.deepcopy(this.agentData)},g.prototype.getContactData=function(e){var n=this.getAgentData(),r=t.find(n.snapshot.contacts,(function(t){return t.contactId===e}));if(null==r)throw new t.StateError("Contact %s no longer exists.",e);return r},g.prototype.getConnectionData=function(e,n){var r=this.getContactData(e),o=t.find(r.connections,(function(e){return e.connectionId===n}));if(null==o)throw new t.StateError("Connection %s for contact %s no longer exists.",n,e);return o},g.prototype.getInstanceId=function(){return this.getAgentData().configuration.routingProfile.routingProfileId.match(/instance\/([0-9a-fA-F|-]+)\//)[1]},g.prototype.getAWSAccountId=function(){return this.getAgentData().configuration.routingProfile.routingProfileId.match(/:([0-9]+):instance/)[1]},g.prototype._diffContacts=function(e){var n={added:{},removed:{},common:{},oldMap:t.index(null==e?[]:e.snapshot.contacts,(function(e){return e.contactId})),newMap:t.index(this.agentData.snapshot.contacts,(function(e){return e.contactId}))};return t.keys(n.oldMap).forEach((function(e){t.contains(n.newMap,e)?n.common[e]=n.newMap[e]:n.removed[e]=n.oldMap[e]})),t.keys(n.newMap).forEach((function(e){t.contains(n.oldMap,e)||(n.added[e]=n.newMap[e])})),n},g.prototype._fireAgentUpdateEvents=function(e){var n=this,r=null,o=null==e?t.AgentAvailStates.INIT:e.snapshot.state.name,i=this.agentData.snapshot.state.name,s=null==e?t.AgentStateType.INIT:e.snapshot.state.type,a=this.agentData.snapshot.state.type;s!==a&&t.core.getAgentRoutingEventGraph().getAssociations(this,s,a).forEach((function(e){n.bus.trigger(e,new t.Agent)})),o!==i&&(this.bus.trigger(t.AgentEvents.STATE_CHANGE,{agent:new t.Agent,oldState:o,newState:i}),t.core.getAgentStateEventGraph().getAssociations(this,o,i).forEach((function(e){n.bus.trigger(e,new t.Agent)})));var c=e&&e.snapshot.nextState?e.snapshot.nextState.name:null,u=this.agentData.snapshot.nextState?this.agentData.snapshot.nextState.name:null;c!==u&&u&&n.bus.trigger(t.AgentEvents.ENQUEUED_NEXT_STATE,new t.Agent),r=null!==e?this._diffContacts(e):{added:t.index(this.agentData.snapshot.contacts,(function(e){return e.contactId})),removed:{},common:{},oldMap:{},newMap:t.index(this.agentData.snapshot.contacts,(function(e){return e.contactId}))},t.values(r.added).forEach((function(e){n.bus.trigger(t.ContactEvents.INIT,new t.Contact(e.contactId)),n._fireContactUpdateEvents(e.contactId,t.ContactStateType.INIT,e.state.type)})),t.values(r.removed).forEach((function(e){n.bus.trigger(t.ContactEvents.DESTROYED,new t.ContactSnapshot(e)),n.bus.trigger(t.core.getContactEventName(t.ContactEvents.DESTROYED,e.contactId),new t.ContactSnapshot(e)),n._unsubAllContactEventsForContact(e.contactId)})),t.keys(r.common).forEach((function(e){n._fireContactUpdateEvents(e,r.oldMap[e].state.type,r.newMap[e].state.type)}))},g.prototype._fireContactUpdateEvents=function(e,n,r){var o=this;n!==r&&t.core.getContactEventGraph().getAssociations(this,n,r).forEach((function(n){o.bus.trigger(n,new t.Contact(e)),o.bus.trigger(t.core.getContactEventName(n,e),new t.Contact(e))})),o.bus.trigger(t.ContactEvents.REFRESH,new t.Contact(e)),o.bus.trigger(t.core.getContactEventName(t.ContactEvents.REFRESH,e),new t.Contact(e))},g.prototype._unsubAllContactEventsForContact=function(e){var n=this;t.values(t.ContactEvents).forEach((function(r){n.bus.getSubscriptions(t.core.getContactEventName(r,e)).map((function(e){e.unsubscribe()}))}))},t.core.onViewContact=function(e){t.core.getUpstream().onUpstream(t.ContactEvents.VIEW,e)},t.core.viewContact=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ContactEvents.VIEW,data:{contactId:e}})},t.core.onActivateChannelWithViewType=function(e){t.core.getUpstream().onUpstream(t.ChannelViewEvents.ACTIVATE_CHANNEL_WITH_VIEW_TYPE,e)},t.core.activateChannelWithViewType=function(e,n,r,o){const i={viewType:e,mediaType:n};r&&(i.source=r),o&&(i.caseId=o),t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ChannelViewEvents.ACTIVATE_CHANNEL_WITH_VIEW_TYPE,data:i})},t.core.triggerTaskCreated=function(e){t.core.getUpstream().upstreamBus.trigger(t.TaskEvents.CREATED,e)},t.core.onAccessDenied=function(e){t.core.getUpstream().onUpstream(t.EventType.ACCESS_DENIED,e)},t.core.onAuthFail=function(e){t.core.getUpstream().onUpstream(t.EventType.AUTH_FAIL,e)},t.core.onAuthorizeSuccess=function(e){t.core.getUpstream().onUpstream(t.EventType.AUTHORIZE_SUCCESS,e)},t.core._handleAuthorizeSuccess=function(){window.sessionStorage.setItem(t.SessionStorageKeys.AUTHORIZE_RETRY_COUNT,0)},t.core._handleAuthFail=function(e,n,r){r&&r.authorize?t.core._handleAuthorizeFail(e):t.core._handleCTIAuthFail(n)},t.core._handleAuthorizeFail=function(e){let n=t.core._getAuthRetryCount();if(!t.core.authorizeTimeoutId)if(n{t.core._redirectToLogin(e)}),r)}else t.getLog().warn("We have exhausted our authorization retries due to 401s from the authorize api. No more retries will be attempted in this session until the authorize api returns 200.").sendInternalLogToServer(),t.core.getEventBus().trigger(t.EventType.AUTHORIZE_RETRIES_EXHAUSTED)},t.core._redirectToLogin=function(e){"string"==typeof e?location.assign(e):location.reload()},t.core._handleCTIAuthFail=function(e){if(!t.core.ctiTimeoutId)if(t.core.ctiAuthRetryCount{t.core.authorize(e).then(t.core._triggerAuthorizeSuccess.bind(t.core)).catch(t.core._triggerAuthFail.bind(t.core,{authorize:!0})),t.core.ctiTimeoutId=null}),n)}else t.getLog().warn("We have exhausted our authorization retries due to 401s from the CTI service. No more retries will be attempted until the page is refreshed.").sendInternalLogToServer(),t.core.getEventBus().trigger(t.EventType.CTI_AUTHORIZE_RETRIES_EXHAUSTED)},t.core._triggerAuthorizeSuccess=function(){t.core.getUpstream().upstreamBus.trigger(t.EventType.AUTHORIZE_SUCCESS)},t.core._triggerAuthFail=function(e){t.core.getUpstream().upstreamBus.trigger(t.EventType.AUTH_FAIL,e)},t.core._getAuthRetryCount=function(){let e=window.sessionStorage.getItem(t.SessionStorageKeys.AUTHORIZE_RETRY_COUNT);if(null!==e){if(isNaN(parseInt(e)))throw new t.StateError("The session storage value for auth retry count was NaN");return parseInt(e)}return window.sessionStorage.setItem(t.SessionStorageKeys.AUTHORIZE_RETRY_COUNT,0),0},t.core._incrementAuthRetryCount=function(){window.sessionStorage.setItem(t.SessionStorageKeys.AUTHORIZE_RETRY_COUNT,(t.core._getAuthRetryCount()+1).toString())},t.core.onAuthorizeRetriesExhausted=function(e){t.core.getEventBus().subscribe(t.EventType.AUTHORIZE_RETRIES_EXHAUSTED,e)},t.core.onCTIAuthorizeRetriesExhausted=function(e){t.core.getEventBus().subscribe(t.EventType.CTI_AUTHORIZE_RETRIES_EXHAUSTED,e)},t.core.onSoftphoneSessionInit=function(e){t.core.getUpstream().onUpstream(t.ConnectionEvents.SESSION_INIT,e)},t.core.onConfigure=function(e){t.core.getUpstream().onUpstream(t.ConfigurationEvents.CONFIGURE,e)},t.core.onInitialized=function(e){t.core.getEventBus().subscribe(t.EventType.INIT,e)},t.core.getContactEventName=function(e,n){if(t.assertNotNull(e,"eventName"),t.assertNotNull(n,"contactId"),!t.contains(t.values(t.ContactEvents),e))throw new t.ValueError("%s is not a valid contact event.",e);return t.sprintf("%s::%s",e,n)},t.core.getEventBus=function(){return t.core.eventBus},t.core.getWebSocketManager=function(){return t.core.webSocketProvider},t.core.getAgentDataProvider=function(){return t.core.agentDataProvider},t.core.getLocalTimestamp=function(){return t.core.getAgentDataProvider().getAgentData().snapshot.localTimestamp},t.core.getSkew=function(){return t.core.getAgentDataProvider().getAgentData().snapshot.skew},t.core.getAgentRoutingEventGraph=function(){return t.core.agentRoutingEventGraph},t.core.agentRoutingEventGraph=(new t.EventGraph).assoc(t.EventGraph.ANY,t.AgentStateType.ROUTABLE,t.AgentEvents.ROUTABLE).assoc(t.EventGraph.ANY,t.AgentStateType.NOT_ROUTABLE,t.AgentEvents.NOT_ROUTABLE).assoc(t.EventGraph.ANY,t.AgentStateType.OFFLINE,t.AgentEvents.OFFLINE),t.core.getAgentStateEventGraph=function(){return t.core.agentStateEventGraph},t.core.agentStateEventGraph=(new t.EventGraph).assoc(t.EventGraph.ANY,t.values(t.AgentErrorStates),t.AgentEvents.ERROR).assoc(t.EventGraph.ANY,t.AgentAvailStates.AFTER_CALL_WORK,t.AgentEvents.ACW),t.core.getContactEventGraph=function(){return t.core.contactEventGraph},t.core.contactEventGraph=(new t.EventGraph).assoc(t.EventGraph.ANY,t.ContactStateType.INCOMING,t.ContactEvents.INCOMING).assoc(t.EventGraph.ANY,t.ContactStateType.PENDING,t.ContactEvents.PENDING).assoc(t.EventGraph.ANY,t.ContactStateType.CONNECTING,t.ContactEvents.CONNECTING).assoc(t.EventGraph.ANY,t.ContactStateType.CONNECTED,t.ContactEvents.CONNECTED).assoc(t.ContactStateType.CONNECTING,t.ContactStateType.ERROR,t.ContactEvents.MISSED).assoc(t.ContactStateType.INCOMING,t.ContactStateType.ERROR,t.ContactEvents.MISSED).assoc(t.EventGraph.ANY,t.ContactStateType.ENDED,t.ContactEvents.ACW).assoc(t.values(t.CONTACT_ACTIVE_STATES),t.values(t.relativeComplement(t.CONTACT_ACTIVE_STATES,t.ContactStateType)),t.ContactEvents.ENDED).assoc(t.EventGraph.ANY,t.ContactStateType.ERROR,t.ContactEvents.ERROR).assoc(t.ContactStateType.CONNECTING,t.ContactStateType.MISSED,t.ContactEvents.MISSED),t.core.getClient=function(){if(!t.core.client)throw new t.StateError("The connect core has not been initialized!");return t.core.client},t.core.client=null,t.core.getAgentAppClient=function(){if(!t.core.agentAppClient)throw new t.StateError("The connect AgentApp Client has not been initialized!");return t.core.agentAppClient},t.core.agentAppClient=null,t.core.getTaskTemplatesClient=function(){if(!t.core.taskTemplatesClient)throw new t.StateError("The connect TaskTemplates Client has not been initialized!");return t.core.taskTemplatesClient},t.core.taskTemplatesClient=null,t.core.getMasterClient=function(){if(!t.core.masterClient)throw new t.StateError("The connect master client has not been initialized!");return t.core.masterClient},t.core.masterClient=null,t.core.getSoftphoneManager=function(){return t.core.softphoneManager},t.core.softphoneManager=null,t.core.getNotificationManager=function(){return t.core.notificationManager||(t.core.notificationManager=new t.NotificationManager),t.core.notificationManager},t.core.notificationManager=null,t.core.getPopupManager=function(){return t.core.popupManager},t.core.popupManager=new t.PopupManager,t.core.getUpstream=function(){if(!t.core.upstream)throw new t.StateError("There is no upstream conduit!");return t.core.upstream},t.core.upstream=null,t.core.AgentDataProvider=g}()},592:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t;var n="<>",r=t.makeEnum(["acknowledge","ack_timeout","init","api_request","api_response","auth_fail","access_denied","close","configure","log","master_request","master_response","synchronize","terminate","terminated","send_logs","reload_agent_configuration","broadcast","api_metric","client_metric","softphone_stats","softphone_report","client_side_logs","server_bound_internal_log","mute","iframe_style","iframe_retries_exhausted","update_connected_ccps","outer_context_info","media_device_request","media_device_response","tab_id","authorize_success","authorize_retries_exhausted","cti_authorize_retries_exhausted","click_stream_data"]),o=t.makeNamespacedEnum("connect",["loginPopup","sendLogs","softphone","ringtone","metrics"]),i=t.makeNamespacedEnum("agent",["init","update","refresh","routable","not_routable","pending","contact_pending","offline","error","softphone_error","websocket_connection_lost","websocket_connection_gained","state_change","acw","mute_toggle","local_media_stream_created","enqueued_next_state"]),s=t.makeNamespacedEnum("webSocket",["init_failure","connection_open","connection_close","connection_error","connection_gain","connection_lost","subscription_update","subscription_failure","all_message","send","subscribe"]),a=t.makeNamespacedEnum("contact",["init","refresh","destroyed","incoming","pending","connecting","connected","missed","acw","view","ended","error","accepted"]),c=t.makeNamespacedEnum("taskList",["activate_channel_with_view_type"]),u=t.makeNamespacedEnum("task",["created"]),l=t.makeNamespacedEnum("connection",["session_init","ready_to_start_session"]),p=t.makeNamespacedEnum("configuration",["configure","set_speaker_device","set_microphone_device","set_ringer_device","speaker_device_changed","microphone_device_changed","ringer_device_changed"]),d=t.makeNamespacedEnum("voiceId",["update_domain_id"]),h=function(){};h.createRequest=function(e,n,r){return{event:e,requestId:t.randomId(),method:n,params:r}},h.createResponse=function(e,t,n,r){return{event:e,requestId:t.requestId,data:n,err:r||null}};var f=function(e,n,r){this.subMap=e,this.id=t.randomId(),this.eventName=n,this.f=r};f.prototype.unsubscribe=function(){this.subMap.unsubscribe(this.eventName,this.id)};var g=function(){this.subIdMap={},this.subEventNameMap={}};g.prototype.subscribe=function(e,t){var n=new f(this,e,t);this.subIdMap[n.id]=n;var r=this.subEventNameMap[e]||[];return r.push(n),this.subEventNameMap[e]=r,n},g.prototype.unsubscribe=function(e,n){t.contains(this.subEventNameMap,e)&&(this.subEventNameMap[e]=this.subEventNameMap[e].filter((function(e){return e.id!==n})),this.subEventNameMap[e].length<1&&delete this.subEventNameMap[e]),t.contains(this.subIdMap,n)&&delete this.subIdMap[n]},g.prototype.getAllSubscriptions=function(){return t.values(this.subEventNameMap).reduce((function(e,t){return e.concat(t)}),[])},g.prototype.getSubscriptions=function(e){return this.subEventNameMap[e]||[]};var m=function(e){var t=e||{};this.subMap=new g,this.logEvents=t.logEvents||!1};m.prototype.subscribe=function(e,n){return t.assertNotNull(e,"eventName"),t.assertNotNull(n,"f"),t.assertTrue(t.isFunction(n),"f must be a function"),this.subMap.subscribe(e,n)},m.prototype.subscribeAll=function(e){return t.assertNotNull(e,"f"),t.assertTrue(t.isFunction(e),"f must be a function"),this.subMap.subscribe(n,e)},m.prototype.getSubscriptions=function(e){return this.subMap.getSubscriptions(e)},m.prototype.trigger=function(e,r){t.assertNotNull(e,"eventName");var o=this,i=this.subMap.getSubscriptions(n),s=this.subMap.getSubscriptions(e);this.logEvents&&e!==t.EventType.LOG&&e!==t.EventType.MASTER_RESPONSE&&e!==t.EventType.API_METRIC&&e!==t.EventType.SERVER_BOUND_INTERNAL_LOG&&t.getLog().trace("Publishing event: %s",e).sendInternalLogToServer(),e.startsWith(t.ContactEvents.ACCEPTED)&&r&&r.contactId&&!(r instanceof t.Contact)&&(r=new t.Contact(r.contactId)),i.concat(s).forEach((function(n){try{n.f(r||null,e,o)}catch(n){t.getLog().error("'%s' event handler failed.",e).withException(n).sendInternalLogToServer()}}))},m.prototype.bridge=function(){var e=this;return function(t,n){e.trigger(n,t)}},m.prototype.unsubscribeAll=function(){this.subMap.getAllSubscriptions().forEach((function(e){e.unsubscribe()}))},t.EventBus=m,t.EventFactory=h,t.EventType=r,t.AgentEvents=i,t.ConfigurationEvents=p,t.ConnectionEvents=l,t.ConnnectionEvents=l,t.ContactEvents=a,t.ChannelViewEvents=c,t.TaskEvents=u,t.VoiceIdEvents=d,t.WebSocketEvents=s,t.MasterTopics=o}()},286:()=>{!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";var r=n(1),o="DEBUG",i="AMZ_WEB_SOCKET_MANAGER:",s="Network offline",a="Network online, connecting to WebSocket server",c="Network offline, ignoring this getWebSocketConnConfig request",u="Heartbeat response not received",l="Failed to send heartbeat since WebSocket is not open",p="WebSocket connection established!",d="WebSocket connection is closed",h="WebSocketManager Error, error_event: ",f="Scheduling WebSocket reinitialization, after delay ",g="WebSocket URL cannot be used to establish connection",m="WebSocket Initialization failed - Terminating and cleaning subscriptions",v="Fetching new WebSocket connection configuration",y="Successfully fetched webSocket connection configuration",E="Failed to fetch webSocket connection configuration",S="Retrying fetching new WebSocket connection configuration",b="Initializing Websocket Manager",T="WebSocketManager Message Error",C="Message received for topic ",I="Invalid incoming message",_="aws/subscribe",A="aws/heartbeat",w="disconnected";function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var k={assertTrue:function(e,t){if(!e)throw new Error(t)},assertNotNull:function(e,t){return k.assertTrue(null!==e&&void 0!==R(e),Object(r.sprintf)("%s must be provided",t||"A value")),e},isNonEmptyString:function(e){return"string"==typeof e&&e.length>0},assertIsList:function(e,t){if(!Array.isArray(e))throw new Error(t+" is not an array")},isFunction:function(e){return!!(e&&e.constructor&&e.call&&e.apply)},isObject:function(e){return!("object"!==R(e)||null===e)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e}},N=new RegExp("^(wss://)\\w*");k.validWSUrl=function(e){return N.test(e)},k.getSubscriptionResponse=function(e,t,n){return{topic:e,content:{status:t?"success":"failure",topics:n}}},k.assertIsObject=function(e,t){if(!k.isObject(e))throw new Error(t+" is not an object!")},k.addJitter=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;t=Math.min(t,1);var n=Math.random()>.5?1:-1;return Math.floor(e+n*e*Math.random()*t)},k.isNetworkOnline=function(){return navigator.onLine},k.isNetworkFailure=function(e){return!(!e._debug||!e._debug.type)&&"NetworkingError"===e._debug.type};var O=k;function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t){for(var n=0;n=this._level}},{key:"hasClientLogger",value:function(){return null!==this._clientLogger}},{key:"getLogger",value:function(e){var t=e.prefix||q;return this._logsDestination===o?this.consoleLoggerWrapper:new W(t)}},{key:"updateLoggerConfig",value:function(e){var t=e||{};this._level=t.level||j.INFO,this._advancedLogWriter="warn",t.advancedLogWriter&&(this._advancedLogWriter=t.advancedLogWriter),t.customizedLogger&&"object"===P(t.customizedLogger)&&(this.useClientLogger=!0),this._clientLogger=t.logger||this.selectLogger(t),this._logsDestination="NULL",t.debug&&(this._logsDestination=o),t.logger&&(this._logsDestination="CLIENT_LOGGER")}},{key:"selectLogger",value:function(e){return e.customizedLogger&&"object"===P(e.customizedLogger)?e.customizedLogger:e.useDefaultLogger?(this.consoleLoggerWrapper=H(),this.consoleLoggerWrapper):null}}]),e}(),V=function(){function e(){x(this,e)}return U(e,[{key:"debug",value:function(){}},{key:"info",value:function(){}},{key:"warn",value:function(){}},{key:"error",value:function(){}},{key:"advancedLog",value:function(){}}]),e}(),W=function(e){function t(e){var n;return x(this,t),(n=function(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,L(t).call(this))).prefix=e||q,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(t,V),U(t,[{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:2e3;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.numAttempts=0,this.executor=t,this.hasActiveReconnection=!1,this.defaultRetry=n}var t,n;return t=e,(n=[{key:"retry",value:function(){var e=this;this.hasActiveReconnection||(this.hasActiveReconnection=!0,setTimeout((function(){e._execute()}),this._getDelay()))}},{key:"_execute",value:function(){this.hasActiveReconnection=!1,this.executor(),this.numAttempts++}},{key:"connected",value:function(){this.numAttempts=0}},{key:"_getDelay",value:function(){var e=Math.pow(2,this.numAttempts)*this.defaultRetry;return e<=3e4?e:3e4}},{key:"getIsConnected",value:function(){return!this.numAttempts}}])&&G(t.prototype,n),e}();n.d(t,"a",(function(){return Y}));var X=function(){var e=z.getLogger({prefix:i}),t=O.isNetworkOnline(),n={primary:null,secondary:null},r={reconnectWebSocket:!0,websocketInitFailed:!1,exponentialBackOffTime:1e3,exponentialTimeoutHandle:null,lifeTimeTimeoutHandle:null,webSocketInitCheckerTimeoutId:null,connState:null},o={connectWebSocketRetryCount:0,connectionAttemptStartTime:null,noOpenConnectionsTimestamp:null},R={pendingResponse:!1,intervalHandle:null},k={initFailure:new Set,getWebSocketTransport:null,subscriptionUpdate:new Set,subscriptionFailure:new Set,topic:new Map,allMessage:new Set,connectionGain:new Set,connectionLost:new Set,connectionOpen:new Set,connectionClose:new Set},N={connConfig:null,promiseHandle:null,promiseCompleted:!0},L={subscribed:new Set,pending:new Set,subscriptionHistory:new Set},D={responseCheckIntervalId:null,requestCompleted:!0,reSubscribeIntervalId:null,consecutiveFailedSubscribeAttempts:0,consecutiveNoResponseRequest:0},P=new K((function(){se()})),x=new Set([_,"aws/unsubscribe",A]),M=setInterval((function(){if(t!==O.isNetworkOnline()){if(!(t=O.isNetworkOnline()))return e.advancedLog(s),void ue(e.info(s));var n=W();t&&(!n||j(n,WebSocket.CLOSING)||j(n,WebSocket.CLOSED))&&(e.advancedLog(a),ue(e.info(a)),se())}}),250),U=function(t,n){t.forEach((function(t){try{t(n)}catch(t){ue(e.error("Error executing callback",t))}}))},F=function(e){if(null===e)return"NULL";switch(e.readyState){case WebSocket.CONNECTING:return"CONNECTING";case WebSocket.OPEN:return"OPEN";case WebSocket.CLOSING:return"CLOSING";case WebSocket.CLOSED:return"CLOSED";default:return"UNDEFINED"}},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";ue(e.debug("["+t+"] Primary WebSocket: "+F(n.primary)+" | Secondary WebSocket: "+F(n.secondary)))},j=function(e,t){return e&&e.readyState===t},B=function(e){return j(e,WebSocket.OPEN)},V=function(e){return null===e||void 0===e.readyState||j(e,WebSocket.CLOSED)},W=function(){return null!==n.secondary?n.secondary:n.primary},H=function(){return B(W())},G=function(){if(R.pendingResponse)return e.advancedLog(u),ue(e.warn(u)),clearInterval(R.intervalHandle),R.pendingResponse=!1,void se();H()?(ue(e.debug("Sending heartbeat")),W().send(oe(A)),R.pendingResponse=!0):(e.advancedLog(l),ue(e.warn(l)),q("sendHeartBeat"),se())},X=function(){e.advancedLog("Reset Websocket state"),r.exponentialBackOffTime=1e3,R.pendingResponse=!1,r.reconnectWebSocket=!0,clearTimeout(r.lifeTimeTimeoutHandle),clearInterval(R.intervalHandle),clearTimeout(r.exponentialTimeoutHandle),clearTimeout(r.webSocketInitCheckerTimeoutId)},Y=function(){D.consecutiveFailedSubscribeAttempts=0,D.consecutiveNoResponseRequest=0,clearInterval(D.responseCheckIntervalId),clearInterval(D.reSubscribeIntervalId)},J=function(){o.connectWebSocketRetryCount=0,o.connectionAttemptStartTime=null,o.noOpenConnectionsTimestamp=null},Q=function(){P.connected();try{e.advancedLog(p),ue(e.info(p)),q("webSocketOnOpen"),null!==r.connState&&r.connState!==w||U(k.connectionGain),r.connState="connected";var t=Date.now();U(k.connectionOpen,{connectWebSocketRetryCount:o.connectWebSocketRetryCount,connectionAttemptStartTime:o.connectionAttemptStartTime,noOpenConnectionsTimestamp:o.noOpenConnectionsTimestamp,connectionEstablishedTime:t,timeToConnect:t-o.connectionAttemptStartTime,timeWithoutConnection:o.noOpenConnectionsTimestamp?t-o.noOpenConnectionsTimestamp:null}),J(),X(),W().openTimestamp=Date.now(),0===L.subscribed.size&&B(n.secondary)&&te(n.primary,"[Primary WebSocket] Closing WebSocket"),(L.subscribed.size>0||L.pending.size>0)&&(B(n.secondary)&&ue(e.info("Subscribing secondary websocket to topics of primary websocket")),L.subscribed.forEach((function(e){L.subscriptionHistory.add(e),L.pending.add(e)})),L.subscribed.clear(),ee()),G(),R.intervalHandle=setInterval(G,1e4);var i=1e3*N.connConfig.webSocketTransport.transportLifeTimeInSeconds;ue(e.debug("Scheduling WebSocket manager reconnection, after delay "+i+" ms")),r.lifeTimeTimeoutHandle=setTimeout((function(){ue(e.debug("Starting scheduled WebSocket manager reconnection")),se()}),i)}catch(t){ue(e.error("Error after establishing WebSocket connection",t))}},$=function(t){q("webSocketOnError"),e.advancedLog(h,JSON.stringify(t)),ue(e.error(h,JSON.stringify(t))),P.getIsConnected()?se():P.retry()},Z=function(t){var r=JSON.parse(t.data);switch(r.topic){case _:if(ue(e.debug("Subscription Message received from webSocket server",t.data)),D.requestCompleted=!0,D.consecutiveNoResponseRequest=0,"success"===r.content.status)D.consecutiveFailedSubscribeAttempts=0,r.content.topics.forEach((function(e){L.subscriptionHistory.delete(e),L.pending.delete(e),L.subscribed.add(e)})),0===L.subscriptionHistory.size?B(n.secondary)&&(ue(e.info("Successfully subscribed secondary websocket to all topics of primary websocket")),te(n.primary,"[Primary WebSocket] Closing WebSocket")):ee(),U(k.subscriptionUpdate,r);else{if(clearInterval(D.reSubscribeIntervalId),++D.consecutiveFailedSubscribeAttempts,5===D.consecutiveFailedSubscribeAttempts)return U(k.subscriptionFailure,r),void(D.consecutiveFailedSubscribeAttempts=0);D.reSubscribeIntervalId=setInterval((function(){ee()}),500)}break;case A:ue(e.debug("Heartbeat response received")),R.pendingResponse=!1;break;default:if(r.topic){if(e.advancedLog(C,r.topic),ue(e.debug(C+r.topic)),B(n.primary)&&B(n.secondary)&&0===L.subscriptionHistory.size&&this===n.primary)return void ue(e.warn("Ignoring Message for Topic "+r.topic+", to avoid duplicates"));if(0===k.allMessage.size&&0===k.topic.size)return void ue(e.warn("No registered callback listener for Topic",r.topic));e.advancedLog("WebsocketManager invoke callbacks for topic success ",r.topic),U(k.allMessage,r),k.topic.has(r.topic)&&U(k.topic.get(r.topic),r)}else r.message?(e.advancedLog(T,r),ue(e.warn(T,r))):(e.advancedLog(I,r),ue(e.warn(I,r)))}},ee=function t(){if(D.consecutiveNoResponseRequest>3)return ue(e.warn("Ignoring subscribePendingTopics since we have exhausted max subscription retries with no response")),void U(k.subscriptionFailure,O.getSubscriptionResponse(_,!1,Array.from(L.pending)));H()?0!==Array.from(L.pending).length&&(clearInterval(D.responseCheckIntervalId),W().send(oe(_,{topics:Array.from(L.pending)})),D.requestCompleted=!1,D.responseCheckIntervalId=setInterval((function(){D.requestCompleted||(++D.consecutiveNoResponseRequest,t())}),1e3)):ue(e.warn("Ignoring subscribePendingTopics call since Default WebSocket is not open"))},te=function(t,n){j(t,WebSocket.CONNECTING)||j(t,WebSocket.OPEN)?t.close(1e3,n):ue(e.warn("Ignoring WebSocket Close request, WebSocket State: "+F(t)))},ne=function(e){te(n.primary,"[Primary] WebSocket "+e),te(n.secondary,"[Secondary] WebSocket "+e)},re=function(t){X(),Y(),e.advancedLog(m,t),ue(e.error(m)),r.websocketInitFailed=!0,ne("Terminating WebSocket Manager"),clearInterval(M),U(k.initFailure,{connectWebSocketRetryCount:o.connectWebSocketRetryCount,connectionAttemptStartTime:o.connectionAttemptStartTime,reason:t}),J()},oe=function(e,t){return JSON.stringify({topic:e,content:t})},ie=function(t){return!!(O.isObject(t)&&O.isObject(t.webSocketTransport)&&O.isNonEmptyString(t.webSocketTransport.url)&&O.validWSUrl(t.webSocketTransport.url)&&1e3*t.webSocketTransport.transportLifeTimeInSeconds>=3e5)||(ue(e.error("Invalid WebSocket Connection Configuration",t)),!1)},se=function(){if(!O.isNetworkOnline())return e.advancedLog(c),void ue(e.info(c));if(r.websocketInitFailed)ue(e.debug("WebSocket Init had failed, ignoring this getWebSocketConnConfig request"));else{if(N.promiseCompleted)return X(),e.advancedLog(v),ue(e.info(v)),o.connectionAttemptStartTime=o.connectionAttemptStartTime||Date.now(),N.promiseCompleted=!1,N.promiseHandle=k.getWebSocketTransport(),N.promiseHandle.then((function(t){return N.promiseCompleted=!0,e.advancedLog(y),ue(e.debug(y,t)),ie(t)?(N.connConfig=t,N.connConfig.urlConnValidTime=Date.now()+85e3,ae()):(re("Invalid WebSocket connection configuration: "+t),{webSocketConnectionFailed:!0})}),(function(t){return N.promiseCompleted=!0,e.advancedLog(E),ue(e.error(E,t)),O.isNetworkFailure(t)?(e.advancedLog(S+JSON.stringify(t)),ue(e.info(S+JSON.stringify(t))),P.retry()):re("Failed to fetch webSocket connection configuration: "+JSON.stringify(t)),{webSocketConnectionFailed:!0}}));ue(e.debug("There is an ongoing getWebSocketConnConfig request, this request will be ignored"))}},ae=function(){if(r.websocketInitFailed)return ue(e.info("web-socket initializing had failed, aborting re-init")),{webSocketConnectionFailed:!0};if(!O.isNetworkOnline())return ue(e.warn("System is offline aborting web-socket init")),{webSocketConnectionFailed:!0};e.advancedLog(b),ue(e.info(b)),q("initWebSocket");try{if(ie(N.connConfig)){var t=null;return B(n.primary)?(ue(e.debug("Primary Socket connection is already open")),j(n.secondary,WebSocket.CONNECTING)||(ue(e.debug("Establishing a secondary web-socket connection")),P.numAttempts=0,n.secondary=ce()),t=n.secondary):(j(n.primary,WebSocket.CONNECTING)||(ue(e.debug("Establishing a primary web-socket connection")),n.primary=ce()),t=n.primary),r.webSocketInitCheckerTimeoutId=setTimeout((function(){B(t)||function(){o.connectWebSocketRetryCount++;var t=O.addJitter(r.exponentialBackOffTime,.3);Date.now()+t<=N.connConfig.urlConnValidTime?(e.advancedLog(f),ue(e.debug(f+t+" ms")),r.exponentialTimeoutHandle=setTimeout((function(){return ae()}),t),r.exponentialBackOffTime*=2):(e.advancedLog(g),ue(e.warn(g)),se())}()}),1e3),{webSocketConnectionFailed:!1}}}catch(t){return ue(e.error("Error Initializing web-socket-manager",t)),re("Failed to initialize new WebSocket: "+t.message),{webSocketConnectionFailed:!0}}},ce=function(){var t=new WebSocket(N.connConfig.webSocketTransport.url);return t.addEventListener("open",Q),t.addEventListener("message",Z),t.addEventListener("error",$),t.addEventListener("close",(function(i){return function(t,i){e.advancedLog(d,JSON.stringify(t)),ue(e.info(d,JSON.stringify(t))),q("webSocketOnClose before-cleanup"),U(k.connectionClose,{openTimestamp:i.openTimestamp,closeTimestamp:Date.now(),connectionDuration:Date.now()-i.openTimestamp,code:t.code,reason:t.reason}),V(n.primary)&&(n.primary=null),V(n.secondary)&&(n.secondary=null),r.reconnectWebSocket&&(B(n.primary)||B(n.secondary)?V(n.primary)&&B(n.secondary)&&(ue(e.info("[Primary] WebSocket Cleanly Closed")),n.primary=n.secondary,n.secondary=null):(ue(e.warn("Neither primary websocket and nor secondary websocket have open connections, attempting to re-establish connection")),r.connState===w?ue(e.info("Ignoring connectionLost callback invocation")):(U(k.connectionLost,{openTimestamp:i.openTimestamp,closeTimestamp:Date.now(),connectionDuration:Date.now()-i.openTimestamp,code:t.code,reason:t.reason}),o.noOpenConnectionsTimestamp=Date.now()),r.connState=w,se()),q("webSocketOnClose after-cleanup"))}(i,t)})),t},ue=function(e){return e&&"function"==typeof e.sendInternalLogToServer&&e.sendInternalLogToServer(),e};this.init=function(t){if(O.assertTrue(O.isFunction(t),"transportHandle must be a function"),null===k.getWebSocketTransport)return k.getWebSocketTransport=t,se();ue(e.warn("Web Socket Manager was already initialized"))},this.onInitFailure=function(t){return e.advancedLog("Initializing Websocket Manager Failed!"),O.assertTrue(O.isFunction(t),"cb must be a function"),k.initFailure.add(t),r.websocketInitFailed&&t(),function(){return k.initFailure.delete(t)}},this.onConnectionOpen=function(t){return e.advancedLog("Websocket connection open"),O.assertTrue(O.isFunction(t),"cb must be a function"),k.connectionOpen.add(t),function(){return k.connectionOpen.delete(t)}},this.onConnectionClose=function(t){return e.advancedLog("Websocket connection close"),O.assertTrue(O.isFunction(t),"cb must be a function"),k.connectionClose.add(t),function(){return k.connectionClose.delete(t)}},this.onConnectionGain=function(t){return e.advancedLog("Websocket connection gain"),O.assertTrue(O.isFunction(t),"cb must be a function"),k.connectionGain.add(t),H()&&t(),function(){return k.connectionGain.delete(t)}},this.onConnectionLost=function(t){return e.advancedLog("Websocket connection lost"),O.assertTrue(O.isFunction(t),"cb must be a function"),k.connectionLost.add(t),r.connState===w&&t(),function(){return k.connectionLost.delete(t)}},this.onSubscriptionUpdate=function(e){return O.assertTrue(O.isFunction(e),"cb must be a function"),k.subscriptionUpdate.add(e),function(){return k.subscriptionUpdate.delete(e)}},this.onSubscriptionFailure=function(t){return e.advancedLog("Websocket subscription failure"),O.assertTrue(O.isFunction(t),"cb must be a function"),k.subscriptionFailure.add(t),function(){return k.subscriptionFailure.delete(t)}},this.onMessage=function(e,t){return O.assertNotNull(e,"topicName"),O.assertTrue(O.isFunction(t),"cb must be a function"),k.topic.has(e)?k.topic.get(e).add(t):k.topic.set(e,new Set([t])),function(){return k.topic.get(e).delete(t)}},this.onAllMessage=function(e){return O.assertTrue(O.isFunction(e),"cb must be a function"),k.allMessage.add(e),function(){return k.allMessage.delete(e)}},this.subscribeTopics=function(e){O.assertNotNull(e,"topics"),O.assertIsList(e),e.forEach((function(e){L.subscribed.has(e)||L.pending.add(e)})),D.consecutiveNoResponseRequest=0,ee()},this.sendMessage=function(t){if(O.assertIsObject(t,"payload"),void 0===t.topic||x.has(t.topic))ue(e.warn("Cannot send message, Invalid topic",t));else{try{t=JSON.stringify(t)}catch(n){return void ue(e.warn("Error stringify message",t))}H()?W().send(t):ue(e.warn("Cannot send message, web socket connection is not open"))}},this.closeWebSocket=function(){X(),Y(),r.reconnectWebSocket=!1,clearInterval(M),ne("User request to close WebSocket")},this.terminateWebSocketManager=re},Y={create:function(){return new X},setGlobalConfig:function(e){var t=e&&e.loggerConfig;z.updateLoggerConfig(t)},LogLevel:j,Logger:F}},function(e,t,n){var r;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return function(e,t){var n,r,s,a,c,u,l,p,d,h=1,f=e.length,g="";for(r=0;r=0),a.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,a.width?parseInt(a.width):0);break;case"e":n=a.precision?parseFloat(n).toExponential(a.precision):parseFloat(n).toExponential();break;case"f":n=a.precision?parseFloat(n).toFixed(a.precision):parseFloat(n);break;case"g":n=a.precision?String(Number(n.toPrecision(a.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a.precision?n.substring(0,a.precision):n;break;case"t":n=String(!!n),n=a.precision?n.substring(0,a.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a.precision?n.substring(0,a.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a.precision?n.substring(0,a.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}o.json.test(a.type)?g+=n:(!o.number.test(a.type)||p&&!a.sign?d="":(d=p?"+":"-",n=n.toString().replace(o.sign,"")),u=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",l=a.width-(d+n).length,c=a.width&&l>0?u.repeat(l):"",g+=a.align?d+n+c:"0"===u?d+c+n:c+d+n)}return g}(function(e){if(a[e])return a[e];for(var t,n=e,r=[],i=0;n;){if(null!==(t=o.text.exec(n)))r.push(t[0]);else if(null!==(t=o.modulo.exec(n)))r.push("%");else{if(null===(t=o.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var s=[],c=t[2],u=[];if(null===(u=o.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(u[1]);""!==(c=c.substring(u[0].length));)if(null!==(u=o.key_access.exec(c)))s.push(u[1]);else{if(null===(u=o.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(u[1])}t[2]=s}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return a[e]=r}(e),arguments)}function s(e,t){return i.apply(null,[e].concat(t||[]))}var a=Object.create(null);t.sprintf=i,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=s,void 0===(r=function(){return{sprintf:i,vsprintf:s}}.call(t,n,t,e))||(e.exports=r))}()},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"WebSocketManager",(function(){return o}));var r=n(0);e.connect=e.connect||{},connect.WebSocketManager=r.a;var o=r.a}.call(this,n(3))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}])},151:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t;var n={TEST:"TEST",TRACE:"TRACE",DEBUG:"DEBUG",INFO:"INFO",LOG:"LOG",WARN:"WARN",ERROR:"ERROR",CRITICAL:"CRITICAL"},r={CCP:"ccp",SOFTPHONE:"softphone",CHAT:"chat",TASK:"task"},o={TEST:0,TRACE:10,DEBUG:20,INFO:30,LOG:40,WARN:50,ERROR:100,CRITICAL:200},i={TRACE:function(e){console.info(e)},DEBUG:function(e){console.info(e)},INFO:function(e){console.info(e)},LOG:function(e){console.log(e)},TEST:function(e){console.log(e)},WARN:function(e){console.warn(e)},ERROR:function(e){console.error(e)},CRITICAL:function(e){console.error(e)}},s=function(e){var t,n,o=Array.prototype.slice.call(e,0),i=o.shift();return function(e){return-1!==Object.values(r).indexOf(e)}(i)?(n=i,t=o.shift()):(t=i,n=r.CCP),{format:t,component:n,args:o}},a=function(e,n,r,o){this.component=e,this.level=n,this.text=r,this.time=new Date,this.exception=null,this.objects=[],this.line=0,this.agentResourceId=null;try{t.agent.initialized&&(this.agentResourceId=(new t.Agent)._getResourceId())}catch(e){console.log("Issue finding agentResourceId: ",e)}this.loggerId=o};a.fromObject=function(e){var t=new a(r.CCP,e.level,e.text,e.loggerId);return"[object Date]"===Object.prototype.toString.call(e.time)?t.time=new Date(e.time.getTime()):"number"==typeof e.time?t.time=new Date(e.time):"string"==typeof e.time?t.time=Date.parse(e.time):t.time=new Date,t.exception=e.exception,t.objects=e.objects,t};var c=function(e){var t=/AuthToken.*\=/g;e&&"object"==typeof e&&Object.keys(e).forEach((function(n){"object"==typeof e[n]?c(e[n]):"string"==typeof e[n]&&("url"===n||"text"===n?e[n]=e[n].replace(t,"[redacted]"):["quickConnectName"].includes(n)?e[n]="[redacted]":["customerId","CustomerId","SpeakerId","CustomerSpeakerId"].includes(n)&&(e[n]=md5(e[n])))}))},u=function(e){if(this.type=e instanceof Error?e.name:e.code||Object.prototype.toString.call(e),this.message=e.message,this.stack=[],e.stack)try{Array.isArray(e.stack)?this.stack=e.stack:"object"==typeof e.stack?this.stack=[JSON.stringify(e.stack)]:"string"==typeof e.stack&&(this.stack=e.stack.split("\n"))}catch{}};a.prototype.toString=function(){return t.sprintf("[%s] [%s] [%s]: %s",this.getTime()&&this.getTime().toISOString?this.getTime().toISOString():"???",this.getLevel(),this.getAgentResourceId(),this.getText())},a.prototype.getTime=function(){return this.time},a.prototype.getAgentResourceId=function(){return this.agentResourceId},a.prototype.getLevel=function(){return this.level},a.prototype.getText=function(){return this.text},a.prototype.getComponent=function(){return this.component},a.prototype.withException=function(e){return this.exception=new u(e),this},a.prototype.withObject=function(e){var n=t.deepcopy(e);return c(n),this.objects.push(n),this},a.prototype.withCrossOriginEventObject=function(e){var n=t.deepcopyCrossOriginEvent(e);return c(n),this.objects.push(n),this},a.prototype.sendInternalLogToServer=function(){return t.getLog()._serverBoundInternalLogs.push(this),this};var l=function(){this._logs=[],this._rolledLogs=[],this._logsToPush=[],this._serverBoundInternalLogs=[],this._echoLevel=o.INFO,this._logLevel=o.INFO,this._lineCount=0,this._logRollInterval=0,this._logRollTimer=null,this._loggerId=(new Date).getTime()+"-"+Math.random().toString(36).slice(2),this.setLogRollInterval(18e5),this._startLogIndexToPush=0};l.prototype.setLogRollInterval=function(t){var n=this;this._logRollTimer&&t===this._logRollInterval?this.warn("Logger is already set to the given interval: %d",this._logRollInterval):(this._logRollTimer&&e.clearInterval(this._logRollTimer),this._logRollInterval=t,this._logRollTimer=e.setInterval((function(){n._rolledLogs=n._logs,n._logs=[],n._startLogIndexToPush=0,n.info("Log roll interval occurred.")}),this._logRollInterval))},l.prototype.setLogLevel=function(e){if(!(e in o))throw new Error("Unknown logging level: "+e);this._logLevel=o[e]},l.prototype.setEchoLevel=function(e){if(!(e in o))throw new Error("Unknown logging level: "+e);this._echoLevel=o[e]},l.prototype.write=function(e,t,n){var r=new a(e,t,n,this.getLoggerId());return c(r),this.addLogEntry(r),r},l.prototype.addLogEntry=function(e){c(e),this._logs.push(e),r.SOFTPHONE===e.component&&this._logsToPush.push(e),e.level in o&&o[e.level]>=this._logLevel&&(o[e.level]>=this._echoLevel&&i[e.getLevel()](e.toString()),e.line=this._lineCount++)},l.prototype.sendInternalLogEntryToServer=function(e){this._serverBoundInternalLogs.push(e),e.level in o&&o[e.level]>=this._logLevel&&(o[e.level]>=this._echoLevel&&i[e.getLevel()](e.toString()),e.line=this._lineCount++)},l.prototype.clearObjects=function(){for(var e=0;e=i._logLevel})));var a=new e.Blob([JSON.stringify(s,void 0,4)],["text/plain"]),c=document.createElement("a");n=n||"agent-log",c.href=e.URL.createObjectURL(a),c.download=n+".txt",document.body.appendChild(c),c.click(),document.body.removeChild(c)},l.prototype.scheduleUpstreamLogPush=function(n){t.upstreamLogPushScheduled||(t.upstreamLogPushScheduled=!0,e.setInterval(t.hitch(this,this.reportMasterLogsUpStream,n),5e3))},l.prototype.reportMasterLogsUpStream=function(e){var n=this._logsToPush.slice();this._logsToPush=[],t.ifMaster(t.MasterTopics.SEND_LOGS,(function(){n.length>0&&e.sendUpstream(t.EventType.SEND_LOGS,n)}))},l.prototype.scheduleUpstreamOuterContextCCPserverBoundLogsPush=function(n){e.setInterval(t.hitch(this,this.pushOuterContextCCPserverBoundLogsUpstream,n),1e3)},l.prototype.scheduleUpstreamOuterContextCCPLogsPush=function(n){e.setInterval(t.hitch(this,this.pushOuterContextCCPLogsUpstream,n),1e3)},l.prototype.pushOuterContextCCPserverBoundLogsUpstream=function(e){if(this._serverBoundInternalLogs.length>0){for(var n=0;n500?e=this._serverBoundInternalLogs.splice(0,500):(e=this._serverBoundInternalLogs,this._serverBoundInternalLogs=[]),t.publishClientSideLogs(e))};var p=function(n){l.call(this),this.conduit=n,e.setInterval(t.hitch(this,this._pushLogsDownstream),p.LOG_PUSH_INTERVAL),e.clearInterval(this._logRollTimer),this._logRollTimer=null};p.LOG_PUSH_INTERVAL=1e3,p.prototype=Object.create(l.prototype),p.prototype.constructor=p,p.prototype.pushLogsDownstream=function(e){var n=this;e.forEach((function(e){n.conduit.sendDownstream(t.EventType.LOG,e)}))},p.prototype._pushLogsDownstream=function(){var e=this;this._logs.forEach((function(n){e.conduit.sendDownstream(t.EventType.LOG,n)})),this._logs=[];for(var n=0;n>16)+(t>>16)+(n>>16)<<16|65535&n}function n(e,n,r,o,i,s){return t((a=t(t(n,e),t(o,s)))<<(c=i)|a>>>32-c,r);var a,c}function r(e,t,r,o,i,s,a){return n(t&r|~t&o,e,t,i,s,a)}function o(e,t,r,o,i,s,a){return n(t&o|r&~o,e,t,i,s,a)}function i(e,t,r,o,i,s,a){return n(t^r^o,e,t,i,s,a)}function s(e,t,r,o,i,s,a){return n(r^(t|~o),e,t,i,s,a)}function a(e,n){var a,c,u,l,p;e[n>>5]|=128<>>9<<4)]=n;var d=1732584193,h=-271733879,f=-1732584194,g=271733878;for(a=0;a>5]>>>t%32&255);return n}function u(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return o}function p(e){return unescape(encodeURIComponent(e))}function d(e){return function(e){return c(a(u(e),8*e.length))}(p(e))}function h(e,t){return function(e,t){var n,r,o=u(e),i=[],s=[];for(i[15]=s[15]=void 0,o.length>16&&(o=a(o,8*e.length)),n=0;n<16;n+=1)i[n]=909522486^o[n],s[n]=1549556828^o[n];return r=a(i.concat(u(t)),512+8*t.length),c(a(s.concat(r),640))}(p(e),p(t))}(this||globalThis).md5=function(e,t,n){return t?n?h(t,e):l(h(t,e)):n?d(e):l(d(e))}}()},439:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,t.ChatMediaController=function(e,n){var r=t.getLog(),o=t.LogComponent.CHAT,i=function(n,r){t.publishMetric({name:n,contactId:e.contactId,data:r||e})},s=function(e){e.onConnectionBroken((function(e){r.error(o,"Chat Session connection broken").withException(e).sendInternalLogToServer(),i("Chat Session connection broken",e)})),e.onConnectionEstablished((function(e){r.info(o,"Chat Session connection established").withObject(e).sendInternalLogToServer(),i("Chat Session connection established",e)}))};return{get:function(){return function(){i("Chat media controller init",e.contactId),r.info(o,"Chat media controller init").withObject(e).sendInternalLogToServer(),t.ChatSession.setGlobalConfig({loggerConfig:{logger:r},region:n.region});var a=t.ChatSession.create({chatDetails:e,type:"AGENT",websocketManager:t.core.getWebSocketManager()});return s(a),a.connect().then((function(t){return r.info(o,"Chat Session Successfully established for contactId %s",e.contactId).sendInternalLogToServer(),i("Chat Session Successfully established",e.contactId),a})).catch((function(t){throw r.error(o,"Chat Session establishement failed for contact %s",e.contactId).withException(t).sendInternalLogToServer(),i("Chat Session establishement failed",e.contactId,t),t}))}()}}}}()},279:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,t.MediaFactory=function(e){var n={},r=new Set,o=t.getLog(),i=t.LogComponent.CHAT,s=t.merge({},e)||{};s.region=s.region||"us-west-2";var a=function(e){n[e]&&!r.has(e)&&(o.info(i,"Destroying mediaController for %s",e),r.add(e),n[e].then((function(){"function"==typeof controller.cleanUp&&controller.cleanUp(),delete n[e],r.delete(e)})).catch((function(){delete n[e],r.delete(e)})))};return{get:function(e){return function(e){return e.isActive()}(e)?function(e){var r=e.getConnectionId();if(!e.getMediaInfo())return o.error(i,"Media info does not exist for a media type %s",e.getMediaType()).withObject(e).sendInternalLogToServer(),Promise.reject("Media info does not exist for this connection");if(n[r])return n[r];switch(o.info(i,"media controller of type %s init",e.getMediaType()).withObject(e).sendInternalLogToServer(),e.getMediaType()){case t.MediaType.CHAT:return n[r]=new t.ChatMediaController(e.getMediaInfo(),s).get();case t.MediaType.SOFTPHONE:return n[r]=new t.SoftphoneMediaController(e.getMediaInfo()).get();case t.MediaType.TASK:return n[r]=new t.TaskMediaController(e.getMediaInfo()).get();default:return o.error(i,"Unrecognized media type %s ",e.getMediaType()).sendInternalLogToServer(),Promise.reject()}}(e):(a(e.getConnectionId()),Promise.reject("Media Controller is no longer available for this connection"))},destroy:a}}}()},418:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,t.SoftphoneMediaController=function(e){return{get:function(){return Promise.resolve(e)}}}}()},187:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,t.TaskMediaController=function(e){var n=t.getLog(),r=t.LogComponent.TASK,o=function(n,r){t.publishMetric({name:n,contactId:e.contactId,data:r||e})},i=function(e){e.onConnectionBroken((function(e){n.error(r,"Task Session connection broken").withException(e),o("Task Session connection broken",e)})),e.onConnectionEstablished((function(e){n.info(r,"Task Session connection established").withObject(e),o("Task Session connection established",e)}))};return{get:function(){return function(){o("Task media controller init",e.contactId),n.info(r,"Task media controller init").withObject(e);var s=t.TaskSession.create({contactId:e.contactId,initialContactId:e.initialContactId,websocketManager:t.core.getWebSocketManager()});return i(s),s.connect().then((function(){return n.info(r,"Task Session Successfully established for contactId %s",e.contactId),o("Task Session Successfully established",e.contactId),s})).catch((function(t){throw n.error(r,"Task Session establishement failed for contact %s",e.contactId).withException(t),o("Chat Session establishement failed",e.contactId,t),t}))}()}}}}()},743:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t;var n=function(n){var r=this;if(this._prevContactId=null,t.assertNotNull(n,"ringtoneConfig"),!n.ringtoneUrl)throw new Error("ringtoneUrl is required!");e.Audio&&void 0!==e.Promise?this._playableAudioPromise=new Promise((function(e,o){r._audio=new Audio(n.ringtoneUrl),r._audio.loop=!0,r._audio.addEventListener("canplay",(function(){t.getLog().info("Ringtone is ready to play: ",+n.ringtoneUrl).sendInternalLogToServer(),r._audioPlayable=!0,e(r._audio)}))})):(this._audio=null,t.getLog().error("Unable to provide a ringtone.").sendInternalLogToServer()),r._driveRingtone()};n.prototype._driveRingtone=function(){throw new Error("Not implemented.")},n.prototype._startRingtone=function(e){var n=this;this._audio&&(this._audio.play().catch((function(r){n._publishTelemetryEvent("Ringtone Playback Failure",e),t.getLog().error("Ringtone Playback Failure").withException(r).withObject({currentSrc:n._audio.currentSrc,sinkId:n._audio.sinkId,volume:n._audio.volume}).sendInternalLogToServer()})),n._publishTelemetryEvent("Ringtone Start",e),t.getLog().info("Ringtone Start").sendInternalLogToServer())},n.prototype._stopRingtone=function(e){this._audio&&(this._audio.pause(),this._audio.currentTime=0,this._publishTelemetryEvent("Ringtone Stop",e),t.getLog().info("Ringtone Stop").sendInternalLogToServer())},n.prototype.stopRingtone=function(){this._stopRingtone()},n.prototype._ringtoneSetup=function(e){var n=this;t.ifMaster(t.MasterTopics.RINGTONE,(function(){n._startRingtone(e),n._prevContactId=e.getContactId(),e.onConnected(lily.hitch(n,n._stopRingtone)),e.onAccepted(lily.hitch(n,n._stopRingtone)),e.onEnded(lily.hitch(n,n._stopRingtone)),e.onRefresh((function(e){e.getStatus().type!==t.ContactStatusType.CONNECTING&&e.getStatus().type!==t.ContactStatusType.INCOMING&&n._stopRingtone()}))}))},n.prototype._publishTelemetryEvent=function(e,n){n&&n.getContactId()&&t.publishMetric({name:e,contactId:n.getContactId()})},n.prototype.setOutputDevice=function(t){return this._playableAudioPromise?Promise.race([this._playableAudioPromise,new Promise((function(t,n){e.setTimeout((function(){n("Timed out waiting for playable audio")}),3e3)}))]).then((function(e){return e?e.setSinkId?Promise.resolve(e.setSinkId(t)):Promise.reject("Not supported"):Promise.reject("No audio found")})):e.Promise?Promise.reject("Not eligible ringtone owner"):void 0};var r=function(e){n.call(this,e)};(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype._driveRingtone=function(){var e=this,n=function(n){n.getType()===lily.ContactType.VOICE&&n.isSoftphoneCall()&&n.isInbound()&&(e._ringtoneSetup(n),e._publishTelemetryEvent("Ringtone Connecting",n),t.getLog().info("Ringtone Connecting").sendInternalLogToServer())};t.contact((function(e){e.onConnecting(n)})),(new t.Agent).getContacts().forEach((function(e){e.getStatus().type===t.ContactStatusType.CONNECTING&&n(e)}))};var o=function(e){n.call(this,e)};(o.prototype=Object.create(n.prototype)).constructor=o,o.prototype._driveRingtone=function(){var e=this,n=function(n){n.getType()===lily.ContactType.CHAT&&n.isInbound()&&(e._ringtoneSetup(n),e._publishTelemetryEvent("Chat Ringtone Connecting",n),t.getLog().info("Chat Ringtone Connecting").sendInternalLogToServer())};t.contact((function(e){e.onConnecting(n)}))};var i=function(e){n.call(this,e)};(i.prototype=Object.create(n.prototype)).constructor=i,i.prototype._driveRingtone=function(){var e=this,n=function(n){n.getType()===lily.ContactType.TASK&&n.isInbound()&&(e._ringtoneSetup(n),e._publishTelemetryEvent("Task Ringtone Connecting",n),t.getLog().info("Task Ringtone Connecting").sendInternalLogToServer())};t.contact((function(e){e.onConnecting(n)}))};var s=function(e){n.call(this,e)};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype._driveRingtone=function(){var e=this;t.contact((function(n){n.onIncoming((function(){n.getType()===lily.ContactType.QUEUE_CALLBACK&&(e._ringtoneSetup(n),e._publishTelemetryEvent("Callback Ringtone Connecting",n),t.getLog().info("Callback Ringtone Connecting").sendInternalLogToServer())}))}))},t.VoiceRingtoneEngine=r,t.ChatRingtoneEngine=o,t.TaskRingtoneEngine=i,t.QueueCallbackRingtoneEngine=s}()},642:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,e.ccpVersion="V2";var n={};n[t.SoftphoneCallType.AUDIO_ONLY]="Audio",n[t.SoftphoneCallType.VIDEO_ONLY]="Video",n[t.SoftphoneCallType.AUDIO_VIDEO]="AudioVideo",n[t.SoftphoneCallType.NONE]="None";var r="audio_input",o="audio_output";({})[t.ContactType.VOICE]="Voice";var i=[],s={},a={},c=null,u=null,l=null,p=t.SoftphoneErrorTypes,d={},h=t.randomId(),f=function(e){return new Promise((function(n,r){t.core.getClient().call(t.ClientMethods.CREATE_TRANSPORT,e,{success:function(e){n(e.softphoneTransport.softphoneMediaConnections)},failure:function(e){e.message&&e.message.includes("SoftphoneConnectionLimitBreachedException")&&w("multiple_softphone_active_sessions","Number of active sessions are more then allowed limit.",""),r(Error("requestIceAccess failed"))},authFailure:function(){r(Error("Authentication failed while requestIceAccess"))},accessDenied:function(){r(Error("Access Denied while requestIceAccess"))}})}))},g=function(e){var n=t.core.getUpstream(),r=e.getAgentConnection();if(r){var o=r.getSoftphoneMediaInfo();o?!0===o.autoAccept?(l.info("Auto-accept is enabled, sending out Accepted event to stop ringtone..").sendInternalLogToServer(),n.sendUpstream(t.EventType.BROADCAST,{event:t.ContactEvents.ACCEPTED,data:new t.Contact(e.contactId)}),n.sendUpstream(t.EventType.BROADCAST,{event:t.core.getContactEventName(t.ContactEvents.ACCEPTED,e.contactId),data:new t.Contact(e.contactId)})):l.info("Auto-accept is disabled, ringtone will be stopped by user action.").sendInternalLogToServer():l.info("Not able to retrieve the auto-accept setting from null SoftphoneMediaInfo, ignoring event publish..").sendInternalLogToServer()}else l.info("Not able to retrieve the auto-accept setting from null AgentConnection, ignoring event publish..").sendInternalLogToServer()},m=function(){t.core.getEventBus().subscribe(t.EventType.MUTE,b)},v=function(){t.core.getEventBus().subscribe(t.ConfigurationEvents.SET_SPEAKER_DEVICE,T)},y=function(){t.core.getEventBus().subscribe(t.ConfigurationEvents.SET_MICROPHONE_DEVICE,C)},E=function(){try{t.isChromeBrowser()&&t.getChromeBrowserVersion()>43&&navigator.permissions.query({name:"microphone"}).then((function(e){e.onchange=function(){l.info("Microphone Permission: "+e.state),k("ConnectivityCheckResult",null,{connectivityCheckType:"MicrophonePermission",status:e.state}),"denied"===e.state&&w(p.MICROPHONE_NOT_SHARED,"Your microphone is not enabled in your browser. ","")}}))}catch(e){l.error("Failed in detecting microphone permission status: "+e)}},S=function(e){delete d[e],t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.AgentEvents.MUTE_TOGGLE,data:{muted:!1}})},b=function(e){var n;if(0!==t.keys(d).length){for(var r in e&&void 0!==e.mute&&(n=e.mute),d)if(d.hasOwnProperty(r)){var o=d[r].stream;if(o){var i=o.getAudioTracks()[0];void 0!==n?(i.enabled=!n,d[r].muted=n,n?l.info("Agent has muted the contact, connectionId - "+r).sendInternalLogToServer():l.info("Agent has unmuted the contact, connectionId - "+r).sendInternalLogToServer()):n=d[r].muted||!1}}t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.AgentEvents.MUTE_TOGGLE,data:{muted:n}})}},T=function(e){if(0!==t.keys(d).length&&e&&e.deviceId){var n=e.deviceId,r=document.getElementById("remote-audio");try{l.info("Trying to set speaker to device "+n),r&&"function"==typeof r.setSinkId&&r.setSinkId(n)}catch(e){l.error("Failed to set speaker to device "+n)}t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.SPEAKER_DEVICE_CHANGED,data:{deviceId:n}})}},C=function(e){if(0!==t.keys(d).length&&e&&e.deviceId){var n=e.deviceId,r=t.core.getSoftphoneManager();try{navigator.mediaDevices.getUserMedia({audio:{deviceId:{exact:n}}}).then((function(e){var t=e.getAudioTracks()[0];for(var n in d)d.hasOwnProperty(n)&&(d[n].stream,r.getSession(n)._pc.getSenders()[0].replaceTrack(t).then((function(){r.replaceLocalMediaTrack(n,t)})))}))}catch(e){l.error("Failed to set microphone device "+n)}t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.MICROPHONE_DEVICE_CHANGED,data:{deviceId:n}})}},I=function(e,n){if(n===t.RTCErrors.ICE_COLLECTION_TIMEOUT){for(var r="\n",o=0;o0?t.success(e):t.failure(p.MICROPHONE_NOT_SHARED)}),(function(e){t.failure(p.MICROPHONE_NOT_SHARED)})),r}t.failure(p.UNSUPPORTED_BROWSER)},w=function(e,n,r){l.error("Softphone error occurred : ",e,n||"").sendInternalLogToServer(),t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.AgentEvents.SOFTPHONE_ERROR,data:new t.SoftphoneError(e,n,r)})},R=function(e,t){k("Softphone Session Failed",e,{failedReason:t})},k=function(e,n,r){t.publishMetric({name:e,contactId:n,data:r})},N=function(e,t,n){k(e,t,[{name:"AgentConnectionId",value:n}]),l.info("Publish multiple session error metrics",e,"contactId "+t,"agent connectionId "+n).sendInternalLogToServer()},O=function(){return!!(t.isOperaBrowser()&&t.getOperaBrowserVersion()>17)||!!(t.isChromeBrowser()&&t.getChromeBrowserVersion()>22)||!!(t.isFirefoxBrowser()&&t.getFirefoxBrowserVersion()>21)},L=function(e){var t=i.slice();i=[],t.length>0&&e.sendSoftphoneMetrics(t,{success:function(){l.info("sendSoftphoneMetrics success"+JSON.stringify(t)).sendInternalLogToServer()},failure:function(e){l.error("sendSoftphoneMetrics failed.").withObject(e).sendInternalLogToServer()}})},D=function(e){c=window.setInterval((function(){e.getUserAudioStats().then((function(e){var t=s;s=e,i.push(M(s,t,r))}),(function(e){l.debug("Failed to get user audio stats.",e).sendInternalLogToServer()})),e.getRemoteAudioStats().then((function(e){var t=a;a=e,i.push(M(a,t,o))}),(function(e){l.debug("Failed to get remote audio stats.",e).sendInternalLogToServer()}))}),1e3)},P=function(e){u=window.setInterval((function(){L(e)}),3e4)},x=function(){s=null,a=null,i=[],c=null,u=null},M=function(e,t,n){if(t&&e){var r=e.packetsLost>t.packetsLost?e.packetsLost-t.packetsLost:0,o=e.packetsCount>t.packetsCount?e.packetsCount-t.packetsCount:0;return new q(e.timestamp,r,o,n,e.audioLevel,e.jbMilliseconds,e.rttMilliseconds)}return new q(e.timestamp,e.packetsLost,e.packetsCount,n,e.audioLevel,e.jbMilliseconds,e.rttMilliseconds)},U=function(e){return null!==e&&window.clearInterval(e),null},F=function(e,t){c=U(c),u=U(u),function(e,t,n,i){t.streamStats=[j(n,r),j(i,o)];var s={callStartTime:t.sessionStartTime,callEndTime:t.sessionEndTime,gumTimeMillis:t.gumTimeMillis,initializationTimeMillis:t.initializationTimeMillis,iceCollectionTimeMillis:t.iceCollectionTimeMillis,signallingConnectTimeMillis:t.signallingConnectTimeMillis,handshakingTimeMillis:t.handshakingTimeMillis,preTalkingTimeMillis:t.preTalkingTimeMillis,talkingTimeMillis:t.talkingTimeMillis,cleanupTimeMillis:t.cleanupTimeMillis,iceCollectionFailure:t.iceCollectionFailure,signallingConnectionFailure:t.signallingConnectionFailure,handshakingFailure:t.handshakingFailure,gumOtherFailure:t.gumOtherFailure,gumTimeoutFailure:t.gumTimeoutFailure,createOfferFailure:t.createOfferFailure,setLocalDescriptionFailure:t.setLocalDescriptionFailure,userBusyFailure:t.userBusyFailure,invalidRemoteSDPFailure:t.invalidRemoteSDPFailure,noRemoteIceCandidateFailure:t.noRemoteIceCandidateFailure,setRemoteDescriptionFailure:t.setRemoteDescriptionFailure,softphoneStreamStatistics:t.streamStats};e.sendSoftphoneReport(s,{success:function(){l.info("sendSoftphoneReport success"+JSON.stringify(s)).sendInternalLogToServer()},failure:function(e){l.error("sendSoftphoneReport failed.").withObject(e).sendInternalLogToServer()}})}(e,t,j(s,r),j(a,o)),L(e)},q=function(e,t,n,r,o,i,s){this.softphoneStreamType=r,this.timestamp=e,this.packetsLost=t,this.packetsCount=n,this.audioLevel=o,this.jitterBufferMillis=i,this.roundTripTimeMillis=s},j=function(e,t){return new q((e=e||{}).timestamp,e.packetsLost,e.packetsCount,t,e.audioLevel)},B=function(e){this._originalLogger=e;var n=this;this._tee=function(e,r){return function(){var e=Array.prototype.slice.call(arguments[0]),o="";return e.forEach((function(){o+=" %s"})),r.apply(n._originalLogger,[t.LogComponent.SOFTPHONE,o].concat(e))}}};B.prototype.debug=function(){return this._tee(1,this._originalLogger.debug)(arguments)},B.prototype.info=function(){return this._tee(2,this._originalLogger.info)(arguments)},B.prototype.log=function(){return this._tee(3,this._originalLogger.log)(arguments)},B.prototype.warn=function(){return this._tee(4,this._originalLogger.warn)(arguments)},B.prototype.error=function(){return this._tee(5,this._originalLogger.error)(arguments)},t.SoftphoneManager=function(e){var n,r=this;(l=new B(t.getLog())).info("[Softphone Manager] softphone manager initialization has begun").sendInternalLogToServer(),t.RtcPeerConnectionFactory&&(n=new t.RtcPeerConnectionFactory(l,t.core.getWebSocketManager(),h,t.hitch(r,f,{transportType:"softphone",softphoneClientId:h}),t.hitch(r,w))),O()||w(p.UNSUPPORTED_BROWSER,"Connect does not support this browser. Some functionality may not work. ",""),A({success:function(e){k("ConnectivityCheckResult",null,{connectivityCheckType:"MicrophonePermission",status:"granted"})},failure:function(e){w(e,"Your microphone is not enabled in your browser. ",""),k("ConnectivityCheckResult",null,{connectivityCheckType:"MicrophonePermission",status:"denied"})}}),m(),v(),y(),E(),this.ringtoneEngine=null;var o={},i={};this.onInitContactSub={},this.onInitContactSub.unsubscribe=function(){};var s=!1,a=null,c=null,u=function(){s=!1,a=null,c=null};this.getSession=function(e){return o[e]},this.replaceLocalMediaTrack=function(e,t){var n=d[e].stream;if(n){var r=n.getAudioTracks()[0];t.enabled=r.enabled,r.enabled=!1,n.removeTrack(r),n.addTrack(t)}};var b=function(e){if(o.hasOwnProperty(e)){var t=o[e];new Promise((function(n,r){delete o[e],delete i[e],t.hangup()})).catch((function(t){lily.getLog().warn("Clean up the session locally "+e,t.message).sendInternalLogToServer()}))}};this.startSession=function(e,r){var p=s?a:e,h=s?c:r;if(p&&h){u(),i[h]=!0,l.info("Softphone call detected:","contactId "+p.getContactId(),"agent connectionId "+h).sendInternalLogToServer(),function(e){if(Object.keys(e).length>0){for(var t in e)e.hasOwnProperty(t)&&(N("MultiSessionHangUp",e[t].callId,t),b(t));throw new Error("duplicate session detected, refusing to setup new connection")}}(o),p.getStatus().type===t.ContactStatusType.CONNECTING&&k("Softphone Connecting",p.getContactId()),x();var f,m=p.getAgentConnection().getSoftphoneMediaInfo(),v=_(m.callConfigJson);v.useWebSocketProvider&&(f=t.core.getWebSocketManager());var y=new t.RTCSession(v.signalingEndpoint,v.iceServers,m.callContextToken,l,p.getContactId(),h,f);o[h]=y,t.core.getSoftphoneUserMediaStream()&&(y.mediaStream=t.core.getSoftphoneUserMediaStream()),t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConnectionEvents.SESSION_INIT,data:{connectionId:h}}),y.onSessionFailed=function(e,t){delete o[h],delete i[h],I(e,t),R(p.getContactId(),t),F(p,e.sessionReport)},y.onSessionConnected=function(e){k("Softphone Session Connected",p.getContactId()),t.becomeMaster(t.MasterTopics.SEND_LOGS),D(e),P(p),g(p)},y.onSessionCompleted=function(e){k("Softphone Session Completed",p.getContactId()),delete o[h],delete i[h],F(p,e.sessionReport),S(h)},y.onLocalStreamAdded=function(e,n){d[h]={stream:n},t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.AgentEvents.LOCAL_MEDIA_STREAM_CREATED,data:{connectionId:h}})},y.remoteAudioElement=document.getElementById("remote-audio"),n?y.connect(n.get(v.iceServers)):y.connect()}};var T=function(e,n){o[n]&&function(e){return e.getStatus().type===t.ContactStatusType.ENDED||e.getStatus().type===t.ContactStatusType.ERROR||e.getStatus().type===t.ContactStatusType.MISSED}(e)&&(b(n),u()),!e.isSoftphoneCall()||i[n]||e.getStatus().type!==t.ContactStatusType.CONNECTING&&e.getStatus().type!==t.ContactStatusType.INCOMING||(t.isFirefoxBrowser()&&t.hasOtherConnectedCCPs()?function(e,t){s=!0,a=e,c=t}(e,n):r.startSession(e,n))},C=function(e){var t=e.getAgentConnection().connectionId;l.info("Contact detected:","contactId "+e.getContactId(),"agent connectionId "+t).sendInternalLogToServer(),i[t]||e.onRefresh((function(){T(e,t)}))};r.onInitContactSub=t.contact(C),(new t.Agent).getContacts().forEach((function(e){var t=e.getAgentConnection().connectionId;l.info("Contact exist in the snapshot. Reinitiate the Contact and RTC session creation for contactId"+e.getContactId(),"agent connectionId "+t).sendInternalLogToServer(),C(e),T(e,t)}))}}()},944:()=>{!function(){var e=this||globalThis,t=function(){return t.cache.hasOwnProperty(arguments[0])||(t.cache[arguments[0]]=t.parse(arguments[0])),t.format.call(null,t.cache[arguments[0]],arguments)};function n(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function r(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}t.format=function(e,o){var i,s,a,c,u,l,p,d=1,h=e.length,f="",g=[];for(s=0;s>>=0;break;case"x":i=i.toString(16);break;case"X":i=i.toString(16).toUpperCase()}i=/[def]/.test(c[8])&&c[3]&&i>=0?"+"+i:i,l=c[4]?"0"==c[4]?"0":c[4].charAt(1):" ",p=c[6]-String(i).length,u=c[6]?r(l,p):"",g.push(c[5]?i+u:u+i)}return g.join("")},t.cache={},t.parse=function(e){for(var t=e,n=[],r=[],o=0;t;){if(null!==(n=/^[^\x25]+/.exec(t)))r.push(n[0]);else if(null!==(n=/^\x25{2}/.exec(t)))r.push("%");else{if(null===(n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t)))throw"[sprintf] huh?";if(n[2]){o|=1;var i=[],s=n[2],a=[];if(null===(a=/^([a-z_][a-z_\d]*)/i.exec(s)))throw"[sprintf] huh?";for(i.push(a[1]);""!==(s=s.substring(a[0].length));)if(null!==(a=/^\.([a-z_][a-z_\d]*)/i.exec(s)))i.push(a[1]);else{if(null===(a=/^\[(\d+)\]/.exec(s)))throw"[sprintf] huh?";i.push(a[1])}n[2]=i}else o|=2;if(3===o)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r},e.sprintf=t,e.vsprintf=function(e,n,r){return(r=n.slice(0)).splice(0,0,e),t.apply(null,r)}}()},82:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t;var n=function(){};n.prototype.send=function(e){throw new t.NotImplementedError},n.prototype.onMessage=function(e){throw new t.NotImplementedError};var r=function(){n.call(this)};(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.onMessage=function(e){},r.prototype.send=function(e){};var o=function(e,t){n.call(this),this.window=e,this.domain=t||"*"};(o.prototype=Object.create(n.prototype)).constructor=o,o.prototype.send=function(e){this.window.postMessage(e,this.domain)},o.prototype.onMessage=function(e){this.window.addEventListener("message",e)};var i=function(e,t,r){n.call(this),this.input=e,this.output=t,this.domain=r||"*"};(i.prototype=Object.create(n.prototype)).constructor=i,i.prototype.send=function(e){this.output.postMessage(e,this.domain)},i.prototype.onMessage=function(e){this.input.addEventListener("message",(t=>{t.source===this.output&&e(t)}))};var s=function(e){n.call(this),this.port=e,this.id=t.randomId()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.send=function(e){this.port.postMessage(e)},s.prototype.onMessage=function(e){this.port.addEventListener("message",e)},s.prototype.getId=function(){return this.id};var a=function(e){n.call(this),this.streamMap=e?t.index(e,(function(e){return e.getId()})):{},this.messageListeners=[]};(a.prototype=Object.create(n.prototype)).constructor=a,a.prototype.send=function(e){this.getStreams().forEach((function(t){try{t.send(e)}catch(e){}}))},a.prototype.onMessage=function(e){this.messageListeners.push(e),this.getStreams().forEach((function(t){t.onMessage(e)}))},a.prototype.addStream=function(e){this.streamMap[e.getId()]=e,this.messageListeners.forEach((function(t){e.onMessage(t)}))},a.prototype.removeStream=function(e){delete this.streamMap[e.getId()]},a.prototype.getStreams=function(e){return t.values(this.streamMap)},a.prototype.getStreamForPort=function(e){return t.find(this.getStreams(),(function(t){return t.port===e}))};var c=function(e,n,o){this.name=e,this.upstream=n||new r,this.downstream=o||new r,this.downstreamBus=new t.EventBus,this.upstreamBus=new t.EventBus,this.upstream.onMessage(t.hitch(this,this._dispatchEvent,this.upstreamBus)),this.downstream.onMessage(t.hitch(this,this._dispatchEvent,this.downstreamBus))};c.prototype.onUpstream=function(e,n){return t.assertNotNull(e,"eventName"),t.assertNotNull(n,"f"),t.assertTrue(t.isFunction(n),"f must be a function"),this.upstreamBus.subscribe(e,n)},c.prototype.onAllUpstream=function(e){return t.assertNotNull(e,"f"),t.assertTrue(t.isFunction(e),"f must be a function"),this.upstreamBus.subscribeAll(e)},c.prototype.onDownstream=function(e,n){return t.assertNotNull(e,"eventName"),t.assertNotNull(n,"f"),t.assertTrue(t.isFunction(n),"f must be a function"),this.downstreamBus.subscribe(e,n)},c.prototype.onAllDownstream=function(e){return t.assertNotNull(e,"f"),t.assertTrue(t.isFunction(e),"f must be a function"),this.downstreamBus.subscribeAll(e)},c.prototype.sendUpstream=function(e,n){t.assertNotNull(e,"eventName"),this.upstream.send({event:e,data:n})},c.prototype.sendDownstream=function(e,n){t.assertNotNull(e,"eventName"),this.downstream.send({event:e,data:n})},c.prototype._dispatchEvent=function(e,t){var n=t.data;n.event&&e.trigger(n.event,n.data)},c.prototype.passUpstream=function(){var e=this;return function(t,n){e.upstream.send({event:n,data:t})}},c.prototype.passDownstream=function(){var e=this;return function(t,n){e.downstream.send({event:n,data:t})}},c.prototype.shutdown=function(){this.upstreamBus.unsubscribeAll(),this.downstreamBus.unsubscribeAll()};var u=function(e,t,n,r){c.call(this,e,new i(t,n.contentWindow,r||"*"),null)};(u.prototype=Object.create(c.prototype)).constructor=u,t.Stream=n,t.NullStream=r,t.WindowStream=o,t.WindowIOStream=i,t.PortStream=s,t.StreamMultiplexer=a,t.Conduit=c,t.IFrameConduit=u}()},833:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t;var n=function(e,n){t.assertNotNull(e,"fromState"),t.assertNotNull(n,"toState"),this.fromState=e,this.toState=n};n.prototype.getAssociations=function(e){throw t.NotImplementedError()},n.prototype.getFromState=function(){return this.fromState},n.prototype.getToState=function(){return this.toState};var r=function(e,r,o){t.assertNotNull(e,"fromState"),t.assertNotNull(r,"toState"),t.assertNotNull(o,"associations"),n.call(this,e,r),this.associations=o};(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.getAssociations=function(e){return this.associations};var o=function(e,r,o){t.assertNotNull(e,"fromState"),t.assertNotNull(r,"toState"),t.assertNotNull(o,"closure"),t.assertTrue(t.isFunction(o),"closure must be a function"),n.call(this,e,r),this.closure=o};(o.prototype=Object.create(n.prototype)).constructor=o,o.prototype.getAssociations=function(e){return this.closure(e,this.getFromState(),this.getToState())};var i=function(){this.fromMap={}};i.ANY="<>",i.prototype.assoc=function(e,t,n){var i=this;if(!e)throw new Error("fromStateObj is not defined.");if(!t)throw new Error("toStateObj is not defined.");if(!n)throw new Error("assocObj is not defined.");return e instanceof Array?e.forEach((function(e){i.assoc(e,t,n)})):t instanceof Array?t.forEach((function(t){i.assoc(e,t,n)})):"function"==typeof n?this._addAssociation(new o(e,t,n)):n instanceof Array?this._addAssociation(new r(e,t,n)):this._addAssociation(new r(e,t,[n])),this},i.prototype.getAssociations=function(e,n,r){t.assertNotNull(n,"fromState"),t.assertNotNull(r,"toState");var o=[],s=this.fromMap[i.ANY]||{},a=this.fromMap[n]||{};return o=(o=o.concat(this._getAssociationsFromMap(s,e,n,r))).concat(this._getAssociationsFromMap(a,e,n,r))},i.prototype._addAssociation=function(e){var t=this.fromMap[e.getFromState()];t||(t=this.fromMap[e.getFromState()]={});var n=t[e.getToState()];n||(n=t[e.getToState()]=[]),n.push(e)},i.prototype._getAssociationsFromMap=function(e,t,n,r){return(e[i.ANY]||[]).concat(e[r]||[]).reduce((function(e,n){return e.concat(n.getAssociations(t))}),[])},t.EventGraph=i}()},891:(e,t,n)=>{var r=n(465);!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t;var n=navigator.userAgent,o=["bubbles","cancelBubble","cancelable","composed","data","defaultPrevented","eventPhase","isTrusted","lastEventId","origin","returnValue","timeStamp","type"];t.sprintf=e.sprintf,t.vsprintf=e.vsprintf,delete e.sprintf,delete e.vsprintf,t.HTTP_STATUS_CODES={SUCCESS:200,TOO_MANY_REQUESTS:429,INTERNAL_SERVER_ERROR:500},t.TRANSPORT_TYPES={CHAT_TOKEN:"chat_token",WEB_SOCKET:"web_socket"},t.hitch=function(){var e=Array.prototype.slice.call(arguments),n=e.shift(),r=e.shift();return t.assertNotNull(n,"scope"),t.assertNotNull(r,"method"),t.assertTrue(t.isFunction(r),"method must be a function"),function(){var t=Array.prototype.slice.call(arguments);return r.apply(n,e.concat(t))}},t.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.keys=function(e){var n=[];for(var r in t.assertNotNull(e,"map"),e)n.push(r);return n},t.values=function(e){var n=[];for(var r in t.assertNotNull(e,"map"),e)n.push(e[r]);return n},t.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},t.merge=function(){var e=Array.prototype.slice.call(arguments,0),n={};return e.forEach((function(e){t.entries(e).forEach((function(e){n[e.key]=e.value}))})),n},t.now=function(){return(new Date).getTime()},t.find=function(e,t){for(var n=0;n{try{void 0!==e[r]&&(n[r]=e[r])}catch(e){t.getLog().info("deepcopyCrossOriginEvent failed on key: ",r).sendInternalLogToServer()}})),t.deepcopy(n)},t.getBaseUrl=function(){var n=e.location;return t.sprintf("%s//%s:%s",n.protocol,n.hostname,n.port)},t.getUrlWithProtocol=function(n){var r=e.location.protocol;return n.substr(0,r.length)!==r?t.sprintf("%s//%s",r,n):n},t.isFramed=function(){try{return window.self!==window.top}catch(e){return!0}},t.hasOtherConnectedCCPs=function(){return t.numberOfConnectedCCPs>1},t.fetch=function(e,n,r,o){return o=o||5,r=r||1e3,n=n||{},new Promise((function(i,s){!function o(a){fetch(e,n).then((function(e){e.status===t.HTTP_STATUS_CODES.SUCCESS?e.json().then((e=>i(e))).catch((()=>i({}))):1!==a&&(e.status>=t.HTTP_STATUS_CODES.INTERNAL_SERVER_ERROR||e.status===t.HTTP_STATUS_CODES.TOO_MANY_REQUESTS)?setTimeout((function(){o(--a)}),r):s(e)})).catch((function(e){s(e)}))}(o)}))},t.backoff=function(n,r,o,i){t.assertTrue(t.isFunction(n),"func must be a Function");var s=this;n({success:function(e){i&&i.success&&i.success(e)},failure:function(t,a){if(o>0){var c=2*r*Math.random();e.setTimeout((function(){s.backoff(n,2*c,--o,i)}),c)}else i&&i.failure&&i.failure(t,a)}})},t.publishMetric=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.CLIENT_METRIC,data:e})},t.publishSoftphoneStats=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.SOFTPHONE_STATS,data:e})},t.publishSoftphoneReport=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.SOFTPHONE_REPORT,data:e})},t.publishClickStreamData=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.CLICK_STREAM_DATA,data:e})},t.publishClientSideLogs=function(e){t.core.getEventBus().trigger(t.EventType.CLIENT_SIDE_LOGS,e)},t.addNamespaceToLogs=function(e){["log","error","warn","info","debug"].forEach((t=>{const n=window.console[t];window.console[t]=function(){const t=Array.from(arguments);t.unshift(`[${e}]`),n.apply(window.console,t)}}))},t.PopupManager=function(){},t.PopupManager.prototype.open=function(e,t,n){var r=this._getLastOpenedTimestamp(t),o=(new Date).getTime(),i=null;if(o-r>864e5){if(n){var s=n.height||578,a=n.width||433,c=n.top||0,u=n.left||0;(i=window.open("",t,"width="+a+", height="+s+", top="+c+", left="+u)).location!==e&&(i=window.open(e,t,"width="+a+", height="+s+", top="+c+", left="+u))}else(i=window.open("",t)).location!==e&&(i=window.open(e,t));this._setLastOpenedTimestamp(t,o)}return i},t.PopupManager.prototype.clear=function(t){var n=this._getLocalStorageKey(t);e.localStorage.removeItem(n)},t.PopupManager.prototype._getLastOpenedTimestamp=function(t){var n=this._getLocalStorageKey(t),r=e.localStorage.getItem(n);return r?parseInt(r,10):0},t.PopupManager.prototype._setLastOpenedTimestamp=function(t,n){var r=this._getLocalStorageKey(t);e.localStorage.setItem(r,""+n)},t.PopupManager.prototype._getLocalStorageKey=function(e){return"connectPopupManager::"+e};var i=t.makeEnum(["granted","denied","default"]);t.NotificationManager=function(){this.queue=[],this.permission=i.DEFAULT},t.NotificationManager.prototype.requestPermission=function(){var n=this;"Notification"in e?e.Notification.permission===i.DENIED?(t.getLog().warn("The user has requested to not receive notifications.").sendInternalLogToServer(),this.permission=i.DENIED):this.permission!==i.GRANTED&&e.Notification.requestPermission().then((function(e){n.permission=e,e===i.GRANTED?n._showQueued():n.queue=[]})):(t.getLog().warn("This browser doesn't support notifications.").sendInternalLogToServer(),this.permission=i.DENIED)},t.NotificationManager.prototype.show=function(e,n){if(this.permission===i.GRANTED)return this._showImpl({title:e,options:n});if(this.permission===i.DENIED)t.getLog().warn("Unable to show notification.").sendInternalLogToServer().withObject({title:e,options:n});else{var r={title:e,options:n};t.getLog().warn("Deferring notification until user decides to allow or deny.").withObject(r).sendInternalLogToServer(),this.queue.push(r)}},t.NotificationManager.prototype._showQueued=function(){var e=this,t=this.queue.map((function(t){return e._showImpl(t)}));return this.queue=[],t},t.NotificationManager.prototype._showImpl=function(t){var n=new e.Notification(t.title,t.options);return t.options.clicked&&(n.onclick=function(){t.options.clicked.call(n)}),n},t.ValueError=function(){var e=Array.prototype.slice.call(arguments,0),n=e.shift(),r=new Error(t.vsprintf(n,e));return Object.setPrototypeOf(r,t.ValueError.prototype),r},Object.setPrototypeOf(t.ValueError.prototype,Error.prototype),Object.setPrototypeOf(t.ValueError,Error),t.ValueError.prototype.name="ValueError",t.NotImplementedError=function(){var e=Array.prototype.slice.call(arguments,0),n=e.shift(),r=new Error(t.vsprintf(n,e));return Object.setPrototypeOf(r,t.NotImplementedError.prototype),r},Object.setPrototypeOf(t.NotImplementedError.prototype,Error.prototype),Object.setPrototypeOf(t.NotImplementedError,Error),t.NotImplementedError.prototype.name="NotImplementedError",t.StateError=function(){var e=Array.prototype.slice.call(arguments,0),n=e.shift(),r=new Error(t.vsprintf(n,e));return Object.setPrototypeOf(r,t.StateError.prototype),r},Object.setPrototypeOf(t.StateError.prototype,Error.prototype),Object.setPrototypeOf(t.StateError,Error),t.StateError.prototype.name="StateError",t.VoiceIdError=function(e,t,n){var r={};return r.type=e,r.message=t,r.stack=Error(t).stack,r.err=n,r},t.isCCP=function(){return"ConnectSharedWorkerConduit"===t.core.getUpstream().name}}()},736:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,t.worker={};var n=function(){this.topicMasterMap={}};n.prototype.getMaster=function(e){return t.assertNotNull(e,"topic"),this.topicMasterMap[e]||null},n.prototype.setMaster=function(e,n){t.assertNotNull(e,"topic"),t.assertNotNull(n,"id"),this.topicMasterMap[e]=n},n.prototype.removeMaster=function(e){t.assertNotNull(e,"id");var n=this;t.entries(this.topicMasterMap).filter((function(t){return t.value===e})).forEach((function(e){delete n.topicMasterMap[e.key]}))};var r=function(e){t.ClientBase.call(this),this.conduit=e};(r.prototype=Object.create(t.ClientBase.prototype)).constructor=r,r.prototype._callImpl=function(e,n,r){var o=this,i=(new Date).getTime();t.containsValue(t.AgentAppClientMethods,e)?t.core.getAgentAppClient()._callImpl(e,n,{success:function(t){o._recordAPILatency(e,i),r.success(t)},failure:function(t){o._recordAPILatency(e,i,t),r.failure(t)}}):t.containsValue(t.TaskTemplatesClientMethods,e)?t.core.getTaskTemplatesClient()._callImpl(e,n,{success:function(t){o._recordAPILatency(e,i),r.success(t)},failure:function(t){o._recordAPILatency(e,i,t),r.failure(t)}}):t.core.getClient()._callImpl(e,n,{success:function(t){o._recordAPILatency(e,i),r.success(t)},failure:function(t,n){o._recordAPILatency(e,i,t),r.failure(t,n)},authFailure:function(){o._recordAPILatency(e,i),r.authFailure()},accessDenied:function(){r.accessDenied&&r.accessDenied()}})},r.prototype._recordAPILatency=function(e,t,n){var r=(new Date).getTime()-t;this._sendAPIMetrics(e,r,n)},r.prototype._sendAPIMetrics=function(e,n,r){this.conduit.sendDownstream(t.EventType.API_METRIC,{name:e,time:n,dimensions:[{name:"Category",value:"API"}],error:r})};var o=function(){var o=this;this.multiplexer=new t.StreamMultiplexer,this.conduit=new t.Conduit("AmazonConnectSharedWorker",null,this.multiplexer),this.client=new r(this.conduit),this.timeout=null,this.agent=null,this.nextToken=null,this.initData={},this.portConduitMap={},this.streamMapByTabId={},this.masterCoord=new n,this.logsBuffer=[],this.suppress=!1,this.forceOffline=!1,this.longPollingOptions={allowLongPollingShadowMode:!1,allowLongPollingWebsocketOnlyMode:!1};var i=null;t.rootLogger=new t.DownstreamConduitLogger(this.conduit),this.conduit.onDownstream(t.EventType.SEND_LOGS,(function(e){t.getLog().pushLogsDownstream(e),o.logsBuffer=o.logsBuffer.concat(e),o.logsBuffer.length>400&&o.handleSendLogsRequest(o.logsBuffer)})),this.conduit.onDownstream(t.EventType.CONFIGURE,(function(n){console.log("@@@ configure event handler",n);try{n.authToken&&n.authToken!==o.initData.authToken&&(o.initData=n,t.core.init(n),n.longPollingOptions&&("boolean"==typeof n.longPollingOptions.allowLongPollingShadowMode&&(o.longPollingOptions.allowLongPollingShadowMode=n.longPollingOptions.allowLongPollingShadowMode),"boolean"==typeof n.longPollingOptions.allowLongPollingWebsocketOnlyMode&&(o.longPollingOptions.allowLongPollingWebsocketOnlyMode=n.longPollingOptions.allowLongPollingWebsocketOnlyMode)),i?t.getLog().info("Not Initializing a new WebsocketManager instance, since one already exists").sendInternalLogToServer():(t.getLog().info("Creating a new Websocket connection for CCP").sendInternalLogToServer(),t.WebSocketManager.setGlobalConfig({loggerConfig:{logger:t.getLog()}}),(i=t.WebSocketManager.create()).onInitFailure((function(){o.conduit.sendDownstream(t.WebSocketEvents.INIT_FAILURE)})),i.onConnectionOpen((function(e){o.conduit.sendDownstream(t.WebSocketEvents.CONNECTION_OPEN,e)})),i.onConnectionClose((function(e){o.conduit.sendDownstream(t.WebSocketEvents.CONNECTION_CLOSE,e)})),i.onConnectionGain((function(){o.conduit.sendDownstream(t.AgentEvents.WEBSOCKET_CONNECTION_GAINED),o.conduit.sendDownstream(t.WebSocketEvents.CONNECTION_GAIN)})),i.onConnectionLost((function(e){o.conduit.sendDownstream(t.AgentEvents.WEBSOCKET_CONNECTION_LOST,e),o.conduit.sendDownstream(t.WebSocketEvents.CONNECTION_LOST,e)})),i.onSubscriptionUpdate((function(e){o.conduit.sendDownstream(t.WebSocketEvents.SUBSCRIPTION_UPDATE,e)})),i.onSubscriptionFailure((function(e){o.conduit.sendDownstream(t.WebSocketEvents.SUBSCRIPTION_FAILURE,e)})),i.onAllMessage((function(e){o.conduit.sendDownstream(t.WebSocketEvents.ALL_MESSAGE,e)})),o.conduit.onDownstream(t.WebSocketEvents.SEND,(function(e){i.sendMessage(e)})),o.conduit.onDownstream(t.WebSocketEvents.SUBSCRIBE,(function(e){i.subscribeTopics(e)})),i.init(t.hitch(o,o.getWebSocketUrl)).then((function(n){try{if(n&&!n.webSocketConnectionFailed)t.getLog().info("Kicking off agent polling").sendInternalLogToServer(),o.pollForAgent(),t.getLog().info("Kicking off config polling").sendInternalLogToServer(),o.pollForAgentConfiguration({repeatForever:!0}),t.getLog().info("Kicking off auth token polling").sendInternalLogToServer(),e.setInterval(t.hitch(o,o.checkAuthToken),3e5);else if(!t.webSocketInitFailed){const e=t.WebSocketEvents.INIT_FAILURE;throw o.conduit.sendDownstream(e),t.webSocketInitFailed=!0,new Error(e)}}catch(e){t.getLog().error("WebSocket failed to initialize").withException(e).sendInternalLogToServer()}}))))}catch(e){console.error("@@@ error",e)}})),this.conduit.onDownstream(t.EventType.TERMINATE,(function(){o.handleSendLogsRequest(o.logsBuffer),t.core.terminate(),o.conduit.sendDownstream(t.EventType.TERMINATED)})),this.conduit.onDownstream(t.EventType.SYNCHRONIZE,(function(){o.conduit.sendDownstream(t.EventType.ACKNOWLEDGE)})),this.conduit.onDownstream(t.EventType.BROADCAST,(function(e){o.conduit.sendDownstream(e.event,e.data)})),e.onconnect=function(e){var n=e.ports[0],r=new t.PortStream(n);o.multiplexer.addStream(r),n.start();var i=new t.Conduit(r.getId(),null,r);i.sendDownstream(t.EventType.ACKNOWLEDGE,{id:r.getId()}),o.portConduitMap[r.getId()]=i,o.conduit.sendDownstream(t.EventType.UPDATE_CONNECTED_CCPS,{length:Object.keys(o.portConduitMap).length}),null!==o.agent&&o.updateAgent(),i.onDownstream(t.EventType.API_REQUEST,t.hitch(o,o.handleAPIRequest,i)),i.onDownstream(t.EventType.MASTER_REQUEST,t.hitch(o,o.handleMasterRequest,i,r.getId())),i.onDownstream(t.EventType.RELOAD_AGENT_CONFIGURATION,t.hitch(o,o.pollForAgentConfiguration)),i.onDownstream(t.EventType.TAB_ID,t.hitch(o,o.handleTabIdEvent,r)),i.onDownstream(t.EventType.CLOSE,t.hitch(o,o.handleCloseEvent,r))}};o.prototype.pollForAgent=function(){var n=this,r=t.hitch(n,n.handleAuthFail);this.client.call(t.ClientMethods.GET_AGENT_SNAPSHOT,{nextToken:n.nextToken,timeout:3e4},{success:function(r){try{n.agent=n.agent||{},n.agent.snapshot=r.snapshot,n.agent.snapshot.localTimestamp=t.now(),n.agent.snapshot.skew=n.agent.snapshot.snapshotTimestamp-n.agent.snapshot.localTimestamp,n.nextToken=r.nextToken,t.getLog().trace("GET_AGENT_SNAPSHOT succeeded.").withObject(r).sendInternalLogToServer(),n.updateAgent()}catch(e){t.getLog().error("Long poll failed to update agent.").withObject(r).withException(e).sendInternalLogToServer()}finally{e.setTimeout(t.hitch(n,n.pollForAgent),100)}},failure:function(r,o){try{t.getLog().error("Failed to get agent data.").sendInternalLogToServer().withObject({err:r,data:o})}finally{e.setTimeout(t.hitch(n,n.pollForAgent),5e3)}},authFailure:function(){r()},accessDenied:t.hitch(n,n.handleAccessDenied)})},o.prototype.pollForAgentConfiguration=function(n){var r=this,o=n||{},i=t.hitch(r,r.handleAuthFail);this.client.call(t.ClientMethods.GET_AGENT_CONFIGURATION,{},{success:function(n){var i=n.configuration;r.pollForAgentPermissions(i),r.pollForAgentStates(i),r.pollForDialableCountryCodes(i),r.pollForRoutingProfileQueues(i),o.repeatForever&&e.setTimeout(t.hitch(r,r.pollForAgentConfiguration,o),3e4)},failure:function(n,i){try{t.getLog().error("Failed to fetch agent configuration data.").sendInternalLogToServer().withObject({err:n,data:i})}finally{o.repeatForever&&e.setTimeout(t.hitch(r,r.pollForAgentConfiguration),3e4,o)}},authFailure:function(){i()},accessDenied:t.hitch(r,r.handleAccessDenied)})},o.prototype.pollForAgentStates=function(e,n){var r=this,o=n||{};o.maxResults=o.maxResults||t.DEFAULT_BATCH_SIZE,this.client.call(t.ClientMethods.GET_AGENT_STATES,{nextToken:o.nextToken||null,maxResults:o.maxResults},{success:function(t){t.nextToken?r.pollForAgentStates(e,{states:(o.states||[]).concat(t.states),nextToken:t.nextToken,maxResults:o.maxResults}):(e.agentStates=(o.states||[]).concat(t.states),r.updateAgentConfiguration(e))},failure:function(e,n){t.getLog().error("Failed to fetch agent states list.").sendInternalLogToServer().withObject({err:e,data:n})},authFailure:t.hitch(r,r.handleAuthFail),accessDenied:t.hitch(r,r.handleAccessDenied)})},o.prototype.pollForAgentPermissions=function(e,n){var r=this,o=n||{};o.maxResults=o.maxResults||t.DEFAULT_BATCH_SIZE,this.client.call(t.ClientMethods.GET_AGENT_PERMISSIONS,{nextToken:o.nextToken||null,maxResults:o.maxResults},{success:function(t){t.nextToken?r.pollForAgentPermissions(e,{permissions:(o.permissions||[]).concat(t.permissions),nextToken:t.nextToken,maxResults:o.maxResults}):(e.permissions=(o.permissions||[]).concat(t.permissions),r.updateAgentConfiguration(e))},failure:function(e,n){t.getLog().error("Failed to fetch agent permissions list.").sendInternalLogToServer().withObject({err:e,data:n})},authFailure:t.hitch(r,r.handleAuthFail),accessDenied:t.hitch(r,r.handleAccessDenied)})},o.prototype.pollForDialableCountryCodes=function(e,n){var r=this,o=n||{};o.maxResults=o.maxResults||t.DEFAULT_BATCH_SIZE,this.client.call(t.ClientMethods.GET_DIALABLE_COUNTRY_CODES,{nextToken:o.nextToken||null,maxResults:o.maxResults},{success:function(t){t.nextToken?r.pollForDialableCountryCodes(e,{countryCodes:(o.countryCodes||[]).concat(t.countryCodes),nextToken:t.nextToken,maxResults:o.maxResults}):(e.dialableCountries=(o.countryCodes||[]).concat(t.countryCodes),r.updateAgentConfiguration(e))},failure:function(e,n){t.getLog().error("Failed to fetch dialable country codes list.").sendInternalLogToServer().withObject({err:e,data:n})},authFailure:t.hitch(r,r.handleAuthFail),accessDenied:t.hitch(r,r.handleAccessDenied)})},o.prototype.pollForRoutingProfileQueues=function(e,n){var r=this,o=n||{};o.maxResults=o.maxResults||t.DEFAULT_BATCH_SIZE,this.client.call(t.ClientMethods.GET_ROUTING_PROFILE_QUEUES,{routingProfileARN:e.routingProfile.routingProfileARN,nextToken:o.nextToken||null,maxResults:o.maxResults},{success:function(t){t.nextToken?r.pollForRoutingProfileQueues(e,{countryCodes:(o.queues||[]).concat(t.queues),nextToken:t.nextToken,maxResults:o.maxResults}):(e.routingProfile.queues=(o.queues||[]).concat(t.queues),r.updateAgentConfiguration(e))},failure:function(e,n){t.getLog().error("Failed to fetch routing profile queues list.").sendInternalLogToServer().withObject({err:e,data:n})},authFailure:t.hitch(r,r.handleAuthFail),accessDenied:t.hitch(r,r.handleAccessDenied)})},o.prototype.handleAPIRequest=function(e,n){var r=this;this.client.call(n.method,n.params,{success:function(r){var o=t.EventFactory.createResponse(t.EventType.API_RESPONSE,n,r);e.sendDownstream(o.event,o)},failure:function(o,i){var s=t.EventFactory.createResponse(t.EventType.API_RESPONSE,n,i,JSON.stringify(o));e.sendDownstream(s.event,s),t.getLog().error("'%s' API request failed",n.method).withObject({request:r.filterAuthToken(n),response:s}).withException(o).sendInternalLogToServer()},authFailure:t.hitch(r,r.handleAuthFail,{authorize:!0})})},o.prototype.handleMasterRequest=function(e,n,r){var o=this.conduit,i=null;switch(r.method){case t.MasterMethods.BECOME_MASTER:var s=this.masterCoord.getMaster(r.params.topic),a=Boolean(s)&&s!==n;this.masterCoord.setMaster(r.params.topic,n),i=t.EventFactory.createResponse(t.EventType.MASTER_RESPONSE,r,{masterId:n,takeOver:a,topic:r.params.topic}),a&&o.sendDownstream(i.event,i);break;case t.MasterMethods.CHECK_MASTER:(s=this.masterCoord.getMaster(r.params.topic))||r.params.shouldNotBecomeMasterIfNone||(this.masterCoord.setMaster(r.params.topic,n),s=n),i=t.EventFactory.createResponse(t.EventType.MASTER_RESPONSE,r,{masterId:s,isMaster:n===s,topic:r.params.topic});break;default:throw new Error("Unknown master method: "+r.method)}e.sendDownstream(i.event,i)},o.prototype.handleTabIdEvent=function(e,n){var r=this;try{let o=n.tabId,i=r.streamMapByTabId[o],s=e.getId(),a=Object.keys(r.streamMapByTabId).filter((e=>r.streamMapByTabId[e].length>0)).length;if(i&&i.length>0){if(!i.includes(s)){r.streamMapByTabId[o].push(s);let e={length:Object.keys(r.portConduitMap).length,tabId:o,streamsTabsAcrossBrowser:a};e[o]={length:i.length},r.conduit.sendDownstream(t.EventType.UPDATE_CONNECTED_CCPS,e)}}else{r.streamMapByTabId[o]=[e.getId()];let n={length:Object.keys(r.portConduitMap).length,tabId:o,streamsTabsAcrossBrowser:a+1};n[o]={length:r.streamMapByTabId[o].length},r.conduit.sendDownstream(t.EventType.UPDATE_CONNECTED_CCPS,n)}}catch(e){t.getLog().error("[Tab Ids] Issue updating connected CCPs within the same tab").withException(e).sendInternalLogToServer()}},o.prototype.handleCloseEvent=function(e){var n=this;n.multiplexer.removeStream(e),delete n.portConduitMap[e.getId()],n.masterCoord.removeMaster(e.getId());let r={length:Object.keys(n.portConduitMap).length},o=Object.keys(n.streamMapByTabId);try{let t=o.find((t=>n.streamMapByTabId[t].includes(e.getId())));if(t){let o=n.streamMapByTabId[t].findIndex((t=>e.getId()===t));n.streamMapByTabId[t].splice(o,1);let i=n.streamMapByTabId[t]?n.streamMapByTabId[t].length:0;r[t]={length:i},r.tabId=t}let i=o.filter((e=>n.streamMapByTabId[e].length>0)).length;r.streamsTabsAcrossBrowser=i}catch(e){t.getLog().error("[Tab Ids] Issue updating tabId-specific stream data").withException(e).sendInternalLogToServer()}n.conduit.sendDownstream(t.EventType.UPDATE_CONNECTED_CCPS,r)},o.prototype.updateAgentConfiguration=function(e){e.permissions&&e.dialableCountries&&e.agentStates&&e.routingProfile.queues?(this.agent=this.agent||{},this.agent.configuration=e,this.updateAgent()):t.getLog().trace("Waiting to update agent configuration until all config data has been fetched.").sendInternalLogToServer()},o.prototype.updateAgent=function(){this.agent?this.agent.snapshot?this.agent.configuration?(this.agent.snapshot.status=this.agent.state,this.agent.snapshot.contacts&&this.agent.snapshot.contacts.length>1&&this.agent.snapshot.contacts.sort((function(e,t){return e.state.timestamp.getTime()-t.state.timestamp.getTime()})),this.agent.snapshot.contacts.forEach((function(e){e.status=e.state,e.connections.forEach((function(e){e.address=e.endpoint}))})),this.agent.configuration.routingProfile.defaultOutboundQueue.queueId=this.agent.configuration.routingProfile.defaultOutboundQueue.queueARN,this.agent.configuration.routingProfile.queues.forEach((function(e){e.queueId=e.queueARN})),this.agent.snapshot.contacts.forEach((function(e){void 0!==e.queue&&(e.queue.queueId=e.queue.queueARN)})),this.agent.configuration.routingProfile.routingProfileId=this.agent.configuration.routingProfile.routingProfileARN,this.conduit.sendDownstream(t.AgentEvents.UPDATE,this.agent)):t.getLog().trace("Waiting to update agent until the agent configuration is available.").sendInternalLogToServer():t.getLog().trace("Waiting to update agent until the agent snapshot is available.").sendInternalLogToServer():t.getLog().trace("Waiting to update agent until the agent has been fully constructed.").sendInternalLogToServer()},o.prototype.getWebSocketUrl=function(){var e=this,n=t.core.getClient(),r=t.hitch(e,e.handleAuthFail),o=t.hitch(e,e.handleAccessDenied);return new Promise((function(e,i){n.call(t.ClientMethods.CREATE_TRANSPORT,{transportType:t.TRANSPORT_TYPES.WEB_SOCKET},{success:function(n){t.getLog().info("getWebSocketUrl succeeded").sendInternalLogToServer(),e(n)},failure:function(e,n){t.getLog().error("getWebSocketUrl failed").sendInternalLogToServer().withObject({err:e,data:n}),i({reason:"getWebSocketUrl failed",_debug:e})},authFailure:function(){t.getLog().error("getWebSocketUrl Auth Failure").sendInternalLogToServer(),i(Error("Authentication failed while getting getWebSocketUrl")),r()},accessDenied:function(){t.getLog().error("getWebSocketUrl Access Denied Failure").sendInternalLogToServer(),i(Error("Access Denied Failure while getting getWebSocketUrl")),o()}})}))},o.prototype.handleSendLogsRequest=function(){var e=this,n=[],r=e.logsBuffer.slice();e.logsBuffer=[],r.forEach((function(e){n.push({timestamp:e.time,component:e.component,message:e.text})})),this.client.call(t.ClientMethods.SEND_CLIENT_LOGS,{logEvents:n},{success:function(e){t.getLog().info("SendLogs request succeeded.").sendInternalLogToServer()},failure:function(e,n){t.getLog().error("SendLogs request failed.").withObject(n).withException(e).sendInternalLogToServer()},authFailure:t.hitch(e,e.handleAuthFail)})},o.prototype.handleAuthFail=function(e){e?this.conduit.sendDownstream(t.EventType.AUTH_FAIL,e):this.conduit.sendDownstream(t.EventType.AUTH_FAIL)},o.prototype.handleAccessDenied=function(){this.conduit.sendDownstream(t.EventType.ACCESS_DENIED)},o.prototype.checkAuthToken=function(){var e=this,n=new Date(e.initData.authTokenExpiration),r=(new Date).getTime();n.getTime()(e.paths=[],e.children||(e.children=[]),e),n(827),n(163),n(944),n(151),n(891),n(592),n(82),n(754),n(833),n(965),n(286),n(895),n(743),n(642),n(736),n(439),n(279),n(418),n(187),n(821),n(500)})(); \ No newline at end of file +(()=>{var e={821:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,t.agentApp={};var n="ccp";t.agentApp.initCCP=t.core.initCCP,t.agentApp.isInitialized=function(e){},t.agentApp.initAppCommunication=function(e,n){var r=document.getElementById(e),o=new t.IFrameConduit(n,window,r),i=[t.AgentEvents.UPDATE,t.ContactEvents.VIEW,t.EventType.ACKNOWLEDGE,t.EventType.TERMINATED,t.TaskEvents.CREATED];r.addEventListener("load",(function(e){i.forEach((function(e){t.core.getUpstream().onUpstream(e,(function(t){o.sendUpstream(e,t)}))}))}))};var r=function(e){var t=e.indexOf("ccp-v2");return e.slice(0,t-1)};t.agentApp.initApp=function(e,o,i,s){s=s||{};var a=i.endsWith("/")?i:i+"/",c=s.onLoad?s.onLoad:null,u={endpoint:a,style:s.style,onLoad:c};t.agentApp.AppRegistry.register(e,u,document.getElementById(o)),t.agentApp.AppRegistry.start(e,(function(o){var i=o.endpoint,a=o.containerDOM;return{init:function(){return e===n?(s.ccpParams=s.ccpParams?s.ccpParams:{},s.style&&(s.ccpParams.style=s.style),function(e,n,o){var i={ccpUrl:e,ccpLoadTimeout:1e4,loginPopup:!0,loginUrl:r(e)+"/login",softphone:{allowFramedSoftphone:!0,disableRingtone:!1}},s=t.merge(i,o.ccpParams);t.core.initCCP(n,s)}(i,a,s)):t.agentApp.initAppCommunication(e,i)},destroy:function(){return e===n?(o=r(i)+"/logout",t.fetch(o,{credentials:"include"}).then((function(){return t.core.getEventBus().trigger(t.EventType.TERMINATE),!0})).catch((function(e){return t.getLog().error("An error occured on logout."+e).withException(e),window.location.href=o,!1}))):null;var o}}}))},t.agentApp.stopApp=function(e){return t.agentApp.AppRegistry.stop(e)}}()},500:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t;var n,r="ccp";e.connect.agentApp.AppRegistry=(n={},{register:function(e,t,r){n[e]={containerDOM:r,endpoint:t.endpoint,style:t.style,instance:void 0,onLoad:t.onLoad}},start:function(e,t){if(n[e]){var o=n[e].containerDOM,i=n[e].endpoint,s=n[e].style,a=n[e].onLoad;if(e!==r){var c=function(e,t,n,r){var o=document.createElement("iframe");return o.src=t,o.style=n||"width: 100%; height:100%;",o.id=e,o["aria-label"]=e,o.onload=r,o.setAttribute("sandbox","allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"),o}(e,i,s,a);o.appendChild(c)}return n[e].instance=t(n[e]),n[e].instance.init()}},stop:function(e){if(n[e]){var t,r=n[e],o=r.containerDOM.querySelector("iframe");return r.containerDOM.removeChild(o),r.instance&&(t=r.instance.destroy(),delete r.instance),t}}})}()},965:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,t.AgentStateType=t.makeEnum(["init","routable","not_routable","offline"]),t.AgentStatusType=t.AgentStateType,t.AgentAvailStates=t.makeEnum(["Init","Busy","AfterCallWork","CallingCustomer","Dialing","Joining","PendingAvailable","PendingBusy"]),t.AgentErrorStates=t.makeEnum(["Error","AgentHungUp","BadAddressAgent","BadAddressCustomer","Default","FailedConnectAgent","FailedConnectCustomer","InvalidLocale","LineEngagedAgent","LineEngagedCustomer","MissedCallAgent","MissedCallCustomer","MultipleCcpWindows","RealtimeCommunicationError"]),t.EndpointType=t.makeEnum(["phone_number","agent","queue"]),t.AddressType=t.EndpointType,t.ConnectionType=t.makeEnum(["agent","inbound","outbound","monitoring"]),t.ConnectionStateType=t.makeEnum(["init","connecting","connected","hold","disconnected","silent_monitor","barge"]),t.ConnectionStatusType=t.ConnectionStateType,t.CONNECTION_ACTIVE_STATES=t.set([t.ConnectionStateType.CONNECTING,t.ConnectionStateType.CONNECTED,t.ConnectionStateType.HOLD,t.ConnectionStateType.SILENT_MONITOR,t.ConnectionStateType.BARGE]),t.CONNECTION_CONNECTED_STATES=t.set([t.ConnectionStateType.CONNECTED,t.ConnectionStateType.SILENT_MONITOR,t.ConnectionStateType.BARGE]),t.ContactStateType=t.makeEnum(["init","incoming","pending","connecting","connected","missed","error","ended"]),t.ContactStatusType=t.ContactStateType,t.CONTACT_ACTIVE_STATES=t.makeEnum(["incoming","pending","connecting","connected"]),t.ContactType=t.makeEnum(["voice","queue_callback","chat","task"]),t.ContactInitiationMethod=t.makeEnum(["inbound","outbound","transfer","queue_transfer","callback","api","disconnect"]),t.MonitoringMode=t.makeEnum(["SILENT_MONITOR","BARGE"]),t.MonitoringErrorTypes=t.makeEnum(["invalid_target_state"]),t.ChannelType=t.makeEnum(["VOICE","CHAT","TASK"]),t.MediaType=t.makeEnum(["softphone","chat","task"]),t.SoftphoneCallType=t.makeEnum(["audio_video","video_only","audio_only","none"]),t.SoftphoneErrorTypes=t.makeEnum(["unsupported_browser","microphone_not_shared","signalling_handshake_failure","signalling_connection_failure","ice_collection_timeout","user_busy_error","webrtc_error","realtime_communication_error","other"]),t.ClickType=t.makeEnum(["Accept","Reject","Hangup"]),t.VoiceIdErrorTypes=t.makeEnum(["no_speaker_id_found","speaker_id_not_enrolled","get_speaker_id_failed","get_speaker_status_failed","opt_out_speaker_failed","opt_out_speaker_in_lcms_failed","delete_speaker_failed","start_session_failed","evaluate_speaker_failed","session_not_exists","describe_session_failed","enroll_speaker_failed","update_speaker_id_failed","update_speaker_id_in_lcms_failed","not_supported_on_conference_calls","enroll_speaker_timeout","evaluate_speaker_timeout","get_domain_id_failed","no_domain_id_found"]),t.CTIExceptions=t.makeEnum(["AccessDeniedException","InvalidStateException","BadEndpointException","InvalidAgentARNException","InvalidConfigurationException","InvalidContactTypeException","PaginationException","RefreshTokenExpiredException","SendDataFailedException","UnauthorizedException","QuotaExceededException"]),t.VoiceIdStreamingStatus=t.makeEnum(["ONGOING","ENDED","PENDING_CONFIGURATION"]),t.VoiceIdAuthenticationDecision=t.makeEnum(["ACCEPT","REJECT","NOT_ENOUGH_SPEECH","SPEAKER_NOT_ENROLLED","SPEAKER_OPTED_OUT","SPEAKER_ID_NOT_PROVIDED","SPEAKER_EXPIRED"]),t.VoiceIdFraudDetectionDecision=t.makeEnum(["NOT_ENOUGH_SPEECH","HIGH_RISK","LOW_RISK"]),t.ContactFlowAuthenticationDecision=t.makeEnum(["Authenticated","NotAuthenticated","Inconclusive","NotEnrolled","OptedOut","NotEnabled","Error"]),t.ContactFlowFraudDetectionDecision=t.makeEnum(["HighRisk","LowRisk","Inconclusive","NotEnabled","Error"]),t.VoiceIdEnrollmentRequestStatus=t.makeEnum(["NOT_ENOUGH_SPEECH","IN_PROGRESS","COMPLETED","FAILED"]),t.VoiceIdSpeakerStatus=t.makeEnum(["OPTED_OUT","ENROLLED","PENDING"]),t.VoiceIdConstants={EVALUATE_SESSION_DELAY:1e4,EVALUATION_MAX_POLL_TIMES:24,EVALUATION_POLLING_INTERVAL:5e3,ENROLLMENT_MAX_POLL_TIMES:120,ENROLLMENT_POLLING_INTERVAL:5e3,START_SESSION_DELAY:8e3},t.AgentPermissions={OUTBOUND_CALL:"outboundCall",VOICE_ID:"voiceId"};var n=function(){if(!t.agent.initialized)throw new t.StateError("The agent is not yet initialized!")};n.prototype._getData=function(){return t.core.getAgentDataProvider().getAgentData()},n.prototype._createContactAPI=function(e){return new t.Contact(e.contactId)},n.prototype.onRefresh=function(e){t.core.getEventBus().subscribe(t.AgentEvents.REFRESH,e)},n.prototype.onRoutable=function(e){t.core.getEventBus().subscribe(t.AgentEvents.ROUTABLE,e)},n.prototype.onNotRoutable=function(e){t.core.getEventBus().subscribe(t.AgentEvents.NOT_ROUTABLE,e)},n.prototype.onOffline=function(e){t.core.getEventBus().subscribe(t.AgentEvents.OFFLINE,e)},n.prototype.onError=function(e){t.core.getEventBus().subscribe(t.AgentEvents.ERROR,e)},n.prototype.onSoftphoneError=function(e){t.core.getEventBus().subscribe(t.AgentEvents.SOFTPHONE_ERROR,e)},n.prototype.onWebSocketConnectionLost=function(e){t.core.getEventBus().subscribe(t.AgentEvents.WEBSOCKET_CONNECTION_LOST,e)},n.prototype.onWebSocketConnectionGained=function(e){t.core.getEventBus().subscribe(t.AgentEvents.WEBSOCKET_CONNECTION_GAINED,e)},n.prototype.onAfterCallWork=function(e){t.core.getEventBus().subscribe(t.AgentEvents.ACW,e)},n.prototype.onStateChange=function(e){t.core.getEventBus().subscribe(t.AgentEvents.STATE_CHANGE,e)},n.prototype.onMuteToggle=function(e){t.core.getUpstream().onUpstream(t.AgentEvents.MUTE_TOGGLE,e)},n.prototype.onLocalMediaStreamCreated=function(e){t.core.getUpstream().onUpstream(t.AgentEvents.LOCAL_MEDIA_STREAM_CREATED,e)},n.prototype.onSpeakerDeviceChanged=function(e){t.core.getUpstream().onUpstream(t.ConfigurationEvents.SPEAKER_DEVICE_CHANGED,e)},n.prototype.onMicrophoneDeviceChanged=function(e){t.core.getUpstream().onUpstream(t.ConfigurationEvents.MICROPHONE_DEVICE_CHANGED,e)},n.prototype.onRingerDeviceChanged=function(e){t.core.getUpstream().onUpstream(t.ConfigurationEvents.RINGER_DEVICE_CHANGED,e)},n.prototype.mute=function(){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.MUTE,data:{mute:!0}})},n.prototype.unmute=function(){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.MUTE,data:{mute:!1}})},n.prototype.setSpeakerDevice=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.SET_SPEAKER_DEVICE,data:{deviceId:e}})},n.prototype.setMicrophoneDevice=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.SET_MICROPHONE_DEVICE,data:{deviceId:e}})},n.prototype.setRingerDevice=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.SET_RINGER_DEVICE,data:{deviceId:e}})},n.prototype.getState=function(){return this._getData().snapshot.state},n.prototype.getNextState=function(){return this._getData().snapshot.nextState},n.prototype.getAvailabilityState=function(){return this._getData().snapshot.agentAvailabilityState},n.prototype.getStatus=n.prototype.getState,n.prototype.getStateDuration=function(){return t.now()-this._getData().snapshot.state.startTimestamp.getTime()+t.core.getSkew()},n.prototype.getStatusDuration=n.prototype.getStateDuration,n.prototype.getPermissions=function(){return this.getConfiguration().permissions},n.prototype.getContacts=function(e){var t=this;return this._getData().snapshot.contacts.map((function(e){return t._createContactAPI(e)})).filter((function(t){return!e||t.getType()===e}))},n.prototype.getConfiguration=function(){return this._getData().configuration},n.prototype.getAgentStates=function(){return this.getConfiguration().agentStates},n.prototype.getRoutingProfile=function(){return this.getConfiguration().routingProfile},n.prototype.getChannelConcurrency=function(e){var n=this.getRoutingProfile().channelConcurrencyMap;return n||(n=Object.keys(t.ChannelType).reduce((function(e,n){return"TASK"!==n&&(e[t.ChannelType[n]]=1),e}),{})),e?n[e]||0:n},n.prototype.getName=function(){return this.getConfiguration().name},n.prototype.getExtension=function(){return this.getConfiguration().extension},n.prototype.getDialableCountries=function(){return this.getConfiguration().dialableCountries},n.prototype.isSoftphoneEnabled=function(){return this.getConfiguration().softphoneEnabled},n.prototype.setConfiguration=function(e,n){var r=t.core.getClient();e&&e.agentPreferences&&e.agentPreferences.LANGUAGE&&!e.agentPreferences.locale&&(e.agentPreferences.locale=e.agentPreferences.LANGUAGE),e&&e.agentPreferences&&!t.isValidLocale(e.agentPreferences.locale)?n&&n.failure&&n.failure(t.AgentErrorStates.INVALID_LOCALE):r.call(t.ClientMethods.UPDATE_AGENT_CONFIGURATION,{configuration:t.assertNotNull(e,"configuration")},{success:function(e){t.core.getUpstream().sendUpstream(t.EventType.RELOAD_AGENT_CONFIGURATION),n.success&&n.success(e)},failure:n&&n.failure})},n.prototype.setState=function(e,n,r){t.core.getClient().call(t.ClientMethods.PUT_AGENT_STATE,{state:t.assertNotNull(e,"state"),enqueueNextState:r&&!!r.enqueueNextState},n)},n.prototype.onEnqueuedNextState=function(e){t.core.getEventBus().subscribe(t.AgentEvents.ENQUEUED_NEXT_STATE,e)},n.prototype.setStatus=n.prototype.setState,n.prototype.connect=function(e,n){var r=t.core.getClient(),o=new t.Endpoint(e);delete o.endpointId,r.call(t.ClientMethods.CREATE_OUTBOUND_CONTACT,{endpoint:t.assertNotNull(o,"endpoint"),queueARN:n&&(n.queueARN||n.queueId)||this.getRoutingProfile().defaultOutboundQueue.queueARN},n&&{success:n.success,failure:n.failure})},n.prototype.getAllQueueARNs=function(){return this.getConfiguration().routingProfile.queues.map((function(e){return e.queueARN}))},n.prototype.getEndpoints=function(e,n,r){var o=this,i=t.core.getClient();t.assertNotNull(n,"callbacks"),t.assertNotNull(n.success,"callbacks.success");var s=r||{};s.endpoints=s.endpoints||[],s.maxResults=s.maxResults||t.DEFAULT_BATCH_SIZE,t.isArray(e)||(e=[e]),i.call(t.ClientMethods.GET_ENDPOINTS,{queueARNs:e,nextToken:s.nextToken||null,maxResults:s.maxResults},{success:function(r){if(r.nextToken)o.getEndpoints(e,n,{nextToken:r.nextToken,maxResults:s.maxResults,endpoints:s.endpoints.concat(r.endpoints)});else{s.endpoints=s.endpoints.concat(r.endpoints);var i=s.endpoints.map((function(e){return new t.Endpoint(e)}));n.success({endpoints:i,addresses:i})}},failure:n.failure})},n.prototype.getAddresses=n.prototype.getEndpoints,n.prototype._getResourceId=function(){var e=this.getAllQueueARNs();for(let t of e){const e=t.match(/\/agent\/([^/]+)/);if(e)return e[1]}return new Error("Agent.prototype._getResourceId: queueArns did not contain agentResourceId: ",e)},n.prototype.toSnapshot=function(){return new t.AgentSnapshot(this._getData())};var r=function(e){t.Agent.call(this),this.agentData=e};(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype._getData=function(){return this.agentData},r.prototype._createContactAPI=function(e){return new t.ContactSnapshot(e)};var o=function(e){this.contactId=e};o.prototype._getData=function(){return t.core.getAgentDataProvider().getContactData(this.getContactId())},o.prototype._createConnectionAPI=function(e){return this.getType()===t.ContactType.CHAT?new t.ChatConnection(this.contactId,e.connectionId):this.getType()===t.ContactType.TASK?new t.TaskConnection(this.contactId,e.connectionId):new t.VoiceConnection(this.contactId,e.connectionId)},o.prototype.getEventName=function(e){return t.core.getContactEventName(e,this.getContactId())},o.prototype.onRefresh=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.REFRESH),e)},o.prototype.onIncoming=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.INCOMING),e)},o.prototype.onConnecting=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.CONNECTING),e)},o.prototype.onPending=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.PENDING),e)},o.prototype.onAccepted=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.ACCEPTED),e)},o.prototype.onMissed=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.MISSED),e)},o.prototype.onEnded=function(e){var n=t.core.getEventBus();n.subscribe(this.getEventName(t.ContactEvents.ENDED),e),n.subscribe(this.getEventName(t.ContactEvents.DESTROYED),e)},o.prototype.onDestroy=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.DESTROYED),e)},o.prototype.onACW=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.ACW),e)},o.prototype.onConnected=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.CONNECTED),e)},o.prototype.onError=function(e){t.core.getEventBus().subscribe(this.getEventName(t.ContactEvents.ERROR),e)},o.prototype.getContactId=function(){return this.contactId},o.prototype.getOriginalContactId=function(){return this._getData().initialContactId},o.prototype.getInitialContactId=o.prototype.getOriginalContactId,o.prototype.getType=function(){return this._getData().type},o.prototype.getContactDuration=function(){return this._getData().contactDuration},o.prototype.getState=function(){return this._getData().state},o.prototype.getStatus=o.prototype.getState,o.prototype.getStateDuration=function(){return t.now()-this._getData().state.timestamp.getTime()+t.core.getSkew()},o.prototype.getStatusDuration=o.prototype.getStateDuration,o.prototype.getQueue=function(){return this._getData().queue},o.prototype.getQueueTimestamp=function(){return this._getData().queueTimestamp},o.prototype.getConnections=function(){var e=this;return this._getData().connections.map((function(n){return e.getType()===t.ContactType.CHAT?new t.ChatConnection(e.contactId,n.connectionId):e.getType()===t.ContactType.TASK?new t.TaskConnection(e.contactId,n.connectionId):new t.VoiceConnection(e.contactId,n.connectionId)}))},o.prototype.getInitialConnection=function(){return t.find(this.getConnections(),(function(e){return e.isInitialConnection()}))||null},o.prototype.getActiveInitialConnection=function(){var e=this.getInitialConnection();return null!=e&&e.isActive()?e:null},o.prototype.getThirdPartyConnections=function(){return this.getConnections().filter((function(e){return!e.isInitialConnection()&&e.getType()!==t.ConnectionType.AGENT}))},o.prototype.getSingleActiveThirdPartyConnection=function(){return this.getThirdPartyConnections().filter((function(e){return e.isActive()}))[0]||null},o.prototype.getAgentConnection=function(){return t.find(this.getConnections(),(function(e){var n=e.getType();return n===t.ConnectionType.AGENT||n===t.ConnectionType.MONITORING}))},o.prototype.getName=function(){return this._getData().name},o.prototype.getContactMetadata=function(){return this._getData().contactMetadata},o.prototype.getDescription=function(){return this._getData().description},o.prototype.getReferences=function(){return this._getData().references},o.prototype.getAttributes=function(){return this._getData().attributes},o.prototype.getContactFeatures=function(){return this._getData().contactFeatures},o.prototype.getChannelContext=function(){return this._getData().channelContext},o.prototype.isSoftphoneCall=function(){return null!=t.find(this.getConnections(),(function(e){return null!=e.getSoftphoneMediaInfo()}))},o.prototype._isInbound=function(){return this._getData().initiationMethod!==t.ContactInitiationMethod.OUTBOUND},o.prototype.isInbound=function(){var e=this.getInitialConnection();return e.getMediaType()===t.MediaType.TASK?this._isInbound():!!e&&e.getType()===t.ConnectionType.INBOUND},o.prototype.isConnected=function(){return this.getStatus().type===t.ContactStateType.CONNECTED},o.prototype.accept=function(e){var n=t.core.getClient(),r=this,o=this.getContactId();t.publishClickStreamData({contactId:this.getContactId(),clickType:t.ClickType.ACCEPT,clickTime:(new Date).toISOString()}),n.call(t.ClientMethods.ACCEPT_CONTACT,{contactId:o},{success:function(n){var i=t.core.getUpstream();i.sendUpstream(t.EventType.BROADCAST,{event:t.ContactEvents.ACCEPTED,data:new t.Contact(o)}),i.sendUpstream(t.EventType.BROADCAST,{event:t.core.getContactEventName(t.ContactEvents.ACCEPTED,r.getContactId()),data:new t.Contact(o)});var s=new t.Contact(o);t.isFirefoxBrowser()&&s.isSoftphoneCall()&&t.core.triggerReadyToStartSessionEvent(),e&&e.success&&e.success(n)},failure:e?e.failure:null})},o.prototype.destroy=function(){t.getLog().warn("contact.destroy() has been deprecated.")},o.prototype.reject=function(e){var n=t.core.getClient();t.publishClickStreamData({contactId:this.getContactId(),clickType:t.ClickType.REJECT,clickTime:(new Date).toISOString()}),n.call(t.ClientMethods.REJECT_CONTACT,{contactId:this.getContactId()},e)},o.prototype.complete=function(e){t.core.getClient().call(t.ClientMethods.COMPLETE_CONTACT,{contactId:this.getContactId()},e)},o.prototype.clear=function(e){t.core.getClient().call(t.ClientMethods.CLEAR_CONTACT,{contactId:this.getContactId()},e)},o.prototype.notifyIssue=function(e,n,r){t.core.getClient().call(t.ClientMethods.NOTIFY_CONTACT_ISSUE,{contactId:this.getContactId(),issueCode:e,description:n},r)},o.prototype.addConnection=function(e,n){var r=t.core.getClient(),o=new t.Endpoint(e);delete o.endpointId,r.call(t.ClientMethods.CREATE_ADDITIONAL_CONNECTION,{contactId:this.getContactId(),endpoint:o},n)},o.prototype.toggleActiveConnections=function(e){var n=t.core.getClient(),r=null,o=t.find(this.getConnections(),(function(e){return e.getStatus().type===t.ConnectionStateType.HOLD}));if(null!=o)r=o.getConnectionId();else{var i=this.getConnections().filter((function(e){return e.isActive()}));i.length>0&&(r=i[0].getConnectionId())}n.call(t.ClientMethods.TOGGLE_ACTIVE_CONNECTIONS,{contactId:this.getContactId(),connectionId:r},e)},o.prototype.sendSoftphoneMetrics=function(n,r){t.core.getClient().call(t.ClientMethods.SEND_SOFTPHONE_CALL_METRICS,{contactId:this.getContactId(),ccpVersion:e.ccpVersion,softphoneStreamStatistics:n},r),t.publishSoftphoneStats({contactId:this.getContactId(),ccpVersion:e.ccpVersion,stats:n})},o.prototype.sendSoftphoneReport=function(n,r){t.core.getClient().call(t.ClientMethods.SEND_SOFTPHONE_CALL_REPORT,{contactId:this.getContactId(),ccpVersion:e.ccpVersion,report:n},r),t.publishSoftphoneReport({contactId:this.getContactId(),ccpVersion:e.ccpVersion,report:n})},o.prototype.conferenceConnections=function(e){t.core.getClient().call(t.ClientMethods.CONFERENCE_CONNECTIONS,{contactId:this.getContactId()},e)},o.prototype.toSnapshot=function(){return new t.ContactSnapshot(this._getData())},o.prototype.isMultiPartyConferenceEnabled=function(){var e=this.getContactFeatures();return!(!e||!e.multiPartyConferenceEnabled)},o.prototype.updateMonitorParticipantState=function(e,n){e&&Object.values(t.MonitoringMode).includes(e.toUpperCase())?t.core.getClient().call(t.ClientMethods.UPDATE_MONITOR_PARTICIPANT_STATE,{contactId:this.getContactId(),targetMonitorMode:e.toUpperCase()},n):(t.getLog().error(`Invalid target state was provided: ${e}`).sendInternalLogToServer(),n&&n.failure&&n.failure(t.MonitoringErrorTypes.INVALID_TARGET_STATE))},o.prototype.isUnderSupervision=function(){var e=this.getConnections().filter((e=>e.getType()!==t.ConnectionType.AGENT));return void 0!==(e&&e.find((e=>e.isBarge()&&e.isActive())))};var i=function(e){t.Contact.call(this,e.contactId),this.contactData=e};(i.prototype=Object.create(o.prototype)).constructor=i,i.prototype._getData=function(){return this.contactData},i.prototype._createConnectionAPI=function(e){return new t.ConnectionSnapshot(e)};var s=function(e,t){this.contactId=e,this.connectionId=t,this._initMediaController()};s.prototype._getData=function(){return t.core.getAgentDataProvider().getConnectionData(this.getContactId(),this.getConnectionId())},s.prototype.getContactId=function(){return this.contactId},s.prototype.getConnectionId=function(){return this.connectionId},s.prototype.getEndpoint=function(){return new t.Endpoint(this._getData().endpoint)},s.prototype.getAddress=s.prototype.getEndpoint,s.prototype.getState=function(){return this._getData().state},s.prototype.getStatus=s.prototype.getState,s.prototype.getStateDuration=function(){return t.now()-this._getData().state.timestamp.getTime()+t.core.getSkew()},s.prototype.getStatusDuration=s.prototype.getStateDuration,s.prototype.getType=function(){return this._getData().type},s.prototype.isInitialConnection=function(){return this._getData().initial},s.prototype.isActive=function(){return t.contains(t.CONNECTION_ACTIVE_STATES,this.getStatus().type)},s.prototype.isConnected=function(){return t.contains(t.CONNECTION_CONNECTED_STATES,this.getStatus().type)},s.prototype.isConnecting=function(){return this.getStatus().type===t.ConnectionStateType.CONNECTING},s.prototype.isOnHold=function(){return this.getStatus().type===t.ConnectionStateType.HOLD},s.prototype.getSoftphoneMediaInfo=function(){return this._getData().softphoneMediaInfo},s.prototype.getMonitorInfo=function(){return this._getData().monitoringInfo},s.prototype.destroy=function(e){t.publishClickStreamData({contactId:this.getContactId(),clickType:t.ClickType.HANGUP,clickTime:(new Date).toISOString()}),t.core.getClient().call(t.ClientMethods.DESTROY_CONNECTION,{contactId:this.getContactId(),connectionId:this.getConnectionId()},e)},s.prototype.sendDigits=function(e,n){t.core.getClient().call(t.ClientMethods.SEND_DIGITS,{contactId:this.getContactId(),connectionId:this.getConnectionId(),digits:e},n)},s.prototype.hold=function(e){t.core.getClient().call(t.ClientMethods.HOLD_CONNECTION,{contactId:this.getContactId(),connectionId:this.getConnectionId()},e)},s.prototype.resume=function(e){t.core.getClient().call(t.ClientMethods.RESUME_CONNECTION,{contactId:this.getContactId(),connectionId:this.getConnectionId()},e)},s.prototype.toSnapshot=function(){return new t.ConnectionSnapshot(this._getData())},s.prototype._initMediaController=function(){this.getMediaInfo()&&t.core.mediaFactory.get(this).catch((function(){}))},s.prototype._isAgentConnectionType=function(){var e=this.getType();return e===t.ConnectionType.AGENT||e===t.ConnectionType.MONITORING},s.prototype._isAgentConnectionType=function(){var e=this.getType();return e===t.ConnectionType.AGENT||e===t.ConnectionType.MONITORING};var a=function(e){this.contactId=e};a.prototype.getSpeakerId=function(){var e=this;e.checkConferenceCall();var n=t.core.getClient();return new Promise((function(r,o){const i={contactId:e.contactId,instanceId:t.core.getAgentDataProvider().getInstanceId(),awsAccountId:t.core.getAgentDataProvider().getAWSAccountId()};t.getLog().info("getSpeakerId called").withObject(i).sendInternalLogToServer(),n.call(t.AgentAppClientMethods.GET_CONTACT,i,{success:function(e){if(e.contactData.customerId){var n={speakerId:e.contactData.customerId};t.getLog().info("getSpeakerId succeeded").withObject(e).sendInternalLogToServer(),r(n)}else{var i=t.VoiceIdError(t.VoiceIdErrorTypes.NO_SPEAKER_ID_FOUND,"No speakerId assotiated with this call");o(i)}},failure:function(e){t.getLog().error("Get SpeakerId failed").withObject({err:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.GET_SPEAKER_ID_FAILED,"Get SpeakerId failed",e);o(n)}})}))},a.prototype.getSpeakerStatus=function(){var e=this;e.checkConferenceCall();var n=t.core.getClient();return new Promise((function(r,o){e.getSpeakerId().then((function(i){e.getDomainId().then((function(e){const s={SpeakerId:t.assertNotNull(i.speakerId,"speakerId"),DomainId:e};t.getLog().info("getSpeakerStatus called").withObject(s).sendInternalLogToServer(),n.call(t.AgentAppClientMethods.DESCRIBE_SPEAKER,s,{success:function(e){t.getLog().info("getSpeakerStatus succeeded").withObject(e).sendInternalLogToServer(),r(e)},failure:function(e){var n=JSON.parse(e);switch(n.status){case 400:case 404:var i=n;i.type=i.type?i.type:t.VoiceIdErrorTypes.SPEAKER_ID_NOT_ENROLLED,t.getLog().info("Speaker is not enrolled.").sendInternalLogToServer(),r(i);break;default:t.getLog().error("getSpeakerStatus failed").withObject({err:e}).sendInternalLogToServer();var s=t.VoiceIdError(t.VoiceIdErrorTypes.GET_SPEAKER_STATUS_FAILED,"Get SpeakerStatus failed",e);o(s)}}})})).catch((function(e){o(e)}))})).catch((function(e){o(e)}))}))},a.prototype._optOutSpeakerInLcms=function(e,n){var r=this,o=t.core.getClient();return new Promise((function(i,s){const a={ContactId:r.contactId,InstanceId:t.core.getAgentDataProvider().getInstanceId(),AWSAccountId:t.core.getAgentDataProvider().getAWSAccountId(),CustomerId:t.assertNotNull(e,"speakerId"),VoiceIdResult:{SpeakerOptedOut:!0,generatedSpeakerId:n}};t.getLog().info("_optOutSpeakerInLcms called").withObject(a).sendInternalLogToServer(),o.call(t.AgentAppClientMethods.UPDATE_VOICE_ID_DATA,a,{success:function(e){t.getLog().info("optOutSpeakerInLcms succeeded").withObject(e).sendInternalLogToServer(),i(e)},failure:function(e){t.getLog().error("optOutSpeakerInLcms failed").withObject({err:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.OPT_OUT_SPEAKER_IN_LCMS_FAILED,"optOutSpeakerInLcms failed",e);s(n)}})}))},a.prototype.optOutSpeaker=function(){var e=this;e.checkConferenceCall();var n=t.core.getClient();return new Promise((function(r,o){e.getSpeakerId().then((function(i){e.getDomainId().then((function(s){var a=i.speakerId;const c={SpeakerId:t.assertNotNull(a,"speakerId"),DomainId:s};t.getLog().info("optOutSpeaker called").withObject(c).sendInternalLogToServer(),n.call(t.AgentAppClientMethods.OPT_OUT_SPEAKER,c,{success:function(n){e._optOutSpeakerInLcms(a,n.generatedSpeakerId).catch((function(){})),t.getLog().info("optOutSpeaker succeeded").withObject(n).sendInternalLogToServer(),r(n)},failure:function(e){t.getLog().error("optOutSpeaker failed").withObject({err:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.OPT_OUT_SPEAKER_FAILED,"optOutSpeaker failed.",e);o(n)}})})).catch((function(e){o(e)}))})).catch((function(e){o(e)}))}))},a.prototype.deleteSpeaker=function(){var e=this;e.checkConferenceCall();var n=t.core.getClient();return new Promise((function(r,o){e.getSpeakerId().then((function(i){e.getDomainId().then((function(e){const s={SpeakerId:t.assertNotNull(i.speakerId,"speakerId"),DomainId:e};t.getLog().info("deleteSpeaker called").withObject(s).sendInternalLogToServer(),n.call(t.AgentAppClientMethods.DELETE_SPEAKER,s,{success:function(e){t.getLog().info("deleteSpeaker succeeded").withObject(e).sendInternalLogToServer(),r(e)},failure:function(e){t.getLog().error("deleteSpeaker failed").withObject({err:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.DELETE_SPEAKER_FAILED,"deleteSpeaker failed.",e);o(n)}})})).catch((function(e){o(e)}))})).catch((function(e){o(e)}))}))},a.prototype.startSession=function(){var e=this;e.checkConferenceCall();var n=t.core.getClient();return new Promise((function(r,o){e.getDomainId().then((function(i){const s={contactId:e.contactId,instanceId:t.core.getAgentDataProvider().getInstanceId(),customerAccountId:t.core.getAgentDataProvider().getAWSAccountId(),clientToken:AWS.util.uuid.v4(),domainId:i};t.getLog().info("startSession called").withObject(s).sendInternalLogToServer(),n.call(t.AgentAppClientMethods.START_VOICE_ID_SESSION,s,{success:function(e){if(e.sessionId)r(e);else{t.getLog().error("startVoiceIdSession failed, no session id returned").withObject({data:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.START_SESSION_FAILED,"No session id returned from start session api");o(n)}},failure:function(e){t.getLog().error("startVoiceIdSession failed").withObject({err:e}).sendInternalLogToServer();var n=t.VoiceIdError(t.VoiceIdErrorTypes.START_SESSION_FAILED,"startVoiceIdSession failed",e);o(n)}})})).catch((function(e){o(e)}))}))},a.prototype.evaluateSpeaker=function(e){var n=this;n.checkConferenceCall();var r=t.core.getClient(),o=t.core.getAgentDataProvider().getContactData(this.contactId),i=0;return new Promise((function(s,a){function c(){n.getDomainId().then((function(e){const u={SessionNameOrId:o.initialContactId||this.contactId,DomainId:e};t.getLog().info("evaluateSpeaker called").withObject(u).sendInternalLogToServer(),r.call(t.AgentAppClientMethods.EVALUATE_SESSION,u,{success:function(e){if(++i=1&&(o=r.IntegrationAssociationSummaryList[0].IntegrationArn.replace(/^.*domain\//i,"")),!o){t.getLog().info("getDomainId: no domainId found").sendInternalLogToServer();var i=t.VoiceIdError(t.VoiceIdErrorTypes.NO_DOMAIN_ID_FOUND);return void n(i)}t.getLog().info("getDomainId succeeded").withObject(r).sendInternalLogToServer(),t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.VoiceIdEvents.UPDATE_DOMAIN_ID,data:{domainId:o}}),e(o)}catch(e){t.getLog().error("getDomainId failed").withObject({err:e}).sendInternalLogToServer(),i=t.VoiceIdError(t.VoiceIdErrorTypes.GET_DOMAIN_ID_FAILED,"getDomainId failed",e),n(i)}},failure:function(e){t.getLog().error("getDomainId failed").withObject({err:e}).sendInternalLogToServer();var r=t.VoiceIdError(t.VoiceIdErrorTypes.GET_DOMAIN_ID_FAILED,"getDomainId failed",e);n(r)}})}else n(new Error("Agent doesn't have the permission for Voice ID"))}))},a.prototype.checkConferenceCall=function(){if(t.core.getAgentDataProvider().getContactData(this.contactId).connections.filter((function(e){return t.contains(t.CONNECTION_ACTIVE_STATES,e.state.type)})).length>2)throw new t.NotImplementedError("VoiceId is not supported for conference calls")},a.prototype.isAuthEnabled=function(e){return e!==t.ContactFlowAuthenticationDecision.NOT_ENABLED},a.prototype.isAuthResultNotEnoughSpeech=function(e){return e===t.VoiceIdAuthenticationDecision.NOT_ENOUGH_SPEECH},a.prototype.isAuthResultInconclusive=function(e){return e===t.ContactFlowAuthenticationDecision.INCONCLUSIVE},a.prototype.isFraudEnabled=function(e){return e!==t.ContactFlowFraudDetectionDecision.NOT_ENABLED},a.prototype.isFraudResultNotEnoughSpeech=function(e){return e===t.VoiceIdFraudDetectionDecision.NOT_ENOUGH_SPEECH},a.prototype.isFraudResultInconclusive=function(e){return e===t.ContactFlowFraudDetectionDecision.INCONCLUSIVE};var c=function(e,t){this._speakerAuthenticator=new a(e),s.call(this,e,t)};(c.prototype=Object.create(s.prototype)).constructor=c,c.prototype.getSoftphoneMediaInfo=function(){return this._getData().softphoneMediaInfo},c.prototype.getMediaInfo=function(){return this._getData().softphoneMediaInfo},c.prototype.getMediaType=function(){return t.MediaType.SOFTPHONE},c.prototype.getMediaController=function(){return t.core.mediaFactory.get(this)},c.prototype.getVoiceIdSpeakerId=function(){return this._speakerAuthenticator.getSpeakerId()},c.prototype.getVoiceIdSpeakerStatus=function(){return this._speakerAuthenticator.getSpeakerStatus()},c.prototype.optOutVoiceIdSpeaker=function(){return this._speakerAuthenticator.optOutSpeaker()},c.prototype.deleteVoiceIdSpeaker=function(){return this._speakerAuthenticator.deleteSpeaker()},c.prototype.evaluateSpeakerWithVoiceId=function(e){return this._speakerAuthenticator.evaluateSpeaker(e)},c.prototype.enrollSpeakerInVoiceId=function(e){return this._speakerAuthenticator.enrollSpeaker(e)},c.prototype.updateVoiceIdSpeakerId=function(e){return this._speakerAuthenticator.updateSpeakerIdInVoiceId(e)},c.prototype.getQuickConnectName=function(){return this._getData().quickConnectName},c.prototype.isSilentMonitor=function(){return this.getMonitorStatus()===t.MonitoringMode.SILENT_MONITOR},c.prototype.isBarge=function(){return this.getMonitorStatus()===t.MonitoringMode.BARGE},c.prototype.isBargeEnabled=function(){var e=this.getMonitorCapabilities();return e&&e.includes(t.MonitoringMode.BARGE)},c.prototype.isSilentMonitorEnabled=function(){var e=this.getMonitorCapabilities();return e&&e.includes(t.MonitoringMode.SILENT_MONITOR)},c.prototype.getMonitorCapabilities=function(){return this._getData().monitorCapabilities},c.prototype.getMonitorStatus=function(){return this._getData().monitorStatus},c.prototype.isMute=function(){return this._getData().mute},c.prototype.isForcedMute=function(){return this._getData().forcedMute},c.prototype.muteParticipant=function(e){t.core.getClient().call(t.ClientMethods.MUTE_PARTICIPANT,{contactId:this.getContactId(),connectionId:this.getConnectionId()},e)},c.prototype.unmuteParticipant=function(e){t.core.getClient().call(t.ClientMethods.UNMUTE_PARTICIPANT,{contactId:this.getContactId(),connectionId:this.getConnectionId()},e)};var u=function(e,t){s.call(this,e,t)};(u.prototype=Object.create(s.prototype)).constructor=u,u.prototype.getMediaInfo=function(){var e=this._getData().chatMediaInfo;if(e){var n=t.core.getAgentDataProvider().getContactData(this.contactId),r={contactId:this.contactId,initialContactId:n.initialContactId||this.contactId,participantId:this.connectionId,getConnectionToken:t.hitch(this,this.getConnectionToken)};if(e.connectionData)try{r.participantToken=JSON.parse(e.connectionData).ConnectionAuthenticationToken}catch(n){t.getLog().error(t.LogComponent.CHAT,"Connection data is invalid").withObject(e).withException(n).sendInternalLogToServer(),r.participantToken=null}return r.participantToken=r.participantToken||null,r.originalInfo=this._getData().chatMediaInfo,r}return null},u.prototype.getConnectionToken=function(){var e=t.core.getClient(),n=t.core.getAgentDataProvider().getContactData(this.contactId),r={transportType:t.TRANSPORT_TYPES.CHAT_TOKEN,participantId:this.connectionId,contactId:n.initialContactId||this.contactId};return new Promise((function(n,o){e.call(t.ClientMethods.CREATE_TRANSPORT,r,{success:function(e){t.getLog().info("getConnectionToken succeeded").sendInternalLogToServer(),n(e)},failure:function(e,n){t.getLog().error("getConnectionToken failed").sendInternalLogToServer().withObject({err:e,data:n}),o(Error("getConnectionToken failed"))}})}))},u.prototype.getMediaType=function(){return t.MediaType.CHAT},u.prototype.getMediaController=function(){return t.core.mediaFactory.get(this)},u.prototype._initMediaController=function(){this._isAgentConnectionType()&&t.core.mediaFactory.get(this).catch((function(){}))};var l=function(e,t){s.call(this,e,t)};(l.prototype=Object.create(s.prototype)).constructor=l,l.prototype.getMediaType=function(){return t.MediaType.TASK},l.prototype.getMediaInfo=function(){var e=t.core.getAgentDataProvider().getContactData(this.contactId);return{contactId:this.contactId,initialContactId:e.initialContactId||this.contactId}},l.prototype.getMediaController=function(){return t.core.mediaFactory.get(this)};var p=function(e){t.Connection.call(this,e.contactId,e.connectionId),this.connectionData=e};(p.prototype=Object.create(s.prototype)).constructor=p,p.prototype._getData=function(){return this.connectionData},p.prototype._initMediaController=function(){};var d=function(e){var t=e||{};this.endpointARN=t.endpointId||t.endpointARN||null,this.endpointId=this.endpointARN,this.type=t.type||null,this.name=t.name||null,this.phoneNumber=t.phoneNumber||null,this.agentLogin=t.agentLogin||null,this.queue=t.queue||null};d.prototype.stripPhoneNumber=function(){return this.phoneNumber?this.phoneNumber.replace(/sip:([^@]*)@.*/,"$1"):""},d.byPhoneNumber=function(e,n){return new d({type:t.EndpointType.PHONE_NUMBER,phoneNumber:e,name:n||null})};var h=function(e,t,n){this.errorType=e,this.errorMessage=t,this.endPointUrl=n};h.prototype.getErrorType=function(){return this.errorType},h.prototype.getErrorMessage=function(){return this.errorMessage},h.prototype.getEndPointUrl=function(){return this.endPointUrl},t.agent=function(e){var n=t.core.getEventBus().subscribe(t.AgentEvents.INIT,e);return t.agent.initialized&&e(new t.Agent),n},t.agent.initialized=!1,t.contact=function(e){return t.core.getEventBus().subscribe(t.ContactEvents.INIT,e)},t.onWebsocketInitFailure=function(e){var n=t.core.getEventBus().subscribe(t.WebSocketEvents.INIT_FAILURE,e);return t.webSocketInitFailed&&e(),n},t.ifMaster=function(e,n,r,o){if(t.assertNotNull(e,"A topic must be provided."),t.assertNotNull(n,"A true callback must be provided."),!t.core.masterClient)return t.getLog().warn("We can't be the master for topic '%s' because there is no master client!",e).sendInternalLogToServer(),void(r&&r());t.core.getMasterClient().call(t.MasterMethods.CHECK_MASTER,{topic:e,shouldNotBecomeMasterIfNone:o},{success:function(e){e.isMaster?n():r&&r()}})},t.becomeMaster=function(e,n,r){t.assertNotNull(e,"A topic must be provided."),t.core.masterClient?t.core.getMasterClient().call(t.MasterMethods.BECOME_MASTER,{topic:e},{success:function(){n&&n()}}):(t.getLog().warn("We can't be the master for topic '%s' because there is no master client!",e),r&&r())},t.Agent=n,t.AgentSnapshot=r,t.Contact=o,t.ContactSnapshot=i,t.Connection=c,t.BaseConnection=s,t.VoiceConnection=c,t.ChatConnection=u,t.TaskConnection=l,t.ConnectionSnapshot=p,t.Endpoint=d,t.Address=d,t.SoftphoneError=h,t.VoiceId=a}()},827:(e,t,n)=>{var r;!function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){return o(t[s][1][e]||e)}),u,u.exports,e,t,n,r)}return n[s].exports}for(var i=void 0,s=0;s-1});var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"];t.exports={isEmptyData:function(e){return"string"==typeof e?0===e.length:0===e.byteLength},convertToBuffer:function(e){return"string"==typeof e&&(e=new r(e,"utf8")),ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}},{"buffer/":85}],12:[function(e,t,n){var r=e("./browserHashUtils");function o(e,t){this.hash=new e,this.outer=new e;var n=function(e,t){var n=r.convertToBuffer(t);if(n.byteLength>e.BLOCK_SIZE){var o=new e;o.update(n),n=o.digest()}var i=new Uint8Array(e.BLOCK_SIZE);return i.set(n),i}(e,t),o=new Uint8Array(e.BLOCK_SIZE);o.set(n);for(var i=0;i>>32-o)+n&4294967295}function c(e,t,n,r,o,i,s){return a(t&n|~t&r,e,t,o,i,s)}function u(e,t,n,r,o,i,s){return a(t&r|n&~r,e,t,o,i,s)}function l(e,t,n,r,o,i,s){return a(t^n^r,e,t,o,i,s)}function p(e,t,n,r,o,i,s){return a(n^(t|~r),e,t,o,i,s)}t.exports=s,s.BLOCK_SIZE=i,s.prototype.update=function(e){if(r.isEmptyData(e))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=r.convertToBuffer(e),n=0,o=t.byteLength;for(this.bytesHashed+=o;o>0;)this.buffer.setUint8(this.bufferLength++,t[n++]),o--,this.bufferLength===i&&(this.hashBuffer(),this.bufferLength=0);return this},s.prototype.digest=function(e){if(!this.finished){var t=this,n=t.buffer,r=t.bufferLength,s=8*t.bytesHashed;if(n.setUint8(this.bufferLength++,128),r%i>=56){for(var a=this.bufferLength;a>>0,!0),n.setUint32(60,Math.floor(s/4294967296),!0),this.hashBuffer(),this.finished=!0}var c=new DataView(new ArrayBuffer(16));for(a=0;a<4;a++)c.setUint32(4*a,this.state[a],!0);var u=new o(c.buffer,c.byteOffset,c.byteLength);return e?u.toString(e):u},s.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,n=t[0],r=t[1],o=t[2],i=t[3];n=c(n,r,o,i,e.getUint32(0,!0),7,3614090360),i=c(i,n,r,o,e.getUint32(4,!0),12,3905402710),o=c(o,i,n,r,e.getUint32(8,!0),17,606105819),r=c(r,o,i,n,e.getUint32(12,!0),22,3250441966),n=c(n,r,o,i,e.getUint32(16,!0),7,4118548399),i=c(i,n,r,o,e.getUint32(20,!0),12,1200080426),o=c(o,i,n,r,e.getUint32(24,!0),17,2821735955),r=c(r,o,i,n,e.getUint32(28,!0),22,4249261313),n=c(n,r,o,i,e.getUint32(32,!0),7,1770035416),i=c(i,n,r,o,e.getUint32(36,!0),12,2336552879),o=c(o,i,n,r,e.getUint32(40,!0),17,4294925233),r=c(r,o,i,n,e.getUint32(44,!0),22,2304563134),n=c(n,r,o,i,e.getUint32(48,!0),7,1804603682),i=c(i,n,r,o,e.getUint32(52,!0),12,4254626195),o=c(o,i,n,r,e.getUint32(56,!0),17,2792965006),n=u(n,r=c(r,o,i,n,e.getUint32(60,!0),22,1236535329),o,i,e.getUint32(4,!0),5,4129170786),i=u(i,n,r,o,e.getUint32(24,!0),9,3225465664),o=u(o,i,n,r,e.getUint32(44,!0),14,643717713),r=u(r,o,i,n,e.getUint32(0,!0),20,3921069994),n=u(n,r,o,i,e.getUint32(20,!0),5,3593408605),i=u(i,n,r,o,e.getUint32(40,!0),9,38016083),o=u(o,i,n,r,e.getUint32(60,!0),14,3634488961),r=u(r,o,i,n,e.getUint32(16,!0),20,3889429448),n=u(n,r,o,i,e.getUint32(36,!0),5,568446438),i=u(i,n,r,o,e.getUint32(56,!0),9,3275163606),o=u(o,i,n,r,e.getUint32(12,!0),14,4107603335),r=u(r,o,i,n,e.getUint32(32,!0),20,1163531501),n=u(n,r,o,i,e.getUint32(52,!0),5,2850285829),i=u(i,n,r,o,e.getUint32(8,!0),9,4243563512),o=u(o,i,n,r,e.getUint32(28,!0),14,1735328473),n=l(n,r=u(r,o,i,n,e.getUint32(48,!0),20,2368359562),o,i,e.getUint32(20,!0),4,4294588738),i=l(i,n,r,o,e.getUint32(32,!0),11,2272392833),o=l(o,i,n,r,e.getUint32(44,!0),16,1839030562),r=l(r,o,i,n,e.getUint32(56,!0),23,4259657740),n=l(n,r,o,i,e.getUint32(4,!0),4,2763975236),i=l(i,n,r,o,e.getUint32(16,!0),11,1272893353),o=l(o,i,n,r,e.getUint32(28,!0),16,4139469664),r=l(r,o,i,n,e.getUint32(40,!0),23,3200236656),n=l(n,r,o,i,e.getUint32(52,!0),4,681279174),i=l(i,n,r,o,e.getUint32(0,!0),11,3936430074),o=l(o,i,n,r,e.getUint32(12,!0),16,3572445317),r=l(r,o,i,n,e.getUint32(24,!0),23,76029189),n=l(n,r,o,i,e.getUint32(36,!0),4,3654602809),i=l(i,n,r,o,e.getUint32(48,!0),11,3873151461),o=l(o,i,n,r,e.getUint32(60,!0),16,530742520),n=p(n,r=l(r,o,i,n,e.getUint32(8,!0),23,3299628645),o,i,e.getUint32(0,!0),6,4096336452),i=p(i,n,r,o,e.getUint32(28,!0),10,1126891415),o=p(o,i,n,r,e.getUint32(56,!0),15,2878612391),r=p(r,o,i,n,e.getUint32(20,!0),21,4237533241),n=p(n,r,o,i,e.getUint32(48,!0),6,1700485571),i=p(i,n,r,o,e.getUint32(12,!0),10,2399980690),o=p(o,i,n,r,e.getUint32(40,!0),15,4293915773),r=p(r,o,i,n,e.getUint32(4,!0),21,2240044497),n=p(n,r,o,i,e.getUint32(32,!0),6,1873313359),i=p(i,n,r,o,e.getUint32(60,!0),10,4264355552),o=p(o,i,n,r,e.getUint32(24,!0),15,2734768916),r=p(r,o,i,n,e.getUint32(52,!0),21,1309151649),n=p(n,r,o,i,e.getUint32(16,!0),6,4149444226),i=p(i,n,r,o,e.getUint32(44,!0),10,3174756917),o=p(o,i,n,r,e.getUint32(8,!0),15,718787259),r=p(r,o,i,n,e.getUint32(36,!0),21,3951481745),t[0]=n+t[0]&4294967295,t[1]=r+t[1]&4294967295,t[2]=o+t[2]&4294967295,t[3]=i+t[3]&4294967295}},{"./browserHashUtils":11,"buffer/":85}],14:[function(e,t,n){var r=e("buffer/").Buffer,o=e("./browserHashUtils");function i(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),Math.pow(2,53),t.exports=i,i.BLOCK_SIZE=64,i.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(o.isEmptyData(e))return this;var t=(e=o.convertToBuffer(e)).length;this.totalLength+=8*t;for(var n=0;n14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var t=24;t>=0;t-=8)this.write(this.totalLength>>t);var n=new r(20),o=new DataView(n.buffer);return o.setUint32(0,this.h0,!1),o.setUint32(4,this.h1,!1),o.setUint32(8,this.h2,!1),o.setUint32(12,this.h3,!1),o.setUint32(16,this.h4,!1),e?n.toString(e):n},i.prototype.processBlock=function(){for(var e=16;e<80;e++){var t=this.block[e-3]^this.block[e-8]^this.block[e-14]^this.block[e-16];this.block[e]=t<<1|t>>>31}var n,r,o=this.h0,i=this.h1,s=this.h2,a=this.h3,c=this.h4;for(e=0;e<80;e++){e<20?(n=a^i&(s^a),r=1518500249):e<40?(n=i^s^a,r=1859775393):e<60?(n=i&s|a&(i|s),r=2400959708):(n=i^s^a,r=3395469782);var u=(o<<5|o>>>27)+n+c+r+(0|this.block[e]);c=a,a=s,s=i<<30|i>>>2,i=o,o=u}for(this.h0=this.h0+o|0,this.h1=this.h1+i|0,this.h2=this.h2+s|0,this.h3=this.h3+a|0,this.h4=this.h4+c|0,this.offset=0,e=0;e<16;e++)this.block[e]=0}},{"./browserHashUtils":11,"buffer/":85}],15:[function(e,t,n){var r=e("buffer/").Buffer,o=e("./browserHashUtils"),i=64,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=Math.pow(2,53)-1;function c(){this.state=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}t.exports=c,c.BLOCK_SIZE=i,c.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(o.isEmptyData(e))return this;var t=0,n=(e=o.convertToBuffer(e)).byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>a)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===i&&(this.hashBuffer(),this.bufferLength=0);return this},c.prototype.digest=function(e){if(!this.finished){var t=8*this.bytesHashed,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),o=this.bufferLength;if(n.setUint8(this.bufferLength++,128),o%i>=56){for(var s=this.bufferLength;s>>24&255,a[4*s+1]=this.state[s]>>>16&255,a[4*s+2]=this.state[s]>>>8&255,a[4*s+3]=this.state[s]>>>0&255;return e?a.toString(e):a},c.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],o=t[2],a=t[3],c=t[4],u=t[5],l=t[6],p=t[7],d=0;d>>17|h<<15)^(h>>>19|h<<13)^h>>>10,g=((h=this.temp[d-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[d]=(f+this.temp[d-7]|0)+(g+this.temp[d-16]|0)}var m=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&l)|0)+(p+(s[d]+this.temp[d]|0)|0)|0,v=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&o^r&o)|0;p=l,l=u,u=c,c=a+m|0,a=o,o=r,r=n,n=m+v|0}t[0]+=n,t[1]+=r,t[2]+=o,t[3]+=a,t[4]+=c,t[5]+=u,t[6]+=l,t[7]+=p}},{"./browserHashUtils":11,"buffer/":85}],16:[function(e,t,n){(function(n){(function(){var n=e("./util");n.crypto.lib=e("./browserCryptoLib"),n.Buffer=e("buffer/").Buffer,n.url=e("url/"),n.querystring=e("querystring/"),n.realClock=e("./realclock/browserClock"),n.environment="js",n.createEventStream=e("./event-stream/buffered-create-event-stream").createEventStream,n.isBrowser=function(){return!0},n.isNode=function(){return!1};var r=e("./core");if(t.exports=r,e("./credentials"),e("./credentials/credential_provider_chain"),e("./credentials/temporary_credentials"),e("./credentials/chainable_temporary_credentials"),e("./credentials/web_identity_credentials"),e("./credentials/cognito_identity_credentials"),e("./credentials/saml_credentials"),r.XML.Parser=e("./xml/browser_parser"),e("./http/xhr"),void 0===o)var o={browser:!0}}).call(this)}).call(this,e("_process"))},{"./browserCryptoLib":10,"./core":19,"./credentials":20,"./credentials/chainable_temporary_credentials":21,"./credentials/cognito_identity_credentials":22,"./credentials/credential_provider_chain":23,"./credentials/saml_credentials":24,"./credentials/temporary_credentials":25,"./credentials/web_identity_credentials":26,"./event-stream/buffered-create-event-stream":28,"./http/xhr":36,"./realclock/browserClock":53,"./util":72,"./xml/browser_parser":73,_process:90,"buffer/":85,"querystring/":96,"url/":98}],17:[function(e,t,n){var r,o=e("./core");e("./credentials"),e("./credentials/credential_provider_chain"),o.Config=o.util.inherit({constructor:function(e){void 0===e&&(e={}),e=this.extractCredentials(e),o.util.each.call(this,this.keys,(function(t,n){this.set(t,e[t],n)}))},getCredentials:function(e){var t,n=this;function r(t){e(t,t?null:n.credentials)}function i(e,t){return new o.util.error(t||new Error,{code:"CredentialsError",message:e,name:"CredentialsError"})}n.credentials?"function"==typeof n.credentials.get?n.credentials.get((function(e){e&&(e=i("Could not load credentials from "+n.credentials.constructor.name,e)),r(e)})):(t=null,n.credentials.accessKeyId&&n.credentials.secretAccessKey||(t=i("Missing credentials")),r(t)):n.credentialProvider?n.credentialProvider.resolve((function(e,t){e&&(e=i("Could not load credentials from any providers",e)),n.credentials=t,r(e)})):r(i("No credentials to load"))},update:function(e,t){t=t||!1,e=this.extractCredentials(e),o.util.each.call(this,e,(function(e,n){(t||Object.prototype.hasOwnProperty.call(this.keys,e)||o.Service.hasService(e))&&this.set(e,n)}))},loadFromPath:function(e){this.clear();var t=JSON.parse(o.util.readFileSync(e)),n=new o.FileSystemCredentials(e),r=new o.CredentialProviderChain;return r.providers.unshift(n),r.resolve((function(e,n){if(e)throw e;t.credentials=n})),this.constructor(t),this},clear:function(){o.util.each.call(this,this.keys,(function(e){delete this[e]})),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,t,n){void 0===t?(void 0===n&&(n=this.keys[e]),this[e]="function"==typeof n?n.call(this):n):"httpOptions"===e&&this[e]?this[e]=o.util.merge(this[e],t):this[e]=t},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,s3UsEast1RegionalEndpoint:"legacy",s3UseArnRegion:void 0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{},useAccelerateEndpoint:!1,clientSideMonitoring:!1,endpointDiscoveryEnabled:void 0,endpointCacheSize:1e3,hostPrefixEnabled:!0,stsRegionalEndpoints:"legacy",useFipsEndpoint:!1,useDualstackEndpoint:!1},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&((e=o.util.copy(e)).credentials=new o.Credentials(e)),e},setPromisesDependency:function(e){r=e,null===e&&"function"==typeof Promise&&(r=Promise);var t=[o.Request,o.Credentials,o.CredentialProviderChain];o.S3&&(t.push(o.S3),o.S3.ManagedUpload&&t.push(o.S3.ManagedUpload)),o.util.addPromises(t,r)},getPromisesDependency:function(){return r}}),o.config=new o.Config},{"./core":19,"./credentials":20,"./credentials/credential_provider_chain":23}],18:[function(e,t,n){(function(n){(function(){var r=e("./core");function o(e,t){if("string"==typeof e){if(["legacy","regional"].indexOf(e.toLowerCase())>=0)return e.toLowerCase();throw r.util.error(new Error,t)}}t.exports=function(e,t){var i;if((e=e||{})[t.clientConfig]&&(i=o(e[t.clientConfig],{code:"InvalidConfiguration",message:'invalid "'+t.clientConfig+'" configuration. Expect "legacy" or "regional". Got "'+e[t.clientConfig]+'".'})))return i;if(!r.util.isNode())return i;if(Object.prototype.hasOwnProperty.call(n.env,t.env)&&(i=o(n.env[t.env],{code:"InvalidEnvironmentalVariable",message:"invalid "+t.env+' environmental variable. Expect "legacy" or "regional". Got "'+n.env[t.env]+'".'})))return i;var s={};try{s=r.util.getProfilesFromSharedConfig(r.util.iniLoader)[n.env.AWS_PROFILE||r.util.defaultProfile]}catch(e){}return s&&Object.prototype.hasOwnProperty.call(s,t.sharedConfig)&&(i=o(s[t.sharedConfig],{code:"InvalidConfiguration",message:"invalid "+t.sharedConfig+' profile config. Expect "legacy" or "regional". Got "'+s[t.sharedConfig]+'".'})),i}}).call(this)}).call(this,e("_process"))},{"./core":19,_process:90}],19:[function(e,t,n){var r={util:e("./util")};({}).toString(),t.exports=r,r.util.update(r,{VERSION:"2.1200.0",Signers:{},Protocol:{Json:e("./protocol/json"),Query:e("./protocol/query"),Rest:e("./protocol/rest"),RestJson:e("./protocol/rest_json"),RestXml:e("./protocol/rest_xml")},XML:{Builder:e("./xml/builder"),Parser:null},JSON:{Builder:e("./json/builder"),Parser:e("./json/parser")},Model:{Api:e("./model/api"),Operation:e("./model/operation"),Shape:e("./model/shape"),Paginator:e("./model/paginator"),ResourceWaiter:e("./model/resource_waiter")},apiLoader:e("./api_loader"),EndpointCache:e("../vendor/endpoint-cache").EndpointCache}),e("./sequential_executor"),e("./service"),e("./config"),e("./http"),e("./event_listeners"),e("./request"),e("./response"),e("./resource_waiter"),e("./signers/request_signer"),e("./param_validator"),r.events=new r.SequentialExecutor,r.util.memoizedProperty(r,"endpointCache",(function(){return new r.EndpointCache(r.config.endpointCacheSize)}),!0)},{"../vendor/endpoint-cache":109,"./api_loader":9,"./config":17,"./event_listeners":34,"./http":35,"./json/builder":37,"./json/parser":38,"./model/api":39,"./model/operation":41,"./model/paginator":42,"./model/resource_waiter":43,"./model/shape":44,"./param_validator":45,"./protocol/json":47,"./protocol/query":48,"./protocol/rest":49,"./protocol/rest_json":50,"./protocol/rest_xml":51,"./request":57,"./resource_waiter":58,"./response":59,"./sequential_executor":60,"./service":61,"./signers/request_signer":64,"./util":72,"./xml/builder":74}],20:[function(e,t,n){var r=e("./core");r.Credentials=r.util.inherit({constructor:function(){if(r.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,this.refreshCallbacks=[],1===arguments.length&&"object"==typeof arguments[0]){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=r.util.date.getDate().getTime(),t=new Date(e+1e3*this.expiryWindow);return!!(this.expireTime&&t>this.expireTime)||this.expired||!this.accessKeyId||!this.secretAccessKey},get:function(e){var t=this;this.needsRefresh()?this.refresh((function(n){n||(t.expired=!1),e&&e(n)})):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(e,t){var n=this;1===n.refreshCallbacks.push(e)&&n.load((function(e){r.util.arrayEach(n.refreshCallbacks,(function(n){t?n(e):r.util.defer((function(){n(e)}))})),n.refreshCallbacks.length=0}))},load:function(e){e()}}),r.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=r.util.promisifyMethod("get",e),this.prototype.refreshPromise=r.util.promisifyMethod("refresh",e)},r.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},r.util.addPromises(r.Credentials)},{"./core":19}],21:[function(e,t,n){var r=e("../core"),o=e("../../clients/sts");r.ChainableTemporaryCredentials=r.util.inherit(r.Credentials,{constructor:function(e){r.Credentials.call(this),e=e||{},this.errorCode="ChainableTemporaryCredentialsProviderFailure",this.expired=!0,this.tokenCodeFn=null;var t=r.util.copy(e.params)||{};if(t.RoleArn&&(t.RoleSessionName=t.RoleSessionName||"temporary-credentials"),t.SerialNumber){if(!e.tokenCodeFn||"function"!=typeof e.tokenCodeFn)throw new r.util.error(new Error("tokenCodeFn must be a function when params.SerialNumber is given"),{code:this.errorCode});this.tokenCodeFn=e.tokenCodeFn}var n=r.util.merge({params:t,credentials:e.masterCredentials||r.config.credentials},e.stsConfig||{});this.service=new o(n)},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this,n=t.service.config.params.RoleArn?"assumeRole":"getSessionToken";this.getTokenCode((function(r,o){var i={};r?e(r):(o&&(i.TokenCode=o),t.service[n](i,(function(n,r){n||t.service.credentialsFrom(r,t),e(n)})))}))},getTokenCode:function(e){var t=this;this.tokenCodeFn?this.tokenCodeFn(this.service.config.params.SerialNumber,(function(n,o){if(n){var i=n;return n instanceof Error&&(i=n.message),void e(r.util.error(new Error("Error fetching MFA token: "+i),{code:t.errorCode}))}e(null,o)})):e(null)}})},{"../../clients/sts":8,"../core":19}],22:[function(e,t,n){var r=e("../core"),o=e("../../clients/cognitoidentity"),i=e("../../clients/sts");r.CognitoIdentityCredentials=r.util.inherit(r.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e,t){r.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this._identityId=null,this._clientConfig=r.util.copy(t||{}),this.loadCachedId();var n=this;Object.defineProperty(this,"identityId",{get:function(){return n.loadCachedId(),n._identityId||n.params.IdentityId},set:function(e){n._identityId=e}})},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.data=null,t._identityId=null,t.getId((function(n){n?(t.clearIdOnNotAuthorized(n),e(n)):t.params.RoleArn?t.getCredentialsFromSTS(e):t.getCredentialsForIdentity(e)}))},clearCachedId:function(){this._identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId,t=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+e+t],delete this.storage[this.localStorageKey.providers+e+t]},clearIdOnNotAuthorized:function(e){"NotAuthorizedException"==e.code&&this.clearCachedId()},getId:function(e){var t=this;if("string"==typeof t.params.IdentityId)return e(null,t.params.IdentityId);t.cognito.getId((function(n,r){!n&&r.IdentityId?(t.params.IdentityId=r.IdentityId,e(null,r.IdentityId)):e(n)}))},loadCredentials:function(e,t){e&&t&&(t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(e){var t=this;t.cognito.getCredentialsForIdentity((function(n,r){n?t.clearIdOnNotAuthorized(n):(t.cacheId(r),t.data=r,t.loadCredentials(t.data,t)),e(n)}))},getCredentialsFromSTS:function(e){var t=this;t.cognito.getOpenIdToken((function(n,r){n?(t.clearIdOnNotAuthorized(n),e(n)):(t.cacheId(r),t.params.WebIdentityToken=r.Token,t.webIdentityCredentials.refresh((function(n){n||(t.data=t.webIdentityCredentials.data,t.sts.credentialsFrom(t.data,t)),e(n)})))}))},loadCachedId:function(){var e=this;if(r.util.isBrowser()&&!e.params.IdentityId){var t=e.getStorage("id");if(t&&e.params.Logins){var n=Object.keys(e.params.Logins);0!==(e.getStorage("providers")||"").split(",").filter((function(e){return-1!==n.indexOf(e)})).length&&(e.params.IdentityId=t)}else t&&(e.params.IdentityId=t)}},createClients:function(){var e=this._clientConfig;if(this.webIdentityCredentials=this.webIdentityCredentials||new r.WebIdentityCredentials(this.params,e),!this.cognito){var t=r.util.merge({},e);t.params=this.params,this.cognito=new o(t)}this.sts=this.sts||new i(e)},cacheId:function(e){this._identityId=e.IdentityId,this.params.IdentityId=this._identityId,r.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(e,t){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]=t}catch(e){}},storage:function(){try{var e=r.util.isBrowser()&&null!==window.localStorage&&"object"==typeof window.localStorage?window.localStorage:{};return e["aws.test-storage"]="foobar",delete e["aws.test-storage"],e}catch(e){return{}}}()})},{"../../clients/cognitoidentity":7,"../../clients/sts":8,"../core":19}],23:[function(e,t,n){var r=e("../core");r.CredentialProviderChain=r.util.inherit(r.Credentials,{constructor:function(e){this.providers=e||r.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){var t=this;if(0===t.providers.length)return e(new Error("No providers")),t;if(1===t.resolveCallbacks.push(e)){var n=0,o=t.providers.slice(0);!function e(i,s){if(!i&&s||n===o.length)return r.util.arrayEach(t.resolveCallbacks,(function(e){e(i,s)})),void(t.resolveCallbacks.length=0);var a=o[n++];(s="function"==typeof a?a.call():a).get?s.get((function(t){e(t,t?null:s)})):e(null,s)}()}return t}}),r.CredentialProviderChain.defaultProviders=[],r.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=r.util.promisifyMethod("resolve",e)},r.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},r.util.addPromises(r.CredentialProviderChain)},{"../core":19}],24:[function(e,t,n){var r=e("../core"),o=e("../../clients/sts");r.SAMLCredentials=r.util.inherit(r.Credentials,{constructor:function(e){r.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithSAML((function(n,r){n||t.service.credentialsFrom(r,t),e(n)}))},createClients:function(){this.service=this.service||new o({params:this.params})}})},{"../../clients/sts":8,"../core":19}],25:[function(e,t,n){var r=e("../core"),o=e("../../clients/sts");r.TemporaryCredentials=r.util.inherit(r.Credentials,{constructor:function(e,t){r.Credentials.call(this),this.loadMasterCredentials(t),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.masterCredentials.get((function(){t.service.config.credentials=t.masterCredentials,(t.params.RoleArn?t.service.assumeRole:t.service.getSessionToken).call(t.service,(function(n,r){n||t.service.credentialsFrom(r,t),e(n)}))}))},loadMasterCredentials:function(e){for(this.masterCredentials=e||r.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;"function"!=typeof this.masterCredentials.get&&(this.masterCredentials=new r.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new o({params:this.params})}})},{"../../clients/sts":8,"../core":19}],26:[function(e,t,n){var r=e("../core"),o=e("../../clients/sts");r.WebIdentityCredentials=r.util.inherit(r.Credentials,{constructor:function(e,t){r.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=r.util.copy(t||{})},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithWebIdentity((function(n,r){t.data=null,n||(t.data=r,t.service.credentialsFrom(r,t)),e(n)}))},createClients:function(){if(!this.service){var e=r.util.merge({},this._clientConfig);e.params=this.params,this.service=new o(e)}}})},{"../../clients/sts":8,"../core":19}],27:[function(e,t,n){(function(n){(function(){var r=e("./core"),o=e("./util"),i=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"];function s(e){var t=e.service,n=t.api||{},r=(n.operations,{});return t.config.region&&(r.region=t.config.region),n.serviceId&&(r.serviceId=n.serviceId),t.config.credentials.accessKeyId&&(r.accessKeyId=t.config.credentials.accessKeyId),r}function a(e,t,n){n&&null!=t&&"structure"===n.type&&n.required&&n.required.length>0&&o.arrayEach(n.required,(function(r){var o=n.members[r];if(!0===o.endpointDiscoveryId){var i=o.isLocationName?o.name:r;e[i]=String(t[r])}else a(e,t[r],o)}))}function c(e,t){var n={};return a(n,e.params,t),n}function u(e){var t=e.service,n=t.api,i=n.operations?n.operations[e.operation]:void 0,a=c(e,i?i.input:void 0),u=s(e);Object.keys(a).length>0&&(u=o.update(u,a),i&&(u.operation=i.name));var l=r.endpointCache.get(u);if(!l||1!==l.length||""!==l[0].Address)if(l&&l.length>0)e.httpRequest.updateEndpoint(l[0].Address);else{var p=t.makeRequest(n.endpointOperation,{Operation:i.name,Identifiers:a});d(p),p.removeListener("validate",r.EventListeners.Core.VALIDATE_PARAMETERS),p.removeListener("retry",r.EventListeners.Core.RETRY_CHECK),r.endpointCache.put(u,[{Address:"",CachePeriodInMinutes:1}]),p.send((function(e,t){t&&t.Endpoints?r.endpointCache.put(u,t.Endpoints):e&&r.endpointCache.put(u,[{Address:"",CachePeriodInMinutes:1}])}))}}var l={};function p(e,t){var n=e.service,i=n.api,a=i.operations?i.operations[e.operation]:void 0,u=a?a.input:void 0,p=c(e,u),h=s(e);Object.keys(p).length>0&&(h=o.update(h,p),a&&(h.operation=a.name));var f=r.EndpointCache.getKeyString(h),g=r.endpointCache.get(f);if(g&&1===g.length&&""===g[0].Address)return l[f]||(l[f]=[]),void l[f].push({request:e,callback:t});if(g&&g.length>0)e.httpRequest.updateEndpoint(g[0].Address),t();else{var m=n.makeRequest(i.endpointOperation,{Operation:a.name,Identifiers:p});m.removeListener("validate",r.EventListeners.Core.VALIDATE_PARAMETERS),d(m),r.endpointCache.put(f,[{Address:"",CachePeriodInMinutes:60}]),m.send((function(n,i){if(n){if(e.response.error=o.error(n,{retryable:!1}),r.endpointCache.remove(h),l[f]){var s=l[f];o.arrayEach(s,(function(e){e.request.response.error=o.error(n,{retryable:!1}),e.callback()})),delete l[f]}}else i&&(r.endpointCache.put(f,i.Endpoints),e.httpRequest.updateEndpoint(i.Endpoints[0].Address),l[f])&&(s=l[f],o.arrayEach(s,(function(e){e.request.httpRequest.updateEndpoint(i.Endpoints[0].Address),e.callback()})),delete l[f]);t()}))}}function d(e){var t=e.service.api.apiVersion;t&&!e.httpRequest.headers["x-amz-api-version"]&&(e.httpRequest.headers["x-amz-api-version"]=t)}function h(e){var t=e.error,n=e.httpResponse;if(t&&("InvalidEndpointException"===t.code||421===n.statusCode)){var i=e.request,a=i.service.api.operations||{},u=c(i,a[i.operation]?a[i.operation].input:void 0),l=s(i);Object.keys(u).length>0&&(l=o.update(l,u),a[i.operation]&&(l.operation=a[i.operation].name)),r.endpointCache.remove(l)}}function f(e){return["false","0"].indexOf(e)>=0}t.exports={discoverEndpoint:function(e,t){var s=e.service||{};if(function(e){if(e._originalConfig&&e._originalConfig.endpoint&&!0===e._originalConfig.endpointDiscoveryEnabled)throw o.error(new Error,{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var t=r.config[e.serviceIdentifier]||{};return Boolean(r.config.endpoint||t.endpoint||e._originalConfig&&e._originalConfig.endpoint)}(s)||e.isPresigned())return t();var a=(s.api.operations||{})[e.operation],c=a?a.endpointDiscoveryRequired:"NULL",l=function(e){var t=e.service||{};if(void 0!==t.config.endpointDiscoveryEnabled)return t.config.endpointDiscoveryEnabled;if(!o.isBrowser()){for(var s=0;s-1&&(e[t]++,0===e[t]);t--);}i.fromNumber=function(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&s(t),new i(t)},i.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&s(e),parseInt(e.toString("hex"),16)*(t?-1:1)},i.prototype.toString=function(){return String(this.valueOf())},t.exports={Int64:i}},{"../core":19}],31:[function(e,t,n){var r=e("./parse-message").parseMessage;t.exports={parseEvent:function(e,t,n){var o=r(t),i=o.headers[":message-type"];if(i){if("error"===i.value)throw function(e){var t=e.headers[":error-code"],n=e.headers[":error-message"],r=new Error(n.value||n);return r.code=r.name=t.value||t,r}(o);if("event"!==i.value)return}var s=o.headers[":event-type"],a=n.members[s.value];if(a){var c={},u=a.eventPayloadMemberName;if(u){var l=a.members[u];"binary"===l.type?c[u]=o.body:c[u]=e.parse(o.body.toString(),l)}for(var p=a.eventHeaderMemberNames,d=0;d=0)return e.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",t();n.util.computeSha256(i,(function(n,r){n?t(n):(e.httpRequest.headers["X-Amz-Content-Sha256"]=r,t())}))}else t()}})),e("SET_CONTENT_LENGTH","afterBuild",(function(e){var t=function(e){if(!e.service.api.operations)return"";var t=e.service.api.operations[e.operation];return t?t.authtype:""}(e),r=n.util.getRequestPayloadShape(e);if(void 0===e.httpRequest.headers["Content-Length"])try{var o=n.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=o}catch(n){if(r&&r.isStreaming){if(r.requiresLength)throw n;if(t.indexOf("unsigned-body")>=0)return void(e.httpRequest.headers["Transfer-Encoding"]="chunked");throw n}throw n}})),e("SET_HTTP_HOST","afterBuild",(function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host})),e("SET_TRACE_ID","afterBuild",(function(e){var r="X-Amzn-Trace-Id";if(n.util.isNode()&&!Object.hasOwnProperty.call(e.httpRequest.headers,r)){var o=t.env.AWS_LAMBDA_FUNCTION_NAME,i=t.env._X_AMZN_TRACE_ID;"string"==typeof o&&o.length>0&&"string"==typeof i&&i.length>0&&(e.httpRequest.headers[r]=i)}})),e("RESTART","restart",(function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new n.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount=600?this.emit("sign",[this],(function(e){e?t(e):i()})):i()})),e("HTTP_HEADERS","httpHeaders",(function(e,t,r,o){r.httpResponse.statusCode=e,r.httpResponse.statusMessage=o,r.httpResponse.headers=t,r.httpResponse.body=n.util.buffer.toBuffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var i=t.date||t.Date,s=r.request.service;if(i){var a=Date.parse(i);s.config.correctClockSkew&&s.isClockSkewed(a)&&s.applyClockOffset(a)}})),e("HTTP_DATA","httpData",(function(e,t){if(e){if(n.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],o={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[o,t])}t.httpResponse.buffers.push(n.util.buffer.toBuffer(e))}})),e("HTTP_DONE","httpDone",(function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=n.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers})),e("FINALIZE_ERROR","retry",(function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))})),e("INVALIDATE_CREDENTIALS","retry",(function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}})),e("EXPIRED_SIGNATURE","retry",(function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)})),e("CLOCK_SKEWED","retry",(function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&(e.error.retryable=!0)})),e("REDIRECT","retry",(function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new n.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)})),e("RETRY_CHECK","retry",(function(e){e.error&&(e.error.redirect&&e.redirectCount=0?(e.error=null,setTimeout(t,n)):t()}))})),CorePost:(new r).addNamedListeners((function(e){e("EXTRACT_REQUEST_ID","extractData",n.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",n.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",(function(e){if("NetworkingError"===e.code&&function(e){return"ENOTFOUND"===e.errno||"number"==typeof e.errno&&"function"==typeof n.util.getSystemErrorName&&["EAI_NONAME","EAI_NODATA"].indexOf(n.util.getSystemErrorName(e.errno)>=0)}(e)){var t="Inaccessible host: `"+e.hostname+"' at port `"+e.port+"'. This service may not be available in the `"+e.region+"' region.";this.response.error=n.util.error(new Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}}))})),Logger:(new r).addNamedListeners((function(t){t("LOG_REQUEST","complete",(function(t){var r=t.request,o=r.service.config.logger;if(o){var i=function(){var i=(t.request.service.getSkewCorrectedDate().getTime()-r.startTime.getTime())/1e3,a=!!o.isTTY,c=t.httpResponse.statusCode,u=r.params;r.service.api.operations&&r.service.api.operations[r.operation]&&r.service.api.operations[r.operation].input&&(u=s(r.service.api.operations[r.operation].input,r.params));var l=e("util").inspect(u,!0,null),p="";return a&&(p+=""),p+="[AWS "+r.service.serviceIdentifier+" "+c,p+=" "+i.toString()+"s "+t.retryCount+" retries]",a&&(p+=""),p+=" "+n.util.string.lowerFirst(r.operation),p+="("+l+")",a&&(p+=""),p}();"function"==typeof o.log?o.log(i):"function"==typeof o.write&&o.write(i+"\n")}function s(e,t){if(!t)return t;if(e.isSensitive)return"***SensitiveInformation***";switch(e.type){case"structure":var r={};return n.util.each(t,(function(t,n){Object.prototype.hasOwnProperty.call(e.members,t)?r[t]=s(e.members[t],n):r[t]=n})),r;case"list":var o=[];return n.util.arrayEach(t,(function(t,n){o.push(s(e.member,t))})),o;case"map":var i={};return n.util.each(t,(function(t,n){i[t]=s(e.value,n)})),i;default:return t}}}))})),Json:(new r).addNamedListeners((function(t){var n=e("./protocol/json");t("BUILD","build",n.buildRequest),t("EXTRACT_DATA","extractData",n.extractData),t("EXTRACT_ERROR","extractError",n.extractError)})),Rest:(new r).addNamedListeners((function(t){var n=e("./protocol/rest");t("BUILD","build",n.buildRequest),t("EXTRACT_DATA","extractData",n.extractData),t("EXTRACT_ERROR","extractError",n.extractError)})),RestJson:(new r).addNamedListeners((function(t){var n=e("./protocol/rest_json");t("BUILD","build",n.buildRequest),t("EXTRACT_DATA","extractData",n.extractData),t("EXTRACT_ERROR","extractError",n.extractError)})),RestXml:(new r).addNamedListeners((function(t){var n=e("./protocol/rest_xml");t("BUILD","build",n.buildRequest),t("EXTRACT_DATA","extractData",n.extractData),t("EXTRACT_ERROR","extractError",n.extractError)})),Query:(new r).addNamedListeners((function(t){var n=e("./protocol/query");t("BUILD","build",n.buildRequest),t("EXTRACT_DATA","extractData",n.extractData),t("EXTRACT_ERROR","extractError",n.extractError)}))}}).call(this)}).call(this,e("_process"))},{"./core":19,"./discover_endpoint":27,"./protocol/json":47,"./protocol/query":48,"./protocol/rest":49,"./protocol/rest_json":50,"./protocol/rest_xml":51,"./sequential_executor":60,_process:90,util:84}],35:[function(e,t,n){var r=e("./core"),o=r.util.inherit;r.Endpoint=o({constructor:function(e,t){if(r.util.hideProperties(this,["slashes","auth","hash","search","query"]),null==e)throw new Error("Invalid endpoint: "+e);if("string"!=typeof e)return r.util.copy(e);e.match(/^http/)||(e=((t&&void 0!==t.sslEnabled?t.sslEnabled:r.config.sslEnabled)?"https":"http")+"://"+e),r.util.update(this,r.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),r.HttpRequest=o({constructor:function(e,t){e=new r.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=t,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=r.util.userAgent()},getUserAgentHeaderName:function(){return(r.util.isBrowser()?"X-Amz-":"")+"User-Agent"},appendToUserAgent:function(e){"string"==typeof e&&e&&(this._userAgent+=" "+e),this.headers[this.getUserAgentHeaderName()]=this._userAgent},getUserAgent:function(){return this._userAgent},pathname:function(){return this.path.split("?",1)[0]},search:function(){var e=this.path.split("?",2)[1];return e?(e=r.util.queryStringParse(e),r.util.queryParamsToString(e)):""},updateEndpoint:function(e){var t=new r.Endpoint(e);this.endpoint=t,this.path=t.path||"/",this.headers.Host&&(this.headers.Host=t.host)}}),r.HttpResponse=o({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}}),r.HttpClient=o({}),r.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}},{"./core":19}],36:[function(e,t,n){var r=e("../core"),o=e("events").EventEmitter;e("../http"),r.XHRClient=r.util.inherit({handleRequest:function(e,t,n,i){var s=this,a=e.endpoint,c=new o,u=a.protocol+"//"+a.hostname;80!==a.port&&443!==a.port&&(u+=":"+a.port),u+=e.path;var l=new XMLHttpRequest,p=!1;e.stream=l,l.addEventListener("readystatechange",(function(){try{if(0===l.status)return}catch(e){return}this.readyState>=this.HEADERS_RECEIVED&&!p&&(c.statusCode=l.status,c.headers=s.parseHeaders(l.getAllResponseHeaders()),c.emit("headers",c.statusCode,c.headers,l.statusText),p=!0),this.readyState===this.DONE&&s.finishRequest(l,c)}),!1),l.upload.addEventListener("progress",(function(e){c.emit("sendProgress",e)})),l.addEventListener("progress",(function(e){c.emit("receiveProgress",e)}),!1),l.addEventListener("timeout",(function(){i(r.util.error(new Error("Timeout"),{code:"TimeoutError"}))}),!1),l.addEventListener("error",(function(){i(r.util.error(new Error("Network Failure"),{code:"NetworkingError"}))}),!1),l.addEventListener("abort",(function(){i(r.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))}),!1),n(c),l.open(e.method,u,!1!==t.xhrAsync),r.util.each(e.headers,(function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&l.setRequestHeader(e,t)})),t.timeout&&!1!==t.xhrAsync&&(l.timeout=t.timeout),t.xhrWithCredentials&&(l.withCredentials=!0);try{l.responseType="arraybuffer"}catch(e){}try{e.body?l.send(e.body):l.send()}catch(t){if(!e.body||"object"!=typeof e.body.buffer)throw t;l.send(e.body.buffer)}return c},parseHeaders:function(e){var t={};return r.util.arrayEach(e.split(/\r?\n/),(function(e){var n=e.split(":",1)[0],r=e.substring(n.length+2);n.length>0&&(t[n.toLowerCase()]=r)})),t},finishRequest:function(e,t){var n;if("arraybuffer"===e.responseType&&e.response){var o=e.response;n=new r.util.Buffer(o.byteLength);for(var i=new Uint8Array(o),s=0;s-1?t||"":t,this.isJsonValue?JSON.parse(t):t&&"function"==typeof t.toString?t.toString():t},this.toWireFormat=function(e){return this.isJsonValue?JSON.stringify(e):e}}function h(){a.apply(this,arguments),this.toType=function(e){var t=o.base64.decode(e);if(this.isSensitive&&o.isNode()&&"function"==typeof o.Buffer.alloc){var n=o.Buffer.alloc(t.length,t);t.fill(0),t=n}return t},this.toWireFormat=o.base64.encode}function f(){h.apply(this,arguments)}function g(){a.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null==e?null:"true"===e}}a.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},a.types={structure:u,list:l,map:p,boolean:g,timestamp:function(e){var t=this;if(a.apply(this,arguments),e.timestampFormat)i(this,"timestampFormat",e.timestampFormat);else if(t.isTimestampFormatSet&&this.timestampFormat)i(this,"timestampFormat",this.timestampFormat);else if("header"===this.location)i(this,"timestampFormat","rfc822");else if("querystring"===this.location)i(this,"timestampFormat","iso8601");else if(this.api)switch(this.api.protocol){case"json":case"rest-json":i(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":i(this,"timestampFormat","iso8601")}this.toType=function(e){return null==e?null:"function"==typeof e.toUTCString?e:"string"==typeof e||"number"==typeof e?o.date.parseTimestamp(e):null},this.toWireFormat=function(e){return o.date.format(e,t.timestampFormat)}},float:function(){a.apply(this,arguments),this.toType=function(e){return null==e?null:parseFloat(e)},this.toWireFormat=this.toType},integer:function(){a.apply(this,arguments),this.toType=function(e){return null==e?null:parseInt(e,10)},this.toWireFormat=this.toType},string:d,base64:f,binary:h},a.resolve=function(e,t){if(e.shape){var n=t.api.shapes[e.shape];if(!n)throw new Error("Cannot find shape reference: "+e.shape);return n}return null},a.create=function(e,t,n){if(e.isShape)return e;var r=a.resolve(e,t);if(r){var o=Object.keys(e);t.documentation||(o=o.filter((function(e){return!e.match(/documentation/)})));var i=function(){r.constructor.call(this,e,t,n)};return i.prototype=r,new i}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var s=e.type;if(a.normalizedTypes[e.type]&&(e.type=a.normalizedTypes[e.type]),a.types[e.type])return new a.types[e.type](e,t,n);throw new Error("Unrecognized shape type: "+s)},a.shapes={StructureShape:u,ListShape:l,MapShape:p,StringShape:d,BooleanShape:g,Base64Shape:f},t.exports=a},{"../util":72,"./collection":40}],45:[function(e,t,n){var r=e("./core");r.ParamValidator=r.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(e,t,n){if(this.errors=[],this.validateMember(e,t||{},n||"params"),this.errors.length>1){var o=this.errors.join("\n* ");throw o="There were "+this.errors.length+" validation errors:\n* "+o,r.util.error(new Error(o),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(e,t){this.errors.push(r.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,n){if(e.isDocument)return!0;var r;this.validateType(t,n,["object"],"structure");for(var o=0;e.required&&o= 1, but found "'+t+'" for '+n)},validatePattern:function(e,t,n){this.validation.pattern&&void 0!==e.pattern&&(new RegExp(e.pattern).test(t)||this.fail("PatternMatchError",'Provided value "'+t+'" does not match regex pattern /'+e.pattern+"/ for "+n))},validateRange:function(e,t,n,r){this.validation.min&&void 0!==e.min&&t= "+e.min+", but found "+t+" for "+n),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+r+" <= "+e.max+", but found "+t+" for "+n)},validateEnum:function(e,t,n){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+n)},validateType:function(e,t,n,o){if(null==e)return!1;for(var i=!1,s=0;s63)throw r.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!i.test(e))throw o.util.error(new Error,{code:"ValidationError",message:e+" is not hostname compatible."})}))}return e}}},{"../core":19,"../util":72}],47:[function(e,t,n){var r=e("../util"),o=e("../json/builder"),i=e("../json/parser"),s=e("./helpers").populateHostPrefix;t.exports={buildRequest:function(e){var t=e.httpRequest,n=e.service.api,r=n.targetPrefix+"."+n.operations[e.operation].name,i=n.jsonVersion||"1.0",a=n.operations[e.operation].input,c=new o;1===i&&(i="1.0"),t.body=c.build(e.params||{},a),t.headers["Content-Type"]="application/x-amz-json-"+i,t.headers["X-Amz-Target"]=r,s(e)},extractError:function(e){var t={},n=e.httpResponse;if(t.code=n.headers["x-amzn-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),n.body.length>0)try{var o=JSON.parse(n.body.toString()),i=o.__type||o.code||o.Code;i&&(t.code=i.split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=o.message||o.Message||null}catch(o){t.statusCode=n.statusCode,t.message=n.statusMessage}else t.statusCode=n.statusCode,t.message=n.statusCode.toString();e.error=r.error(new Error,t)},extractData:function(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var n=e.request.service.api.operations[e.request.operation].output||{},r=new i;e.data=r.parse(t,n)}}}},{"../json/builder":37,"../json/parser":38,"../util":72,"./helpers":46}],48:[function(e,t,n){var r=e("../core"),o=e("../util"),i=e("../query/query_param_serializer"),s=e("../model/shape"),a=e("./helpers").populateHostPrefix;t.exports={buildRequest:function(e){var t=e.service.api.operations[e.operation],n=e.httpRequest;n.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",n.params={Version:e.service.api.apiVersion,Action:t.name},(new i).serialize(e.params,t.input,(function(e,t){n.params[e]=t})),n.body=o.queryParamsToString(n.params),a(e)},extractError:function(e){var t,n=e.httpResponse.body.toString();if(n.match("=0?"&":"?";var c=[];r.arrayEach(Object.keys(s).sort(),(function(e){Array.isArray(s[e])||(s[e]=[s[e]]);for(var t=0;t0){var p=(t=new r.XML.Parser).parse(s.toString(),c);o.update(e.data,p)}}}},{"../core":19,"../util":72,"./rest":49}],52:[function(e,t,n){var r=e("../util");function o(){}function i(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function s(e,t,n,o){r.each(n.members,(function(n,r){var s=t[n];if(null!=s){var c=i(r);a(c=e?e+"."+c:c,s,r,o)}}))}function a(e,t,n,o){null!=t&&("structure"===n.type?s(e,t,n,o):"list"===n.type?function(e,t,n,o){var s=n.member||{};0!==t.length?r.arrayEach(t,(function(t,r){var c="."+(r+1);if("ec2"===n.api.protocol)c+="";else if(n.flattened){if(s.name){var u=e.split(".");u.pop(),u.push(i(s)),e=u.join(".")}}else c="."+(s.name?s.name:"member")+c;a(e+c,t,s,o)})):o.call(this,e,null)}(e,t,n,o):"map"===n.type?function(e,t,n,o){var i=1;r.each(t,(function(t,r){var s=(n.flattened?".":".entry.")+i+++".",c=s+(n.key.name||"key"),u=s+(n.value.name||"value");a(e+c,t,n.key,o),a(e+u,r,n.value,o)}))}(e,t,n,o):o(e,n.toWireFormat(t).toString()))}o.prototype.serialize=function(e,t,n){s("",e,t,n)},t.exports=o},{"../util":72}],53:[function(e,t,n){t.exports={now:function(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}}},{}],54:[function(e,t,n){t.exports={isFipsRegion:function(e){return"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},isGlobalRegion:function(e){return"string"==typeof e&&["aws-global","aws-us-gov-global"].includes(e)},getRealRegion:function(e){return["fips-aws-global","aws-fips","aws-global"].includes(e)?"us-east-1":["fips-aws-us-gov-global","aws-us-gov-global"].includes(e)?"us-gov-west-1":e.replace(/fips-(dkr-|prod-)?|-fips/,"")}}},{}],55:[function(e,t,n){var r=e("./util"),o=e("./region_config_data.json");function i(e,t){r.each(t,(function(t,n){"globalEndpoint"!==t&&(void 0!==e.config[t]&&null!==e.config[t]||(e.config[t]=n))}))}t.exports={configureEndpoint:function(e){for(var t=function(e){var t=e.config.region,n=function(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}(t),r=e.api.endpointPrefix;return[[t,r],[n,r],[t,"*"],[n,"*"],["*",r],["*","*"]].map((function(e){return e[0]&&e[1]?e.join("/"):null}))}(e),n=e.config.useFipsEndpoint,r=e.config.useDualstackEndpoint,s=0;s=0){c=!0;var u=0}var l=function(){c&&u!==a?o.emit("error",n.util.error(new Error("Stream content length mismatch. Received "+u+" of "+a+" bytes."),{code:"StreamContentLengthMismatch"})):2===n.HttpClient.streamsApiVersion?o.end():o.emit("end")},p=s.httpResponse.createUnbufferedStream();if(2===n.HttpClient.streamsApiVersion)if(c){var d=new e.PassThrough;d._write=function(t){return t&&t.length&&(u+=t.length),e.PassThrough.prototype._write.apply(this,arguments)},d.on("end",l),o.on("error",(function(e){c=!1,p.unpipe(d),d.emit("end"),d.end()})),p.pipe(d).pipe(o,{end:!1})}else p.pipe(o);else c&&p.on("data",(function(e){e&&e.length&&(u+=e.length)})),p.on("data",(function(e){o.emit("data",e)})),p.on("end",l);p.on("error",(function(e){c=!1,o.emit("error",e)}))}})),o},emitEvent:function(e,t,r){"function"==typeof t&&(r=t,t=null),r||(r=function(){}),t||(t=this.eventParameters(e,this.response)),n.SequentialExecutor.prototype.emit.call(this,e,t,(function(e){e&&(this.response.error=e),r.call(this,e)}))},eventParameters:function(e){switch(e){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]}},presign:function(e,t){return t||"function"!=typeof e||(t=e,e=null),(new n.Signers.Presign).sign(this.toGet(),e,t)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",n.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",n.EventListeners.Core.SIGN),this},toGet:function(){return"query"!==this.service.api.protocol&&"ec2"!==this.service.api.protocol||(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),n.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return this.httpRequest.appendToUserAgent("promise"),new e((function(e,n){t.on("complete",(function(t){t.error?n(t.error):e(Object.defineProperty(t.data||{},"$response",{value:t}))})),t.runTo()}))}},n.Request.deletePromisesFromClass=function(){delete this.prototype.promise},n.util.addPromises(n.Request),n.util.mixin(n.Request,n.SequentialExecutor)}).call(this)}).call(this,e("_process"))},{"./core":19,"./state_machine":71,_process:90,jmespath:89}],58:[function(e,t,n){var r=e("./core"),o=r.util.inherit,i=e("jmespath");function s(e){var t=e.request._waiter,n=t.config.acceptors,r=!1,o="retry";n.forEach((function(n){if(!r){var i=t.matchers[n.matcher];i&&i(e,n.expected,n.argument)&&(r=!0,o=n.state)}})),!r&&e.error&&(o="failure"),"success"===o?t.setSuccess(e):t.setError(e,"retry"===o)}r.ResourceWaiter=o({constructor:function(e,t){this.service=e,this.state=t,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,n){try{var r=i.search(e.data,n)}catch(e){return!1}return i.strictDeepEqual(r,t)},pathAll:function(e,t,n){try{var r=i.search(e.data,n)}catch(e){return!1}Array.isArray(r)||(r=[r]);var o=r.length;if(!o)return!1;for(var s=0;s-1&&n.splice(o,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,n){n||(n=function(){});var r=this.listeners(e),o=r.length;return this.callListeners(r,t,n),o>0},callListeners:function(e,t,n,o){var i=this,s=o||null;function a(o){if(o&&(s=r.util.error(s||new Error,o),i._haltHandlersOnError))return n.call(i,s);i.callListeners(e,t,n,s)}for(;e.length>0;){var c=e.shift();if(c._isAsync)return void c.apply(i,t.concat([a]));try{c.apply(i,t)}catch(e){s=r.util.error(s||new Error,e)}if(s&&i._haltHandlersOnError)return void n.call(i,s)}n.call(i,s)},addListeners:function(e){var t=this;return e._events&&(e=e._events),r.util.each(e,(function(e,n){"function"==typeof n&&(n=[n]),r.util.arrayEach(n,(function(n){t.on(e,n)}))})),t},addNamedListener:function(e,t,n,r){return this[e]=n,this.addListener(t,n,r),this},addNamedAsyncListener:function(e,t,n,r){return n._isAsync=!0,this.addNamedListener(e,t,n,r)},addNamedListeners:function(e){var t=this;return e((function(){t.addNamedListener.apply(t,arguments)}),(function(){t.addNamedAsyncListener.apply(t,arguments)})),this}}),r.SequentialExecutor.prototype.addListener=r.SequentialExecutor.prototype.on,t.exports=r.SequentialExecutor},{"./core":19}],61:[function(e,t,n){(function(n){(function(){var r=e("./core"),o=e("./model/api"),i=e("./region_config"),s=r.util.inherit,a=0,c=e("./region/utils");r.Service=s({constructor:function(e){if(!this.loadServiceClass)throw r.util.error(new Error,"Service must be constructed with `new' operator");if(e){if(e.region){var t=e.region;c.isFipsRegion(t)&&(e.region=c.getRealRegion(t),e.useFipsEndpoint=!0),c.isGlobalRegion(t)&&(e.region=c.getRealRegion(t))}"boolean"==typeof e.useDualstack&&"boolean"!=typeof e.useDualstackEndpoint&&(e.useDualstackEndpoint=e.useDualstack)}var n=this.loadServiceClass(e||{});if(n){var o=r.util.copy(e),i=new n(e);return Object.defineProperty(i,"_originalConfig",{get:function(){return o},enumerable:!1,configurable:!0}),i._clientId=++a,i}this.initialize(e)},initialize:function(e){var t=r.config[this.serviceIdentifier];if(this.config=new r.Config(r.config),t&&this.config.update(t,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||i.configureEndpoint(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint),r.SequentialExecutor.call(this),r.Service.addDefaultMonitoringListeners(this),(this.config.clientSideMonitoring||r.Service._clientSideMonitoring)&&this.publisher){var o=this.publisher;this.addNamedListener("PUBLISH_API_CALL","apiCall",(function(e){n.nextTick((function(){o.eventHandler(e)}))})),this.addNamedListener("PUBLISH_API_ATTEMPT","apiCallAttempt",(function(e){n.nextTick((function(){o.eventHandler(e)}))}))}},validateService:function(){},loadServiceClass:function(e){var t=e;if(r.util.isEmpty(this.api)){if(t.apiConfig)return r.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){(t=new r.Config(r.config)).update(e,!0);var n=t.apiVersions[this.constructor.serviceIdentifier];return n=n||t.apiVersion,this.getLatestServiceClass(n)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&r.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e?r.util.isType(e,Date)&&(e=r.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(),n=null,o=t.length-1;o>=0;o--)if("*"!==t[o][t[o].length-1]&&(n=t[o]),t[o].substr(0,10)<=e)return n;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,customizeRequests:function(e){if(e){if("function"!=typeof e)throw new Error("Invalid callback type '"+typeof e+"' provided in customizeRequests");this.customRequestHandler=e}else this.customRequestHandler=null},makeRequest:function(e,t,n){if("function"==typeof t&&(n=t,t=null),t=t||{},this.config.params){var o=this.api.operations[e];o&&(t=r.util.copy(t),r.util.each(this.config.params,(function(e,n){o.input.members[e]&&(void 0!==t[e]&&null!==t[e]||(t[e]=n))})))}var i=new r.Request(this,e,t);return this.addAllRequestListeners(i),this.attachMonitoringEmitter(i),n&&i.send(n),i},makeUnauthenticatedRequest:function(e,t,n){"function"==typeof t&&(n=t,t={});var r=this.makeRequest(e,t).toUnauthenticated();return n?r.send(n):r},waitFor:function(e,t,n){return new r.ResourceWaiter(this,e).wait(t,n)},addAllRequestListeners:function(e){for(var t=[r.events,r.EventListeners.Core,this.serviceInterface(),r.EventListeners.CorePost],n=0;n299?(o.code&&(n.FinalAwsException=o.code),o.message&&(n.FinalAwsExceptionMessage=o.message)):((o.code||o.name)&&(n.FinalSdkException=o.code||o.name),o.message&&(n.FinalSdkExceptionMessage=o.message))}return n},apiAttemptEvent:function(e){var t=e.service.api.operations[e.operation],n={Type:"ApiCallAttempt",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Fqdn:e.httpRequest.endpoint.hostname,UserAgent:e.httpRequest.getUserAgent()},r=e.response;return r.httpResponse.statusCode&&(n.HttpStatusCode=r.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials&&e.service.config.credentials.accessKeyId&&(n.AccessKey=e.service.config.credentials.accessKeyId),r.httpResponse.headers?(e.httpRequest.headers["x-amz-security-token"]&&(n.SessionToken=e.httpRequest.headers["x-amz-security-token"]),r.httpResponse.headers["x-amzn-requestid"]&&(n.XAmznRequestId=r.httpResponse.headers["x-amzn-requestid"]),r.httpResponse.headers["x-amz-request-id"]&&(n.XAmzRequestId=r.httpResponse.headers["x-amz-request-id"]),r.httpResponse.headers["x-amz-id-2"]&&(n.XAmzId2=r.httpResponse.headers["x-amz-id-2"]),n):n},attemptFailEvent:function(e){var t=this.apiAttemptEvent(e),n=e.response,r=n.error;return n.httpResponse.statusCode>299?(r.code&&(t.AwsException=r.code),r.message&&(t.AwsExceptionMessage=r.message)):((r.code||r.name)&&(t.SdkException=r.code||r.name),r.message&&(t.SdkExceptionMessage=r.message)),t},attachMonitoringEmitter:function(e){var t,n,o,i,s,a,c=0,u=this;e.on("validate",(function(){i=r.util.realClock.now(),a=Date.now()}),!0),e.on("sign",(function(){n=r.util.realClock.now(),t=Date.now(),s=e.httpRequest.region,c++}),!0),e.on("validateResponse",(function(){o=Math.round(r.util.realClock.now()-n)})),e.addNamedListener("API_CALL_ATTEMPT","success",(function(){var n=u.apiAttemptEvent(e);n.Timestamp=t,n.AttemptLatency=o>=0?o:0,n.Region=s,u.emit("apiCallAttempt",[n])})),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",(function(){var i=u.attemptFailEvent(e);i.Timestamp=t,o=o||Math.round(r.util.realClock.now()-n),i.AttemptLatency=o>=0?o:0,i.Region=s,u.emit("apiCallAttempt",[i])})),e.addNamedListener("API_CALL","complete",(function(){var t=u.apiCallEvent(e);if(t.AttemptCount=c,!(t.AttemptCount<=0)){t.Timestamp=a;var n=Math.round(r.util.realClock.now()-i);t.Latency=n>=0?n:0;var o=e.response;o.error&&o.error.retryable&&"number"==typeof o.retryCount&&"number"==typeof o.maxRetries&&o.retryCount>=o.maxRetries&&(t.MaxRetriesExceeded=1),u.emit("apiCall",[t])}}))},setupRequestListeners:function(e){},getSigningName:function(){return this.api.signingName||this.api.endpointPrefix},getSignerClass:function(e){var t,n=null,o="";return e&&(o=(n=(e.service.api.operations||{})[e.operation]||null)?n.authtype:""),t=this.config.signatureVersion?this.config.signatureVersion:"v4"===o||"v4-unsigned-body"===o?"v4":this.api.signatureVersion,r.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return r.EventListeners.Query;case"json":return r.EventListeners.Json;case"rest-json":return r.EventListeners.RestJson;case"rest-xml":return r.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e,t){return r.util.calculateRetryDelay(e,this.config.retryDelayOptions,t)},retryableError:function(e){return!!this.timeoutError(e)||!!this.networkingError(e)||!!this.expiredCredentialsError(e)||!!this.throttledError(e)||e.statusCode>=500},networkingError:function(e){return"NetworkingError"===e.code},timeoutError:function(e){return"TimeoutError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(e){e&&(this.config.systemClockOffset=e-Date.now())},isClockSkewed:function(e){if(e)return Math.abs(this.getSkewCorrectedDate().getTime()-e)>=3e5},throttledError:function(e){if(429===e.statusCode)return!0;switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"RequestThrottledException":case"TooManyRequestsException":case"TransactionInProgressException":case"EC2ThrottledException":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return t=(t=(t=t.replace(/\{service\}/g,this.api.endpointPrefix)).replace(/\{region\}/g,this.config.region)).replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new r.Endpoint(e,this.config)},paginationConfig:function(e,t){var n=this.api.operations[e].paginator;if(!n){if(t){var o=new Error;throw r.util.error(o,"No pagination configuration for "+e)}return null}return n}}),r.util.update(r.Service,{defineMethods:function(e){r.util.each(e.prototype.api.operations,(function(t){e.prototype[t]||("none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,n){return this.makeUnauthenticatedRequest(t,e,n)}:e.prototype[t]=function(e,n){return this.makeRequest(t,e,n)})}))},defineService:function(e,t,n){r.Service._serviceMap[e]=!0,Array.isArray(t)||(n=t,t=[]);var o=s(r.Service,n||{});if("string"==typeof e){r.Service.addVersions(o,t);var i=o.serviceIdentifier||e;o.serviceIdentifier=i}else o.prototype.api=e,r.Service.defineMethods(o);if(r.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&r.util.clientSideMonitoring){var a=r.util.clientSideMonitoring.Publisher,c=(0,r.util.clientSideMonitoring.configProvider)();this.prototype.publisher=new a(c),c.enabled&&(r.Service._clientSideMonitoring=!0)}return r.SequentialExecutor.call(o.prototype),r.Service.addDefaultMonitoringListeners(o.prototype),o},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var n=0;n604800)throw r.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1});e.httpRequest.headers[i]=t}else{if(n!==r.Signers.S3)throw r.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});var o=e.service?e.service.getSkewCorrectedDate():r.util.date.getDate();e.httpRequest.headers[i]=parseInt(r.util.date.unixTimestamp(o)+t,10).toString()}}function a(e){var t=e.httpRequest.endpoint,n=r.util.urlParse(e.httpRequest.path),o={};n.search&&(o=r.util.queryStringParse(n.search.substr(1)));var s=e.httpRequest.headers.Authorization.split(" ");if("AWS"===s[0])s=s[1].split(":"),o.Signature=s.pop(),o.AWSAccessKeyId=s.join(":"),r.util.each(e.httpRequest.headers,(function(e,t){e===i&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete o[e],e=e.toLowerCase()),o[e]=t})),delete e.httpRequest.headers[i],delete o.Authorization,delete o.Host;else if("AWS4-HMAC-SHA256"===s[0]){s.shift();var a=s.join(" ").match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];o["X-Amz-Signature"]=a,delete o.Expires}t.pathname=n.pathname,t.search=r.util.queryParamsToString(o)}r.Signers.Presign=o({sign:function(e,t,n){if(e.httpRequest.headers[i]=t||3600,e.on("build",s),e.on("sign",a),e.removeListener("afterBuild",r.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",r.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!n){if(e.build(),e.response.error)throw e.response.error;return r.util.urlFormat(e.httpRequest.endpoint)}e.build((function(){this.response.error?n(this.response.error):n(null,r.util.urlFormat(e.httpRequest.endpoint))}))}}),t.exports=r.Signers.Presign},{"../core":19}],64:[function(e,t,n){var r=e("../core"),o=r.util.inherit;r.Signers.RequestSigner=o({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),r.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return r.Signers.V2;case"v3":return r.Signers.V3;case"s3v4":case"v4":return r.Signers.V4;case"s3":return r.Signers.S3;case"v3https":return r.Signers.V3Https}throw new Error("Unknown signing version "+e)},e("./v2"),e("./v3"),e("./v3https"),e("./v4"),e("./s3"),e("./presign")},{"../core":19,"./presign":63,"./s3":65,"./v2":66,"./v3":67,"./v3https":68,"./v4":69}],65:[function(e,t,n){var r=e("../core"),o=r.util.inherit;r.Signers.S3=o(r.Signers.RequestSigner,{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},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(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=r.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var n=this.sign(e.secretAccessKey,this.stringToSign()),o="AWS "+e.accessKeyId+":"+n;this.request.headers.Authorization=o},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var n=this.canonicalizedAmzHeaders();return n&&t.push(n),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];r.util.each(this.request.headers,(function(t){t.match(/^x-amz-/i)&&e.push(t)})),e.sort((function(e,t){return e.toLowerCase()=0?"&":"?";this.request.path+=i+r.util.queryParamsToString(o)},authorization:function(e,t){var n=[],r=this.credentialString(t);return n.push(this.algorithm+" Credential="+e.accessKeyId+"/"+r),n.push("SignedHeaders="+this.signedHeaders()),n.push("Signature="+this.signature(e,t)),n.join(", ")},signature:function(e,t){var n=o.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return r.util.crypto.hmac(n,this.stringToSign(t),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var e=[],t=this.request.pathname();return"s3"!==this.serviceName&&"s3v4"!==this.signatureVersion&&(t=r.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var e=[];r.util.each.call(this,this.request.headers,(function(t,n){e.push([t,n])})),e.sort((function(e,t){return e[0].toLowerCase()-1&&!e.body?"UNSIGNED-PAYLOAD":e.headers["X-Amz-Content-Sha256"]?e.headers["X-Amz-Content-Sha256"]:this.hexEncodedHash(this.request.body||"")},unsignableHeaders:["authorization","content-type","content-length","user-agent",s,"expect","x-amzn-trace-id"],isSignableHeader:function(e){return 0===e.toLowerCase().indexOf("x-amz-")||this.unsignableHeaders.indexOf(e)<0},isPresigned:function(){return!!this.request.headers[s]}}),t.exports=r.Signers.V4},{"../core":19,"./v4_credentials":70}],70:[function(e,t,n){var r=e("../core"),o={},i=[],s="aws4_request";t.exports={createScope:function(e,t,n){return[e.substr(0,8),t,n,s].join("/")},getSigningKey:function(e,t,n,a,c){var u=[r.util.crypto.hmac(e.secretAccessKey,e.accessKeyId,"base64"),t,n,a].join("_");if((c=!1!==c)&&u in o)return o[u];var l=r.util.crypto.hmac("AWS4"+e.secretAccessKey,t,"buffer"),p=r.util.crypto.hmac(l,n,"buffer"),d=r.util.crypto.hmac(p,a,"buffer"),h=r.util.crypto.hmac(d,s,"buffer");return c&&(o[u]=h,i.push(u),i.length>50&&delete o[i.shift()]),h},emptyCache:function(){o={},i=[]}}},{"../core":19}],71:[function(e,t,n){function r(e,t){this.currentState=t||null,this.states=e||{}}r.prototype.runTo=function(e,t,n,r){"function"==typeof e&&(r=n,n=t,t=e,e=null);var o=this,i=o.states[o.currentState];i.fn.call(n||o,r,(function(r){if(r){if(!i.fail)return t?t.call(n,r):null;o.currentState=i.fail}else{if(!i.accept)return t?t.call(n):null;o.currentState=i.accept}if(o.currentState===e)return t?t.call(n,r):null;o.runTo(e,t,n,r)}))},r.prototype.addState=function(e,t,n,r){return"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:n,fn:r},this},t.exports=r},{}],72:[function(e,t,n){(function(n,r){(function(){var o,i={environment:"nodejs",engine:function(){if(i.isBrowser()&&"undefined"!=typeof navigator)return navigator.userAgent;var e=n.platform+"/"+n.version;return n.env.AWS_EXECUTION_ENV&&(e+=" exec-env/"+n.env.AWS_EXECUTION_ENV),e},userAgent:function(){var t=i.environment,n="aws-sdk-"+t+"/"+e("./core").VERSION;return"nodejs"===t&&(n+=" "+i.engine()),n},uriEscape:function(e){var t=encodeURIComponent(e);return t=(t=t.replace(/[^A-Za-z0-9_.~\-%]+/g,escape)).replace(/[*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},uriEscapePath:function(e){var t=[];return i.arrayEach(e.split("/"),(function(e){t.push(i.uriEscape(e))})),t.join("/")},urlParse:function(e){return i.url.parse(e)},urlFormat:function(e){return i.url.format(e)},queryStringParse:function(e){return i.querystring.parse(e)},queryParamsToString:function(e){var t=[],n=i.uriEscape,r=Object.keys(e).sort();return i.arrayEach(r,(function(r){var o=e[r],s=n(r),a=s+"=";if(Array.isArray(o)){var c=[];i.arrayEach(o,(function(e){c.push(n(e))})),a=s+"="+c.sort().join("&"+s+"=")}else null!=o&&(a=s+"="+n(o));t.push(a)})),t.join("&")},readFileSync:function(t){return i.isBrowser()?null:e("fs").readFileSync(t,"utf-8")},base64:{encode:function(e){if("number"==typeof e)throw i.error(new Error("Cannot base64 encode number "+e));return null==e?e:i.buffer.toBuffer(e).toString("base64")},decode:function(e){if("number"==typeof e)throw i.error(new Error("Cannot base64 decode number "+e));return null==e?e:i.buffer.toBuffer(e,"base64")}},buffer:{toBuffer:function(e,t){return"function"==typeof i.Buffer.from&&i.Buffer.from!==Uint8Array.from?i.Buffer.from(e,t):new i.Buffer(e,t)},alloc:function(e,t,n){if("number"!=typeof e)throw new Error("size passed to alloc must be a number.");if("function"==typeof i.Buffer.alloc)return i.Buffer.alloc(e,t,n);var r=new i.Buffer(e);return void 0!==t&&"function"==typeof r.fill&&r.fill(t,void 0,void 0,n),r},toStream:function(e){i.Buffer.isBuffer(e)||(e=i.buffer.toBuffer(e));var t=new i.stream.Readable,n=0;return t._read=function(r){if(n>=e.length)return t.push(null);var o=n+r;o>e.length&&(o=e.length),t.push(e.slice(n,o)),n=o},t},concat:function(e){var t,n,r=0,o=0;for(n=0;n>>8^t[255&(n^e.readUInt8(r))];return(-1^n)>>>0},hmac:function(e,t,n,r){return n||(n="binary"),"buffer"===n&&(n=void 0),r||(r="sha256"),"string"==typeof t&&(t=i.buffer.toBuffer(t)),i.crypto.lib.createHmac(r,e).update(t).digest(n)},md5:function(e,t,n){return i.crypto.hash("md5",e,t,n)},sha256:function(e,t,n){return i.crypto.hash("sha256",e,t,n)},hash:function(e,t,n,r){var o=i.crypto.createHash(e);n||(n="binary"),"buffer"===n&&(n=void 0),"string"==typeof t&&(t=i.buffer.toBuffer(t));var s=i.arraySliceFn(t),a=i.Buffer.isBuffer(t);if(i.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(a=!0),r&&"object"==typeof t&&"function"==typeof t.on&&!a)t.on("data",(function(e){o.update(e)})),t.on("error",(function(e){r(e)})),t.on("end",(function(){r(null,o.digest(n))}));else{if(!r||!s||a||"undefined"==typeof FileReader){i.isBrowser()&&"object"==typeof t&&!a&&(t=new i.Buffer(new Uint8Array(t)));var c=o.update(t).digest(n);return r&&r(null,c),c}var u=0,l=new FileReader;l.onerror=function(){r(new Error("Failed to read data."))},l.onload=function(){var e=new i.Buffer(new Uint8Array(l.result));o.update(e),u+=e.length,l._continueReading()},l._continueReading=function(){if(u>=t.size)r(null,o.digest(n));else{var e=u+524288;e>t.size&&(e=t.size),l.readAsArrayBuffer(s.call(t,u,e))}},l._continueReading()}},toHex:function(e){for(var t=[],n=0;n=3e5,!1),o.config.isClockSkewed},applyClockOffset:function(e){e&&(o.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){var n=!1;void 0===t&&o&&o.config&&(t=o.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(n=!0),Array.isArray(e)||(e=[e]);for(var r=0;r=0)return a++,void setTimeout(u,o+(e.retryAfter||0))}n(e)},u=function(){var t="";r.handleRequest(e,s,(function(e){e.on("data",(function(e){t+=e.toString()})),e.on("end",(function(){var r=e.statusCode;if(r<300)n(null,t);else{var o=1e3*parseInt(e.headers["retry-after"],10)||0,s=i.error(new Error,{statusCode:r,retryable:r>=500||429===r});o&&s.retryable&&(s.retryAfter=o),c(s)}}))}),c)};o.util.defer(u)},uuid:{v4:function(){return e("uuid").v4()}},convertPayloadToString:function(e){var t=e.request,n=t.operation,r=t.service.api.operations[n].output||{};r.payload&&e.data[r.payload]&&(e.data[r.payload]=e.data[r.payload].toString())},defer:function(e){"object"==typeof n&&"function"==typeof n.nextTick?n.nextTick(e):"function"==typeof r?r(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var t=e.service.api.operations;if(t){var n=(t||{})[e.operation];if(n&&n.input&&n.input.payload)return n.input.members[n.input.payload]}},getProfilesFromSharedConfig:function(e,t){var r={},o={};n.env[i.configOptInEnv]&&(o=e.loadFrom({isConfig:!0,filename:n.env[i.sharedConfigFileEnv]}));var s={};try{s=e.loadFrom({filename:t||n.env[i.configOptInEnv]&&n.env[i.sharedCredentialsFileEnv]})}catch(e){if(!n.env[i.configOptInEnv])throw e}for(var a=0,c=Object.keys(o);a=6},parse:function(e){var t=e.split(":");return{partition:t[1],service:t[2],region:t[3],accountId:t[4],resource:t.slice(5).join(":")}},build:function(e){if(void 0===e.service||void 0===e.region||void 0===e.accountId||void 0===e.resource)throw i.error(new Error("Input ARN object is invalid"));return"arn:"+(e.partition||"aws")+":"+e.service+":"+e.region+":"+e.accountId+":"+e.resource}},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};t.exports=i}).call(this)}).call(this,e("_process"),e("timers").setImmediate)},{"../apis/metadata.json":4,"./core":19,_process:90,fs:80,timers:97,uuid:100}],73:[function(e,t,n){var r=e("../util"),o=e("../model/shape");function i(){}function s(e,t){for(var n=e.getElementsByTagName(t),r=0,o=n.length;r0||r?i.toString():""},t.exports=s},{"../util":72,"./xml-node":77,"./xml-text":78}],75:[function(e,t,n){t.exports={escapeAttribute:function(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(//g,">").replace(/"/g,""")}}},{}],76:[function(e,t,n){t.exports={escapeElement:function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}}},{}],77:[function(e,t,n){var r=e("./escape-attribute").escapeAttribute;function o(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}o.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},o.prototype.addChildNode=function(e){return this.children.push(e),this},o.prototype.removeAttribute=function(e){return delete this.attributes[e],this},o.prototype.toString=function(){for(var e=Boolean(this.children.length),t="<"+this.name,n=this.attributes,o=0,i=Object.keys(n);o"+this.children.map((function(e){return e.toString()})).join("")+"":"/>")},t.exports={XmlNode:o}},{"./escape-attribute":75}],78:[function(e,t,n){var r=e("./escape-element").escapeElement;function o(e){this.value=e}o.prototype.toString=function(){return r(""+this.value)},t.exports={XmlText:o}},{"./escape-element":76}],79:[function(e,t,n){"use strict";n.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=u(e),s=r[0],a=r[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),l=0,p=a>0?s-4:s;for(n=0;n>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,c[l++]=255&t),1===a&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},n.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,c=n-o;ac?c:a+s));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,s=[],a=t;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],80:[function(e,t,n){},{}],81:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],82:[function(e,t,o){(function(e){(function(){!function(i){"object"==typeof o&&o&&o.nodeType,"object"==typeof t&&t&&t.nodeType;var s="object"==typeof e&&e;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=36,l=/^xn--/,p=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,g=String.fromCharCode;function m(e){throw RangeError(h[e])}function v(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+v((e=e.replace(d,".")).split("."),t).join(".")}function E(e){for(var t,n,r=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,n){var r=0;for(e=n?f(e/700):e>>1,e+=f(e/t);e>455;r+=u)e=f(e/35);return f(r+36*e/(e+38))}function C(e){var t,n,r,o,i,s,a,l,p,d,h,g=[],v=e.length,y=0,E=128,b=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&m("not-basic"),g.push(e.charCodeAt(r));for(o=n>0?n+1:0;o=v&&m("invalid-input"),((l=(h=e.charCodeAt(o++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:u)>=u||l>f((c-y)/s))&&m("overflow"),y+=l*s,!(l<(p=a<=b?1:a>=b+26?26:a-b));a+=u)s>f(c/(d=u-p))&&m("overflow"),s*=d;b=T(y-i,t=g.length+1,0==i),f(y/t)>c-E&&m("overflow"),E+=f(y/t),y%=t,g.splice(y++,0,E)}return S(g)}function I(e){var t,n,r,o,i,s,a,l,p,d,h,v,y,S,C,I=[];for(v=(e=E(e)).length,t=128,n=0,i=72,s=0;s=t&&hf((c-n)/(y=r+1))&&m("overflow"),n+=(a-t)*y,t=a,s=0;sc&&m("overflow"),h==t){for(l=n,p=u;!(l<(d=p<=i?1:p>=i+26?26:p-i));p+=u)C=l-d,S=u-d,I.push(g(b(d+C%S,0))),l=f(C/S);I.push(g(b(l,0))),i=T(n,y,r==o),n=0,++r}++n,++t}return I.join("")}a={version:"1.3.2",ucs2:{decode:E,encode:S},decode:C,encode:I,toASCII:function(e){return y(e,(function(e){return p.test(e)?"xn--"+I(e):e}))},toUnicode:function(e){return y(e,(function(e){return l.test(e)?C(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return a}.call(o,n,o,t))||(t.exports=r)}()}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],83:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],84:[function(e,t,r){(function(t,n){(function(){var o=/%[sdj%]/g;r.format=function(e){if(!v(e)){for(var t=[],n=0;n=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),c=r[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(t)?n.showHidden=t:t&&r._extend(n,t),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),l(n,e,n.depth)}function c(e,t){var n=a.styles[t];return n?"["+a.colors[n][0]+"m"+e+"["+a.colors[n][1]+"m":e}function u(e,t){return e}function l(e,t,n){if(e.customInspect&&t&&C(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(n,e);return v(o)||(o=l(e,o,n)),o}var i=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return m(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}(e,t);if(i)return i;var s=Object.keys(t),a=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),T(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(t);if(0===s.length){if(C(t)){var c=t.name?": "+t.name:"";return e.stylize("[Function"+c+"]","special")}if(E(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(T(t))return p(t)}var u,S="",I=!1,_=["{","}"];return h(t)&&(I=!0,_=["[","]"]),C(t)&&(S=" [Function"+(t.name?": "+t.name:"")+"]"),E(t)&&(S=" "+RegExp.prototype.toString.call(t)),b(t)&&(S=" "+Date.prototype.toUTCString.call(t)),T(t)&&(S=" "+p(t)),0!==s.length||I&&0!=t.length?n<0?E(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=I?function(e,t,n,r,o){for(var i=[],s=0,a=t.length;s60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(u,S,_)):_[0]+S+_[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,o,i){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),R(r,o)||(s="["+o+"]"),a||(e.seen.indexOf(c.value)<0?(a=g(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),y(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function v(e){return"string"==typeof e}function y(e){return void 0===e}function E(e){return S(e)&&"[object RegExp]"===I(e)}function S(e){return"object"==typeof e&&null!==e}function b(e){return S(e)&&"[object Date]"===I(e)}function T(e){return S(e)&&("[object Error]"===I(e)||e instanceof Error)}function C(e){return"function"==typeof e}function I(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(y(i)&&(i=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var n=t.pid;s[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else s[e]=function(){};return s[e]},r.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=f,r.isNull=g,r.isNullOrUndefined=function(e){return null==e},r.isNumber=m,r.isString=v,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=y,r.isRegExp=E,r.isObject=S,r.isDate=b,r.isError=T,r.isFunction=C,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(){var e=new Date,t=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){console.log("%s - %s",w(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!S(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this)}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":83,_process:90,inherits:81}],85:[function(e,t,r){(function(t,n){(function(){"use strict";var n=e("base64-js"),o=e("ieee754"),i=e("isarray");function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(e).length;default:if(r)return j(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=n;ia&&(n=a-c),i=n;i>=0;i--){for(var p=!0,d=0;do&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+p<=n)switch(p){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=p}return function(e){var t=e.length;if(t<=w)return String.fromCharCode.apply(String,e);for(var n="",r=0;r0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(r,o),l=e.slice(t,n),p=0;po)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function R(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;oo)&&(n=o);for(var i="",s=t;sn)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function x(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function B(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"base64-js":79,buffer:85,ieee754:87,isarray:88}],86:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(s(n=this._events[e]))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(i(n))for(a=Array.prototype.slice.call(arguments,1),r=(u=n.slice()).length,c=0;c0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!o(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,s,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(o(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(o(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],87:[function(e,t,n){n.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,c=(1<>1,l=-7,p=n?o-1:0,d=n?-1:1,h=e[t+p];for(p+=d,i=h&(1<<-l)-1,h>>=-l,l+=a;l>0;i=256*i+e[t+p],p+=d,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+p],p+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),i-=u}return(h?-1:1)*s*Math.pow(2,i-r)},n.write=function(e,t,n,r,o,i){var s,a,c,u=8*i-o-1,l=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,f=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(s++,c/=2),s+p>=l?(a=0,s=l):s+p>=1?(a=(t*c-1)*Math.pow(2,o),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,o),s=0));o>=8;e[n+h]=255&a,h+=f,a/=256,o-=8);for(s=s<0;e[n+h]=255&s,h+=f,s/=256,u-=8);e[n+h-f]|=128*g}},{}],88:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],89:[function(e,t,n){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e,o){if(e===o)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(o))return!1;if(!0===t(e)){if(e.length!==o.length)return!1;for(var i=0;i",9:"Array"},u="EOF",l="UnquotedIdentifier",p="QuotedIdentifier",d="Rbracket",h="Rparen",f="Comma",g="Colon",m="Rbrace",v="Number",y="Current",E="Expref",S="Pipe",b="Or",T="And",C="EQ",I="GT",_="LT",A="GTE",w="LTE",R="NE",k="Flatten",N="Star",L="Filter",O="Dot",D="Not",P="Lbrace",x="Lbracket",M="Lparen",U="Literal",F={".":O,"*":N,",":f,":":g,"{":P,"}":m,"]":d,"(":M,")":h,"@":y},q={"<":!0,">":!0,"=":!0,"!":!0},j={" ":!0,"\t":!0,"\n":!0};function B(e){return e>="0"&&e<="9"||"-"===e}function V(){}V.prototype={tokenize:function(e){var t,n,r,o,i=[];for(this._current=0;this._current="a"&&o<="z"||o>="A"&&o<="Z"||"_"===o)t=this._current,n=this._consumeUnquotedIdentifier(e),i.push({type:l,value:n,start:t});else if(void 0!==F[e[this._current]])i.push({type:F[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(B(e[this._current]))r=this._consumeNumber(e),i.push(r);else if("["===e[this._current])r=this._consumeLBracket(e),i.push(r);else if('"'===e[this._current])t=this._current,n=this._consumeQuotedIdentifier(e),i.push({type:p,value:n,start:t});else if("'"===e[this._current])t=this._current,n=this._consumeRawStringLiteral(e),i.push({type:U,value:n,start:t});else if("`"===e[this._current]){t=this._current;var s=this._consumeLiteral(e);i.push({type:U,value:s,start:t})}else if(void 0!==q[e[this._current]])i.push(this._consumeOperator(e));else if(void 0!==j[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,i.push({type:T,value:"&&",start:t})):i.push({type:E,value:"&",start:t});else{if("|"!==e[this._current]){var a=new Error("Unknown character:"+e[this._current]);throw a.name="LexerError",a}t=this._current,this._current++,"|"===e[this._current]?(this._current++,i.push({type:b,value:"||",start:t})):i.push({type:S,value:"|",start:t})}return i},_consumeUnquotedIdentifier:function(e){var t,n=this._current;for(this._current++;this._current="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(n,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var n=e.length;'"'!==e[this._current]&&this._current"===n?"="===e[this._current]?(this._current++,{type:A,value:">=",start:t}):{type:I,value:">",start:t}:"="===n&&"="===e[this._current]?(this._current++,{type:C,value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,n=this._current,r=e.length;"`"!==e[this._current]&&this._current=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var W={};function H(){}function z(e){this.runtime=e}function G(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}W.EOF=0,W.UnquotedIdentifier=0,W.QuotedIdentifier=0,W.Rbracket=0,W.Rparen=0,W.Comma=0,W.Rbrace=0,W.Number=0,W.Current=0,W.Expref=0,W.Pipe=1,W.Or=2,W.And=3,W.EQ=5,W.GT=5,W.LT=5,W.GTE=5,W.LTE=5,W.NE=5,W.Flatten=9,W.Star=20,W.Filter=21,W.Dot=40,W.Not=45,W.Lbrace=50,W.Lbracket=55,W.Lparen=60,H.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if(this._lookahead(0)!==u){var n=this._lookaheadToken(0),r=new Error("Unexpected token type: "+n.type+", value: "+n.value);throw r.name="ParserError",r}return t},_loadTokens:function(e){var t=(new V).tokenize(e);t.push({type:u,value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var n=this.nud(t),r=this._lookahead(0);e=0?this.expression(e):t===x?(this._match(x),this._parseMultiselectList()):t===P?(this._match(P),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(W[this._lookahead(0)]<10)t={type:"Identity"};else if(this._lookahead(0)===x)t=this.expression(e);else if(this._lookahead(0)===L)t=this.expression(e);else{if(this._lookahead(0)!==O){var n=this._lookaheadToken(0),r=new Error("Sytanx error, unexpected token: "+n.value+"("+n.type+")");throw r.name="ParserError",r}this._match(O),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];this._lookahead(0)!==d;){var t=this.expression(0);if(e.push(t),this._lookahead(0)===f&&(this._match(f),this._lookahead(0)===d))throw new Error("Unexpected token Rbracket")}return this._match(d),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,n,r=[],o=[l,p];;){if(e=this._lookaheadToken(0),o.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match(g),n={type:"KeyValuePair",name:t,value:this.expression(0)},r.push(n),this._lookahead(0)===f)this._match(f);else if(this._lookahead(0)===m){this._match(m);break}}return{type:"MultiSelectHash",children:r}}},z.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,i){var s,a,c,u,l,p,d,h,f;switch(e.type){case"Field":return null!==i&&n(i)?void 0===(p=i[e.name])?null:p:null;case"Subexpression":for(c=this.visit(e.children[0],i),f=1;f0)for(f=b;fT;f+=N)c.push(i[f]);return c;case"Projection":var L=this.visit(e.children[0],i);if(!t(L))return null;for(h=[],f=0;fl;break;case A:c=u>=l;break;case _:c=u=e&&(t=n<0?e-1:e),t}},G.prototype={callFunction:function(e,t){var n=this.functionTable[e];if(void 0===n)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,n._signature),n._func.call(this,t)},_validateArgs:function(e,t,n){var r,o,i,s;if(n[n.length-1].variadic){if(t.length=0;r--)n+=t[r];return n}var o=e[0].slice(0);return o.reverse(),o},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,n=e[0],r=0;r=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return n(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],n=this._interpreter,r=e[0],o=e[1],i=0;i0){if(this._getTypeName(e[0][0])===s)return Math.max.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;r0){if(this._getTypeName(e[0][0])===s)return Math.min.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;ra?1:sc&&(c=n,t=o[u]);return t},_functionMinBy:function(e){for(var t,n,r=e[1],o=e[0],i=this.createKeyFunction(r,[s,a]),c=1/0,u=0;u1)for(var n=1;n0&&u>c&&(u=c);for(var l=0;l=0?(p=g.substr(0,m),d=g.substr(m+1)):(p=g,d=""),h=decodeURIComponent(p),f=decodeURIComponent(d),r(s,h)?o(s[h])?s[h].push(f):s[h]=[s[h],f]:s[h]=f}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],92:[function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(s(e),(function(s){var a=encodeURIComponent(r(s))+n;return o(e[s])?i(e[s],(function(e){return a+encodeURIComponent(r(e))})).join(t):a+encodeURIComponent(r(e[s]))})).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r0&&c>a&&(c=a);for(var u=0;u=0?(l=f.substr(0,g),p=f.substr(g+1)):(l=f,p=""),d=decodeURIComponent(l),h=decodeURIComponent(p),r(i,d)?Array.isArray(i[d])?i[d].push(h):i[d]=[i[d],h]:i[d]=h}return i}},{}],95:[function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,o){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var i=encodeURIComponent(r(o))+n;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(r(e))})).join(t):i+encodeURIComponent(r(e[o]))})).join(t):o?encodeURIComponent(r(o))+n+encodeURIComponent(r(e)):""}},{}],96:[function(e,t,n){arguments[4][93][0].apply(n,arguments)},{"./decode":94,"./encode":95,dup:93}],97:[function(e,t,n){(function(t,r){(function(){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,s=Array.prototype.slice,a={},c=0;function u(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new u(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new u(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&s.call(arguments,1);return a[t]=!0,o((function(){a[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete a[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":90,timers:97}],98:[function(e,t,n){var r=e("punycode");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}n.parse=v,n.resolve=function(e,t){return v(e,!1,!0).resolve(t)},n.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},n.format=function(e){return y(e)&&(e=v(e)),e instanceof o?e.format():o.prototype.format.call(e)},n.Url=o;var i=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(a),u=["%","/","?",";","#"].concat(c),l=["/","?","#"],p=/^[a-z0-9A-Z_-]{0,63}$/,d=/^([a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=e("querystring");function v(e,t,n){if(e&&E(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}function y(e){return"string"==typeof e}function E(e){return"object"==typeof e&&null!==e}function S(e){return null===e}o.prototype.parse=function(e,t,n){if(!y(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e;o=o.trim();var s=i.exec(o);if(s){var a=(s=s[0]).toLowerCase();this.protocol=a,o=o.substr(s.length)}if(n||s||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===o.substr(0,2);!v||s&&f[s]||(o=o.substr(2),this.slashes=!0)}if(!f[s]&&(v||s&&!g[s])){for(var E,S,b=-1,T=0;T127?R+="x":R+=w[k];if(!R.match(p)){var L=_.slice(0,T),O=_.slice(T+1),D=w.match(d);D&&(L.push(D[1]),O.unshift(D[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=L.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!I){var P=this.hostname.split("."),x=[];for(T=0;T0)&&n.host.split("@"))&&(n.auth=b.shift(),n.host=n.hostname=b.shift())),n.search=e.search,n.query=e.query,S(n.pathname)&&S(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!p.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var h=p.slice(-1)[0],m=(n.host||e.host)&&("."===h||".."===h)||""===h,v=0,E=p.length;E>=0;E--)"."==(h=p[E])?p.splice(E,1):".."===h?(p.splice(E,1),v++):v&&(p.splice(E,1),v--);if(!u&&!l)for(;v--;v)p.unshift("..");!u||""===p[0]||p[0]&&"/"===p[0].charAt(0)||p.unshift(""),m&&"/"!==p.join("/").substr(-1)&&p.push("");var b,T=""===p[0]||p[0]&&"/"===p[0].charAt(0);return d&&(n.hostname=n.host=T?"":p.length?p.shift():"",(b=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=b.shift(),n.host=n.hostname=b.shift())),(u=u||n.host&&p.length)&&!T&&p.unshift(""),p.length?n.pathname=p.join("/"):(n.pathname=null,n.path=null),S(n.pathname)&&S(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:82,querystring:93}],99:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;for(var r=[],o=0;o<256;++o)r[o]=(o+256).toString(16).substr(1);var i=function(e,t){var n=t||0,o=r;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")};n.default=i},{}],100:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"v5",{enumerable:!0,get:function(){return s.default}});var r=a(e("./v1.js")),o=a(e("./v3.js")),i=a(e("./v4.js")),s=a(e("./v5.js"));function a(e){return e&&e.__esModule?e:{default:e}}},{"./v1.js":104,"./v3.js":105,"./v4.js":107,"./v5.js":108}],101:[function(e,t,n){"use strict";function r(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,i,s){return r((a=r(r(t,e),r(o,s)))<<(c=i)|a>>>32-c,n);var a,c}function i(e,t,n,r,i,s,a){return o(t&n|~t&r,e,t,i,s,a)}function s(e,t,n,r,i,s,a){return o(t&r|n&~r,e,t,i,s,a)}function a(e,t,n,r,i,s,a){return o(t^n^r,e,t,i,s,a)}function c(e,t,n,r,i,s,a){return o(n^(t|~r),e,t,i,s,a)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var n=0;n>5]>>>t%32&255,r=parseInt(s.charAt(n>>>4&15)+s.charAt(15&n),16),o.push(r);return o}(function(e,t){var n,o,u,l,p;e[t>>5]|=128<>>9<<4)]=t;var d=1732584193,h=-271733879,f=-1732584194,g=271733878;for(n=0;n>2)-1]=void 0,t=0;t>5]|=(255&e[t/8])<>>32-t}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=new Array(i.length);for(var s=0;s>>0;v=m,m=g,g=o(f,30)>>>0,f=h,h=E}n[0]=n[0]+h>>>0,n[1]=n[1]+f>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+v>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};n.default=i},{}],104:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o,i=a(e("./rng.js")),s=a(e("./bytesToUuid.js"));function a(e){return e&&e.__esModule?e:{default:e}}var c=0,u=0,l=function(e,t,n){var a=t&&n||0,l=t||[],p=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==p||null==d){var h=e.random||(e.rng||i.default)();null==p&&(p=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=o=16383&(h[6]<<8|h[7]))}var f=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:u+1,m=f-c+(g-u)/1e4;if(m<0&&void 0===e.clockseq&&(d=d+1&16383),(m<0||f>c)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=f,u=g,o=d;var v=(1e4*(268435455&(f+=122192928e5))+g)%4294967296;l[a++]=v>>>24&255,l[a++]=v>>>16&255,l[a++]=v>>>8&255,l[a++]=255&v;var y=f/4294967296*1e4&268435455;l[a++]=y>>>8&255,l[a++]=255&y,l[a++]=y>>>24&15|16,l[a++]=y>>>16&255,l[a++]=d>>>8|128,l[a++]=255&d;for(var E=0;E<6;++E)l[a+E]=p[E];return t||(0,s.default)(l)};n.default=l},{"./bytesToUuid.js":99,"./rng.js":102}],105:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(e("./v35.js")),o=i(e("./md5.js"));function i(e){return e&&e.__esModule?e:{default:e}}var s=(0,r.default)("v3",48,o.default);n.default=s},{"./md5.js":101,"./v35.js":106}],106:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t,n){var r=function(e,r,i,s){var a=i&&s||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),n=0;n=0;i--)o[i].Expire{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,t.ClientMethods=t.makeEnum(["getAgentSnapshot","putAgentState","getAgentStates","getDialableCountryCodes","getRoutingProfileQueues","getAgentPermissions","getAgentConfiguration","updateAgentConfiguration","acceptContact","createOutboundContact","createTaskContact","clearContact","completeContact","destroyContact","rejectContact","notifyContactIssue","updateContactAttributes","createAdditionalConnection","destroyConnection","holdConnection","resumeConnection","toggleActiveConnections","conferenceConnections","sendClientLogs","sendDigits","sendSoftphoneCallReport","sendSoftphoneCallMetrics","getEndpoints","getNewAuthToken","createTransport","muteParticipant","unmuteParticipant","updateMonitorParticipantState"]),t.AgentAppClientMethods={GET_CONTACT:"AgentAppService.Lcms.getContact",DELETE_SPEAKER:"AgentAppService.VoiceId.deleteSpeaker",ENROLL_BY_SESSION:"AgentAppService.VoiceId.enrollBySession",EVALUATE_SESSION:"AgentAppService.VoiceId.evaluateSession",DESCRIBE_SPEAKER:"AgentAppService.VoiceId.describeSpeaker",OPT_OUT_SPEAKER:"AgentAppService.VoiceId.optOutSpeaker",UPDATE_VOICE_ID_DATA:"AgentAppService.Lcms.updateVoiceIdData",DESCRIBE_SESSION:"AgentAppService.VoiceId.describeSession",UPDATE_SESSION:"AgentAppService.VoiceId.updateSession",START_VOICE_ID_SESSION:"AgentAppService.Nasa.startVoiceIdSession",LIST_INTEGRATION_ASSOCIATIONS:"AgentAppService.Acs.listIntegrationAssociations"},t.MasterMethods=t.makeEnum(["becomeMaster","checkMaster"]),t.TaskTemplatesClientMethods=t.makeEnum(["listTaskTemplates","getTaskTemplate","createTemplatedTask","updateContact"]);var n=function(){};n.EMPTY_CALLBACKS={success:function(){},failure:function(){}},n.prototype.call=function(e,r,o){t.assertNotNull(e,"method");var i=r||{},s=o||n.EMPTY_CALLBACKS;this._callImpl(e,i,s)},n.prototype._callImpl=function(e,n,r){throw new t.NotImplementedError};var r=function(){n.call(this)};(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype._callImpl=function(e,n,r){if(r&&r.failure){var o=t.sprintf("No such method exists on NULL client: %s",e);r.failure(new t.ValueError(o),{message:o})}};var o=function(e,r,o){n.call(this),this.conduit=e,this.requestEvent=r,this.responseEvent=o,this._requestIdCallbacksMap={},this.conduit.onUpstream(o,t.hitch(this,this._handleResponse))};(o.prototype=Object.create(n.prototype)).constructor=o,o.prototype._callImpl=function(e,n,r){var o=t.EventFactory.createRequest(this.requestEvent,e,n);this._requestIdCallbacksMap[o.requestId]=r,this.conduit.sendUpstream(o.event,o)},o.prototype._getCallbacksForRequest=function(e){var t=this._requestIdCallbacksMap[e]||null;return null!=t&&delete this._requestIdCallbacksMap[e],t},o.prototype._handleResponse=function(e){var t=this._getCallbacksForRequest(e.requestId);null!=t&&(e.err&&t.failure?t.failure(e.err,e.data):t.success&&t.success(e.data))};var i=function(e){o.call(this,e,t.EventType.API_REQUEST,t.EventType.API_RESPONSE)};(i.prototype=Object.create(o.prototype)).constructor=i;var s=function(e){o.call(this,e,t.EventType.MASTER_REQUEST,t.EventType.MASTER_RESPONSE)};(s.prototype=Object.create(o.prototype)).constructor=s;var a=function(e,r,o){t.assertNotNull(e,"authCookieName"),t.assertNotNull(r,"authToken"),t.assertNotNull(o,"endpoint"),n.call(this),this.endpointUrl=t.getUrlWithProtocol(o),this.authToken=r,this.authCookieName=e};(a.prototype=Object.create(n.prototype)).constructor=a,a.prototype._callImpl=function(e,n,r){var o=this,i={};i[o.authCookieName]=o.authToken;var s={method:"post",body:JSON.stringify(n||{}),headers:{Accept:"application/json","Content-Type":"application/json","X-Amz-target":e,"X-Amz-Bearer":JSON.stringify(i)}};t.fetch(o.endpointUrl,s).then((function(e){r.success(e)})).catch((function(e){const t=e.body.getReader();let n="";const o=new TextDecoder;t.read().then((function i({done:s,value:a}){if(s){var c=JSON.parse(n);return c.status=e.status,void r.failure(c)}return n+=o.decode(a),t.read().then(i)}))}))};var c=function(e,r,o){t.assertNotNull(e,"authToken"),t.assertNotNull(r,"region"),n.call(this),AWS.config.credentials=new AWS.Credentials({}),AWS.config.region=r,this.authToken=e;var i=t.getBaseUrl(),s=o||(i.includes(".awsapps.com")?i+"/connect/api":i+"/api"),a=new AWS.Endpoint(s);this.client=new AWS.Connect({endpoint:a})};(c.prototype=Object.create(n.prototype)).constructor=c,c.prototype._callImpl=function(e,n,r){var o=this,i=t.getLog();if(t.contains(this.client,e))n=this._translateParams(e,n),i.trace("AWSClient: --\x3e Calling operation '%s'",e).sendInternalLogToServer(),this.client[e](n).on("build",(function(e){e.httpRequest.headers["X-Amz-Bearer"]=o.authToken})).send((function(n,o){try{if(n){if(n.code===t.CTIExceptions.UNAUTHORIZED_EXCEPTION)r.authFailure();else if(!r.accessDenied||n.code!==t.CTIExceptions.ACCESS_DENIED_EXCEPTION&&403!==n.statusCode){var s={};if(s.type=n.code,s.message=n.message,s.stack=[],n.stack)try{Array.isArray(n.stack)?s.stack=n.stack:"object"==typeof n.stack?s.stack=[JSON.stringify(n.stack)]:"string"==typeof n.stack&&(s.stack=n.stack.split("\n"))}catch{}r.failure(s,o)}else r.accessDenied();i.trace("AWSClient: <-- Operation '%s' failed: %s",e,JSON.stringify(n)).sendInternalLogToServer()}else i.trace("AWSClient: <-- Operation '%s' succeeded.",e).withObject(o).sendInternalLogToServer(),r.success(o)}catch(n){t.getLog().error("Failed to handle AWS API request for method %s",e).withException(n).sendInternalLogToServer()}}));else{var s=t.sprintf("No such method exists on AWS client: %s",e);r.failure(new t.ValueError(s),{message:s})}},c.prototype._requiresAuthenticationParam=function(e){return e!==t.ClientMethods.COMPLETE_CONTACT&&e!==t.ClientMethods.CLEAR_CONTACT&&e!==t.ClientMethods.REJECT_CONTACT&&e!==t.ClientMethods.CREATE_TASK_CONTACT&&e!==t.ClientMethods.UPDATE_MONITOR_PARTICIPANT_STATE},c.prototype._translateParams=function(e,n){switch(e){case t.ClientMethods.UPDATE_AGENT_CONFIGURATION:n.configuration=this._translateAgentConfiguration(n.configuration);break;case t.ClientMethods.SEND_SOFTPHONE_CALL_METRICS:n.softphoneStreamStatistics=this._translateSoftphoneStreamStatistics(n.softphoneStreamStatistics);break;case t.ClientMethods.SEND_SOFTPHONE_CALL_REPORT:n.report=this._translateSoftphoneCallReport(n.report)}return this._requiresAuthenticationParam(e)&&(n.authentication={authToken:this.authToken}),n},c.prototype._translateAgentConfiguration=function(e){return{name:e.name,softphoneEnabled:e.softphoneEnabled,softphoneAutoAccept:e.softphoneAutoAccept,extension:e.extension,routingProfile:this._translateRoutingProfile(e.routingProfile),agentPreferences:e.agentPreferences}},c.prototype._translateRoutingProfile=function(e){return{name:e.name,routingProfileARN:e.routingProfileARN,defaultOutboundQueue:this._translateQueue(e.defaultOutboundQueue)}},c.prototype._translateQueue=function(e){return{queueARN:e.queueARN,name:e.name}},c.prototype._translateSoftphoneStreamStatistics=function(e){return e.forEach((function(e){"packetsCount"in e&&(e.packetCount=e.packetsCount,delete e.packetsCount)})),e},c.prototype._translateSoftphoneCallReport=function(e){return"handshakingTimeMillis"in e&&(e.handshakeTimeMillis=e.handshakingTimeMillis,delete e.handshakingTimeMillis),"preTalkingTimeMillis"in e&&(e.preTalkTimeMillis=e.preTalkingTimeMillis,delete e.preTalkingTimeMillis),"handshakingFailure"in e&&(e.handshakeFailure=e.handshakingFailure,delete e.handshakingFailure),"talkingTimeMillis"in e&&(e.talkTimeMillis=e.talkingTimeMillis,delete e.talkingTimeMillis),e.softphoneStreamStatistics=this._translateSoftphoneStreamStatistics(e.softphoneStreamStatistics),e};var u=function(e){if(t.assertNotNull(e,"endpoint"),n.call(this),e.includes("/task-templates"))this.endpointUrl=t.getUrlWithProtocol(e);else{var r=new AWS.Endpoint(e),o=e.includes(".awsapps.com")?"/connect":"";this.endpointUrl=t.getUrlWithProtocol(`${r.host}${o}/task-templates/api/ccp`)}};(u.prototype=Object.create(n.prototype)).constructor=u,u.prototype._callImpl=function(e,n,r){t.assertNotNull(e,"method"),t.assertNotNull(n,"params");var o={credentials:"include",method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","x-csrf-token":"csrf"}},i=n.instanceId,s=this.endpointUrl,a=t.TaskTemplatesClientMethods;switch(e){case a.LIST_TASK_TEMPLATES:if(s+=`/proxy/instance/${i}/task/template`,n.queryParams){const e=new URLSearchParams(n.queryParams).toString();e&&(s+=`?${e}`)}break;case a.GET_TASK_TEMPLATE:t.assertNotNull(n.templateParams,"params.templateParams");const r=t.assertNotNull(n.templateParams.id,"params.templateParams.id"),c=n.templateParams.version;s+=`/proxy/instance/${i}/task/template/${r}`,c&&(s+=`?snapshotVersion=${c}`);break;case a.CREATE_TEMPLATED_TASK:s+=`/${e}`,o.body=JSON.stringify(n),o.method="PUT";break;case a.UPDATE_CONTACT:s+=`/${e}`,o.body=JSON.stringify(n),o.method="POST"}t.fetch(s,o).then((function(e){r.success(e)})).catch((function(e){const t=e.body.getReader();let n="";const o=new TextDecoder;t.read().then((function i({done:s,value:a}){if(s){var c=JSON.parse(n);return c.status=e.status,void r.failure(c)}return n+=o.decode(a),t.read().then(i)}))}))},t.ClientBase=n,t.NullClient=r,t.UpstreamConduitClient=i,t.UpstreamConduitMasterClient=s,t.AWSClient=c,t.AgentAppClient=a,t.TaskTemplatesClient=u}()},895:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,t.core={},t.core.initialized=!1,t.version="2.4.5",t.DEFAULT_BATCH_SIZE=500;var n="Amazon Connect CCP",r="https://{alias}.awsapps.com/auth/?client_id={client_id}&redirect_uri={redirect}",o="06919f4fd8ed324e",i="/auth/authorize",s="/connect/auth/authorize",a="IframeRefreshAttempts",c="IframeInitializationSuccess";t.numberOfConnectedCCPs=0,t.numberOfConnectedCCPsInThisTab=0,t.core.MAX_AUTHORIZE_RETRY_COUNT_FOR_SESSION=3,t.core.MAX_CTI_AUTH_RETRY_COUNT=10,t.core.ctiAuthRetryCount=0,t.core.authorizeTimeoutId=null,t.core.ctiTimeoutId=null,t.SessionStorageKeys=t.makeEnum(["tab_id","authorize_retry_count"]);var u=function(){let n=`SoftphoneParamsStorage::${e.location.origin}`;return{set:function(r){try{r&&e.localStorage.setItem(n,JSON.stringify(r))}catch(e){t.getLog().error("SoftphoneParamsStorage:: Failed to set softphone params to local storage!").withException(e).sendInternalLogToServer()}},get:function(){try{let t=e.localStorage.getItem(n);return t&&JSON.parse(t)}catch(e){t.getLog().error("SoftphoneParamsStorage:: Failed to get softphone params from local storage!").withException(e).sendInternalLogToServer()}return null},clean:function(){e.localStorage.removeItem(n)}}}();function l(e){var t=e.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)/gi);return t.length?t[0]:""}t.core.checkNotInitialized=function(){t.core.initialized&&t.getLog().warn("Connect core already initialized, only needs to be initialized once.").sendInternalLogToServer()},t.core.init=function(e){t.core.eventBus=new t.EventBus,t.core.agentDataProvider=new g(t.core.getEventBus()),t.core.initClient(e),t.core.initAgentAppClient(e),t.core.initTaskTemplatesClient(e),t.core.initialized=!0},t.core.initClient=function(e){t.assertNotNull(e,"params");var n=t.assertNotNull(e.authToken,"params.authToken"),r=t.assertNotNull(e.region,"params.region"),o=e.endpoint||null;t.core.client=new t.AWSClient(n,r,o)},t.core.initAgentAppClient=function(e){t.assertNotNull(e,"params");var n=t.assertNotNull(e.authToken,"params.authToken"),r=t.assertNotNull(e.authCookieName,"params.authCookieName"),o=t.assertNotNull(e.agentAppEndpoint,"params.agentAppEndpoint");t.core.agentAppClient=new t.AgentAppClient(r,n,o)},t.core.initTaskTemplatesClient=function(e){t.assertNotNull(e,"params");var n=e.taskTemplatesEndpoint||e.endpoint;t.assertNotNull(n,"taskTemplatesEndpoint"),t.core.taskTemplatesClient=new t.TaskTemplatesClient(n)},t.core.terminate=function(){t.core.client=new t.NullClient,t.core.agentAppClient=new t.NullClient,t.core.taskTemplatesClient=new t.NullClient,t.core.masterClient=new t.NullClient;var e=t.core.getEventBus();e&&e.unsubscribeAll(),t.core.bus=new t.EventBus,t.core.agentDataProvider=null,t.core.softphoneManager=null,t.core.upstream=null,t.core.keepaliveManager=null,t.agent.initialized=!1,t.core.initialized=!1},t.core.softphoneUserMediaStream=null,t.core.getSoftphoneUserMediaStream=function(){return t.core.softphoneUserMediaStream},t.core.setSoftphoneUserMediaStream=function(e){t.core.softphoneUserMediaStream=e},t.core.initRingtoneEngines=function(e){t.assertNotNull(e,"params");var n=function(e){t.assertNotNull(e,"ringtoneSettings"),t.assertNotNull(e.voice,"ringtoneSettings.voice"),t.assertTrue(e.voice.ringtoneUrl||e.voice.disabled,"ringtoneSettings.voice.ringtoneUrl must be provided or ringtoneSettings.voice.disabled must be true"),t.assertNotNull(e.queue_callback,"ringtoneSettings.queue_callback"),t.assertTrue(e.queue_callback.ringtoneUrl||e.queue_callback.disabled,"ringtoneSettings.voice.ringtoneUrl must be provided or ringtoneSettings.queue_callback.disabled must be true"),t.core.ringtoneEngines={},t.agent((function(n){n.onRefresh((function(){t.ifMaster(t.MasterTopics.RINGTONE,(function(){e.voice.disabled||t.core.ringtoneEngines.voice||(t.core.ringtoneEngines.voice=new t.VoiceRingtoneEngine(e.voice),t.getLog().info("VoiceRingtoneEngine initialized.").sendInternalLogToServer()),e.chat.disabled||t.core.ringtoneEngines.chat||(t.core.ringtoneEngines.chat=new t.ChatRingtoneEngine(e.chat),t.getLog().info("ChatRingtoneEngine initialized.").sendInternalLogToServer()),e.task.disabled||t.core.ringtoneEngines.task||(t.core.ringtoneEngines.task=new t.TaskRingtoneEngine(e.task),t.getLog().info("TaskRingtoneEngine initialized.").sendInternalLogToServer()),e.queue_callback.disabled||t.core.ringtoneEngines.queue_callback||(t.core.ringtoneEngines.queue_callback=new t.QueueCallbackRingtoneEngine(e.queue_callback),t.getLog().info("QueueCallbackRingtoneEngine initialized.").sendInternalLogToServer())}))}))})),p()},r=function(e,n){e.ringtone=e.ringtone||{},e.ringtone.voice=e.ringtone.voice||{},e.ringtone.queue_callback=e.ringtone.queue_callback||{},e.ringtone.chat=e.ringtone.chat||{disabled:!0},e.ringtone.task=e.ringtone.task||{disabled:!0},n.softphone&&(n.softphone.disableRingtone&&(e.ringtone.voice.disabled=!0,e.ringtone.queue_callback.disabled=!0),n.softphone.ringtoneUrl&&(e.ringtone.voice.ringtoneUrl=n.softphone.ringtoneUrl,e.ringtone.queue_callback.ringtoneUrl=n.softphone.ringtoneUrl)),n.chat&&(n.chat.disableRingtone&&(e.ringtone.chat.disabled=!0),n.chat.ringtoneUrl&&(e.ringtone.chat.ringtoneUrl=n.chat.ringtoneUrl)),n.ringtone&&(e.ringtone.voice=t.merge(e.ringtone.voice,n.ringtone.voice||{}),e.ringtone.queue_callback=t.merge(e.ringtone.queue_callback,n.ringtone.voice||{}),e.ringtone.chat=t.merge(e.ringtone.chat,n.ringtone.chat||{}))};r(e,e),t.isFramed()?t.core.getEventBus().subscribe(t.EventType.CONFIGURE,(function(t){this.unsubscribe(),r(e,t),n(e.ringtone)})):n(e.ringtone)};var p=function(){t.core.getEventBus().subscribe(t.ConfigurationEvents.SET_RINGER_DEVICE,d)},d=function(e){if(0!==t.keys(t.core.ringtoneEngines).length&&e&&e.deviceId){var n=e.deviceId;for(var r in t.core.ringtoneEngines)t.core.ringtoneEngines[r].setOutputDevice(n);t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.RINGER_DEVICE_CHANGED,data:{deviceId:n}})}};t.core.initSoftphoneManager=function(n){var r=n||{};t.getLog().info("[Softphone Manager] initSoftphoneManager started").sendInternalLogToServer();var o=function(e){var n=t.merge(r.softphone||{},e);t.getLog().info("[Softphone Manager] competeForMasterOnAgentUpdate executed").sendInternalLogToServer(),t.agent((function(e){e.getChannelConcurrency(t.ChannelType.VOICE)&&e.onRefresh((function(){var r=this;t.getLog().info("[Softphone Manager] agent refresh handler executed").sendInternalLogToServer(),t.ifMaster(t.MasterTopics.SOFTPHONE,(function(){t.getLog().info("[Softphone Manager] confirmed as softphone master topic").sendInternalLogToServer(),!t.core.softphoneManager&&e.isSoftphoneEnabled()&&(t.becomeMaster(t.MasterTopics.SEND_LOGS),t.core.softphoneManager=new t.SoftphoneManager(n),r.unsubscribe())}))}))}))};if(t.isFramed()&&t.isCCP()){let n;t.core.getEventBus().subscribe(t.EventType.CONFIGURE,(function(r){e.clearTimeout(n),t.getLog().info("[Softphone Manager] Configure event handler executed").sendInternalLogToServer(),u.set(r.softphone),r.softphone&&r.softphone.allowFramedSoftphone&&(this.unsubscribe(),o(r.softphone)),i(r.softphone)}));let r=u.get();r&&t.core.getUpstream().onUpstream(t.EventType.ACKNOWLEDGE,(function(s){s&&s.id&&(t.getLog().info("[Softphone Manager] Embedded CCP is refreshed successfully and waiting for configure Message handler to execute").sendInternalLogToServer(),this.unsubscribe(),n=e.setTimeout((()=>{t.getLog().info("[Softphone Manager] Embedded CCP is refreshed without configure message handler execution").sendInternalLogToServer(),t.publishMetric({name:"EmbeddedCCPRefreshedWithoutInitCCP",data:{count:1}}),i(r),r.allowFramedSoftphone&&(t.getLog().info("[Softphone Manager] Embedded CCP is refreshed & Initializing competeForMasterOnAgentUpdate (Softphone manager) from localStorage softphone params").sendInternalLogToServer(),o(r))}),100))}))}else o(r),i(r);function i(e){var n=t.merge(r.softphone||{},e);t.core.softphoneParams=n,t.isFirefoxBrowser()&&(t.core.getUpstream().onUpstream(t.EventType.MASTER_RESPONSE,(function(e){if(e.data&&e.data.topic===t.MasterTopics.SOFTPHONE&&e.data.takeOver&&e.data.masterId!==t.core.portStreamId){t.core.softphoneManager&&(t.core.softphoneManager.onInitContactSub.unsubscribe(),delete t.core.softphoneManager);var n=t.core.getSoftphoneUserMediaStream();n&&(n.getTracks().forEach((function(e){e.stop()})),t.core.setSoftphoneUserMediaStream(null))}})),t.core.getEventBus().subscribe(t.ConnectionEvents.READY_TO_START_SESSION,(function(){t.ifMaster(t.MasterTopics.SOFTPHONE,(function(){t.core.softphoneManager&&t.core.softphoneManager.startSession()}),(function(){t.becomeMaster(t.MasterTopics.SOFTPHONE,(function(){t.agent((function(e){!t.core.softphoneManager&&e.isSoftphoneEnabled()&&(t.becomeMaster(t.MasterTopics.SEND_LOGS),t.core.softphoneManager=new t.SoftphoneManager(n),t.core.softphoneManager.startSession())}))}))}))})),t.contact((function(e){t.agent((function(n){e.onRefresh((function(e){if(t.hasOtherConnectedCCPs()&&"visible"===document.visibilityState&&(e.getStatus().type===t.ContactStatusType.CONNECTING||e.getStatus().type===t.ContactStatusType.INCOMING)){var r=e.isSoftphoneCall()&&!e.isInbound(),o=e.isSoftphoneCall()&&n.getConfiguration().softphoneAutoAccept,i=e.getType()===t.ContactType.QUEUE_CALLBACK;(r||o||i)&&t.core.triggerReadyToStartSessionEvent()}}))}))})))}t.agent((function(e){e.isSoftphoneEnabled()&&e.getChannelConcurrency(t.ChannelType.VOICE)&&t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.MUTE})}))},t.core.triggerReadyToStartSessionEvent=function(){var e=t.core.softphoneParams&&t.core.softphoneParams.allowFramedSoftphone;t.isCCP()?e?t.core.getEventBus().trigger(t.ConnectionEvents.READY_TO_START_SESSION):t.isFramed()?t.core.getUpstream().sendDownstream(t.ConnectionEvents.READY_TO_START_SESSION):t.core.getEventBus().trigger(t.ConnectionEvents.READY_TO_START_SESSION):e?t.core.getUpstream().sendUpstream(t.ConnectionEvents.READY_TO_START_SESSION):t.core.getEventBus().trigger(t.ConnectionEvents.READY_TO_START_SESSION)},t.core.initPageOptions=function(e){if(t.assertNotNull(e,"params"),t.isFramed()){var n=t.core.getEventBus();n.subscribe(t.EventType.CONFIGURE,(function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.CONFIGURE,data:e})})),n.subscribe(t.EventType.MEDIA_DEVICE_REQUEST,(function(){function e(e){t.core.getUpstream().sendDownstream(t.EventType.MEDIA_DEVICE_RESPONSE,e)}navigator&&navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then((function(t){devices=t||[],devices=devices.map((function(e){return e.toJSON()})),e(devices)})).catch((function(t){e({error:t.message})})):e({error:"No navigator or navigator.mediaDevices object found"})}))}},t.core.getFrameMediaDevices=function(e){var n=null,r=e||1e3,o=new Promise((function(e,t){setTimeout((function(){t(new Error("Timeout exceeded"))}),r)})),i=new Promise((function(e,r){if(t.isFramed()||t.isCCP())navigator&&navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then((function(t){devices=t||[],devices=devices.map((function(e){return e.toJSON()})),e(devices)})):r(new Error("No navigator or navigator.mediaDevices object found"));else{var o=t.core.getEventBus();n=o.subscribe(t.EventType.MEDIA_DEVICE_RESPONSE,(function(t){t.error?r(new Error(t.error)):e(t)})),t.core.getUpstream().sendUpstream(t.EventType.MEDIA_DEVICE_REQUEST)}}));return Promise.race([i,o]).finally((function(){n&&n.unsubscribe()}))},t.core.authorize=function(e){var n=e;return n||(n=t.core.isLegacyDomain()?s:i),t.fetch(n,{credentials:"include"},2e3,5)},t.core.verifyDomainAccess=function(e,n){if(t.getLog().warn("This API will be deprecated in the next major version release"),!t.isFramed())return Promise.resolve();var r={headers:{"X-Amz-Bearer":e}},o=null;return o=n||(t.core.isLegacyDomain()?"/connect/whitelisted-origins":"/whitelisted-origins"),t.fetch(o,r,2e3,5).then((function(e){var t=l(window.document.referrer);return e.whitelistedOrigins.some((function(e){return t===l(e)}))?Promise.resolve():Promise.reject()}))},t.core.isLegacyDomain=function(e){return(e=e||window.location.href).includes(".awsapps.com")},t.core.initSharedWorker=function(n){if(t.core.checkNotInitialized(),!t.core.initialized){t.assertNotNull(n,"params");var r=t.assertNotNull(n.sharedWorkerUrl,"params.sharedWorkerUrl"),o=t.assertNotNull(n.authToken,"params.authToken"),a=t.assertNotNull(n.refreshToken,"params.refreshToken"),c=t.assertNotNull(n.authTokenExpiration,"params.authTokenExpiration"),u=t.assertNotNull(n.region,"params.region"),l=n.endpoint||null,p=n.authorizeEndpoint;p||(p=t.core.isLegacyDomain()?s:i);var d=n.agentAppEndpoint||null,h=n.taskTemplatesEndpoint||null,m=n.authCookieName||null;try{t.core.eventBus=new t.EventBus({logEvents:!0}),t.core.agentDataProvider=new g(t.core.getEventBus()),t.core.mediaFactory=new t.MediaFactory(n);var v=new SharedWorker(r,"ConnectSharedWorker"),y=new t.Conduit("ConnectSharedWorkerConduit",new t.PortStream(v.port),new t.WindowIOStream(window,parent));t.core.upstream=y,t.core.webSocketProvider=new f,e.onunload=function(){y.sendUpstream(t.EventType.CLOSE),v.port.close()},t.getLog().scheduleUpstreamLogPush(y),t.getLog().scheduleDownstreamClientSideLogsPush(),y.onAllUpstream(t.core.getEventBus().bridge()),y.onAllUpstream(y.passDownstream()),t.isFramed()&&(y.onAllDownstream(t.core.getEventBus().bridge()),y.onAllDownstream(y.passUpstream())),y.sendUpstream(t.EventType.CONFIGURE,{authToken:o,authTokenExpiration:c,endpoint:l,refreshToken:a,region:u,authorizeEndpoint:p,agentAppEndpoint:d,taskTemplatesEndpoint:h,authCookieName:m,longPollingOptions:n.longPollingOptions||void 0}),y.onUpstream(t.EventType.ACKNOWLEDGE,(function(e){t.getLog().info("Acknowledged by the ConnectSharedWorker!").sendInternalLogToServer(),t.core.initialized=!0,t.core._setTabId(),t.core.portStreamId=e.id,this.unsubscribe()})),y.onUpstream(t.EventType.LOG,(function(e){e.loggerId!==t.getLog().getLoggerId()&&t.getLog().addLogEntry(t.LogEntry.fromObject(e))})),y.onUpstream(t.EventType.SERVER_BOUND_INTERNAL_LOG,(function(e){t.getLog().sendInternalLogEntryToServer(t.LogEntry.fromObject(e))})),y.onDownstream(t.EventType.SERVER_BOUND_INTERNAL_LOG,(function(e){t.isFramed()&&Array.isArray(e)&&e.forEach((function(e){t.getLog().sendInternalLogEntryToServer(t.LogEntry.fromObject(e))}))})),y.onDownstream(t.EventType.LOG,(function(e){t.isFramed()&&e.loggerId!==t.getLog().getLoggerId()&&t.getLog().addLogEntry(t.LogEntry.fromObject(e))})),t.core.onAuthFail(t.hitch(t.core,t.core._handleAuthFail,n.loginEndpoint||null,p)),t.core.onAuthorizeSuccess(t.hitch(t.core,t.core._handleAuthorizeSuccess)),t.getLog().info("User Agent: "+navigator.userAgent).sendInternalLogToServer(),t.getLog().info("isCCPv2: "+!0).sendInternalLogToServer(),t.getLog().info("isFramed: "+t.isFramed()).sendInternalLogToServer(),t.core.upstream.onDownstream(t.EventType.OUTER_CONTEXT_INFO,(function(e){var n=e.streamsVersion;t.getLog().info("StreamsJS Version: "+n).sendInternalLogToServer()})),y.onUpstream(t.EventType.UPDATE_CONNECTED_CCPS,(function(e){t.getLog().info("Number of connected CCPs updated: "+e.length).sendInternalLogToServer(),t.numberOfConnectedCCPs=e.length,e[t.core.tabId]&&!isNaN(e[t.core.tabId].length)&&t.numberOfConnectedCCPsInThisTab!==e[t.core.tabId].length&&(t.numberOfConnectedCCPsInThisTab=e[t.core.tabId].length,t.numberOfConnectedCCPsInThisTab>1&&t.getLog().warn("There are "+t.numberOfConnectedCCPsInThisTab+" connected CCPs in this tab. Please adjust your implementation to avoid complications. If you are embedding CCP, please do so exclusively with initCCP. InitCCP will not let you embed more than one CCP.").sendInternalLogToServer(),t.publishMetric({name:"ConnectedCCPSingleTabCount",data:{count:t.numberOfConnectedCCPsInThisTab}})),e.tabId&&e.streamsTabsAcrossBrowser&&t.ifMaster(t.MasterTopics.METRICS,(()=>t.agent((()=>t.publishMetric({name:"CCPTabsAcrossBrowserCount",data:{tabId:e.tabId,count:e.streamsTabsAcrossBrowser}})))))})),t.core.client=new t.UpstreamConduitClient(y),t.core.masterClient=new t.UpstreamConduitMasterClient(y),t.core.getEventBus().subscribe(t.EventType.TERMINATE,y.passUpstream()),t.core.getEventBus().subscribe(t.EventType.TERMINATED,(function(){window.location.reload(!0)})),v.port.start(),y.onUpstream(t.VoiceIdEvents.UPDATE_DOMAIN_ID,(function(e){e&&e.domainId&&(t.core.voiceIdDomainId=e.domainId)})),t.agent((function(){(new t.VoiceId).getDomainId().then((function(e){t.getLog().info("voiceId domainId successfully fetched at agent initialization: "+e).sendInternalLogToServer()})).catch((function(e){t.getLog().info("voiceId domainId not fetched at agent initialization").withObject({err:e}).sendInternalLogToServer()}))})),t.core.getNotificationManager().requestPermission()}catch(e){t.getLog().error("Failed to initialize the API shared worker, we're dead!").withException(e).sendInternalLogToServer()}}},t.core._setTabId=function(){try{t.core.tabId=window.sessionStorage.getItem(t.SessionStorageKeys.TAB_ID),t.core.tabId||(t.core.tabId=t.randomId(),window.sessionStorage.setItem(t.SessionStorageKeys.TAB_ID,t.core.tabId)),t.core.upstream.sendUpstream(t.EventType.TAB_ID,{tabId:t.core.tabId})}catch(e){t.getLog().error("[Tab Id] There was an issue setting the tab Id").withException(e).sendInternalLogToServer()}},t.core.initCCP=function(n,i){if(t.core.checkNotInitialized(),!t.core.initialized){t.getLog().info("Iframe initialization started").sendInternalLogToServer();var s=Date.now();try{if(t.core._getCCPIframe())return void t.getLog().error("Attempted to call initCCP when an iframe generated by initCCP already exists").sendInternalLogToServer()}catch(e){t.getLog().error("Error while checking if initCCP has already been called").withException(e).sendInternalLogToServer()}var l={};"string"==typeof i?l.ccpUrl=i:l=i,t.assertNotNull(n,"containerDiv"),t.assertNotNull(l.ccpUrl,"params.ccpUrl"),u.clean();var p=t.core._createCCPIframe(n,l);t.core.eventBus=new t.EventBus({logEvents:!1}),t.core.agentDataProvider=new g(t.core.getEventBus()),t.core.mediaFactory=new t.MediaFactory(l);var d=new t.IFrameConduit(l.ccpUrl,window,p);t.core._sendIframeStyleDataUpstreamAfterReasonableWaitTime(p,d),t.core.upstream=d,t.core.webSocketProvider=new f,d.onAllUpstream(t.core.getEventBus().bridge()),t.core.keepaliveManager=new h(d,t.core.getEventBus(),l.ccpSynTimeout||1e3,l.ccpAckTimeout||3e3),t.core.iframeRefreshTimeout=null,t.core.ccpLoadTimeoutInstance=e.setTimeout((function(){t.core.ccpLoadTimeoutInstance=null,t.core.getEventBus().trigger(t.EventType.ACK_TIMEOUT),t.getLog().info("CCP LoadTimeout triggered").sendInternalLogToServer()}),l.ccpLoadTimeout||5e3),t.getLog().scheduleUpstreamOuterContextCCPLogsPush(d),t.getLog().scheduleUpstreamOuterContextCCPserverBoundLogsPush(d),d.onUpstream(t.EventType.ACKNOWLEDGE,(function(n){if(t.getLog().info("Acknowledged by the CCP!").sendInternalLogToServer(),t.core.client=new t.UpstreamConduitClient(d),t.core.masterClient=new t.UpstreamConduitMasterClient(d),t.core.portStreamId=n.id,(l.softphone||l.chat||l.pageOptions||l.shouldAddNamespaceToLogs)&&d.sendUpstream(t.EventType.CONFIGURE,{softphone:l.softphone,chat:l.chat,pageOptions:l.pageOptions,shouldAddNamespaceToLogs:l.shouldAddNamespaceToLogs}),t.core.ccpLoadTimeoutInstance&&(e.clearTimeout(t.core.ccpLoadTimeoutInstance),t.core.ccpLoadTimeoutInstance=null),d.sendUpstream(t.EventType.OUTER_CONTEXT_INFO,{streamsVersion:t.version}),t.core.keepaliveManager.start(),this.unsubscribe(),t.core.initialized=!0,t.core.getEventBus().trigger(t.EventType.INIT),s){var r=Date.now()-s,o=t.core.iframeRefreshAttempt||0;t.getLog().info("Iframe initialization succeeded").sendInternalLogToServer(),t.getLog().info(`Iframe initialization time ${r}`).sendInternalLogToServer(),t.getLog().info(`Iframe refresh attempts ${o}`).sendInternalLogToServer(),setTimeout((()=>{t.publishMetric({name:a,data:{count:o}}),t.publishMetric({name:c,data:{count:1}}),t.publishMetric({name:"IframeInitializationTime",data:{count:r}}),s=null}),1e3)}})),d.onUpstream(t.EventType.LOG,(function(e){e.loggerId!==t.getLog().getLoggerId()&&t.getLog().addLogEntry(t.LogEntry.fromObject(e))})),t.core.getEventBus().subscribe(t.EventType.ACK_TIMEOUT,(function(){if(!1!==l.loginPopup)try{var i=function(n){var i="https://lily.us-east-1.amazonaws.com/taw/auth/code";return t.assertNotNull(i),n.loginUrl?n.loginUrl:n.alias?(log.warn("The `alias` param is deprecated and should not be expected to function properly. Please use `ccpUrl` or `loginUrl`. See https://github.com/amazon-connect/amazon-connect-streams/blob/master/README.md#connectcoreinitccp for valid parameters."),r.replace("{alias}",n.alias).replace("{client_id}",o).replace("{redirect}",e.encodeURIComponent(i))):n.ccpUrl}(l);t.getLog().warn("ACK_TIMEOUT occurred, attempting to pop the login page if not already open.").sendInternalLogToServer(),l.loginUrl&&t.core.getPopupManager().clear(t.MasterTopics.LOGIN_POPUP),t.core.loginWindow=t.core.getPopupManager().open(i,t.MasterTopics.LOGIN_POPUP,l.loginOptions)}catch(e){t.getLog().error("ACK_TIMEOUT occurred but we are unable to open the login popup.").withException(e).sendInternalLogToServer()}if(null==t.core.iframeRefreshTimeout)try{d.onUpstream(t.EventType.ACKNOWLEDGE,(function(){this.unsubscribe(),e.clearTimeout(t.core.iframeRefreshTimeout),t.core.iframeRefreshTimeout=null,t.core.getPopupManager().clear(t.MasterTopics.LOGIN_POPUP),(l.loginPopupAutoClose||l.loginOptions&&l.loginOptions.autoClose)&&t.core.loginWindow&&(t.core.loginWindow.close(),t.core.loginWindow=null)})),t.core._refreshIframeOnTimeout(l,n)}catch(e){t.getLog().error("Error occurred while refreshing iframe").withException(e).sendInternalLogToServer()}})),l.onViewContact&&t.core.onViewContact(l.onViewContact),d.onUpstream(t.EventType.UPDATE_CONNECTED_CCPS,(function(e){t.numberOfConnectedCCPs=e.length})),d.onUpstream(t.VoiceIdEvents.UPDATE_DOMAIN_ID,(function(e){e&&e.domainId&&(t.core.voiceIdDomainId=e.domainId)})),t.core.getEventBus().subscribe(t.EventType.IFRAME_RETRIES_EXHAUSTED,(function(){if(s){var e=t.core.iframeRefreshAttempt-1;t.getLog().info("Iframe initialization failed").sendInternalLogToServer(),t.getLog().info("Time after iframe initialization started "+(Date.now()-s)).sendInternalLogToServer(),t.getLog().info(`Iframe refresh attempts ${e}`).sendInternalLogToServer(),t.publishMetric({name:a,data:{count:e}}),t.publishMetric({name:c,data:{count:0}}),s=null}})),t.core.softphoneParams=l.softphone}},t.core.onIframeRetriesExhausted=function(e){t.core.getEventBus().subscribe(t.EventType.IFRAME_RETRIES_EXHAUSTED,e)},t.core._refreshIframeOnTimeout=function(n,r){t.assertNotNull(n,"initCCPParams"),t.assertNotNull(r,"containerDiv");var o=((n.disasterRecoveryOn?1e4:5e3)+AWS.util.calculateRetryDelay(t.core.iframeRefreshAttempt-1||0,{base:2e3}))*Math.ceil((t.core.iframeRefreshAttempt||0)/6);e.clearTimeout(t.core.iframeRefreshTimeout),t.core.iframeRefreshTimeout=e.setTimeout((function(){if(t.core.iframeRefreshAttempt=(t.core.iframeRefreshAttempt||0)+1,t.core.iframeRefreshAttempt<=6){try{var o=t.core._getCCPIframe();o&&o.parentNode.removeChild(o);var i=t.core._createCCPIframe(r,n);t.core.upstream.upstream.output=i.contentWindow,t.core._sendIframeStyleDataUpstreamAfterReasonableWaitTime(i,t.core.upstream)}catch(e){t.getLog().error("Error while checking for, and recreating, the CCP IFrame").withException(e).sendInternalLogToServer()}t.core._refreshIframeOnTimeout(n,r)}else t.core.getEventBus().trigger(t.EventType.IFRAME_RETRIES_EXHAUSTED),e.clearTimeout(t.core.iframeRefreshTimeout)}),o)},t.core._getCCPIframe=function(){for(var e of window.document.getElementsByTagName("iframe"))if(e.name===n)return e;return null},t.core._createCCPIframe=function(e,r){t.assertNotNull(r,"initCCPParams"),t.assertNotNull(e,"containerDiv");var o=document.createElement("iframe");return o.src=r.ccpUrl,o.allow="microphone; autoplay; clipboard-write",o.style=r.style||"width: 100%; height: 100%",o.title=r.iframeTitle||n,o.name=n,e.appendChild(o),o},t.core._sendIframeStyleDataUpstreamAfterReasonableWaitTime=function(e,n){t.assertNotNull(e,"iframe"),t.assertNotNull(n,"conduit"),setTimeout((function(){var r={display:window.getComputedStyle(e,null).display,offsetWidth:e.offsetWidth,offsetHeight:e.offsetHeight,clientRectsLength:e.getClientRects().length};n.sendUpstream(t.EventType.IFRAME_STYLE,r)}),1e4)};var h=function(e,t,n,r){this.conduit=e,this.eventBus=t,this.synTimeout=n,this.ackTimeout=r,this.ackTimer=null,this.synTimer=null,this.ackSub=null};h.prototype.start=function(){var n=this;this.conduit.sendUpstream(t.EventType.SYNCHRONIZE),this.ackSub=this.conduit.onUpstream(t.EventType.ACKNOWLEDGE,(function(){this.unsubscribe(),e.clearTimeout(n.ackTimer),n._deferStart()})),this.ackTimer=e.setTimeout((function(){n.ackSub.unsubscribe(),n.eventBus.trigger(t.EventType.ACK_TIMEOUT),n._deferStart()}),this.ackTimeout)},h.prototype._deferStart=function(){this.synTimer=e.setTimeout(t.hitch(this,this.start),this.synTimeout)},h.prototype.deferStart=function(){null==this.synTimer&&(this.synTimer=e.setTimeout(t.hitch(this,this.start),this.synTimeout))};var f=function(){var e={initFailure:new Set,subscriptionUpdate:new Set,subscriptionFailure:new Set,topic:new Map,allMessage:new Set,connectionGain:new Set,connectionLost:new Set,connectionOpen:new Set,connectionClose:new Set},n=function(e,t){e.forEach((function(e){e(t)}))};t.core.getUpstream().onUpstream(t.WebSocketEvents.INIT_FAILURE,(function(){n(e.initFailure)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.CONNECTION_OPEN,(function(t){n(e.connectionOpen,t)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.CONNECTION_CLOSE,(function(t){n(e.connectionClose,t)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.CONNECTION_GAIN,(function(){n(e.connectionGain)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.CONNECTION_LOST,(function(t){n(e.connectionLost,t)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.SUBSCRIPTION_UPDATE,(function(t){n(e.subscriptionUpdate,t)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.SUBSCRIPTION_FAILURE,(function(t){n(e.subscriptionFailure,t)})),t.core.getUpstream().onUpstream(t.WebSocketEvents.ALL_MESSAGE,(function(t){n(e.allMessage,t),e.topic.has(t.topic)&&n(e.topic.get(t.topic),t)})),this.sendMessage=function(e){t.core.getUpstream().sendUpstream(t.WebSocketEvents.SEND,e)},this.onInitFailure=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.initFailure.add(n),function(){return e.initFailure.delete(n)}},this.onConnectionOpen=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.connectionOpen.add(n),function(){return e.connectionOpen.delete(n)}},this.onConnectionClose=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.connectionClose.add(n),function(){return e.connectionClose.delete(n)}},this.onConnectionGain=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.connectionGain.add(n),function(){return e.connectionGain.delete(n)}},this.onConnectionLost=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.connectionLost.add(n),function(){return e.connectionLost.delete(n)}},this.onSubscriptionUpdate=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.subscriptionUpdate.add(n),function(){return e.subscriptionUpdate.delete(n)}},this.onSubscriptionFailure=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.subscriptionFailure.add(n),function(){return e.subscriptionFailure.delete(n)}},this.subscribeTopics=function(e){t.assertNotNull(e,"topics"),t.assertTrue(t.isArray(e),"topics must be a array"),t.core.getUpstream().sendUpstream(t.WebSocketEvents.SUBSCRIBE,e)},this.onMessage=function(n,r){return t.assertNotNull(n,"topicName"),t.assertTrue(t.isFunction(r),"method must be a function"),e.topic.has(n)?e.topic.get(n).add(r):e.topic.set(n,new Set([r])),function(){return e.topic.get(n).delete(r)}},this.onAllMessage=function(n){return t.assertTrue(t.isFunction(n),"method must be a function"),e.allMessage.add(n),function(){return e.allMessage.delete(n)}}},g=function(e){this.bus=e,this.bus.subscribe(t.AgentEvents.UPDATE,t.hitch(this,this.updateAgentData))};g.prototype.updateAgentData=function(e){var n=this.agentData;this.agentData=e,null==n&&(t.agent.initialized=!0,this.bus.trigger(t.AgentEvents.INIT,new t.Agent)),this.bus.trigger(t.AgentEvents.REFRESH,new t.Agent),this._fireAgentUpdateEvents(n)},g.prototype.getAgentData=function(){if(null==this.agentData)throw new t.StateError("No agent data is available yet!");return this.agentData},g.prototype.getContactData=function(e){var n=this.getAgentData(),r=t.find(n.snapshot.contacts,(function(t){return t.contactId===e}));if(null==r)throw new t.StateError("Contact %s no longer exists.",e);return r},g.prototype.getConnectionData=function(e,n){var r=this.getContactData(e),o=t.find(r.connections,(function(e){return e.connectionId===n}));if(null==o)throw new t.StateError("Connection %s for contact %s no longer exists.",n,e);return o},g.prototype.getInstanceId=function(){return this.getAgentData().configuration.routingProfile.routingProfileId.match(/instance\/([0-9a-fA-F|-]+)\//)[1]},g.prototype.getAWSAccountId=function(){return this.getAgentData().configuration.routingProfile.routingProfileId.match(/:([0-9]+):instance/)[1]},g.prototype._diffContacts=function(e){var n={added:{},removed:{},common:{},oldMap:t.index(null==e?[]:e.snapshot.contacts,(function(e){return e.contactId})),newMap:t.index(this.agentData.snapshot.contacts,(function(e){return e.contactId}))};return t.keys(n.oldMap).forEach((function(e){t.contains(n.newMap,e)?n.common[e]=n.newMap[e]:n.removed[e]=n.oldMap[e]})),t.keys(n.newMap).forEach((function(e){t.contains(n.oldMap,e)||(n.added[e]=n.newMap[e])})),n},g.prototype._fireAgentUpdateEvents=function(e){var n=this,r=null,o=null==e?t.AgentAvailStates.INIT:e.snapshot.state.name,i=this.agentData.snapshot.state.name,s=null==e?t.AgentStateType.INIT:e.snapshot.state.type,a=this.agentData.snapshot.state.type;s!==a&&t.core.getAgentRoutingEventGraph().getAssociations(this,s,a).forEach((function(e){n.bus.trigger(e,new t.Agent)})),o!==i&&(this.bus.trigger(t.AgentEvents.STATE_CHANGE,{agent:new t.Agent,oldState:o,newState:i}),t.core.getAgentStateEventGraph().getAssociations(this,o,i).forEach((function(e){n.bus.trigger(e,new t.Agent)})));var c=e&&e.snapshot.nextState?e.snapshot.nextState.name:null,u=this.agentData.snapshot.nextState?this.agentData.snapshot.nextState.name:null;c!==u&&u&&n.bus.trigger(t.AgentEvents.ENQUEUED_NEXT_STATE,new t.Agent),r=null!==e?this._diffContacts(e):{added:t.index(this.agentData.snapshot.contacts,(function(e){return e.contactId})),removed:{},common:{},oldMap:{},newMap:t.index(this.agentData.snapshot.contacts,(function(e){return e.contactId}))},t.values(r.added).forEach((function(e){n.bus.trigger(t.ContactEvents.INIT,new t.Contact(e.contactId)),n._fireContactUpdateEvents(e.contactId,t.ContactStateType.INIT,e.state.type)})),t.values(r.removed).forEach((function(e){n.bus.trigger(t.ContactEvents.DESTROYED,new t.ContactSnapshot(e)),n.bus.trigger(t.core.getContactEventName(t.ContactEvents.DESTROYED,e.contactId),new t.ContactSnapshot(e)),n._unsubAllContactEventsForContact(e.contactId)})),t.keys(r.common).forEach((function(e){n._fireContactUpdateEvents(e,r.oldMap[e].state.type,r.newMap[e].state.type)}))},g.prototype._fireContactUpdateEvents=function(e,n,r){var o=this;n!==r&&t.core.getContactEventGraph().getAssociations(this,n,r).forEach((function(n){o.bus.trigger(n,new t.Contact(e)),o.bus.trigger(t.core.getContactEventName(n,e),new t.Contact(e))})),o.bus.trigger(t.ContactEvents.REFRESH,new t.Contact(e)),o.bus.trigger(t.core.getContactEventName(t.ContactEvents.REFRESH,e),new t.Contact(e))},g.prototype._unsubAllContactEventsForContact=function(e){var n=this;t.values(t.ContactEvents).forEach((function(r){n.bus.getSubscriptions(t.core.getContactEventName(r,e)).map((function(e){e.unsubscribe()}))}))},t.core.onViewContact=function(e){t.core.getUpstream().onUpstream(t.ContactEvents.VIEW,e)},t.core.viewContact=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ContactEvents.VIEW,data:{contactId:e}})},t.core.onActivateChannelWithViewType=function(e){t.core.getUpstream().onUpstream(t.ChannelViewEvents.ACTIVATE_CHANNEL_WITH_VIEW_TYPE,e)},t.core.activateChannelWithViewType=function(e,n,r,o){const i={viewType:e,mediaType:n};r&&(i.source=r),o&&(i.caseId=o),t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ChannelViewEvents.ACTIVATE_CHANNEL_WITH_VIEW_TYPE,data:i})},t.core.triggerTaskCreated=function(e){t.core.getUpstream().upstreamBus.trigger(t.TaskEvents.CREATED,e)},t.core.onAccessDenied=function(e){t.core.getUpstream().onUpstream(t.EventType.ACCESS_DENIED,e)},t.core.onAuthFail=function(e){t.core.getUpstream().onUpstream(t.EventType.AUTH_FAIL,e)},t.core.onAuthorizeSuccess=function(e){t.core.getUpstream().onUpstream(t.EventType.AUTHORIZE_SUCCESS,e)},t.core._handleAuthorizeSuccess=function(){window.sessionStorage.setItem(t.SessionStorageKeys.AUTHORIZE_RETRY_COUNT,0)},t.core._handleAuthFail=function(e,n,r){r&&r.authorize?t.core._handleAuthorizeFail(e):t.core._handleCTIAuthFail(n)},t.core._handleAuthorizeFail=function(e){let n=t.core._getAuthRetryCount();if(!t.core.authorizeTimeoutId)if(n{t.core._redirectToLogin(e)}),r)}else t.getLog().warn("We have exhausted our authorization retries due to 401s from the authorize api. No more retries will be attempted in this session until the authorize api returns 200.").sendInternalLogToServer(),t.core.getEventBus().trigger(t.EventType.AUTHORIZE_RETRIES_EXHAUSTED)},t.core._redirectToLogin=function(e){"string"==typeof e?location.assign(e):location.reload()},t.core._handleCTIAuthFail=function(e){if(!t.core.ctiTimeoutId)if(t.core.ctiAuthRetryCount{t.core.authorize(e).then(t.core._triggerAuthorizeSuccess.bind(t.core)).catch(t.core._triggerAuthFail.bind(t.core,{authorize:!0})),t.core.ctiTimeoutId=null}),n)}else t.getLog().warn("We have exhausted our authorization retries due to 401s from the CTI service. No more retries will be attempted until the page is refreshed.").sendInternalLogToServer(),t.core.getEventBus().trigger(t.EventType.CTI_AUTHORIZE_RETRIES_EXHAUSTED)},t.core._triggerAuthorizeSuccess=function(){t.core.getUpstream().upstreamBus.trigger(t.EventType.AUTHORIZE_SUCCESS)},t.core._triggerAuthFail=function(e){t.core.getUpstream().upstreamBus.trigger(t.EventType.AUTH_FAIL,e)},t.core._getAuthRetryCount=function(){let e=window.sessionStorage.getItem(t.SessionStorageKeys.AUTHORIZE_RETRY_COUNT);if(null!==e){if(isNaN(parseInt(e)))throw new t.StateError("The session storage value for auth retry count was NaN");return parseInt(e)}return window.sessionStorage.setItem(t.SessionStorageKeys.AUTHORIZE_RETRY_COUNT,0),0},t.core._incrementAuthRetryCount=function(){window.sessionStorage.setItem(t.SessionStorageKeys.AUTHORIZE_RETRY_COUNT,(t.core._getAuthRetryCount()+1).toString())},t.core.onAuthorizeRetriesExhausted=function(e){t.core.getEventBus().subscribe(t.EventType.AUTHORIZE_RETRIES_EXHAUSTED,e)},t.core.onCTIAuthorizeRetriesExhausted=function(e){t.core.getEventBus().subscribe(t.EventType.CTI_AUTHORIZE_RETRIES_EXHAUSTED,e)},t.core.onSoftphoneSessionInit=function(e){t.core.getUpstream().onUpstream(t.ConnectionEvents.SESSION_INIT,e)},t.core.onConfigure=function(e){t.core.getUpstream().onUpstream(t.ConfigurationEvents.CONFIGURE,e)},t.core.onInitialized=function(e){t.core.getEventBus().subscribe(t.EventType.INIT,e)},t.core.getContactEventName=function(e,n){if(t.assertNotNull(e,"eventName"),t.assertNotNull(n,"contactId"),!t.contains(t.values(t.ContactEvents),e))throw new t.ValueError("%s is not a valid contact event.",e);return t.sprintf("%s::%s",e,n)},t.core.getEventBus=function(){return t.core.eventBus},t.core.getWebSocketManager=function(){return t.core.webSocketProvider},t.core.getAgentDataProvider=function(){return t.core.agentDataProvider},t.core.getLocalTimestamp=function(){return t.core.getAgentDataProvider().getAgentData().snapshot.localTimestamp},t.core.getSkew=function(){return t.core.getAgentDataProvider().getAgentData().snapshot.skew},t.core.getAgentRoutingEventGraph=function(){return t.core.agentRoutingEventGraph},t.core.agentRoutingEventGraph=(new t.EventGraph).assoc(t.EventGraph.ANY,t.AgentStateType.ROUTABLE,t.AgentEvents.ROUTABLE).assoc(t.EventGraph.ANY,t.AgentStateType.NOT_ROUTABLE,t.AgentEvents.NOT_ROUTABLE).assoc(t.EventGraph.ANY,t.AgentStateType.OFFLINE,t.AgentEvents.OFFLINE),t.core.getAgentStateEventGraph=function(){return t.core.agentStateEventGraph},t.core.agentStateEventGraph=(new t.EventGraph).assoc(t.EventGraph.ANY,t.values(t.AgentErrorStates),t.AgentEvents.ERROR).assoc(t.EventGraph.ANY,t.AgentAvailStates.AFTER_CALL_WORK,t.AgentEvents.ACW),t.core.getContactEventGraph=function(){return t.core.contactEventGraph},t.core.contactEventGraph=(new t.EventGraph).assoc(t.EventGraph.ANY,t.ContactStateType.INCOMING,t.ContactEvents.INCOMING).assoc(t.EventGraph.ANY,t.ContactStateType.PENDING,t.ContactEvents.PENDING).assoc(t.EventGraph.ANY,t.ContactStateType.CONNECTING,t.ContactEvents.CONNECTING).assoc(t.EventGraph.ANY,t.ContactStateType.CONNECTED,t.ContactEvents.CONNECTED).assoc(t.ContactStateType.CONNECTING,t.ContactStateType.ERROR,t.ContactEvents.MISSED).assoc(t.ContactStateType.INCOMING,t.ContactStateType.ERROR,t.ContactEvents.MISSED).assoc(t.EventGraph.ANY,t.ContactStateType.ENDED,t.ContactEvents.ACW).assoc(t.values(t.CONTACT_ACTIVE_STATES),t.values(t.relativeComplement(t.CONTACT_ACTIVE_STATES,t.ContactStateType)),t.ContactEvents.ENDED).assoc(t.EventGraph.ANY,t.ContactStateType.ERROR,t.ContactEvents.ERROR).assoc(t.ContactStateType.CONNECTING,t.ContactStateType.MISSED,t.ContactEvents.MISSED),t.core.getClient=function(){if(!t.core.client)throw new t.StateError("The connect core has not been initialized!");return t.core.client},t.core.client=null,t.core.getAgentAppClient=function(){if(!t.core.agentAppClient)throw new t.StateError("The connect AgentApp Client has not been initialized!");return t.core.agentAppClient},t.core.agentAppClient=null,t.core.getTaskTemplatesClient=function(){if(!t.core.taskTemplatesClient)throw new t.StateError("The connect TaskTemplates Client has not been initialized!");return t.core.taskTemplatesClient},t.core.taskTemplatesClient=null,t.core.getMasterClient=function(){if(!t.core.masterClient)throw new t.StateError("The connect master client has not been initialized!");return t.core.masterClient},t.core.masterClient=null,t.core.getSoftphoneManager=function(){return t.core.softphoneManager},t.core.softphoneManager=null,t.core.getNotificationManager=function(){return t.core.notificationManager||(t.core.notificationManager=new t.NotificationManager),t.core.notificationManager},t.core.notificationManager=null,t.core.getPopupManager=function(){return t.core.popupManager},t.core.popupManager=new t.PopupManager,t.core.getUpstream=function(){if(!t.core.upstream)throw new t.StateError("There is no upstream conduit!");return t.core.upstream},t.core.upstream=null,t.core.AgentDataProvider=g}()},592:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t;var n="<>",r=t.makeEnum(["acknowledge","ack_timeout","init","api_request","api_response","auth_fail","access_denied","close","configure","log","master_request","master_response","synchronize","terminate","terminated","send_logs","reload_agent_configuration","broadcast","api_metric","client_metric","softphone_stats","softphone_report","client_side_logs","server_bound_internal_log","mute","iframe_style","iframe_retries_exhausted","update_connected_ccps","outer_context_info","media_device_request","media_device_response","tab_id","authorize_success","authorize_retries_exhausted","cti_authorize_retries_exhausted","click_stream_data"]),o=t.makeNamespacedEnum("connect",["loginPopup","sendLogs","softphone","ringtone","metrics"]),i=t.makeNamespacedEnum("agent",["init","update","refresh","routable","not_routable","pending","contact_pending","offline","error","softphone_error","websocket_connection_lost","websocket_connection_gained","state_change","acw","mute_toggle","local_media_stream_created","enqueued_next_state"]),s=t.makeNamespacedEnum("webSocket",["init_failure","connection_open","connection_close","connection_error","connection_gain","connection_lost","subscription_update","subscription_failure","all_message","send","subscribe"]),a=t.makeNamespacedEnum("contact",["init","refresh","destroyed","incoming","pending","connecting","connected","missed","acw","view","ended","error","accepted"]),c=t.makeNamespacedEnum("taskList",["activate_channel_with_view_type"]),u=t.makeNamespacedEnum("task",["created"]),l=t.makeNamespacedEnum("connection",["session_init","ready_to_start_session"]),p=t.makeNamespacedEnum("configuration",["configure","set_speaker_device","set_microphone_device","set_ringer_device","speaker_device_changed","microphone_device_changed","ringer_device_changed"]),d=t.makeNamespacedEnum("voiceId",["update_domain_id"]),h=function(){};h.createRequest=function(e,n,r){return{event:e,requestId:t.randomId(),method:n,params:r}},h.createResponse=function(e,t,n,r){return{event:e,requestId:t.requestId,data:n,err:r||null}};var f=function(e,n,r){this.subMap=e,this.id=t.randomId(),this.eventName=n,this.f=r};f.prototype.unsubscribe=function(){this.subMap.unsubscribe(this.eventName,this.id)};var g=function(){this.subIdMap={},this.subEventNameMap={}};g.prototype.subscribe=function(e,t){var n=new f(this,e,t);this.subIdMap[n.id]=n;var r=this.subEventNameMap[e]||[];return r.push(n),this.subEventNameMap[e]=r,n},g.prototype.unsubscribe=function(e,n){t.contains(this.subEventNameMap,e)&&(this.subEventNameMap[e]=this.subEventNameMap[e].filter((function(e){return e.id!==n})),this.subEventNameMap[e].length<1&&delete this.subEventNameMap[e]),t.contains(this.subIdMap,n)&&delete this.subIdMap[n]},g.prototype.getAllSubscriptions=function(){return t.values(this.subEventNameMap).reduce((function(e,t){return e.concat(t)}),[])},g.prototype.getSubscriptions=function(e){return this.subEventNameMap[e]||[]};var m=function(e){var t=e||{};this.subMap=new g,this.logEvents=t.logEvents||!1};m.prototype.subscribe=function(e,n){return t.assertNotNull(e,"eventName"),t.assertNotNull(n,"f"),t.assertTrue(t.isFunction(n),"f must be a function"),this.subMap.subscribe(e,n)},m.prototype.subscribeAll=function(e){return t.assertNotNull(e,"f"),t.assertTrue(t.isFunction(e),"f must be a function"),this.subMap.subscribe(n,e)},m.prototype.getSubscriptions=function(e){return this.subMap.getSubscriptions(e)},m.prototype.trigger=function(e,r){t.assertNotNull(e,"eventName");var o=this,i=this.subMap.getSubscriptions(n),s=this.subMap.getSubscriptions(e);this.logEvents&&e!==t.EventType.LOG&&e!==t.EventType.MASTER_RESPONSE&&e!==t.EventType.API_METRIC&&e!==t.EventType.SERVER_BOUND_INTERNAL_LOG&&t.getLog().trace("Publishing event: %s",e).sendInternalLogToServer(),e.startsWith(t.ContactEvents.ACCEPTED)&&r&&r.contactId&&!(r instanceof t.Contact)&&(r=new t.Contact(r.contactId)),i.concat(s).forEach((function(n){try{n.f(r||null,e,o)}catch(n){t.getLog().error("'%s' event handler failed.",e).withException(n).sendInternalLogToServer()}}))},m.prototype.bridge=function(){var e=this;return function(t,n){e.trigger(n,t)}},m.prototype.unsubscribeAll=function(){this.subMap.getAllSubscriptions().forEach((function(e){e.unsubscribe()}))},t.EventBus=m,t.EventFactory=h,t.EventType=r,t.AgentEvents=i,t.ConfigurationEvents=p,t.ConnectionEvents=l,t.ConnnectionEvents=l,t.ContactEvents=a,t.ChannelViewEvents=c,t.TaskEvents=u,t.VoiceIdEvents=d,t.WebSocketEvents=s,t.MasterTopics=o}()},286:()=>{!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";var r=n(1),o="DEBUG",i="AMZ_WEB_SOCKET_MANAGER:",s="Network offline",a="Network online, connecting to WebSocket server",c="Network offline, ignoring this getWebSocketConnConfig request",u="Heartbeat response not received",l="Failed to send heartbeat since WebSocket is not open",p="WebSocket connection established!",d="WebSocket connection is closed",h="WebSocketManager Error, error_event: ",f="Scheduling WebSocket reinitialization, after delay ",g="WebSocket URL cannot be used to establish connection",m="WebSocket Initialization failed - Terminating and cleaning subscriptions",v="Fetching new WebSocket connection configuration",y="Successfully fetched webSocket connection configuration",E="Failed to fetch webSocket connection configuration",S="Retrying fetching new WebSocket connection configuration",b="Initializing Websocket Manager",T="WebSocketManager Message Error",C="Message received for topic ",I="Invalid incoming message",_="aws/subscribe",A="aws/heartbeat",w="disconnected";function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var k={assertTrue:function(e,t){if(!e)throw new Error(t)},assertNotNull:function(e,t){return k.assertTrue(null!==e&&void 0!==R(e),Object(r.sprintf)("%s must be provided",t||"A value")),e},isNonEmptyString:function(e){return"string"==typeof e&&e.length>0},assertIsList:function(e,t){if(!Array.isArray(e))throw new Error(t+" is not an array")},isFunction:function(e){return!!(e&&e.constructor&&e.call&&e.apply)},isObject:function(e){return!("object"!==R(e)||null===e)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e}},N=new RegExp("^(wss://)\\w*");k.validWSUrl=function(e){return N.test(e)},k.getSubscriptionResponse=function(e,t,n){return{topic:e,content:{status:t?"success":"failure",topics:n}}},k.assertIsObject=function(e,t){if(!k.isObject(e))throw new Error(t+" is not an object!")},k.addJitter=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;t=Math.min(t,1);var n=Math.random()>.5?1:-1;return Math.floor(e+n*e*Math.random()*t)},k.isNetworkOnline=function(){return navigator.onLine},k.isNetworkFailure=function(e){return!(!e._debug||!e._debug.type)&&"NetworkingError"===e._debug.type};var L=k;function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t){for(var n=0;n=this._level}},{key:"hasClientLogger",value:function(){return null!==this._clientLogger}},{key:"getLogger",value:function(e){var t=e.prefix||q;return this._logsDestination===o?this.consoleLoggerWrapper:new W(t)}},{key:"updateLoggerConfig",value:function(e){var t=e||{};this._level=t.level||j.INFO,this._advancedLogWriter="warn",t.advancedLogWriter&&(this._advancedLogWriter=t.advancedLogWriter),t.customizedLogger&&"object"===P(t.customizedLogger)&&(this.useClientLogger=!0),this._clientLogger=t.logger||this.selectLogger(t),this._logsDestination="NULL",t.debug&&(this._logsDestination=o),t.logger&&(this._logsDestination="CLIENT_LOGGER")}},{key:"selectLogger",value:function(e){return e.customizedLogger&&"object"===P(e.customizedLogger)?e.customizedLogger:e.useDefaultLogger?(this.consoleLoggerWrapper=H(),this.consoleLoggerWrapper):null}}]),e}(),V=function(){function e(){x(this,e)}return U(e,[{key:"debug",value:function(){}},{key:"info",value:function(){}},{key:"warn",value:function(){}},{key:"error",value:function(){}},{key:"advancedLog",value:function(){}}]),e}(),W=function(e){function t(e){var n;return x(this,t),(n=function(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,O(t).call(this))).prefix=e||q,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(t,V),U(t,[{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:2e3;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.numAttempts=0,this.executor=t,this.hasActiveReconnection=!1,this.defaultRetry=n}var t,n;return t=e,(n=[{key:"retry",value:function(){var e=this;this.hasActiveReconnection||(this.hasActiveReconnection=!0,setTimeout((function(){e._execute()}),this._getDelay()))}},{key:"_execute",value:function(){this.hasActiveReconnection=!1,this.executor(),this.numAttempts++}},{key:"connected",value:function(){this.numAttempts=0}},{key:"_getDelay",value:function(){var e=Math.pow(2,this.numAttempts)*this.defaultRetry;return e<=3e4?e:3e4}},{key:"getIsConnected",value:function(){return!this.numAttempts}}])&&G(t.prototype,n),e}();n.d(t,"a",(function(){return Y}));var X=function(){var e=z.getLogger({prefix:i}),t=L.isNetworkOnline(),n={primary:null,secondary:null},r={reconnectWebSocket:!0,websocketInitFailed:!1,exponentialBackOffTime:1e3,exponentialTimeoutHandle:null,lifeTimeTimeoutHandle:null,webSocketInitCheckerTimeoutId:null,connState:null},o={connectWebSocketRetryCount:0,connectionAttemptStartTime:null,noOpenConnectionsTimestamp:null},R={pendingResponse:!1,intervalHandle:null},k={initFailure:new Set,getWebSocketTransport:null,subscriptionUpdate:new Set,subscriptionFailure:new Set,topic:new Map,allMessage:new Set,connectionGain:new Set,connectionLost:new Set,connectionOpen:new Set,connectionClose:new Set},N={connConfig:null,promiseHandle:null,promiseCompleted:!0},O={subscribed:new Set,pending:new Set,subscriptionHistory:new Set},D={responseCheckIntervalId:null,requestCompleted:!0,reSubscribeIntervalId:null,consecutiveFailedSubscribeAttempts:0,consecutiveNoResponseRequest:0},P=new K((function(){se()})),x=new Set([_,"aws/unsubscribe",A]),M=setInterval((function(){if(t!==L.isNetworkOnline()){if(!(t=L.isNetworkOnline()))return e.advancedLog(s),void ue(e.info(s));var n=W();t&&(!n||j(n,WebSocket.CLOSING)||j(n,WebSocket.CLOSED))&&(e.advancedLog(a),ue(e.info(a)),se())}}),250),U=function(t,n){t.forEach((function(t){try{t(n)}catch(t){ue(e.error("Error executing callback",t))}}))},F=function(e){if(null===e)return"NULL";switch(e.readyState){case WebSocket.CONNECTING:return"CONNECTING";case WebSocket.OPEN:return"OPEN";case WebSocket.CLOSING:return"CLOSING";case WebSocket.CLOSED:return"CLOSED";default:return"UNDEFINED"}},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";ue(e.debug("["+t+"] Primary WebSocket: "+F(n.primary)+" | Secondary WebSocket: "+F(n.secondary)))},j=function(e,t){return e&&e.readyState===t},B=function(e){return j(e,WebSocket.OPEN)},V=function(e){return null===e||void 0===e.readyState||j(e,WebSocket.CLOSED)},W=function(){return null!==n.secondary?n.secondary:n.primary},H=function(){return B(W())},G=function(){if(R.pendingResponse)return e.advancedLog(u),ue(e.warn(u)),clearInterval(R.intervalHandle),R.pendingResponse=!1,void se();H()?(ue(e.debug("Sending heartbeat")),W().send(oe(A)),R.pendingResponse=!0):(e.advancedLog(l),ue(e.warn(l)),q("sendHeartBeat"),se())},X=function(){e.advancedLog("Reset Websocket state"),r.exponentialBackOffTime=1e3,R.pendingResponse=!1,r.reconnectWebSocket=!0,clearTimeout(r.lifeTimeTimeoutHandle),clearInterval(R.intervalHandle),clearTimeout(r.exponentialTimeoutHandle),clearTimeout(r.webSocketInitCheckerTimeoutId)},Y=function(){D.consecutiveFailedSubscribeAttempts=0,D.consecutiveNoResponseRequest=0,clearInterval(D.responseCheckIntervalId),clearInterval(D.reSubscribeIntervalId)},J=function(){o.connectWebSocketRetryCount=0,o.connectionAttemptStartTime=null,o.noOpenConnectionsTimestamp=null},Q=function(){P.connected();try{e.advancedLog(p),ue(e.info(p)),q("webSocketOnOpen"),null!==r.connState&&r.connState!==w||U(k.connectionGain),r.connState="connected";var t=Date.now();U(k.connectionOpen,{connectWebSocketRetryCount:o.connectWebSocketRetryCount,connectionAttemptStartTime:o.connectionAttemptStartTime,noOpenConnectionsTimestamp:o.noOpenConnectionsTimestamp,connectionEstablishedTime:t,timeToConnect:t-o.connectionAttemptStartTime,timeWithoutConnection:o.noOpenConnectionsTimestamp?t-o.noOpenConnectionsTimestamp:null}),J(),X(),W().openTimestamp=Date.now(),0===O.subscribed.size&&B(n.secondary)&&te(n.primary,"[Primary WebSocket] Closing WebSocket"),(O.subscribed.size>0||O.pending.size>0)&&(B(n.secondary)&&ue(e.info("Subscribing secondary websocket to topics of primary websocket")),O.subscribed.forEach((function(e){O.subscriptionHistory.add(e),O.pending.add(e)})),O.subscribed.clear(),ee()),G(),R.intervalHandle=setInterval(G,1e4);var i=1e3*N.connConfig.webSocketTransport.transportLifeTimeInSeconds;ue(e.debug("Scheduling WebSocket manager reconnection, after delay "+i+" ms")),r.lifeTimeTimeoutHandle=setTimeout((function(){ue(e.debug("Starting scheduled WebSocket manager reconnection")),se()}),i)}catch(t){ue(e.error("Error after establishing WebSocket connection",t))}},Z=function(t){q("webSocketOnError"),e.advancedLog(h,JSON.stringify(t)),ue(e.error(h,JSON.stringify(t))),P.getIsConnected()?se():P.retry()},$=function(t){var r=JSON.parse(t.data);switch(r.topic){case _:if(ue(e.debug("Subscription Message received from webSocket server",t.data)),D.requestCompleted=!0,D.consecutiveNoResponseRequest=0,"success"===r.content.status)D.consecutiveFailedSubscribeAttempts=0,r.content.topics.forEach((function(e){O.subscriptionHistory.delete(e),O.pending.delete(e),O.subscribed.add(e)})),0===O.subscriptionHistory.size?B(n.secondary)&&(ue(e.info("Successfully subscribed secondary websocket to all topics of primary websocket")),te(n.primary,"[Primary WebSocket] Closing WebSocket")):ee(),U(k.subscriptionUpdate,r);else{if(clearInterval(D.reSubscribeIntervalId),++D.consecutiveFailedSubscribeAttempts,5===D.consecutiveFailedSubscribeAttempts)return U(k.subscriptionFailure,r),void(D.consecutiveFailedSubscribeAttempts=0);D.reSubscribeIntervalId=setInterval((function(){ee()}),500)}break;case A:ue(e.debug("Heartbeat response received")),R.pendingResponse=!1;break;default:if(r.topic){if(e.advancedLog(C,r.topic),ue(e.debug(C+r.topic)),B(n.primary)&&B(n.secondary)&&0===O.subscriptionHistory.size&&this===n.primary)return void ue(e.warn("Ignoring Message for Topic "+r.topic+", to avoid duplicates"));if(0===k.allMessage.size&&0===k.topic.size)return void ue(e.warn("No registered callback listener for Topic",r.topic));e.advancedLog("WebsocketManager invoke callbacks for topic success ",r.topic),U(k.allMessage,r),k.topic.has(r.topic)&&U(k.topic.get(r.topic),r)}else r.message?(e.advancedLog(T,r),ue(e.warn(T,r))):(e.advancedLog(I,r),ue(e.warn(I,r)))}},ee=function t(){if(D.consecutiveNoResponseRequest>3)return ue(e.warn("Ignoring subscribePendingTopics since we have exhausted max subscription retries with no response")),void U(k.subscriptionFailure,L.getSubscriptionResponse(_,!1,Array.from(O.pending)));H()?0!==Array.from(O.pending).length&&(clearInterval(D.responseCheckIntervalId),W().send(oe(_,{topics:Array.from(O.pending)})),D.requestCompleted=!1,D.responseCheckIntervalId=setInterval((function(){D.requestCompleted||(++D.consecutiveNoResponseRequest,t())}),1e3)):ue(e.warn("Ignoring subscribePendingTopics call since Default WebSocket is not open"))},te=function(t,n){j(t,WebSocket.CONNECTING)||j(t,WebSocket.OPEN)?t.close(1e3,n):ue(e.warn("Ignoring WebSocket Close request, WebSocket State: "+F(t)))},ne=function(e){te(n.primary,"[Primary] WebSocket "+e),te(n.secondary,"[Secondary] WebSocket "+e)},re=function(t){X(),Y(),e.advancedLog(m,t),ue(e.error(m)),r.websocketInitFailed=!0,ne("Terminating WebSocket Manager"),clearInterval(M),U(k.initFailure,{connectWebSocketRetryCount:o.connectWebSocketRetryCount,connectionAttemptStartTime:o.connectionAttemptStartTime,reason:t}),J()},oe=function(e,t){return JSON.stringify({topic:e,content:t})},ie=function(t){return!!(L.isObject(t)&&L.isObject(t.webSocketTransport)&&L.isNonEmptyString(t.webSocketTransport.url)&&L.validWSUrl(t.webSocketTransport.url)&&1e3*t.webSocketTransport.transportLifeTimeInSeconds>=3e5)||(ue(e.error("Invalid WebSocket Connection Configuration",t)),!1)},se=function(){if(!L.isNetworkOnline())return e.advancedLog(c),void ue(e.info(c));if(r.websocketInitFailed)ue(e.debug("WebSocket Init had failed, ignoring this getWebSocketConnConfig request"));else{if(N.promiseCompleted)return X(),e.advancedLog(v),ue(e.info(v)),o.connectionAttemptStartTime=o.connectionAttemptStartTime||Date.now(),N.promiseCompleted=!1,N.promiseHandle=k.getWebSocketTransport(),N.promiseHandle.then((function(t){return N.promiseCompleted=!0,e.advancedLog(y),ue(e.debug(y,t)),ie(t)?(N.connConfig=t,N.connConfig.urlConnValidTime=Date.now()+85e3,ae()):(re("Invalid WebSocket connection configuration: "+t),{webSocketConnectionFailed:!0})}),(function(t){return N.promiseCompleted=!0,e.advancedLog(E),ue(e.error(E,t)),L.isNetworkFailure(t)?(e.advancedLog(S+JSON.stringify(t)),ue(e.info(S+JSON.stringify(t))),P.retry()):re("Failed to fetch webSocket connection configuration: "+JSON.stringify(t)),{webSocketConnectionFailed:!0}}));ue(e.debug("There is an ongoing getWebSocketConnConfig request, this request will be ignored"))}},ae=function(){if(r.websocketInitFailed)return ue(e.info("web-socket initializing had failed, aborting re-init")),{webSocketConnectionFailed:!0};if(!L.isNetworkOnline())return ue(e.warn("System is offline aborting web-socket init")),{webSocketConnectionFailed:!0};e.advancedLog(b),ue(e.info(b)),q("initWebSocket");try{if(ie(N.connConfig)){var t=null;return B(n.primary)?(ue(e.debug("Primary Socket connection is already open")),j(n.secondary,WebSocket.CONNECTING)||(ue(e.debug("Establishing a secondary web-socket connection")),P.numAttempts=0,n.secondary=ce()),t=n.secondary):(j(n.primary,WebSocket.CONNECTING)||(ue(e.debug("Establishing a primary web-socket connection")),n.primary=ce()),t=n.primary),r.webSocketInitCheckerTimeoutId=setTimeout((function(){B(t)||function(){o.connectWebSocketRetryCount++;var t=L.addJitter(r.exponentialBackOffTime,.3);Date.now()+t<=N.connConfig.urlConnValidTime?(e.advancedLog(f),ue(e.debug(f+t+" ms")),r.exponentialTimeoutHandle=setTimeout((function(){return ae()}),t),r.exponentialBackOffTime*=2):(e.advancedLog(g),ue(e.warn(g)),se())}()}),1e3),{webSocketConnectionFailed:!1}}}catch(t){return ue(e.error("Error Initializing web-socket-manager",t)),re("Failed to initialize new WebSocket: "+t.message),{webSocketConnectionFailed:!0}}},ce=function(){var t=new WebSocket(N.connConfig.webSocketTransport.url);return t.addEventListener("open",Q),t.addEventListener("message",$),t.addEventListener("error",Z),t.addEventListener("close",(function(i){return function(t,i){e.advancedLog(d,JSON.stringify(t)),ue(e.info(d,JSON.stringify(t))),q("webSocketOnClose before-cleanup"),U(k.connectionClose,{openTimestamp:i.openTimestamp,closeTimestamp:Date.now(),connectionDuration:Date.now()-i.openTimestamp,code:t.code,reason:t.reason}),V(n.primary)&&(n.primary=null),V(n.secondary)&&(n.secondary=null),r.reconnectWebSocket&&(B(n.primary)||B(n.secondary)?V(n.primary)&&B(n.secondary)&&(ue(e.info("[Primary] WebSocket Cleanly Closed")),n.primary=n.secondary,n.secondary=null):(ue(e.warn("Neither primary websocket and nor secondary websocket have open connections, attempting to re-establish connection")),r.connState===w?ue(e.info("Ignoring connectionLost callback invocation")):(U(k.connectionLost,{openTimestamp:i.openTimestamp,closeTimestamp:Date.now(),connectionDuration:Date.now()-i.openTimestamp,code:t.code,reason:t.reason}),o.noOpenConnectionsTimestamp=Date.now()),r.connState=w,se()),q("webSocketOnClose after-cleanup"))}(i,t)})),t},ue=function(e){return e&&"function"==typeof e.sendInternalLogToServer&&e.sendInternalLogToServer(),e};this.init=function(t){if(L.assertTrue(L.isFunction(t),"transportHandle must be a function"),null===k.getWebSocketTransport)return k.getWebSocketTransport=t,se();ue(e.warn("Web Socket Manager was already initialized"))},this.onInitFailure=function(t){return e.advancedLog("Initializing Websocket Manager Failed!"),L.assertTrue(L.isFunction(t),"cb must be a function"),k.initFailure.add(t),r.websocketInitFailed&&t(),function(){return k.initFailure.delete(t)}},this.onConnectionOpen=function(t){return e.advancedLog("Websocket connection open"),L.assertTrue(L.isFunction(t),"cb must be a function"),k.connectionOpen.add(t),function(){return k.connectionOpen.delete(t)}},this.onConnectionClose=function(t){return e.advancedLog("Websocket connection close"),L.assertTrue(L.isFunction(t),"cb must be a function"),k.connectionClose.add(t),function(){return k.connectionClose.delete(t)}},this.onConnectionGain=function(t){return e.advancedLog("Websocket connection gain"),L.assertTrue(L.isFunction(t),"cb must be a function"),k.connectionGain.add(t),H()&&t(),function(){return k.connectionGain.delete(t)}},this.onConnectionLost=function(t){return e.advancedLog("Websocket connection lost"),L.assertTrue(L.isFunction(t),"cb must be a function"),k.connectionLost.add(t),r.connState===w&&t(),function(){return k.connectionLost.delete(t)}},this.onSubscriptionUpdate=function(e){return L.assertTrue(L.isFunction(e),"cb must be a function"),k.subscriptionUpdate.add(e),function(){return k.subscriptionUpdate.delete(e)}},this.onSubscriptionFailure=function(t){return e.advancedLog("Websocket subscription failure"),L.assertTrue(L.isFunction(t),"cb must be a function"),k.subscriptionFailure.add(t),function(){return k.subscriptionFailure.delete(t)}},this.onMessage=function(e,t){return L.assertNotNull(e,"topicName"),L.assertTrue(L.isFunction(t),"cb must be a function"),k.topic.has(e)?k.topic.get(e).add(t):k.topic.set(e,new Set([t])),function(){return k.topic.get(e).delete(t)}},this.onAllMessage=function(e){return L.assertTrue(L.isFunction(e),"cb must be a function"),k.allMessage.add(e),function(){return k.allMessage.delete(e)}},this.subscribeTopics=function(e){L.assertNotNull(e,"topics"),L.assertIsList(e),e.forEach((function(e){O.subscribed.has(e)||O.pending.add(e)})),D.consecutiveNoResponseRequest=0,ee()},this.sendMessage=function(t){if(L.assertIsObject(t,"payload"),void 0===t.topic||x.has(t.topic))ue(e.warn("Cannot send message, Invalid topic",t));else{try{t=JSON.stringify(t)}catch(n){return void ue(e.warn("Error stringify message",t))}H()?W().send(t):ue(e.warn("Cannot send message, web socket connection is not open"))}},this.closeWebSocket=function(){X(),Y(),r.reconnectWebSocket=!1,clearInterval(M),ne("User request to close WebSocket")},this.terminateWebSocketManager=re},Y={create:function(){return new X},setGlobalConfig:function(e){var t=e&&e.loggerConfig;z.updateLoggerConfig(t)},LogLevel:j,Logger:F}},function(e,t,n){var r;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return function(e,t){var n,r,s,a,c,u,l,p,d,h=1,f=e.length,g="";for(r=0;r=0),a.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,a.width?parseInt(a.width):0);break;case"e":n=a.precision?parseFloat(n).toExponential(a.precision):parseFloat(n).toExponential();break;case"f":n=a.precision?parseFloat(n).toFixed(a.precision):parseFloat(n);break;case"g":n=a.precision?String(Number(n.toPrecision(a.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a.precision?n.substring(0,a.precision):n;break;case"t":n=String(!!n),n=a.precision?n.substring(0,a.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a.precision?n.substring(0,a.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a.precision?n.substring(0,a.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}o.json.test(a.type)?g+=n:(!o.number.test(a.type)||p&&!a.sign?d="":(d=p?"+":"-",n=n.toString().replace(o.sign,"")),u=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",l=a.width-(d+n).length,c=a.width&&l>0?u.repeat(l):"",g+=a.align?d+n+c:"0"===u?d+c+n:c+d+n)}return g}(function(e){if(a[e])return a[e];for(var t,n=e,r=[],i=0;n;){if(null!==(t=o.text.exec(n)))r.push(t[0]);else if(null!==(t=o.modulo.exec(n)))r.push("%");else{if(null===(t=o.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var s=[],c=t[2],u=[];if(null===(u=o.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(u[1]);""!==(c=c.substring(u[0].length));)if(null!==(u=o.key_access.exec(c)))s.push(u[1]);else{if(null===(u=o.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(u[1])}t[2]=s}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return a[e]=r}(e),arguments)}function s(e,t){return i.apply(null,[e].concat(t||[]))}var a=Object.create(null);t.sprintf=i,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=s,void 0===(r=function(){return{sprintf:i,vsprintf:s}}.call(t,n,t,e))||(e.exports=r))}()},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"WebSocketManager",(function(){return o}));var r=n(0);e.connect=e.connect||{},connect.WebSocketManager=r.a;var o=r.a}.call(this,n(3))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}])},151:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t;var n={TEST:"TEST",TRACE:"TRACE",DEBUG:"DEBUG",INFO:"INFO",LOG:"LOG",WARN:"WARN",ERROR:"ERROR",CRITICAL:"CRITICAL"},r={CCP:"ccp",SOFTPHONE:"softphone",CHAT:"chat",TASK:"task"},o={TEST:0,TRACE:10,DEBUG:20,INFO:30,LOG:40,WARN:50,ERROR:100,CRITICAL:200},i={TRACE:function(e){console.info(e)},DEBUG:function(e){console.info(e)},INFO:function(e){console.info(e)},LOG:function(e){console.log(e)},TEST:function(e){console.log(e)},WARN:function(e){console.warn(e)},ERROR:function(e){console.error(e)},CRITICAL:function(e){console.error(e)}},s=function(e){var t,n,o=Array.prototype.slice.call(e,0),i=o.shift();return function(e){return-1!==Object.values(r).indexOf(e)}(i)?(n=i,t=o.shift()):(t=i,n=r.CCP),{format:t,component:n,args:o}},a=function(e,n,r,o){this.component=e,this.level=n,this.text=r,this.time=new Date,this.exception=null,this.objects=[],this.line=0,this.agentResourceId=null;try{t.agent.initialized&&(this.agentResourceId=(new t.Agent)._getResourceId())}catch(e){console.log("Issue finding agentResourceId: ",e)}this.loggerId=o};a.fromObject=function(e){var t=new a(r.CCP,e.level,e.text,e.loggerId);return"[object Date]"===Object.prototype.toString.call(e.time)?t.time=new Date(e.time.getTime()):"number"==typeof e.time?t.time=new Date(e.time):"string"==typeof e.time?t.time=Date.parse(e.time):t.time=new Date,t.exception=e.exception,t.objects=e.objects,t};var c=function(e){var t=/AuthToken.*\=/g;e&&"object"==typeof e&&Object.keys(e).forEach((function(n){"object"==typeof e[n]?c(e[n]):"string"==typeof e[n]&&("url"===n||"text"===n?e[n]=e[n].replace(t,"[redacted]"):["quickConnectName"].includes(n)?e[n]="[redacted]":["customerId","CustomerId","SpeakerId","CustomerSpeakerId"].includes(n)&&(e[n]=md5(e[n])))}))},u=function(e){if(this.type=e instanceof Error?e.name:e.code||Object.prototype.toString.call(e),this.message=e.message,this.stack=[],e.stack)try{Array.isArray(e.stack)?this.stack=e.stack:"object"==typeof e.stack?this.stack=[JSON.stringify(e.stack)]:"string"==typeof e.stack&&(this.stack=e.stack.split("\n"))}catch{}};a.prototype.toString=function(){return t.sprintf("[%s] [%s] [%s]: %s",this.getTime()&&this.getTime().toISOString?this.getTime().toISOString():"???",this.getLevel(),this.getAgentResourceId(),this.getText())},a.prototype.getTime=function(){return this.time},a.prototype.getAgentResourceId=function(){return this.agentResourceId},a.prototype.getLevel=function(){return this.level},a.prototype.getText=function(){return this.text},a.prototype.getComponent=function(){return this.component},a.prototype.withException=function(e){return this.exception=new u(e),this},a.prototype.withObject=function(e){var n=t.deepcopy(e);return c(n),this.objects.push(n),this},a.prototype.withCrossOriginEventObject=function(e){var n=t.deepcopyCrossOriginEvent(e);return c(n),this.objects.push(n),this},a.prototype.sendInternalLogToServer=function(){return t.getLog()._serverBoundInternalLogs.push(this),this};var l=function(){this._logs=[],this._rolledLogs=[],this._logsToPush=[],this._serverBoundInternalLogs=[],this._echoLevel=o.INFO,this._logLevel=o.INFO,this._lineCount=0,this._logRollInterval=0,this._logRollTimer=null,this._loggerId=(new Date).getTime()+"-"+Math.random().toString(36).slice(2),this.setLogRollInterval(18e5),this._startLogIndexToPush=0};l.prototype.setLogRollInterval=function(t){var n=this;this._logRollTimer&&t===this._logRollInterval?this.warn("Logger is already set to the given interval: %d",this._logRollInterval):(this._logRollTimer&&e.clearInterval(this._logRollTimer),this._logRollInterval=t,this._logRollTimer=e.setInterval((function(){n._rolledLogs=n._logs,n._logs=[],n._startLogIndexToPush=0,n.info("Log roll interval occurred.")}),this._logRollInterval))},l.prototype.setLogLevel=function(e){if(!(e in o))throw new Error("Unknown logging level: "+e);this._logLevel=o[e]},l.prototype.setEchoLevel=function(e){if(!(e in o))throw new Error("Unknown logging level: "+e);this._echoLevel=o[e]},l.prototype.write=function(e,t,n){var r=new a(e,t,n,this.getLoggerId());return c(r),this.addLogEntry(r),r},l.prototype.addLogEntry=function(e){c(e),this._logs.push(e),r.SOFTPHONE===e.component&&this._logsToPush.push(e),e.level in o&&o[e.level]>=this._logLevel&&(o[e.level]>=this._echoLevel&&i[e.getLevel()](e.toString()),e.line=this._lineCount++)},l.prototype.sendInternalLogEntryToServer=function(e){this._serverBoundInternalLogs.push(e),e.level in o&&o[e.level]>=this._logLevel&&(o[e.level]>=this._echoLevel&&i[e.getLevel()](e.toString()),e.line=this._lineCount++)},l.prototype.clearObjects=function(){for(var e=0;e=i._logLevel})));var a=new e.Blob([JSON.stringify(s,void 0,4)],["text/plain"]),c=document.createElement("a");n=n||"agent-log",c.href=e.URL.createObjectURL(a),c.download=n+".txt",document.body.appendChild(c),c.click(),document.body.removeChild(c)},l.prototype.scheduleUpstreamLogPush=function(n){t.upstreamLogPushScheduled||(t.upstreamLogPushScheduled=!0,e.setInterval(t.hitch(this,this.reportMasterLogsUpStream,n),5e3))},l.prototype.reportMasterLogsUpStream=function(e){var n=this._logsToPush.slice();this._logsToPush=[],t.ifMaster(t.MasterTopics.SEND_LOGS,(function(){n.length>0&&e.sendUpstream(t.EventType.SEND_LOGS,n)}))},l.prototype.scheduleUpstreamOuterContextCCPserverBoundLogsPush=function(n){e.setInterval(t.hitch(this,this.pushOuterContextCCPserverBoundLogsUpstream,n),1e3)},l.prototype.scheduleUpstreamOuterContextCCPLogsPush=function(n){e.setInterval(t.hitch(this,this.pushOuterContextCCPLogsUpstream,n),1e3)},l.prototype.pushOuterContextCCPserverBoundLogsUpstream=function(e){if(this._serverBoundInternalLogs.length>0){for(var n=0;n500?e=this._serverBoundInternalLogs.splice(0,500):(e=this._serverBoundInternalLogs,this._serverBoundInternalLogs=[]),t.publishClientSideLogs(e))};var p=function(n){l.call(this),this.conduit=n,e.setInterval(t.hitch(this,this._pushLogsDownstream),p.LOG_PUSH_INTERVAL),e.clearInterval(this._logRollTimer),this._logRollTimer=null};p.LOG_PUSH_INTERVAL=1e3,p.prototype=Object.create(l.prototype),p.prototype.constructor=p,p.prototype.pushLogsDownstream=function(e){var n=this;e.forEach((function(e){n.conduit.sendDownstream(t.EventType.LOG,e)}))},p.prototype._pushLogsDownstream=function(){var e=this;this._logs.forEach((function(n){e.conduit.sendDownstream(t.EventType.LOG,n)})),this._logs=[];for(var n=0;n>16)+(t>>16)+(n>>16)<<16|65535&n}function n(e,n,r,o,i,s){return t((a=t(t(n,e),t(o,s)))<<(c=i)|a>>>32-c,r);var a,c}function r(e,t,r,o,i,s,a){return n(t&r|~t&o,e,t,i,s,a)}function o(e,t,r,o,i,s,a){return n(t&o|r&~o,e,t,i,s,a)}function i(e,t,r,o,i,s,a){return n(t^r^o,e,t,i,s,a)}function s(e,t,r,o,i,s,a){return n(r^(t|~o),e,t,i,s,a)}function a(e,n){var a,c,u,l,p;e[n>>5]|=128<>>9<<4)]=n;var d=1732584193,h=-271733879,f=-1732584194,g=271733878;for(a=0;a>5]>>>t%32&255);return n}function u(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return o}function p(e){return unescape(encodeURIComponent(e))}function d(e){return function(e){return c(a(u(e),8*e.length))}(p(e))}function h(e,t){return function(e,t){var n,r,o=u(e),i=[],s=[];for(i[15]=s[15]=void 0,o.length>16&&(o=a(o,8*e.length)),n=0;n<16;n+=1)i[n]=909522486^o[n],s[n]=1549556828^o[n];return r=a(i.concat(u(t)),512+8*t.length),c(a(s.concat(r),640))}(p(e),p(t))}(this||globalThis).md5=function(e,t,n){return t?n?h(t,e):l(h(t,e)):n?d(e):l(d(e))}}()},439:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,t.ChatMediaController=function(e,n){var r=t.getLog(),o=t.LogComponent.CHAT,i=function(n,r){t.publishMetric({name:n,contactId:e.contactId,data:r||e})},s=function(e){e.onConnectionBroken((function(e){r.error(o,"Chat Session connection broken").withException(e).sendInternalLogToServer(),i("Chat Session connection broken",e)})),e.onConnectionEstablished((function(e){r.info(o,"Chat Session connection established").withObject(e).sendInternalLogToServer(),i("Chat Session connection established",e)}))};return{get:function(){return function(){i("Chat media controller init",e.contactId),r.info(o,"Chat media controller init").withObject(e).sendInternalLogToServer(),t.ChatSession.setGlobalConfig({loggerConfig:{logger:r},region:n.region});var a=t.ChatSession.create({chatDetails:e,type:"AGENT",websocketManager:t.core.getWebSocketManager()});return s(a),a.connect().then((function(t){return r.info(o,"Chat Session Successfully established for contactId %s",e.contactId).sendInternalLogToServer(),i("Chat Session Successfully established",e.contactId),a})).catch((function(t){throw r.error(o,"Chat Session establishement failed for contact %s",e.contactId).withException(t).sendInternalLogToServer(),i("Chat Session establishement failed",e.contactId,t),t}))}()}}}}()},279:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,t.MediaFactory=function(e){var n={},r=new Set,o=t.getLog(),i=t.LogComponent.CHAT,s=t.merge({},e)||{};s.region=s.region||"us-west-2";var a=function(e){n[e]&&!r.has(e)&&(o.info(i,"Destroying mediaController for %s",e),r.add(e),n[e].then((function(){"function"==typeof controller.cleanUp&&controller.cleanUp(),delete n[e],r.delete(e)})).catch((function(){delete n[e],r.delete(e)})))};return{get:function(e){return function(e){return e.isActive()}(e)?function(e){var r=e.getConnectionId();if(!e.getMediaInfo())return o.error(i,"Media info does not exist for a media type %s",e.getMediaType()).withObject(e).sendInternalLogToServer(),Promise.reject("Media info does not exist for this connection");if(n[r])return n[r];switch(o.info(i,"media controller of type %s init",e.getMediaType()).withObject(e).sendInternalLogToServer(),e.getMediaType()){case t.MediaType.CHAT:return n[r]=new t.ChatMediaController(e.getMediaInfo(),s).get();case t.MediaType.SOFTPHONE:return n[r]=new t.SoftphoneMediaController(e.getMediaInfo()).get();case t.MediaType.TASK:return n[r]=new t.TaskMediaController(e.getMediaInfo()).get();default:return o.error(i,"Unrecognized media type %s ",e.getMediaType()).sendInternalLogToServer(),Promise.reject()}}(e):(a(e.getConnectionId()),Promise.reject("Media Controller is no longer available for this connection"))},destroy:a}}}()},418:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,t.SoftphoneMediaController=function(e){return{get:function(){return Promise.resolve(e)}}}}()},187:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,t.TaskMediaController=function(e){var n=t.getLog(),r=t.LogComponent.TASK,o=function(n,r){t.publishMetric({name:n,contactId:e.contactId,data:r||e})},i=function(e){e.onConnectionBroken((function(e){n.error(r,"Task Session connection broken").withException(e),o("Task Session connection broken",e)})),e.onConnectionEstablished((function(e){n.info(r,"Task Session connection established").withObject(e),o("Task Session connection established",e)}))};return{get:function(){return function(){o("Task media controller init",e.contactId),n.info(r,"Task media controller init").withObject(e);var s=t.TaskSession.create({contactId:e.contactId,initialContactId:e.initialContactId,websocketManager:t.core.getWebSocketManager()});return i(s),s.connect().then((function(){return n.info(r,"Task Session Successfully established for contactId %s",e.contactId),o("Task Session Successfully established",e.contactId),s})).catch((function(t){throw n.error(r,"Task Session establishement failed for contact %s",e.contactId).withException(t),o("Chat Session establishement failed",e.contactId,t),t}))}()}}}}()},743:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t;var n=function(n){var r=this;if(this._prevContactId=null,t.assertNotNull(n,"ringtoneConfig"),!n.ringtoneUrl)throw new Error("ringtoneUrl is required!");e.Audio&&void 0!==e.Promise?this._playableAudioPromise=new Promise((function(e,o){r._audio=new Audio(n.ringtoneUrl),r._audio.loop=!0,r._audio.addEventListener("canplay",(function(){t.getLog().info("Ringtone is ready to play: ",+n.ringtoneUrl).sendInternalLogToServer(),r._audioPlayable=!0,e(r._audio)}))})):(this._audio=null,t.getLog().error("Unable to provide a ringtone.").sendInternalLogToServer()),r._driveRingtone()};n.prototype._driveRingtone=function(){throw new Error("Not implemented.")},n.prototype._startRingtone=function(e){var n=this;this._audio&&(this._audio.play().catch((function(r){n._publishTelemetryEvent("Ringtone Playback Failure",e),t.getLog().error("Ringtone Playback Failure").withException(r).withObject({currentSrc:n._audio.currentSrc,sinkId:n._audio.sinkId,volume:n._audio.volume}).sendInternalLogToServer()})),n._publishTelemetryEvent("Ringtone Start",e),t.getLog().info("Ringtone Start").sendInternalLogToServer())},n.prototype._stopRingtone=function(e){this._audio&&(this._audio.pause(),this._audio.currentTime=0,this._publishTelemetryEvent("Ringtone Stop",e),t.getLog().info("Ringtone Stop").sendInternalLogToServer())},n.prototype.stopRingtone=function(){this._stopRingtone()},n.prototype._ringtoneSetup=function(e){var n=this;t.ifMaster(t.MasterTopics.RINGTONE,(function(){n._startRingtone(e),n._prevContactId=e.getContactId(),e.onConnected(lily.hitch(n,n._stopRingtone)),e.onAccepted(lily.hitch(n,n._stopRingtone)),e.onEnded(lily.hitch(n,n._stopRingtone)),e.onRefresh((function(e){e.getStatus().type!==t.ContactStatusType.CONNECTING&&e.getStatus().type!==t.ContactStatusType.INCOMING&&n._stopRingtone()}))}))},n.prototype._publishTelemetryEvent=function(e,n){n&&n.getContactId()&&t.publishMetric({name:e,contactId:n.getContactId()})},n.prototype.setOutputDevice=function(t){return this._playableAudioPromise?Promise.race([this._playableAudioPromise,new Promise((function(t,n){e.setTimeout((function(){n("Timed out waiting for playable audio")}),3e3)}))]).then((function(e){return e?e.setSinkId?Promise.resolve(e.setSinkId(t)):Promise.reject("Not supported"):Promise.reject("No audio found")})):e.Promise?Promise.reject("Not eligible ringtone owner"):void 0};var r=function(e){n.call(this,e)};(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype._driveRingtone=function(){var e=this,n=function(n){n.getType()===lily.ContactType.VOICE&&n.isSoftphoneCall()&&n.isInbound()&&(e._ringtoneSetup(n),e._publishTelemetryEvent("Ringtone Connecting",n),t.getLog().info("Ringtone Connecting").sendInternalLogToServer())};t.contact((function(e){e.onConnecting(n)})),(new t.Agent).getContacts().forEach((function(e){e.getStatus().type===t.ContactStatusType.CONNECTING&&n(e)}))};var o=function(e){n.call(this,e)};(o.prototype=Object.create(n.prototype)).constructor=o,o.prototype._driveRingtone=function(){var e=this,n=function(n){n.getType()===lily.ContactType.CHAT&&n.isInbound()&&(e._ringtoneSetup(n),e._publishTelemetryEvent("Chat Ringtone Connecting",n),t.getLog().info("Chat Ringtone Connecting").sendInternalLogToServer())};t.contact((function(e){e.onConnecting(n)}))};var i=function(e){n.call(this,e)};(i.prototype=Object.create(n.prototype)).constructor=i,i.prototype._driveRingtone=function(){var e=this,n=function(n){n.getType()===lily.ContactType.TASK&&n.isInbound()&&(e._ringtoneSetup(n),e._publishTelemetryEvent("Task Ringtone Connecting",n),t.getLog().info("Task Ringtone Connecting").sendInternalLogToServer())};t.contact((function(e){e.onConnecting(n)}))};var s=function(e){n.call(this,e)};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype._driveRingtone=function(){var e=this;t.contact((function(n){n.onIncoming((function(){n.getType()===lily.ContactType.QUEUE_CALLBACK&&(e._ringtoneSetup(n),e._publishTelemetryEvent("Callback Ringtone Connecting",n),t.getLog().info("Callback Ringtone Connecting").sendInternalLogToServer())}))}))},t.VoiceRingtoneEngine=r,t.ChatRingtoneEngine=o,t.TaskRingtoneEngine=i,t.QueueCallbackRingtoneEngine=s}()},642:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,e.ccpVersion="V2";var n={};n[t.SoftphoneCallType.AUDIO_ONLY]="Audio",n[t.SoftphoneCallType.VIDEO_ONLY]="Video",n[t.SoftphoneCallType.AUDIO_VIDEO]="AudioVideo",n[t.SoftphoneCallType.NONE]="None";var r="audio_input",o="audio_output";({})[t.ContactType.VOICE]="Voice";var i=[],s={},a={},c=null,u=null,l=null,p=t.SoftphoneErrorTypes,d={},h=t.randomId(),f=function(e){return new Promise((function(n,r){t.core.getClient().call(t.ClientMethods.CREATE_TRANSPORT,e,{success:function(e){n(e.softphoneTransport.softphoneMediaConnections)},failure:function(e){e.message&&e.message.includes("SoftphoneConnectionLimitBreachedException")&&w("multiple_softphone_active_sessions","Number of active sessions are more then allowed limit.",""),r(Error("requestIceAccess failed"))},authFailure:function(){r(Error("Authentication failed while requestIceAccess"))},accessDenied:function(){r(Error("Access Denied while requestIceAccess"))}})}))},g=function(e){var n=t.core.getUpstream(),r=e.getAgentConnection();if(r){var o=r.getSoftphoneMediaInfo();o?!0===o.autoAccept?(l.info("Auto-accept is enabled, sending out Accepted event to stop ringtone..").sendInternalLogToServer(),n.sendUpstream(t.EventType.BROADCAST,{event:t.ContactEvents.ACCEPTED,data:new t.Contact(e.contactId)}),n.sendUpstream(t.EventType.BROADCAST,{event:t.core.getContactEventName(t.ContactEvents.ACCEPTED,e.contactId),data:new t.Contact(e.contactId)})):l.info("Auto-accept is disabled, ringtone will be stopped by user action.").sendInternalLogToServer():l.info("Not able to retrieve the auto-accept setting from null SoftphoneMediaInfo, ignoring event publish..").sendInternalLogToServer()}else l.info("Not able to retrieve the auto-accept setting from null AgentConnection, ignoring event publish..").sendInternalLogToServer()},m=function(){t.core.getEventBus().subscribe(t.EventType.MUTE,b)},v=function(){t.core.getEventBus().subscribe(t.ConfigurationEvents.SET_SPEAKER_DEVICE,T)},y=function(){t.core.getEventBus().subscribe(t.ConfigurationEvents.SET_MICROPHONE_DEVICE,C)},E=function(){try{t.isChromeBrowser()&&t.getChromeBrowserVersion()>43&&navigator.permissions.query({name:"microphone"}).then((function(e){e.onchange=function(){l.info("Microphone Permission: "+e.state),k("ConnectivityCheckResult",null,{connectivityCheckType:"MicrophonePermission",status:e.state}),"denied"===e.state&&w(p.MICROPHONE_NOT_SHARED,"Your microphone is not enabled in your browser. ","")}}))}catch(e){l.error("Failed in detecting microphone permission status: "+e)}},S=function(e){delete d[e],t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.AgentEvents.MUTE_TOGGLE,data:{muted:!1}})},b=function(e){var n;if(0!==t.keys(d).length){for(var r in e&&void 0!==e.mute&&(n=e.mute),d)if(d.hasOwnProperty(r)){var o=d[r].stream;if(o){var i=o.getAudioTracks()[0];void 0!==n?(i.enabled=!n,d[r].muted=n,n?l.info("Agent has muted the contact, connectionId - "+r).sendInternalLogToServer():l.info("Agent has unmuted the contact, connectionId - "+r).sendInternalLogToServer()):n=d[r].muted||!1}}t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.AgentEvents.MUTE_TOGGLE,data:{muted:n}})}},T=function(e){if(0!==t.keys(d).length&&e&&e.deviceId){var n=e.deviceId,r=document.getElementById("remote-audio");try{l.info("Trying to set speaker to device "+n),r&&"function"==typeof r.setSinkId&&r.setSinkId(n)}catch(e){l.error("Failed to set speaker to device "+n)}t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.SPEAKER_DEVICE_CHANGED,data:{deviceId:n}})}},C=function(e){if(0!==t.keys(d).length&&e&&e.deviceId){var n=e.deviceId,r=t.core.getSoftphoneManager();try{navigator.mediaDevices.getUserMedia({audio:{deviceId:{exact:n}}}).then((function(e){var t=e.getAudioTracks()[0];for(var n in d)d.hasOwnProperty(n)&&(d[n].stream,r.getSession(n)._pc.getSenders()[0].replaceTrack(t).then((function(){r.replaceLocalMediaTrack(n,t)})))}))}catch(e){l.error("Failed to set microphone device "+n)}t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConfigurationEvents.MICROPHONE_DEVICE_CHANGED,data:{deviceId:n}})}},I=function(e,n){if(n===t.RTCErrors.ICE_COLLECTION_TIMEOUT){for(var r="\n",o=0;o0?t.success(e):t.failure(p.MICROPHONE_NOT_SHARED)}),(function(e){t.failure(p.MICROPHONE_NOT_SHARED)})),r}t.failure(p.UNSUPPORTED_BROWSER)},w=function(e,n,r){l.error("Softphone error occurred : ",e,n||"").sendInternalLogToServer(),t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.AgentEvents.SOFTPHONE_ERROR,data:new t.SoftphoneError(e,n,r)})},R=function(e,t){k("Softphone Session Failed",e,{failedReason:t})},k=function(e,n,r){t.publishMetric({name:e,contactId:n,data:r})},N=function(e,t,n){k(e,t,[{name:"AgentConnectionId",value:n}]),l.info("Publish multiple session error metrics",e,"contactId "+t,"agent connectionId "+n).sendInternalLogToServer()},L=function(){return!!(t.isOperaBrowser()&&t.getOperaBrowserVersion()>17)||!!(t.isChromeBrowser()&&t.getChromeBrowserVersion()>22)||!!(t.isFirefoxBrowser()&&t.getFirefoxBrowserVersion()>21)},O=function(e){var t=i.slice();i=[],t.length>0&&e.sendSoftphoneMetrics(t,{success:function(){l.info("sendSoftphoneMetrics success"+JSON.stringify(t)).sendInternalLogToServer()},failure:function(e){l.error("sendSoftphoneMetrics failed.").withObject(e).sendInternalLogToServer()}})},D=function(e){c=window.setInterval((function(){e.getUserAudioStats().then((function(e){var t=s;s=e,i.push(M(s,t,r))}),(function(e){l.debug("Failed to get user audio stats.",e).sendInternalLogToServer()})),e.getRemoteAudioStats().then((function(e){var t=a;a=e,i.push(M(a,t,o))}),(function(e){l.debug("Failed to get remote audio stats.",e).sendInternalLogToServer()}))}),1e3)},P=function(e){u=window.setInterval((function(){O(e)}),3e4)},x=function(){s=null,a=null,i=[],c=null,u=null},M=function(e,t,n){if(t&&e){var r=e.packetsLost>t.packetsLost?e.packetsLost-t.packetsLost:0,o=e.packetsCount>t.packetsCount?e.packetsCount-t.packetsCount:0;return new q(e.timestamp,r,o,n,e.audioLevel,e.jbMilliseconds,e.rttMilliseconds)}return new q(e.timestamp,e.packetsLost,e.packetsCount,n,e.audioLevel,e.jbMilliseconds,e.rttMilliseconds)},U=function(e){return null!==e&&window.clearInterval(e),null},F=function(e,t){c=U(c),u=U(u),function(e,t,n,i){t.streamStats=[j(n,r),j(i,o)];var s={callStartTime:t.sessionStartTime,callEndTime:t.sessionEndTime,gumTimeMillis:t.gumTimeMillis,initializationTimeMillis:t.initializationTimeMillis,iceCollectionTimeMillis:t.iceCollectionTimeMillis,signallingConnectTimeMillis:t.signallingConnectTimeMillis,handshakingTimeMillis:t.handshakingTimeMillis,preTalkingTimeMillis:t.preTalkingTimeMillis,talkingTimeMillis:t.talkingTimeMillis,cleanupTimeMillis:t.cleanupTimeMillis,iceCollectionFailure:t.iceCollectionFailure,signallingConnectionFailure:t.signallingConnectionFailure,handshakingFailure:t.handshakingFailure,gumOtherFailure:t.gumOtherFailure,gumTimeoutFailure:t.gumTimeoutFailure,createOfferFailure:t.createOfferFailure,setLocalDescriptionFailure:t.setLocalDescriptionFailure,userBusyFailure:t.userBusyFailure,invalidRemoteSDPFailure:t.invalidRemoteSDPFailure,noRemoteIceCandidateFailure:t.noRemoteIceCandidateFailure,setRemoteDescriptionFailure:t.setRemoteDescriptionFailure,softphoneStreamStatistics:t.streamStats};e.sendSoftphoneReport(s,{success:function(){l.info("sendSoftphoneReport success"+JSON.stringify(s)).sendInternalLogToServer()},failure:function(e){l.error("sendSoftphoneReport failed.").withObject(e).sendInternalLogToServer()}})}(e,t,j(s,r),j(a,o)),O(e)},q=function(e,t,n,r,o,i,s){this.softphoneStreamType=r,this.timestamp=e,this.packetsLost=t,this.packetsCount=n,this.audioLevel=o,this.jitterBufferMillis=i,this.roundTripTimeMillis=s},j=function(e,t){return new q((e=e||{}).timestamp,e.packetsLost,e.packetsCount,t,e.audioLevel)},B=function(e){this._originalLogger=e;var n=this;this._tee=function(e,r){return function(){var e=Array.prototype.slice.call(arguments[0]),o="";return e.forEach((function(){o+=" %s"})),r.apply(n._originalLogger,[t.LogComponent.SOFTPHONE,o].concat(e))}}};B.prototype.debug=function(){return this._tee(1,this._originalLogger.debug)(arguments)},B.prototype.info=function(){return this._tee(2,this._originalLogger.info)(arguments)},B.prototype.log=function(){return this._tee(3,this._originalLogger.log)(arguments)},B.prototype.warn=function(){return this._tee(4,this._originalLogger.warn)(arguments)},B.prototype.error=function(){return this._tee(5,this._originalLogger.error)(arguments)},t.SoftphoneManager=function(e){var n,r=this;(l=new B(t.getLog())).info("[Softphone Manager] softphone manager initialization has begun").sendInternalLogToServer(),t.RtcPeerConnectionFactory&&(n=new t.RtcPeerConnectionFactory(l,t.core.getWebSocketManager(),h,t.hitch(r,f,{transportType:"softphone",softphoneClientId:h}),t.hitch(r,w))),L()||w(p.UNSUPPORTED_BROWSER,"Connect does not support this browser. Some functionality may not work. ",""),A({success:function(e){k("ConnectivityCheckResult",null,{connectivityCheckType:"MicrophonePermission",status:"granted"})},failure:function(e){w(e,"Your microphone is not enabled in your browser. ",""),k("ConnectivityCheckResult",null,{connectivityCheckType:"MicrophonePermission",status:"denied"})}}),m(),v(),y(),E(),this.ringtoneEngine=null;var o={},i={};this.onInitContactSub={},this.onInitContactSub.unsubscribe=function(){};var s=!1,a=null,c=null,u=function(){s=!1,a=null,c=null};this.getSession=function(e){return o[e]},this.replaceLocalMediaTrack=function(e,t){var n=d[e].stream;if(n){var r=n.getAudioTracks()[0];t.enabled=r.enabled,r.enabled=!1,n.removeTrack(r),n.addTrack(t)}};var b=function(e){if(o.hasOwnProperty(e)){var t=o[e];new Promise((function(n,r){delete o[e],delete i[e],t.hangup()})).catch((function(t){lily.getLog().warn("Clean up the session locally "+e,t.message).sendInternalLogToServer()}))}};this.startSession=function(e,r){var p=s?a:e,h=s?c:r;if(p&&h){u(),i[h]=!0,l.info("Softphone call detected:","contactId "+p.getContactId(),"agent connectionId "+h).sendInternalLogToServer(),function(e){if(Object.keys(e).length>0){for(var t in e)e.hasOwnProperty(t)&&(N("MultiSessionHangUp",e[t].callId,t),b(t));throw new Error("duplicate session detected, refusing to setup new connection")}}(o),p.getStatus().type===t.ContactStatusType.CONNECTING&&k("Softphone Connecting",p.getContactId()),x();var f,m=p.getAgentConnection().getSoftphoneMediaInfo(),v=_(m.callConfigJson);v.useWebSocketProvider&&(f=t.core.getWebSocketManager());var y=new t.RTCSession(v.signalingEndpoint,v.iceServers,m.callContextToken,l,p.getContactId(),h,f);o[h]=y,t.core.getSoftphoneUserMediaStream()&&(y.mediaStream=t.core.getSoftphoneUserMediaStream()),t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.ConnectionEvents.SESSION_INIT,data:{connectionId:h}}),y.onSessionFailed=function(e,t){delete o[h],delete i[h],I(e,t),R(p.getContactId(),t),F(p,e.sessionReport)},y.onSessionConnected=function(e){k("Softphone Session Connected",p.getContactId()),t.becomeMaster(t.MasterTopics.SEND_LOGS),D(e),P(p),g(p)},y.onSessionCompleted=function(e){k("Softphone Session Completed",p.getContactId()),delete o[h],delete i[h],F(p,e.sessionReport),S(h)},y.onLocalStreamAdded=function(e,n){d[h]={stream:n},t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.AgentEvents.LOCAL_MEDIA_STREAM_CREATED,data:{connectionId:h}})},y.remoteAudioElement=document.getElementById("remote-audio"),n?y.connect(n.get(v.iceServers)):y.connect()}};var T=function(e,n){o[n]&&function(e){return e.getStatus().type===t.ContactStatusType.ENDED||e.getStatus().type===t.ContactStatusType.ERROR||e.getStatus().type===t.ContactStatusType.MISSED}(e)&&(b(n),u()),!e.isSoftphoneCall()||i[n]||e.getStatus().type!==t.ContactStatusType.CONNECTING&&e.getStatus().type!==t.ContactStatusType.INCOMING||(t.isFirefoxBrowser()&&t.hasOtherConnectedCCPs()?function(e,t){s=!0,a=e,c=t}(e,n):r.startSession(e,n))},C=function(e){var t=e.getAgentConnection().connectionId;l.info("Contact detected:","contactId "+e.getContactId(),"agent connectionId "+t).sendInternalLogToServer(),i[t]||e.onRefresh((function(){T(e,t)}))};r.onInitContactSub=t.contact(C),(new t.Agent).getContacts().forEach((function(e){var t=e.getAgentConnection().connectionId;l.info("Contact exist in the snapshot. Reinitiate the Contact and RTC session creation for contactId"+e.getContactId(),"agent connectionId "+t).sendInternalLogToServer(),C(e),T(e,t)}))}}()},944:()=>{!function(){var e=this||globalThis,t=function(){return t.cache.hasOwnProperty(arguments[0])||(t.cache[arguments[0]]=t.parse(arguments[0])),t.format.call(null,t.cache[arguments[0]],arguments)};function n(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function r(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}t.format=function(e,o){var i,s,a,c,u,l,p,d=1,h=e.length,f="",g=[];for(s=0;s>>=0;break;case"x":i=i.toString(16);break;case"X":i=i.toString(16).toUpperCase()}i=/[def]/.test(c[8])&&c[3]&&i>=0?"+"+i:i,l=c[4]?"0"==c[4]?"0":c[4].charAt(1):" ",p=c[6]-String(i).length,u=c[6]?r(l,p):"",g.push(c[5]?i+u:u+i)}return g.join("")},t.cache={},t.parse=function(e){for(var t=e,n=[],r=[],o=0;t;){if(null!==(n=/^[^\x25]+/.exec(t)))r.push(n[0]);else if(null!==(n=/^\x25{2}/.exec(t)))r.push("%");else{if(null===(n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t)))throw"[sprintf] huh?";if(n[2]){o|=1;var i=[],s=n[2],a=[];if(null===(a=/^([a-z_][a-z_\d]*)/i.exec(s)))throw"[sprintf] huh?";for(i.push(a[1]);""!==(s=s.substring(a[0].length));)if(null!==(a=/^\.([a-z_][a-z_\d]*)/i.exec(s)))i.push(a[1]);else{if(null===(a=/^\[(\d+)\]/.exec(s)))throw"[sprintf] huh?";i.push(a[1])}n[2]=i}else o|=2;if(3===o)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r},e.sprintf=t,e.vsprintf=function(e,n,r){return(r=n.slice(0)).splice(0,0,e),t.apply(null,r)}}()},82:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t;var n=function(){};n.prototype.send=function(e){throw new t.NotImplementedError},n.prototype.onMessage=function(e){throw new t.NotImplementedError};var r=function(){n.call(this)};(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.onMessage=function(e){},r.prototype.send=function(e){};var o=function(e,t){n.call(this),this.window=e,this.domain=t||"*"};(o.prototype=Object.create(n.prototype)).constructor=o,o.prototype.send=function(e){this.window.postMessage(e,this.domain)},o.prototype.onMessage=function(e){this.window.addEventListener("message",e)};var i=function(e,t,r){n.call(this),this.input=e,this.output=t,this.domain=r||"*"};(i.prototype=Object.create(n.prototype)).constructor=i,i.prototype.send=function(e){this.output.postMessage(e,this.domain)},i.prototype.onMessage=function(e){this.input.addEventListener("message",(t=>{t.source===this.output&&e(t)}))};var s=function(e){n.call(this),this.port=e,this.id=t.randomId()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.send=function(e){this.port.postMessage(e)},s.prototype.onMessage=function(e){this.port.addEventListener("message",e)},s.prototype.getId=function(){return this.id};var a=function(e){n.call(this),this.streamMap=e?t.index(e,(function(e){return e.getId()})):{},this.messageListeners=[]};(a.prototype=Object.create(n.prototype)).constructor=a,a.prototype.send=function(e){this.getStreams().forEach((function(t){try{t.send(e)}catch(e){}}))},a.prototype.onMessage=function(e){this.messageListeners.push(e),this.getStreams().forEach((function(t){t.onMessage(e)}))},a.prototype.addStream=function(e){this.streamMap[e.getId()]=e,this.messageListeners.forEach((function(t){e.onMessage(t)}))},a.prototype.removeStream=function(e){delete this.streamMap[e.getId()]},a.prototype.getStreams=function(e){return t.values(this.streamMap)},a.prototype.getStreamForPort=function(e){return t.find(this.getStreams(),(function(t){return t.port===e}))};var c=function(e,n,o){this.name=e,this.upstream=n||new r,this.downstream=o||new r,this.downstreamBus=new t.EventBus,this.upstreamBus=new t.EventBus,this.upstream.onMessage(t.hitch(this,this._dispatchEvent,this.upstreamBus)),this.downstream.onMessage(t.hitch(this,this._dispatchEvent,this.downstreamBus))};c.prototype.onUpstream=function(e,n){return t.assertNotNull(e,"eventName"),t.assertNotNull(n,"f"),t.assertTrue(t.isFunction(n),"f must be a function"),this.upstreamBus.subscribe(e,n)},c.prototype.onAllUpstream=function(e){return t.assertNotNull(e,"f"),t.assertTrue(t.isFunction(e),"f must be a function"),this.upstreamBus.subscribeAll(e)},c.prototype.onDownstream=function(e,n){return t.assertNotNull(e,"eventName"),t.assertNotNull(n,"f"),t.assertTrue(t.isFunction(n),"f must be a function"),this.downstreamBus.subscribe(e,n)},c.prototype.onAllDownstream=function(e){return t.assertNotNull(e,"f"),t.assertTrue(t.isFunction(e),"f must be a function"),this.downstreamBus.subscribeAll(e)},c.prototype.sendUpstream=function(e,n){t.assertNotNull(e,"eventName"),this.upstream.send({event:e,data:n})},c.prototype.sendDownstream=function(e,n){t.assertNotNull(e,"eventName"),this.downstream.send({event:e,data:n})},c.prototype._dispatchEvent=function(e,t){var n=t.data;n.event&&e.trigger(n.event,n.data)},c.prototype.passUpstream=function(){var e=this;return function(t,n){e.upstream.send({event:n,data:t})}},c.prototype.passDownstream=function(){var e=this;return function(t,n){e.downstream.send({event:n,data:t})}},c.prototype.shutdown=function(){this.upstreamBus.unsubscribeAll(),this.downstreamBus.unsubscribeAll()};var u=function(e,t,n,r){c.call(this,e,new i(t,n.contentWindow,r||"*"),null)};(u.prototype=Object.create(c.prototype)).constructor=u,t.Stream=n,t.NullStream=r,t.WindowStream=o,t.WindowIOStream=i,t.PortStream=s,t.StreamMultiplexer=a,t.Conduit=c,t.IFrameConduit=u}()},833:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t;var n=function(e,n){t.assertNotNull(e,"fromState"),t.assertNotNull(n,"toState"),this.fromState=e,this.toState=n};n.prototype.getAssociations=function(e){throw t.NotImplementedError()},n.prototype.getFromState=function(){return this.fromState},n.prototype.getToState=function(){return this.toState};var r=function(e,r,o){t.assertNotNull(e,"fromState"),t.assertNotNull(r,"toState"),t.assertNotNull(o,"associations"),n.call(this,e,r),this.associations=o};(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.getAssociations=function(e){return this.associations};var o=function(e,r,o){t.assertNotNull(e,"fromState"),t.assertNotNull(r,"toState"),t.assertNotNull(o,"closure"),t.assertTrue(t.isFunction(o),"closure must be a function"),n.call(this,e,r),this.closure=o};(o.prototype=Object.create(n.prototype)).constructor=o,o.prototype.getAssociations=function(e){return this.closure(e,this.getFromState(),this.getToState())};var i=function(){this.fromMap={}};i.ANY="<>",i.prototype.assoc=function(e,t,n){var i=this;if(!e)throw new Error("fromStateObj is not defined.");if(!t)throw new Error("toStateObj is not defined.");if(!n)throw new Error("assocObj is not defined.");return e instanceof Array?e.forEach((function(e){i.assoc(e,t,n)})):t instanceof Array?t.forEach((function(t){i.assoc(e,t,n)})):"function"==typeof n?this._addAssociation(new o(e,t,n)):n instanceof Array?this._addAssociation(new r(e,t,n)):this._addAssociation(new r(e,t,[n])),this},i.prototype.getAssociations=function(e,n,r){t.assertNotNull(n,"fromState"),t.assertNotNull(r,"toState");var o=[],s=this.fromMap[i.ANY]||{},a=this.fromMap[n]||{};return o=(o=o.concat(this._getAssociationsFromMap(s,e,n,r))).concat(this._getAssociationsFromMap(a,e,n,r))},i.prototype._addAssociation=function(e){var t=this.fromMap[e.getFromState()];t||(t=this.fromMap[e.getFromState()]={});var n=t[e.getToState()];n||(n=t[e.getToState()]=[]),n.push(e)},i.prototype._getAssociationsFromMap=function(e,t,n,r){return(e[i.ANY]||[]).concat(e[r]||[]).reduce((function(e,n){return e.concat(n.getAssociations(t))}),[])},t.EventGraph=i}()},891:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t;var n=navigator.userAgent,r=["bubbles","cancelBubble","cancelable","composed","data","defaultPrevented","eventPhase","isTrusted","lastEventId","origin","returnValue","timeStamp","type"];t.sprintf=e.sprintf,t.vsprintf=e.vsprintf,delete e.sprintf,delete e.vsprintf,t.HTTP_STATUS_CODES={SUCCESS:200,TOO_MANY_REQUESTS:429,INTERNAL_SERVER_ERROR:500},t.TRANSPORT_TYPES={CHAT_TOKEN:"chat_token",WEB_SOCKET:"web_socket"},t.hitch=function(){var e=Array.prototype.slice.call(arguments),n=e.shift(),r=e.shift();return t.assertNotNull(n,"scope"),t.assertNotNull(r,"method"),t.assertTrue(t.isFunction(r),"method must be a function"),function(){var t=Array.prototype.slice.call(arguments);return r.apply(n,e.concat(t))}},t.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.keys=function(e){var n=[];for(var r in t.assertNotNull(e,"map"),e)n.push(r);return n},t.values=function(e){var n=[];for(var r in t.assertNotNull(e,"map"),e)n.push(e[r]);return n},t.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},t.merge=function(){var e=Array.prototype.slice.call(arguments,0),n={};return e.forEach((function(e){t.entries(e).forEach((function(e){n[e.key]=e.value}))})),n},t.now=function(){return(new Date).getTime()},t.find=function(e,t){for(var n=0;n{try{n[r]=e[r]}catch(e){t.getLog().info("deepcopyCrossOriginEvent failed on key: ",r).sendInternalLogToServer()}})),t.deepcopy(n)},t.getBaseUrl=function(){var n=e.location;return t.sprintf("%s//%s:%s",n.protocol,n.hostname,n.port)},t.getUrlWithProtocol=function(n){var r=e.location.protocol;return n.substr(0,r.length)!==r?t.sprintf("%s//%s",r,n):n},t.isFramed=function(){try{return window.self!==window.top}catch(e){return!0}},t.hasOtherConnectedCCPs=function(){return t.numberOfConnectedCCPs>1},t.fetch=function(e,n,r,o){return o=o||5,r=r||1e3,n=n||{},new Promise((function(i,s){!function o(a){fetch(e,n).then((function(e){e.status===t.HTTP_STATUS_CODES.SUCCESS?e.json().then((e=>i(e))).catch((()=>i({}))):1!==a&&(e.status>=t.HTTP_STATUS_CODES.INTERNAL_SERVER_ERROR||e.status===t.HTTP_STATUS_CODES.TOO_MANY_REQUESTS)?setTimeout((function(){o(--a)}),r):s(e)})).catch((function(e){s(e)}))}(o)}))},t.backoff=function(n,r,o,i){t.assertTrue(t.isFunction(n),"func must be a Function");var s=this;n({success:function(e){i&&i.success&&i.success(e)},failure:function(t,a){if(o>0){var c=2*r*Math.random();e.setTimeout((function(){s.backoff(n,2*c,--o,i)}),c)}else i&&i.failure&&i.failure(t,a)}})},t.publishMetric=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.CLIENT_METRIC,data:e})},t.publishSoftphoneStats=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.SOFTPHONE_STATS,data:e})},t.publishSoftphoneReport=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.SOFTPHONE_REPORT,data:e})},t.publishClickStreamData=function(e){t.core.getUpstream().sendUpstream(t.EventType.BROADCAST,{event:t.EventType.CLICK_STREAM_DATA,data:e})},t.publishClientSideLogs=function(e){t.core.getEventBus().trigger(t.EventType.CLIENT_SIDE_LOGS,e)},t.addNamespaceToLogs=function(e){["log","error","warn","info","debug"].forEach((t=>{const n=window.console[t];window.console[t]=function(){const t=Array.from(arguments);t.unshift(`[${e}]`),n.apply(window.console,t)}}))},t.PopupManager=function(){},t.PopupManager.prototype.open=function(e,t,n){var r=this._getLastOpenedTimestamp(t),o=(new Date).getTime(),i=null;if(o-r>864e5){if(n){var s=n.height||578,a=n.width||433,c=n.top||0,u=n.left||0;(i=window.open("",t,"width="+a+", height="+s+", top="+c+", left="+u)).location!==e&&(i=window.open(e,t,"width="+a+", height="+s+", top="+c+", left="+u))}else(i=window.open("",t)).location!==e&&(i=window.open(e,t));this._setLastOpenedTimestamp(t,o)}return i},t.PopupManager.prototype.clear=function(t){var n=this._getLocalStorageKey(t);e.localStorage.removeItem(n)},t.PopupManager.prototype._getLastOpenedTimestamp=function(t){var n=this._getLocalStorageKey(t),r=e.localStorage.getItem(n);return r?parseInt(r,10):0},t.PopupManager.prototype._setLastOpenedTimestamp=function(t,n){var r=this._getLocalStorageKey(t);e.localStorage.setItem(r,""+n)},t.PopupManager.prototype._getLocalStorageKey=function(e){return"connectPopupManager::"+e};var o=t.makeEnum(["granted","denied","default"]);t.NotificationManager=function(){this.queue=[],this.permission=o.DEFAULT},t.NotificationManager.prototype.requestPermission=function(){var n=this;"Notification"in e?e.Notification.permission===o.DENIED?(t.getLog().warn("The user has requested to not receive notifications.").sendInternalLogToServer(),this.permission=o.DENIED):this.permission!==o.GRANTED&&e.Notification.requestPermission().then((function(e){n.permission=e,e===o.GRANTED?n._showQueued():n.queue=[]})):(t.getLog().warn("This browser doesn't support notifications.").sendInternalLogToServer(),this.permission=o.DENIED)},t.NotificationManager.prototype.show=function(e,n){if(this.permission===o.GRANTED)return this._showImpl({title:e,options:n});if(this.permission===o.DENIED)t.getLog().warn("Unable to show notification.").sendInternalLogToServer().withObject({title:e,options:n});else{var r={title:e,options:n};t.getLog().warn("Deferring notification until user decides to allow or deny.").withObject(r).sendInternalLogToServer(),this.queue.push(r)}},t.NotificationManager.prototype._showQueued=function(){var e=this,t=this.queue.map((function(t){return e._showImpl(t)}));return this.queue=[],t},t.NotificationManager.prototype._showImpl=function(t){var n=new e.Notification(t.title,t.options);return t.options.clicked&&(n.onclick=function(){t.options.clicked.call(n)}),n},t.ValueError=function(){var e=Array.prototype.slice.call(arguments,0),n=e.shift(),r=new Error(t.vsprintf(n,e));return Object.setPrototypeOf(r,t.ValueError.prototype),r},Object.setPrototypeOf(t.ValueError.prototype,Error.prototype),Object.setPrototypeOf(t.ValueError,Error),t.ValueError.prototype.name="ValueError",t.NotImplementedError=function(){var e=Array.prototype.slice.call(arguments,0),n=e.shift(),r=new Error(t.vsprintf(n,e));return Object.setPrototypeOf(r,t.NotImplementedError.prototype),r},Object.setPrototypeOf(t.NotImplementedError.prototype,Error.prototype),Object.setPrototypeOf(t.NotImplementedError,Error),t.NotImplementedError.prototype.name="NotImplementedError",t.StateError=function(){var e=Array.prototype.slice.call(arguments,0),n=e.shift(),r=new Error(t.vsprintf(n,e));return Object.setPrototypeOf(r,t.StateError.prototype),r},Object.setPrototypeOf(t.StateError.prototype,Error.prototype),Object.setPrototypeOf(t.StateError,Error),t.StateError.prototype.name="StateError",t.VoiceIdError=function(e,t,n){var r={};return r.type=e,r.message=t,r.stack=Error(t).stack,r.err=n,r},t.isCCP=function(){return"ConnectSharedWorkerConduit"===t.core.getUpstream().name}}()},736:()=>{!function(){var e=this||globalThis,t=e.connect||{};e.connect=t,e.lily=t,t.worker={};var n=function(){this.topicMasterMap={}};n.prototype.getMaster=function(e){return t.assertNotNull(e,"topic"),this.topicMasterMap[e]||null},n.prototype.setMaster=function(e,n){t.assertNotNull(e,"topic"),t.assertNotNull(n,"id"),this.topicMasterMap[e]=n},n.prototype.removeMaster=function(e){t.assertNotNull(e,"id");var n=this;t.entries(this.topicMasterMap).filter((function(t){return t.value===e})).forEach((function(e){delete n.topicMasterMap[e.key]}))};var r=function(e){t.ClientBase.call(this),this.conduit=e};(r.prototype=Object.create(t.ClientBase.prototype)).constructor=r,r.prototype._callImpl=function(e,n,r){var o=this,i=(new Date).getTime();t.containsValue(t.AgentAppClientMethods,e)?t.core.getAgentAppClient()._callImpl(e,n,{success:function(t){o._recordAPILatency(e,i),r.success(t)},failure:function(t){o._recordAPILatency(e,i,t),r.failure(t)}}):t.containsValue(t.TaskTemplatesClientMethods,e)?t.core.getTaskTemplatesClient()._callImpl(e,n,{success:function(t){o._recordAPILatency(e,i),r.success(t)},failure:function(t){o._recordAPILatency(e,i,t),r.failure(t)}}):t.core.getClient()._callImpl(e,n,{success:function(t){o._recordAPILatency(e,i),r.success(t)},failure:function(t,n){o._recordAPILatency(e,i,t),r.failure(t,n)},authFailure:function(){o._recordAPILatency(e,i),r.authFailure()},accessDenied:function(){r.accessDenied&&r.accessDenied()}})},r.prototype._recordAPILatency=function(e,t,n){var r=(new Date).getTime()-t;this._sendAPIMetrics(e,r,n)},r.prototype._sendAPIMetrics=function(e,n,r){this.conduit.sendDownstream(t.EventType.API_METRIC,{name:e,time:n,dimensions:[{name:"Category",value:"API"}],error:r})};var o=function(){var o=this;this.multiplexer=new t.StreamMultiplexer,this.conduit=new t.Conduit("AmazonConnectSharedWorker",null,this.multiplexer),this.client=new r(this.conduit),this.timeout=null,this.agent=null,this.nextToken=null,this.initData={},this.portConduitMap={},this.streamMapByTabId={},this.masterCoord=new n,this.logsBuffer=[],this.suppress=!1,this.forceOffline=!1,this.longPollingOptions={allowLongPollingShadowMode:!1,allowLongPollingWebsocketOnlyMode:!1};var i=null;t.rootLogger=new t.DownstreamConduitLogger(this.conduit),this.conduit.onDownstream(t.EventType.SEND_LOGS,(function(e){t.getLog().pushLogsDownstream(e),o.logsBuffer=o.logsBuffer.concat(e),o.logsBuffer.length>400&&o.handleSendLogsRequest(o.logsBuffer)})),this.conduit.onDownstream(t.EventType.CONFIGURE,(function(n){console.log("@@@ configure event handler",n);try{n.authToken&&n.authToken!==o.initData.authToken&&(o.initData=n,t.core.init(n),n.longPollingOptions&&("boolean"==typeof n.longPollingOptions.allowLongPollingShadowMode&&(o.longPollingOptions.allowLongPollingShadowMode=n.longPollingOptions.allowLongPollingShadowMode),"boolean"==typeof n.longPollingOptions.allowLongPollingWebsocketOnlyMode&&(o.longPollingOptions.allowLongPollingWebsocketOnlyMode=n.longPollingOptions.allowLongPollingWebsocketOnlyMode)),i?t.getLog().info("Not Initializing a new WebsocketManager instance, since one already exists").sendInternalLogToServer():(t.getLog().info("Creating a new Websocket connection for CCP").sendInternalLogToServer(),t.WebSocketManager.setGlobalConfig({loggerConfig:{logger:t.getLog()}}),(i=t.WebSocketManager.create()).onInitFailure((function(){o.conduit.sendDownstream(t.WebSocketEvents.INIT_FAILURE)})),i.onConnectionOpen((function(e){o.conduit.sendDownstream(t.WebSocketEvents.CONNECTION_OPEN,e)})),i.onConnectionClose((function(e){o.conduit.sendDownstream(t.WebSocketEvents.CONNECTION_CLOSE,e)})),i.onConnectionGain((function(){o.conduit.sendDownstream(t.AgentEvents.WEBSOCKET_CONNECTION_GAINED),o.conduit.sendDownstream(t.WebSocketEvents.CONNECTION_GAIN)})),i.onConnectionLost((function(e){o.conduit.sendDownstream(t.AgentEvents.WEBSOCKET_CONNECTION_LOST,e),o.conduit.sendDownstream(t.WebSocketEvents.CONNECTION_LOST,e)})),i.onSubscriptionUpdate((function(e){o.conduit.sendDownstream(t.WebSocketEvents.SUBSCRIPTION_UPDATE,e)})),i.onSubscriptionFailure((function(e){o.conduit.sendDownstream(t.WebSocketEvents.SUBSCRIPTION_FAILURE,e)})),i.onAllMessage((function(e){o.conduit.sendDownstream(t.WebSocketEvents.ALL_MESSAGE,e)})),o.conduit.onDownstream(t.WebSocketEvents.SEND,(function(e){i.sendMessage(e)})),o.conduit.onDownstream(t.WebSocketEvents.SUBSCRIBE,(function(e){i.subscribeTopics(e)})),i.init(t.hitch(o,o.getWebSocketUrl)).then((function(n){try{if(n&&!n.webSocketConnectionFailed)t.getLog().info("Kicking off agent polling").sendInternalLogToServer(),o.pollForAgent(),t.getLog().info("Kicking off config polling").sendInternalLogToServer(),o.pollForAgentConfiguration({repeatForever:!0}),t.getLog().info("Kicking off auth token polling").sendInternalLogToServer(),e.setInterval(t.hitch(o,o.checkAuthToken),3e5);else if(!t.webSocketInitFailed){const e=t.WebSocketEvents.INIT_FAILURE;throw o.conduit.sendDownstream(e),t.webSocketInitFailed=!0,new Error(e)}}catch(e){t.getLog().error("WebSocket failed to initialize").withException(e).sendInternalLogToServer()}}))))}catch(e){console.error("@@@ error",e)}})),this.conduit.onDownstream(t.EventType.TERMINATE,(function(){o.handleSendLogsRequest(o.logsBuffer),t.core.terminate(),o.conduit.sendDownstream(t.EventType.TERMINATED)})),this.conduit.onDownstream(t.EventType.SYNCHRONIZE,(function(){o.conduit.sendDownstream(t.EventType.ACKNOWLEDGE)})),this.conduit.onDownstream(t.EventType.BROADCAST,(function(e){o.conduit.sendDownstream(e.event,e.data)})),e.onconnect=function(e){var n=e.ports[0],r=new t.PortStream(n);o.multiplexer.addStream(r),n.start();var i=new t.Conduit(r.getId(),null,r);i.sendDownstream(t.EventType.ACKNOWLEDGE,{id:r.getId()}),o.portConduitMap[r.getId()]=i,o.conduit.sendDownstream(t.EventType.UPDATE_CONNECTED_CCPS,{length:Object.keys(o.portConduitMap).length}),null!==o.agent&&o.updateAgent(),i.onDownstream(t.EventType.API_REQUEST,t.hitch(o,o.handleAPIRequest,i)),i.onDownstream(t.EventType.MASTER_REQUEST,t.hitch(o,o.handleMasterRequest,i,r.getId())),i.onDownstream(t.EventType.RELOAD_AGENT_CONFIGURATION,t.hitch(o,o.pollForAgentConfiguration)),i.onDownstream(t.EventType.TAB_ID,t.hitch(o,o.handleTabIdEvent,r)),i.onDownstream(t.EventType.CLOSE,t.hitch(o,o.handleCloseEvent,r))}};o.prototype.pollForAgent=function(){var n=this,r=t.hitch(n,n.handleAuthFail);this.client.call(t.ClientMethods.GET_AGENT_SNAPSHOT,{nextToken:n.nextToken,timeout:3e4},{success:function(r){try{n.agent=n.agent||{},n.agent.snapshot=r.snapshot,n.agent.snapshot.localTimestamp=t.now(),n.agent.snapshot.skew=n.agent.snapshot.snapshotTimestamp-n.agent.snapshot.localTimestamp,n.nextToken=r.nextToken,t.getLog().trace("GET_AGENT_SNAPSHOT succeeded.").withObject(r).sendInternalLogToServer(),n.updateAgent()}catch(e){t.getLog().error("Long poll failed to update agent.").withObject(r).withException(e).sendInternalLogToServer()}finally{e.setTimeout(t.hitch(n,n.pollForAgent),100)}},failure:function(r,o){try{t.getLog().error("Failed to get agent data.").sendInternalLogToServer().withObject({err:r,data:o})}finally{e.setTimeout(t.hitch(n,n.pollForAgent),5e3)}},authFailure:function(){r()},accessDenied:t.hitch(n,n.handleAccessDenied)})},o.prototype.pollForAgentConfiguration=function(n){var r=this,o=n||{},i=t.hitch(r,r.handleAuthFail);this.client.call(t.ClientMethods.GET_AGENT_CONFIGURATION,{},{success:function(n){var i=n.configuration;r.pollForAgentPermissions(i),r.pollForAgentStates(i),r.pollForDialableCountryCodes(i),r.pollForRoutingProfileQueues(i),o.repeatForever&&e.setTimeout(t.hitch(r,r.pollForAgentConfiguration,o),3e4)},failure:function(n,i){try{t.getLog().error("Failed to fetch agent configuration data.").sendInternalLogToServer().withObject({err:n,data:i})}finally{o.repeatForever&&e.setTimeout(t.hitch(r,r.pollForAgentConfiguration),3e4,o)}},authFailure:function(){i()},accessDenied:t.hitch(r,r.handleAccessDenied)})},o.prototype.pollForAgentStates=function(e,n){var r=this,o=n||{};o.maxResults=o.maxResults||t.DEFAULT_BATCH_SIZE,this.client.call(t.ClientMethods.GET_AGENT_STATES,{nextToken:o.nextToken||null,maxResults:o.maxResults},{success:function(t){t.nextToken?r.pollForAgentStates(e,{states:(o.states||[]).concat(t.states),nextToken:t.nextToken,maxResults:o.maxResults}):(e.agentStates=(o.states||[]).concat(t.states),r.updateAgentConfiguration(e))},failure:function(e,n){t.getLog().error("Failed to fetch agent states list.").sendInternalLogToServer().withObject({err:e,data:n})},authFailure:t.hitch(r,r.handleAuthFail),accessDenied:t.hitch(r,r.handleAccessDenied)})},o.prototype.pollForAgentPermissions=function(e,n){var r=this,o=n||{};o.maxResults=o.maxResults||t.DEFAULT_BATCH_SIZE,this.client.call(t.ClientMethods.GET_AGENT_PERMISSIONS,{nextToken:o.nextToken||null,maxResults:o.maxResults},{success:function(t){t.nextToken?r.pollForAgentPermissions(e,{permissions:(o.permissions||[]).concat(t.permissions),nextToken:t.nextToken,maxResults:o.maxResults}):(e.permissions=(o.permissions||[]).concat(t.permissions),r.updateAgentConfiguration(e))},failure:function(e,n){t.getLog().error("Failed to fetch agent permissions list.").sendInternalLogToServer().withObject({err:e,data:n})},authFailure:t.hitch(r,r.handleAuthFail),accessDenied:t.hitch(r,r.handleAccessDenied)})},o.prototype.pollForDialableCountryCodes=function(e,n){var r=this,o=n||{};o.maxResults=o.maxResults||t.DEFAULT_BATCH_SIZE,this.client.call(t.ClientMethods.GET_DIALABLE_COUNTRY_CODES,{nextToken:o.nextToken||null,maxResults:o.maxResults},{success:function(t){t.nextToken?r.pollForDialableCountryCodes(e,{countryCodes:(o.countryCodes||[]).concat(t.countryCodes),nextToken:t.nextToken,maxResults:o.maxResults}):(e.dialableCountries=(o.countryCodes||[]).concat(t.countryCodes),r.updateAgentConfiguration(e))},failure:function(e,n){t.getLog().error("Failed to fetch dialable country codes list.").sendInternalLogToServer().withObject({err:e,data:n})},authFailure:t.hitch(r,r.handleAuthFail),accessDenied:t.hitch(r,r.handleAccessDenied)})},o.prototype.pollForRoutingProfileQueues=function(e,n){var r=this,o=n||{};o.maxResults=o.maxResults||t.DEFAULT_BATCH_SIZE,this.client.call(t.ClientMethods.GET_ROUTING_PROFILE_QUEUES,{routingProfileARN:e.routingProfile.routingProfileARN,nextToken:o.nextToken||null,maxResults:o.maxResults},{success:function(t){t.nextToken?r.pollForRoutingProfileQueues(e,{countryCodes:(o.queues||[]).concat(t.queues),nextToken:t.nextToken,maxResults:o.maxResults}):(e.routingProfile.queues=(o.queues||[]).concat(t.queues),r.updateAgentConfiguration(e))},failure:function(e,n){t.getLog().error("Failed to fetch routing profile queues list.").sendInternalLogToServer().withObject({err:e,data:n})},authFailure:t.hitch(r,r.handleAuthFail),accessDenied:t.hitch(r,r.handleAccessDenied)})},o.prototype.handleAPIRequest=function(e,n){var r=this;this.client.call(n.method,n.params,{success:function(r){var o=t.EventFactory.createResponse(t.EventType.API_RESPONSE,n,r);e.sendDownstream(o.event,o)},failure:function(o,i){var s=t.EventFactory.createResponse(t.EventType.API_RESPONSE,n,i,JSON.stringify(o));e.sendDownstream(s.event,s),t.getLog().error("'%s' API request failed",n.method).withObject({request:r.filterAuthToken(n),response:s}).withException(o).sendInternalLogToServer()},authFailure:t.hitch(r,r.handleAuthFail,{authorize:!0})})},o.prototype.handleMasterRequest=function(e,n,r){var o=this.conduit,i=null;switch(r.method){case t.MasterMethods.BECOME_MASTER:var s=this.masterCoord.getMaster(r.params.topic),a=Boolean(s)&&s!==n;this.masterCoord.setMaster(r.params.topic,n),i=t.EventFactory.createResponse(t.EventType.MASTER_RESPONSE,r,{masterId:n,takeOver:a,topic:r.params.topic}),a&&o.sendDownstream(i.event,i);break;case t.MasterMethods.CHECK_MASTER:(s=this.masterCoord.getMaster(r.params.topic))||r.params.shouldNotBecomeMasterIfNone||(this.masterCoord.setMaster(r.params.topic,n),s=n),i=t.EventFactory.createResponse(t.EventType.MASTER_RESPONSE,r,{masterId:s,isMaster:n===s,topic:r.params.topic});break;default:throw new Error("Unknown master method: "+r.method)}e.sendDownstream(i.event,i)},o.prototype.handleTabIdEvent=function(e,n){var r=this;try{let o=n.tabId,i=r.streamMapByTabId[o],s=e.getId(),a=Object.keys(r.streamMapByTabId).filter((e=>r.streamMapByTabId[e].length>0)).length;if(i&&i.length>0){if(!i.includes(s)){r.streamMapByTabId[o].push(s);let e={length:Object.keys(r.portConduitMap).length,tabId:o,streamsTabsAcrossBrowser:a};e[o]={length:i.length},r.conduit.sendDownstream(t.EventType.UPDATE_CONNECTED_CCPS,e)}}else{r.streamMapByTabId[o]=[e.getId()];let n={length:Object.keys(r.portConduitMap).length,tabId:o,streamsTabsAcrossBrowser:a+1};n[o]={length:r.streamMapByTabId[o].length},r.conduit.sendDownstream(t.EventType.UPDATE_CONNECTED_CCPS,n)}}catch(e){t.getLog().error("[Tab Ids] Issue updating connected CCPs within the same tab").withException(e).sendInternalLogToServer()}},o.prototype.handleCloseEvent=function(e){var n=this;n.multiplexer.removeStream(e),delete n.portConduitMap[e.getId()],n.masterCoord.removeMaster(e.getId());let r={length:Object.keys(n.portConduitMap).length},o=Object.keys(n.streamMapByTabId);try{let t=o.find((t=>n.streamMapByTabId[t].includes(e.getId())));if(t){let o=n.streamMapByTabId[t].findIndex((t=>e.getId()===t));n.streamMapByTabId[t].splice(o,1);let i=n.streamMapByTabId[t]?n.streamMapByTabId[t].length:0;r[t]={length:i},r.tabId=t}let i=o.filter((e=>n.streamMapByTabId[e].length>0)).length;r.streamsTabsAcrossBrowser=i}catch(e){t.getLog().error("[Tab Ids] Issue updating tabId-specific stream data").withException(e).sendInternalLogToServer()}n.conduit.sendDownstream(t.EventType.UPDATE_CONNECTED_CCPS,r)},o.prototype.updateAgentConfiguration=function(e){e.permissions&&e.dialableCountries&&e.agentStates&&e.routingProfile.queues?(this.agent=this.agent||{},this.agent.configuration=e,this.updateAgent()):t.getLog().trace("Waiting to update agent configuration until all config data has been fetched.").sendInternalLogToServer()},o.prototype.updateAgent=function(){this.agent?this.agent.snapshot?this.agent.configuration?(this.agent.snapshot.status=this.agent.state,this.agent.snapshot.contacts&&this.agent.snapshot.contacts.length>1&&this.agent.snapshot.contacts.sort((function(e,t){return e.state.timestamp.getTime()-t.state.timestamp.getTime()})),this.agent.snapshot.contacts.forEach((function(e){e.status=e.state,e.connections.forEach((function(e){e.address=e.endpoint}))})),this.agent.configuration.routingProfile.defaultOutboundQueue.queueId=this.agent.configuration.routingProfile.defaultOutboundQueue.queueARN,this.agent.configuration.routingProfile.queues.forEach((function(e){e.queueId=e.queueARN})),this.agent.snapshot.contacts.forEach((function(e){void 0!==e.queue&&(e.queue.queueId=e.queue.queueARN)})),this.agent.configuration.routingProfile.routingProfileId=this.agent.configuration.routingProfile.routingProfileARN,this.conduit.sendDownstream(t.AgentEvents.UPDATE,this.agent)):t.getLog().trace("Waiting to update agent until the agent configuration is available.").sendInternalLogToServer():t.getLog().trace("Waiting to update agent until the agent snapshot is available.").sendInternalLogToServer():t.getLog().trace("Waiting to update agent until the agent has been fully constructed.").sendInternalLogToServer()},o.prototype.getWebSocketUrl=function(){var e=this,n=t.core.getClient(),r=t.hitch(e,e.handleAuthFail),o=t.hitch(e,e.handleAccessDenied);return new Promise((function(e,i){n.call(t.ClientMethods.CREATE_TRANSPORT,{transportType:t.TRANSPORT_TYPES.WEB_SOCKET},{success:function(n){t.getLog().info("getWebSocketUrl succeeded").sendInternalLogToServer(),e(n)},failure:function(e,n){t.getLog().error("getWebSocketUrl failed").sendInternalLogToServer().withObject({err:e,data:n}),i({reason:"getWebSocketUrl failed",_debug:e})},authFailure:function(){t.getLog().error("getWebSocketUrl Auth Failure").sendInternalLogToServer(),i(Error("Authentication failed while getting getWebSocketUrl")),r()},accessDenied:function(){t.getLog().error("getWebSocketUrl Access Denied Failure").sendInternalLogToServer(),i(Error("Access Denied Failure while getting getWebSocketUrl")),o()}})}))},o.prototype.handleSendLogsRequest=function(){var e=this,n=[],r=e.logsBuffer.slice();e.logsBuffer=[],r.forEach((function(e){n.push({timestamp:e.time,component:e.component,message:e.text})})),this.client.call(t.ClientMethods.SEND_CLIENT_LOGS,{logEvents:n},{success:function(e){t.getLog().info("SendLogs request succeeded.").sendInternalLogToServer()},failure:function(e,n){t.getLog().error("SendLogs request failed.").withObject(n).withException(e).sendInternalLogToServer()},authFailure:t.hitch(e,e.handleAuthFail)})},o.prototype.handleAuthFail=function(e){e?this.conduit.sendDownstream(t.EventType.AUTH_FAIL,e):this.conduit.sendDownstream(t.EventType.AUTH_FAIL)},o.prototype.handleAccessDenied=function(){this.conduit.sendDownstream(t.EventType.ACCESS_DENIED)},o.prototype.checkAuthToken=function(){var e=this,n=new Date(e.initData.authTokenExpiration),r=(new Date).getTime();n.getTime() { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 465: -/***/ ((module, exports, __webpack_require__) => { - -/* module decorator */ module = __webpack_require__.nmd(module); -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** Detect free variable `exports`. */ -var freeExports = true && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** - * Adds the key-value `pair` to `map`. - * - * @private - * @param {Object} map The map to modify. - * @param {Array} pair The key-value pair to add. - * @returns {Object} Returns `map`. - */ -function addMapEntry(map, pair) { - // Don't return `map.set` because it's not chainable in IE 11. - map.set(pair[0], pair[1]); - return map; -} - -/** - * Adds `value` to `set`. - * - * @private - * @param {Object} set The set to modify. - * @param {*} value The value to add. - * @returns {Object} Returns `set`. - */ -function addSetEntry(set, value) { - // Don't return `set.add` because it's not chainable in IE 11. - set.add(value); - return set; -} - -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array ? array.length : 0; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array ? array.length : 0; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/** Used for built-in method references. */ -var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - getPrototype = overArg(Object.getPrototypeOf, Object), - objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object); - -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); - -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; -} - -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; -} - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); -} - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} - -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; -} - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; -} - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - return getMapData(this, key)['delete'](key); -} - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); - return this; -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; - -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - this.__data__ = new ListCache(entries); -} - -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; -} - -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - return this.__data__['delete'](key); -} - -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} - -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} - -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var cache = this.__data__; - if (cache instanceof ListCache) { - var pairs = cache.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - return this; - } - cache = this.__data__ = new MapCache(pairs); - } - cache.set(key, value); - return this; -} - -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - // Safari 9 makes `arguments.length` enumerable in strict mode. - var result = (isArray(value) || isArguments(value)) - ? baseTimes(value.length, String) - : []; - - var length = result.length, - skipIndexes = !!length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && (key == 'length' || isIndex(key, length)))) { - result.push(key); - } - } - return result; -} - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - object[key] = value; - } -} - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {boolean} [isFull] Specify a clone including symbols. - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, isDeep, isFull, customizer, key, object, stack) { - var result; - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, baseClone, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (!isArr) { - var props = isFull ? getAllKeys(value) : keys(value); - } - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); - }); - return result; -} - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; -} - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} - -/** - * The base implementation of `getTag`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - return objectToString.call(value); -} - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var result = new buffer.constructor(buffer.length); - buffer.copy(result); - return result; -} - -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/** - * Creates a clone of `map`. - * - * @private - * @param {Object} map The map to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned map. - */ -function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); - return arrayReduce(array, addMapEntry, new map.constructor); -} - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/** - * Creates a clone of `set`. - * - * @private - * @param {Object} set The set to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned set. - */ -function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); - return arrayReduce(array, addSetEntry, new set.constructor); -} - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} - -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - assignValue(object, key, newValue === undefined ? source[key] : newValue); - } - return object; -} - -/** - * Copies own symbol properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); -} - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); -} - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -/** - * Creates an array of the own enumerable symbol properties of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; - -/** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11, -// for data views in Edge < 14, and promises in Node.js. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; -} - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, cloneFunc, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return cloneMap(object, isDeep, cloneFunc); - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return cloneSet(object, isDeep, cloneFunc); - - case symbolTag: - return cloneSymbol(object); - } -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return baseClone(value, true, true); -} - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} - -module.exports = cloneDeep; - - -/***/ }), - /***/ 821: /***/ (() => { @@ -27483,7 +25727,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- connect.core = {}; connect.core.initialized = false; - connect.version = "2.4.4"; + connect.version = "2.4.5"; connect.DEFAULT_BATCH_SIZE = 500; var CCP_SYN_TIMEOUT = 1000; // 1 sec @@ -28874,7 +27118,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- throw new connect.StateError('No agent data is available yet!'); } - return connect.deepcopy(this.agentData); + return this.agentData; }; AgentDataProvider.prototype.getContactData = function (contactId) { @@ -32904,9 +31148,8 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- /***/ }), /***/ 891: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { +/***/ (() => { -/* provided dependency */ var _cloneDeep = __webpack_require__(465); /* * Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -33282,7 +31525,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- }; connect.deepcopy = function (src) { - return _cloneDeep(src); + return JSON.parse(JSON.stringify(src)); }; connect.deepcopyCrossOriginEvent = function(event) { @@ -33290,9 +31533,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- const listOfAcceptableKeys = COPYABLE_EVENT_FIELDS; listOfAcceptableKeys.forEach((key) => { try { - if (event[key] !== undefined) { - obj[key] = event[key]; - } + obj[key] = event[key]; } catch(e) { connect.getLog().info("deepcopyCrossOriginEvent failed on key: ", key).sendInternalLogToServer(); @@ -34532,17 +32773,14 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { -/******/ id: moduleId, -/******/ loaded: false, +/******/ // no module.id needed +/******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } @@ -34560,15 +32798,6 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- /******/ })(); /******/ })(); /******/ -/******/ /* webpack/runtime/node module decorator */ -/******/ (() => { -/******/ __webpack_require__.nmd = (module) => { -/******/ module.paths = []; -/******/ if (!module.children) module.children = []; -/******/ return module; -/******/ }; -/******/ })(); -/******/ /************************************************************************/ /******/ /******/ // startup diff --git a/src/core.js b/src/core.js index f2d8a366..dc547c3e 100644 --- a/src/core.js +++ b/src/core.js @@ -1402,7 +1402,7 @@ throw new connect.StateError('No agent data is available yet!'); } - return connect.deepcopy(this.agentData); + return this.agentData; }; AgentDataProvider.prototype.getContactData = function (contactId) { diff --git a/src/util.js b/src/util.js index 389003e3..b4043143 100644 --- a/src/util.js +++ b/src/util.js @@ -373,7 +373,7 @@ }; connect.deepcopy = function (src) { - return _cloneDeep(src); + return JSON.parse(JSON.stringify(src)); }; connect.deepcopyCrossOriginEvent = function(event) { @@ -381,9 +381,7 @@ const listOfAcceptableKeys = COPYABLE_EVENT_FIELDS; listOfAcceptableKeys.forEach((key) => { try { - if (event[key] !== undefined) { - obj[key] = event[key]; - } + obj[key] = event[key]; } catch(e) { connect.getLog().info("deepcopyCrossOriginEvent failed on key: ", key).sendInternalLogToServer(); diff --git a/test/unit/core.spec.js b/test/unit/core.spec.js index e4b80b78..377122d9 100644 --- a/test/unit/core.spec.js +++ b/test/unit/core.spec.js @@ -1,6 +1,5 @@ const { assert, expect } = require("chai"); require("../unit/test-setup.js"); -const SAMPLE_CONFIGURATION = require("./sample-configuration.js"); describe('Core', function () { var sandbox = sinon.createSandbox(); @@ -1310,8 +1309,7 @@ describe('Core', function () { } function createAgentSnapshotState(type, name) { return { - snapshot: { state: createState(type, name) }, - configuration: SAMPLE_CONFIGURATION.baseConfig + snapshot: { state: createState(type, name) } }; } @@ -1372,12 +1370,6 @@ describe('Core', function () { assert.isTrue(enqueuedNextState); assert.isTrue(connect.core.getEventBus().trigger.calledWith(connect.AgentEvents.ENQUEUED_NEXT_STATE)); }); - - it('should provide the deep copy of agent data to consumers, which prevents the original data from being mutated', () => { - const expectedStateName = connect.core.agentDataProvider.getAgentData().configuration.agentStates[0].name; // the name before overwriting - connect.core.agentDataProvider.getAgentData().configuration.agentStates[0].name = 'overwritten'; // overwrite with an invalid value - expect(connect.core.agentDataProvider.getAgentData().configuration.agentStates[0].name).to.equal(expectedStateName); - }); }); describe('#connect.core.getFrameMediaDevices()', function () { diff --git a/test/unit/sample-configuration.js b/test/unit/sample-configuration.js deleted file mode 100644 index 3c43d668..00000000 --- a/test/unit/sample-configuration.js +++ /dev/null @@ -1,79 +0,0 @@ -const dummyInstanceARN = 'arn:aws:connect:us-west-2:123456789000:instance/12345678-1234-abcd-abcd-instance1234'; - -exports.baseConfig = { - "name": "AGENT_NAME", - "username": "USERNAME", - "softphoneEnabled": true, - "softphoneAutoAccept": false, - "extension": "", - "routingProfile": { - "name": "Basic Routing Profile", - "routingProfileARN": `${dummyInstanceARN}/routing-profile/12345678-1234-abcd-abcd-routing12345`, - "defaultOutboundQueue": { - "queueARN": `${dummyInstanceARN}/queue/12345678-1234-abcd-abcd-queue1234567`, - "name": "BasicQueue", - "queueId": `${dummyInstanceARN}/queue/12345678-1234-abcd-abcd-queue1234567` - }, - "channelConcurrencyMap": { - "CHAT": 10, - "TASK": 10, - "VOICE": 1 - }, - "queues": [ - { - "queueARN": `${dummyInstanceARN}/queue/12345678-1234-abcd-abcd-queue1234567`, - "name": "BasicQueue", - "queueId": `${dummyInstanceARN}/queue/12345678-1234-abcd-abcd-queue1234567` - }, - { - "queueARN": `${dummyInstanceARN}/queue/12345678-1234-abcd-abcd-queue7654321`, - "name": "CallbackQueue", - "queueId": `${dummyInstanceARN}/queue/12345678-1234-abcd-abcd-queue7654321` - } - ], - "routingProfileId": `${dummyInstanceARN}/routing-profile/12345678-1234-abcd-abcd-routing12345` - }, - "agentPreferences": { - "LANGUAGE": "en_US" - }, - "permissions": [ - "outboundCall", - "voiceId", - "ccpRealtimeContactLens" - ], - "agentStates": [ - { - "agentStateARN": `${dummyInstanceARN}/agent-state/12345678-1234-abcd-abcd-agentstate11`, - "type": "routable", - "name": "Available", - "startTimestamp": null - }, - { - "agentStateARN": `${dummyInstanceARN}/agent-state/12345678-1234-abcd-abcd-agentstate22`, - "type": "not_routable", - "name": "Lunch", - "startTimestamp": null - }, - { - "agentStateARN": `${dummyInstanceARN}/agent-state/12345678-1234-abcd-abcd-agentstate33`, - "type": "offline", - "name": "Offline", - "startTimestamp": null - } - ], - "dialableCountries": [ - "at", "de", "kg", "gl", "td", "cz", "tg", "ga", "pe", "eg", "la", "hk", "ht", "nl", "bb", - "mg", "fo", "gy", "ad", "il", "gp", "na", "sz", "is", "ge", "ve", "az", "cg", "do", "ec", - "pa", "mh", "ye", "gm", "ne", "bz", "tz", "am", "ac", "bj", "km", "es", "vi", "lr", "uz", - "dk", "tm", "tr", "tv", "py", "bt", "ru", "as", "om", "cf", "sv", "im", "dg", "hn", "br", - "fk", "ni", "pg", "lt", "my", "hu", "ca", "ar", "tk", "cv", "bn", "pf", "gu", "sl", "pt", - "lb", "mn", "al", "lk", "gh", "kn", "iq", "kz", "ma", "pr", "za", "pm", "ly", "th", "je", - "dz", "cd", "mr", "gd", "kh", "wf", "sc", "cn", "pk", "gw", "mq", "si", "se", "us", "bs", - "it", "lc", "me", "id", "ua", "gg", "qa", "in", "et", "tj", "ro", "cr", "tn", "ci", "ie", - "jp", "tl", "mt", "sm", "pw", "gr", "ck", "fm", "zm", "sk", "gq", "mx", "vg", "vn", "mz", - "md", "cm", "sg", "ky", "gn", "ai", "mu", "ps", "ml", "nu", "nz", "va", "an", "nc", "st", - "au", "bf", "bd", "bh", "gi", "dj", "tw", "be", "bm", "lv", "lu", "ae", "mm", "bw", "kw", - "sr", "sh", "ch", "ag", "ke", "bi", "bo", "cw", "mc", "hr", "sb", "io", "gb", "tc", "nr", - "mv", "mw", "co", "gt", "zw", "yt", "jo", "ba", "aw" - ] -}; \ No newline at end of file diff --git a/webpack/connect-streams.config.js b/webpack/connect-streams.config.js index 6f73f2eb..5c4e4707 100644 --- a/webpack/connect-streams.config.js +++ b/webpack/connect-streams.config.js @@ -41,9 +41,6 @@ const config = Object.assign({}, commonConfig, { values: { 'STREAMS_VERSION': process.env.npm_package_version } - }), - new webpack.ProvidePlugin({ - _cloneDeep: 'lodash.clonedeep', }) ] });