@aws-amplify/interactions 4.1.3 → 4.1.4-ds-allow-applicable-data.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("aws_amplify_core")):"function"==typeof define&&define.amd?define("aws_amplify_interactions",["aws_amplify_core"],t):"object"==typeof exports?exports.aws_amplify_interactions=t(require("aws_amplify_core")):e.aws_amplify_interactions=t(e.aws_amplify_core)}(this,(function(e){return 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}return 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=
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("aws_amplify_core")):"function"==typeof define&&define.amd?define("aws_amplify_interactions",["aws_amplify_core"],t):"object"==typeof exports?exports.aws_amplify_interactions=t(require("aws_amplify_core")):e.aws_amplify_interactions=t(e.aws_amplify_core)}(this,(function(e){return 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}return 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=83)}([function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return u}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}Object.create},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__await",(function(){return g})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return O})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -13,14 +13,14 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof g?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return d}));var r=n(1),o=function(){var e=[],t=[],n=new Set,s=function(n){return e.forEach((function(e){n.add(e.middleware,Object(r.__assign)({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,Object(r.__assign)({},e))})),n},u=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(r.__spread)(u(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(r.__spread)(u(e)))})),t},c=function(){var n,o=[],s=[],c={};return e.forEach((function(e){var t=Object(r.__assign)(Object(r.__assign)({},e),{before:[],after:[]});t.name&&(c[t.name]=t),o.push(t)})),t.forEach((function(e){var t=Object(r.__assign)(Object(r.__assign)({},e),{before:[],after:[]});t.name&&(c[t.name]=t),s.push(t)})),s.forEach((function(e){if(e.toMiddleware){var t=c[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(n=o,n.sort((function(e,t){return i[t.step]-i[e.step]||a[t.priority||"normal"]-a[e.priority||"normal"]}))).map(u).reduce((function(e,t){return e.push.apply(e,Object(r.__spread)(t)),e}),[]).map((function(e){return e.middleware}))},l={add:function(t,o){void 0===o&&(o={});var i=o.name,a=o.override,s=Object(r.__assign)({step:"initialize",priority:"normal",middleware:t},o);if(i){if(n.has(i)){if(!a)throw new Error("Duplicate middleware name '"+i+"'");var u=e.findIndex((function(e){return e.name===i})),c=e[u];if(c.step!==s.step||c.priority!==s.priority)throw new Error('"'+i+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+s.priority+" priority in "+s.step+" step.");e.splice(u,1)}n.add(i)}e.push(s)},addRelativeTo:function(e,o){var i=o.name,a=o.override,s=Object(r.__assign)({middleware:e},o);if(i){if(n.has(i)){if(!a)throw new Error("Duplicate middleware name '"+i+"'");var u=t.findIndex((function(e){return e.name===i})),c=t[u];if(c.toMiddleware!==s.toMiddleware||c.relation!==s.relation)throw new Error('"'+i+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+s.relation+' "'+s.toMiddleware+'" middleware.');t.splice(u,1)}n.add(i)}t.push(s)},clone:function(){return s(o())},use:function(e){e.applyToStack(l)},remove:function(r){return"string"==typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=s(o());return t.use(e),t},applyToStack:s,resolve:function(e,t){var n,o;try{for(var i=Object(r.__values)(c().reverse()),a=i.next();!a.done;a=i.next()){e=(0,a.value)(e,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return e}};return l},i={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},a={high:3,normal:2,low:1},s=function(){function e(e){this.middlewareStack=o(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,o="function"==typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),u=function(){this.middlewareStack=o()};function c(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}var l=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Object(r.__spread)([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};l.prototype=Object.create(String.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(l,String);var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))},t}(l);var d="***SensitiveInformation***"},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}(),o=n(1),i=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(o.__assign)(Object(o.__assign)({},this),{headers:Object(o.__assign)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,i=t[n];return Object(o.__assign)(Object(o.__assign)({},e),((r={})[n]=Array.isArray(i)?Object(o.__spread)(i):i,r))}),{}))),n},e}()},function(t,n){t.exports=e},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function s(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create},function(e,t,n){"use strict";n.r(t),n.d(t,"locateWindow",(function(){return o}));var r={};function o(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t,n){e.exports=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}return 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=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),o=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var o=e.getVersionPrecision(t),i=e.getVersionPrecision(n),a=Math.max(o,i),s=0,u=e.map([t,n],(function(t){var n=a-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=a-Math.min(o,i)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var o=e[n];if(t(o,n))return o}},e.assign=function(e){for(var t,n,r=e,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(i));var s=function(){var e=i[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=i.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=o,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(91))&&r.__esModule?r:{default:r},i=n(18);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new o.default(e,t)},e.parse=function(e){return new o.default(e).getResult()},t=e,(n=[{key:"BROWSER_MAP",get:function(){return i.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return i.ENGINE_MAP}},{key:"OS_MAP",get:function(){return i.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return i.PLATFORMS_MAP}}])&&a(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(92)),o=u(n(93)),i=u(n(94)),a=u(n(95)),s=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,o={},i=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(o[t]=a,i+=1):"object"==typeof a&&(n[t]=a,r+=1)})),r>0){var a=Object.keys(n),u=s.default.find(a,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var l=s.default.find(a,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(i>0){var d=Object.keys(o),p=s.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(o[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),o=s.default.getBrowserTypeByAlias(r);return t&&o&&(r=o.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(o,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=o.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},n=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=o.default.getMacOSVersionName(t),r={name:i.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=o.default.getAndroidVersionName(t),r={name:i.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:i.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},n=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:i.ENGINE_MAP.Presto},n=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:i.ENGINE_MAP.Gecko},n=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},n=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=a,e.exports=t.default}})},function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(0),o=n(3),i=n(2),a=function(t,n){return Object(r.b)(void 0,void 0,void 0,(function(){var a,s,u,c,l,f,d,p,h;return Object(r.d)(this,(function(v){switch(v.label){case 0:if(a=Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({"content-type":"application/octet-stream","x-amz-content-sha256":"UNSIGNED-PAYLOAD"},F(t.sessionAttributes)&&{"x-amz-lex-session-attributes":e.from(i.c.fromObject(t.sessionAttributes)).toString("base64")}),F(t.requestAttributes)&&{"x-amz-lex-request-attributes":e.from(i.c.fromObject(t.requestAttributes)).toString("base64")}),F(t.contentType)&&{"content-type":t.contentType}),F(t.accept)&&{accept:t.accept}),F(t.activeContexts)&&{"x-amz-lex-active-contexts":e.from(i.c.fromObject(t.activeContexts)).toString("base64")}),s="/bot/{botName}/alias/{botAlias}/user/{userId}/content",void 0===t.botName)throw new Error("No value provided for input HTTP label: botName.");if((u=t.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(s=s.replace("{botName}",Object(i.e)(u)),void 0===t.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");if((u=t.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(s=s.replace("{botAlias}",Object(i.e)(u)),void 0===t.userId)throw new Error("No value provided for input HTTP label: userId.");if((u=t.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return s=s.replace("{userId}",Object(i.e)(u)),void 0!==t.inputStream&&(c=t.inputStream),[4,n.endpoint()];case 1:return l=v.sent(),f=l.hostname,d=l.protocol,p=void 0===d?"https":d,h=l.port,[2,new o.a({protocol:p,hostname:f,port:h,method:"POST",headers:a,path:s,body:c})]}}))}))},s=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,a,s,u,c,l,f,d,p;return Object(r.d)(this,(function(h){switch(h.label){case 0:if(n={"content-type":"application/json"},a="/bot/{botName}/alias/{botAlias}/user/{userId}/text",void 0===e.botName)throw new Error("No value provided for input HTTP label: botName.");if((s=e.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(a=a.replace("{botName}",Object(i.e)(s)),void 0===e.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");if((s=e.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(a=a.replace("{botAlias}",Object(i.e)(s)),void 0===e.userId)throw new Error("No value provided for input HTTP label: userId.");if((s=e.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return a=a.replace("{userId}",Object(i.e)(s)),u=JSON.stringify(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},void 0!==e.activeContexts&&null!==e.activeContexts&&{activeContexts:O(e.activeContexts,t)}),void 0!==e.inputText&&null!==e.inputText&&{inputText:e.inputText}),void 0!==e.requestAttributes&&null!==e.requestAttributes&&{requestAttributes:x(e.requestAttributes,t)}),void 0!==e.sessionAttributes&&null!==e.sessionAttributes&&{sessionAttributes:x(e.sessionAttributes,t)})),[4,t.endpoint()];case 1:return c=h.sent(),l=c.hostname,f=c.protocol,d=void 0===f?"https":f,p=c.port,[2,new o.a({protocol:d,hostname:l,port:p,method:"POST",headers:n,path:a,body:u})]}}))}))},u=function(t,n){return Object(r.b)(void 0,void 0,void 0,(function(){var o,a;return Object(r.d)(this,(function(r){return 200!==t.statusCode&&t.statusCode>=300?[2,c(t,n)]:(o={$metadata:N(t),activeContexts:void 0,alternativeIntents:void 0,audioStream:void 0,botVersion:void 0,contentType:void 0,dialogState:void 0,inputTranscript:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},void 0!==t.headers["content-type"]&&(o.contentType=t.headers["content-type"]),void 0!==t.headers["x-amz-lex-intent-name"]&&(o.intentName=t.headers["x-amz-lex-intent-name"]),void 0!==t.headers["x-amz-lex-nlu-intent-confidence"]&&(o.nluIntentConfidence=new i.c(e.from(t.headers["x-amz-lex-nlu-intent-confidence"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-alternative-intents"]&&(o.alternativeIntents=new i.c(e.from(t.headers["x-amz-lex-alternative-intents"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-slots"]&&(o.slots=new i.c(e.from(t.headers["x-amz-lex-slots"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-session-attributes"]&&(o.sessionAttributes=new i.c(e.from(t.headers["x-amz-lex-session-attributes"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-sentiment"]&&(o.sentimentResponse=t.headers["x-amz-lex-sentiment"]),void 0!==t.headers["x-amz-lex-message"]&&(o.message=t.headers["x-amz-lex-message"]),void 0!==t.headers["x-amz-lex-message-format"]&&(o.messageFormat=t.headers["x-amz-lex-message-format"]),void 0!==t.headers["x-amz-lex-dialog-state"]&&(o.dialogState=t.headers["x-amz-lex-dialog-state"]),void 0!==t.headers["x-amz-lex-slot-to-elicit"]&&(o.slotToElicit=t.headers["x-amz-lex-slot-to-elicit"]),void 0!==t.headers["x-amz-lex-input-transcript"]&&(o.inputTranscript=t.headers["x-amz-lex-input-transcript"]),void 0!==t.headers["x-amz-lex-bot-version"]&&(o.botVersion=t.headers["x-amz-lex-bot-version"]),void 0!==t.headers["x-amz-lex-session-id"]&&(o.sessionId=t.headers["x-amz-lex-session-id"]),void 0!==t.headers["x-amz-lex-active-contexts"]&&(o.activeContexts=new i.c(e.from(t.headers["x-amz-lex-active-contexts"],"base64").toString("ascii"))),a=t.body,o.audioStream=a,[2,Promise.resolve(o)])}))}))},c=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,o,i,a,s,u,c,l,f,E,O,A,x,T,j,P,C,M;return Object(r.d)(this,(function(I){switch(I.label){case 0:return o=[Object(r.a)({},e)],M={},[4,z(e.body,t)];case 1:switch(n=r.a.apply(void 0,o.concat([(M.body=I.sent(),M)])),a="UnknownError",a=q(e,n.body),a){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotAcceptableException":case"com.amazonaws.lexruntimeservice#NotAcceptableException":return[3,16];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,18];case"RequestTimeoutException":case"com.amazonaws.lexruntimeservice#RequestTimeoutException":return[3,20];case"UnsupportedMediaTypeException":case"com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":return[3,22]}return[3,24];case 2:return s=[{}],[4,d(n,t)];case 3:return i=r.a.apply(void 0,[r.a.apply(void 0,s.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 4:return u=[{}],[4,p(n,t)];case 5:return i=r.a.apply(void 0,[r.a.apply(void 0,u.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 6:return c=[{}],[4,h(n,t)];case 7:return i=r.a.apply(void 0,[r.a.apply(void 0,c.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 8:return l=[{}],[4,v(n,t)];case 9:return i=r.a.apply(void 0,[r.a.apply(void 0,l.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 10:return f=[{}],[4,y(n,t)];case 11:return i=r.a.apply(void 0,[r.a.apply(void 0,f.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 12:return E=[{}],[4,m(n,t)];case 13:return i=r.a.apply(void 0,[r.a.apply(void 0,E.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 14:return O=[{}],[4,g(n,t)];case 15:return i=r.a.apply(void 0,[r.a.apply(void 0,O.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 16:return A=[{}],[4,b(n,t)];case 17:return i=r.a.apply(void 0,[r.a.apply(void 0,A.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 18:return x=[{}],[4,w(n,t)];case 19:return i=r.a.apply(void 0,[r.a.apply(void 0,x.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 20:return T=[{}],[4,_(n,t)];case 21:return i=r.a.apply(void 0,[r.a.apply(void 0,T.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 22:return j=[{}],[4,S(n,t)];case 23:return i=r.a.apply(void 0,[r.a.apply(void 0,j.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 24:P=n.body,a=P.code||P.Code||a,i=Object(r.a)(Object(r.a)({},P),{name:""+a,message:P.message||P.Message||a,$fault:"client",$metadata:N(e)}),I.label=25;case 25:return C=i.message||i.Message||a,i.message=C,delete i.Message,[2,Promise.reject(Object.assign(new Error(C),i))]}}))}))},l=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,o;return Object(r.d)(this,(function(r){switch(r.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,f(e,t)]:(n={$metadata:N(e),activeContexts:void 0,alternativeIntents:void 0,botVersion:void 0,dialogState:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,responseCard:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},[4,z(e.body,t)]);case 1:return void 0!==(o=r.sent()).activeContexts&&null!==o.activeContexts&&(n.activeContexts=j(o.activeContexts,t)),void 0!==o.alternativeIntents&&null!==o.alternativeIntents&&(n.alternativeIntents=I(o.alternativeIntents,t)),void 0!==o.botVersion&&null!==o.botVersion&&(n.botVersion=o.botVersion),void 0!==o.dialogState&&null!==o.dialogState&&(n.dialogState=o.dialogState),void 0!==o.intentName&&null!==o.intentName&&(n.intentName=o.intentName),void 0!==o.message&&null!==o.message&&(n.message=o.message),void 0!==o.messageFormat&&null!==o.messageFormat&&(n.messageFormat=o.messageFormat),void 0!==o.nluIntentConfidence&&null!==o.nluIntentConfidence&&(n.nluIntentConfidence=M(o.nluIntentConfidence,t)),void 0!==o.responseCard&&null!==o.responseCard&&(n.responseCard=L(o.responseCard,t)),void 0!==o.sentimentResponse&&null!==o.sentimentResponse&&(n.sentimentResponse=U(o.sentimentResponse,t)),void 0!==o.sessionAttributes&&null!==o.sessionAttributes&&(n.sessionAttributes=D(o.sessionAttributes,t)),void 0!==o.sessionId&&null!==o.sessionId&&(n.sessionId=o.sessionId),void 0!==o.slotToElicit&&null!==o.slotToElicit&&(n.slotToElicit=o.slotToElicit),void 0!==o.slots&&null!==o.slots&&(n.slots=D(o.slots,t)),[2,Promise.resolve(n)]}}))}))},f=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,o,i,a,s,u,c,l,f,b,_,S,E,O,A;return Object(r.d)(this,(function(x){switch(x.label){case 0:return o=[Object(r.a)({},e)],A={},[4,z(e.body,t)];case 1:switch(n=r.a.apply(void 0,o.concat([(A.body=x.sent(),A)])),a="UnknownError",a=q(e,n.body),a){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,16]}return[3,18];case 2:return s=[{}],[4,d(n,t)];case 3:return i=r.a.apply(void 0,[r.a.apply(void 0,s.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 4:return u=[{}],[4,p(n,t)];case 5:return i=r.a.apply(void 0,[r.a.apply(void 0,u.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 6:return c=[{}],[4,h(n,t)];case 7:return i=r.a.apply(void 0,[r.a.apply(void 0,c.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 8:return l=[{}],[4,v(n,t)];case 9:return i=r.a.apply(void 0,[r.a.apply(void 0,l.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 10:return f=[{}],[4,y(n,t)];case 11:return i=r.a.apply(void 0,[r.a.apply(void 0,f.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 12:return b=[{}],[4,m(n,t)];case 13:return i=r.a.apply(void 0,[r.a.apply(void 0,b.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 14:return _=[{}],[4,g(n,t)];case 15:return i=r.a.apply(void 0,[r.a.apply(void 0,_.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 16:return S=[{}],[4,w(n,t)];case 17:return i=r.a.apply(void 0,[r.a.apply(void 0,S.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 18:E=n.body,a=E.code||E.Code||a,i=Object(r.a)(Object(r.a)({},E),{name:""+a,message:E.message||E.Message||a,$fault:"client",$metadata:N(e)}),x.label=19;case 19:return O=i.message||i.Message||a,i.message=O,delete i.Message,[2,Promise.reject(Object.assign(new Error(O),i))]}}))}))},d=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"BadGatewayException",$fault:"server",$metadata:N(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},p=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"BadRequestException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},h=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"ConflictException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},v=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"DependencyFailedException",$fault:"client",$metadata:N(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},y=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"InternalFailureException",$fault:"server",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},m=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"LimitExceededException",$fault:"client",$metadata:N(e),message:void 0,retryAfterSeconds:void 0},void 0!==e.headers["retry-after"]&&(t.retryAfterSeconds=e.headers["retry-after"]),void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},g=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"LoopDetectedException",$fault:"server",$metadata:N(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},b=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"NotAcceptableException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},w=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"NotFoundException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},_=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"RequestTimeoutException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},S=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"UnsupportedMediaTypeException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},E=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.e)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},O=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return Object(r.a)(Object(r.a)(Object(r.a)({},void 0!==e.name&&null!==e.name&&{name:e.name}),void 0!==e.parameters&&null!==e.parameters&&{parameters:E(e.parameters,t)}),void 0!==e.timeToLive&&null!==e.timeToLive&&{timeToLive:A(e.timeToLive,t)})}(e,t)}))},A=function(e,t){return Object(r.a)(Object(r.a)({},void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds&&{timeToLiveInSeconds:e.timeToLiveInSeconds}),void 0!==e.turnsToLive&&null!==e.turnsToLive&&{turnsToLive:e.turnsToLive})},x=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.e)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},T=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.e)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},j=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{name:void 0!==e.name&&null!==e.name?e.name:void 0,parameters:void 0!==e.parameters&&null!==e.parameters?T(e.parameters,t):void 0,timeToLive:void 0!==e.timeToLive&&null!==e.timeToLive?P(e.timeToLive,t):void 0}}(e,t)}))},P=function(e,t){return{timeToLiveInSeconds:void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds?e.timeToLiveInSeconds:void 0,turnsToLive:void 0!==e.turnsToLive&&null!==e.turnsToLive?e.turnsToLive:void 0}},C=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{attachmentLinkUrl:void 0!==e.attachmentLinkUrl&&null!==e.attachmentLinkUrl?e.attachmentLinkUrl:void 0,buttons:void 0!==e.buttons&&null!==e.buttons?R(e.buttons,t):void 0,imageUrl:void 0!==e.imageUrl&&null!==e.imageUrl?e.imageUrl:void 0,subTitle:void 0!==e.subTitle&&null!==e.subTitle?e.subTitle:void 0,title:void 0!==e.title&&null!==e.title?e.title:void 0}}(e,t)}))},M=function(e,t){return{score:void 0!==e.score&&null!==e.score?e.score:void 0}},I=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:k(e,t)}))},R=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{text:void 0!==e.text&&null!==e.text?e.text:void 0,value:void 0!==e.value&&null!==e.value?e.value:void 0}}(e)}))},k=function(e,t){return{intentName:void 0!==e.intentName&&null!==e.intentName?e.intentName:void 0,nluIntentConfidence:void 0!==e.nluIntentConfidence&&null!==e.nluIntentConfidence?M(e.nluIntentConfidence,t):void 0,slots:void 0!==e.slots&&null!==e.slots?D(e.slots,t):void 0}},L=function(e,t){return{contentType:void 0!==e.contentType&&null!==e.contentType?e.contentType:void 0,genericAttachments:void 0!==e.genericAttachments&&null!==e.genericAttachments?C(e.genericAttachments,t):void 0,version:void 0!==e.version&&null!==e.version?e.version:void 0}},U=function(e,t){return{sentimentLabel:void 0!==e.sentimentLabel&&null!==e.sentimentLabel?e.sentimentLabel:void 0,sentimentScore:void 0!==e.sentimentScore&&null!==e.sentimentScore?e.sentimentScore:void 0}},D=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.e)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},N=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},B=function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then((function(e){return t.utf8Encoder(e)}))},F=function(e){return!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},z=function(e,t){return B(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},q=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""}}).call(this,n(10).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=t.Crc32=t.crc32=void 0;var r=n(27),o=n(11);t.crc32=function(e){return(new i).update(e).digest()};var i=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var o=(0,r.__values)(e),i=o.next();!i.done;i=o.next()){var s=i.value;this.checksum=this.checksum>>>8^a[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Crc32=i;var a=(0,o.uint32ArrayFrom)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),s=n(83);Object.defineProperty(t,"AwsCrc32",{enumerable:!0,get:function(){return s.AwsCrc32}})},function(e,t,n){"use strict";(function(e){
|
|
16
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof g?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return d}));var r=n(1),o=function(){var e=[],t=[],n=new Set,s=function(n){return e.forEach((function(e){n.add(e.middleware,Object(r.__assign)({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,Object(r.__assign)({},e))})),n},u=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(r.__spread)(u(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(r.__spread)(u(e)))})),t},c=function(){var n,o=[],s=[],c={};return e.forEach((function(e){var t=Object(r.__assign)(Object(r.__assign)({},e),{before:[],after:[]});t.name&&(c[t.name]=t),o.push(t)})),t.forEach((function(e){var t=Object(r.__assign)(Object(r.__assign)({},e),{before:[],after:[]});t.name&&(c[t.name]=t),s.push(t)})),s.forEach((function(e){if(e.toMiddleware){var t=c[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(n=o,n.sort((function(e,t){return i[t.step]-i[e.step]||a[t.priority||"normal"]-a[e.priority||"normal"]}))).map(u).reduce((function(e,t){return e.push.apply(e,Object(r.__spread)(t)),e}),[]).map((function(e){return e.middleware}))},l={add:function(t,o){void 0===o&&(o={});var i=o.name,a=o.override,s=Object(r.__assign)({step:"initialize",priority:"normal",middleware:t},o);if(i){if(n.has(i)){if(!a)throw new Error("Duplicate middleware name '"+i+"'");var u=e.findIndex((function(e){return e.name===i})),c=e[u];if(c.step!==s.step||c.priority!==s.priority)throw new Error('"'+i+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+s.priority+" priority in "+s.step+" step.");e.splice(u,1)}n.add(i)}e.push(s)},addRelativeTo:function(e,o){var i=o.name,a=o.override,s=Object(r.__assign)({middleware:e},o);if(i){if(n.has(i)){if(!a)throw new Error("Duplicate middleware name '"+i+"'");var u=t.findIndex((function(e){return e.name===i})),c=t[u];if(c.toMiddleware!==s.toMiddleware||c.relation!==s.relation)throw new Error('"'+i+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+s.relation+' "'+s.toMiddleware+'" middleware.');t.splice(u,1)}n.add(i)}t.push(s)},clone:function(){return s(o())},use:function(e){e.applyToStack(l)},remove:function(r){return"string"==typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=s(o());return t.use(e),t},applyToStack:s,resolve:function(e,t){var n,o;try{for(var i=Object(r.__values)(c().reverse()),a=i.next();!a.done;a=i.next()){e=(0,a.value)(e,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return e}};return l},i={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},a={high:3,normal:2,low:1},s=function(){function e(e){this.middlewareStack=o(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,o="function"==typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),u=function(){this.middlewareStack=o()};function c(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}var l=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Object(r.__spread)([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};l.prototype=Object.create(String.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(l,String);var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))},t}(l);var d="***SensitiveInformation***"},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}(),o=n(1),i=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(o.__assign)(Object(o.__assign)({},this),{headers:Object(o.__assign)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,i=t[n];return Object(o.__assign)(Object(o.__assign)({},e),((r={})[n]=Array.isArray(i)?Object(o.__spread)(i):i,r))}),{}))),n},e}()},function(t,n){t.exports=e},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function s(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create},function(e,t,n){"use strict";n.r(t),n.d(t,"locateWindow",(function(){return o}));var r={};function o(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t,n){e.exports=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}return 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=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),o=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var o=e.getVersionPrecision(t),i=e.getVersionPrecision(n),a=Math.max(o,i),s=0,u=e.map([t,n],(function(t){var n=a-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=a-Math.min(o,i)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var o=e[n];if(t(o,n))return o}},e.assign=function(e){for(var t,n,r=e,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(i));var s=function(){var e=i[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=i.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=o,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(91))&&r.__esModule?r:{default:r},i=n(18);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new o.default(e,t)},e.parse=function(e){return new o.default(e).getResult()},t=e,(n=[{key:"BROWSER_MAP",get:function(){return i.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return i.ENGINE_MAP}},{key:"OS_MAP",get:function(){return i.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return i.PLATFORMS_MAP}}])&&a(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(92)),o=u(n(93)),i=u(n(94)),a=u(n(95)),s=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,o={},i=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(o[t]=a,i+=1):"object"==typeof a&&(n[t]=a,r+=1)})),r>0){var a=Object.keys(n),u=s.default.find(a,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var l=s.default.find(a,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(i>0){var d=Object.keys(o),p=s.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(o[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),o=s.default.getBrowserTypeByAlias(r);return t&&o&&(r=o.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(o,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=o.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},n=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=o.default.getMacOSVersionName(t),r={name:i.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=o.default.getAndroidVersionName(t),r={name:i.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:i.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},n=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:i.ENGINE_MAP.Presto},n=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:i.ENGINE_MAP.Gecko},n=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},n=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=a,e.exports=t.default}})},function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(0),o=n(3),i=n(2),a=function(t,n){return Object(r.b)(void 0,void 0,void 0,(function(){var a,s,u,c,l,f,d,p,h;return Object(r.d)(this,(function(v){switch(v.label){case 0:if(a=Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({"content-type":"application/octet-stream","x-amz-content-sha256":"UNSIGNED-PAYLOAD"},F(t.sessionAttributes)&&{"x-amz-lex-session-attributes":e.from(i.c.fromObject(t.sessionAttributes)).toString("base64")}),F(t.requestAttributes)&&{"x-amz-lex-request-attributes":e.from(i.c.fromObject(t.requestAttributes)).toString("base64")}),F(t.contentType)&&{"content-type":t.contentType}),F(t.accept)&&{accept:t.accept}),F(t.activeContexts)&&{"x-amz-lex-active-contexts":e.from(i.c.fromObject(t.activeContexts)).toString("base64")}),s="/bot/{botName}/alias/{botAlias}/user/{userId}/content",void 0===t.botName)throw new Error("No value provided for input HTTP label: botName.");if((u=t.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(s=s.replace("{botName}",Object(i.e)(u)),void 0===t.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");if((u=t.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(s=s.replace("{botAlias}",Object(i.e)(u)),void 0===t.userId)throw new Error("No value provided for input HTTP label: userId.");if((u=t.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return s=s.replace("{userId}",Object(i.e)(u)),void 0!==t.inputStream&&(c=t.inputStream),[4,n.endpoint()];case 1:return l=v.sent(),f=l.hostname,d=l.protocol,p=void 0===d?"https":d,h=l.port,[2,new o.a({protocol:p,hostname:f,port:h,method:"POST",headers:a,path:s,body:c})]}}))}))},s=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,a,s,u,c,l,f,d,p;return Object(r.d)(this,(function(h){switch(h.label){case 0:if(n={"content-type":"application/json"},a="/bot/{botName}/alias/{botAlias}/user/{userId}/text",void 0===e.botName)throw new Error("No value provided for input HTTP label: botName.");if((s=e.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(a=a.replace("{botName}",Object(i.e)(s)),void 0===e.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");if((s=e.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(a=a.replace("{botAlias}",Object(i.e)(s)),void 0===e.userId)throw new Error("No value provided for input HTTP label: userId.");if((s=e.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return a=a.replace("{userId}",Object(i.e)(s)),u=JSON.stringify(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},void 0!==e.activeContexts&&null!==e.activeContexts&&{activeContexts:O(e.activeContexts,t)}),void 0!==e.inputText&&null!==e.inputText&&{inputText:e.inputText}),void 0!==e.requestAttributes&&null!==e.requestAttributes&&{requestAttributes:x(e.requestAttributes,t)}),void 0!==e.sessionAttributes&&null!==e.sessionAttributes&&{sessionAttributes:x(e.sessionAttributes,t)})),[4,t.endpoint()];case 1:return c=h.sent(),l=c.hostname,f=c.protocol,d=void 0===f?"https":f,p=c.port,[2,new o.a({protocol:d,hostname:l,port:p,method:"POST",headers:n,path:a,body:u})]}}))}))},u=function(t,n){return Object(r.b)(void 0,void 0,void 0,(function(){var o,a;return Object(r.d)(this,(function(r){return 200!==t.statusCode&&t.statusCode>=300?[2,c(t,n)]:(o={$metadata:N(t),activeContexts:void 0,alternativeIntents:void 0,audioStream:void 0,botVersion:void 0,contentType:void 0,dialogState:void 0,inputTranscript:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},void 0!==t.headers["content-type"]&&(o.contentType=t.headers["content-type"]),void 0!==t.headers["x-amz-lex-intent-name"]&&(o.intentName=t.headers["x-amz-lex-intent-name"]),void 0!==t.headers["x-amz-lex-nlu-intent-confidence"]&&(o.nluIntentConfidence=new i.c(e.from(t.headers["x-amz-lex-nlu-intent-confidence"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-alternative-intents"]&&(o.alternativeIntents=new i.c(e.from(t.headers["x-amz-lex-alternative-intents"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-slots"]&&(o.slots=new i.c(e.from(t.headers["x-amz-lex-slots"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-session-attributes"]&&(o.sessionAttributes=new i.c(e.from(t.headers["x-amz-lex-session-attributes"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-sentiment"]&&(o.sentimentResponse=t.headers["x-amz-lex-sentiment"]),void 0!==t.headers["x-amz-lex-message"]&&(o.message=t.headers["x-amz-lex-message"]),void 0!==t.headers["x-amz-lex-message-format"]&&(o.messageFormat=t.headers["x-amz-lex-message-format"]),void 0!==t.headers["x-amz-lex-dialog-state"]&&(o.dialogState=t.headers["x-amz-lex-dialog-state"]),void 0!==t.headers["x-amz-lex-slot-to-elicit"]&&(o.slotToElicit=t.headers["x-amz-lex-slot-to-elicit"]),void 0!==t.headers["x-amz-lex-input-transcript"]&&(o.inputTranscript=t.headers["x-amz-lex-input-transcript"]),void 0!==t.headers["x-amz-lex-bot-version"]&&(o.botVersion=t.headers["x-amz-lex-bot-version"]),void 0!==t.headers["x-amz-lex-session-id"]&&(o.sessionId=t.headers["x-amz-lex-session-id"]),void 0!==t.headers["x-amz-lex-active-contexts"]&&(o.activeContexts=new i.c(e.from(t.headers["x-amz-lex-active-contexts"],"base64").toString("ascii"))),a=t.body,o.audioStream=a,[2,Promise.resolve(o)])}))}))},c=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,o,i,a,s,u,c,l,f,E,O,A,x,T,j,P,C,M;return Object(r.d)(this,(function(I){switch(I.label){case 0:return o=[Object(r.a)({},e)],M={},[4,z(e.body,t)];case 1:switch(n=r.a.apply(void 0,o.concat([(M.body=I.sent(),M)])),a="UnknownError",a=q(e,n.body),a){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotAcceptableException":case"com.amazonaws.lexruntimeservice#NotAcceptableException":return[3,16];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,18];case"RequestTimeoutException":case"com.amazonaws.lexruntimeservice#RequestTimeoutException":return[3,20];case"UnsupportedMediaTypeException":case"com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":return[3,22]}return[3,24];case 2:return s=[{}],[4,d(n,t)];case 3:return i=r.a.apply(void 0,[r.a.apply(void 0,s.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 4:return u=[{}],[4,p(n,t)];case 5:return i=r.a.apply(void 0,[r.a.apply(void 0,u.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 6:return c=[{}],[4,h(n,t)];case 7:return i=r.a.apply(void 0,[r.a.apply(void 0,c.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 8:return l=[{}],[4,v(n,t)];case 9:return i=r.a.apply(void 0,[r.a.apply(void 0,l.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 10:return f=[{}],[4,y(n,t)];case 11:return i=r.a.apply(void 0,[r.a.apply(void 0,f.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 12:return E=[{}],[4,m(n,t)];case 13:return i=r.a.apply(void 0,[r.a.apply(void 0,E.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 14:return O=[{}],[4,g(n,t)];case 15:return i=r.a.apply(void 0,[r.a.apply(void 0,O.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 16:return A=[{}],[4,b(n,t)];case 17:return i=r.a.apply(void 0,[r.a.apply(void 0,A.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 18:return x=[{}],[4,w(n,t)];case 19:return i=r.a.apply(void 0,[r.a.apply(void 0,x.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 20:return T=[{}],[4,_(n,t)];case 21:return i=r.a.apply(void 0,[r.a.apply(void 0,T.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 22:return j=[{}],[4,S(n,t)];case 23:return i=r.a.apply(void 0,[r.a.apply(void 0,j.concat([I.sent()])),{name:a,$metadata:N(e)}]),[3,25];case 24:P=n.body,a=P.code||P.Code||a,i=Object(r.a)(Object(r.a)({},P),{name:""+a,message:P.message||P.Message||a,$fault:"client",$metadata:N(e)}),I.label=25;case 25:return C=i.message||i.Message||a,i.message=C,delete i.Message,[2,Promise.reject(Object.assign(new Error(C),i))]}}))}))},l=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,o;return Object(r.d)(this,(function(r){switch(r.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,f(e,t)]:(n={$metadata:N(e),activeContexts:void 0,alternativeIntents:void 0,botVersion:void 0,dialogState:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,responseCard:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},[4,z(e.body,t)]);case 1:return void 0!==(o=r.sent()).activeContexts&&null!==o.activeContexts&&(n.activeContexts=j(o.activeContexts,t)),void 0!==o.alternativeIntents&&null!==o.alternativeIntents&&(n.alternativeIntents=I(o.alternativeIntents,t)),void 0!==o.botVersion&&null!==o.botVersion&&(n.botVersion=o.botVersion),void 0!==o.dialogState&&null!==o.dialogState&&(n.dialogState=o.dialogState),void 0!==o.intentName&&null!==o.intentName&&(n.intentName=o.intentName),void 0!==o.message&&null!==o.message&&(n.message=o.message),void 0!==o.messageFormat&&null!==o.messageFormat&&(n.messageFormat=o.messageFormat),void 0!==o.nluIntentConfidence&&null!==o.nluIntentConfidence&&(n.nluIntentConfidence=M(o.nluIntentConfidence,t)),void 0!==o.responseCard&&null!==o.responseCard&&(n.responseCard=L(o.responseCard,t)),void 0!==o.sentimentResponse&&null!==o.sentimentResponse&&(n.sentimentResponse=U(o.sentimentResponse,t)),void 0!==o.sessionAttributes&&null!==o.sessionAttributes&&(n.sessionAttributes=D(o.sessionAttributes,t)),void 0!==o.sessionId&&null!==o.sessionId&&(n.sessionId=o.sessionId),void 0!==o.slotToElicit&&null!==o.slotToElicit&&(n.slotToElicit=o.slotToElicit),void 0!==o.slots&&null!==o.slots&&(n.slots=D(o.slots,t)),[2,Promise.resolve(n)]}}))}))},f=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,o,i,a,s,u,c,l,f,b,_,S,E,O,A;return Object(r.d)(this,(function(x){switch(x.label){case 0:return o=[Object(r.a)({},e)],A={},[4,z(e.body,t)];case 1:switch(n=r.a.apply(void 0,o.concat([(A.body=x.sent(),A)])),a="UnknownError",a=q(e,n.body),a){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,16]}return[3,18];case 2:return s=[{}],[4,d(n,t)];case 3:return i=r.a.apply(void 0,[r.a.apply(void 0,s.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 4:return u=[{}],[4,p(n,t)];case 5:return i=r.a.apply(void 0,[r.a.apply(void 0,u.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 6:return c=[{}],[4,h(n,t)];case 7:return i=r.a.apply(void 0,[r.a.apply(void 0,c.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 8:return l=[{}],[4,v(n,t)];case 9:return i=r.a.apply(void 0,[r.a.apply(void 0,l.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 10:return f=[{}],[4,y(n,t)];case 11:return i=r.a.apply(void 0,[r.a.apply(void 0,f.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 12:return b=[{}],[4,m(n,t)];case 13:return i=r.a.apply(void 0,[r.a.apply(void 0,b.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 14:return _=[{}],[4,g(n,t)];case 15:return i=r.a.apply(void 0,[r.a.apply(void 0,_.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 16:return S=[{}],[4,w(n,t)];case 17:return i=r.a.apply(void 0,[r.a.apply(void 0,S.concat([x.sent()])),{name:a,$metadata:N(e)}]),[3,19];case 18:E=n.body,a=E.code||E.Code||a,i=Object(r.a)(Object(r.a)({},E),{name:""+a,message:E.message||E.Message||a,$fault:"client",$metadata:N(e)}),x.label=19;case 19:return O=i.message||i.Message||a,i.message=O,delete i.Message,[2,Promise.reject(Object.assign(new Error(O),i))]}}))}))},d=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"BadGatewayException",$fault:"server",$metadata:N(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},p=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"BadRequestException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},h=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"ConflictException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},v=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"DependencyFailedException",$fault:"client",$metadata:N(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},y=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"InternalFailureException",$fault:"server",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},m=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"LimitExceededException",$fault:"client",$metadata:N(e),message:void 0,retryAfterSeconds:void 0},void 0!==e.headers["retry-after"]&&(t.retryAfterSeconds=e.headers["retry-after"]),void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},g=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"LoopDetectedException",$fault:"server",$metadata:N(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},b=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"NotAcceptableException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},w=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"NotFoundException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},_=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"RequestTimeoutException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},S=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"UnsupportedMediaTypeException",$fault:"client",$metadata:N(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},E=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.e)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},O=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return Object(r.a)(Object(r.a)(Object(r.a)({},void 0!==e.name&&null!==e.name&&{name:e.name}),void 0!==e.parameters&&null!==e.parameters&&{parameters:E(e.parameters,t)}),void 0!==e.timeToLive&&null!==e.timeToLive&&{timeToLive:A(e.timeToLive,t)})}(e,t)}))},A=function(e,t){return Object(r.a)(Object(r.a)({},void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds&&{timeToLiveInSeconds:e.timeToLiveInSeconds}),void 0!==e.turnsToLive&&null!==e.turnsToLive&&{turnsToLive:e.turnsToLive})},x=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.e)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},T=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.e)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},j=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{name:void 0!==e.name&&null!==e.name?e.name:void 0,parameters:void 0!==e.parameters&&null!==e.parameters?T(e.parameters,t):void 0,timeToLive:void 0!==e.timeToLive&&null!==e.timeToLive?P(e.timeToLive,t):void 0}}(e,t)}))},P=function(e,t){return{timeToLiveInSeconds:void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds?e.timeToLiveInSeconds:void 0,turnsToLive:void 0!==e.turnsToLive&&null!==e.turnsToLive?e.turnsToLive:void 0}},C=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{attachmentLinkUrl:void 0!==e.attachmentLinkUrl&&null!==e.attachmentLinkUrl?e.attachmentLinkUrl:void 0,buttons:void 0!==e.buttons&&null!==e.buttons?R(e.buttons,t):void 0,imageUrl:void 0!==e.imageUrl&&null!==e.imageUrl?e.imageUrl:void 0,subTitle:void 0!==e.subTitle&&null!==e.subTitle?e.subTitle:void 0,title:void 0!==e.title&&null!==e.title?e.title:void 0}}(e,t)}))},M=function(e,t){return{score:void 0!==e.score&&null!==e.score?e.score:void 0}},I=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:k(e,t)}))},R=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{text:void 0!==e.text&&null!==e.text?e.text:void 0,value:void 0!==e.value&&null!==e.value?e.value:void 0}}(e)}))},k=function(e,t){return{intentName:void 0!==e.intentName&&null!==e.intentName?e.intentName:void 0,nluIntentConfidence:void 0!==e.nluIntentConfidence&&null!==e.nluIntentConfidence?M(e.nluIntentConfidence,t):void 0,slots:void 0!==e.slots&&null!==e.slots?D(e.slots,t):void 0}},L=function(e,t){return{contentType:void 0!==e.contentType&&null!==e.contentType?e.contentType:void 0,genericAttachments:void 0!==e.genericAttachments&&null!==e.genericAttachments?C(e.genericAttachments,t):void 0,version:void 0!==e.version&&null!==e.version?e.version:void 0}},U=function(e,t){return{sentimentLabel:void 0!==e.sentimentLabel&&null!==e.sentimentLabel?e.sentimentLabel:void 0,sentimentScore:void 0!==e.sentimentScore&&null!==e.sentimentScore?e.sentimentScore:void 0}},D=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.e)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},N=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},B=function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then((function(e){return t.utf8Encoder(e)}))},F=function(e){return!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},z=function(e,t){return B(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},q=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""}}).call(this,n(10).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=t.Crc32=t.crc32=void 0;var r=n(26),o=n(11);t.crc32=function(e){return(new i).update(e).digest()};var i=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var o=(0,r.__values)(e),i=o.next();!i.done;i=o.next()){var s=i.value;this.checksum=this.checksum>>>8^a[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Crc32=i;var a=(0,o.uint32ArrayFrom)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),s=n(82);Object.defineProperty(t,"AwsCrc32",{enumerable:!0,get:function(){return s.AwsCrc32}})},function(e,t,n){"use strict";(function(e){
|
|
17
17
|
/*!
|
|
18
18
|
* The buffer module from node.js, for the browser.
|
|
19
19
|
*
|
|
20
20
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
21
21
|
* @license MIT
|
|
22
22
|
*/
|
|
23
|
-
var r=n(43),o=n(44),i=n(45);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=s(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(u.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 F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function v(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 P(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return j(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(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=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,s=e.length,u=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;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+u>s&&(n=s-u),i=n;i>=0;i--){for(var f=!0,d=0;d<u;d++)if(c(e,i+d)!==c(t,d)){f=!1;break}if(f)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(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 a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function w(e,t,n,r){return q(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return _(e,t,n,r)}function E(e,t,n,r){return q(z(t),e,n,r)}function O(e,t,n,r){return q(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function x(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,u,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},u.byteLength=h,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):v.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,o){if(!u.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),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n),f=0;f<s;++f)if(c[f]!==l[f]){i=c[f],a=l[f];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(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 b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function j(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=B(e[i]);return o}function C(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function k(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function L(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||L(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,i){return i||L(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.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),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var o=t-e;n=new u(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(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},u.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):k(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):k(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},u.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<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=u.isBuffer(e)?e:F(new u(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+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 z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(42))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(67);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(68);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(69);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(70);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__await",(function(){return g})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return O})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
23
|
+
var r=n(42),o=n(43),i=n(44);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=s(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(u.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 F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function v(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 P(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return j(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(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=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,s=e.length,u=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;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+u>s&&(n=s-u),i=n;i>=0;i--){for(var f=!0,d=0;d<u;d++)if(c(e,i+d)!==c(t,d)){f=!1;break}if(f)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(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 a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function w(e,t,n,r){return q(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return _(e,t,n,r)}function E(e,t,n,r){return q(z(t),e,n,r)}function O(e,t,n,r){return q(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function x(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,u,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},u.byteLength=h,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):v.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,o){if(!u.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),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n),f=0;f<s;++f)if(c[f]!==l[f]){i=c[f],a=l[f];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(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 b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function j(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=B(e[i]);return o}function C(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function k(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function L(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||L(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,i){return i||L(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.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),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var o=t-e;n=new u(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(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},u.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):k(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):k(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},u.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<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=u.isBuffer(e)?e:F(new u(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+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 z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(41))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(66);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(67);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(68);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(69);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__await",(function(){return g})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return O})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
24
24
|
/*! *****************************************************************************
|
|
25
25
|
Copyright (c) Microsoft Corporation.
|
|
26
26
|
|
|
@@ -35,7 +35,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
35
35
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
36
36
|
PERFORMANCE OF THIS SOFTWARE.
|
|
37
37
|
***************************************************************************** */
|
|
38
|
-
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof g?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(39),o=n(17),i=n(28),a=n(6),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",u(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(u(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function u(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(40),o=n(17),i=n(6),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=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]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){}).call(this,n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(66),o=n(23),i=n(12),a=n(6),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",u(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(u(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function u(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(11),o=n(23),i=n(6),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=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]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__await",(function(){return g})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return O})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
38
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof g?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(38),o=n(16),i=n(27),a=n(6),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",u(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(u(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function u(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(39),o=n(16),i=n(6),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=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]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){}).call(this,n(19))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(65),o=n(22),i=n(84),a=n(6),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",u(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(u(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function u(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(11),o=n(22),i=n(6),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=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]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__await",(function(){return g})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return O})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
39
39
|
/*! *****************************************************************************
|
|
40
40
|
Copyright (c) Microsoft Corporation.
|
|
41
41
|
|
|
@@ -65,9 +65,9 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
65
65
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
66
66
|
PERFORMANCE OF THIS SOFTWARE.
|
|
67
67
|
***************************************************************************** */
|
|
68
|
-
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof g?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){var r=n(36),o=n(37),i=o;i.v1=r,i.v4=o,e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(1).__exportStar)(n(38),t);var r=n(16);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(18);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-lex-runtime-service","description":"AWS SDK for JavaScript Lex Runtime Service Client for Node.js, Browser and React Native","version":"3.6.1","scripts":{"clean":"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./","prepublishOnly":"yarn build","pretest":"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test:unit":"mocha **/cjs/**/*.spec.js","test":"yarn test:unit","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build":"yarn build:cjs && yarn build:es","postbuild":"downlevel-dts types types/ts3.4"},"main":"./dist/cjs/index.js","types":"./types/index.d.ts","module":"./dist/es/index.js","browser":{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},"sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1","tslib":"^2.0.0"},"devDependencies":{"@aws-sdk/client-documentation-generator":"3.6.1","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","typedoc":"^0.19.2","typescript":"~4.1.2"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"types/*":["types/ts3.4/*"]}},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-lex-runtime-service","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-lex-runtime-service"}}')},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(5),o=n(35),i={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},a=function(t){return{applyToStack:function(n){n.add(function(t){return function(n){return function(i){return Object(r.b)(void 0,void 0,void 0,(function(){var a,s,u,c;return Object(r.c)(this,(function(l){return a=i.request,!o.a.isInstance(a)||"node"!==t.runtime||a.headers.hasOwnProperty("X-Amzn-Trace-Id")?[2,n(i)]:(s=e.env.AWS_LAMBDA_FUNCTION_NAME,u=e.env._X_AMZN_TRACE_ID,(c=function(e){return"string"==typeof e&&e.length>0})(s)&&c(u)&&(a.headers["X-Amzn-Trace-Id"]=u),[2,n(Object(r.a)(Object(r.a)({},i),{request:a}))])}))}))}}}(t),i)}}}}).call(this,n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(13).__exportStar)(n(65),t);var r=n(22);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(24);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-lex-runtime-v2","description":"AWS SDK for JavaScript Lex Runtime V2 Client for Node.js, Browser and React Native","version":"3.171.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"tsc -p tsconfig.cjs.json","build:docs":"typedoc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/client-sts":"3.171.0","@aws-sdk/config-resolver":"3.171.0","@aws-sdk/credential-provider-node":"3.171.0","@aws-sdk/eventstream-handler-node":"3.171.0","@aws-sdk/eventstream-serde-browser":"3.171.0","@aws-sdk/eventstream-serde-config-resolver":"3.171.0","@aws-sdk/eventstream-serde-node":"3.171.0","@aws-sdk/fetch-http-handler":"3.171.0","@aws-sdk/hash-node":"3.171.0","@aws-sdk/invalid-dependency":"3.171.0","@aws-sdk/middleware-content-length":"3.171.0","@aws-sdk/middleware-eventstream":"3.171.0","@aws-sdk/middleware-host-header":"3.171.0","@aws-sdk/middleware-logger":"3.171.0","@aws-sdk/middleware-recursion-detection":"3.171.0","@aws-sdk/middleware-retry":"3.171.0","@aws-sdk/middleware-serde":"3.171.0","@aws-sdk/middleware-signing":"3.171.0","@aws-sdk/middleware-stack":"3.171.0","@aws-sdk/middleware-user-agent":"3.171.0","@aws-sdk/node-config-provider":"3.171.0","@aws-sdk/node-http-handler":"3.171.0","@aws-sdk/protocol-http":"3.171.0","@aws-sdk/smithy-client":"3.171.0","@aws-sdk/types":"3.171.0","@aws-sdk/url-parser":"3.171.0","@aws-sdk/util-base64-browser":"3.170.0","@aws-sdk/util-base64-node":"3.170.0","@aws-sdk/util-body-length-browser":"3.170.0","@aws-sdk/util-body-length-node":"3.170.0","@aws-sdk/util-defaults-mode-browser":"3.171.0","@aws-sdk/util-defaults-mode-node":"3.171.0","@aws-sdk/util-user-agent-browser":"3.171.0","@aws-sdk/util-user-agent-node":"3.171.0","@aws-sdk/util-utf8-browser":"3.170.0","@aws-sdk/util-utf8-node":"3.170.0","tslib":"^2.3.1"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.170.0","@tsconfig/recommended":"1.0.1","@types/node":"^12.7.5","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typedoc":"0.19.2","typescript":"~4.6.2"},"overrides":{"typedoc":{"typescript":"~4.6.2"}},"engines":{"node":">=12.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-lex-runtime-v2","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-lex-runtime-v2"}}')},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(5),o=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(r.a)(Object(r.a)({},this),{headers:Object(r.a)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var o,i=t[n];return Object(r.a)(Object(r.a)({},e),((o={})[n]=Array.isArray(i)?Object(r.e)([],Object(r.d)(i),!1):i,o))}),{}))),n},e}();!function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}()},function(e,t,n){var r,o,i=n(14),a=n(15),s=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==d){var p=i();null==f&&(f=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,y=h-s+(v-u)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,u=v,o=d;var m=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;l[c++]=m>>>24&255,l[c++]=m>>>16&255,l[c++]=m>>>8&255,l[c++]=255&m;var g=h/4294967296*1e4&268435455;l[c++]=g>>>8&255,l[c++]=255&g,l[c++]=g>>>24&15|16,l[c++]=g>>>16&255,l[c++]=d>>>8|128,l[c++]=255&d;for(var b=0;b<6;++b)l[c+b]=f[b];return t||a(l)}},function(e,t,n){var r=n(14),o=n(15);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(16),o=n(18),i=n(49),a=n(57),s=n(59),u=n(6),c=function(){function e(e){(0,a.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,u.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(41);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(46);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(47);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(48);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(28),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(10).Buffer)},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},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(l(e,a,a+16383>s?s:a+16383));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]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)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,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){
|
|
68
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof g?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){var r=n(35),o=n(36),i=o;i.v1=r,i.v4=o,e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(1).__exportStar)(n(37),t);var r=n(15);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(17);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-lex-runtime-service","description":"AWS SDK for JavaScript Lex Runtime Service Client for Node.js, Browser and React Native","version":"3.6.1","scripts":{"clean":"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./","prepublishOnly":"yarn build","pretest":"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test:unit":"mocha **/cjs/**/*.spec.js","test":"yarn test:unit","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build":"yarn build:cjs && yarn build:es","postbuild":"downlevel-dts types types/ts3.4"},"main":"./dist/cjs/index.js","types":"./types/index.d.ts","module":"./dist/es/index.js","browser":{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},"sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1","tslib":"^2.0.0"},"devDependencies":{"@aws-sdk/client-documentation-generator":"3.6.1","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","typedoc":"^0.19.2","typescript":"~4.1.2"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"types/*":["types/ts3.4/*"]}},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-lex-runtime-service","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-lex-runtime-service"}}')},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(5),o=n(34),i={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},a=function(t){return{applyToStack:function(n){n.add(function(t){return function(n){return function(i){return Object(r.b)(void 0,void 0,void 0,(function(){var a,s,u,c;return Object(r.c)(this,(function(l){return a=i.request,!o.a.isInstance(a)||"node"!==t.runtime||a.headers.hasOwnProperty("X-Amzn-Trace-Id")?[2,n(i)]:(s=e.env.AWS_LAMBDA_FUNCTION_NAME,u=e.env._X_AMZN_TRACE_ID,(c=function(e){return"string"==typeof e&&e.length>0})(s)&&c(u)&&(a.headers["X-Amzn-Trace-Id"]=u),[2,n(Object(r.a)(Object(r.a)({},i),{request:a}))])}))}))}}}(t),i)}}}}).call(this,n(19))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(12).__exportStar)(n(64),t);var r=n(21);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(23);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-lex-runtime-v2","description":"AWS SDK for JavaScript Lex Runtime V2 Client for Node.js, Browser and React Native","version":"3.171.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"tsc -p tsconfig.cjs.json","build:docs":"typedoc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/client-sts":"3.171.0","@aws-sdk/config-resolver":"3.171.0","@aws-sdk/credential-provider-node":"3.171.0","@aws-sdk/eventstream-handler-node":"3.171.0","@aws-sdk/eventstream-serde-browser":"3.171.0","@aws-sdk/eventstream-serde-config-resolver":"3.171.0","@aws-sdk/eventstream-serde-node":"3.171.0","@aws-sdk/fetch-http-handler":"3.171.0","@aws-sdk/hash-node":"3.171.0","@aws-sdk/invalid-dependency":"3.171.0","@aws-sdk/middleware-content-length":"3.171.0","@aws-sdk/middleware-eventstream":"3.171.0","@aws-sdk/middleware-host-header":"3.171.0","@aws-sdk/middleware-logger":"3.171.0","@aws-sdk/middleware-recursion-detection":"3.171.0","@aws-sdk/middleware-retry":"3.171.0","@aws-sdk/middleware-serde":"3.171.0","@aws-sdk/middleware-signing":"3.171.0","@aws-sdk/middleware-stack":"3.171.0","@aws-sdk/middleware-user-agent":"3.171.0","@aws-sdk/node-config-provider":"3.171.0","@aws-sdk/node-http-handler":"3.171.0","@aws-sdk/protocol-http":"3.171.0","@aws-sdk/smithy-client":"3.171.0","@aws-sdk/types":"3.171.0","@aws-sdk/url-parser":"3.171.0","@aws-sdk/util-base64-browser":"3.170.0","@aws-sdk/util-base64-node":"3.170.0","@aws-sdk/util-body-length-browser":"3.170.0","@aws-sdk/util-body-length-node":"3.170.0","@aws-sdk/util-defaults-mode-browser":"3.171.0","@aws-sdk/util-defaults-mode-node":"3.171.0","@aws-sdk/util-user-agent-browser":"3.171.0","@aws-sdk/util-user-agent-node":"3.171.0","@aws-sdk/util-utf8-browser":"3.170.0","@aws-sdk/util-utf8-node":"3.170.0","tslib":"^2.3.1"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.170.0","@tsconfig/recommended":"1.0.1","@types/node":"^12.7.5","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typedoc":"0.19.2","typescript":"~4.6.2"},"overrides":{"typedoc":{"typescript":"~4.6.2"}},"engines":{"node":">=12.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-lex-runtime-v2","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-lex-runtime-v2"}}')},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(5),o=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(r.a)(Object(r.a)({},this),{headers:Object(r.a)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var o,i=t[n];return Object(r.a)(Object(r.a)({},e),((o={})[n]=Array.isArray(i)?Object(r.e)([],Object(r.d)(i),!1):i,o))}),{}))),n},e}();!function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}()},function(e,t,n){var r,o,i=n(13),a=n(14),s=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==d){var p=i();null==f&&(f=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,y=h-s+(v-u)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,u=v,o=d;var m=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;l[c++]=m>>>24&255,l[c++]=m>>>16&255,l[c++]=m>>>8&255,l[c++]=255&m;var g=h/4294967296*1e4&268435455;l[c++]=g>>>8&255,l[c++]=255&g,l[c++]=g>>>24&15|16,l[c++]=g>>>16&255,l[c++]=d>>>8|128,l[c++]=255&d;for(var b=0;b<6;++b)l[c+b]=f[b];return t||a(l)}},function(e,t,n){var r=n(13),o=n(14);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(15),o=n(17),i=n(48),a=n(56),s=n(58),u=n(6),c=function(){function e(e){(0,a.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,u.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(40);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(45);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(46);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(47);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(27),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(10).Buffer)},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},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(l(e,a,a+16383>s?s:a+16383));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]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)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,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){
|
|
69
69
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
70
|
-
t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=h,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+p]=255&a,p+=h,a/=256,c-=8);e[n+p-h]|=128*v}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(50),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(1),o=n(19),i=n(51),a=n(52),s=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(19),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var d=this.temp[f-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=c,c=u,u=s,s=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(53);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(54);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(55);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(56);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(86),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(10).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(1).__exportStar(n(58),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(1),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);r.__exportStar(n(60),t),r.__exportStar(n(61),t),r.__exportStar(n(62),t),r.__exportStar(n(63),t),r.__exportStar(n(64),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,o=t.subtle;return r.map((function(e){return o[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(22),o=n(24),i=n(71),a=n(74),s=n(76),u=n(6),c=function(){function e(e){(0,a.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,u.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(85),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(10).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(13).__exportStar(n(72),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(13),o=n(25),i=n(73),a=n(11),s=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(25),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var d=this.temp[f-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=c,c=u,u=s,s=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(26).__exportStar(n(75),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(26),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(77);r.__exportStar(n(78),t),r.__exportStar(n(79),t),r.__exportStar(n(80),t),r.__exportStar(n(81),t),r.__exportStar(n(82),t)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__await",(function(){return g})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return O})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
70
|
+
t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=h,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+p]=255&a,p+=h,a/=256,c-=8);e[n+p-h]|=128*v}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(49),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(1),o=n(18),i=n(50),a=n(51),s=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(18),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var d=this.temp[f-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=c,c=u,u=s,s=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(52);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(53);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(54);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(55);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(86),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(10).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(1).__exportStar(n(57),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(1),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);r.__exportStar(n(59),t),r.__exportStar(n(60),t),r.__exportStar(n(61),t),r.__exportStar(n(62),t),r.__exportStar(n(63),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,o=t.subtle;return r.map((function(e){return o[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(21),o=n(23),i=n(70),a=n(73),s=n(75),u=n(6),c=function(){function e(e){(0,a.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,u.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(85),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(10).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(12).__exportStar(n(71),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(12),o=n(24),i=n(72),a=n(11),s=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(24),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var d=this.temp[f-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=c,c=u,u=s,s=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25).__exportStar(n(74),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(25),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(76);r.__exportStar(n(77),t),r.__exportStar(n(78),t),r.__exportStar(n(79),t),r.__exportStar(n(80),t),r.__exportStar(n(81),t)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__await",(function(){return g})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return O})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
71
71
|
/*! *****************************************************************************
|
|
72
72
|
Copyright (c) Microsoft Corporation.
|
|
73
73
|
|
|
@@ -82,5 +82,5 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
82
82
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
83
83
|
PERFORMANCE OF THIS SOFTWARE.
|
|
84
84
|
***************************************************************************** */
|
|
85
|
-
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof g?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,o=t.subtle;return r.map((function(e){return o[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=void 0;var r=n(27),o=n(11),i=n(9),a=function(){function e(){this.crc32=new i.Crc32}return e.prototype.update=function(e){(0,o.isEmptyData)(e)||this.crc32.update((0,o.convertToBuffer)(e))},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,(0,o.numToUint8)(this.crc32.digest())]}))}))},e}();t.AwsCrc32=a},function(e,t,n){"use strict";n.r(t),n.d(t,"AbstractInteractionsProvider",(function(){return a})),n.d(t,"AWSLexProvider",(function(){return Dn})),n.d(t,"AWSLexV2Provider",(function(){return eu})),n.d(t,"Interactions",(function(){return qn}));var r=n(4),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=new r.ConsoleLogger("AbstractInteractionsProvider"),a=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=o(o({},this._config),e),i.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"Interactions"},Object.defineProperty(e.prototype,"options",{get:function(){return o({},this._config)},enumerable:!0,configurable:!0}),e}(),s=n(0),u=n(31),c=n(30),l=n(1),f=n(3),d=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,p)},p=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var h=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal,r=this.requestTimeout;if(null==n?void 0:n.aborted){var o=new Error("Request aborted");return o.name="AbortError",Promise.reject(o)}var i=e.path;if(e.query){var a=function(e){var t,n,r=[];try{for(var o=Object(l.__values)(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,s=e[a];if(a=d(a),Array.isArray(s))for(var u=0,c=s.length;u<c;u++)r.push(a+"="+d(s[u]));else{var f=a;(s||"string"==typeof s)&&(f+="="+d(s)),r.push(f)}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query);a&&(i+="?"+a)}var s=e.port,u=e.method,c=e.protocol+"//"+e.hostname+(s?":"+s:"")+i,p={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(p.signal=n);var h,v=new Request(c,p),y=[fetch(v).then((function(e){var t,n,r=e.headers,o={};try{for(var i=Object(l.__values)(r.entries()),a=i.next();!a.done;a=i.next()){var s=a.value;o[s[0]]=s[1]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new f.b({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new f.b({headers:o,statusCode:e.status,body:t})}}))})),(h=r,void 0===h&&(h=0),new Promise((function(e,t){h&&setTimeout((function(){var e=new Error("Request did not complete within "+h+" ms");e.name="TimeoutError",t(e)}),h)})))];return n&&y.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(y)},e}(),v={},y=new Array(64),m=0,g="A".charCodeAt(0),b="Z".charCodeAt(0);m+g<=b;m++){var w=String.fromCharCode(m+g);v[w]=m,y[m]=w}for(m=0,g="a".charCodeAt(0),b="z".charCodeAt(0);m+g<=b;m++){w=String.fromCharCode(m+g);var _=m+26;v[w]=_,y[_]=w}for(m=0;m<10;m++){v[m.toString(10)]=m+52;w=m.toString(10),_=m+52;v[w]=_,y[_]=w}v["+"]=62,y[62]="+",v["/"]=63,y[63]="/";function S(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var n=new ArrayBuffer(t),r=new DataView(n),o=0;o<e.length;o+=4){for(var i=0,a=0,s=o,u=o+3;s<=u;s++)"="!==e[s]?(i|=v[e[s]]<<6*(u-s),a+=6):i>>=6;var c=o/4*3;i>>=a%8;for(var l=Math.floor(a/8),f=0;f<l;f++){var d=8*(l-f-1);r.setUint8(c+f,(i&255<<d)>>d)}}return new Uint8Array(n)}function E(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var O={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},A=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var o;return Object(l.__generator)(this,(function(i){return(null===(o=null==e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=Object(l.__spread)(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}}(e),O)}}},x=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],T=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],j=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],P=[500,502,503,504],C=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||T.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},M=n(29),I=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},R=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return x.includes(e.name)}(e)||C(e)||function(e){var t;return j.includes(e.name)||P.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},k=function(){function e(e,t){var n,r,o,i,a,s,u,c;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:R,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:I,this.retryQuota=null!==(o=null==t?void 0:t.retryQuota)&&void 0!==o?o:(a=i=500,s=i,u=function(e){return"TimeoutError"===e.name?10:5},c=function(e){return u(e)<=s},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(e){if(!c(e))throw new Error("No retry token available");var t=u(e);return s-=t,t},releaseRetryTokens:function(e){s+=null!=e?e:1,s=Math.min(s,a)}}))}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Object(l.__awaiter)(this,void 0,void 0,(function(){var e;return Object(l.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t){return Object(l.__awaiter)(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c;return Object(l.__generator)(this,(function(d){switch(d.label){case 0:return r=0,o=0,[4,this.getMaxAttempts()];case 1:i=d.sent(),a=t.request,f.a.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=Object(M.v4)()),s=function(){var s,c,d,p,h;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,5]),f.a.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+i),[4,e(t)];case 1:return s=l.sent(),c=s.response,d=s.output,u.retryQuota.releaseRetryTokens(n),d.$metadata.attempts=r+1,d.$metadata.totalRetryDelay=o,[2,{value:{response:c,output:d}}];case 2:return p=l.sent(),r++,u.shouldRetry(p,r,i)?(n=u.retryQuota.retrieveRetryTokens(p),h=u.delayDecider(C(p)?500:100,r),o+=h,[4,new Promise((function(e){return setTimeout(e,h)}))]):[3,4];case 3:return l.sent(),[2,"continue"];case 4:throw p.$metadata||(p.$metadata={}),p.$metadata.attempts=r,p.$metadata.totalRetryDelay=o,p;case 5:return[2]}}))},u=this,d.label=2;case 2:return[5,s()];case 3:return"object"==typeof(c=d.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),L=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var U=n(7),D=n.n(U);var N=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),B=new Set(["cn-north-1","cn-northwest-1"]),F=new Set(["us-iso-east-1"]),z=new Set(["us-isob-east-1"]),q=new Set(["us-gov-east-1","us-gov-west-1"]);var H,V,G,$,W={apiVersion:"2016-11-28",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"ap-northeast-1":n={hostname:"runtime.lex.ap-northeast-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"ap-southeast-1":n={hostname:"runtime.lex.ap-southeast-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"ap-southeast-2":n={hostname:"runtime.lex.ap-southeast-2.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-central-1":n={hostname:"runtime.lex.eu-central-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-west-1":n={hostname:"runtime.lex.eu-west-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-west-2":n={hostname:"runtime.lex.eu-west-2.amazonaws.com",partition:"aws",signingService:"lex"};break;case"us-east-1":n={hostname:"runtime.lex.us-east-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"us-west-2":n={hostname:"runtime.lex.us-west-2.amazonaws.com",partition:"aws",signingService:"lex"};break;default:N.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws",signingService:"lex"}),B.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),F.has(e)&&(n={hostname:"runtime.lex.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),z.has(e)&&(n={hostname:"runtime.lex.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),q.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws",signingService:"lex"})}return Promise.resolve(Object(s.a)({signingService:"lex"},n))},serviceId:"Lex Runtime Service",urlParser:function(e){var t,n=new URL(e),r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,s=n.search;return s&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=Object(l.__values)(e.split("&")),i=o.next();!i.done;i=o.next()){var a=i.value,s=Object(l.__read)(a.split("="),2),u=s[0],c=s[1],f=void 0===c?null:c;u=decodeURIComponent(u),f&&(f=decodeURIComponent(f)),u in r?Array.isArray(r[u])?r[u].push(f):r[u]=[r[u],f]:r[u]=f}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(s)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}}},K=Object(s.a)(Object(s.a)({},W),{runtime:"browser",base64Decoder:S,base64Encoder:function(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var s=Math.ceil(o/6);r<<=6*s-o;for(var u=1;u<=s;u++){var c=6*(s-u);t+=y[(r&63<<c)>>c]}t+="==".slice(0,4-s)}return t},bodyLengthChecker:function(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0},credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(V={serviceId:W.serviceId,clientVersion:u.version},G=V.serviceId,$=V.clientVersion,function(){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,u;return Object(l.__generator)(this,(function(c){return e=(null===(n=null===window||void 0===window?void 0:window.navigator)||void 0===n?void 0:n.userAgent)?D.a.parse(window.navigator.userAgent):void 0,t=[["aws-sdk-js",$],["os/"+((null===(r=null==e?void 0:e.os)||void 0===r?void 0:r.name)||"other"),null===(o=null==e?void 0:e.os)||void 0===o?void 0:o.version],["lang/js"],["md/browser",(null!==(a=null===(i=null==e?void 0:e.browser)||void 0===i?void 0:i.name)&&void 0!==a?a:"unknown")+"_"+(null!==(u=null===(s=null==e?void 0:e.browser)||void 0===s?void 0:s.version)&&void 0!==u?u:"unknown")]],G&&t.push(["api/"+G,$]),[2,t]}))}))}),maxAttempts:3,region:(H="Region is missing",function(){return Promise.reject(H)}),requestHandler:new h,sha256:c.Sha256,streamCollector:function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(l.__generator)(this,(function(r){switch(r.label){case 0:return[4,E(e)];case 1:return t=r.sent(),n=S(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n,r,o,i,a,s;return Object(l.__generator)(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,u.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=u.sent(),i=o.done,(a=o.value)&&(s=t,(t=new Uint8Array(s.length+a.length)).set(s),t.set(a,s.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},utf8Encoder:function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}}),Y=function(e){var t=e.endpoint,n=e.urlParser;if("string"==typeof t){var r=Promise.resolve(n(t));return function(){return r}}if("object"==typeof t){var o=Promise.resolve(t);return function(){return o}}return t},Z=function(e){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var t,n,r,o,i;return Object(l.__generator)(this,(function(a){switch(a.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=a.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(r)];case 2:if(!(o=(null!==(i=a.sent())&&void 0!==i?i:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},X=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var J={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Q=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return Object(l.__awaiter)(t,void 0,void 0,(function(){var t,o,i,a,s;return Object(l.__generator)(this,(function(u){return t=r.request,f.a.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(a=e(o))&&(t.headers=Object(l.__assign)(Object(l.__assign)({},t.headers),((s={})["content-length"]=String(a),s)))),[2,n(Object(l.__assign)(Object(l.__assign)({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),J)}}};for(var ee={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},te=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var r,o;return Object(l.__generator)(this,(function(i){return f.a.isInstance(n.request)?(r=n.request,o=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===o?"":o).indexOf("h2")>=0&&!r.headers[":authority"]?(delete r.headers.host,r.headers[":authority"]=""):r.headers.host||(r.headers.host=r.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),ee)}}},ne={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},re=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var r,o,i,a,s,u,c,f,d;return Object(l.__generator)(this,(function(p){switch(p.label){case 0:return r=t.clientName,o=t.commandName,i=t.inputFilterSensitiveLog,a=t.logger,s=t.outputFilterSensitiveLog,[4,e(n)];case 1:return u=p.sent(),a?("function"==typeof a.info&&(c=u.output,f=c.$metadata,d=Object(l.__rest)(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:s(d),metadata:f})),[2,u]):[2,u]}}))}))}}),ne)}}},oe={},ie={},ae=0;ae<256;ae++){var se=ae.toString(16).toLowerCase();1===se.length&&(se="0"+se),oe[ae]=se,ie[se]=ae}function ue(e){for(var t="",n=0;n<e.byteLength;n++)t+=oe[e[n]];return t}var ce="X-Amz-Date".toLowerCase(),le=["authorization",ce,"date"],fe="X-Amz-Signature".toLowerCase(),de="X-Amz-Security-Token".toLowerCase(),pe={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},he=/^proxy-/,ve=/^sec-/,ye="AWS4-HMAC-SHA256-PAYLOAD",me={},ge=[];function be(e,t,n){return e+"/"+t+"/"+n+"/aws4_request"}function we(e,t,n){var r=new e(t);return r.update(n),r.digest()}function _e(e,t,n){var r,o,i=e.headers,a={};try{for(var s=Object(l.__values)(Object.keys(i).sort()),u=s.next();!u.done;u=s.next()){var c=u.value,f=c.toLowerCase();(f in pe||(null==t?void 0:t.has(f))||he.test(f)||ve.test(f))&&(!n||n&&!n.has(f))||(a[f]=i[c].trim().replace(/\s+/g," "))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return a}var Se=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Ee)},Ee=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function Oe(e,t){var n=e.headers,r=e.body;return Object(l.__awaiter)(this,void 0,void 0,(function(){var e,o,i,a,s,u,c;return Object(l.__generator)(this,(function(f){switch(f.label){case 0:try{for(e=Object(l.__values)(Object.keys(n)),o=e.next();!o.done;o=e.next())if("x-amz-content-sha256"===(i=o.value).toLowerCase())return[2,n[i]]}catch(e){u={error:e}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(d=r,"function"==typeof ArrayBuffer&&d instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(d))?((a=new t).update(r),s=ue,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var d}))}))}function Ae(e){var t=e.headers,n=e.query,r=Object(l.__rest)(e,["headers","query"]);return Object(l.__assign)(Object(l.__assign)({},r),{headers:Object(l.__assign)({},t),query:n?xe(n):void 0})}function xe(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return Object(l.__assign)(Object(l.__assign)({},t),((r={})[n]=Array.isArray(o)?Object(l.__spread)(o):o,r))}),{})}function Te(e){var t,n;e="function"==typeof e.clone?e.clone():Ae(e);try{for(var r=Object(l.__values)(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;le.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function je(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var Pe=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=Ie(r),this.credentialProvider=Re(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(l.__awaiter)(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,d,p,h,v,y,m,g,b,w,_,S,E,O,A,x;return Object(l.__generator)(this,(function(T){switch(T.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,c=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return d=T.sent(),null==c?[3,2]:(h=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:h=T.sent(),T.label=4;case 4:return p=h,v=Ce(r),y=v.longDate,m=v.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(g=be(m,p,null!=f?f:this.service),b=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"==typeof e.clone?e.clone():Ae(e),a=i.headers,s=i.query,u=void 0===s?{}:s;try{for(var c=Object(l.__values)(Object.keys(a)),f=c.next();!f.done;f=c.next()){var d=f.value,p=d.toLowerCase();"x-amz-"!==p.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(p))||(u[d]=a[d],delete a[d])}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Object(l.__assign)(Object(l.__assign)({},e),{headers:a,query:u})}(Te(e),{unhoistableHeaders:s}),d.sessionToken&&(b.query["X-Amz-Security-Token"]=d.sessionToken),b.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",b.query["X-Amz-Credential"]=d.accessKeyId+"/"+g,b.query["X-Amz-Date"]=y,b.query["X-Amz-Expires"]=i.toString(10),w=_e(b,a,u),b.query["X-Amz-SignedHeaders"]=Me(w),_=b.query,S="X-Amz-Signature",E=this.getSignature,O=[y,g,this.getSigningKey(d,p,m,f)],A=this.createCanonicalRequest,x=[b,w],[4,Oe(e,this.sha256)]);case 5:return[4,E.apply(this,O.concat([A.apply(this,x.concat([T.sent()]))]))];case 6:return _[S]=T.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return Object(l.__awaiter)(this,void 0,void 0,(function(){return Object(l.__generator)(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,r=e.payload,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return Object(l.__awaiter)(this,void 0,void 0,(function(){var e,t,o,c,f,d,p,h,v,y,m;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=l.sent(),l.label=3;case 3:return e=t,o=Ce(i),c=o.shortDate,f=o.longDate,d=be(c,e,null!=u?u:this.service),[4,Oe({headers:{},body:r},this.sha256)];case 4:return p=l.sent(),(h=new this.sha256).update(n),y=ue,[4,h.digest()];case 5:return v=y.apply(void 0,[l.sent()]),m=[ye,f,d,a,v,p].join("\n"),[2,this.signString(m,{signingDate:i,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n,r,s,u,c,f,d;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return[4,this.credentialProvider()];case 1:return t=l.sent(),null==i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=l.sent(),l.label=4;case 4:return n=r,s=Ce(o).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,n,s,a)];case 5:return(u=new(f.apply(c,[void 0,l.sent()]))).update(e),d=ue,[4,u.digest()];case 6:return[2,d.apply(void 0,[l.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,s=n.signingRegion,u=n.signingService;return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n,r,c,f,d,p,h,v,y,m;return Object(l.__generator)(this,(function(g){switch(g.label){case 0:return[4,this.credentialProvider()];case 1:return t=g.sent(),null==s?[3,2]:(r=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=g.sent(),g.label=4;case 4:return n=r,c=Te(e),f=Ce(o),d=f.longDate,p=f.shortDate,h=be(p,n,null!=u?u:this.service),c.headers[ce]=d,t.sessionToken&&(c.headers[de]=t.sessionToken),[4,Oe(c,this.sha256)];case 5:return v=g.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=Object(l.__values)(Object.keys(t)),i=o.next();!i.done;i=o.next()){if(e===i.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=v),y=_e(c,a,i),[4,this.getSignature(d,h,this.getSigningKey(t,n,p,u),this.createCanonicalRequest(c,y,v))];case 6:return m=g.sent(),c.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+h+", SignedHeaders="+Me(y)+", Signature="+m,[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var r=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,n,r=e.query,o=void 0===r?{}:r,i=[],a={},s=function(e){if(e.toLowerCase()===fe)return"continue";i.push(e);var t=o[e];"string"==typeof t?a[e]=Se(e)+"="+Se(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([Se(e)+"="+Se(n)])}),[]).join("&"))};try{for(var u=Object(l.__values)(Object.keys(o).sort()),c=u.next();!c.done;c=u.next()){s(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return i.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+r.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+r.join(";")+"\n"+n},e.prototype.createStringToSign=function(e,t,n){return Object(l.__awaiter)(this,void 0,void 0,(function(){var r,o;return Object(l.__generator)(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+ue(o)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,n,r){return Object(l.__awaiter)(this,void 0,void 0,(function(){var o,i,a,s,u;return Object(l.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),s=(a=this.sha256).bind,[4,n];case 2:return(i=new(s.apply(a,[void 0,c.sent()]))).update(o),u=ue,[4,i.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var i,a,s,u,c,f,d,p,h;return Object(l.__generator)(this,(function(v){switch(v.label){case 0:return[4,we(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=v.sent(),(a=n+":"+r+":"+o+":"+ue(i)+":"+t.sessionToken)in me)return[2,me[a]];for(ge.push(a);ge.length>50;)delete me[ge.shift()];s="AWS4"+t.secretAccessKey,v.label=2;case 2:v.trys.push([2,7,8,9]),u=Object(l.__values)([n,r,o,"aws4_request"]),c=u.next(),v.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,we(e,s,f)]);case 4:s=v.sent(),v.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return d=v.sent(),p={error:d},[3,9];case 8:try{c&&!c.done&&(h=u.return)&&h.call(u)}finally{if(p)throw p.error}return[7];case 9:return[2,me[a]=s]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Ce=function(e){var t=je(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},Me=function(e){return Object.keys(e).sort().join(";")},Ie=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Re=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function ke(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var Le=function(e){return new Date(Date.now()+e)};function Ue(e){return function(t,n){return function(r){return Object(l.__awaiter)(this,void 0,void 0,(function(){var o,i,a,s,u,c,d,p,h;return Object(l.__generator)(this,(function(v){switch(v.label){case 0:return f.a.isInstance(r.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return i=v.sent(),[3,3];case 2:i=e.signer,v.label=3;case 3:return o=i,s=t,u=[Object(l.__assign)({},r)],h={},[4,o.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,s.apply(void 0,[l.__assign.apply(void 0,u.concat([(h.request=v.sent(),h)]))])];case 5:return a=v.sent(),c=a.response.headers,(d=c&&(c.date||c.Date))&&(p=Date.parse(d),y=p,m=e.systemClockOffset,Math.abs(Le(m).getTime()-y)>=3e5&&(e.systemClockOffset=p-Date.now())),[2,a]}var y,m}))}))}}}var De={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var Ne,Be,Fe,ze,qe,He,Ve,Ge,$e,We,Ke,Ye,Ze,Xe,Je,Qe,et,tt,nt,rt,ot,it,at,st,ut,ct,lt,ft,dt,pt,ht,vt,yt,mt,gt,bt,wt,_t=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,St=function(e){var t=Object(l.__read)(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(_t,"_")})).join("/")},Et={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Ot=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var o,i,a,s,u,c,d,p;return Object(l.__generator)(this,(function(h){switch(h.label){case 0:return o=r.request,f.a.isInstance(o)?(i=o.headers,a=(null===(d=null==t?void 0:t.userAgent)||void 0===d?void 0:d.map(St))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return s=h.sent().map(St),u=(null===(p=null==n?void 0:n.customUserAgent)||void 0===p?void 0:p.map(St))||[],i["x-amz-user-agent"]=Object(l.__spread)(s,a,u).join(" "),c=Object(l.__spread)(s.filter((function(e){return e.startsWith("aws-sdk-")})),u).join(" "),"browser"!==n.runtime&&c&&(i["user-agent"]=i["user-agent"]?i["user-agent"]+" "+c:c),[2,e(Object(l.__assign)(Object(l.__assign)({},r),{request:o}))]}}))}))}}),Et)}}},At=n(2),xt=function(e){function t(t){var n,r,o,i=this,a=function(e){var t,n=this,r=ke(e.credentials||e.credentialDefaultProvider(e)),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,s=void 0===a?e.systemClockOffset||0:a,u=e.sha256;return t=e.signer?ke(e.signer):function(){return ke(e.region)().then((function(t){return Object(l.__awaiter)(n,void 0,void 0,(function(){return Object(l.__generator)(this,(function(n){switch(n.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[n.sent()||{},t]]}}))}))})).then((function(t){var n=Object(l.__read)(t,2),o=n[0],a=n[1],s=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||s||a,e.signingName=e.signingName||c||e.serviceId,new Pe({credentials:r,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:i})}))},Object(l.__assign)(Object(l.__assign)({},e),{systemClockOffset:s,signingEscapePath:i,credentials:r,signer:t})}(function(e){var t;return Object(l.__assign)(Object(l.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Y(e):function(){return Z(e)},isCustomEndpoint:!!e.endpoint})}(function(e){if(!e.region)throw new Error("Region is missing");return Object(l.__assign)(Object(l.__assign)({},e),{region:X(e.region)})}(Object(s.a)(Object(s.a)({},K),t)))),u=function(e){return Object(l.__assign)(Object(l.__assign)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}((r=L((n=a).maxAttempts),Object(l.__assign)(Object(l.__assign)({},n),{maxAttempts:r,retryStrategy:n.retryStrategy||new k(r)})));return(i=e.call(this,u)||this).config=u,i.middlewareStack.use((o=i.config,{applyToStack:function(e){e.addRelativeTo(Ue(o),De)}})),i.middlewareStack.use(A(i.config)),i.middlewareStack.use(Q(i.config)),i.middlewareStack.use(te(i.config)),i.middlewareStack.use(re(i.config)),i.middlewareStack.use(Ot(i.config)),i}return Object(s.c)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(At.a);(Ne||(Ne={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(Be||(Be={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)({},e),e.parameters&&{parameters:At.d})},(Fe||(Fe={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(ze||(ze={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(qe||(qe={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(He||(He={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(Ve||(Ve={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(Ge||(Ge={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},($e||($e={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(We||(We={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},function(e){e.FAILED="Failed",e.FULFILLED="Fulfilled",e.READY_FOR_FULFILLMENT="ReadyForFulfillment"}(Ke||(Ke={})),function(e){e.COMPOSITE="Composite",e.CUSTOM_PAYLOAD="CustomPayload",e.PLAIN_TEXT="PlainText",e.SSML="SSML"}(Ye||(Ye={})),function(e){e.CLOSE="Close",e.CONFIRM_INTENT="ConfirmIntent",e.DELEGATE="Delegate",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot"}(Ze||(Ze={})),(Xe||(Xe={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)({},e),e.slots&&{slots:At.d}),e.message&&{message:At.d})},function(e){e.CONFIRMED="Confirmed",e.DENIED="Denied",e.NONE="None"}(Je||(Je={})),(Qe||(Qe={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)({},e),e.slots&&{slots:At.d})},(et||(et={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.recentIntentSummaryView&&{recentIntentSummaryView:e.recentIntentSummaryView.map((function(e){return Qe.filterSensitiveLog(e)}))}),e.sessionAttributes&&{sessionAttributes:At.d}),e.dialogAction&&{dialogAction:Xe.filterSensitiveLog(e.dialogAction)}),e.activeContexts&&{activeContexts:At.d})},(tt||(tt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(nt||(nt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(rt||(rt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(ot||(ot={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(it||(it={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.sessionAttributes&&{sessionAttributes:At.d}),e.requestAttributes&&{requestAttributes:At.d}),e.activeContexts&&{activeContexts:At.d})},function(e){e.CONFIRM_INTENT="ConfirmIntent",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot",e.FAILED="Failed",e.FULFILLED="Fulfilled",e.READY_FOR_FULFILLMENT="ReadyForFulfillment"}(at||(at={})),(st||(st={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)({},e),e.message&&{message:At.d}),e.activeContexts&&{activeContexts:At.d})},(ut||(ut={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(ct||(ct={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(lt||(lt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.sessionAttributes&&{sessionAttributes:At.d}),e.requestAttributes&&{requestAttributes:At.d}),e.inputText&&{inputText:At.d}),e.activeContexts&&{activeContexts:At.d})},(ft||(ft={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(dt||(dt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)({},e),e.slots&&{slots:At.d})},function(e){e.GENERIC="application/vnd.amazonaws.card.generic"}(pt||(pt={})),(ht||(ht={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(vt||(vt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(yt||(yt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(mt||(mt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(gt||(gt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.alternativeIntents&&{alternativeIntents:e.alternativeIntents.map((function(e){return dt.filterSensitiveLog(e)}))}),e.slots&&{slots:At.d}),e.sessionAttributes&&{sessionAttributes:At.d}),e.message&&{message:At.d}),e.activeContexts&&{activeContexts:At.d})},(bt||(bt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.sessionAttributes&&{sessionAttributes:At.d}),e.dialogAction&&{dialogAction:Xe.filterSensitiveLog(e.dialogAction)}),e.recentIntentSummaryView&&{recentIntentSummaryView:e.recentIntentSummaryView.map((function(e){return Qe.filterSensitiveLog(e)}))}),e.activeContexts&&{activeContexts:At.d})},(wt||(wt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)({},e),e.message&&{message:At.d}),e.activeContexts&&{activeContexts:At.d})};var Tt=n(8),jt={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Pt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ct(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var o,i;return Object(l.__generator)(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:return o=a.sent().response,[4,t(o,e)];case 2:return i=a.sent(),[2,{response:o,output:i}]}}))}))}}}(e,n),jt),r.add(function(e,t){return function(n,r){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var o;return Object(l.__generator)(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(Object(l.__assign)(Object(l.__assign)({},r),{request:o}))]}}))}))}}}(e,t),Pt)}}}var Mt=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Object(s.c)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(Ct(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeServiceClient",commandName:"PostTextCommand",inputFilterSensitiveLog:lt.filterSensitiveLog,outputFilterSensitiveLog:gt.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return Object(Tt.d)(e,t)},t.prototype.deserialize=function(e,t){return Object(Tt.b)(e,t)},t}(At.b),It=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Object(s.c)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(Ct(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeServiceClient",commandName:"PostContentCommand",inputFilterSensitiveLog:it.filterSensitiveLog,outputFilterSensitiveLog:st.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return Object(Tt.c)(e,t)},t.prototype.deserialize=function(e,t){return Object(Tt.a)(e,t)},t}(At.b),Rt={},kt=Uint8Array,Lt=Uint16Array,Ut=Uint32Array,Dt=new kt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Nt=new kt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Bt=new kt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ft=function(e,t){for(var n=new Lt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var o=new Ut(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)o[i]=i-n[r]<<5|r;return[n,o]},zt=Ft(Dt,2),qt=zt[0],Ht=zt[1];qt[28]=258,Ht[258]=28;for(var Vt=Ft(Nt,0),Gt=Vt[0],$t=(Vt[1],new Lt(32768)),Wt=0;Wt<32768;++Wt){var Kt=(43690&Wt)>>>1|(21845&Wt)<<1;Kt=(61680&(Kt=(52428&Kt)>>>2|(13107&Kt)<<2))>>>4|(3855&Kt)<<4,$t[Wt]=((65280&Kt)>>>8|(255&Kt)<<8)>>>1}var Yt=function(e,t,n){for(var r=e.length,o=0,i=new Lt(t);o<r;++o)e[o]&&++i[e[o]-1];var a,s=new Lt(t);for(o=0;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;if(n){a=new Lt(1<<t);var u=15-t;for(o=0;o<r;++o)if(e[o])for(var c=o<<4|e[o],l=t-e[o],f=s[e[o]-1]++<<l,d=f|(1<<l)-1;f<=d;++f)a[$t[f]>>>u]=c}else for(a=new Lt(r),o=0;o<r;++o)e[o]&&(a[o]=$t[s[e[o]-1]++]>>>15-e[o]);return a},Zt=new kt(288);for(Wt=0;Wt<144;++Wt)Zt[Wt]=8;for(Wt=144;Wt<256;++Wt)Zt[Wt]=9;for(Wt=256;Wt<280;++Wt)Zt[Wt]=7;for(Wt=280;Wt<288;++Wt)Zt[Wt]=8;var Xt=new kt(32);for(Wt=0;Wt<32;++Wt)Xt[Wt]=5;var Jt=Yt(Zt,9,1),Qt=Yt(Xt,5,1),en=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},tn=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},nn=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},rn=function(e){return(e+7)/8|0},on=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?Lt:4==e.BYTES_PER_ELEMENT?Ut:kt)(n-t);return r.set(e.subarray(t,n)),r},an=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],sn=function(e,t,n){var r=new Error(t||an[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,sn),!n)throw r;return r},un=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new kt(0);var o=!t||n,i=!n||n.i;n||(n={}),t||(t=new kt(3*r));var a=function(e){var n=t.length;if(e>n){var r=new kt(Math.max(2*n,e));r.set(t),t=r}},s=n.f||0,u=n.p||0,c=n.b||0,l=n.l,f=n.d,d=n.m,p=n.n,h=8*r;do{if(!l){s=tn(e,u,1);var v=tn(e,u+1,3);if(u+=3,!v){var y=e[(T=rn(u)+4)-4]|e[T-3]<<8,m=T+y;if(m>r){i&&sn(0);break}o&&a(c+y),t.set(e.subarray(T,m),c),n.b=c+=y,n.p=u=8*m,n.f=s;continue}if(1==v)l=Jt,f=Qt,d=9,p=5;else if(2==v){var g=tn(e,u,31)+257,b=tn(e,u+10,15)+4,w=g+tn(e,u+5,31)+1;u+=14;for(var _=new kt(w),S=new kt(19),E=0;E<b;++E)S[Bt[E]]=tn(e,u+3*E,7);u+=3*b;var O=en(S),A=(1<<O)-1,x=Yt(S,O,1);for(E=0;E<w;){var T,j=x[tn(e,u,A)];if(u+=15&j,(T=j>>>4)<16)_[E++]=T;else{var P=0,C=0;for(16==T?(C=3+tn(e,u,3),u+=2,P=_[E-1]):17==T?(C=3+tn(e,u,7),u+=3):18==T&&(C=11+tn(e,u,127),u+=7);C--;)_[E++]=P}}var M=_.subarray(0,g),I=_.subarray(g);d=en(M),p=en(I),l=Yt(M,d,1),f=Yt(I,p,1)}else sn(1);if(u>h){i&&sn(0);break}}o&&a(c+131072);for(var R=(1<<d)-1,k=(1<<p)-1,L=u;;L=u){var U=(P=l[nn(e,u)&R])>>>4;if((u+=15&P)>h){i&&sn(0);break}if(P||sn(2),U<256)t[c++]=U;else{if(256==U){L=u,l=null;break}var D=U-254;if(U>264){var N=Dt[E=U-257];D=tn(e,u,(1<<N)-1)+qt[E],u+=N}var B=f[nn(e,u)&k],F=B>>>4;B||sn(3),u+=15&B;I=Gt[F];if(F>3){N=Nt[F];I+=nn(e,u)&(1<<N)-1,u+=N}if(u>h){i&&sn(0);break}o&&a(c+131072);for(var z=c+D;c<z;c+=4)t[c]=t[c-I],t[c+1]=t[c+1-I],t[c+2]=t[c+2-I],t[c+3]=t[c+3-I];c=z}}n.l=l,n.p=L,n.b=c,n.f=s,l&&(s=1,n.m=d,n.d=f,n.n=p)}while(!s);return c==t.length?t:on(t,0,c)},cn=new kt(0),ln=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},fn=function(e,t,n){for(var r=e(),o=e.toString(),i=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<r.length;++a){var s=r[a],u=i[a];if("function"==typeof s){t+=";"+u+"=";var c=s.toString();if(s.prototype)if(-1!=c.indexOf("[native code]")){var l=c.indexOf(" ",8)+1;t+=c.slice(l,c.indexOf("(",l))}else for(var f in t+=c,s.prototype)t+=";"+u+".prototype."+f+"="+s.prototype[f].toString();else t+=c}else n[u]=s}return[t,n]},dn=[],pn=function(e,t,n,r){var o;if(!dn[n]){for(var i="",a={},s=e.length-1,u=0;u<s;++u)i=(o=fn(e[u],i,a))[0],a=o[1];dn[n]=fn(e[s],i,a)}var c=ln({},dn[n][1]);return function(e,t,n,r,o){var i=new Worker(Rt[t]||(Rt[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return i.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],o(r,null)}else o(null,t)},i.postMessage(n,r),i}(dn[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,c,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(c),r)},hn=function(){return[kt,Lt,Ut,Dt,Nt,Bt,qt,Gt,Jt,Qt,$t,an,Yt,en,tn,nn,rn,on,sn,un,_n,yn,mn]},vn=function(){return[bn,wn]},yn=function(e){return postMessage(e,[e.buffer])},mn=function(e){return e&&e.size&&new kt(e.size)},gn=function(e,t,n,r,o,i){var a=pn(n,r,o,(function(e,t){a.terminate(),i(e,t)}));return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},bn=function(e){31==e[0]&&139==e[1]&&8==e[2]||sn(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},wn=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0};function _n(e,t){return un(e,t)}function Sn(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&sn(7),gn(e,t,[hn,vn,function(){return[En]}],(function(e){return yn(En(e.data[0]))}),3,n)}function En(e,t){return un(e.subarray(bn(e),-8),t||new kt(wn(e)))}var On="undefined"!=typeof TextDecoder&&new TextDecoder;try{On.decode(cn,{stream:!0}),1}catch(e){}var An=function(e){for(var t="",n=0;;){var r=e[n++],o=(r>127)+(r>223)+(r>239);if(n+o>e.length)return[t,on(e,n-1)];o?3==o?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&o?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}};function xn(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(On)return On.decode(e);var o=An(e),i=o[0];return o[1].length&&sn(8),i}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;var Tn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},jn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Pn=function(e){return Tn(void 0,void 0,void 0,(function(){return jn(this,(function(t){return e instanceof Blob||e instanceof ReadableStream?[2,new Response(e).arrayBuffer().then((function(e){return new Uint8Array(e)}))]:[2,Promise.reject("Invalid content type")]}))}))};function Cn(e){return(Cn="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 Mn,In=(Mn=function(e,t){return(Mn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Mn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Rn=function(){return(Rn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},kn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ln=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Un=new r.ConsoleLogger("AWSLexProvider"),Dn=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._botsCompleteCallback={},n}return In(t,e),t.prototype.getProviderName=function(){return"AWSLexProvider"},t.prototype.configure=function(t){void 0===t&&(t={});var n=["name","alias","region"];return Object.keys(t).forEach((function(e){var r=t[e];if(!n.every((function(e){return e in r})))throw new Error("invalid bot configuration")})),e.prototype.configure.call(this,t)},t.prototype.reportBotStatus=function(e,t){var n=this;Un.debug("postContent state",e.dialogState),"ReadyForFulfillment"!==e.dialogState&&"Fulfilled"!==e.dialogState||("function"==typeof this._botsCompleteCallback[t]&&setTimeout((function(){return n._botsCompleteCallback[t](null,e)}),0),this._config&&"function"==typeof this._config[t].onComplete&&setTimeout((function(){return n._config[t].onComplete(null,e)}),0)),"Failed"===e.dialogState&&("function"==typeof this._botsCompleteCallback[t]&&setTimeout((function(){return n._botsCompleteCallback[t]("Bot conversation failed")}),0),this._config&&"function"==typeof this._config[t].onComplete&&setTimeout((function(){return n._config[t].onComplete("Bot conversation failed")}),0))},t.prototype.sendMessage=function(e,t){return kn(this,void 0,void 0,(function(){var n,o,i,a,s,u,c,l,f,d,p,h,v;return Ln(this,(function(y){switch(y.label){case 0:if(!this._config[e])return[2,Promise.reject("Bot "+e+" does not exist")];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,r.Credentials.get()];case 2:return n=y.sent(),[3,4];case 3:return y.sent(),[2,Promise.reject("No credentials")];case 4:if(this.lexRuntimeServiceClient=new xt({region:this._config[e].region,credentials:n,customUserAgent:Object(r.getAmplifyUserAgent)()}),"string"!=typeof t)return[3,9];o={botAlias:this._config[e].alias,botName:e,inputText:t,userId:n.identityId},Un.debug("postText to lex",t),y.label=5;case 5:return y.trys.push([5,7,,8]),i=new Mt(o),[4,this.lexRuntimeServiceClient.send(i)];case 6:return f=y.sent(),this.reportBotStatus(f,e),[2,f];case 7:return a=y.sent(),[2,Promise.reject(a)];case 8:return[3,21];case 9:return s=t.content,"voice"!==t.options.messageType?[3,13]:"object"!==Cn(s)?[2,Promise.reject("invalid content type")]:s instanceof Uint8Array?(c=s,[3,12]):[3,10];case 10:return[4,Pn(s)];case 11:c=y.sent(),y.label=12;case 12:return u=c,o={botAlias:this._config[e].alias,botName:e,contentType:"audio/x-l16; sample-rate=16000; channel-count=1",userId:n.identityId,accept:"audio/mpeg",inputStream:u},[3,14];case 13:if("string"!=typeof s)return[2,Promise.reject("invalid content type")];o={botAlias:this._config[e].alias,botName:e,contentType:"text/plain; charset=utf-8",inputStream:s,userId:n.identityId,accept:"audio/mpeg"},y.label=14;case 14:Un.debug("postContent to lex",t),y.label=15;case 15:return y.trys.push([15,20,,21]),l=new It(o),[4,this.lexRuntimeServiceClient.send(l)];case 16:return(f=y.sent()).audioStream?[4,Pn(f.audioStream)]:[3,18];case 17:return p=y.sent(),[3,19];case 18:p=void 0,y.label=19;case 19:return d=p,h=Rn(Rn({},f),{audioStream:d}),this.reportBotStatus(h,e),[2,h];case 20:return v=y.sent(),[2,Promise.reject(v)];case 21:return[2]}}))}))},t.prototype.onComplete=function(e,t){if(!this._config[e])throw new Error("Bot "+e+" does not exist");this._botsCompleteCallback[e]=t},t}(a),Nn=function(){return(Nn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Bn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Fn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},zn=new r.ConsoleLogger("Interactions"),qn=new(function(){function e(e){void 0===e&&(e={}),this._options=e,zn.debug("Interactions Options",this._options),this._pluggables={}}return e.prototype.getModuleName=function(){return"Interactions"},e.prototype.configure=function(e){var t=this,n=e?e.Interactions||e:{};zn.debug("configure Interactions",{opt:n}),this._options=Nn(Nn({bots:{}},n),n.Interactions);var r=this._options.aws_bots_config,o=this._options.bots;return!Object.keys(o).length&&r&&Array.isArray(r)&&r.forEach((function(e){t._options.bots[e.name]=e})),Object.keys(o).forEach((function(e){var n,r=o[e],i=r.providerName||"AWSLexProvider";t._pluggables.AWSLexProvider||"AWSLexProvider"!==i||(t._pluggables.AWSLexProvider=new Dn),t._pluggables[i]?t._pluggables[i].configure(((n={})[r.name]=r,n)):zn.debug("bot "+r.name+" was not configured as "+i+" provider was not found")})),this._options},e.prototype.addPluggable=function(e){var t=this;if(e&&"Interactions"===e.getCategory()){if(this._pluggables[e.getProviderName()])throw new Error("Pluggable "+e.getProviderName()+" already plugged");return Object.keys(this._options.bots).filter((function(n){return t._options.bots[n].providerName===e.getProviderName()})).forEach((function(n){var r,o=t._options.bots[n];e.configure(((r={})[o.name]=o,r))})),void(this._pluggables[e.getProviderName()]=e)}},e.prototype.send=function(e,t){return Bn(this,void 0,void 0,(function(){var n;return Fn(this,(function(r){switch(r.label){case 0:return this._options.bots&&this._options.bots[e]?(n=this._options.bots[e].providerName||"AWSLexProvider",this._pluggables[n]?[4,this._pluggables[n].sendMessage(e,t)]:[2,Promise.reject("Bot "+n+" does not have valid pluggin did you try addPluggable first?")]):[2,Promise.reject("Bot "+e+" does not exist")];case 1:return[2,r.sent()]}}))}))},e.prototype.onComplete=function(e,t){if(!this._options.bots||!this._options.bots[e])throw new Error("Bot "+e+" does not exist");var n=this._options.bots[e].providerName||"AWSLexProvider";if(!this._pluggables[n])throw new Error("Bot "+n+" does not have valid pluggin did you try addPluggable first?");this._pluggables[n].onComplete(e,t)},e}());r.Amplify.register(qn);var Hn=function(e,t){return(Hn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Vn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Hn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Gn=function(){return(Gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function $n(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Wn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Kn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function Yn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Zn(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Xn(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function Jn(e){return this instanceof Jn?(this.v=e,this):new Jn(e)}function Qn(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof Jn?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function er(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Yn(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}var tr;Object.create;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(tr||(tr={}));var nr=function(e){if("function"==typeof e)return e;var t=Promise.resolve(e);return function(){return t}},rr=function(e){var t,n=nr(e.useDualstackEndpoint),r=e.endpoint,o=e.useFipsEndpoint,i=e.urlParser;return Gn(Gn({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:r?nr("string"==typeof r?i(r):r):function(){return function(e){return Wn(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,s;return Kn(this,(function(u){switch(u.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=u.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");return[4,e.useDualstackEndpoint()];case 2:return o=u.sent(),[4,e.useFipsEndpoint()];case 3:return i=u.sent(),[4,e.regionInfoProvider(r,{useDualstackEndpoint:o,useFipsEndpoint:i})];case 4:if(!(a=(null!==(s=u.sent())&&void 0!==s?s:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser("".concat(n?"https:":"http:","//").concat(a))]}}))}))}(Gn(Gn({},e),{useDualstackEndpoint:n,useFipsEndpoint:o}))},isCustomEndpoint:!!r,useDualstackEndpoint:n})},or=function(e){return"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},ir=function(e){return or(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e},ar=function(e,t){var n;void 0===e&&(e=[]);var r=t.useFipsEndpoint,o=t.useDualstackEndpoint;return null===(n=e.find((function(e){var t=e.tags;return r===t.includes("fips")&&o===t.includes("dualstack")})))||void 0===n?void 0:n.hostname},sr=function(e,t){var n,r,o,i,a,s,u=t.useFipsEndpoint,c=void 0!==u&&u,l=t.useDualstackEndpoint,f=void 0!==l&&l,d=t.signingService,p=t.regionHash,h=t.partitionHash,v=function(e,t){var n,r=t.partitionHash;return null!==(n=Object.keys(r||{}).find((function(t){return r[t].regions.includes(e)})))&&void 0!==n?n:"aws"}(e,{partitionHash:h}),y=e in p?e:null!==(r=null===(n=h[v])||void 0===n?void 0:n.endpoint)&&void 0!==r?r:e,m={useFipsEndpoint:c,useDualstackEndpoint:f},g=function(e,t){var n=t.regionHostname,r=t.partitionHostname;return n||(r?r.replace("{region}",e):void 0)}(y,{regionHostname:ar(null===(o=p[y])||void 0===o?void 0:o.variants,m),partitionHostname:ar(null===(i=h[v])||void 0===i?void 0:i.variants,m)});if(void 0===g)throw new Error("Endpoint resolution failed for: ".concat({resolvedRegion:y,useFipsEndpoint:c,useDualstackEndpoint:f}));var b=function(e,t){var n=t.signingRegion,r=t.regionRegex,o=t.useFipsEndpoint;if(n)return n;if(o){var i=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),a=e.match(i);if(a)return a[0].slice(1,-1)}}(g,{signingRegion:null===(a=p[y])||void 0===a?void 0:a.signingRegion,regionRegex:h[v].regionRegex,useFipsEndpoint:c});return Gn(Gn({partition:v,signingService:d,hostname:g},b&&{signingRegion:b}),(null===(s=p[y])||void 0===s?void 0:s.signingService)&&{signingService:p[y].signingService})},ur=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Gn(Gn({},this),{headers:Gn({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return Gn(Gn({},e),((r={})[n]=Array.isArray(o)?Xn([],Zn(o),!1):o,r))}),{}))),n},e}();var cr=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}();var lr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fr=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return Wn(t,void 0,void 0,(function(){var t,o,i,a,s;return Kn(this,(function(u){if(t=r.request,ur.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf("content-length")))try{a=e(o),t.headers=Gn(Gn({},t.headers),((s={})["content-length"]=String(a),s))}catch(e){}return[2,n(Gn(Gn({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),lr)}}};var dr=function(){return(dr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.create;function pr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}Object.create;!function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(dr(dr({},this),{headers:dr({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return dr(dr({},e),((r={})[n]=Array.isArray(o)?function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],pr(o),!1):o,r))}),{}))),n}}();!function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}();var hr,vr={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},yr=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Wn(void 0,void 0,void 0,(function(){var r,o;return Kn(this,(function(i){return ur.isInstance(n.request)?(r=n.request,o=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===o?"":o).indexOf("h2")>=0&&!r.headers[":authority"]?(delete r.headers.host,r.headers[":authority"]=""):r.headers.host||(r.headers.host=r.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),vr)}}},mr={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},gr=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return Wn(void 0,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f;return Kn(this,(function(d){switch(d.label){case 0:return r=t.clientName,o=t.commandName,i=t.inputFilterSensitiveLog,a=t.logger,s=t.outputFilterSensitiveLog,[4,e(n)];case 1:return u=d.sent(),a?("function"==typeof a.info&&(c=u.output,l=c.$metadata,f=$n(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:s(f),metadata:l})),[2,u]):[2,u]}}))}))}}),mr)}}},br=n(32);!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(hr||(hr={}));var wr,_r=hr.STANDARD,Sr=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Er=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Or=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],Ar=[500,502,503,504],xr=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||Er.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},Tr=function(){function e(e){var t,n,r,o,i;this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=null!==(t=null==e?void 0:e.beta)&&void 0!==t?t:.7,this.minCapacity=null!==(n=null==e?void 0:e.minCapacity)&&void 0!==n?n:1,this.minFillRate=null!==(r=null==e?void 0:e.minFillRate)&&void 0!==r?r:.5,this.scaleConstant=null!==(o=null==e?void 0:e.scaleConstant)&&void 0!==o?o:.4,this.smooth=null!==(i=null==e?void 0:e.smooth)&&void 0!==i?i:.8;var a=this.getCurrentTimeInSeconds();this.lastThrottleTime=a,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}return e.prototype.getCurrentTimeInSeconds=function(){return Date.now()/1e3},e.prototype.getSendToken=function(){return Wn(this,void 0,void 0,(function(){return Kn(this,(function(e){return[2,this.acquireTokenBucket(1)]}))}))},e.prototype.acquireTokenBucket=function(e){return Wn(this,void 0,void 0,(function(){var t;return Kn(this,(function(n){switch(n.label){case 0:return this.enabled?(this.refillTokenBucket(),e>this.currentCapacity?(t=(e-this.currentCapacity)/this.fillRate*1e3,[4,new Promise((function(e){return setTimeout(e,t)}))]):[3,2]):[2];case 1:n.sent(),n.label=2;case 2:return this.currentCapacity=this.currentCapacity-e,[2]}}))}))},e.prototype.refillTokenBucket=function(){var e=this.getCurrentTimeInSeconds();if(this.lastTimestamp){var t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}else this.lastTimestamp=e},e.prototype.updateClientSendingRate=function(e){var t;if(this.updateMeasuredRate(),xr(e)){var n=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=n,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(n),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());var r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)},e.prototype.calculateTimeWindow=function(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))},e.prototype.cubicThrottle=function(e){return this.getPrecise(e*this.beta)},e.prototype.cubicSuccess=function(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)},e.prototype.enableTokenBucket=function(){this.enabled=!0},e.prototype.updateTokenBucketRate=function(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)},e.prototype.updateMeasuredRate=function(){var e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){var n=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}},e.prototype.getPrecise=function(e){return parseFloat(e.toFixed(8))},e}(),jr=new Uint8Array(16);function Pr(){if(!wr&&!(wr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wr(jr)}var Cr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Mr=function(e){return"string"==typeof e&&Cr.test(e)},Ir=[],Rr=0;Rr<256;++Rr)Ir.push((Rr+256).toString(16).substr(1));var kr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ir[e[t+0]]+Ir[e[t+1]]+Ir[e[t+2]]+Ir[e[t+3]]+"-"+Ir[e[t+4]]+Ir[e[t+5]]+"-"+Ir[e[t+6]]+Ir[e[t+7]]+"-"+Ir[e[t+8]]+Ir[e[t+9]]+"-"+Ir[e[t+10]]+Ir[e[t+11]]+Ir[e[t+12]]+Ir[e[t+13]]+Ir[e[t+14]]+Ir[e[t+15]]).toLowerCase();if(!Mr(n))throw TypeError("Stringified UUID is invalid");return n};var Lr=function(e,t,n){var r=(e=e||{}).random||(e.rng||Pr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return kr(r)},Ur=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Dr=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return Sr.includes(e.name)}(e)||xr(e)||function(e){var t;return Or.includes(e.name)||Ar.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},Nr=function(){function e(e,t){var n,r,o;this.maxAttemptsProvider=e,this.mode=hr.STANDARD,this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:Dr,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:Ur,this.retryQuota=null!==(o=null==t?void 0:t.retryQuota)&&void 0!==o?o:function(e,t){var n,r,o,i=e,a=null!==(n=null==t?void 0:t.noRetryIncrement)&&void 0!==n?n:1,s=null!==(r=null==t?void 0:t.retryCost)&&void 0!==r?r:5,u=null!==(o=null==t?void 0:t.timeoutRetryCost)&&void 0!==o?o:10,c=e,l=function(e){return"TimeoutError"===e.name?u:s},f=function(e){return l(e)<=c};return Object.freeze({hasRetryTokens:f,retrieveRetryTokens:function(e){if(!f(e))throw new Error("No retry token available");var t=l(e);return c-=t,t},releaseRetryTokens:function(e){c+=null!=e?e:a,c=Math.min(c,i)}})}(500)}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Wn(this,void 0,void 0,(function(){var e;return Kn(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t,n){return Wn(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l;return Kn(this,(function(f){switch(f.label){case 0:return o=0,i=0,[4,this.getMaxAttempts()];case 1:a=f.sent(),s=t.request,ur.isInstance(s)&&(s.headers["amz-sdk-invocation-id"]=Lr()),u=function(){var u,l,f,d,p,h,v,y;return Kn(this,(function(m){switch(m.label){case 0:return m.trys.push([0,4,,7]),ur.isInstance(s)&&(s.headers["amz-sdk-request"]="attempt=".concat(o+1,"; max=").concat(a)),(null==n?void 0:n.beforeRequest)?[4,n.beforeRequest()]:[3,2];case 1:m.sent(),m.label=2;case 2:return[4,e(t)];case 3:return u=m.sent(),l=u.response,f=u.output,(null==n?void 0:n.afterRequest)&&n.afterRequest(l),c.retryQuota.releaseRetryTokens(r),f.$metadata.attempts=o+1,f.$metadata.totalRetryDelay=i,[2,{value:{response:l,output:f}}];case 4:return d=m.sent(),p=Fr(d),o++,c.shouldRetry(p,o,a)?(r=c.retryQuota.retrieveRetryTokens(p),h=c.delayDecider(xr(p)?500:100,o),v=Br(p.$response),y=Math.max(v||0,h),i+=y,[4,new Promise((function(e){return setTimeout(e,y)}))]):[3,6];case 5:return m.sent(),[2,"continue"];case 6:throw p.$metadata||(p.$metadata={}),p.$metadata.attempts=o,p.$metadata.totalRetryDelay=i,p;case 7:return[2]}}))},c=this,f.label=2;case 2:return[5,u()];case 3:return"object"==typeof(l=f.sent())?[2,l.value]:[3,2];case 4:return[2]}}))}))},e}(),Br=function(e){if(cr.isInstance(e)){var t=Object.keys(e.headers).find((function(e){return"retry-after"===e.toLowerCase()}));if(t){var n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n).getTime()-Date.now():1e3*r}}},Fr=function(e){return e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error("AWS SDK error wrapper for ".concat(e))},zr=function(e){function t(t,n){var r=this,o=null!=n?n:{},i=o.rateLimiter,a=$n(o,["rateLimiter"]);return(r=e.call(this,t,a)||this).rateLimiter=null!=i?i:new Tr,r.mode=hr.ADAPTIVE,r}return Vn(t,e),t.prototype.retry=function(t,n){return Wn(this,void 0,void 0,(function(){var r=this;return Kn(this,(function(o){return[2,e.prototype.retry.call(this,t,n,{beforeRequest:function(){return Wn(r,void 0,void 0,(function(){return Kn(this,(function(e){return[2,this.rateLimiter.getSendToken()]}))}))},afterRequest:function(e){r.rateLimiter.updateClientSendingRate(e)}})]}))}))},t}(Nr),qr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Hr=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(r){return Wn(void 0,void 0,void 0,(function(){var o;return Kn(this,(function(i){switch(i.label){case 0:return[4,e.retryStrategy()];case 1:return(null==(o=i.sent())?void 0:o.mode)&&(n.userAgent=Xn(Xn([],Zn(n.userAgent||[]),!1),[["cfg/retry-mode",o.mode]],!1)),[2,o.retry(t,r)]}}))}))}}}(e),qr)}}},Vr=function(e,t){return(Vr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Gr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Vr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function $r(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Wr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;Object.create;var Kr=function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n)||this;return o.tryNextLink=r,o.name="ProviderError",Object.setPrototypeOf(o,t.prototype),o}return Gr(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.assign(new this(e.message,t),e)},t}(Error);(function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n,r)||this;return o.tryNextLink=r,o.name="CredentialsProviderError",Object.setPrototypeOf(o,t.prototype),o}Gr(t,e)})(Kr),function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n,r)||this;return o.tryNextLink=r,o.name="TokenProviderError",Object.setPrototypeOf(o,t.prototype),o}Gr(t,e)}(Kr);for(var Yr=function(e,t,n){var r,o,i,a=!1,s=function(){return $r(void 0,void 0,void 0,(function(){return Wr(this,(function(t){switch(t.label){case 0:o||(o=e()),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,o];case 2:return r=t.sent(),i=!0,a=!1,[3,4];case 3:return o=void 0,[7];case 4:return[2,r]}}))}))};return void 0===t?function(e){return $r(void 0,void 0,void 0,(function(){return Wr(this,(function(t){switch(t.label){case 0:return i&&!(null==e?void 0:e.forceRefresh)?[3,2]:[4,s()];case 1:r=t.sent(),t.label=2;case 2:return[2,r]}}))}))}:function(e){return $r(void 0,void 0,void 0,(function(){return Wr(this,(function(o){switch(o.label){case 0:return i&&!(null==e?void 0:e.forceRefresh)?[3,2]:[4,s()];case 1:r=o.sent(),o.label=2;case 2:return a?[2,r]:n&&!n(r)?(a=!0,[2,r]):t(r)?[4,s()]:[3,4];case 3:return o.sent(),[2,r];case 4:return[2,r]}}))}))}},Zr={},Xr={},Jr=0;Jr<256;Jr++){var Qr=Jr.toString(16).toLowerCase();1===Qr.length&&(Qr="0".concat(Qr)),Zr[Jr]=Qr,Xr[Qr]=Jr}function eo(e){for(var t="",n=0;n<e.byteLength;n++)t+=Zr[e[n]];return t}var to="X-Amz-Date".toLowerCase(),no=["authorization",to,"date"],ro="X-Amz-Signature".toLowerCase(),oo="X-Amz-Security-Token".toLowerCase(),io={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},ao=/^proxy-/,so=/^sec-/,uo="AWS4-HMAC-SHA256-PAYLOAD",co={},lo=[],fo=function(e,t,n){return"".concat(e,"/").concat(t,"/").concat(n,"/").concat("aws4_request")},po=function(e,t,n){var r=new e(t);return r.update(n),r.digest()},ho=function(e,t,n){var r,o,i=e.headers,a={};try{for(var s=Yn(Object.keys(i).sort()),u=s.next();!u.done;u=s.next()){var c=u.value;if(null!=i[c]){var l=c.toLowerCase();(l in io||(null==t?void 0:t.has(l))||ao.test(l)||so.test(l))&&(!n||n&&!n.has(l))||(a[l]=i[c].trim().replace(/\s+/g," "))}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return a},vo=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,yo)},yo=function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())},mo=function(e,t){var n=e.headers,r=e.body;return Wn(void 0,void 0,void 0,(function(){var e,o,i,a,s,u,c;return Kn(this,(function(l){switch(l.label){case 0:try{for(e=Yn(Object.keys(n)),o=e.next();!o.done;o=e.next())if("x-amz-content-sha256"===(i=o.value).toLowerCase())return[2,n[i]]}catch(e){u={error:e}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(f=r,"function"==typeof ArrayBuffer&&f instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(f))?((a=new t).update(r),s=eo,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[l.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var f}))}))},go=function(e){var t=e.headers,n=e.query,r=$n(e,["headers","query"]);return Gn(Gn({},r),{headers:Gn({},t),query:n?bo(n):void 0})},bo=function(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return Gn(Gn({},t),((r={})[n]=Array.isArray(o)?Xn([],Zn(o),!1):o,r))}),{})},wo=function(e){var t,n;e="function"==typeof e.clone?e.clone():go(e);try{for(var r=Yn(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;no.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e},_o=function(e){return"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e},So=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=nr(r),this.credentialProvider=nr(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Wn(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l,f,d,p,h,v,y,m,g,b,w,_,S,E,O,A;return Kn(this,(function(x){switch(x.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,c=t.signingRegion,l=t.signingService,[4,this.credentialProvider()];case 1:return f=x.sent(),this.validateResolvedCredentials(f),null==c?[3,2]:(p=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=x.sent(),x.label=4;case 4:return d=p,h=Eo(r),v=h.longDate,y=h.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(m=fo(y,d,null!=l?l:this.service),g=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"==typeof e.clone?e.clone():go(e),a=i.headers,s=i.query,u=void 0===s?{}:s;try{for(var c=Yn(Object.keys(a)),l=c.next();!l.done;l=c.next()){var f=l.value,d=f.toLowerCase();"x-amz-"!==d.slice(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(d))||(u[f]=a[f],delete a[f])}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Gn(Gn({},e),{headers:a,query:u})}(wo(e),{unhoistableHeaders:s}),f.sessionToken&&(g.query["X-Amz-Security-Token"]=f.sessionToken),g.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",g.query["X-Amz-Credential"]="".concat(f.accessKeyId,"/").concat(m),g.query["X-Amz-Date"]=v,g.query["X-Amz-Expires"]=i.toString(10),b=ho(g,a,u),g.query["X-Amz-SignedHeaders"]=Oo(b),w=g.query,_="X-Amz-Signature",S=this.getSignature,E=[v,m,this.getSigningKey(f,d,y,l)],O=this.createCanonicalRequest,A=[g,b],[4,mo(e,this.sha256)]);case 5:return[4,S.apply(this,E.concat([O.apply(this,A.concat([x.sent()]))]))];case 6:return w[_]=x.sent(),[2,g]}}))}))},e.prototype.sign=function(e,t){return Wn(this,void 0,void 0,(function(){return Kn(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,r=e.payload,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return Wn(this,void 0,void 0,(function(){var e,t,o,c,l,f,d,p,h,v,y;return Kn(this,(function(m){switch(m.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=m.sent(),m.label=3;case 3:return e=t,o=Eo(i),c=o.shortDate,l=o.longDate,f=fo(c,e,null!=u?u:this.service),[4,mo({headers:{},body:r},this.sha256)];case 4:return d=m.sent(),(p=new this.sha256).update(n),v=eo,[4,p.digest()];case 5:return h=v.apply(void 0,[m.sent()]),y=[uo,l,f,a,h,d].join("\n"),[2,this.signString(y,{signingDate:i,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return Wn(this,void 0,void 0,(function(){var t,n,r,s,u,c,l,f;return Kn(this,(function(d){switch(d.label){case 0:return[4,this.credentialProvider()];case 1:return t=d.sent(),this.validateResolvedCredentials(t),null==i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=d.sent(),d.label=4;case 4:return n=r,s=Eo(o).shortDate,l=(c=this.sha256).bind,[4,this.getSigningKey(t,n,s,a)];case 5:return(u=new(l.apply(c,[void 0,d.sent()]))).update(e),f=eo,[4,u.digest()];case 6:return[2,f.apply(void 0,[d.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,s=n.signingRegion,u=n.signingService;return Wn(this,void 0,void 0,(function(){var t,n,r,c,l,f,d,p,h,v,y;return Kn(this,(function(m){switch(m.label){case 0:return[4,this.credentialProvider()];case 1:return t=m.sent(),this.validateResolvedCredentials(t),null==s?[3,2]:(r=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=m.sent(),m.label=4;case 4:return n=r,c=wo(e),l=Eo(o),f=l.longDate,d=l.shortDate,p=fo(d,n,null!=u?u:this.service),c.headers[to]=f,t.sessionToken&&(c.headers[oo]=t.sessionToken),[4,mo(c,this.sha256)];case 5:return h=m.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=Yn(Object.keys(t)),i=o.next();!i.done;i=o.next()){if(e===i.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=h),v=ho(c,a,i),[4,this.getSignature(f,p,this.getSigningKey(t,n,d,u),this.createCanonicalRequest(c,v,h))];case 6:return y=m.sent(),c.headers.authorization="".concat("AWS4-HMAC-SHA256"," ")+"Credential=".concat(t.accessKeyId,"/").concat(p,", ")+"SignedHeaders=".concat(Oo(v),", ")+"Signature=".concat(y),[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var r=Object.keys(t).sort();return"".concat(e.method,"\n").concat(this.getCanonicalPath(e),"\n").concat(function(e){var t,n,r=e.query,o=void 0===r?{}:r,i=[],a={},s=function(e){if(e.toLowerCase()===ro)return"continue";i.push(e);var t=o[e];"string"==typeof t?a[e]="".concat(vo(e),"=").concat(vo(t)):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat(["".concat(vo(e),"=").concat(vo(n))])}),[]).join("&"))};try{for(var u=Yn(Object.keys(o).sort()),c=u.next();!c.done;c=u.next()){s(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return i.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e),"\n").concat(r.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),"\n\n").concat(r.join(";"),"\n").concat(n)},e.prototype.createStringToSign=function(e,t,n){return Wn(this,void 0,void 0,(function(){var r,o;return Kn(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"".concat("AWS4-HMAC-SHA256","\n").concat(e,"\n").concat(t,"\n").concat(eo(o))]}}))}))},e.prototype.getCanonicalPath=function(e){var t,n,r=e.path;if(this.uriEscapePath){var o=[];try{for(var i=Yn(r.split("/")),a=i.next();!a.done;a=i.next()){var s=a.value;0!==(null==s?void 0:s.length)&&("."!==s&&(".."===s?o.pop():o.push(s)))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}var u="".concat((null==r?void 0:r.startsWith("/"))?"/":"").concat(o.join("/")).concat(o.length>0&&(null==r?void 0:r.endsWith("/"))?"/":"");return encodeURIComponent(u).replace(/%2F/g,"/")}return r},e.prototype.getSignature=function(e,t,n,r){return Wn(this,void 0,void 0,(function(){var o,i,a,s,u;return Kn(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),s=(a=this.sha256).bind,[4,n];case 2:return(i=new(s.apply(a,[void 0,c.sent()]))).update(o),u=eo,[4,i.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return Wn(void 0,void 0,void 0,(function(){var i,a,s,u,c,l,f,d,p;return Kn(this,(function(h){switch(h.label){case 0:return[4,po(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=h.sent(),(a="".concat(n,":").concat(r,":").concat(o,":").concat(eo(i),":").concat(t.sessionToken))in co)return[2,co[a]];for(lo.push(a);lo.length>50;)delete co[lo.shift()];s="AWS4".concat(t.secretAccessKey),h.label=2;case 2:h.trys.push([2,7,8,9]),u=Yn([n,r,o,"aws4_request"]),c=u.next(),h.label=3;case 3:return c.done?[3,6]:(l=c.value,[4,po(e,s,l)]);case 4:s=h.sent(),h.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return f=h.sent(),d={error:f},[3,9];case 8:try{c&&!c.done&&(p=u.return)&&p.call(u)}finally{if(d)throw d.error}return[7];case 9:return[2,co[a]=s]}}))}))}(this.sha256,e,n,t,r||this.service)},e.prototype.validateResolvedCredentials=function(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")},e}(),Eo=function(e){var t,n=(t=e,_o(t).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}},Oo=function(e){return Object.keys(e).sort().join(";")},Ao=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},xo=function(e){return"function"==typeof e?Yr(e,(function(e){return void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5}),(function(e){return void 0!==e.expiration})):Ao(e)},To=function(e){return new Date(Date.now()+e)},jo=function(e,t){var n=Date.parse(e);return function(e,t){return Math.abs(To(t).getTime()-e)>=3e5}(n,t)?n-Date.now():t},Po=function(e){var t,n,r;return cr.isInstance(e)?null!==(n=null===(t=e.headers)||void 0===t?void 0:t.date)&&void 0!==n?n:null===(r=e.headers)||void 0===r?void 0:r.Date:void 0},Co={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},Mo=function(e){return{applyToStack:function(t){t.addRelativeTo(function(e){return function(t,n){return function(r){return Wn(this,void 0,void 0,(function(){var o,i,a,s,u,c;return Kn(this,(function(l){switch(l.label){case 0:return ur.isInstance(r.request)?[4,e.signer()]:[2,t(r)];case 1:return o=l.sent(),a=t,s=[Gn({},r)],c={},[4,o.sign(r.request,{signingDate:To(e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 2:return[4,a.apply(void 0,[Gn.apply(void 0,s.concat([(c.request=l.sent(),c)]))]).catch((function(t){var n,r=null!==(n=t.ServerTime)&&void 0!==n?n:Po(t.$response);throw r&&(e.systemClockOffset=jo(r,e.systemClockOffset)),t}))];case 3:return i=l.sent(),(u=Po(i.response))&&(e.systemClockOffset=jo(u,e.systemClockOffset)),[2,i]}}))}))}}}(e),Co)}}};var Io=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ro=function(e){var t=Zn(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(Io,"_")})).join("/")},ko={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Lo=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return Wn(void 0,void 0,void 0,(function(){var o,i,a,s,u,c,l,f,d;return Kn(this,(function(p){switch(p.label){case 0:return o=r.request,ur.isInstance(o)?(i=o.headers,a=(null===(f=null==t?void 0:t.userAgent)||void 0===f?void 0:f.map(Ro))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return s=p.sent().map(Ro),u=(null===(d=null==n?void 0:n.customUserAgent)||void 0===d?void 0:d.map(Ro))||[],c=Xn(Xn(Xn([],Zn(s),!1),Zn(a),!1),Zn(u),!1).join(" "),l=Xn(Xn([],Zn(s.filter((function(e){return e.startsWith("aws-sdk-")}))),!1),Zn(u),!1).join(" "),"browser"!==n.runtime?(l&&(i["x-amz-user-agent"]=i["x-amz-user-agent"]?"".concat(i["user-agent"]," ").concat(l):l),i["user-agent"]=c):i["x-amz-user-agent"]=c,[2,e(Gn(Gn({},r),{request:o}))]}}))}))}}),ko)}}},Uo=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,Gn({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,Gn({},e))})),n},o=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Xn([],Zn(o(e)),!1))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Xn([],Zn(o(e)),!1))})),t},i=function(){var n,r=[],i=[],a={};return e.forEach((function(e){var t=Gn(Gn({},e),{before:[],after:[]});t.name&&(a[t.name]=t),r.push(t)})),t.forEach((function(e){var t=Gn(Gn({},e),{before:[],after:[]});t.name&&(a[t.name]=t),i.push(t)})),i.forEach((function(e){if(e.toMiddleware){var t=a[e.toMiddleware];if(void 0===t)throw new Error("".concat(e.toMiddleware," is not found when adding ").concat(e.name||"anonymous"," middleware ").concat(e.relation," ").concat(e.toMiddleware));"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(n=r,n.sort((function(e,t){return Do[t.step]-Do[e.step]||No[t.priority||"normal"]-No[e.priority||"normal"]}))).map(o).reduce((function(e,t){return e.push.apply(e,Xn([],Zn(t),!1)),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,r){void 0===r&&(r={});var o=r.name,i=r.override,a=Gn({step:"initialize",priority:"normal",middleware:t},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '".concat(o,"'"));var s=e.findIndex((function(e){return e.name===o})),u=e[s];if(u.step!==a.step||u.priority!==a.priority)throw new Error('"'.concat(o,'" middleware with ').concat(u.priority," priority in ").concat(u.step," step cannot be ")+"overridden by same-name middleware with ".concat(a.priority," priority in ").concat(a.step," step."));e.splice(s,1)}n.add(o)}e.push(a)},addRelativeTo:function(e,r){var o=r.name,i=r.override,a=Gn({middleware:e},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '".concat(o,"'"));var s=t.findIndex((function(e){return e.name===o})),u=t[s];if(u.toMiddleware!==a.toMiddleware||u.relation!==a.relation)throw new Error('"'.concat(o,'" middleware ').concat(u.relation,' "').concat(u.toMiddleware,'" middleware cannot be overridden ')+"by same-name middleware ".concat(a.relation,' "').concat(a.toMiddleware,'" middleware.'));t.splice(s,1)}n.add(o)}t.push(a)},clone:function(){return r(Uo())},use:function(e){e.applyToStack(a)},remove:function(r){return"string"==typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=r(Uo());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var o=Yn(i().reverse()),a=o.next();!a.done;a=o.next()){e=(0,a.value)(e,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}};return a},Do={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},No={high:3,normal:2,low:1},Bo=function(){function e(e){this.middlewareStack=Uo(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,o="function"==typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),Fo=function(){this.middlewareStack=Uo()},zo="***SensitiveInformation***",qo=function(e){if(null!=e){if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Qo.warn(Jo("Expected number but observed string: ".concat(e))),t}if("number"==typeof e)return e;throw new TypeError("Expected number, got ".concat(typeof e,": ").concat(e))}},Ho=(Math.ceil(Math.pow(2,127)*(2-Math.pow(2,-23))),function(e){if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError("Expected integer, got ".concat(typeof e,": ").concat(e))}}),Vo=function(e){return Go(e,32)},Go=function(e,t){var n=Ho(e);if(void 0!==n&&$o(n,t)!==n)throw new TypeError("Expected ".concat(t,"-bit integer, got ").concat(e));return n},$o=function(e,t){switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Wo=function(e,t){if(null==e){if(t)throw new TypeError("Expected a non-null value for ".concat(t));throw new TypeError("Expected a non-null value")}return e},Ko=function(e){if(null!=e){if("object"==typeof e&&!Array.isArray(e))return e;var t=Array.isArray(e)?"array":typeof e;throw new TypeError("Expected object, got ".concat(t,": ").concat(e))}},Yo=function(e){if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Qo.warn(Jo("Expected string, got ".concat(typeof e,": ").concat(e))),String(e);throw new TypeError("Expected string, got ".concat(typeof e,": ").concat(e))}},Zo=function(e){return"string"==typeof e?Xo(e):qo(e)},Xo=function(e){switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error("Unable to parse float value: ".concat(e))}},Jo=function(e){return String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((function(e){return!e.includes("stackTraceWarning")})).join("\n")},Qo={warn:console.warn};new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);var ei=function(e){function t(n){var r=e.call(this,n.message)||this;return Object.setPrototypeOf(r,t.prototype),r.name=n.name,r.$fault=n.$fault,r.$metadata=n.$metadata,r}return Vn(t,e),t}(Error),ti=function(e,t){void 0===t&&(t={}),Object.entries(t).filter((function(e){return void 0!==Zn(e,2)[1]})).forEach((function(t){var n=Zn(t,2),r=n[0],o=n[1];null!=e[r]&&""!==e[r]||(e[r]=o)}));var n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},ni=function(e){var t=e.output,n=e.parsedBody,r=e.exceptionCtor,o=e.errorCode,i=ri(t),a=i.httpStatusCode?i.httpStatusCode+"":void 0,s=new r({name:n.code||n.Code||o||a||"UnknowError",$fault:"client",$metadata:i});throw ti(s,n)},ri=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},oi=function(e){switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}};n(21);function ii(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}var ai=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Xn([null],Zn(arguments),!1)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};ai.prototype=Object.create(String.prototype,{constructor:{value:ai,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(ai,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Vn(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(ai);function si(e,t,n){var r,o,i,a;if(void 0===t&&void 0===n)i={},a=e;else{if(i=e,"function"==typeof t)return ui(i,t,a=n);a=t}try{for(var s=Yn(Object.keys(a)),u=s.next();!u.done;u=s.next()){var c=u.value;if(Array.isArray(a[c])){var l=Zn(a[c],2),f=l[0],d=l[1];if("function"==typeof d){var p=void 0,h=void 0===f&&null!=(p=d()),v="function"==typeof f&&!!f(void 0)||"function"!=typeof f&&!!f;h?i[c]=p:v&&(i[c]=d())}else{h=void 0===f&&null!=d,v="function"==typeof f&&!!f(d)||"function"!=typeof f&&!!f;(h||v)&&(i[c]=d)}}else i[c]=a[c]}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var ui=function(e,t,n){return si(e,Object.entries(n).reduce((function(e,n){var r=Zn(n,2),o=r[0],i=r[1];return Array.isArray(i)?e[o]=i:e[o]="function"==typeof i?[t,i()]:[t,i],e}),{}))},ci=function(e,t,n,r,o,i){if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");var a=r();if(a.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");return e=e.replace(o,i?a.split("/").map((function(e){return ii(e)})).join("/"):ii(a))};var li=n(34),fi=n(33),di=n(9);Object.create;function pi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;for(var hi={},vi={},yi=0;yi<256;yi++){var mi=yi.toString(16).toLowerCase();1===mi.length&&(mi="0".concat(mi)),hi[yi]=mi,vi[mi]=yi}function gi(e){for(var t="",n=0;n<e.byteLength;n++)t+=hi[e[n]];return t}var bi=function(){function e(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}return e.fromNumber=function(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error("".concat(t," is too large (or, if negative, too small) to represent as an Int64"));for(var n=new Uint8Array(8),r=7,o=Math.abs(Math.round(t));r>-1&&o>0;r--,o/=256)n[r]=o;return t<0&&wi(n),new e(n)},e.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&wi(e),parseInt(gi(e),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},e}();function wi(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}var _i,Si=function(){function e(e,t){this.toUtf8=e,this.fromUtf8=t}return e.prototype.format=function(e){var t,n,r,o,i=[];try{for(var a=pi(Object.keys(e)),s=a.next();!s.done;s=a.next()){var u=s.value,c=this.fromUtf8(u);i.push(Uint8Array.from([c.byteLength]),c,this.formatHeaderValue(e[u]))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}var l=new Uint8Array(i.reduce((function(e,t){return e+t.byteLength}),0)),f=0;try{for(var d=pi(i),p=d.next();!p.done;p=d.next()){var h=p.value;l.set(h,f),f+=h.byteLength}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}return l},e.prototype.formatHeaderValue=function(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":var t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":var n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":var r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":var o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);var i=new Uint8Array(o.buffer);return i.set(e.value,3),i;case"string":var a=this.fromUtf8(e.value),s=new DataView(new ArrayBuffer(3+a.byteLength));s.setUint8(0,7),s.setUint16(1,a.byteLength,!1);var u=new Uint8Array(s.buffer);return u.set(a,3),u;case"timestamp":var c=new Uint8Array(9);return c[0]=8,c.set(bi.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!Ii.test(e.value))throw new Error("Invalid UUID received: ".concat(e.value));var l=new Uint8Array(17);return l[0]=9,l.set(function(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2){var r=e.slice(n,n+2).toLowerCase();if(!(r in vi))throw new Error("Cannot decode unrecognized sequence ".concat(r," as hexadecimal"));t[n/2]=vi[r]}return t}(e.value.replace(/\-/g,"")),1),l}},e.prototype.parse=function(e){for(var t={},n=0;n<e.byteLength;){var r=e.getUint8(n++),o=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[o]={type:Ei,value:!0};break;case 1:t[o]={type:Ei,value:!1};break;case 2:t[o]={type:Oi,value:e.getInt8(n++)};break;case 3:t[o]={type:Ai,value:e.getInt16(n,!1)},n+=2;break;case 4:t[o]={type:xi,value:e.getInt32(n,!1)},n+=4;break;case 5:t[o]={type:Ti,value:new bi(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:var i=e.getUint16(n,!1);n+=2,t[o]={type:ji,value:new Uint8Array(e.buffer,e.byteOffset+n,i)},n+=i;break;case 7:var a=e.getUint16(n,!1);n+=2,t[o]={type:Pi,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,a))},n+=a;break;case 8:t[o]={type:Ci,value:new Date(new bi(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:var s=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[o]={type:Mi,value:"".concat(gi(s.subarray(0,4)),"-").concat(gi(s.subarray(4,6)),"-").concat(gi(s.subarray(6,8)),"-").concat(gi(s.subarray(8,10)),"-").concat(gi(s.subarray(10)))};break;default:throw new Error("Unrecognized header type tag")}}return t},e}();!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(_i||(_i={}));var Ei="boolean",Oi="byte",Ai="short",xi="integer",Ti="long",ji="binary",Pi="string",Ci="timestamp",Mi="uuid",Ii=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var Ri=function(){function e(e,t){this.headerMarshaller=new Si(e,t)}return e.prototype.encode=function(e){var t=e.headers,n=e.body,r=this.headerMarshaller.format(t),o=r.byteLength+n.byteLength+16,i=new Uint8Array(o),a=new DataView(i.buffer,i.byteOffset,i.byteLength),s=new di.Crc32;return a.setUint32(0,o,!1),a.setUint32(4,r.byteLength,!1),a.setUint32(8,s.update(i.subarray(0,8)).digest(),!1),i.set(r,12),i.set(n,r.byteLength+12),a.setUint32(o-4,s.update(i.subarray(8,o-4)).digest(),!1),i},e.prototype.decode=function(e){var t=function(e){var t=e.byteLength,n=e.byteOffset,r=e.buffer;if(t<16)throw new Error("Provided message too short to accommodate event stream message overhead");var o=new DataView(r,n,t),i=o.getUint32(0,!1);if(t!==i)throw new Error("Reported message length does not match received message length");var a=o.getUint32(4,!1),s=o.getUint32(8,!1),u=o.getUint32(t-4,!1),c=(new di.Crc32).update(new Uint8Array(r,n,8));if(s!==c.digest())throw new Error("The prelude checksum specified in the message (".concat(s,") does not match the calculated CRC32 checksum (").concat(c.digest(),")"));if(c.update(new Uint8Array(r,n+8,t-12)),u!==c.digest())throw new Error("The message checksum (".concat(c.digest(),") did not match the expected value of ").concat(u));return{headers:new DataView(r,n+8+4,a),body:new Uint8Array(r,n+8+4+a,i-a-16)}}(e),n=t.headers,r=t.body;return{headers:this.headerMarshaller.parse(n),body:r}},e.prototype.formatHeaders=function(e){return this.headerMarshaller.format(e)},e}();var ki=function(){function e(e){var t=e.utf8Encoder,n=e.utf8Decoder;this.eventStreamCodec=new Ri(t,n),this.utfEncoder=t}return e.prototype.deserialize=function(e,t){return function(e,t){var n;return(n={})[Symbol.asyncIterator]=function(){return Qn(this,arguments,(function(){var n,r,o,i,a,s,u,c,l,f,d,p,h,v,y,m,g;return Kn(this,(function(b){switch(b.label){case 0:b.trys.push([0,12,13,18]),n=er(e),b.label=1;case 1:return[4,Jn(n.next())];case 2:if((r=b.sent()).done)return[3,11];if(o=r.value,i=t.eventStreamCodec.decode(o),"error"!==(a=i.headers[":message-type"].value))return[3,3];throw(s=new Error(i.headers[":error-message"].value||"UnknownError")).name=i.headers[":error-code"].value,s;case 3:return"exception"!==a?[3,5]:(u=i.headers[":exception-type"].value,(v={})[u]=i,c=v,[4,Jn(t.deserializer(c))]);case 4:if((l=b.sent()).$unknown)throw(f=new Error(t.toUtf8(i.body))).name=u,f;throw l[u];case 5:return"event"!==a?[3,9]:((y={})[i.headers[":event-type"].value]=i,d=y,[4,Jn(t.deserializer(d))]);case 6:return(p=b.sent()).$unknown?[3,10]:[4,Jn(p)];case 7:return[4,b.sent()];case 8:return b.sent(),[3,10];case 9:throw Error("Unrecognizable event type: ".concat(i.headers[":event-type"].value));case 10:return[3,1];case 11:return[3,18];case 12:return h=b.sent(),m={error:h},[3,18];case 13:return b.trys.push([13,,16,17]),r&&!r.done&&(g=n.return)?[4,Jn(g.call(n))]:[3,15];case 14:b.sent(),b.label=15;case 15:return[3,17];case 16:if(m)throw m.error;return[7];case 17:return[7];case 18:return[2]}}))}))},n}(function(e){var t,n=0,r=0,o=null,i=null,a=function(e){if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);n=e,r=4,o=new Uint8Array(e),new DataView(o.buffer).setUint32(0,e,!1)};return(t={})[Symbol.asyncIterator]=function(){return Qn(this,arguments,(function(){var t,s,u,c,l,f,d,p;return Kn(this,(function(h){switch(h.label){case 0:t=e[Symbol.asyncIterator](),h.label=1;case 1:return[4,Jn(t.next())];case 2:return s=h.sent(),u=s.value,s.done?n?[3,4]:[4,Jn(void 0)]:[3,10];case 3:return[2,h.sent()];case 4:return n!==r?[3,7]:[4,Jn(o)];case 5:return[4,h.sent()];case 6:return h.sent(),[3,8];case 7:throw new Error("Truncated event message received.");case 8:return[4,Jn(void 0)];case 9:return[2,h.sent()];case 10:c=u.length,l=0,h.label=11;case 11:if(!(l<c))return[3,15];if(!o){if(f=c-l,i||(i=new Uint8Array(4)),d=Math.min(4-r,f),i.set(u.slice(l,l+d),r),l+=d,(r+=d)<4)return[3,15];a(new DataView(i.buffer).getUint32(0,!1)),i=null}return p=Math.min(n-r,c-l),o.set(u.slice(l,l+p),r),r+=p,l+=p,n&&n===r?[4,Jn(o)]:[3,14];case 12:return[4,h.sent()];case 13:h.sent(),o=null,n=0,r=0,h.label=14;case 14:return[3,11];case 15:return[3,1];case 16:return[2]}}))}))},t}(e),{eventStreamCodec:this.eventStreamCodec,deserializer:t,toUtf8:this.utfEncoder})},e.prototype.serialize=function(e,t){var n,r=this;return(n={})[Symbol.asyncIterator]=function(){return Qn(this,arguments,(function(){var n,o,i,a,s,u;return Kn(this,(function(c){switch(c.label){case 0:c.trys.push([0,7,8,13]),n=er(e),c.label=1;case 1:return[4,Jn(n.next())];case 2:return(o=c.sent()).done?[3,6]:(i=o.value,[4,Jn(r.eventStreamCodec.encode(t(i)))]);case 3:return[4,c.sent()];case 4:c.sent(),c.label=5;case 5:return[3,1];case 6:return[3,13];case 7:return a=c.sent(),s={error:a},[3,13];case 8:return c.trys.push([8,,11,12]),o&&!o.done&&(u=n.return)?[4,Jn(u.call(n))]:[3,10];case 9:c.sent(),c.label=10;case 10:return[3,12];case 11:if(s)throw s.error;return[7];case 12:return[7];case 13:return[4,Jn(new Uint8Array(0))];case 14:return[4,c.sent()];case 15:return c.sent(),[2]}}))}))},n},e}(),Li=function(){function e(e){var t=e.utf8Encoder,n=e.utf8Decoder;this.universalMarshaller=new ki({utf8Decoder:n,utf8Encoder:t})}return e.prototype.deserialize=function(e,t){var n=Ui(e)?function(e){var t;return(t={})[Symbol.asyncIterator]=function(){return Qn(this,arguments,(function(){var t,n,r,o;return Kn(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,Jn(t.read())];case 3:return n=i.sent(),r=n.done,o=n.value,r?[4,Jn(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,Jn(o)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t}(e):e;return this.universalMarshaller.deserialize(n,t)},e.prototype.serialize=function(e,t){var n,r=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(n=r[Symbol.asyncIterator](),new ReadableStream({pull:function(e){return Wn(this,void 0,void 0,(function(){var t,r,o;return Kn(this,(function(i){switch(i.label){case 0:return[4,n.next()];case 1:return t=i.sent(),r=t.done,o=t.value,r?[2,e.close()]:(e.enqueue(o),[2])}}))}))}})):r},e}(),Ui=function(e){return"function"==typeof ReadableStream&&e instanceof ReadableStream},Di=function(e){return new Li(e)};for(var Ni=function(){function e(e){"function"==typeof e?this.configProvider=e().then((function(e){return e||{}})):(this.config=null!=e?e:{},this.configProvider=Promise.resolve(this.config))}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal;return Wn(this,void 0,void 0,(function(){var t,r,o,i,a,s,u,c,l,f,d,p;return Kn(this,(function(h){switch(h.label){case 0:return this.config?[3,2]:(t=this,[4,this.configProvider]);case 1:t.config=h.sent(),h.label=2;case 2:return r=this.config.requestTimeout,(null==n?void 0:n.aborted)?((o=new Error("Request aborted")).name="AbortError",[2,Promise.reject(o)]):(i=e.path,e.query&&(a=function(e){var t,n,r=[];try{for(var o=Yn(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,s=e[a];if(a=vo(a),Array.isArray(s))for(var u=0,c=s.length;u<c;u++)r.push("".concat(a,"=").concat(vo(s[u])));else{var l=a;(s||"string"==typeof s)&&(l+="=".concat(vo(s))),r.push(l)}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query))&&(i+="?".concat(a)),s=e.port,u=e.method,c="".concat(e.protocol,"//").concat(e.hostname).concat(s?":".concat(s):"").concat(i),l="GET"===u||"HEAD"===u?void 0:e.body,f={body:l,headers:new Headers(e.headers),method:u},"undefined"!=typeof AbortController&&(f.signal=n),d=new Request(c,f),p=[fetch(d).then((function(e){var t,n,r=e.headers,o={};try{for(var i=Yn(r.entries()),a=i.next();!a.done;a=i.next()){var s=a.value;o[s[0]]=s[1]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new cr({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new cr({headers:o,statusCode:e.status,body:t})}}))})),(v=r,void 0===v&&(v=0),new Promise((function(e,t){v&&setTimeout((function(){var e=new Error("Request did not complete within ".concat(v," ms"));e.name="TimeoutError",t(e)}),v)})))],n&&p.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),[2,Promise.race(p)])}var v}))}))},e}(),Bi={},Fi=new Array(64),zi=0,qi="A".charCodeAt(0),Hi="Z".charCodeAt(0);zi+qi<=Hi;zi++){var Vi=String.fromCharCode(zi+qi);Bi[Vi]=zi,Fi[zi]=Vi}for(zi=0,qi="a".charCodeAt(0),Hi="z".charCodeAt(0);zi+qi<=Hi;zi++){Vi=String.fromCharCode(zi+qi);var Gi=zi+26;Bi[Vi]=Gi,Fi[Gi]=Vi}for(zi=0;zi<10;zi++){Bi[zi.toString(10)]=zi+52;Vi=zi.toString(10),Gi=zi+52;Bi[Vi]=Gi,Fi[Gi]=Vi}Bi["+"]=62,Fi[62]="+",Bi["/"]=63,Fi[63]="/";function $i(e){var t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;for(var n=new ArrayBuffer(t),r=new DataView(n),o=0;o<e.length;o+=4){for(var i=0,a=0,s=o,u=o+3;s<=u;s++)if("="!==e[s]){if(!(e[s]in Bi))throw new TypeError("Invalid character ".concat(e[s]," in base64 string."));i|=Bi[e[s]]<<6*(u-s),a+=6}else i>>=6;var c=o/4*3;i>>=a%8;for(var l=Math.floor(a/8),f=0;f<l;f++){var d=8*(l-f-1);r.setUint8(c+f,(i&255<<d)>>d)}}return new Uint8Array(n)}function Wi(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var s=Math.ceil(o/6);r<<=6*s-o;for(var u=1;u<=s;u++){var c=6*(s-u);t+=Fi[(r&63<<c)>>c]}t+="==".slice(0,4-s)}return t}var Ki=function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Wn(this,void 0,void 0,(function(){var t,n;return Kn(this,(function(r){switch(r.label){case 0:return[4,Yi(e)];case 1:return t=r.sent(),n=$i(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Wn(this,void 0,void 0,(function(){var t,n,r,o,i,a,s;return Kn(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,u.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=u.sent(),i=o.done,(a=o.value)&&(s=t,(t=new Uint8Array(s.length+a.length)).set(s),t.set(a,s.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)};function Yi(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var Zi=function(e){return function(){throw new Error(e)}},Xi=function(e){return function(){return Promise.reject(e)}},Ji=function(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error("Body Length computation failed for ".concat(e))},Qi=function(e){var t=e.serviceId,n=e.clientVersion;return function(){return Wn(void 0,void 0,void 0,(function(){var e,r,o,i,a,s,u,c,l;return Kn(this,(function(f){return e="undefined"!=typeof window&&(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?D.a.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/".concat((null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.name)||"other"),null===(a=null==e?void 0:e.os)||void 0===a?void 0:a.version],["lang/js"],["md/browser","".concat(null!==(u=null===(s=null==e?void 0:e.browser)||void 0===s?void 0:s.name)&&void 0!==u?u:"unknown","_").concat(null!==(l=null===(c=null==e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==l?l:"unknown")]],t&&r.push(["api/".concat(t),n]),[2,r]}))}))}},ea=n(12);var ta=function(e){if("string"==typeof e)return ta(new URL(e));var t,n=e,r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,s=n.search;return s&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=Yn(e.split("&")),i=o.next();!i.done;i=o.next()){var a=Zn(i.value.split("="),2),s=a[0],u=a[1],c=void 0===u?null:u;s=decodeURIComponent(s),c&&(c=decodeURIComponent(c)),s in r?Array.isArray(r[s])?r[s].push(c):r[s]=[r[s],c]:r[s]=c}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(s)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}},na={},ra={aws:{regions:["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-southeast-1","ap-southeast-2","ap-southeast-3","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-central-1","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"],regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.amazonaws.com",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"runtime-v2-lex-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"runtime-v2-lex.{region}.api.aws",tags:["dualstack"]}]},"aws-cn":{regions:["cn-north-1","cn-northwest-1"],regionRegex:"^cn\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.amazonaws.com.cn",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.amazonaws.com.cn",tags:["fips"]},{hostname:"runtime-v2-lex-fips.{region}.api.amazonwebservices.com.cn",tags:["dualstack","fips"]},{hostname:"runtime-v2-lex.{region}.api.amazonwebservices.com.cn",tags:["dualstack"]}]},"aws-iso":{regions:["us-iso-east-1","us-iso-west-1"],regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.c2s.ic.gov",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.c2s.ic.gov",tags:["fips"]}]},"aws-iso-b":{regions:["us-isob-east-1"],regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.sc2s.sgov.gov",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.sc2s.sgov.gov",tags:["fips"]}]},"aws-us-gov":{regions:["us-gov-east-1","us-gov-west-1"],regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.amazonaws.com",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"runtime-v2-lex-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"runtime-v2-lex.{region}.api.aws",tags:["dualstack"]}]}},oa=function(e,t){return Wn(void 0,void 0,void 0,(function(){return Kn(this,(function(n){return[2,sr(e,Gn(Gn({},t),{signingService:"lex",regionHash:na,partitionHash:ra}))]}))}))};function ia(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function aa(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;Object.create;var sa=["in-region","cross-region","mobile","standard","legacy"],ua=function(){var e,t,n="undefined"!=typeof window&&(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.userAgent)?D.a.parse(window.navigator.userAgent):void 0,r=null===(t=null==n?void 0:n.platform)||void 0===t?void 0:t.type;return"tablet"===r||"mobile"===r},ca=function(e){var t,n,r,o,i,a,s,u,c,l,f,d,p,h,v,y,m,g=function(e){var t=(void 0===e?{}:e).defaultsMode;return Yr((function(){return ia(void 0,void 0,void 0,(function(){var e,n;return aa(this,(function(r){switch(r.label){case 0:return"function"!=typeof t?[3,2]:[4,t()];case 1:return n=r.sent(),[3,3];case 2:n=t,r.label=3;case 3:switch(null==(e=n)?void 0:e.toLowerCase()){case"auto":return[2,Promise.resolve(ua()?"mobile":"standard")];case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return[2,Promise.resolve(null==e?void 0:e.toLocaleLowerCase())];case void 0:return[2,Promise.resolve("legacy")];default:throw new Error('Invalid parameter for "defaultsMode", expect '.concat(sa.join(", "),", got ").concat(e))}return[2]}}))}))}))}(e),b=function(){return g().then(oi)},w=function(e){var t,n,r,o,i;return{apiVersion:"2020-08-07",disableHostPrefix:null!==(t=null==e?void 0:e.disableHostPrefix)&&void 0!==t&&t,logger:null!==(n=null==e?void 0:e.logger)&&void 0!==n?n:{},regionInfoProvider:null!==(r=null==e?void 0:e.regionInfoProvider)&&void 0!==r?r:oa,serviceId:null!==(o=null==e?void 0:e.serviceId)&&void 0!==o?o:"Lex Runtime V2",urlParser:null!==(i=null==e?void 0:e.urlParser)&&void 0!==i?i:ta}}(e);return Gn(Gn(Gn({},w),e),{runtime:"browser",defaultsMode:g,base64Decoder:null!==(t=null==e?void 0:e.base64Decoder)&&void 0!==t?t:$i,base64Encoder:null!==(n=null==e?void 0:e.base64Encoder)&&void 0!==n?n:Wi,bodyLengthChecker:null!==(r=null==e?void 0:e.bodyLengthChecker)&&void 0!==r?r:Ji,credentialDefaultProvider:null!==(o=null==e?void 0:e.credentialDefaultProvider)&&void 0!==o?o:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:null!==(i=null==e?void 0:e.defaultUserAgentProvider)&&void 0!==i?i:Qi({serviceId:w.serviceId,clientVersion:li.version}),eventStreamPayloadHandlerProvider:null!==(a=null==e?void 0:e.eventStreamPayloadHandlerProvider)&&void 0!==a?a:function(){return{handle:Zi("event stream request is not supported in browser.")}},eventStreamSerdeProvider:null!==(s=null==e?void 0:e.eventStreamSerdeProvider)&&void 0!==s?s:Di,maxAttempts:null!==(u=null==e?void 0:e.maxAttempts)&&void 0!==u?u:3,region:null!==(c=null==e?void 0:e.region)&&void 0!==c?c:Xi("Region is missing"),requestHandler:null!==(l=null==e?void 0:e.requestHandler)&&void 0!==l?l:new Ni(b),retryMode:null!==(f=null==e?void 0:e.retryMode)&&void 0!==f?f:function(){return Wn(void 0,void 0,void 0,(function(){return Kn(this,(function(e){switch(e.label){case 0:return[4,b()];case 1:return[2,e.sent().retryMode||_r]}}))}))},sha256:null!==(d=null==e?void 0:e.sha256)&&void 0!==d?d:fi.Sha256,streamCollector:null!==(p=null==e?void 0:e.streamCollector)&&void 0!==p?p:Ki,useDualstackEndpoint:null!==(h=null==e?void 0:e.useDualstackEndpoint)&&void 0!==h?h:function(){return Promise.resolve(!1)},useFipsEndpoint:null!==(v=null==e?void 0:e.useFipsEndpoint)&&void 0!==v?v:function(){return Promise.resolve(!1)},utf8Decoder:null!==(y=null==e?void 0:e.utf8Decoder)&&void 0!==y?y:ea.fromUtf8,utf8Encoder:null!==(m=null==e?void 0:e.utf8Encoder)&&void 0!==m?m:ea.toUtf8})},la=function(e){function t(t){var n,r,o,i=this,a=function(e){var t=e.region,n=e.useFipsEndpoint;if(!t)throw new Error("Region is missing");return Gn(Gn({},e),{region:function(){return Wn(void 0,void 0,void 0,(function(){var e;return Kn(this,(function(n){switch(n.label){case 0:return"string"==typeof t?[2,ir(t)]:[4,t()];case 1:return e=n.sent(),[2,ir(e)]}}))}))},useFipsEndpoint:function(){return Wn(void 0,void 0,void 0,(function(){var e;return Kn(this,(function(r){switch(r.label){case 0:return"string"!=typeof t?[3,1]:(e=t,[3,3]);case 1:return[4,t()];case 2:e=r.sent(),r.label=3;case 3:return or(e)?[2,!0]:[2,"boolean"==typeof n?Promise.resolve(n):n()]}}))}))}})}(ca(t)),s=function(e){var t,n=e.credentials?xo(e.credentials):e.credentialDefaultProvider(e),r=e.signingEscapePath,o=void 0===r||r,i=e.systemClockOffset,a=void 0===i?e.systemClockOffset||0:i,s=e.sha256;return t=e.signer?Ao(e.signer):function(){return Ao(e.region)().then((function(t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i;return Kn(this,(function(a){switch(a.label){case 0:return r=(n=e).regionInfoProvider,o=[t],i={},[4,e.useFipsEndpoint()];case 1:return i.useFipsEndpoint=a.sent(),[4,e.useDualstackEndpoint()];case 2:return[4,r.apply(n,o.concat([(i.useDualstackEndpoint=a.sent(),i)]))];case 3:return[2,[a.sent()||{},t]]}}))}))})).then((function(t){var r=Zn(t,2),i=r[0],a=r[1],u=i.signingRegion,c=i.signingService;e.signingRegion=e.signingRegion||u||a,e.signingName=e.signingName||c||e.serviceId;var l=Gn(Gn({},e),{credentials:n,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:o});return new(e.signerConstructor||So)(l)}))},Gn(Gn({},e),{systemClockOffset:a,signingEscapePath:o,credentials:n,signer:t})}(function(e){var t,n=nr(null!==(t=e.maxAttempts)&&void 0!==t?t:3);return Gn(Gn({},e),{maxAttempts:n,retryStrategy:function(){return Wn(void 0,void 0,void 0,(function(){return Kn(this,(function(t){switch(t.label){case 0:return e.retryStrategy?[2,e.retryStrategy]:[4,nr(e.retryMode)()];case 1:return t.sent()===hr.ADAPTIVE?[2,new zr(n)]:[2,new Nr(n)]}}))}))}})}(rr(a))),u=function(e){return Gn(Gn({},e),{eventStreamMarshaller:e.eventStreamSerdeProvider(e)})}(function(e){return Gn(Gn({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}((r=(n=s).signer,o=n.eventStreamPayloadHandlerProvider(dr(dr({},n),{eventSigner:r})),dr(dr({},n),{eventSigner:r,eventStreamPayloadHandler:o}))));return(i=e.call(this,u)||this).config=u,i.middlewareStack.use(Hr(i.config)),i.middlewareStack.use(fr(i.config)),i.middlewareStack.use(yr(i.config)),i.middlewareStack.use(gr(i.config)),i.middlewareStack.use(Object(br.a)(i.config)),i.middlewareStack.use(Mo(i.config)),i.middlewareStack.use(Lo(i.config)),i}return Vn(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Bo),fa={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},da={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function pa(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return Wn(void 0,void 0,void 0,(function(){var o,i,a;return Kn(this,(function(s){switch(s.label){case 0:return[4,n(r)];case 1:o=s.sent().response,s.label=2;case 2:return s.trys.push([2,4,,5]),[4,t(o,e)];case 3:return i=s.sent(),[2,{response:o,output:i}];case 4:throw a=s.sent(),Object.defineProperty(a,"$response",{value:o}),a;case 5:return[2]}}))}))}}}(e,n),fa),r.add(function(e,t){return function(n,r){return function(r){return Wn(void 0,void 0,void 0,(function(){var o;return Kn(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(Gn(Gn({},r),{request:o}))]}}))}))}}}(e,t),da)}}}var ha,va,ya,ma,ga,ba,wa,_a=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(ei),Sa=function(e){function t(n){var r=e.call(this,Gn({name:"AccessDeniedException",$fault:"client"},n))||this;return r.name="AccessDeniedException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(_a),Ea=function(e){function t(n){var r=e.call(this,Gn({name:"ConflictException",$fault:"client"},n))||this;return r.name="ConflictException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(_a),Oa=function(e){function t(n){var r=e.call(this,Gn({name:"InternalServerException",$fault:"server"},n))||this;return r.name="InternalServerException",r.$fault="server",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(_a),Aa=function(e){function t(n){var r=e.call(this,Gn({name:"ResourceNotFoundException",$fault:"client"},n))||this;return r.name="ResourceNotFoundException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(_a),xa=function(e){function t(n){var r=e.call(this,Gn({name:"ThrottlingException",$fault:"client"},n))||this;return r.name="ThrottlingException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(_a),Ta=function(e){function t(n){var r=e.call(this,Gn({name:"ValidationException",$fault:"client"},n))||this;return r.name="ValidationException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(_a);!function(e){e.CONFIRMED="Confirmed",e.DENIED="Denied",e.NONE="None"}(ha||(ha={})),function(e){e.COMPOSITE="Composite",e.LIST="List",e.SCALAR="Scalar"}(va||(va={})),function(e){e.FAILED="Failed",e.FULFILLED="Fulfilled",e.FULFILLMENT_IN_PROGRESS="FulfillmentInProgress",e.IN_PROGRESS="InProgress",e.READY_FOR_FULFILLMENT="ReadyForFulfillment",e.WAITING="Waiting"}(ya||(ya={})),function(e){e.MIXED="MIXED",e.NEGATIVE="NEGATIVE",e.NEUTRAL="NEUTRAL",e.POSITIVE="POSITIVE"}(ma||(ma={})),function(e){e.CUSTOM_PAYLOAD="CustomPayload",e.IMAGE_RESPONSE_CARD="ImageResponseCard",e.PLAIN_TEXT="PlainText",e.SSML="SSML"}(ga||(ga={})),function(e){e.DEFAULT="Default",e.SPELL_BY_LETTER="SpellByLetter",e.SPELL_BY_WORD="SpellByWord"}(ba||(ba={})),function(e){e.CLOSE="Close",e.CONFIRM_INTENT="ConfirmIntent",e.DELEGATE="Delegate",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot",e.NONE="None"}(wa||(wa={}));var ja,Pa,Ca,Ma,Ia,Ra=function(e){function t(n){var r=e.call(this,Gn({name:"BadGatewayException",$fault:"server"},n))||this;return r.name="BadGatewayException",r.$fault="server",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(_a),ka=function(e){function t(n){var r=e.call(this,Gn({name:"DependencyFailedException",$fault:"client"},n))||this;return r.name="DependencyFailedException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(_a);!function(e){e.AUDIO="AUDIO",e.TEXT="TEXT"}(ja||(ja={})),function(e){e.DTMF="DTMF",e.SPEECH="Speech",e.TEXT="Text"}(Pa||(Pa={})),function(e){e.DTMF_START_DETECTED="DTMF_START_DETECTED",e.TEXT_DETECTED="TEXT_DETECTED",e.VOICE_START_DETECTED="VOICE_START_DETECTED"}(Ca||(Ca={})),function(e){e.visit=function(e,t){return void 0!==e.ConfigurationEvent?t.ConfigurationEvent(e.ConfigurationEvent):void 0!==e.AudioInputEvent?t.AudioInputEvent(e.AudioInputEvent):void 0!==e.DTMFInputEvent?t.DTMFInputEvent(e.DTMFInputEvent):void 0!==e.TextInputEvent?t.TextInputEvent(e.TextInputEvent):void 0!==e.PlaybackCompletionEvent?t.PlaybackCompletionEvent(e.PlaybackCompletionEvent):void 0!==e.DisconnectionEvent?t.DisconnectionEvent(e.DisconnectionEvent):t._(e.$unknown[0],e.$unknown[1])}}(Ma||(Ma={})),function(e){e.visit=function(e,t){return void 0!==e.PlaybackInterruptionEvent?t.PlaybackInterruptionEvent(e.PlaybackInterruptionEvent):void 0!==e.TranscriptEvent?t.TranscriptEvent(e.TranscriptEvent):void 0!==e.IntentResultEvent?t.IntentResultEvent(e.IntentResultEvent):void 0!==e.TextResponseEvent?t.TextResponseEvent(e.TextResponseEvent):void 0!==e.AudioResponseEvent?t.AudioResponseEvent(e.AudioResponseEvent):void 0!==e.HeartbeatEvent?t.HeartbeatEvent(e.HeartbeatEvent):void 0!==e.AccessDeniedException?t.AccessDeniedException(e.AccessDeniedException):void 0!==e.ResourceNotFoundException?t.ResourceNotFoundException(e.ResourceNotFoundException):void 0!==e.ValidationException?t.ValidationException(e.ValidationException):void 0!==e.ThrottlingException?t.ThrottlingException(e.ThrottlingException):void 0!==e.InternalServerException?t.InternalServerException(e.InternalServerException):void 0!==e.ConflictException?t.ConflictException(e.ConflictException):void 0!==e.DependencyFailedException?t.DependencyFailedException(e.DependencyFailedException):void 0!==e.BadGatewayException?t.BadGatewayException(e.BadGatewayException):t._(e.$unknown[0],e.$unknown[1])}}(Ia||(Ia={}));var La=function(e){return Gn(Gn({},e),e.content&&{content:zo})},Ua=function(e){return Gn(Gn(Gn({},e),e.sessionState&&{sessionState:zo}),e.requestAttributes&&{requestAttributes:zo})},Da=function(e){return Gn({},e)},Na=function(e){return Gn(Gn({},e),e.text&&{text:zo})},Ba=function(e){return Gn(Gn({},e),e.messages&&{messages:e.messages.map((function(e){return La(e)}))})},Fa=function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i,a;return Kn(this,(function(s){switch(s.label){case 0:return r=[Gn({},e)],a={},[4,zs(e.body,t)];case 1:switch(n=Gn.apply(void 0,r.concat([(a.body=s.sent(),a)])),o=qs(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.lexruntimev2#AccessDeniedException":return[3,2];case"BadGatewayException":case"com.amazonaws.lexruntimev2#BadGatewayException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimev2#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimev2#DependencyFailedException":return[3,8];case"InternalServerException":case"com.amazonaws.lexruntimev2#InternalServerException":return[3,10];case"ResourceNotFoundException":case"com.amazonaws.lexruntimev2#ResourceNotFoundException":return[3,12];case"ThrottlingException":case"com.amazonaws.lexruntimev2#ThrottlingException":return[3,14];case"ValidationException":case"com.amazonaws.lexruntimev2#ValidationException":return[3,16]}return[3,18];case 2:return[4,Ha(n,t)];case 3:throw s.sent();case 4:return[4,Va(n,t)];case 5:throw s.sent();case 6:return[4,Ga(n,t)];case 7:throw s.sent();case 8:return[4,$a(n,t)];case 9:throw s.sent();case 10:return[4,Wa(n,t)];case 11:throw s.sent();case 12:return[4,Ka(n,t)];case 13:throw s.sent();case 14:return[4,Ya(n,t)];case 15:throw s.sent();case 16:return[4,Za(n,t)];case 17:throw s.sent();case 18:i=n.body,ni({output:e,parsedBody:i,exceptionCtor:_a,errorCode:o}),s.label=19;case 19:return[2]}}))}))},za=function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i,a;return Kn(this,(function(s){switch(s.label){case 0:return r=[Gn({},e)],a={},[4,zs(e.body,t)];case 1:switch(n=Gn.apply(void 0,r.concat([(a.body=s.sent(),a)])),o=qs(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.lexruntimev2#AccessDeniedException":return[3,2];case"BadGatewayException":case"com.amazonaws.lexruntimev2#BadGatewayException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimev2#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimev2#DependencyFailedException":return[3,8];case"InternalServerException":case"com.amazonaws.lexruntimev2#InternalServerException":return[3,10];case"ResourceNotFoundException":case"com.amazonaws.lexruntimev2#ResourceNotFoundException":return[3,12];case"ThrottlingException":case"com.amazonaws.lexruntimev2#ThrottlingException":return[3,14];case"ValidationException":case"com.amazonaws.lexruntimev2#ValidationException":return[3,16]}return[3,18];case 2:return[4,Ha(n,t)];case 3:throw s.sent();case 4:return[4,Va(n,t)];case 5:throw s.sent();case 6:return[4,Ga(n,t)];case 7:throw s.sent();case 8:return[4,$a(n,t)];case 9:throw s.sent();case 10:return[4,Wa(n,t)];case 11:throw s.sent();case 12:return[4,Ka(n,t)];case 13:throw s.sent();case 14:return[4,Ya(n,t)];case 15:throw s.sent();case 16:return[4,Za(n,t)];case 17:throw s.sent();case 18:i=n.body,ni({output:e,parsedBody:i,exceptionCtor:_a,errorCode:o}),s.label=19;case 19:return[2]}}))}))},qa=si,Ha=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=qa({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new Sa(Gn({$metadata:Ns(e)},t)),[2,ti(r,e.body)]}))}))},Va=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=qa({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new Ra(Gn({$metadata:Ns(e)},t)),[2,ti(r,e.body)]}))}))},Ga=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=qa({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new Ea(Gn({$metadata:Ns(e)},t)),[2,ti(r,e.body)]}))}))},$a=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=qa({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new ka(Gn({$metadata:Ns(e)},t)),[2,ti(r,e.body)]}))}))},Wa=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=qa({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new Oa(Gn({$metadata:Ns(e)},t)),[2,ti(r,e.body)]}))}))},Ka=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=qa({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new Aa(Gn({$metadata:Ns(e)},t)),[2,ti(r,e.body)]}))}))},Ya=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=qa({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new xa(Gn({$metadata:Ns(e)},t)),[2,ti(r,e.body)]}))}))},Za=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=qa({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new Ta(Gn({$metadata:Ns(e)},t)),[2,ti(r,e.body)]}))}))},Xa=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=Zn(t,2),o=r[0],i=r[1];return null===i?e:Gn(Gn({},e),((n={})[o]=i,n))}),{})},Ja=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return function(e,t){return Gn(Gn(Gn({},null!=e.contextAttributes&&{contextAttributes:Xa(e.contextAttributes,t)}),null!=e.name&&{name:e.name}),null!=e.timeToLive&&{timeToLive:Qa(e.timeToLive,t)})}(e,t)}))},Qa=function(e,t){return Gn(Gn({},null!=e.timeToLiveInSeconds&&{timeToLiveInSeconds:e.timeToLiveInSeconds}),null!=e.turnsToLive&&{turnsToLive:e.turnsToLive})},es=function(e,t){return Gn(Gn(Gn(Gn({},null!=e.slotElicitationStyle&&{slotElicitationStyle:e.slotElicitationStyle}),null!=e.slotToElicit&&{slotToElicit:e.slotToElicit}),null!=e.subSlotToElicit&&{subSlotToElicit:ts(e.subSlotToElicit,t)}),null!=e.type&&{type:e.type})},ts=function(e,t){return Gn(Gn({},null!=e.name&&{name:e.name}),null!=e.subSlotToElicit&&{subSlotToElicit:ts(e.subSlotToElicit,t)})},ns=function(e,t){return Gn(Gn(Gn(Gn({},null!=e.confirmationState&&{confirmationState:e.confirmationState}),null!=e.name&&{name:e.name}),null!=e.slots&&{slots:cs(e.slots,t)}),null!=e.state&&{state:e.state})},rs=function(e,t){return Gn({},null!=e.slotHints&&{slotHints:ss(e.slotHints,t)})},os=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return function(e,t){return Gn({},null!=e.phrase&&{phrase:e.phrase})}(e)}))},is=function(e,t){return Gn(Gn(Gn(Gn(Gn(Gn({},null!=e.activeContexts&&{activeContexts:Ja(e.activeContexts,t)}),null!=e.dialogAction&&{dialogAction:es(e.dialogAction,t)}),null!=e.intent&&{intent:ns(e.intent,t)}),null!=e.originatingRequestId&&{originatingRequestId:e.originatingRequestId}),null!=e.runtimeHints&&{runtimeHints:rs(e.runtimeHints,t)}),null!=e.sessionAttributes&&{sessionAttributes:fs(e.sessionAttributes,t)})},as=function(e,t){return Gn(Gn(Gn(Gn({},null!=e.shape&&{shape:e.shape}),null!=e.subSlots&&{subSlots:cs(e.subSlots,t)}),null!=e.value&&{value:ds(e.value,t)}),null!=e.values&&{values:ps(e.values,t)})},ss=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=us(a,t),r))}),{})},us=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=function(e,t){return Gn(Gn({},null!=e.runtimeHintValues&&{runtimeHintValues:os(e.runtimeHintValues,t)}),null!=e.subSlotHints&&{subSlotHints:us(e.subSlotHints,t)})}(a,t),r))}),{})},cs=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=as(a,t),r))}),{})},ls=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return e}))},fs=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=Zn(t,2),o=r[0],i=r[1];return null===i?e:Gn(Gn({},e),((n={})[o]=i,n))}),{})},ds=function(e,t){return Gn(Gn(Gn({},null!=e.interpretedValue&&{interpretedValue:e.interpretedValue}),null!=e.originalValue&&{originalValue:e.originalValue}),null!=e.resolvedValues&&{resolvedValues:ls(e.resolvedValues)})},ps=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return as(e,t)}))},hs=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=Zn(t,2),o=r[0],i=r[1];return null===i?e:Gn(Gn({},e),((n={})[o]=Yo(i),n))}),{})},vs=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{contextAttributes:null!=e.contextAttributes?hs(e.contextAttributes,t):void 0,name:Yo(e.name),timeToLive:null!=e.timeToLive?ys(e.timeToLive,t):void 0}}(e,t)}))},ys=function(e,t){return{timeToLiveInSeconds:Vo(e.timeToLiveInSeconds),turnsToLive:Vo(e.turnsToLive)}},ms=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{text:Yo(e.text),value:Yo(e.value)}}(e)}))},gs=function(e,t){return{score:Zo(e.score)}},bs=function(e,t){return{slotElicitationStyle:Yo(e.slotElicitationStyle),slotToElicit:Yo(e.slotToElicit),subSlotToElicit:null!=e.subSlotToElicit?ws(e.subSlotToElicit,t):void 0,type:Yo(e.type)}},ws=function(e,t){return{name:Yo(e.name),subSlotToElicit:null!=e.subSlotToElicit?ws(e.subSlotToElicit,t):void 0}},_s=function(e,t){return{buttons:null!=e.buttons?ms(e.buttons):void 0,imageUrl:Yo(e.imageUrl),subtitle:Yo(e.subtitle),title:Yo(e.title)}},Ss=function(e,t){return{confirmationState:Yo(e.confirmationState),name:Yo(e.name),slots:null!=e.slots?Rs(e.slots,t):void 0,state:Yo(e.state)}},Es=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{intent:null!=e.intent?Ss(e.intent,t):void 0,nluConfidence:null!=e.nluConfidence?gs(e.nluConfidence):void 0,sentimentResponse:null!=e.sentimentResponse?Ts(e.sentimentResponse,t):void 0}}(e,t)}))},Os=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{content:Yo(e.content),contentType:Yo(e.contentType),imageResponseCard:null!=e.imageResponseCard?_s(e.imageResponseCard):void 0}}(e)}))},As=function(e,t){return{slotHints:null!=e.slotHints?Ms(e.slotHints,t):void 0}},xs=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{phrase:Yo(e.phrase)}}(e)}))},Ts=function(e,t){return{sentiment:Yo(e.sentiment),sentimentScore:null!=e.sentimentScore?js(e.sentimentScore,t):void 0}},js=function(e,t){return{mixed:Zo(e.mixed),negative:Zo(e.negative),neutral:Zo(e.neutral),positive:Zo(e.positive)}},Ps=function(e,t){return{activeContexts:null!=e.activeContexts?vs(e.activeContexts,t):void 0,dialogAction:null!=e.dialogAction?bs(e.dialogAction,t):void 0,intent:null!=e.intent?Ss(e.intent,t):void 0,originatingRequestId:Yo(e.originatingRequestId),runtimeHints:null!=e.runtimeHints?As(e.runtimeHints,t):void 0,sessionAttributes:null!=e.sessionAttributes?Ls(e.sessionAttributes,t):void 0}},Cs=function(e,t){return{shape:Yo(e.shape),subSlots:null!=e.subSlots?Rs(e.subSlots,t):void 0,value:null!=e.value?Us(e.value,t):void 0,values:null!=e.values?Ds(e.values,t):void 0}},Ms=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=Is(a,t),r))}),{})},Is=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=function(e,t){return{runtimeHintValues:null!=e.runtimeHintValues?xs(e.runtimeHintValues,t):void 0,subSlotHints:null!=e.subSlotHints?Is(e.subSlotHints,t):void 0}}(a,t),r))}),{})},Rs=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=Cs(a,t),r))}),{})},ks=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:Yo(e)}))},Ls=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=Zn(t,2),o=r[0],i=r[1];return null===i?e:Gn(Gn({},e),((n={})[o]=Yo(i),n))}),{})},Us=function(e,t){return{interpretedValue:Yo(e.interpretedValue),originalValue:Yo(e.originalValue),resolvedValues:null!=e.resolvedValues?ks(e.resolvedValues):void 0}},Ds=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:Cs(e,t)}))},Ns=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},Bs=function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then((function(e){return t.utf8Encoder(e)}))},Fs=function(e){return!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},zs=function(e,t){return Bs(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},qs=function(e,t){var n,r,o=function(e){var t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):void 0},Hs=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Vn(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(pa(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeV2Client",commandName:"RecognizeTextCommand",inputFilterSensitiveLog:Na,outputFilterSensitiveLog:Ba},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l;return Kn(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),r=n.hostname,o=n.protocol,i=void 0===o?"https":o,a=n.port,s=n.path,u={"content-type":"application/json"},c="".concat((null==s?void 0:s.endsWith("/"))?s.slice(0,-1):s||"")+"/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text",c=ci(c,e,"botId",(function(){return e.botId}),"{botId}",!1),c=ci(c,e,"botAliasId",(function(){return e.botAliasId}),"{botAliasId}",!1),c=ci(c,e,"localeId",(function(){return e.localeId}),"{localeId}",!1),c=ci(c,e,"sessionId",(function(){return e.sessionId}),"{sessionId}",!1),l=JSON.stringify(Gn(Gn(Gn({},null!=e.requestAttributes&&{requestAttributes:fs(e.requestAttributes,t)}),null!=e.sessionState&&{sessionState:is(e.sessionState,t)}),null!=e.text&&{text:e.text})),[2,new ur({protocol:i,hostname:r,port:a,method:"POST",headers:u,path:c,body:l})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i;return Kn(this,(function(a){switch(a.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Fa(e,t)]:(n=qa({$metadata:Ns(e)}),o=Wo,i=Ko,[4,zs(e.body,t)]);case 1:return null!=(r=o.apply(void 0,[i.apply(void 0,[a.sent()]),"body"])).interpretations&&(n.interpretations=Es(r.interpretations,t)),null!=r.messages&&(n.messages=Os(r.messages,t)),null!=r.requestAttributes&&(n.requestAttributes=Ls(r.requestAttributes,t)),null!=r.sessionId&&(n.sessionId=Yo(r.sessionId)),null!=r.sessionState&&(n.sessionState=Ps(r.sessionState,t)),[2,n]}}))}))}(e,t)},t}(Fo),Vs=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Vn(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(pa(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeV2Client",commandName:"RecognizeUtteranceCommand",inputFilterSensitiveLog:Ua,outputFilterSensitiveLog:Da},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l;return Kn(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),r=n.hostname,o=n.protocol,i=void 0===o?"https":o,a=n.port,s=n.path,u=qa({},Fs,{"x-amz-content-sha256":"UNSIGNED-PAYLOAD","content-type":e.requestContentType||"application/octet-stream","x-amz-lex-session-state":e.sessionState,"x-amz-lex-request-attributes":e.requestAttributes,"response-content-type":e.responseContentType}),c="".concat((null==s?void 0:s.endsWith("/"))?s.slice(0,-1):s||"")+"/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance",c=ci(c,e,"botId",(function(){return e.botId}),"{botId}",!1),c=ci(c,e,"botAliasId",(function(){return e.botAliasId}),"{botAliasId}",!1),c=ci(c,e,"localeId",(function(){return e.localeId}),"{localeId}",!1),c=ci(c,e,"sessionId",(function(){return e.sessionId}),"{sessionId}",!1),void 0!==e.inputStream&&(l=e.inputStream),[2,new ur({protocol:i,hostname:r,port:a,method:"POST",headers:u,path:c,body:l})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r;return Kn(this,(function(o){return 200!==e.statusCode&&e.statusCode>=300?[2,za(e,t)]:(n=qa({$metadata:Ns(e),inputMode:[,e.headers["x-amz-lex-input-mode"]],contentType:[,e.headers["content-type"]],messages:[,e.headers["x-amz-lex-messages"]],interpretations:[,e.headers["x-amz-lex-interpretations"]],sessionState:[,e.headers["x-amz-lex-session-state"]],requestAttributes:[,e.headers["x-amz-lex-request-attributes"]],sessionId:[,e.headers["x-amz-lex-session-id"]],inputTranscript:[,e.headers["x-amz-lex-input-transcript"]]}),r=e.body,n.audioStream=r,[2,n])}))}))}(e,t)},t}(Fo),Gs=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},$s=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ws=function(e){return Gs(void 0,void 0,void 0,(function(){var t,n,r;return $s(this,(function(o){switch(o.label){case 0:if(void 0===e)return[2,void 0];o.label=1;case 1:return o.trys.push([1,3,,4]),a=e,t=Uint8Array.from(window.atob(a),(function(e){return e.charCodeAt(0)})),[4,(i=t,Tn(void 0,void 0,void 0,(function(){return jn(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e,t){Sn(i,(function(n,r){n?t(n):e(xn(r))}))}))];case 1:return[2,e.sent()]}}))})))];case 2:return n=o.sent(),[2,JSON.parse(n)];case 3:return r=o.sent(),[2,Promise.reject("unable to decode and decompress "+r)];case 4:return[2]}var i,a}))}))};function Ks(e){return(Ks="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 Ys=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zs=function(){return(Zs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Xs=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Js=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Qs=new r.ConsoleLogger("AWSLexV2Provider"),eu=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._botsCompleteCallback={},n}return Ys(t,e),t.prototype.getProviderName=function(){return"AWSLexV2Provider"},t.prototype.configure=function(t){void 0===t&&(t={});var n=["name","botId","aliasId","localeId","providerName","region"];return Object.keys(t).forEach((function(e){var r=t[e];if(!n.every((function(e){return e in r})))throw new Error("invalid bot configuration")})),e.prototype.configure.call(this,t)},t.prototype.sendMessage=function(e,t){return Xs(this,void 0,void 0,(function(){var n,o,i;return Js(this,(function(a){switch(a.label){case 0:if(!this._config[e])return[2,Promise.reject("Bot "+e+" does not exist")];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r.Credentials.get()];case 2:return n=a.sent(),[3,4];case 3:return a.sent(),[2,Promise.reject("No credentials")];case 4:return this._lexRuntimeServiceV2Client=new la({region:this._config[e].region,credentials:n,customUserAgent:Object(r.getAmplifyUserAgent)()}),i={botAliasId:this._config[e].aliasId,botId:this._config[e].botId,localeId:this._config[e].localeId,sessionId:n.identityId},"string"!=typeof t?[3,6]:[4,this._handleRecognizeTextCommand(e,t,i)];case 5:return o=a.sent(),[3,8];case 6:return[4,this._handleRecognizeUtteranceCommand(e,t,i)];case 7:o=a.sent(),a.label=8;case 8:return[2,o]}}))}))},t.prototype.onComplete=function(e,t){if(!this._config[e])throw new Error("Bot "+e+" does not exist");this._botsCompleteCallback[e]=t},t.prototype._reportBotStatus=function(e,t){var n,r,o,i,a,s,u=this,c=null==e?void 0:e.sessionState;Qs.debug("postContent state",null===(n=null==c?void 0:c.intent)||void 0===n?void 0:n.state);var l="function"==typeof(null===(r=this._config)||void 0===r?void 0:r[t].onComplete),f="function"==typeof(null===(o=this._botsCompleteCallback)||void 0===o?void 0:o[t]);if((l||f)&&("ReadyForFulfillment"!==(null===(i=null==c?void 0:c.intent)||void 0===i?void 0:i.state)&&"Fulfilled"!==(null===(a=null==c?void 0:c.intent)||void 0===a?void 0:a.state)||(f&&setTimeout((function(){var n;return null===(n=u._botsCompleteCallback)||void 0===n?void 0:n[t](null,e)}),0),l&&setTimeout((function(){return u._config[t].onComplete(null,e)}),0)),"Failed"===(null===(s=null==c?void 0:c.intent)||void 0===s?void 0:s.state))){var d=new Error("Bot conversation failed");f&&setTimeout((function(){return u._botsCompleteCallback[t](d)}),0),l&&setTimeout((function(){return u._config[t].onComplete(d)}),0)}},t.prototype._formatUtteranceCommandOutput=function(e){return Xs(this,void 0,void 0,(function(){var t,n,r;return Js(this,(function(o){switch(o.label){case 0:return t=[Zs({},e)],n={},[4,Ws(e.messages)];case 1:return n.messages=o.sent(),[4,Ws(e.sessionState)];case 2:return n.sessionState=o.sent(),[4,Ws(e.interpretations)];case 3:return n.interpretations=o.sent(),[4,Ws(e.requestAttributes)];case 4:return n.requestAttributes=o.sent(),[4,Ws(e.inputTranscript)];case 5:return n.inputTranscript=o.sent(),e.audioStream?[4,Pn(e.audioStream)]:[3,7];case 6:return r=o.sent(),[3,8];case 7:r=void 0,o.label=8;case 8:return[2,Zs.apply(void 0,t.concat([(n.audioStream=r,n)]))]}}))}))},t.prototype._handleRecognizeTextCommand=function(e,t,n){return Xs(this,void 0,void 0,(function(){var r,o,i,a;return Js(this,(function(s){switch(s.label){case 0:Qs.debug("postText to lex2",t),r=Zs(Zs({},n),{text:t}),s.label=1;case 1:return s.trys.push([1,3,,4]),o=new Hs(r),[4,this._lexRuntimeServiceV2Client.send(o)];case 2:return i=s.sent(),this._reportBotStatus(i,e),[2,i];case 3:return a=s.sent(),[2,Promise.reject(a)];case 4:return[2]}}))}))},t.prototype._handleRecognizeUtteranceCommand=function(e,t,n){return Xs(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f;return Js(this,(function(d){switch(d.label){case 0:return r=t.content,o=t.options.messageType,Qs.debug("postContent to lex2",t),"voice"!==o?[3,4]:"object"!==Ks(r)?[2,Promise.reject("invalid content type")]:r instanceof Uint8Array?(s=r,[3,3]):[3,1];case 1:return[4,Pn(r)];case 2:s=d.sent(),d.label=3;case 3:return a=s,i=Zs(Zs({},n),{requestContentType:"audio/x-l16; sample-rate=16000; channel-count=1",inputStream:a}),[3,5];case 4:if("string"!=typeof r)return[2,Promise.reject("invalid content type")];i=Zs(Zs({},n),{requestContentType:"text/plain; charset=utf-8",inputStream:r}),d.label=5;case 5:return d.trys.push([5,8,,9]),u=new Vs(i),[4,this._lexRuntimeServiceV2Client.send(u)];case 6:return c=d.sent(),[4,this._formatUtteranceCommandOutput(c)];case 7:return l=d.sent(),this._reportBotStatus(l,e),[2,l];case 8:return f=d.sent(),[2,Promise.reject(f)];case 9:return[2]}}))}))},t}(a);t.default=qn},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}}])}));
|
|
85
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof g?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,o=t.subtle;return r.map((function(e){return o[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=void 0;var r=n(26),o=n(11),i=n(9),a=function(){function e(){this.crc32=new i.Crc32}return e.prototype.update=function(e){(0,o.isEmptyData)(e)||this.crc32.update((0,o.convertToBuffer)(e))},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,(0,o.numToUint8)(this.crc32.digest())]}))}))},e}();t.AwsCrc32=a},function(e,t,n){"use strict";n.r(t),n.d(t,"AbstractInteractionsProvider",(function(){return a})),n.d(t,"AWSLexProvider",(function(){return Dn})),n.d(t,"AWSLexV2Provider",(function(){return tu})),n.d(t,"Interactions",(function(){return qn}));var r=n(4),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=new r.ConsoleLogger("AbstractInteractionsProvider"),a=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=o(o({},this._config),e),i.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"Interactions"},Object.defineProperty(e.prototype,"options",{get:function(){return o({},this._config)},enumerable:!0,configurable:!0}),e}(),s=n(0),u=n(30),c=n(29),l=n(1),f=n(3),d=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,p)},p=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var h=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal,r=this.requestTimeout;if(null==n?void 0:n.aborted){var o=new Error("Request aborted");return o.name="AbortError",Promise.reject(o)}var i=e.path;if(e.query){var a=function(e){var t,n,r=[];try{for(var o=Object(l.__values)(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,s=e[a];if(a=d(a),Array.isArray(s))for(var u=0,c=s.length;u<c;u++)r.push(a+"="+d(s[u]));else{var f=a;(s||"string"==typeof s)&&(f+="="+d(s)),r.push(f)}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query);a&&(i+="?"+a)}var s=e.port,u=e.method,c=e.protocol+"//"+e.hostname+(s?":"+s:"")+i,p={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(p.signal=n);var h,v=new Request(c,p),y=[fetch(v).then((function(e){var t,n,r=e.headers,o={};try{for(var i=Object(l.__values)(r.entries()),a=i.next();!a.done;a=i.next()){var s=a.value;o[s[0]]=s[1]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new f.b({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new f.b({headers:o,statusCode:e.status,body:t})}}))})),(h=r,void 0===h&&(h=0),new Promise((function(e,t){h&&setTimeout((function(){var e=new Error("Request did not complete within "+h+" ms");e.name="TimeoutError",t(e)}),h)})))];return n&&y.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(y)},e}(),v={},y=new Array(64),m=0,g="A".charCodeAt(0),b="Z".charCodeAt(0);m+g<=b;m++){var w=String.fromCharCode(m+g);v[w]=m,y[m]=w}for(m=0,g="a".charCodeAt(0),b="z".charCodeAt(0);m+g<=b;m++){w=String.fromCharCode(m+g);var _=m+26;v[w]=_,y[_]=w}for(m=0;m<10;m++){v[m.toString(10)]=m+52;w=m.toString(10),_=m+52;v[w]=_,y[_]=w}v["+"]=62,y[62]="+",v["/"]=63,y[63]="/";function S(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var n=new ArrayBuffer(t),r=new DataView(n),o=0;o<e.length;o+=4){for(var i=0,a=0,s=o,u=o+3;s<=u;s++)"="!==e[s]?(i|=v[e[s]]<<6*(u-s),a+=6):i>>=6;var c=o/4*3;i>>=a%8;for(var l=Math.floor(a/8),f=0;f<l;f++){var d=8*(l-f-1);r.setUint8(c+f,(i&255<<d)>>d)}}return new Uint8Array(n)}function E(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var O={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},A=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var o;return Object(l.__generator)(this,(function(i){return(null===(o=null==e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=Object(l.__spread)(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}}(e),O)}}},x=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],T=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],j=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],P=[500,502,503,504],C=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||T.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},M=n(28),I=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},R=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return x.includes(e.name)}(e)||C(e)||function(e){var t;return j.includes(e.name)||P.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},k=function(){function e(e,t){var n,r,o,i,a,s,u,c;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:R,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:I,this.retryQuota=null!==(o=null==t?void 0:t.retryQuota)&&void 0!==o?o:(a=i=500,s=i,u=function(e){return"TimeoutError"===e.name?10:5},c=function(e){return u(e)<=s},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(e){if(!c(e))throw new Error("No retry token available");var t=u(e);return s-=t,t},releaseRetryTokens:function(e){s+=null!=e?e:1,s=Math.min(s,a)}}))}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Object(l.__awaiter)(this,void 0,void 0,(function(){var e;return Object(l.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t){return Object(l.__awaiter)(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c;return Object(l.__generator)(this,(function(d){switch(d.label){case 0:return r=0,o=0,[4,this.getMaxAttempts()];case 1:i=d.sent(),a=t.request,f.a.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=Object(M.v4)()),s=function(){var s,c,d,p,h;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,5]),f.a.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+i),[4,e(t)];case 1:return s=l.sent(),c=s.response,d=s.output,u.retryQuota.releaseRetryTokens(n),d.$metadata.attempts=r+1,d.$metadata.totalRetryDelay=o,[2,{value:{response:c,output:d}}];case 2:return p=l.sent(),r++,u.shouldRetry(p,r,i)?(n=u.retryQuota.retrieveRetryTokens(p),h=u.delayDecider(C(p)?500:100,r),o+=h,[4,new Promise((function(e){return setTimeout(e,h)}))]):[3,4];case 3:return l.sent(),[2,"continue"];case 4:throw p.$metadata||(p.$metadata={}),p.$metadata.attempts=r,p.$metadata.totalRetryDelay=o,p;case 5:return[2]}}))},u=this,d.label=2;case 2:return[5,s()];case 3:return"object"==typeof(c=d.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),L=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var U=n(7),D=n.n(U);var N=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),B=new Set(["cn-north-1","cn-northwest-1"]),F=new Set(["us-iso-east-1"]),z=new Set(["us-isob-east-1"]),q=new Set(["us-gov-east-1","us-gov-west-1"]);var H,V,G,$,W={apiVersion:"2016-11-28",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"ap-northeast-1":n={hostname:"runtime.lex.ap-northeast-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"ap-southeast-1":n={hostname:"runtime.lex.ap-southeast-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"ap-southeast-2":n={hostname:"runtime.lex.ap-southeast-2.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-central-1":n={hostname:"runtime.lex.eu-central-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-west-1":n={hostname:"runtime.lex.eu-west-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-west-2":n={hostname:"runtime.lex.eu-west-2.amazonaws.com",partition:"aws",signingService:"lex"};break;case"us-east-1":n={hostname:"runtime.lex.us-east-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"us-west-2":n={hostname:"runtime.lex.us-west-2.amazonaws.com",partition:"aws",signingService:"lex"};break;default:N.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws",signingService:"lex"}),B.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),F.has(e)&&(n={hostname:"runtime.lex.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),z.has(e)&&(n={hostname:"runtime.lex.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),q.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws",signingService:"lex"})}return Promise.resolve(Object(s.a)({signingService:"lex"},n))},serviceId:"Lex Runtime Service",urlParser:function(e){var t,n=new URL(e),r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,s=n.search;return s&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=Object(l.__values)(e.split("&")),i=o.next();!i.done;i=o.next()){var a=i.value,s=Object(l.__read)(a.split("="),2),u=s[0],c=s[1],f=void 0===c?null:c;u=decodeURIComponent(u),f&&(f=decodeURIComponent(f)),u in r?Array.isArray(r[u])?r[u].push(f):r[u]=[r[u],f]:r[u]=f}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(s)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}}},K=Object(s.a)(Object(s.a)({},W),{runtime:"browser",base64Decoder:S,base64Encoder:function(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var s=Math.ceil(o/6);r<<=6*s-o;for(var u=1;u<=s;u++){var c=6*(s-u);t+=y[(r&63<<c)>>c]}t+="==".slice(0,4-s)}return t},bodyLengthChecker:function(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0},credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(V={serviceId:W.serviceId,clientVersion:u.version},G=V.serviceId,$=V.clientVersion,function(){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,u;return Object(l.__generator)(this,(function(c){return e=(null===(n=null===window||void 0===window?void 0:window.navigator)||void 0===n?void 0:n.userAgent)?D.a.parse(window.navigator.userAgent):void 0,t=[["aws-sdk-js",$],["os/"+((null===(r=null==e?void 0:e.os)||void 0===r?void 0:r.name)||"other"),null===(o=null==e?void 0:e.os)||void 0===o?void 0:o.version],["lang/js"],["md/browser",(null!==(a=null===(i=null==e?void 0:e.browser)||void 0===i?void 0:i.name)&&void 0!==a?a:"unknown")+"_"+(null!==(u=null===(s=null==e?void 0:e.browser)||void 0===s?void 0:s.version)&&void 0!==u?u:"unknown")]],G&&t.push(["api/"+G,$]),[2,t]}))}))}),maxAttempts:3,region:(H="Region is missing",function(){return Promise.reject(H)}),requestHandler:new h,sha256:c.Sha256,streamCollector:function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(l.__generator)(this,(function(r){switch(r.label){case 0:return[4,E(e)];case 1:return t=r.sent(),n=S(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n,r,o,i,a,s;return Object(l.__generator)(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,u.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=u.sent(),i=o.done,(a=o.value)&&(s=t,(t=new Uint8Array(s.length+a.length)).set(s),t.set(a,s.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},utf8Encoder:function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}}),Y=function(e){var t=e.endpoint,n=e.urlParser;if("string"==typeof t){var r=Promise.resolve(n(t));return function(){return r}}if("object"==typeof t){var o=Promise.resolve(t);return function(){return o}}return t},Z=function(e){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var t,n,r,o,i;return Object(l.__generator)(this,(function(a){switch(a.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=a.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(r)];case 2:if(!(o=(null!==(i=a.sent())&&void 0!==i?i:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},X=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var J={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Q=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return Object(l.__awaiter)(t,void 0,void 0,(function(){var t,o,i,a,s;return Object(l.__generator)(this,(function(u){return t=r.request,f.a.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(a=e(o))&&(t.headers=Object(l.__assign)(Object(l.__assign)({},t.headers),((s={})["content-length"]=String(a),s)))),[2,n(Object(l.__assign)(Object(l.__assign)({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),J)}}};for(var ee={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},te=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var r,o;return Object(l.__generator)(this,(function(i){return f.a.isInstance(n.request)?(r=n.request,o=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===o?"":o).indexOf("h2")>=0&&!r.headers[":authority"]?(delete r.headers.host,r.headers[":authority"]=""):r.headers.host||(r.headers.host=r.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),ee)}}},ne={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},re=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var r,o,i,a,s,u,c,f,d;return Object(l.__generator)(this,(function(p){switch(p.label){case 0:return r=t.clientName,o=t.commandName,i=t.inputFilterSensitiveLog,a=t.logger,s=t.outputFilterSensitiveLog,[4,e(n)];case 1:return u=p.sent(),a?("function"==typeof a.info&&(c=u.output,f=c.$metadata,d=Object(l.__rest)(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:s(d),metadata:f})),[2,u]):[2,u]}}))}))}}),ne)}}},oe={},ie={},ae=0;ae<256;ae++){var se=ae.toString(16).toLowerCase();1===se.length&&(se="0"+se),oe[ae]=se,ie[se]=ae}function ue(e){for(var t="",n=0;n<e.byteLength;n++)t+=oe[e[n]];return t}var ce="X-Amz-Date".toLowerCase(),le=["authorization",ce,"date"],fe="X-Amz-Signature".toLowerCase(),de="X-Amz-Security-Token".toLowerCase(),pe={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},he=/^proxy-/,ve=/^sec-/,ye="AWS4-HMAC-SHA256-PAYLOAD",me={},ge=[];function be(e,t,n){return e+"/"+t+"/"+n+"/aws4_request"}function we(e,t,n){var r=new e(t);return r.update(n),r.digest()}function _e(e,t,n){var r,o,i=e.headers,a={};try{for(var s=Object(l.__values)(Object.keys(i).sort()),u=s.next();!u.done;u=s.next()){var c=u.value,f=c.toLowerCase();(f in pe||(null==t?void 0:t.has(f))||he.test(f)||ve.test(f))&&(!n||n&&!n.has(f))||(a[f]=i[c].trim().replace(/\s+/g," "))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return a}var Se=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Ee)},Ee=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function Oe(e,t){var n=e.headers,r=e.body;return Object(l.__awaiter)(this,void 0,void 0,(function(){var e,o,i,a,s,u,c;return Object(l.__generator)(this,(function(f){switch(f.label){case 0:try{for(e=Object(l.__values)(Object.keys(n)),o=e.next();!o.done;o=e.next())if("x-amz-content-sha256"===(i=o.value).toLowerCase())return[2,n[i]]}catch(e){u={error:e}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(d=r,"function"==typeof ArrayBuffer&&d instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(d))?((a=new t).update(r),s=ue,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var d}))}))}function Ae(e){var t=e.headers,n=e.query,r=Object(l.__rest)(e,["headers","query"]);return Object(l.__assign)(Object(l.__assign)({},r),{headers:Object(l.__assign)({},t),query:n?xe(n):void 0})}function xe(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return Object(l.__assign)(Object(l.__assign)({},t),((r={})[n]=Array.isArray(o)?Object(l.__spread)(o):o,r))}),{})}function Te(e){var t,n;e="function"==typeof e.clone?e.clone():Ae(e);try{for(var r=Object(l.__values)(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;le.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function je(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var Pe=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=Ie(r),this.credentialProvider=Re(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(l.__awaiter)(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,d,p,h,v,y,m,g,b,w,_,S,E,O,A,x;return Object(l.__generator)(this,(function(T){switch(T.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,c=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return d=T.sent(),null==c?[3,2]:(h=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:h=T.sent(),T.label=4;case 4:return p=h,v=Ce(r),y=v.longDate,m=v.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(g=be(m,p,null!=f?f:this.service),b=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"==typeof e.clone?e.clone():Ae(e),a=i.headers,s=i.query,u=void 0===s?{}:s;try{for(var c=Object(l.__values)(Object.keys(a)),f=c.next();!f.done;f=c.next()){var d=f.value,p=d.toLowerCase();"x-amz-"!==p.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(p))||(u[d]=a[d],delete a[d])}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Object(l.__assign)(Object(l.__assign)({},e),{headers:a,query:u})}(Te(e),{unhoistableHeaders:s}),d.sessionToken&&(b.query["X-Amz-Security-Token"]=d.sessionToken),b.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",b.query["X-Amz-Credential"]=d.accessKeyId+"/"+g,b.query["X-Amz-Date"]=y,b.query["X-Amz-Expires"]=i.toString(10),w=_e(b,a,u),b.query["X-Amz-SignedHeaders"]=Me(w),_=b.query,S="X-Amz-Signature",E=this.getSignature,O=[y,g,this.getSigningKey(d,p,m,f)],A=this.createCanonicalRequest,x=[b,w],[4,Oe(e,this.sha256)]);case 5:return[4,E.apply(this,O.concat([A.apply(this,x.concat([T.sent()]))]))];case 6:return _[S]=T.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return Object(l.__awaiter)(this,void 0,void 0,(function(){return Object(l.__generator)(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,r=e.payload,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return Object(l.__awaiter)(this,void 0,void 0,(function(){var e,t,o,c,f,d,p,h,v,y,m;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=l.sent(),l.label=3;case 3:return e=t,o=Ce(i),c=o.shortDate,f=o.longDate,d=be(c,e,null!=u?u:this.service),[4,Oe({headers:{},body:r},this.sha256)];case 4:return p=l.sent(),(h=new this.sha256).update(n),y=ue,[4,h.digest()];case 5:return v=y.apply(void 0,[l.sent()]),m=[ye,f,d,a,v,p].join("\n"),[2,this.signString(m,{signingDate:i,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n,r,s,u,c,f,d;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return[4,this.credentialProvider()];case 1:return t=l.sent(),null==i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=l.sent(),l.label=4;case 4:return n=r,s=Ce(o).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,n,s,a)];case 5:return(u=new(f.apply(c,[void 0,l.sent()]))).update(e),d=ue,[4,u.digest()];case 6:return[2,d.apply(void 0,[l.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,s=n.signingRegion,u=n.signingService;return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n,r,c,f,d,p,h,v,y,m;return Object(l.__generator)(this,(function(g){switch(g.label){case 0:return[4,this.credentialProvider()];case 1:return t=g.sent(),null==s?[3,2]:(r=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=g.sent(),g.label=4;case 4:return n=r,c=Te(e),f=Ce(o),d=f.longDate,p=f.shortDate,h=be(p,n,null!=u?u:this.service),c.headers[ce]=d,t.sessionToken&&(c.headers[de]=t.sessionToken),[4,Oe(c,this.sha256)];case 5:return v=g.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=Object(l.__values)(Object.keys(t)),i=o.next();!i.done;i=o.next()){if(e===i.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=v),y=_e(c,a,i),[4,this.getSignature(d,h,this.getSigningKey(t,n,p,u),this.createCanonicalRequest(c,y,v))];case 6:return m=g.sent(),c.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+h+", SignedHeaders="+Me(y)+", Signature="+m,[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var r=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,n,r=e.query,o=void 0===r?{}:r,i=[],a={},s=function(e){if(e.toLowerCase()===fe)return"continue";i.push(e);var t=o[e];"string"==typeof t?a[e]=Se(e)+"="+Se(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([Se(e)+"="+Se(n)])}),[]).join("&"))};try{for(var u=Object(l.__values)(Object.keys(o).sort()),c=u.next();!c.done;c=u.next()){s(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return i.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+r.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+r.join(";")+"\n"+n},e.prototype.createStringToSign=function(e,t,n){return Object(l.__awaiter)(this,void 0,void 0,(function(){var r,o;return Object(l.__generator)(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+ue(o)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,n,r){return Object(l.__awaiter)(this,void 0,void 0,(function(){var o,i,a,s,u;return Object(l.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),s=(a=this.sha256).bind,[4,n];case 2:return(i=new(s.apply(a,[void 0,c.sent()]))).update(o),u=ue,[4,i.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var i,a,s,u,c,f,d,p,h;return Object(l.__generator)(this,(function(v){switch(v.label){case 0:return[4,we(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=v.sent(),(a=n+":"+r+":"+o+":"+ue(i)+":"+t.sessionToken)in me)return[2,me[a]];for(ge.push(a);ge.length>50;)delete me[ge.shift()];s="AWS4"+t.secretAccessKey,v.label=2;case 2:v.trys.push([2,7,8,9]),u=Object(l.__values)([n,r,o,"aws4_request"]),c=u.next(),v.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,we(e,s,f)]);case 4:s=v.sent(),v.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return d=v.sent(),p={error:d},[3,9];case 8:try{c&&!c.done&&(h=u.return)&&h.call(u)}finally{if(p)throw p.error}return[7];case 9:return[2,me[a]=s]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Ce=function(e){var t=je(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},Me=function(e){return Object.keys(e).sort().join(";")},Ie=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Re=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function ke(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var Le=function(e){return new Date(Date.now()+e)};function Ue(e){return function(t,n){return function(r){return Object(l.__awaiter)(this,void 0,void 0,(function(){var o,i,a,s,u,c,d,p,h;return Object(l.__generator)(this,(function(v){switch(v.label){case 0:return f.a.isInstance(r.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return i=v.sent(),[3,3];case 2:i=e.signer,v.label=3;case 3:return o=i,s=t,u=[Object(l.__assign)({},r)],h={},[4,o.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,s.apply(void 0,[l.__assign.apply(void 0,u.concat([(h.request=v.sent(),h)]))])];case 5:return a=v.sent(),c=a.response.headers,(d=c&&(c.date||c.Date))&&(p=Date.parse(d),y=p,m=e.systemClockOffset,Math.abs(Le(m).getTime()-y)>=3e5&&(e.systemClockOffset=p-Date.now())),[2,a]}var y,m}))}))}}}var De={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var Ne,Be,Fe,ze,qe,He,Ve,Ge,$e,We,Ke,Ye,Ze,Xe,Je,Qe,et,tt,nt,rt,ot,it,at,st,ut,ct,lt,ft,dt,pt,ht,vt,yt,mt,gt,bt,wt,_t=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,St=function(e){var t=Object(l.__read)(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(_t,"_")})).join("/")},Et={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Ot=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var o,i,a,s,u,c,d,p;return Object(l.__generator)(this,(function(h){switch(h.label){case 0:return o=r.request,f.a.isInstance(o)?(i=o.headers,a=(null===(d=null==t?void 0:t.userAgent)||void 0===d?void 0:d.map(St))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return s=h.sent().map(St),u=(null===(p=null==n?void 0:n.customUserAgent)||void 0===p?void 0:p.map(St))||[],i["x-amz-user-agent"]=Object(l.__spread)(s,a,u).join(" "),c=Object(l.__spread)(s.filter((function(e){return e.startsWith("aws-sdk-")})),u).join(" "),"browser"!==n.runtime&&c&&(i["user-agent"]=i["user-agent"]?i["user-agent"]+" "+c:c),[2,e(Object(l.__assign)(Object(l.__assign)({},r),{request:o}))]}}))}))}}),Et)}}},At=n(2),xt=function(e){function t(t){var n,r,o,i=this,a=function(e){var t,n=this,r=ke(e.credentials||e.credentialDefaultProvider(e)),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,s=void 0===a?e.systemClockOffset||0:a,u=e.sha256;return t=e.signer?ke(e.signer):function(){return ke(e.region)().then((function(t){return Object(l.__awaiter)(n,void 0,void 0,(function(){return Object(l.__generator)(this,(function(n){switch(n.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[n.sent()||{},t]]}}))}))})).then((function(t){var n=Object(l.__read)(t,2),o=n[0],a=n[1],s=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||s||a,e.signingName=e.signingName||c||e.serviceId,new Pe({credentials:r,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:i})}))},Object(l.__assign)(Object(l.__assign)({},e),{systemClockOffset:s,signingEscapePath:i,credentials:r,signer:t})}(function(e){var t;return Object(l.__assign)(Object(l.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Y(e):function(){return Z(e)},isCustomEndpoint:!!e.endpoint})}(function(e){if(!e.region)throw new Error("Region is missing");return Object(l.__assign)(Object(l.__assign)({},e),{region:X(e.region)})}(Object(s.a)(Object(s.a)({},K),t)))),u=function(e){return Object(l.__assign)(Object(l.__assign)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}((r=L((n=a).maxAttempts),Object(l.__assign)(Object(l.__assign)({},n),{maxAttempts:r,retryStrategy:n.retryStrategy||new k(r)})));return(i=e.call(this,u)||this).config=u,i.middlewareStack.use((o=i.config,{applyToStack:function(e){e.addRelativeTo(Ue(o),De)}})),i.middlewareStack.use(A(i.config)),i.middlewareStack.use(Q(i.config)),i.middlewareStack.use(te(i.config)),i.middlewareStack.use(re(i.config)),i.middlewareStack.use(Ot(i.config)),i}return Object(s.c)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(At.a);(Ne||(Ne={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(Be||(Be={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)({},e),e.parameters&&{parameters:At.d})},(Fe||(Fe={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(ze||(ze={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(qe||(qe={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(He||(He={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(Ve||(Ve={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(Ge||(Ge={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},($e||($e={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(We||(We={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},function(e){e.FAILED="Failed",e.FULFILLED="Fulfilled",e.READY_FOR_FULFILLMENT="ReadyForFulfillment"}(Ke||(Ke={})),function(e){e.COMPOSITE="Composite",e.CUSTOM_PAYLOAD="CustomPayload",e.PLAIN_TEXT="PlainText",e.SSML="SSML"}(Ye||(Ye={})),function(e){e.CLOSE="Close",e.CONFIRM_INTENT="ConfirmIntent",e.DELEGATE="Delegate",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot"}(Ze||(Ze={})),(Xe||(Xe={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)({},e),e.slots&&{slots:At.d}),e.message&&{message:At.d})},function(e){e.CONFIRMED="Confirmed",e.DENIED="Denied",e.NONE="None"}(Je||(Je={})),(Qe||(Qe={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)({},e),e.slots&&{slots:At.d})},(et||(et={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.recentIntentSummaryView&&{recentIntentSummaryView:e.recentIntentSummaryView.map((function(e){return Qe.filterSensitiveLog(e)}))}),e.sessionAttributes&&{sessionAttributes:At.d}),e.dialogAction&&{dialogAction:Xe.filterSensitiveLog(e.dialogAction)}),e.activeContexts&&{activeContexts:At.d})},(tt||(tt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(nt||(nt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(rt||(rt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(ot||(ot={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(it||(it={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.sessionAttributes&&{sessionAttributes:At.d}),e.requestAttributes&&{requestAttributes:At.d}),e.activeContexts&&{activeContexts:At.d})},function(e){e.CONFIRM_INTENT="ConfirmIntent",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot",e.FAILED="Failed",e.FULFILLED="Fulfilled",e.READY_FOR_FULFILLMENT="ReadyForFulfillment"}(at||(at={})),(st||(st={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)({},e),e.message&&{message:At.d}),e.activeContexts&&{activeContexts:At.d})},(ut||(ut={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(ct||(ct={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(lt||(lt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.sessionAttributes&&{sessionAttributes:At.d}),e.requestAttributes&&{requestAttributes:At.d}),e.inputText&&{inputText:At.d}),e.activeContexts&&{activeContexts:At.d})},(ft||(ft={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(dt||(dt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)({},e),e.slots&&{slots:At.d})},function(e){e.GENERIC="application/vnd.amazonaws.card.generic"}(pt||(pt={})),(ht||(ht={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(vt||(vt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(yt||(yt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(mt||(mt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(gt||(gt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.alternativeIntents&&{alternativeIntents:e.alternativeIntents.map((function(e){return dt.filterSensitiveLog(e)}))}),e.slots&&{slots:At.d}),e.sessionAttributes&&{sessionAttributes:At.d}),e.message&&{message:At.d}),e.activeContexts&&{activeContexts:At.d})},(bt||(bt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.sessionAttributes&&{sessionAttributes:At.d}),e.dialogAction&&{dialogAction:Xe.filterSensitiveLog(e.dialogAction)}),e.recentIntentSummaryView&&{recentIntentSummaryView:e.recentIntentSummaryView.map((function(e){return Qe.filterSensitiveLog(e)}))}),e.activeContexts&&{activeContexts:At.d})},(wt||(wt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)({},e),e.message&&{message:At.d}),e.activeContexts&&{activeContexts:At.d})};var Tt=n(8),jt={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Pt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ct(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var o,i;return Object(l.__generator)(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:return o=a.sent().response,[4,t(o,e)];case 2:return i=a.sent(),[2,{response:o,output:i}]}}))}))}}}(e,n),jt),r.add(function(e,t){return function(n,r){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var o;return Object(l.__generator)(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(Object(l.__assign)(Object(l.__assign)({},r),{request:o}))]}}))}))}}}(e,t),Pt)}}}var Mt=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Object(s.c)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(Ct(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeServiceClient",commandName:"PostTextCommand",inputFilterSensitiveLog:lt.filterSensitiveLog,outputFilterSensitiveLog:gt.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return Object(Tt.d)(e,t)},t.prototype.deserialize=function(e,t){return Object(Tt.b)(e,t)},t}(At.b),It=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Object(s.c)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(Ct(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeServiceClient",commandName:"PostContentCommand",inputFilterSensitiveLog:it.filterSensitiveLog,outputFilterSensitiveLog:st.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return Object(Tt.c)(e,t)},t.prototype.deserialize=function(e,t){return Object(Tt.a)(e,t)},t}(At.b),Rt={},kt=Uint8Array,Lt=Uint16Array,Ut=Uint32Array,Dt=new kt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Nt=new kt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Bt=new kt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ft=function(e,t){for(var n=new Lt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var o=new Ut(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)o[i]=i-n[r]<<5|r;return[n,o]},zt=Ft(Dt,2),qt=zt[0],Ht=zt[1];qt[28]=258,Ht[258]=28;for(var Vt=Ft(Nt,0),Gt=Vt[0],$t=(Vt[1],new Lt(32768)),Wt=0;Wt<32768;++Wt){var Kt=(43690&Wt)>>>1|(21845&Wt)<<1;Kt=(61680&(Kt=(52428&Kt)>>>2|(13107&Kt)<<2))>>>4|(3855&Kt)<<4,$t[Wt]=((65280&Kt)>>>8|(255&Kt)<<8)>>>1}var Yt=function(e,t,n){for(var r=e.length,o=0,i=new Lt(t);o<r;++o)e[o]&&++i[e[o]-1];var a,s=new Lt(t);for(o=0;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;if(n){a=new Lt(1<<t);var u=15-t;for(o=0;o<r;++o)if(e[o])for(var c=o<<4|e[o],l=t-e[o],f=s[e[o]-1]++<<l,d=f|(1<<l)-1;f<=d;++f)a[$t[f]>>>u]=c}else for(a=new Lt(r),o=0;o<r;++o)e[o]&&(a[o]=$t[s[e[o]-1]++]>>>15-e[o]);return a},Zt=new kt(288);for(Wt=0;Wt<144;++Wt)Zt[Wt]=8;for(Wt=144;Wt<256;++Wt)Zt[Wt]=9;for(Wt=256;Wt<280;++Wt)Zt[Wt]=7;for(Wt=280;Wt<288;++Wt)Zt[Wt]=8;var Xt=new kt(32);for(Wt=0;Wt<32;++Wt)Xt[Wt]=5;var Jt=Yt(Zt,9,1),Qt=Yt(Xt,5,1),en=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},tn=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},nn=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},rn=function(e){return(e+7)/8|0},on=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?Lt:4==e.BYTES_PER_ELEMENT?Ut:kt)(n-t);return r.set(e.subarray(t,n)),r},an=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],sn=function(e,t,n){var r=new Error(t||an[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,sn),!n)throw r;return r},un=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new kt(0);var o=!t||n,i=!n||n.i;n||(n={}),t||(t=new kt(3*r));var a=function(e){var n=t.length;if(e>n){var r=new kt(Math.max(2*n,e));r.set(t),t=r}},s=n.f||0,u=n.p||0,c=n.b||0,l=n.l,f=n.d,d=n.m,p=n.n,h=8*r;do{if(!l){s=tn(e,u,1);var v=tn(e,u+1,3);if(u+=3,!v){var y=e[(T=rn(u)+4)-4]|e[T-3]<<8,m=T+y;if(m>r){i&&sn(0);break}o&&a(c+y),t.set(e.subarray(T,m),c),n.b=c+=y,n.p=u=8*m,n.f=s;continue}if(1==v)l=Jt,f=Qt,d=9,p=5;else if(2==v){var g=tn(e,u,31)+257,b=tn(e,u+10,15)+4,w=g+tn(e,u+5,31)+1;u+=14;for(var _=new kt(w),S=new kt(19),E=0;E<b;++E)S[Bt[E]]=tn(e,u+3*E,7);u+=3*b;var O=en(S),A=(1<<O)-1,x=Yt(S,O,1);for(E=0;E<w;){var T,j=x[tn(e,u,A)];if(u+=15&j,(T=j>>>4)<16)_[E++]=T;else{var P=0,C=0;for(16==T?(C=3+tn(e,u,3),u+=2,P=_[E-1]):17==T?(C=3+tn(e,u,7),u+=3):18==T&&(C=11+tn(e,u,127),u+=7);C--;)_[E++]=P}}var M=_.subarray(0,g),I=_.subarray(g);d=en(M),p=en(I),l=Yt(M,d,1),f=Yt(I,p,1)}else sn(1);if(u>h){i&&sn(0);break}}o&&a(c+131072);for(var R=(1<<d)-1,k=(1<<p)-1,L=u;;L=u){var U=(P=l[nn(e,u)&R])>>>4;if((u+=15&P)>h){i&&sn(0);break}if(P||sn(2),U<256)t[c++]=U;else{if(256==U){L=u,l=null;break}var D=U-254;if(U>264){var N=Dt[E=U-257];D=tn(e,u,(1<<N)-1)+qt[E],u+=N}var B=f[nn(e,u)&k],F=B>>>4;B||sn(3),u+=15&B;I=Gt[F];if(F>3){N=Nt[F];I+=nn(e,u)&(1<<N)-1,u+=N}if(u>h){i&&sn(0);break}o&&a(c+131072);for(var z=c+D;c<z;c+=4)t[c]=t[c-I],t[c+1]=t[c+1-I],t[c+2]=t[c+2-I],t[c+3]=t[c+3-I];c=z}}n.l=l,n.p=L,n.b=c,n.f=s,l&&(s=1,n.m=d,n.d=f,n.n=p)}while(!s);return c==t.length?t:on(t,0,c)},cn=new kt(0),ln=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},fn=function(e,t,n){for(var r=e(),o=e.toString(),i=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<r.length;++a){var s=r[a],u=i[a];if("function"==typeof s){t+=";"+u+"=";var c=s.toString();if(s.prototype)if(-1!=c.indexOf("[native code]")){var l=c.indexOf(" ",8)+1;t+=c.slice(l,c.indexOf("(",l))}else for(var f in t+=c,s.prototype)t+=";"+u+".prototype."+f+"="+s.prototype[f].toString();else t+=c}else n[u]=s}return[t,n]},dn=[],pn=function(e,t,n,r){var o;if(!dn[n]){for(var i="",a={},s=e.length-1,u=0;u<s;++u)i=(o=fn(e[u],i,a))[0],a=o[1];dn[n]=fn(e[s],i,a)}var c=ln({},dn[n][1]);return function(e,t,n,r,o){var i=new Worker(Rt[t]||(Rt[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return i.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],o(r,null)}else o(null,t)},i.postMessage(n,r),i}(dn[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,c,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(c),r)},hn=function(){return[kt,Lt,Ut,Dt,Nt,Bt,qt,Gt,Jt,Qt,$t,an,Yt,en,tn,nn,rn,on,sn,un,_n,yn,mn]},vn=function(){return[bn,wn]},yn=function(e){return postMessage(e,[e.buffer])},mn=function(e){return e&&e.size&&new kt(e.size)},gn=function(e,t,n,r,o,i){var a=pn(n,r,o,(function(e,t){a.terminate(),i(e,t)}));return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},bn=function(e){31==e[0]&&139==e[1]&&8==e[2]||sn(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},wn=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0};function _n(e,t){return un(e,t)}function Sn(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&sn(7),gn(e,t,[hn,vn,function(){return[En]}],(function(e){return yn(En(e.data[0]))}),3,n)}function En(e,t){return un(e.subarray(bn(e),-8),t||new kt(wn(e)))}var On="undefined"!=typeof TextDecoder&&new TextDecoder;try{On.decode(cn,{stream:!0}),1}catch(e){}var An=function(e){for(var t="",n=0;;){var r=e[n++],o=(r>127)+(r>223)+(r>239);if(n+o>e.length)return[t,on(e,n-1)];o?3==o?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&o?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}};function xn(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(On)return On.decode(e);var o=An(e),i=o[0];return o[1].length&&sn(8),i}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;var Tn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},jn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Pn=function(e){return Tn(void 0,void 0,void 0,(function(){return jn(this,(function(t){return e instanceof Blob||e instanceof ReadableStream?[2,new Response(e).arrayBuffer().then((function(e){return new Uint8Array(e)}))]:[2,Promise.reject("Invalid content type")]}))}))};function Cn(e){return(Cn="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 Mn,In=(Mn=function(e,t){return(Mn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Mn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Rn=function(){return(Rn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},kn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ln=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Un=new r.ConsoleLogger("AWSLexProvider"),Dn=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._botsCompleteCallback={},n}return In(t,e),t.prototype.getProviderName=function(){return"AWSLexProvider"},t.prototype.configure=function(t){void 0===t&&(t={});var n=["name","alias","region"];return Object.keys(t).forEach((function(e){var r=t[e];if(!n.every((function(e){return e in r})))throw new Error("invalid bot configuration")})),e.prototype.configure.call(this,t)},t.prototype.reportBotStatus=function(e,t){var n=this;Un.debug("postContent state",e.dialogState),"ReadyForFulfillment"!==e.dialogState&&"Fulfilled"!==e.dialogState||("function"==typeof this._botsCompleteCallback[t]&&setTimeout((function(){return n._botsCompleteCallback[t](null,e)}),0),this._config&&"function"==typeof this._config[t].onComplete&&setTimeout((function(){return n._config[t].onComplete(null,e)}),0)),"Failed"===e.dialogState&&("function"==typeof this._botsCompleteCallback[t]&&setTimeout((function(){return n._botsCompleteCallback[t]("Bot conversation failed")}),0),this._config&&"function"==typeof this._config[t].onComplete&&setTimeout((function(){return n._config[t].onComplete("Bot conversation failed")}),0))},t.prototype.sendMessage=function(e,t){return kn(this,void 0,void 0,(function(){var n,o,i,a,s,u,c,l,f,d,p,h,v;return Ln(this,(function(y){switch(y.label){case 0:if(!this._config[e])return[2,Promise.reject("Bot "+e+" does not exist")];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,r.Credentials.get()];case 2:return n=y.sent(),[3,4];case 3:return y.sent(),[2,Promise.reject("No credentials")];case 4:if(this.lexRuntimeServiceClient=new xt({region:this._config[e].region,credentials:n,customUserAgent:Object(r.getAmplifyUserAgent)()}),"string"!=typeof t)return[3,9];o={botAlias:this._config[e].alias,botName:e,inputText:t,userId:n.identityId},Un.debug("postText to lex",t),y.label=5;case 5:return y.trys.push([5,7,,8]),i=new Mt(o),[4,this.lexRuntimeServiceClient.send(i)];case 6:return f=y.sent(),this.reportBotStatus(f,e),[2,f];case 7:return a=y.sent(),[2,Promise.reject(a)];case 8:return[3,21];case 9:return s=t.content,"voice"!==t.options.messageType?[3,13]:"object"!==Cn(s)?[2,Promise.reject("invalid content type")]:s instanceof Uint8Array?(c=s,[3,12]):[3,10];case 10:return[4,Pn(s)];case 11:c=y.sent(),y.label=12;case 12:return u=c,o={botAlias:this._config[e].alias,botName:e,contentType:"audio/x-l16; sample-rate=16000; channel-count=1",userId:n.identityId,accept:"audio/mpeg",inputStream:u},[3,14];case 13:if("string"!=typeof s)return[2,Promise.reject("invalid content type")];o={botAlias:this._config[e].alias,botName:e,contentType:"text/plain; charset=utf-8",inputStream:s,userId:n.identityId,accept:"audio/mpeg"},y.label=14;case 14:Un.debug("postContent to lex",t),y.label=15;case 15:return y.trys.push([15,20,,21]),l=new It(o),[4,this.lexRuntimeServiceClient.send(l)];case 16:return(f=y.sent()).audioStream?[4,Pn(f.audioStream)]:[3,18];case 17:return p=y.sent(),[3,19];case 18:p=void 0,y.label=19;case 19:return d=p,h=Rn(Rn({},f),{audioStream:d}),this.reportBotStatus(h,e),[2,h];case 20:return v=y.sent(),[2,Promise.reject(v)];case 21:return[2]}}))}))},t.prototype.onComplete=function(e,t){if(!this._config[e])throw new Error("Bot "+e+" does not exist");this._botsCompleteCallback[e]=t},t}(a),Nn=function(){return(Nn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Bn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Fn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},zn=new r.ConsoleLogger("Interactions"),qn=new(function(){function e(e){void 0===e&&(e={}),this._options=e,zn.debug("Interactions Options",this._options),this._pluggables={}}return e.prototype.getModuleName=function(){return"Interactions"},e.prototype.configure=function(e){var t=this,n=e?e.Interactions||e:{};zn.debug("configure Interactions",{opt:n}),this._options=Nn(Nn({bots:{}},n),n.Interactions);var r=this._options.aws_bots_config,o=this._options.bots;return!Object.keys(o).length&&r&&Array.isArray(r)&&r.forEach((function(e){t._options.bots[e.name]=e})),Object.keys(o).forEach((function(e){var n,r=o[e],i=r.providerName||"AWSLexProvider";t._pluggables.AWSLexProvider||"AWSLexProvider"!==i||(t._pluggables.AWSLexProvider=new Dn),t._pluggables[i]?t._pluggables[i].configure(((n={})[r.name]=r,n)):zn.debug("bot "+r.name+" was not configured as "+i+" provider was not found")})),this._options},e.prototype.addPluggable=function(e){var t=this;if(e&&"Interactions"===e.getCategory()){if(this._pluggables[e.getProviderName()])throw new Error("Pluggable "+e.getProviderName()+" already plugged");return Object.keys(this._options.bots).filter((function(n){return t._options.bots[n].providerName===e.getProviderName()})).forEach((function(n){var r,o=t._options.bots[n];e.configure(((r={})[o.name]=o,r))})),void(this._pluggables[e.getProviderName()]=e)}},e.prototype.send=function(e,t){return Bn(this,void 0,void 0,(function(){var n;return Fn(this,(function(r){switch(r.label){case 0:return this._options.bots&&this._options.bots[e]?(n=this._options.bots[e].providerName||"AWSLexProvider",this._pluggables[n]?[4,this._pluggables[n].sendMessage(e,t)]:[2,Promise.reject("Bot "+n+" does not have valid pluggin did you try addPluggable first?")]):[2,Promise.reject("Bot "+e+" does not exist")];case 1:return[2,r.sent()]}}))}))},e.prototype.onComplete=function(e,t){if(!this._options.bots||!this._options.bots[e])throw new Error("Bot "+e+" does not exist");var n=this._options.bots[e].providerName||"AWSLexProvider";if(!this._pluggables[n])throw new Error("Bot "+n+" does not have valid pluggin did you try addPluggable first?");this._pluggables[n].onComplete(e,t)},e}());r.Amplify.register(qn);var Hn=function(e,t){return(Hn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Vn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Hn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Gn=function(){return(Gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function $n(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Wn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Kn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function Yn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Zn(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Xn(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function Jn(e){return this instanceof Jn?(this.v=e,this):new Jn(e)}function Qn(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof Jn?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function er(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Yn(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}var tr;Object.create;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(tr||(tr={}));var nr=function(e){if("function"==typeof e)return e;var t=Promise.resolve(e);return function(){return t}},rr=function(e){var t,n=nr(e.useDualstackEndpoint),r=e.endpoint,o=e.useFipsEndpoint,i=e.urlParser;return Gn(Gn({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:r?nr("string"==typeof r?i(r):r):function(){return function(e){return Wn(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,s;return Kn(this,(function(u){switch(u.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=u.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");return[4,e.useDualstackEndpoint()];case 2:return o=u.sent(),[4,e.useFipsEndpoint()];case 3:return i=u.sent(),[4,e.regionInfoProvider(r,{useDualstackEndpoint:o,useFipsEndpoint:i})];case 4:if(!(a=(null!==(s=u.sent())&&void 0!==s?s:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser("".concat(n?"https:":"http:","//").concat(a))]}}))}))}(Gn(Gn({},e),{useDualstackEndpoint:n,useFipsEndpoint:o}))},isCustomEndpoint:!!r,useDualstackEndpoint:n})},or=function(e){return"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},ir=function(e){return or(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e},ar=function(e,t){var n;void 0===e&&(e=[]);var r=t.useFipsEndpoint,o=t.useDualstackEndpoint;return null===(n=e.find((function(e){var t=e.tags;return r===t.includes("fips")&&o===t.includes("dualstack")})))||void 0===n?void 0:n.hostname},sr=function(e,t){var n,r,o,i,a,s,u=t.useFipsEndpoint,c=void 0!==u&&u,l=t.useDualstackEndpoint,f=void 0!==l&&l,d=t.signingService,p=t.regionHash,h=t.partitionHash,v=function(e,t){var n,r=t.partitionHash;return null!==(n=Object.keys(r||{}).find((function(t){return r[t].regions.includes(e)})))&&void 0!==n?n:"aws"}(e,{partitionHash:h}),y=e in p?e:null!==(r=null===(n=h[v])||void 0===n?void 0:n.endpoint)&&void 0!==r?r:e,m={useFipsEndpoint:c,useDualstackEndpoint:f},g=function(e,t){var n=t.regionHostname,r=t.partitionHostname;return n||(r?r.replace("{region}",e):void 0)}(y,{regionHostname:ar(null===(o=p[y])||void 0===o?void 0:o.variants,m),partitionHostname:ar(null===(i=h[v])||void 0===i?void 0:i.variants,m)});if(void 0===g)throw new Error("Endpoint resolution failed for: ".concat({resolvedRegion:y,useFipsEndpoint:c,useDualstackEndpoint:f}));var b=function(e,t){var n=t.signingRegion,r=t.regionRegex,o=t.useFipsEndpoint;if(n)return n;if(o){var i=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),a=e.match(i);if(a)return a[0].slice(1,-1)}}(g,{signingRegion:null===(a=p[y])||void 0===a?void 0:a.signingRegion,regionRegex:h[v].regionRegex,useFipsEndpoint:c});return Gn(Gn({partition:v,signingService:d,hostname:g},b&&{signingRegion:b}),(null===(s=p[y])||void 0===s?void 0:s.signingService)&&{signingService:p[y].signingService})},ur=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Gn(Gn({},this),{headers:Gn({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return Gn(Gn({},e),((r={})[n]=Array.isArray(o)?Xn([],Zn(o),!1):o,r))}),{}))),n},e}();var cr=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}();var lr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fr=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return Wn(t,void 0,void 0,(function(){var t,o,i,a,s;return Kn(this,(function(u){if(t=r.request,ur.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf("content-length")))try{a=e(o),t.headers=Gn(Gn({},t.headers),((s={})["content-length"]=String(a),s))}catch(e){}return[2,n(Gn(Gn({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),lr)}}};var dr=function(){return(dr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.create;function pr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}Object.create;!function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(dr(dr({},this),{headers:dr({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return dr(dr({},e),((r={})[n]=Array.isArray(o)?function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],pr(o),!1):o,r))}),{}))),n}}();!function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}();var hr,vr={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},yr=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Wn(void 0,void 0,void 0,(function(){var r,o;return Kn(this,(function(i){return ur.isInstance(n.request)?(r=n.request,o=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===o?"":o).indexOf("h2")>=0&&!r.headers[":authority"]?(delete r.headers.host,r.headers[":authority"]=""):r.headers.host||(r.headers.host=r.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),vr)}}},mr={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},gr=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return Wn(void 0,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f;return Kn(this,(function(d){switch(d.label){case 0:return r=t.clientName,o=t.commandName,i=t.inputFilterSensitiveLog,a=t.logger,s=t.outputFilterSensitiveLog,[4,e(n)];case 1:return u=d.sent(),a?("function"==typeof a.info&&(c=u.output,l=c.$metadata,f=$n(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:s(f),metadata:l})),[2,u]):[2,u]}}))}))}}),mr)}}},br=n(31);!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(hr||(hr={}));var wr,_r=hr.STANDARD,Sr=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Er=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Or=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],Ar=[500,502,503,504],xr=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||Er.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},Tr=function(){function e(e){var t,n,r,o,i;this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=null!==(t=null==e?void 0:e.beta)&&void 0!==t?t:.7,this.minCapacity=null!==(n=null==e?void 0:e.minCapacity)&&void 0!==n?n:1,this.minFillRate=null!==(r=null==e?void 0:e.minFillRate)&&void 0!==r?r:.5,this.scaleConstant=null!==(o=null==e?void 0:e.scaleConstant)&&void 0!==o?o:.4,this.smooth=null!==(i=null==e?void 0:e.smooth)&&void 0!==i?i:.8;var a=this.getCurrentTimeInSeconds();this.lastThrottleTime=a,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}return e.prototype.getCurrentTimeInSeconds=function(){return Date.now()/1e3},e.prototype.getSendToken=function(){return Wn(this,void 0,void 0,(function(){return Kn(this,(function(e){return[2,this.acquireTokenBucket(1)]}))}))},e.prototype.acquireTokenBucket=function(e){return Wn(this,void 0,void 0,(function(){var t;return Kn(this,(function(n){switch(n.label){case 0:return this.enabled?(this.refillTokenBucket(),e>this.currentCapacity?(t=(e-this.currentCapacity)/this.fillRate*1e3,[4,new Promise((function(e){return setTimeout(e,t)}))]):[3,2]):[2];case 1:n.sent(),n.label=2;case 2:return this.currentCapacity=this.currentCapacity-e,[2]}}))}))},e.prototype.refillTokenBucket=function(){var e=this.getCurrentTimeInSeconds();if(this.lastTimestamp){var t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}else this.lastTimestamp=e},e.prototype.updateClientSendingRate=function(e){var t;if(this.updateMeasuredRate(),xr(e)){var n=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=n,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(n),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());var r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)},e.prototype.calculateTimeWindow=function(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))},e.prototype.cubicThrottle=function(e){return this.getPrecise(e*this.beta)},e.prototype.cubicSuccess=function(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)},e.prototype.enableTokenBucket=function(){this.enabled=!0},e.prototype.updateTokenBucketRate=function(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)},e.prototype.updateMeasuredRate=function(){var e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){var n=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}},e.prototype.getPrecise=function(e){return parseFloat(e.toFixed(8))},e}(),jr=new Uint8Array(16);function Pr(){if(!wr&&!(wr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wr(jr)}var Cr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Mr=function(e){return"string"==typeof e&&Cr.test(e)},Ir=[],Rr=0;Rr<256;++Rr)Ir.push((Rr+256).toString(16).substr(1));var kr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ir[e[t+0]]+Ir[e[t+1]]+Ir[e[t+2]]+Ir[e[t+3]]+"-"+Ir[e[t+4]]+Ir[e[t+5]]+"-"+Ir[e[t+6]]+Ir[e[t+7]]+"-"+Ir[e[t+8]]+Ir[e[t+9]]+"-"+Ir[e[t+10]]+Ir[e[t+11]]+Ir[e[t+12]]+Ir[e[t+13]]+Ir[e[t+14]]+Ir[e[t+15]]).toLowerCase();if(!Mr(n))throw TypeError("Stringified UUID is invalid");return n};var Lr=function(e,t,n){var r=(e=e||{}).random||(e.rng||Pr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return kr(r)},Ur=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Dr=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return Sr.includes(e.name)}(e)||xr(e)||function(e){var t;return Or.includes(e.name)||Ar.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},Nr=function(){function e(e,t){var n,r,o;this.maxAttemptsProvider=e,this.mode=hr.STANDARD,this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:Dr,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:Ur,this.retryQuota=null!==(o=null==t?void 0:t.retryQuota)&&void 0!==o?o:function(e,t){var n,r,o,i=e,a=null!==(n=null==t?void 0:t.noRetryIncrement)&&void 0!==n?n:1,s=null!==(r=null==t?void 0:t.retryCost)&&void 0!==r?r:5,u=null!==(o=null==t?void 0:t.timeoutRetryCost)&&void 0!==o?o:10,c=e,l=function(e){return"TimeoutError"===e.name?u:s},f=function(e){return l(e)<=c};return Object.freeze({hasRetryTokens:f,retrieveRetryTokens:function(e){if(!f(e))throw new Error("No retry token available");var t=l(e);return c-=t,t},releaseRetryTokens:function(e){c+=null!=e?e:a,c=Math.min(c,i)}})}(500)}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Wn(this,void 0,void 0,(function(){var e;return Kn(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t,n){return Wn(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l;return Kn(this,(function(f){switch(f.label){case 0:return o=0,i=0,[4,this.getMaxAttempts()];case 1:a=f.sent(),s=t.request,ur.isInstance(s)&&(s.headers["amz-sdk-invocation-id"]=Lr()),u=function(){var u,l,f,d,p,h,v,y;return Kn(this,(function(m){switch(m.label){case 0:return m.trys.push([0,4,,7]),ur.isInstance(s)&&(s.headers["amz-sdk-request"]="attempt=".concat(o+1,"; max=").concat(a)),(null==n?void 0:n.beforeRequest)?[4,n.beforeRequest()]:[3,2];case 1:m.sent(),m.label=2;case 2:return[4,e(t)];case 3:return u=m.sent(),l=u.response,f=u.output,(null==n?void 0:n.afterRequest)&&n.afterRequest(l),c.retryQuota.releaseRetryTokens(r),f.$metadata.attempts=o+1,f.$metadata.totalRetryDelay=i,[2,{value:{response:l,output:f}}];case 4:return d=m.sent(),p=Fr(d),o++,c.shouldRetry(p,o,a)?(r=c.retryQuota.retrieveRetryTokens(p),h=c.delayDecider(xr(p)?500:100,o),v=Br(p.$response),y=Math.max(v||0,h),i+=y,[4,new Promise((function(e){return setTimeout(e,y)}))]):[3,6];case 5:return m.sent(),[2,"continue"];case 6:throw p.$metadata||(p.$metadata={}),p.$metadata.attempts=o,p.$metadata.totalRetryDelay=i,p;case 7:return[2]}}))},c=this,f.label=2;case 2:return[5,u()];case 3:return"object"==typeof(l=f.sent())?[2,l.value]:[3,2];case 4:return[2]}}))}))},e}(),Br=function(e){if(cr.isInstance(e)){var t=Object.keys(e.headers).find((function(e){return"retry-after"===e.toLowerCase()}));if(t){var n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n).getTime()-Date.now():1e3*r}}},Fr=function(e){return e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error("AWS SDK error wrapper for ".concat(e))},zr=function(e){function t(t,n){var r=this,o=null!=n?n:{},i=o.rateLimiter,a=$n(o,["rateLimiter"]);return(r=e.call(this,t,a)||this).rateLimiter=null!=i?i:new Tr,r.mode=hr.ADAPTIVE,r}return Vn(t,e),t.prototype.retry=function(t,n){return Wn(this,void 0,void 0,(function(){var r=this;return Kn(this,(function(o){return[2,e.prototype.retry.call(this,t,n,{beforeRequest:function(){return Wn(r,void 0,void 0,(function(){return Kn(this,(function(e){return[2,this.rateLimiter.getSendToken()]}))}))},afterRequest:function(e){r.rateLimiter.updateClientSendingRate(e)}})]}))}))},t}(Nr),qr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Hr=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(r){return Wn(void 0,void 0,void 0,(function(){var o;return Kn(this,(function(i){switch(i.label){case 0:return[4,e.retryStrategy()];case 1:return(null==(o=i.sent())?void 0:o.mode)&&(n.userAgent=Xn(Xn([],Zn(n.userAgent||[]),!1),[["cfg/retry-mode",o.mode]],!1)),[2,o.retry(t,r)]}}))}))}}}(e),qr)}}},Vr=function(e,t){return(Vr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Gr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Vr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function $r(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Wr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;Object.create;var Kr=function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n)||this;return o.tryNextLink=r,o.name="ProviderError",Object.setPrototypeOf(o,t.prototype),o}return Gr(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.assign(new this(e.message,t),e)},t}(Error);(function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n,r)||this;return o.tryNextLink=r,o.name="CredentialsProviderError",Object.setPrototypeOf(o,t.prototype),o}Gr(t,e)})(Kr),function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n,r)||this;return o.tryNextLink=r,o.name="TokenProviderError",Object.setPrototypeOf(o,t.prototype),o}Gr(t,e)}(Kr);for(var Yr=function(e,t,n){var r,o,i,a=!1,s=function(){return $r(void 0,void 0,void 0,(function(){return Wr(this,(function(t){switch(t.label){case 0:o||(o=e()),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,o];case 2:return r=t.sent(),i=!0,a=!1,[3,4];case 3:return o=void 0,[7];case 4:return[2,r]}}))}))};return void 0===t?function(e){return $r(void 0,void 0,void 0,(function(){return Wr(this,(function(t){switch(t.label){case 0:return i&&!(null==e?void 0:e.forceRefresh)?[3,2]:[4,s()];case 1:r=t.sent(),t.label=2;case 2:return[2,r]}}))}))}:function(e){return $r(void 0,void 0,void 0,(function(){return Wr(this,(function(o){switch(o.label){case 0:return i&&!(null==e?void 0:e.forceRefresh)?[3,2]:[4,s()];case 1:r=o.sent(),o.label=2;case 2:return a?[2,r]:n&&!n(r)?(a=!0,[2,r]):t(r)?[4,s()]:[3,4];case 3:return o.sent(),[2,r];case 4:return[2,r]}}))}))}},Zr={},Xr={},Jr=0;Jr<256;Jr++){var Qr=Jr.toString(16).toLowerCase();1===Qr.length&&(Qr="0".concat(Qr)),Zr[Jr]=Qr,Xr[Qr]=Jr}function eo(e){for(var t="",n=0;n<e.byteLength;n++)t+=Zr[e[n]];return t}var to="X-Amz-Date".toLowerCase(),no=["authorization",to,"date"],ro="X-Amz-Signature".toLowerCase(),oo="X-Amz-Security-Token".toLowerCase(),io={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},ao=/^proxy-/,so=/^sec-/,uo="AWS4-HMAC-SHA256-PAYLOAD",co={},lo=[],fo=function(e,t,n){return"".concat(e,"/").concat(t,"/").concat(n,"/").concat("aws4_request")},po=function(e,t,n){var r=new e(t);return r.update(n),r.digest()},ho=function(e,t,n){var r,o,i=e.headers,a={};try{for(var s=Yn(Object.keys(i).sort()),u=s.next();!u.done;u=s.next()){var c=u.value;if(null!=i[c]){var l=c.toLowerCase();(l in io||(null==t?void 0:t.has(l))||ao.test(l)||so.test(l))&&(!n||n&&!n.has(l))||(a[l]=i[c].trim().replace(/\s+/g," "))}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return a},vo=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,yo)},yo=function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())},mo=function(e,t){var n=e.headers,r=e.body;return Wn(void 0,void 0,void 0,(function(){var e,o,i,a,s,u,c;return Kn(this,(function(l){switch(l.label){case 0:try{for(e=Yn(Object.keys(n)),o=e.next();!o.done;o=e.next())if("x-amz-content-sha256"===(i=o.value).toLowerCase())return[2,n[i]]}catch(e){u={error:e}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(f=r,"function"==typeof ArrayBuffer&&f instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(f))?((a=new t).update(r),s=eo,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[l.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var f}))}))},go=function(e){var t=e.headers,n=e.query,r=$n(e,["headers","query"]);return Gn(Gn({},r),{headers:Gn({},t),query:n?bo(n):void 0})},bo=function(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return Gn(Gn({},t),((r={})[n]=Array.isArray(o)?Xn([],Zn(o),!1):o,r))}),{})},wo=function(e){var t,n;e="function"==typeof e.clone?e.clone():go(e);try{for(var r=Yn(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;no.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e},_o=function(e){return"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e},So=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=nr(r),this.credentialProvider=nr(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Wn(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l,f,d,p,h,v,y,m,g,b,w,_,S,E,O,A;return Kn(this,(function(x){switch(x.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,c=t.signingRegion,l=t.signingService,[4,this.credentialProvider()];case 1:return f=x.sent(),this.validateResolvedCredentials(f),null==c?[3,2]:(p=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=x.sent(),x.label=4;case 4:return d=p,h=Eo(r),v=h.longDate,y=h.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(m=fo(y,d,null!=l?l:this.service),g=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"==typeof e.clone?e.clone():go(e),a=i.headers,s=i.query,u=void 0===s?{}:s;try{for(var c=Yn(Object.keys(a)),l=c.next();!l.done;l=c.next()){var f=l.value,d=f.toLowerCase();"x-amz-"!==d.slice(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(d))||(u[f]=a[f],delete a[f])}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Gn(Gn({},e),{headers:a,query:u})}(wo(e),{unhoistableHeaders:s}),f.sessionToken&&(g.query["X-Amz-Security-Token"]=f.sessionToken),g.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",g.query["X-Amz-Credential"]="".concat(f.accessKeyId,"/").concat(m),g.query["X-Amz-Date"]=v,g.query["X-Amz-Expires"]=i.toString(10),b=ho(g,a,u),g.query["X-Amz-SignedHeaders"]=Oo(b),w=g.query,_="X-Amz-Signature",S=this.getSignature,E=[v,m,this.getSigningKey(f,d,y,l)],O=this.createCanonicalRequest,A=[g,b],[4,mo(e,this.sha256)]);case 5:return[4,S.apply(this,E.concat([O.apply(this,A.concat([x.sent()]))]))];case 6:return w[_]=x.sent(),[2,g]}}))}))},e.prototype.sign=function(e,t){return Wn(this,void 0,void 0,(function(){return Kn(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,r=e.payload,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return Wn(this,void 0,void 0,(function(){var e,t,o,c,l,f,d,p,h,v,y;return Kn(this,(function(m){switch(m.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=m.sent(),m.label=3;case 3:return e=t,o=Eo(i),c=o.shortDate,l=o.longDate,f=fo(c,e,null!=u?u:this.service),[4,mo({headers:{},body:r},this.sha256)];case 4:return d=m.sent(),(p=new this.sha256).update(n),v=eo,[4,p.digest()];case 5:return h=v.apply(void 0,[m.sent()]),y=[uo,l,f,a,h,d].join("\n"),[2,this.signString(y,{signingDate:i,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return Wn(this,void 0,void 0,(function(){var t,n,r,s,u,c,l,f;return Kn(this,(function(d){switch(d.label){case 0:return[4,this.credentialProvider()];case 1:return t=d.sent(),this.validateResolvedCredentials(t),null==i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=d.sent(),d.label=4;case 4:return n=r,s=Eo(o).shortDate,l=(c=this.sha256).bind,[4,this.getSigningKey(t,n,s,a)];case 5:return(u=new(l.apply(c,[void 0,d.sent()]))).update(e),f=eo,[4,u.digest()];case 6:return[2,f.apply(void 0,[d.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,s=n.signingRegion,u=n.signingService;return Wn(this,void 0,void 0,(function(){var t,n,r,c,l,f,d,p,h,v,y;return Kn(this,(function(m){switch(m.label){case 0:return[4,this.credentialProvider()];case 1:return t=m.sent(),this.validateResolvedCredentials(t),null==s?[3,2]:(r=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=m.sent(),m.label=4;case 4:return n=r,c=wo(e),l=Eo(o),f=l.longDate,d=l.shortDate,p=fo(d,n,null!=u?u:this.service),c.headers[to]=f,t.sessionToken&&(c.headers[oo]=t.sessionToken),[4,mo(c,this.sha256)];case 5:return h=m.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=Yn(Object.keys(t)),i=o.next();!i.done;i=o.next()){if(e===i.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=h),v=ho(c,a,i),[4,this.getSignature(f,p,this.getSigningKey(t,n,d,u),this.createCanonicalRequest(c,v,h))];case 6:return y=m.sent(),c.headers.authorization="".concat("AWS4-HMAC-SHA256"," ")+"Credential=".concat(t.accessKeyId,"/").concat(p,", ")+"SignedHeaders=".concat(Oo(v),", ")+"Signature=".concat(y),[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var r=Object.keys(t).sort();return"".concat(e.method,"\n").concat(this.getCanonicalPath(e),"\n").concat(function(e){var t,n,r=e.query,o=void 0===r?{}:r,i=[],a={},s=function(e){if(e.toLowerCase()===ro)return"continue";i.push(e);var t=o[e];"string"==typeof t?a[e]="".concat(vo(e),"=").concat(vo(t)):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat(["".concat(vo(e),"=").concat(vo(n))])}),[]).join("&"))};try{for(var u=Yn(Object.keys(o).sort()),c=u.next();!c.done;c=u.next()){s(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return i.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e),"\n").concat(r.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),"\n\n").concat(r.join(";"),"\n").concat(n)},e.prototype.createStringToSign=function(e,t,n){return Wn(this,void 0,void 0,(function(){var r,o;return Kn(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"".concat("AWS4-HMAC-SHA256","\n").concat(e,"\n").concat(t,"\n").concat(eo(o))]}}))}))},e.prototype.getCanonicalPath=function(e){var t,n,r=e.path;if(this.uriEscapePath){var o=[];try{for(var i=Yn(r.split("/")),a=i.next();!a.done;a=i.next()){var s=a.value;0!==(null==s?void 0:s.length)&&("."!==s&&(".."===s?o.pop():o.push(s)))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}var u="".concat((null==r?void 0:r.startsWith("/"))?"/":"").concat(o.join("/")).concat(o.length>0&&(null==r?void 0:r.endsWith("/"))?"/":"");return encodeURIComponent(u).replace(/%2F/g,"/")}return r},e.prototype.getSignature=function(e,t,n,r){return Wn(this,void 0,void 0,(function(){var o,i,a,s,u;return Kn(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),s=(a=this.sha256).bind,[4,n];case 2:return(i=new(s.apply(a,[void 0,c.sent()]))).update(o),u=eo,[4,i.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return Wn(void 0,void 0,void 0,(function(){var i,a,s,u,c,l,f,d,p;return Kn(this,(function(h){switch(h.label){case 0:return[4,po(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=h.sent(),(a="".concat(n,":").concat(r,":").concat(o,":").concat(eo(i),":").concat(t.sessionToken))in co)return[2,co[a]];for(lo.push(a);lo.length>50;)delete co[lo.shift()];s="AWS4".concat(t.secretAccessKey),h.label=2;case 2:h.trys.push([2,7,8,9]),u=Yn([n,r,o,"aws4_request"]),c=u.next(),h.label=3;case 3:return c.done?[3,6]:(l=c.value,[4,po(e,s,l)]);case 4:s=h.sent(),h.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return f=h.sent(),d={error:f},[3,9];case 8:try{c&&!c.done&&(p=u.return)&&p.call(u)}finally{if(d)throw d.error}return[7];case 9:return[2,co[a]=s]}}))}))}(this.sha256,e,n,t,r||this.service)},e.prototype.validateResolvedCredentials=function(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")},e}(),Eo=function(e){var t,n=(t=e,_o(t).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}},Oo=function(e){return Object.keys(e).sort().join(";")},Ao=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},xo=function(e){return"function"==typeof e?Yr(e,(function(e){return void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5}),(function(e){return void 0!==e.expiration})):Ao(e)},To=function(e){return new Date(Date.now()+e)},jo=function(e,t){var n=Date.parse(e);return function(e,t){return Math.abs(To(t).getTime()-e)>=3e5}(n,t)?n-Date.now():t},Po=function(e){var t,n,r;return cr.isInstance(e)?null!==(n=null===(t=e.headers)||void 0===t?void 0:t.date)&&void 0!==n?n:null===(r=e.headers)||void 0===r?void 0:r.Date:void 0},Co={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},Mo=function(e){return{applyToStack:function(t){t.addRelativeTo(function(e){return function(t,n){return function(r){return Wn(this,void 0,void 0,(function(){var o,i,a,s,u,c;return Kn(this,(function(l){switch(l.label){case 0:return ur.isInstance(r.request)?[4,e.signer()]:[2,t(r)];case 1:return o=l.sent(),a=t,s=[Gn({},r)],c={},[4,o.sign(r.request,{signingDate:To(e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 2:return[4,a.apply(void 0,[Gn.apply(void 0,s.concat([(c.request=l.sent(),c)]))]).catch((function(t){var n,r=null!==(n=t.ServerTime)&&void 0!==n?n:Po(t.$response);throw r&&(e.systemClockOffset=jo(r,e.systemClockOffset)),t}))];case 3:return i=l.sent(),(u=Po(i.response))&&(e.systemClockOffset=jo(u,e.systemClockOffset)),[2,i]}}))}))}}}(e),Co)}}};var Io=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ro=function(e){var t=Zn(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(Io,"_")})).join("/")},ko={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Lo=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return Wn(void 0,void 0,void 0,(function(){var o,i,a,s,u,c,l,f,d;return Kn(this,(function(p){switch(p.label){case 0:return o=r.request,ur.isInstance(o)?(i=o.headers,a=(null===(f=null==t?void 0:t.userAgent)||void 0===f?void 0:f.map(Ro))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return s=p.sent().map(Ro),u=(null===(d=null==n?void 0:n.customUserAgent)||void 0===d?void 0:d.map(Ro))||[],c=Xn(Xn(Xn([],Zn(s),!1),Zn(a),!1),Zn(u),!1).join(" "),l=Xn(Xn([],Zn(s.filter((function(e){return e.startsWith("aws-sdk-")}))),!1),Zn(u),!1).join(" "),"browser"!==n.runtime?(l&&(i["x-amz-user-agent"]=i["x-amz-user-agent"]?"".concat(i["user-agent"]," ").concat(l):l),i["user-agent"]=c):i["x-amz-user-agent"]=c,[2,e(Gn(Gn({},r),{request:o}))]}}))}))}}),ko)}}},Uo=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,Gn({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,Gn({},e))})),n},o=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Xn([],Zn(o(e)),!1))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Xn([],Zn(o(e)),!1))})),t},i=function(){var n,r=[],i=[],a={};return e.forEach((function(e){var t=Gn(Gn({},e),{before:[],after:[]});t.name&&(a[t.name]=t),r.push(t)})),t.forEach((function(e){var t=Gn(Gn({},e),{before:[],after:[]});t.name&&(a[t.name]=t),i.push(t)})),i.forEach((function(e){if(e.toMiddleware){var t=a[e.toMiddleware];if(void 0===t)throw new Error("".concat(e.toMiddleware," is not found when adding ").concat(e.name||"anonymous"," middleware ").concat(e.relation," ").concat(e.toMiddleware));"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(n=r,n.sort((function(e,t){return Do[t.step]-Do[e.step]||No[t.priority||"normal"]-No[e.priority||"normal"]}))).map(o).reduce((function(e,t){return e.push.apply(e,Xn([],Zn(t),!1)),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,r){void 0===r&&(r={});var o=r.name,i=r.override,a=Gn({step:"initialize",priority:"normal",middleware:t},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '".concat(o,"'"));var s=e.findIndex((function(e){return e.name===o})),u=e[s];if(u.step!==a.step||u.priority!==a.priority)throw new Error('"'.concat(o,'" middleware with ').concat(u.priority," priority in ").concat(u.step," step cannot be ")+"overridden by same-name middleware with ".concat(a.priority," priority in ").concat(a.step," step."));e.splice(s,1)}n.add(o)}e.push(a)},addRelativeTo:function(e,r){var o=r.name,i=r.override,a=Gn({middleware:e},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '".concat(o,"'"));var s=t.findIndex((function(e){return e.name===o})),u=t[s];if(u.toMiddleware!==a.toMiddleware||u.relation!==a.relation)throw new Error('"'.concat(o,'" middleware ').concat(u.relation,' "').concat(u.toMiddleware,'" middleware cannot be overridden ')+"by same-name middleware ".concat(a.relation,' "').concat(a.toMiddleware,'" middleware.'));t.splice(s,1)}n.add(o)}t.push(a)},clone:function(){return r(Uo())},use:function(e){e.applyToStack(a)},remove:function(r){return"string"==typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=r(Uo());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var o=Yn(i().reverse()),a=o.next();!a.done;a=o.next()){e=(0,a.value)(e,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}};return a},Do={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},No={high:3,normal:2,low:1},Bo=function(){function e(e){this.middlewareStack=Uo(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,o="function"==typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),Fo=function(){this.middlewareStack=Uo()},zo="***SensitiveInformation***",qo=function(e){if(null!=e){if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Qo.warn(Jo("Expected number but observed string: ".concat(e))),t}if("number"==typeof e)return e;throw new TypeError("Expected number, got ".concat(typeof e,": ").concat(e))}},Ho=(Math.ceil(Math.pow(2,127)*(2-Math.pow(2,-23))),function(e){if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError("Expected integer, got ".concat(typeof e,": ").concat(e))}}),Vo=function(e){return Go(e,32)},Go=function(e,t){var n=Ho(e);if(void 0!==n&&$o(n,t)!==n)throw new TypeError("Expected ".concat(t,"-bit integer, got ").concat(e));return n},$o=function(e,t){switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Wo=function(e,t){if(null==e){if(t)throw new TypeError("Expected a non-null value for ".concat(t));throw new TypeError("Expected a non-null value")}return e},Ko=function(e){if(null!=e){if("object"==typeof e&&!Array.isArray(e))return e;var t=Array.isArray(e)?"array":typeof e;throw new TypeError("Expected object, got ".concat(t,": ").concat(e))}},Yo=function(e){if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Qo.warn(Jo("Expected string, got ".concat(typeof e,": ").concat(e))),String(e);throw new TypeError("Expected string, got ".concat(typeof e,": ").concat(e))}},Zo=function(e){return"string"==typeof e?Xo(e):qo(e)},Xo=function(e){switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error("Unable to parse float value: ".concat(e))}},Jo=function(e){return String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((function(e){return!e.includes("stackTraceWarning")})).join("\n")},Qo={warn:console.warn};new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);var ei=function(e){function t(n){var r=e.call(this,n.message)||this;return Object.setPrototypeOf(r,t.prototype),r.name=n.name,r.$fault=n.$fault,r.$metadata=n.$metadata,r}return Vn(t,e),t}(Error),ti=function(e,t){void 0===t&&(t={}),Object.entries(t).filter((function(e){return void 0!==Zn(e,2)[1]})).forEach((function(t){var n=Zn(t,2),r=n[0],o=n[1];null!=e[r]&&""!==e[r]||(e[r]=o)}));var n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},ni=function(e){var t=e.output,n=e.parsedBody,r=e.exceptionCtor,o=e.errorCode,i=ri(t),a=i.httpStatusCode?i.httpStatusCode+"":void 0,s=new r({name:n.code||n.Code||o||a||"UnknowError",$fault:"client",$metadata:i});throw ti(s,n)},ri=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},oi=function(e){switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}};n(20);function ii(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}var ai=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Xn([null],Zn(arguments),!1)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};ai.prototype=Object.create(String.prototype,{constructor:{value:ai,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(ai,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Vn(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(ai);function si(e,t,n){var r,o,i,a;if(void 0===t&&void 0===n)i={},a=e;else{if(i=e,"function"==typeof t)return ui(i,t,a=n);a=t}try{for(var s=Yn(Object.keys(a)),u=s.next();!u.done;u=s.next()){var c=u.value;if(Array.isArray(a[c])){var l=Zn(a[c],2),f=l[0],d=l[1];if("function"==typeof d){var p=void 0,h=void 0===f&&null!=(p=d()),v="function"==typeof f&&!!f(void 0)||"function"!=typeof f&&!!f;h?i[c]=p:v&&(i[c]=d())}else{h=void 0===f&&null!=d,v="function"==typeof f&&!!f(d)||"function"!=typeof f&&!!f;(h||v)&&(i[c]=d)}}else i[c]=a[c]}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var ui=function(e,t,n){return si(e,Object.entries(n).reduce((function(e,n){var r=Zn(n,2),o=r[0],i=r[1];return Array.isArray(i)?e[o]=i:e[o]="function"==typeof i?[t,i()]:[t,i],e}),{}))},ci=function(e,t,n,r,o,i){if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");var a=r();if(a.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");return e=e.replace(o,i?a.split("/").map((function(e){return ii(e)})).join("/"):ii(a))};var li=n(33),fi=n(32),di=n(9);Object.create;function pi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;for(var hi={},vi={},yi=0;yi<256;yi++){var mi=yi.toString(16).toLowerCase();1===mi.length&&(mi="0".concat(mi)),hi[yi]=mi,vi[mi]=yi}function gi(e){for(var t="",n=0;n<e.byteLength;n++)t+=hi[e[n]];return t}var bi=function(){function e(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}return e.fromNumber=function(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error("".concat(t," is too large (or, if negative, too small) to represent as an Int64"));for(var n=new Uint8Array(8),r=7,o=Math.abs(Math.round(t));r>-1&&o>0;r--,o/=256)n[r]=o;return t<0&&wi(n),new e(n)},e.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&wi(e),parseInt(gi(e),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},e}();function wi(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}var _i,Si=function(){function e(e,t){this.toUtf8=e,this.fromUtf8=t}return e.prototype.format=function(e){var t,n,r,o,i=[];try{for(var a=pi(Object.keys(e)),s=a.next();!s.done;s=a.next()){var u=s.value,c=this.fromUtf8(u);i.push(Uint8Array.from([c.byteLength]),c,this.formatHeaderValue(e[u]))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}var l=new Uint8Array(i.reduce((function(e,t){return e+t.byteLength}),0)),f=0;try{for(var d=pi(i),p=d.next();!p.done;p=d.next()){var h=p.value;l.set(h,f),f+=h.byteLength}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}return l},e.prototype.formatHeaderValue=function(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":var t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":var n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":var r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":var o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);var i=new Uint8Array(o.buffer);return i.set(e.value,3),i;case"string":var a=this.fromUtf8(e.value),s=new DataView(new ArrayBuffer(3+a.byteLength));s.setUint8(0,7),s.setUint16(1,a.byteLength,!1);var u=new Uint8Array(s.buffer);return u.set(a,3),u;case"timestamp":var c=new Uint8Array(9);return c[0]=8,c.set(bi.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!Ii.test(e.value))throw new Error("Invalid UUID received: ".concat(e.value));var l=new Uint8Array(17);return l[0]=9,l.set(function(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2){var r=e.slice(n,n+2).toLowerCase();if(!(r in vi))throw new Error("Cannot decode unrecognized sequence ".concat(r," as hexadecimal"));t[n/2]=vi[r]}return t}(e.value.replace(/\-/g,"")),1),l}},e.prototype.parse=function(e){for(var t={},n=0;n<e.byteLength;){var r=e.getUint8(n++),o=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[o]={type:Ei,value:!0};break;case 1:t[o]={type:Ei,value:!1};break;case 2:t[o]={type:Oi,value:e.getInt8(n++)};break;case 3:t[o]={type:Ai,value:e.getInt16(n,!1)},n+=2;break;case 4:t[o]={type:xi,value:e.getInt32(n,!1)},n+=4;break;case 5:t[o]={type:Ti,value:new bi(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:var i=e.getUint16(n,!1);n+=2,t[o]={type:ji,value:new Uint8Array(e.buffer,e.byteOffset+n,i)},n+=i;break;case 7:var a=e.getUint16(n,!1);n+=2,t[o]={type:Pi,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,a))},n+=a;break;case 8:t[o]={type:Ci,value:new Date(new bi(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:var s=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[o]={type:Mi,value:"".concat(gi(s.subarray(0,4)),"-").concat(gi(s.subarray(4,6)),"-").concat(gi(s.subarray(6,8)),"-").concat(gi(s.subarray(8,10)),"-").concat(gi(s.subarray(10)))};break;default:throw new Error("Unrecognized header type tag")}}return t},e}();!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(_i||(_i={}));var Ei="boolean",Oi="byte",Ai="short",xi="integer",Ti="long",ji="binary",Pi="string",Ci="timestamp",Mi="uuid",Ii=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var Ri=function(){function e(e,t){this.headerMarshaller=new Si(e,t)}return e.prototype.encode=function(e){var t=e.headers,n=e.body,r=this.headerMarshaller.format(t),o=r.byteLength+n.byteLength+16,i=new Uint8Array(o),a=new DataView(i.buffer,i.byteOffset,i.byteLength),s=new di.Crc32;return a.setUint32(0,o,!1),a.setUint32(4,r.byteLength,!1),a.setUint32(8,s.update(i.subarray(0,8)).digest(),!1),i.set(r,12),i.set(n,r.byteLength+12),a.setUint32(o-4,s.update(i.subarray(8,o-4)).digest(),!1),i},e.prototype.decode=function(e){var t=function(e){var t=e.byteLength,n=e.byteOffset,r=e.buffer;if(t<16)throw new Error("Provided message too short to accommodate event stream message overhead");var o=new DataView(r,n,t),i=o.getUint32(0,!1);if(t!==i)throw new Error("Reported message length does not match received message length");var a=o.getUint32(4,!1),s=o.getUint32(8,!1),u=o.getUint32(t-4,!1),c=(new di.Crc32).update(new Uint8Array(r,n,8));if(s!==c.digest())throw new Error("The prelude checksum specified in the message (".concat(s,") does not match the calculated CRC32 checksum (").concat(c.digest(),")"));if(c.update(new Uint8Array(r,n+8,t-12)),u!==c.digest())throw new Error("The message checksum (".concat(c.digest(),") did not match the expected value of ").concat(u));return{headers:new DataView(r,n+8+4,a),body:new Uint8Array(r,n+8+4+a,i-a-16)}}(e),n=t.headers,r=t.body;return{headers:this.headerMarshaller.parse(n),body:r}},e.prototype.formatHeaders=function(e){return this.headerMarshaller.format(e)},e}();var ki=function(){function e(e){var t=e.utf8Encoder,n=e.utf8Decoder;this.eventStreamCodec=new Ri(t,n),this.utfEncoder=t}return e.prototype.deserialize=function(e,t){return function(e,t){var n;return(n={})[Symbol.asyncIterator]=function(){return Qn(this,arguments,(function(){var n,r,o,i,a,s,u,c,l,f,d,p,h,v,y,m,g;return Kn(this,(function(b){switch(b.label){case 0:b.trys.push([0,12,13,18]),n=er(e),b.label=1;case 1:return[4,Jn(n.next())];case 2:if((r=b.sent()).done)return[3,11];if(o=r.value,i=t.eventStreamCodec.decode(o),"error"!==(a=i.headers[":message-type"].value))return[3,3];throw(s=new Error(i.headers[":error-message"].value||"UnknownError")).name=i.headers[":error-code"].value,s;case 3:return"exception"!==a?[3,5]:(u=i.headers[":exception-type"].value,(v={})[u]=i,c=v,[4,Jn(t.deserializer(c))]);case 4:if((l=b.sent()).$unknown)throw(f=new Error(t.toUtf8(i.body))).name=u,f;throw l[u];case 5:return"event"!==a?[3,9]:((y={})[i.headers[":event-type"].value]=i,d=y,[4,Jn(t.deserializer(d))]);case 6:return(p=b.sent()).$unknown?[3,10]:[4,Jn(p)];case 7:return[4,b.sent()];case 8:return b.sent(),[3,10];case 9:throw Error("Unrecognizable event type: ".concat(i.headers[":event-type"].value));case 10:return[3,1];case 11:return[3,18];case 12:return h=b.sent(),m={error:h},[3,18];case 13:return b.trys.push([13,,16,17]),r&&!r.done&&(g=n.return)?[4,Jn(g.call(n))]:[3,15];case 14:b.sent(),b.label=15;case 15:return[3,17];case 16:if(m)throw m.error;return[7];case 17:return[7];case 18:return[2]}}))}))},n}(function(e){var t,n=0,r=0,o=null,i=null,a=function(e){if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);n=e,r=4,o=new Uint8Array(e),new DataView(o.buffer).setUint32(0,e,!1)};return(t={})[Symbol.asyncIterator]=function(){return Qn(this,arguments,(function(){var t,s,u,c,l,f,d,p;return Kn(this,(function(h){switch(h.label){case 0:t=e[Symbol.asyncIterator](),h.label=1;case 1:return[4,Jn(t.next())];case 2:return s=h.sent(),u=s.value,s.done?n?[3,4]:[4,Jn(void 0)]:[3,10];case 3:return[2,h.sent()];case 4:return n!==r?[3,7]:[4,Jn(o)];case 5:return[4,h.sent()];case 6:return h.sent(),[3,8];case 7:throw new Error("Truncated event message received.");case 8:return[4,Jn(void 0)];case 9:return[2,h.sent()];case 10:c=u.length,l=0,h.label=11;case 11:if(!(l<c))return[3,15];if(!o){if(f=c-l,i||(i=new Uint8Array(4)),d=Math.min(4-r,f),i.set(u.slice(l,l+d),r),l+=d,(r+=d)<4)return[3,15];a(new DataView(i.buffer).getUint32(0,!1)),i=null}return p=Math.min(n-r,c-l),o.set(u.slice(l,l+p),r),r+=p,l+=p,n&&n===r?[4,Jn(o)]:[3,14];case 12:return[4,h.sent()];case 13:h.sent(),o=null,n=0,r=0,h.label=14;case 14:return[3,11];case 15:return[3,1];case 16:return[2]}}))}))},t}(e),{eventStreamCodec:this.eventStreamCodec,deserializer:t,toUtf8:this.utfEncoder})},e.prototype.serialize=function(e,t){var n,r=this;return(n={})[Symbol.asyncIterator]=function(){return Qn(this,arguments,(function(){var n,o,i,a,s,u;return Kn(this,(function(c){switch(c.label){case 0:c.trys.push([0,7,8,13]),n=er(e),c.label=1;case 1:return[4,Jn(n.next())];case 2:return(o=c.sent()).done?[3,6]:(i=o.value,[4,Jn(r.eventStreamCodec.encode(t(i)))]);case 3:return[4,c.sent()];case 4:c.sent(),c.label=5;case 5:return[3,1];case 6:return[3,13];case 7:return a=c.sent(),s={error:a},[3,13];case 8:return c.trys.push([8,,11,12]),o&&!o.done&&(u=n.return)?[4,Jn(u.call(n))]:[3,10];case 9:c.sent(),c.label=10;case 10:return[3,12];case 11:if(s)throw s.error;return[7];case 12:return[7];case 13:return[4,Jn(new Uint8Array(0))];case 14:return[4,c.sent()];case 15:return c.sent(),[2]}}))}))},n},e}(),Li=function(){function e(e){var t=e.utf8Encoder,n=e.utf8Decoder;this.universalMarshaller=new ki({utf8Decoder:n,utf8Encoder:t})}return e.prototype.deserialize=function(e,t){var n=Ui(e)?function(e){var t;return(t={})[Symbol.asyncIterator]=function(){return Qn(this,arguments,(function(){var t,n,r,o;return Kn(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,Jn(t.read())];case 3:return n=i.sent(),r=n.done,o=n.value,r?[4,Jn(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,Jn(o)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t}(e):e;return this.universalMarshaller.deserialize(n,t)},e.prototype.serialize=function(e,t){var n,r=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(n=r[Symbol.asyncIterator](),new ReadableStream({pull:function(e){return Wn(this,void 0,void 0,(function(){var t,r,o;return Kn(this,(function(i){switch(i.label){case 0:return[4,n.next()];case 1:return t=i.sent(),r=t.done,o=t.value,r?[2,e.close()]:(e.enqueue(o),[2])}}))}))}})):r},e}(),Ui=function(e){return"function"==typeof ReadableStream&&e instanceof ReadableStream},Di=function(e){return new Li(e)};for(var Ni=function(){function e(e){"function"==typeof e?this.configProvider=e().then((function(e){return e||{}})):(this.config=null!=e?e:{},this.configProvider=Promise.resolve(this.config))}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal;return Wn(this,void 0,void 0,(function(){var t,r,o,i,a,s,u,c,l,f,d,p;return Kn(this,(function(h){switch(h.label){case 0:return this.config?[3,2]:(t=this,[4,this.configProvider]);case 1:t.config=h.sent(),h.label=2;case 2:return r=this.config.requestTimeout,(null==n?void 0:n.aborted)?((o=new Error("Request aborted")).name="AbortError",[2,Promise.reject(o)]):(i=e.path,e.query&&(a=function(e){var t,n,r=[];try{for(var o=Yn(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,s=e[a];if(a=vo(a),Array.isArray(s))for(var u=0,c=s.length;u<c;u++)r.push("".concat(a,"=").concat(vo(s[u])));else{var l=a;(s||"string"==typeof s)&&(l+="=".concat(vo(s))),r.push(l)}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query))&&(i+="?".concat(a)),s=e.port,u=e.method,c="".concat(e.protocol,"//").concat(e.hostname).concat(s?":".concat(s):"").concat(i),l="GET"===u||"HEAD"===u?void 0:e.body,f={body:l,headers:new Headers(e.headers),method:u},"undefined"!=typeof AbortController&&(f.signal=n),d=new Request(c,f),p=[fetch(d).then((function(e){var t,n,r=e.headers,o={};try{for(var i=Yn(r.entries()),a=i.next();!a.done;a=i.next()){var s=a.value;o[s[0]]=s[1]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new cr({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new cr({headers:o,statusCode:e.status,body:t})}}))})),(v=r,void 0===v&&(v=0),new Promise((function(e,t){v&&setTimeout((function(){var e=new Error("Request did not complete within ".concat(v," ms"));e.name="TimeoutError",t(e)}),v)})))],n&&p.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),[2,Promise.race(p)])}var v}))}))},e}(),Bi={},Fi=new Array(64),zi=0,qi="A".charCodeAt(0),Hi="Z".charCodeAt(0);zi+qi<=Hi;zi++){var Vi=String.fromCharCode(zi+qi);Bi[Vi]=zi,Fi[zi]=Vi}for(zi=0,qi="a".charCodeAt(0),Hi="z".charCodeAt(0);zi+qi<=Hi;zi++){Vi=String.fromCharCode(zi+qi);var Gi=zi+26;Bi[Vi]=Gi,Fi[Gi]=Vi}for(zi=0;zi<10;zi++){Bi[zi.toString(10)]=zi+52;Vi=zi.toString(10),Gi=zi+52;Bi[Vi]=Gi,Fi[Gi]=Vi}Bi["+"]=62,Fi[62]="+",Bi["/"]=63,Fi[63]="/";function $i(e){var t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;for(var n=new ArrayBuffer(t),r=new DataView(n),o=0;o<e.length;o+=4){for(var i=0,a=0,s=o,u=o+3;s<=u;s++)if("="!==e[s]){if(!(e[s]in Bi))throw new TypeError("Invalid character ".concat(e[s]," in base64 string."));i|=Bi[e[s]]<<6*(u-s),a+=6}else i>>=6;var c=o/4*3;i>>=a%8;for(var l=Math.floor(a/8),f=0;f<l;f++){var d=8*(l-f-1);r.setUint8(c+f,(i&255<<d)>>d)}}return new Uint8Array(n)}function Wi(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var s=Math.ceil(o/6);r<<=6*s-o;for(var u=1;u<=s;u++){var c=6*(s-u);t+=Fi[(r&63<<c)>>c]}t+="==".slice(0,4-s)}return t}var Ki=function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Wn(this,void 0,void 0,(function(){var t,n;return Kn(this,(function(r){switch(r.label){case 0:return[4,Yi(e)];case 1:return t=r.sent(),n=$i(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Wn(this,void 0,void 0,(function(){var t,n,r,o,i,a,s;return Kn(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,u.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=u.sent(),i=o.done,(a=o.value)&&(s=t,(t=new Uint8Array(s.length+a.length)).set(s),t.set(a,s.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)};function Yi(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var Zi=function(e){return function(){throw new Error(e)}},Xi=function(e){return function(){return Promise.reject(e)}},Ji=function(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error("Body Length computation failed for ".concat(e))},Qi=function(e){var t=e.serviceId,n=e.clientVersion;return function(){return Wn(void 0,void 0,void 0,(function(){var e,r,o,i,a,s,u,c,l;return Kn(this,(function(f){return e="undefined"!=typeof window&&(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?D.a.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/".concat((null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.name)||"other"),null===(a=null==e?void 0:e.os)||void 0===a?void 0:a.version],["lang/js"],["md/browser","".concat(null!==(u=null===(s=null==e?void 0:e.browser)||void 0===s?void 0:s.name)&&void 0!==u?u:"unknown","_").concat(null!==(l=null===(c=null==e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==l?l:"unknown")]],t&&r.push(["api/".concat(t),n]),[2,r]}))}))}};var ea=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},ta=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)};var na=function(e){if("string"==typeof e)return na(new URL(e));var t,n=e,r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,s=n.search;return s&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=Yn(e.split("&")),i=o.next();!i.done;i=o.next()){var a=Zn(i.value.split("="),2),s=a[0],u=a[1],c=void 0===u?null:u;s=decodeURIComponent(s),c&&(c=decodeURIComponent(c)),s in r?Array.isArray(r[s])?r[s].push(c):r[s]=[r[s],c]:r[s]=c}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(s)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}},ra={},oa={aws:{regions:["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-southeast-1","ap-southeast-2","ap-southeast-3","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-central-1","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"],regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.amazonaws.com",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"runtime-v2-lex-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"runtime-v2-lex.{region}.api.aws",tags:["dualstack"]}]},"aws-cn":{regions:["cn-north-1","cn-northwest-1"],regionRegex:"^cn\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.amazonaws.com.cn",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.amazonaws.com.cn",tags:["fips"]},{hostname:"runtime-v2-lex-fips.{region}.api.amazonwebservices.com.cn",tags:["dualstack","fips"]},{hostname:"runtime-v2-lex.{region}.api.amazonwebservices.com.cn",tags:["dualstack"]}]},"aws-iso":{regions:["us-iso-east-1","us-iso-west-1"],regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.c2s.ic.gov",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.c2s.ic.gov",tags:["fips"]}]},"aws-iso-b":{regions:["us-isob-east-1"],regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.sc2s.sgov.gov",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.sc2s.sgov.gov",tags:["fips"]}]},"aws-us-gov":{regions:["us-gov-east-1","us-gov-west-1"],regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.amazonaws.com",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"runtime-v2-lex-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"runtime-v2-lex.{region}.api.aws",tags:["dualstack"]}]}},ia=function(e,t){return Wn(void 0,void 0,void 0,(function(){return Kn(this,(function(n){return[2,sr(e,Gn(Gn({},t),{signingService:"lex",regionHash:ra,partitionHash:oa}))]}))}))};function aa(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function sa(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;Object.create;var ua=["in-region","cross-region","mobile","standard","legacy"],ca=function(){var e,t,n="undefined"!=typeof window&&(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.userAgent)?D.a.parse(window.navigator.userAgent):void 0,r=null===(t=null==n?void 0:n.platform)||void 0===t?void 0:t.type;return"tablet"===r||"mobile"===r},la=function(e){var t,n,r,o,i,a,s,u,c,l,f,d,p,h,v,y,m,g=function(e){var t=(void 0===e?{}:e).defaultsMode;return Yr((function(){return aa(void 0,void 0,void 0,(function(){var e,n;return sa(this,(function(r){switch(r.label){case 0:return"function"!=typeof t?[3,2]:[4,t()];case 1:return n=r.sent(),[3,3];case 2:n=t,r.label=3;case 3:switch(null==(e=n)?void 0:e.toLowerCase()){case"auto":return[2,Promise.resolve(ca()?"mobile":"standard")];case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return[2,Promise.resolve(null==e?void 0:e.toLocaleLowerCase())];case void 0:return[2,Promise.resolve("legacy")];default:throw new Error('Invalid parameter for "defaultsMode", expect '.concat(ua.join(", "),", got ").concat(e))}return[2]}}))}))}))}(e),b=function(){return g().then(oi)},w=function(e){var t,n,r,o,i;return{apiVersion:"2020-08-07",disableHostPrefix:null!==(t=null==e?void 0:e.disableHostPrefix)&&void 0!==t&&t,logger:null!==(n=null==e?void 0:e.logger)&&void 0!==n?n:{},regionInfoProvider:null!==(r=null==e?void 0:e.regionInfoProvider)&&void 0!==r?r:ia,serviceId:null!==(o=null==e?void 0:e.serviceId)&&void 0!==o?o:"Lex Runtime V2",urlParser:null!==(i=null==e?void 0:e.urlParser)&&void 0!==i?i:na}}(e);return Gn(Gn(Gn({},w),e),{runtime:"browser",defaultsMode:g,base64Decoder:null!==(t=null==e?void 0:e.base64Decoder)&&void 0!==t?t:$i,base64Encoder:null!==(n=null==e?void 0:e.base64Encoder)&&void 0!==n?n:Wi,bodyLengthChecker:null!==(r=null==e?void 0:e.bodyLengthChecker)&&void 0!==r?r:Ji,credentialDefaultProvider:null!==(o=null==e?void 0:e.credentialDefaultProvider)&&void 0!==o?o:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:null!==(i=null==e?void 0:e.defaultUserAgentProvider)&&void 0!==i?i:Qi({serviceId:w.serviceId,clientVersion:li.version}),eventStreamPayloadHandlerProvider:null!==(a=null==e?void 0:e.eventStreamPayloadHandlerProvider)&&void 0!==a?a:function(){return{handle:Zi("event stream request is not supported in browser.")}},eventStreamSerdeProvider:null!==(s=null==e?void 0:e.eventStreamSerdeProvider)&&void 0!==s?s:Di,maxAttempts:null!==(u=null==e?void 0:e.maxAttempts)&&void 0!==u?u:3,region:null!==(c=null==e?void 0:e.region)&&void 0!==c?c:Xi("Region is missing"),requestHandler:null!==(l=null==e?void 0:e.requestHandler)&&void 0!==l?l:new Ni(b),retryMode:null!==(f=null==e?void 0:e.retryMode)&&void 0!==f?f:function(){return Wn(void 0,void 0,void 0,(function(){return Kn(this,(function(e){switch(e.label){case 0:return[4,b()];case 1:return[2,e.sent().retryMode||_r]}}))}))},sha256:null!==(d=null==e?void 0:e.sha256)&&void 0!==d?d:fi.Sha256,streamCollector:null!==(p=null==e?void 0:e.streamCollector)&&void 0!==p?p:Ki,useDualstackEndpoint:null!==(h=null==e?void 0:e.useDualstackEndpoint)&&void 0!==h?h:function(){return Promise.resolve(!1)},useFipsEndpoint:null!==(v=null==e?void 0:e.useFipsEndpoint)&&void 0!==v?v:function(){return Promise.resolve(!1)},utf8Decoder:null!==(y=null==e?void 0:e.utf8Decoder)&&void 0!==y?y:ea,utf8Encoder:null!==(m=null==e?void 0:e.utf8Encoder)&&void 0!==m?m:ta})},fa=function(e){function t(t){var n,r,o,i=this,a=function(e){var t=e.region,n=e.useFipsEndpoint;if(!t)throw new Error("Region is missing");return Gn(Gn({},e),{region:function(){return Wn(void 0,void 0,void 0,(function(){var e;return Kn(this,(function(n){switch(n.label){case 0:return"string"==typeof t?[2,ir(t)]:[4,t()];case 1:return e=n.sent(),[2,ir(e)]}}))}))},useFipsEndpoint:function(){return Wn(void 0,void 0,void 0,(function(){var e;return Kn(this,(function(r){switch(r.label){case 0:return"string"!=typeof t?[3,1]:(e=t,[3,3]);case 1:return[4,t()];case 2:e=r.sent(),r.label=3;case 3:return or(e)?[2,!0]:[2,"boolean"==typeof n?Promise.resolve(n):n()]}}))}))}})}(la(t)),s=function(e){var t,n=e.credentials?xo(e.credentials):e.credentialDefaultProvider(e),r=e.signingEscapePath,o=void 0===r||r,i=e.systemClockOffset,a=void 0===i?e.systemClockOffset||0:i,s=e.sha256;return t=e.signer?Ao(e.signer):function(){return Ao(e.region)().then((function(t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i;return Kn(this,(function(a){switch(a.label){case 0:return r=(n=e).regionInfoProvider,o=[t],i={},[4,e.useFipsEndpoint()];case 1:return i.useFipsEndpoint=a.sent(),[4,e.useDualstackEndpoint()];case 2:return[4,r.apply(n,o.concat([(i.useDualstackEndpoint=a.sent(),i)]))];case 3:return[2,[a.sent()||{},t]]}}))}))})).then((function(t){var r=Zn(t,2),i=r[0],a=r[1],u=i.signingRegion,c=i.signingService;e.signingRegion=e.signingRegion||u||a,e.signingName=e.signingName||c||e.serviceId;var l=Gn(Gn({},e),{credentials:n,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:o});return new(e.signerConstructor||So)(l)}))},Gn(Gn({},e),{systemClockOffset:a,signingEscapePath:o,credentials:n,signer:t})}(function(e){var t,n=nr(null!==(t=e.maxAttempts)&&void 0!==t?t:3);return Gn(Gn({},e),{maxAttempts:n,retryStrategy:function(){return Wn(void 0,void 0,void 0,(function(){return Kn(this,(function(t){switch(t.label){case 0:return e.retryStrategy?[2,e.retryStrategy]:[4,nr(e.retryMode)()];case 1:return t.sent()===hr.ADAPTIVE?[2,new zr(n)]:[2,new Nr(n)]}}))}))}})}(rr(a))),u=function(e){return Gn(Gn({},e),{eventStreamMarshaller:e.eventStreamSerdeProvider(e)})}(function(e){return Gn(Gn({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}((r=(n=s).signer,o=n.eventStreamPayloadHandlerProvider(dr(dr({},n),{eventSigner:r})),dr(dr({},n),{eventSigner:r,eventStreamPayloadHandler:o}))));return(i=e.call(this,u)||this).config=u,i.middlewareStack.use(Hr(i.config)),i.middlewareStack.use(fr(i.config)),i.middlewareStack.use(yr(i.config)),i.middlewareStack.use(gr(i.config)),i.middlewareStack.use(Object(br.a)(i.config)),i.middlewareStack.use(Mo(i.config)),i.middlewareStack.use(Lo(i.config)),i}return Vn(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Bo),da={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},pa={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function ha(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return Wn(void 0,void 0,void 0,(function(){var o,i,a;return Kn(this,(function(s){switch(s.label){case 0:return[4,n(r)];case 1:o=s.sent().response,s.label=2;case 2:return s.trys.push([2,4,,5]),[4,t(o,e)];case 3:return i=s.sent(),[2,{response:o,output:i}];case 4:throw a=s.sent(),Object.defineProperty(a,"$response",{value:o}),a;case 5:return[2]}}))}))}}}(e,n),da),r.add(function(e,t){return function(n,r){return function(r){return Wn(void 0,void 0,void 0,(function(){var o;return Kn(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(Gn(Gn({},r),{request:o}))]}}))}))}}}(e,t),pa)}}}var va,ya,ma,ga,ba,wa,_a,Sa=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(ei),Ea=function(e){function t(n){var r=e.call(this,Gn({name:"AccessDeniedException",$fault:"client"},n))||this;return r.name="AccessDeniedException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(Sa),Oa=function(e){function t(n){var r=e.call(this,Gn({name:"ConflictException",$fault:"client"},n))||this;return r.name="ConflictException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(Sa),Aa=function(e){function t(n){var r=e.call(this,Gn({name:"InternalServerException",$fault:"server"},n))||this;return r.name="InternalServerException",r.$fault="server",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(Sa),xa=function(e){function t(n){var r=e.call(this,Gn({name:"ResourceNotFoundException",$fault:"client"},n))||this;return r.name="ResourceNotFoundException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(Sa),Ta=function(e){function t(n){var r=e.call(this,Gn({name:"ThrottlingException",$fault:"client"},n))||this;return r.name="ThrottlingException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(Sa),ja=function(e){function t(n){var r=e.call(this,Gn({name:"ValidationException",$fault:"client"},n))||this;return r.name="ValidationException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(Sa);!function(e){e.CONFIRMED="Confirmed",e.DENIED="Denied",e.NONE="None"}(va||(va={})),function(e){e.COMPOSITE="Composite",e.LIST="List",e.SCALAR="Scalar"}(ya||(ya={})),function(e){e.FAILED="Failed",e.FULFILLED="Fulfilled",e.FULFILLMENT_IN_PROGRESS="FulfillmentInProgress",e.IN_PROGRESS="InProgress",e.READY_FOR_FULFILLMENT="ReadyForFulfillment",e.WAITING="Waiting"}(ma||(ma={})),function(e){e.MIXED="MIXED",e.NEGATIVE="NEGATIVE",e.NEUTRAL="NEUTRAL",e.POSITIVE="POSITIVE"}(ga||(ga={})),function(e){e.CUSTOM_PAYLOAD="CustomPayload",e.IMAGE_RESPONSE_CARD="ImageResponseCard",e.PLAIN_TEXT="PlainText",e.SSML="SSML"}(ba||(ba={})),function(e){e.DEFAULT="Default",e.SPELL_BY_LETTER="SpellByLetter",e.SPELL_BY_WORD="SpellByWord"}(wa||(wa={})),function(e){e.CLOSE="Close",e.CONFIRM_INTENT="ConfirmIntent",e.DELEGATE="Delegate",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot",e.NONE="None"}(_a||(_a={}));var Pa,Ca,Ma,Ia,Ra,ka=function(e){function t(n){var r=e.call(this,Gn({name:"BadGatewayException",$fault:"server"},n))||this;return r.name="BadGatewayException",r.$fault="server",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(Sa),La=function(e){function t(n){var r=e.call(this,Gn({name:"DependencyFailedException",$fault:"client"},n))||this;return r.name="DependencyFailedException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r}return Vn(t,e),t}(Sa);!function(e){e.AUDIO="AUDIO",e.TEXT="TEXT"}(Pa||(Pa={})),function(e){e.DTMF="DTMF",e.SPEECH="Speech",e.TEXT="Text"}(Ca||(Ca={})),function(e){e.DTMF_START_DETECTED="DTMF_START_DETECTED",e.TEXT_DETECTED="TEXT_DETECTED",e.VOICE_START_DETECTED="VOICE_START_DETECTED"}(Ma||(Ma={})),function(e){e.visit=function(e,t){return void 0!==e.ConfigurationEvent?t.ConfigurationEvent(e.ConfigurationEvent):void 0!==e.AudioInputEvent?t.AudioInputEvent(e.AudioInputEvent):void 0!==e.DTMFInputEvent?t.DTMFInputEvent(e.DTMFInputEvent):void 0!==e.TextInputEvent?t.TextInputEvent(e.TextInputEvent):void 0!==e.PlaybackCompletionEvent?t.PlaybackCompletionEvent(e.PlaybackCompletionEvent):void 0!==e.DisconnectionEvent?t.DisconnectionEvent(e.DisconnectionEvent):t._(e.$unknown[0],e.$unknown[1])}}(Ia||(Ia={})),function(e){e.visit=function(e,t){return void 0!==e.PlaybackInterruptionEvent?t.PlaybackInterruptionEvent(e.PlaybackInterruptionEvent):void 0!==e.TranscriptEvent?t.TranscriptEvent(e.TranscriptEvent):void 0!==e.IntentResultEvent?t.IntentResultEvent(e.IntentResultEvent):void 0!==e.TextResponseEvent?t.TextResponseEvent(e.TextResponseEvent):void 0!==e.AudioResponseEvent?t.AudioResponseEvent(e.AudioResponseEvent):void 0!==e.HeartbeatEvent?t.HeartbeatEvent(e.HeartbeatEvent):void 0!==e.AccessDeniedException?t.AccessDeniedException(e.AccessDeniedException):void 0!==e.ResourceNotFoundException?t.ResourceNotFoundException(e.ResourceNotFoundException):void 0!==e.ValidationException?t.ValidationException(e.ValidationException):void 0!==e.ThrottlingException?t.ThrottlingException(e.ThrottlingException):void 0!==e.InternalServerException?t.InternalServerException(e.InternalServerException):void 0!==e.ConflictException?t.ConflictException(e.ConflictException):void 0!==e.DependencyFailedException?t.DependencyFailedException(e.DependencyFailedException):void 0!==e.BadGatewayException?t.BadGatewayException(e.BadGatewayException):t._(e.$unknown[0],e.$unknown[1])}}(Ra||(Ra={}));var Ua=function(e){return Gn(Gn({},e),e.content&&{content:zo})},Da=function(e){return Gn(Gn(Gn({},e),e.sessionState&&{sessionState:zo}),e.requestAttributes&&{requestAttributes:zo})},Na=function(e){return Gn({},e)},Ba=function(e){return Gn(Gn({},e),e.text&&{text:zo})},Fa=function(e){return Gn(Gn({},e),e.messages&&{messages:e.messages.map((function(e){return Ua(e)}))})},za=function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i,a;return Kn(this,(function(s){switch(s.label){case 0:return r=[Gn({},e)],a={},[4,qs(e.body,t)];case 1:switch(n=Gn.apply(void 0,r.concat([(a.body=s.sent(),a)])),o=Hs(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.lexruntimev2#AccessDeniedException":return[3,2];case"BadGatewayException":case"com.amazonaws.lexruntimev2#BadGatewayException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimev2#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimev2#DependencyFailedException":return[3,8];case"InternalServerException":case"com.amazonaws.lexruntimev2#InternalServerException":return[3,10];case"ResourceNotFoundException":case"com.amazonaws.lexruntimev2#ResourceNotFoundException":return[3,12];case"ThrottlingException":case"com.amazonaws.lexruntimev2#ThrottlingException":return[3,14];case"ValidationException":case"com.amazonaws.lexruntimev2#ValidationException":return[3,16]}return[3,18];case 2:return[4,Va(n,t)];case 3:throw s.sent();case 4:return[4,Ga(n,t)];case 5:throw s.sent();case 6:return[4,$a(n,t)];case 7:throw s.sent();case 8:return[4,Wa(n,t)];case 9:throw s.sent();case 10:return[4,Ka(n,t)];case 11:throw s.sent();case 12:return[4,Ya(n,t)];case 13:throw s.sent();case 14:return[4,Za(n,t)];case 15:throw s.sent();case 16:return[4,Xa(n,t)];case 17:throw s.sent();case 18:i=n.body,ni({output:e,parsedBody:i,exceptionCtor:Sa,errorCode:o}),s.label=19;case 19:return[2]}}))}))},qa=function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i,a;return Kn(this,(function(s){switch(s.label){case 0:return r=[Gn({},e)],a={},[4,qs(e.body,t)];case 1:switch(n=Gn.apply(void 0,r.concat([(a.body=s.sent(),a)])),o=Hs(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.lexruntimev2#AccessDeniedException":return[3,2];case"BadGatewayException":case"com.amazonaws.lexruntimev2#BadGatewayException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimev2#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimev2#DependencyFailedException":return[3,8];case"InternalServerException":case"com.amazonaws.lexruntimev2#InternalServerException":return[3,10];case"ResourceNotFoundException":case"com.amazonaws.lexruntimev2#ResourceNotFoundException":return[3,12];case"ThrottlingException":case"com.amazonaws.lexruntimev2#ThrottlingException":return[3,14];case"ValidationException":case"com.amazonaws.lexruntimev2#ValidationException":return[3,16]}return[3,18];case 2:return[4,Va(n,t)];case 3:throw s.sent();case 4:return[4,Ga(n,t)];case 5:throw s.sent();case 6:return[4,$a(n,t)];case 7:throw s.sent();case 8:return[4,Wa(n,t)];case 9:throw s.sent();case 10:return[4,Ka(n,t)];case 11:throw s.sent();case 12:return[4,Ya(n,t)];case 13:throw s.sent();case 14:return[4,Za(n,t)];case 15:throw s.sent();case 16:return[4,Xa(n,t)];case 17:throw s.sent();case 18:i=n.body,ni({output:e,parsedBody:i,exceptionCtor:Sa,errorCode:o}),s.label=19;case 19:return[2]}}))}))},Ha=si,Va=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=Ha({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new Ea(Gn({$metadata:Bs(e)},t)),[2,ti(r,e.body)]}))}))},Ga=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=Ha({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new ka(Gn({$metadata:Bs(e)},t)),[2,ti(r,e.body)]}))}))},$a=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=Ha({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new Oa(Gn({$metadata:Bs(e)},t)),[2,ti(r,e.body)]}))}))},Wa=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=Ha({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new La(Gn({$metadata:Bs(e)},t)),[2,ti(r,e.body)]}))}))},Ka=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=Ha({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new Aa(Gn({$metadata:Bs(e)},t)),[2,ti(r,e.body)]}))}))},Ya=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=Ha({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new xa(Gn({$metadata:Bs(e)},t)),[2,ti(r,e.body)]}))}))},Za=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=Ha({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new Ta(Gn({$metadata:Bs(e)},t)),[2,ti(r,e.body)]}))}))},Xa=function(e,t){return Wn(void 0,void 0,void 0,(function(){var t,n,r;return Kn(this,(function(o){return t=Ha({}),null!=(n=e.body).message&&(t.message=Yo(n.message)),r=new ja(Gn({$metadata:Bs(e)},t)),[2,ti(r,e.body)]}))}))},Ja=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=Zn(t,2),o=r[0],i=r[1];return null===i?e:Gn(Gn({},e),((n={})[o]=i,n))}),{})},Qa=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return function(e,t){return Gn(Gn(Gn({},null!=e.contextAttributes&&{contextAttributes:Ja(e.contextAttributes,t)}),null!=e.name&&{name:e.name}),null!=e.timeToLive&&{timeToLive:es(e.timeToLive,t)})}(e,t)}))},es=function(e,t){return Gn(Gn({},null!=e.timeToLiveInSeconds&&{timeToLiveInSeconds:e.timeToLiveInSeconds}),null!=e.turnsToLive&&{turnsToLive:e.turnsToLive})},ts=function(e,t){return Gn(Gn(Gn(Gn({},null!=e.slotElicitationStyle&&{slotElicitationStyle:e.slotElicitationStyle}),null!=e.slotToElicit&&{slotToElicit:e.slotToElicit}),null!=e.subSlotToElicit&&{subSlotToElicit:ns(e.subSlotToElicit,t)}),null!=e.type&&{type:e.type})},ns=function(e,t){return Gn(Gn({},null!=e.name&&{name:e.name}),null!=e.subSlotToElicit&&{subSlotToElicit:ns(e.subSlotToElicit,t)})},rs=function(e,t){return Gn(Gn(Gn(Gn({},null!=e.confirmationState&&{confirmationState:e.confirmationState}),null!=e.name&&{name:e.name}),null!=e.slots&&{slots:ls(e.slots,t)}),null!=e.state&&{state:e.state})},os=function(e,t){return Gn({},null!=e.slotHints&&{slotHints:us(e.slotHints,t)})},is=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return function(e,t){return Gn({},null!=e.phrase&&{phrase:e.phrase})}(e)}))},as=function(e,t){return Gn(Gn(Gn(Gn(Gn(Gn({},null!=e.activeContexts&&{activeContexts:Qa(e.activeContexts,t)}),null!=e.dialogAction&&{dialogAction:ts(e.dialogAction,t)}),null!=e.intent&&{intent:rs(e.intent,t)}),null!=e.originatingRequestId&&{originatingRequestId:e.originatingRequestId}),null!=e.runtimeHints&&{runtimeHints:os(e.runtimeHints,t)}),null!=e.sessionAttributes&&{sessionAttributes:ds(e.sessionAttributes,t)})},ss=function(e,t){return Gn(Gn(Gn(Gn({},null!=e.shape&&{shape:e.shape}),null!=e.subSlots&&{subSlots:ls(e.subSlots,t)}),null!=e.value&&{value:ps(e.value,t)}),null!=e.values&&{values:hs(e.values,t)})},us=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=cs(a,t),r))}),{})},cs=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=function(e,t){return Gn(Gn({},null!=e.runtimeHintValues&&{runtimeHintValues:is(e.runtimeHintValues,t)}),null!=e.subSlotHints&&{subSlotHints:cs(e.subSlotHints,t)})}(a,t),r))}),{})},ls=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=ss(a,t),r))}),{})},fs=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return e}))},ds=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=Zn(t,2),o=r[0],i=r[1];return null===i?e:Gn(Gn({},e),((n={})[o]=i,n))}),{})},ps=function(e,t){return Gn(Gn(Gn({},null!=e.interpretedValue&&{interpretedValue:e.interpretedValue}),null!=e.originalValue&&{originalValue:e.originalValue}),null!=e.resolvedValues&&{resolvedValues:fs(e.resolvedValues)})},hs=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return ss(e,t)}))},vs=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=Zn(t,2),o=r[0],i=r[1];return null===i?e:Gn(Gn({},e),((n={})[o]=Yo(i),n))}),{})},ys=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{contextAttributes:null!=e.contextAttributes?vs(e.contextAttributes,t):void 0,name:Yo(e.name),timeToLive:null!=e.timeToLive?ms(e.timeToLive,t):void 0}}(e,t)}))},ms=function(e,t){return{timeToLiveInSeconds:Vo(e.timeToLiveInSeconds),turnsToLive:Vo(e.turnsToLive)}},gs=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{text:Yo(e.text),value:Yo(e.value)}}(e)}))},bs=function(e,t){return{score:Zo(e.score)}},ws=function(e,t){return{slotElicitationStyle:Yo(e.slotElicitationStyle),slotToElicit:Yo(e.slotToElicit),subSlotToElicit:null!=e.subSlotToElicit?_s(e.subSlotToElicit,t):void 0,type:Yo(e.type)}},_s=function(e,t){return{name:Yo(e.name),subSlotToElicit:null!=e.subSlotToElicit?_s(e.subSlotToElicit,t):void 0}},Ss=function(e,t){return{buttons:null!=e.buttons?gs(e.buttons):void 0,imageUrl:Yo(e.imageUrl),subtitle:Yo(e.subtitle),title:Yo(e.title)}},Es=function(e,t){return{confirmationState:Yo(e.confirmationState),name:Yo(e.name),slots:null!=e.slots?ks(e.slots,t):void 0,state:Yo(e.state)}},Os=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{intent:null!=e.intent?Es(e.intent,t):void 0,nluConfidence:null!=e.nluConfidence?bs(e.nluConfidence):void 0,sentimentResponse:null!=e.sentimentResponse?js(e.sentimentResponse,t):void 0}}(e,t)}))},As=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{content:Yo(e.content),contentType:Yo(e.contentType),imageResponseCard:null!=e.imageResponseCard?Ss(e.imageResponseCard):void 0}}(e)}))},xs=function(e,t){return{slotHints:null!=e.slotHints?Is(e.slotHints,t):void 0}},Ts=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{phrase:Yo(e.phrase)}}(e)}))},js=function(e,t){return{sentiment:Yo(e.sentiment),sentimentScore:null!=e.sentimentScore?Ps(e.sentimentScore,t):void 0}},Ps=function(e,t){return{mixed:Zo(e.mixed),negative:Zo(e.negative),neutral:Zo(e.neutral),positive:Zo(e.positive)}},Cs=function(e,t){return{activeContexts:null!=e.activeContexts?ys(e.activeContexts,t):void 0,dialogAction:null!=e.dialogAction?ws(e.dialogAction,t):void 0,intent:null!=e.intent?Es(e.intent,t):void 0,originatingRequestId:Yo(e.originatingRequestId),runtimeHints:null!=e.runtimeHints?xs(e.runtimeHints,t):void 0,sessionAttributes:null!=e.sessionAttributes?Us(e.sessionAttributes,t):void 0}},Ms=function(e,t){return{shape:Yo(e.shape),subSlots:null!=e.subSlots?ks(e.subSlots,t):void 0,value:null!=e.value?Ds(e.value,t):void 0,values:null!=e.values?Ns(e.values,t):void 0}},Is=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=Rs(a,t),r))}),{})},Rs=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=function(e,t){return{runtimeHintValues:null!=e.runtimeHintValues?Ts(e.runtimeHintValues,t):void 0,subSlotHints:null!=e.subSlotHints?Rs(e.subSlotHints,t):void 0}}(a,t),r))}),{})},ks=function(e,t){return Object.entries(e).reduce((function(e,n){var r,o=Zn(n,2),i=o[0],a=o[1];return null===a?e:Gn(Gn({},e),((r={})[i]=Ms(a,t),r))}),{})},Ls=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:Yo(e)}))},Us=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=Zn(t,2),o=r[0],i=r[1];return null===i?e:Gn(Gn({},e),((n={})[o]=Yo(i),n))}),{})},Ds=function(e,t){return{interpretedValue:Yo(e.interpretedValue),originalValue:Yo(e.originalValue),resolvedValues:null!=e.resolvedValues?Ls(e.resolvedValues):void 0}},Ns=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:Ms(e,t)}))},Bs=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},Fs=function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then((function(e){return t.utf8Encoder(e)}))},zs=function(e){return!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},qs=function(e,t){return Fs(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},Hs=function(e,t){var n,r,o=function(e){var t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):void 0},Vs=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Vn(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(ha(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeV2Client",commandName:"RecognizeTextCommand",inputFilterSensitiveLog:Ba,outputFilterSensitiveLog:Fa},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l;return Kn(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),r=n.hostname,o=n.protocol,i=void 0===o?"https":o,a=n.port,s=n.path,u={"content-type":"application/json"},c="".concat((null==s?void 0:s.endsWith("/"))?s.slice(0,-1):s||"")+"/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text",c=ci(c,e,"botId",(function(){return e.botId}),"{botId}",!1),c=ci(c,e,"botAliasId",(function(){return e.botAliasId}),"{botAliasId}",!1),c=ci(c,e,"localeId",(function(){return e.localeId}),"{localeId}",!1),c=ci(c,e,"sessionId",(function(){return e.sessionId}),"{sessionId}",!1),l=JSON.stringify(Gn(Gn(Gn({},null!=e.requestAttributes&&{requestAttributes:ds(e.requestAttributes,t)}),null!=e.sessionState&&{sessionState:as(e.sessionState,t)}),null!=e.text&&{text:e.text})),[2,new ur({protocol:i,hostname:r,port:a,method:"POST",headers:u,path:c,body:l})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i;return Kn(this,(function(a){switch(a.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,za(e,t)]:(n=Ha({$metadata:Bs(e)}),o=Wo,i=Ko,[4,qs(e.body,t)]);case 1:return null!=(r=o.apply(void 0,[i.apply(void 0,[a.sent()]),"body"])).interpretations&&(n.interpretations=Os(r.interpretations,t)),null!=r.messages&&(n.messages=As(r.messages,t)),null!=r.requestAttributes&&(n.requestAttributes=Us(r.requestAttributes,t)),null!=r.sessionId&&(n.sessionId=Yo(r.sessionId)),null!=r.sessionState&&(n.sessionState=Cs(r.sessionState,t)),[2,n]}}))}))}(e,t)},t}(Fo),Gs=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Vn(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(ha(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeV2Client",commandName:"RecognizeUtteranceCommand",inputFilterSensitiveLog:Da,outputFilterSensitiveLog:Na},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l;return Kn(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),r=n.hostname,o=n.protocol,i=void 0===o?"https":o,a=n.port,s=n.path,u=Ha({},zs,{"x-amz-content-sha256":"UNSIGNED-PAYLOAD","content-type":e.requestContentType||"application/octet-stream","x-amz-lex-session-state":e.sessionState,"x-amz-lex-request-attributes":e.requestAttributes,"response-content-type":e.responseContentType}),c="".concat((null==s?void 0:s.endsWith("/"))?s.slice(0,-1):s||"")+"/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance",c=ci(c,e,"botId",(function(){return e.botId}),"{botId}",!1),c=ci(c,e,"botAliasId",(function(){return e.botAliasId}),"{botAliasId}",!1),c=ci(c,e,"localeId",(function(){return e.localeId}),"{localeId}",!1),c=ci(c,e,"sessionId",(function(){return e.sessionId}),"{sessionId}",!1),void 0!==e.inputStream&&(l=e.inputStream),[2,new ur({protocol:i,hostname:r,port:a,method:"POST",headers:u,path:c,body:l})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Wn(void 0,void 0,void 0,(function(){var n,r;return Kn(this,(function(o){return 200!==e.statusCode&&e.statusCode>=300?[2,qa(e,t)]:(n=Ha({$metadata:Bs(e),inputMode:[,e.headers["x-amz-lex-input-mode"]],contentType:[,e.headers["content-type"]],messages:[,e.headers["x-amz-lex-messages"]],interpretations:[,e.headers["x-amz-lex-interpretations"]],sessionState:[,e.headers["x-amz-lex-session-state"]],requestAttributes:[,e.headers["x-amz-lex-request-attributes"]],sessionId:[,e.headers["x-amz-lex-session-id"]],inputTranscript:[,e.headers["x-amz-lex-input-transcript"]]}),r=e.body,n.audioStream=r,[2,n])}))}))}(e,t)},t}(Fo),$s=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ws=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ks=function(e){return $s(void 0,void 0,void 0,(function(){var t,n,r;return Ws(this,(function(o){switch(o.label){case 0:if(void 0===e)return[2,void 0];o.label=1;case 1:return o.trys.push([1,3,,4]),a=e,t=Uint8Array.from(window.atob(a),(function(e){return e.charCodeAt(0)})),[4,(i=t,Tn(void 0,void 0,void 0,(function(){return jn(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e,t){Sn(i,(function(n,r){n?t(n):e(xn(r))}))}))];case 1:return[2,e.sent()]}}))})))];case 2:return n=o.sent(),[2,JSON.parse(n)];case 3:return r=o.sent(),[2,Promise.reject("unable to decode and decompress "+r)];case 4:return[2]}var i,a}))}))};function Ys(e){return(Ys="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 Zs=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xs=function(){return(Xs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Js=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Qs=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},eu=new r.ConsoleLogger("AWSLexV2Provider"),tu=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._botsCompleteCallback={},n}return Zs(t,e),t.prototype.getProviderName=function(){return"AWSLexV2Provider"},t.prototype.configure=function(t){void 0===t&&(t={});var n=["name","botId","aliasId","localeId","providerName","region"];return Object.keys(t).forEach((function(e){var r=t[e];if(!n.every((function(e){return e in r})))throw new Error("invalid bot configuration")})),e.prototype.configure.call(this,t)},t.prototype.sendMessage=function(e,t){return Js(this,void 0,void 0,(function(){var n,o,i;return Qs(this,(function(a){switch(a.label){case 0:if(!this._config[e])return[2,Promise.reject("Bot "+e+" does not exist")];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r.Credentials.get()];case 2:return n=a.sent(),[3,4];case 3:return a.sent(),[2,Promise.reject("No credentials")];case 4:return this._lexRuntimeServiceV2Client=new fa({region:this._config[e].region,credentials:n,customUserAgent:Object(r.getAmplifyUserAgent)()}),i={botAliasId:this._config[e].aliasId,botId:this._config[e].botId,localeId:this._config[e].localeId,sessionId:n.identityId},"string"!=typeof t?[3,6]:[4,this._handleRecognizeTextCommand(e,t,i)];case 5:return o=a.sent(),[3,8];case 6:return[4,this._handleRecognizeUtteranceCommand(e,t,i)];case 7:o=a.sent(),a.label=8;case 8:return[2,o]}}))}))},t.prototype.onComplete=function(e,t){if(!this._config[e])throw new Error("Bot "+e+" does not exist");this._botsCompleteCallback[e]=t},t.prototype._reportBotStatus=function(e,t){var n,r,o,i,a,s,u=this,c=null==e?void 0:e.sessionState;eu.debug("postContent state",null===(n=null==c?void 0:c.intent)||void 0===n?void 0:n.state);var l="function"==typeof(null===(r=this._config)||void 0===r?void 0:r[t].onComplete),f="function"==typeof(null===(o=this._botsCompleteCallback)||void 0===o?void 0:o[t]);if((l||f)&&("ReadyForFulfillment"!==(null===(i=null==c?void 0:c.intent)||void 0===i?void 0:i.state)&&"Fulfilled"!==(null===(a=null==c?void 0:c.intent)||void 0===a?void 0:a.state)||(f&&setTimeout((function(){var n;return null===(n=u._botsCompleteCallback)||void 0===n?void 0:n[t](null,e)}),0),l&&setTimeout((function(){return u._config[t].onComplete(null,e)}),0)),"Failed"===(null===(s=null==c?void 0:c.intent)||void 0===s?void 0:s.state))){var d=new Error("Bot conversation failed");f&&setTimeout((function(){return u._botsCompleteCallback[t](d)}),0),l&&setTimeout((function(){return u._config[t].onComplete(d)}),0)}},t.prototype._formatUtteranceCommandOutput=function(e){return Js(this,void 0,void 0,(function(){var t,n,r;return Qs(this,(function(o){switch(o.label){case 0:return t=[Xs({},e)],n={},[4,Ks(e.messages)];case 1:return n.messages=o.sent(),[4,Ks(e.sessionState)];case 2:return n.sessionState=o.sent(),[4,Ks(e.interpretations)];case 3:return n.interpretations=o.sent(),[4,Ks(e.requestAttributes)];case 4:return n.requestAttributes=o.sent(),[4,Ks(e.inputTranscript)];case 5:return n.inputTranscript=o.sent(),e.audioStream?[4,Pn(e.audioStream)]:[3,7];case 6:return r=o.sent(),[3,8];case 7:r=void 0,o.label=8;case 8:return[2,Xs.apply(void 0,t.concat([(n.audioStream=r,n)]))]}}))}))},t.prototype._handleRecognizeTextCommand=function(e,t,n){return Js(this,void 0,void 0,(function(){var r,o,i,a;return Qs(this,(function(s){switch(s.label){case 0:eu.debug("postText to lex2",t),r=Xs(Xs({},n),{text:t}),s.label=1;case 1:return s.trys.push([1,3,,4]),o=new Vs(r),[4,this._lexRuntimeServiceV2Client.send(o)];case 2:return i=s.sent(),this._reportBotStatus(i,e),[2,i];case 3:return a=s.sent(),[2,Promise.reject(a)];case 4:return[2]}}))}))},t.prototype._handleRecognizeUtteranceCommand=function(e,t,n){return Js(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f;return Qs(this,(function(d){switch(d.label){case 0:return r=t.content,o=t.options.messageType,eu.debug("postContent to lex2",t),"voice"!==o?[3,4]:"object"!==Ys(r)?[2,Promise.reject("invalid content type")]:r instanceof Uint8Array?(s=r,[3,3]):[3,1];case 1:return[4,Pn(r)];case 2:s=d.sent(),d.label=3;case 3:return a=s,i=Xs(Xs({},n),{requestContentType:"audio/x-l16; sample-rate=16000; channel-count=1",inputStream:a}),[3,5];case 4:if("string"!=typeof r)return[2,Promise.reject("invalid content type")];i=Xs(Xs({},n),{requestContentType:"text/plain; charset=utf-8",inputStream:r}),d.label=5;case 5:return d.trys.push([5,8,,9]),u=new Gs(i),[4,this._lexRuntimeServiceV2Client.send(u)];case 6:return c=d.sent(),[4,this._formatUtteranceCommandOutput(c)];case 7:return l=d.sent(),this._reportBotStatus(l,e),[2,l];case 8:return f=d.sent(),[2,Promise.reject(f)];case 9:return[2]}}))}))},t}(a);t.default=qn},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}}])}));
|
|
86
86
|
//# sourceMappingURL=aws-amplify-interactions.min.js.map
|